浏览代码

Function: Created key_press function to dynamically generate key detection javascript.
Voicemail: Ctrl+A checks all checkboxes, pressing Delete deletes the checked Voicemails.
Editor: Integrated key_press function.
Command: Integrated key_press function.

reliberate 9 年之前
父节点
当前提交
e5cbc73179
共有 1 个文件被更改,包括 3 次插入12 次删除
  1. 3 12
      exec.php

+ 3 - 12
exec.php

@@ -425,18 +425,9 @@ else {
 			document.getElementById('editor').style.fontSize='<?php echo $setting_size;?>';
 			focus_editor();
 
-		//keyboard shortcuts
-			$(window).keypress(function(event) {
-				//execute command [Ctrl+Enter]
-				if (((event.which == 13 || event.which == 10) && event.ctrlKey) || (event.which == 19)) {
-					$('form#frm').submit();
-					return false;
-				}
-				//otherwise, default action
-				else {
-					return true;
-				}
-			});
+		//keyboard shortcut to execute command
+			<?php key_press('ctrl+enter', 'down', 'window', null, null, "$('form#frm').submit();", false); ?>
+
 		//remove certain keyboard shortcuts
 			editor.commands.bindKey("Ctrl-T", null); //new browser tab
 	</script>