silverstripe-cms/javascript/CMSMain_right.js
Ingo Schommer afc285cb12 ENHANCEMENT Removed some javascript handlers for ajax submission in CMS: action_save_right(), action_publish_right() - they're now using the same unified saving method
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
2009-11-21 02:36:13 +00:00

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
}
}
});