mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Replaced hardcoded URLs in LeftAndMain.Tree.js with data-url-* attributes
This commit is contained in:
parent
018830e9e8
commit
d22e80b1bd
@ -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,
|
||||
|
@ -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';
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user