mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
afc285cb12
ENHANCEMENT Moved javascript handlers in CMS to concrete: action_print_right(), action_email_right(), action_rollback_right() ENHANCEMENT Moved javascript ParentID UI element in CMS to concrete git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92604 467b73ca-7a2a-4603-9d3b-597d59a354a9
35 lines
737 B
JavaScript
Executable File
35 lines
737 B
JavaScript
Executable File
|
|
|
|
function suggestStageSiteLink() {
|
|
var el = $('viewStageSite');
|
|
el.flasher = setInterval(flashColor.bind(el), 300);
|
|
setTimeout(stopFlashing.bind(el), 3000);
|
|
}
|
|
function flashColor() {
|
|
if(!this.style.color) this.style.color = '';
|
|
this.style.color = (this.style.color == '') ? '#00FF00' : '';
|
|
}
|
|
function stopFlashing() {
|
|
clearInterval(this.flasher);
|
|
}
|
|
|
|
|
|
Behaviour.register({
|
|
'a.cmsEditlink' : {
|
|
onclick : function() {
|
|
if(this.href.match(/admin\/show\/([0-9]+)($|#|\?)/)) {
|
|
$('Form_EditForm').getPageFromServer(RegExp.$1);
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
Behaviour.register({
|
|
'#Form_EditForm' : {
|
|
changeDetection_fieldsToIgnore : {
|
|
'restricted-chars[Form_EditForm_URLSegment]' : true,
|
|
'Sort' : true
|
|
}
|
|
}
|
|
}); |