show light yellow for .5 secs on save revision keypress

This commit is contained in:
John McLear 2013-03-28 02:24:59 +00:00
parent 6b55d13370
commit c489177206
1 changed files with 5 additions and 0 deletions

View File

@ -3649,6 +3649,11 @@ function Ace2Inner(){
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "s" && (evt.metaKey || evt.ctrlKey)) /* Do a saved revision on ctrl S */
{
evt.preventDefault();
var originalBackground = parent.parent.$('#revisionlink').css("background")
parent.parent.$('#revisionlink').css({"background":"lightyellow"});
setTimeout(function(){
parent.parent.$('#revisionlink').css({"background":originalBackground});
}, 500);
parent.parent.pad.collabClient.sendMessage({"type":"SAVE_REVISION"}); /* The parent.parent part of this is BAD and I feel bad.. It may break something */
specialHandled = true;
}