mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Added CTRL+P and CTRL+S shortcuts
SVN revision: 1812
This commit is contained in:
parent
8633d7852e
commit
c56d6db639
@ -146,10 +146,23 @@ function elKeyPress(evt)
|
|||||||
queryHeading(document.form1.Text);
|
queryHeading(document.form1.Text);
|
||||||
return false;
|
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');
|
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;
|
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;
|
return true;
|
||||||
|
|||||||
@ -9215,7 +9215,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
if (isparam("inlineatt") && *getparam("inlineatt"))
|
if (isparam("inlineatt") && *getparam("inlineatt"))
|
||||||
strcpy(script, " OnLoad=\"document.form1.Text.focus();\"");
|
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)
|
if (getcfg(lbs->name, "Use Lock", str, sizeof(str)) && atoi(str) == 1)
|
||||||
rsprintf("<body onUnload=\"unload();\"%s>\n", script);
|
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', '',");
|
sprintf(str, "window.open('upload.html', '',");
|
||||||
strlcat(str, "'top=280,left=350,width=500,height=120,dependent=yes,", sizeof(str));
|
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));
|
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(" ");
|
rsprintf(" ");
|
||||||
ricon("quote", loc("Insert quote"), "elcode(document.form1.Text, 'QUOTE','')");
|
ricon("quote", loc("Insert quote"), "elcode(document.form1.Text, 'QUOTE','')");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user