mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
MINOR Removed unused jQuery.dialog creation in CMSMain.AddForm.js, which causes mem leaks (now uses dedicated pages/add UI)
This commit is contained in:
parent
6581831396
commit
f94f03defe
@ -1,37 +1,5 @@
|
|||||||
(function($) {
|
(function($) {
|
||||||
$.entwine('ss', function($){
|
$.entwine('ss', function($){
|
||||||
$('.cms-page-add-form-dialog').entwine({
|
|
||||||
onmatch: function() {
|
|
||||||
this.dialog({
|
|
||||||
autoOpen: false,
|
|
||||||
bgiframe: true,
|
|
||||||
modal: true,
|
|
||||||
height: 400,
|
|
||||||
width: 600,
|
|
||||||
ghost: true
|
|
||||||
});
|
|
||||||
this._super();
|
|
||||||
},
|
|
||||||
onunmatch: function() {
|
|
||||||
this._super();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.cms-page-add-form-dialog input[name=PageType]').entwine({
|
|
||||||
onmatch: function() {
|
|
||||||
if(this.is(':checked')) this.trigger('click');
|
|
||||||
this._super();
|
|
||||||
},
|
|
||||||
onunmatch: function() {
|
|
||||||
this._super();
|
|
||||||
},
|
|
||||||
onclick: function() {
|
|
||||||
var el = this.parents('li:first');
|
|
||||||
el.setSelected(true);
|
|
||||||
el.siblings().setSelected(false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset the parent node selection if the type is
|
* Reset the parent node selection if the type is
|
||||||
* set back to "toplevel page", to avoid submitting inconsistent state.
|
* set back to "toplevel page", to avoid submitting inconsistent state.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user