Update uses of (removed) jsuri interface

This commit is contained in:
Matt-Yorkley
2022-01-05 16:35:17 +00:00
parent 0721800f56
commit 95464cf956
2 changed files with 5 additions and 6 deletions

View File

@@ -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,

View File

@@ -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"