mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
34 lines
739 B
JavaScript
34 lines
739 B
JavaScript
(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();
|
|
}
|
|
});
|
|
|
|
$('.cms-page-add-form-dialog input[name=PageType]').entwine({
|
|
onmatch: function() {
|
|
if(this.is(':checked')) this.trigger('click');
|
|
this._super();
|
|
},
|
|
onclick: function() {
|
|
this.parents('li:first').addClass('selected').siblings().removeClass('selected');
|
|
}
|
|
});
|
|
|
|
$(".cms-page-add-button").entwine({
|
|
onclick: function(e) {
|
|
$('.cms-page-add-form-dialog').dialog('open');
|
|
e.preventDefault();
|
|
}
|
|
});
|
|
});
|
|
}(jQuery)); |