mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Updating usage of jQuery.data() to confirm with API changes in 1.6 (camelcased names)
This commit is contained in:
parent
0bc6bffa9b
commit
8b6ef6599e
@ -305,7 +305,7 @@
|
|||||||
$('.cms-content .cms-panel-link, .cms-content a.crumb').entwine({
|
$('.cms-content .cms-panel-link, .cms-content a.crumb').entwine({
|
||||||
onclick: function(e) {
|
onclick: function(e) {
|
||||||
var href = this.attr('href'), url = href ? href : this.data('href'),
|
var href = this.attr('href'), url = href ? href : this.data('href'),
|
||||||
data = (this.data('target-panel')) ? {selector: this.data('target-panel')} : null;
|
data = (this.data('targetPanel')) ? {selector: this.data('targetPanel')} : null;
|
||||||
|
|
||||||
$('.cms-container').entwine('ss').loadPanel(url, null, data);
|
$('.cms-container').entwine('ss').loadPanel(url, null, data);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
// Add ajax settings after init period to avoid unnecessary initial ajax load
|
// Add ajax settings after init period to avoid unnecessary initial ajax load
|
||||||
// of existing tree in DOM - see load_node_html()
|
// of existing tree in DOM - see load_node_html()
|
||||||
data.inst._set_settings({'html_data': {'ajax': {
|
data.inst._set_settings({'html_data': {'ajax': {
|
||||||
'url': self.data('url-tree'),
|
'url': self.data('urlTree'),
|
||||||
'data': function(node) {
|
'data': function(node) {
|
||||||
var params = self.data('searchparams') || [];
|
var params = self.data('searchparams') || [];
|
||||||
// Avoid duplication of parameters
|
// Avoid duplication of parameters
|
||||||
@ -145,7 +145,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
'url': self.data('url-savetreenode'),
|
'url': self.data('urlSavetreenode'),
|
||||||
'data': {
|
'data': {
|
||||||
ID: $(movedNode).data('id'),
|
ID: $(movedNode).data('id'),
|
||||||
ParentID: $(newParentNode).data('id') || 0,
|
ParentID: $(newParentNode).data('id') || 0,
|
||||||
|
@ -146,7 +146,7 @@
|
|||||||
var self = this, panel = this.getPanel(), treeHolder = $(panel).find('.tree-holder');
|
var self = this, panel = this.getPanel(), treeHolder = $(panel).find('.tree-holder');
|
||||||
var params = (params) ? $.extend({}, this.getRequestParams(), params) : this.getRequestParams();
|
var params = (params) ? $.extend({}, this.getRequestParams(), params) : this.getRequestParams();
|
||||||
panel.addClass('loading');
|
panel.addClass('loading');
|
||||||
treeHolder.load(this.data('url-tree'), params, function(html, status, xhr) {
|
treeHolder.load(this.data('urlTree'), params, function(html, status, xhr) {
|
||||||
var firstLoad = true;
|
var firstLoad = true;
|
||||||
if(status == 'success') {
|
if(status == 'success') {
|
||||||
$(this)
|
$(this)
|
||||||
@ -194,7 +194,7 @@
|
|||||||
// TODO Hack to avoid ajax load on init, see http://code.google.com/p/jstree/issues/detail?id=911
|
// TODO Hack to avoid ajax load on init, see http://code.google.com/p/jstree/issues/detail?id=911
|
||||||
'data': this.getPanel().find('.tree-holder').html(),
|
'data': this.getPanel().find('.tree-holder').html(),
|
||||||
'ajax': {
|
'ajax': {
|
||||||
'url': this.data('url-tree'),
|
'url': this.data('urlTree'),
|
||||||
'data': function(node) {
|
'data': function(node) {
|
||||||
var id = $(node).data("id") ? $(node).data("id") : 0, params = self.getRequestParams();
|
var id = $(node).data("id") ? $(node).data("id") : 0, params = self.getRequestParams();
|
||||||
params = $.extend({}, params, {ID: id, ajax: 1});
|
params = $.extend({}, params, {ID: id, ajax: 1});
|
||||||
@ -315,7 +315,7 @@
|
|||||||
var self = this, panel = this.getPanel(), treeHolder = $(panel).find('.tree-holder');
|
var self = this, panel = this.getPanel(), treeHolder = $(panel).find('.tree-holder');
|
||||||
var params = (params) ? $.extend({}, this.getRequestParams(), params) : this.getRequestParams();
|
var params = (params) ? $.extend({}, this.getRequestParams(), params) : this.getRequestParams();
|
||||||
panel.addClass('loading');
|
panel.addClass('loading');
|
||||||
treeHolder.load(this.data('url-tree'), params, function(html, status, xhr) {
|
treeHolder.load(this.data('urlTree'), params, function(html, status, xhr) {
|
||||||
var firstLoad = true;
|
var firstLoad = true;
|
||||||
if(status == 'success') {
|
if(status == 'success') {
|
||||||
$(this)
|
$(this)
|
||||||
|
Loading…
Reference in New Issue
Block a user