Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Replaced hardcoded URLs in LeftAndMain.Tree.js with data-url-* …

…attributes
  • Loading branch information...
commit d22e80b1bd8212080c4f31b8157e12aa8f109a48 1 parent 018830e
@chillu chillu authored
View
4 javascript/LeftAndMain.Tree.js
@@ -15,7 +15,7 @@
// TODO Hack to avoid ajax load on init, see http://code.google.com/p/jstree/issues/detail?id=911
'data': treeContainer.html(),
'ajax': {
- 'url': 'admin/getsubtree',
+ 'url': treeContainer.data('url-tree'),
'data': function(node) {
return { ID : $(node).data("id") ? $(node).data("id") : 0 , ajax: 1};
}
@@ -82,7 +82,7 @@
});
$.ajax({
- 'url': 'admin/savetreenode',
+ 'url': treeContainer.data('url-savetreenode'),
'data': {
ID: $(movedNode).data('id'),
ParentID: $(newParentNode).data('id') || 0,
View
12 javascript/SecurityAdmin.Tree.js
@@ -1,12 +0,0 @@
-/**
- * File: SecurityAdmin.Tree.js
- *
- * Configuration for the left hand tree
- */
-if(typeof SiteTreeHandlers == 'undefined') SiteTreeHandlers = {};
-SiteTreeHandlers.parentChanged_url = 'admin/security/ajaxupdateparent';
-SiteTreeHandlers.orderChanged_url = 'admin/security/ajaxupdatesort';
-SiteTreeHandlers.loadPage_url = 'admin/security/getitem';
-SiteTreeHandlers.loadTree_url = 'admin/security/getsubtree';
-SiteTreeHandlers.showRecord_url = 'admin/security/show/';
-SiteTreeHandlers.controller_url = 'admin/security';
View
2  templates/Includes/AssetAdmin_left.ss
@@ -36,7 +36,7 @@
</label>
</div>
- <div id="sitetree_ul">
+ <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)">
$SiteTreeAsUL
</div>
View
2  templates/Includes/CMSMain_left.ss
@@ -7,7 +7,7 @@
<div id="TreeTools">
<% include CMSMain_TreeTools %>
</div>
- <div id="sitetree_ul">
+ <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)">
$SiteTreeAsUL
</div>
</div>
View
2  templates/Includes/ReportAdmin_left.ss
@@ -10,7 +10,7 @@
</h3>
<div id="sitetree_holder">
<div id="sitetree_and_tools">
- <div id="sitetree_ul">
+ <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)">
<% include ReportAdmin_SiteTree %>
</div>
</div>
View
2  templates/Includes/SecurityAdmin_left.ss
@@ -36,7 +36,7 @@
</label>
</div>
- <div id="sitetree_ul">
+ <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)">
$SiteTreeAsUL
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.