mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Update uses of (removed) jsuri interface
This commit is contained in:
@@ -4,8 +4,7 @@ root.taxon_tree_menu = (obj, context) ->
|
||||
|
||||
base_url = Spree.url(Spree.routes.taxonomy_taxons_path)
|
||||
admin_base_url = Spree.url(Spree.routes.admin_taxonomy_taxons_path)
|
||||
edit_url = admin_base_url.clone()
|
||||
edit_url.setPath(edit_url.path() + '/' + obj.attr("id") + "/edit");
|
||||
edit_url = Spree.url(Spree.routes.admin_taxonomy_taxons_path + '/' + obj.attr("id") + "/edit");
|
||||
|
||||
create:
|
||||
label: "<i class='icon-plus'></i> " + Spree.translations.add,
|
||||
|
||||
@@ -9,7 +9,7 @@ handle_move = (e, data) ->
|
||||
new_parent = data.rslt.np
|
||||
|
||||
url = Spree.url(base_url).clone()
|
||||
url.setPath url.path() + '/' + node.attr("id")
|
||||
url.pathname = url.pathname + '/' + node.attr("id")
|
||||
$.ajax
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
@@ -41,7 +41,7 @@ handle_rename = (e, data) ->
|
||||
name = data.rslt.new_name
|
||||
|
||||
url = Spree.url(base_url).clone()
|
||||
url.setPath(url.path() + '/' + node.attr("id"))
|
||||
url.pathname = url.pathname + '/' + node.attr("id")
|
||||
|
||||
$.ajax
|
||||
type: "POST",
|
||||
@@ -73,7 +73,7 @@ root.setup_taxonomy_tree = (taxonomy_id) ->
|
||||
root.base_url = Spree.url(Spree.routes.taxonomy_taxons_path)
|
||||
|
||||
$.ajax
|
||||
url: base_url.path().replace("/taxons", "/jstree"),
|
||||
url: base_url.pathname.replace("/taxons", "/jstree"),
|
||||
success: (taxonomy) ->
|
||||
last_rollback = null
|
||||
|
||||
@@ -82,7 +82,7 @@ root.setup_taxonomy_tree = (taxonomy_id) ->
|
||||
data: taxonomy,
|
||||
ajax:
|
||||
url: (e) ->
|
||||
base_url.path() + '/' + e.attr('id') + '/jstree'
|
||||
base_url.pathname + '/' + e.attr('id') + '/jstree'
|
||||
themes:
|
||||
theme: "apple",
|
||||
url: "/assets/jquery.jstree/themes/apple/style.css"
|
||||
|
||||
Reference in New Issue
Block a user