Added CTRL+P and CTRL+S shortcuts

SVN revision: 1812
This commit is contained in:
2007-03-21 18:05:52 +00:00
parent 8633d7852e
commit c56d6db639
2 changed files with 16 additions and 3 deletions
+14 -1
View File
@@ -146,10 +146,23 @@ function elKeyPress(evt)
queryHeading(document.form1.Text);
return false;
}
if (String.fromCharCode(evt.charCode) == "p") {
if (String.fromCharCode(evt.charCode) == "m") {
window.open('upload.html','','top=280,left=350,width=500,height=120,dependent=yes,menubar=no,status=no,scrollbars=no,location=no,resizable=yes');
return false;
}
if (String.fromCharCode(evt.charCode) == "p") {
document.form1.jcmd.value = "Preview";
chkform();
cond_submit();
return false;
}
if (String.fromCharCode(evt.charCode) == "s") {
document.form1.jcmd.value = "Submit";
chkform();
cond_submit();
document.form1.Text.focus();
return false;
}
}
return true;
+2 -2
View File
@@ -9215,7 +9215,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
if (isparam("inlineatt") && *getparam("inlineatt"))
strcpy(script, " OnLoad=\"document.form1.Text.focus();\"");
strcat(script, " OnLoad=\"elKeyInit();\"");
strcat(script, " OnLoad=\"elKeyInit();\" OnFocus=\"elKeyInit();\"");
if (getcfg(lbs->name, "Use Lock", str, sizeof(str)) && atoi(str) == 1)
rsprintf("<body onUnload=\"unload();\"%s>\n", script);
@@ -9849,7 +9849,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
sprintf(str, "window.open('upload.html', '',");
strlcat(str, "'top=280,left=350,width=500,height=120,dependent=yes,", sizeof(str));
strlcat(str, "menubar=no,status=no,scrollbars=no,location=no,resizable=yes')", sizeof(str));
ricon("image", loc("Insert image CTRL+P"), str);
ricon("image", loc("Insert image CTRL+M"), str);
rsprintf(" ");
ricon("quote", loc("Insert quote"), "elcode(document.form1.Text, 'QUOTE','')");