From: <var...@us...> - 2014-07-31 09:50:16
|
Revision: 9038 http://sourceforge.net/p/phpwiki/code/9038 Author: vargenau Date: 2014-07-31 09:50:05 +0000 (Thu, 31 Jul 2014) Log Message: ----------- Close the window with Escape key Modified Paths: -------------- trunk/themes/default/toolbar.js Modified: trunk/themes/default/toolbar.js =================================================================== --- trunk/themes/default/toolbar.js 2014-07-31 09:18:36 UTC (rev 9037) +++ trunk/themes/default/toolbar.js 2014-07-31 09:50:05 UTC (rev 9038) @@ -44,6 +44,12 @@ var h = (screen.height-height)/2; var w = (screen.width-width)/2; pullwin = window.open('','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,top='+h+',left='+w+',height='+height+',width='+width); + // Close the window with Escape key + pullwin.onkeydown = function(e){ + if(e.keyCode === 27){ + pullwin.window.close(); + } + }; pullwin.window.document.writeln(doctype); pullwin.window.document.writeln('<html>\n<head>\n<title>'+escapeQuotes(title)+'</title>'); pullwin.window.document.writeln(cssfile); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |