mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: put all CMS JS code into 'ss' namespace.
Conflicts: admin/javascript/LeftAndMain.js javascript/GridField.js
This commit is contained in:
parent
3412a0e58d
commit
3d0876c8f5
@ -89,7 +89,7 @@
|
||||
data.push({name:button.attr('name'),value:button.val()});
|
||||
|
||||
// TODO Should be set by hiddenfield already
|
||||
jQuery('.cms-content').entwine('ss').submitForm(
|
||||
jQuery('.cms-content').submitForm(
|
||||
this.attr('action'),
|
||||
null,
|
||||
function() {
|
||||
|
@ -282,7 +282,6 @@
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Class: #Form_BatchActionsForm :select[name=Action]
|
||||
@ -320,7 +319,7 @@
|
||||
/**
|
||||
* Publish selected pages action
|
||||
*/
|
||||
$('#Form_BatchActionsForm').entwine('ss').register('admin/batchactions/publish', function(ids) {
|
||||
$('#Form_BatchActionsForm').register('admin/batchactions/publish', function(ids) {
|
||||
var confirmed = confirm(
|
||||
"You have " + ids.length + " pages selected.\n\n"
|
||||
+ "Do your really want to publish?"
|
||||
@ -331,7 +330,7 @@
|
||||
/**
|
||||
* Unpublish selected pages action
|
||||
*/
|
||||
$('#Form_BatchActionsForm').entwine('ss').register('admin/batchactions/unpublish', function(ids) {
|
||||
$('#Form_BatchActionsForm').register('admin/batchactions/unpublish', function(ids) {
|
||||
var confirmed = confirm(
|
||||
"You have " + ids.length + " pages selected.\n\n"
|
||||
+ "Do your really want to unpublish?"
|
||||
@ -342,7 +341,7 @@
|
||||
/**
|
||||
* Delete selected pages action
|
||||
*/
|
||||
$('#Form_BatchActionsForm').entwine('ss').register('admin/batchactions/delete', function(ids) {
|
||||
$('#Form_BatchActionsForm').register('admin/batchactions/delete', function(ids) {
|
||||
var confirmed = confirm(
|
||||
"You have " + ids.length + " pages selected.\n\n"
|
||||
+ "Do your really want to delete?"
|
||||
@ -353,7 +352,7 @@
|
||||
/**
|
||||
* Delete selected pages from live action
|
||||
*/
|
||||
$('#Form_BatchActionsForm').entwine('ss').register('admin/batchactions/deletefromlive', function(ids) {
|
||||
$('#Form_BatchActionsForm').register('admin/batchactions/deletefromlive', function(ids) {
|
||||
var confirmed = confirm(
|
||||
"You have " + ids.length + " pages selected.\n\n"
|
||||
+ "Do your really want to delete these pages from live?"
|
||||
@ -361,5 +360,6 @@
|
||||
return (confirmed) ? ids : false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
@ -185,7 +185,6 @@
|
||||
this.removeClass('changed');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Load edit form for the selected node when its clicked.
|
||||
@ -224,7 +223,7 @@
|
||||
// Retain search parameters
|
||||
if(document.location.search) url = $.path.addSearchParams(url, document.location.search.replace(/^\?/, ''));
|
||||
// Load new page
|
||||
container.entwine('ss').loadPanel(url);
|
||||
container.loadPanel(url);
|
||||
} else {
|
||||
self.removeForm();
|
||||
}
|
||||
@ -240,5 +239,6 @@
|
||||
this.find('.cms-content-loading-overlay,.cms-content-loading-spinner').remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
@ -508,7 +508,6 @@ jQuery.noConflict();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Overload the default GridField behaviour (open a new URL in the browser)
|
||||
@ -519,7 +518,7 @@ jQuery.noConflict();
|
||||
// Include any GET parameters from the current URL, as the view state might depend on it.
|
||||
// For example, a list prefiltered through external search criteria might be passed to GridField.
|
||||
if(window.location.search) url += window.location.search;
|
||||
$('.cms-container').entwine('ss').loadPanel(url);
|
||||
$('.cms-container').loadPanel(url);
|
||||
}
|
||||
});
|
||||
|
||||
@ -542,7 +541,7 @@ jQuery.noConflict();
|
||||
|
||||
var container = this.closest('.cms-container');
|
||||
container.find('.cms-edit-form').tabs('select',0); //always switch to the first tab (list view) when searching
|
||||
container .entwine('ss').loadPanel(url);
|
||||
container.loadPanel(url);
|
||||
return false;
|
||||
},
|
||||
|
||||
@ -648,7 +647,7 @@ jQuery.noConflict();
|
||||
baseUrl = $('base').attr('href'),
|
||||
isSame = (makeAbs(settings.url, baseUrl) == makeAbs(document.location.href));
|
||||
|
||||
if(!isSame) $('.cms-container').entwine('ss').loadPanel(settings.url);
|
||||
if(!isSame) $('.cms-container').loadPanel(settings.url);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
@ -669,6 +668,7 @@ jQuery.noConflict();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
(function($) {
|
||||
|
||||
$.entwine('ss', function($) {
|
||||
/**
|
||||
* Creates a jQuery UI tab navigation bar, detached from the container DOM structure.
|
||||
*/
|
||||
@ -30,6 +31,7 @@
|
||||
this.addClass(cls).siblings().not(this).removeClass(cls);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Allows icon definition via HTML5 data attrs for easier handling in PHP
|
||||
|
@ -1,5 +1,6 @@
|
||||
(function($){
|
||||
|
||||
$.entwine('ss', function($) {
|
||||
$('.ss-gridfield').entwine({
|
||||
/**
|
||||
* @param {Object} Additional options for jQuery.ajax() call
|
||||
@ -332,4 +333,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
var _clickTestFn = function(e) {
|
||||
// If the click target is not a child of the current field, close the panel automatically.
|
||||
if(!$(e.target).parents('.TreeDropdownField').length) jQuery('.TreeDropdownField').entwine('ss').closePanel();
|
||||
if(!$(e.target).parents('.TreeDropdownField').length) jQuery('.TreeDropdownField').closePanel();
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user