mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-20 10:55:25 +00:00
See ChangeLog
Monotone-Parent: 3bcf335dfec03346a40495ed251c4c99d8b3890f Monotone-Revision: fb988c964ef041fc784d33b6c0cf192735fe88a0 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2010-06-16T20:21:38 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -136,6 +136,17 @@ function onEditorSubmitClick(event) {
|
||||
this.blur();
|
||||
}
|
||||
|
||||
function onDocumentKeydown(event) {
|
||||
var target = Event.element(event);
|
||||
if (target.tagName == "INPUT" || target.tagName == "SELECT") {
|
||||
if (event.keyCode == Event.KEY_RETURN) {
|
||||
var fcn = onEditorSubmitClick.bind($("submitButton"));
|
||||
fcn();
|
||||
Event.stop(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initEditorForm() {
|
||||
var tabsContainer = $("editorTabs");
|
||||
var controller = new SOGoTabsController();
|
||||
@@ -148,6 +159,8 @@ function initEditorForm() {
|
||||
|
||||
$("cancelButton").observe("click", onEditorCancelClick);
|
||||
$("submitButton").observe("click", onEditorSubmitClick);
|
||||
|
||||
Event.observe(document, "keydown", onDocumentKeydown);
|
||||
}
|
||||
|
||||
document.observe("dom:loaded", initEditorForm);
|
||||
|
||||
Reference in New Issue
Block a user