mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Display "Draft saved at..."
This commit is contained in:
parent
19a5d31fc7
commit
6f2eed1852
@ -36,9 +36,22 @@ function asend() {
|
|||||||
var r = XMLHttpRequestGeneric();
|
var r = XMLHttpRequestGeneric();
|
||||||
r.onreadystatechange = function()
|
r.onreadystatechange = function()
|
||||||
{
|
{
|
||||||
// restore original title after successful sending form data
|
// after successful completion ...
|
||||||
if (r.readyState==4 && r.status==200) {
|
if (r.readyState==4 && r.status==200) {
|
||||||
|
// restore original title
|
||||||
document.title = page_title;
|
document.title = page_title;
|
||||||
|
|
||||||
|
// set "saved" message
|
||||||
|
d = new Date();
|
||||||
|
e1 = document.getElementById('saved1');
|
||||||
|
e1.style.display = 'inline';
|
||||||
|
s = e1.innerHTML.substring(0, e1.innerHTML.length-8);
|
||||||
|
e1.innerHTML = s+d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds();
|
||||||
|
e2 = document.getElementById('saved2');
|
||||||
|
e2.innerHTML = e1.innerHTML;
|
||||||
|
e2.style.display = 'inline';
|
||||||
|
|
||||||
|
// append edit_id (to prevent creation of new messages)
|
||||||
if (r.responseText.substring(0,2) == 'OK') {
|
if (r.responseText.substring(0,2) == 'OK') {
|
||||||
if (document.getElementById('edit_id') == null) {
|
if (document.getElementById('edit_id') == null) {
|
||||||
var id = r.responseText.substring(3);
|
var id = r.responseText.substring(3);
|
||||||
|
|||||||
@ -10434,6 +10434,9 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
loc("Preview"));
|
loc("Preview"));
|
||||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
||||||
loc("Back"));
|
loc("Back"));
|
||||||
|
|
||||||
|
rsprintf(" <span id=\"saved1\" style=\"font-size:10px;font-style:italic;display:none\">%s 00:00:00</span>", loc("Draft saved at"));
|
||||||
|
|
||||||
rsprintf("</span></td></tr>\n\n");
|
rsprintf("</span></td></tr>\n\n");
|
||||||
|
|
||||||
/*---- entry form ----*/
|
/*---- entry form ----*/
|
||||||
@ -11947,6 +11950,9 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
loc("Preview"));
|
loc("Preview"));
|
||||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
||||||
loc("Back"));
|
loc("Back"));
|
||||||
|
|
||||||
|
rsprintf(" <span id=\"saved2\" style=\"font-size:10px;font-style:italic;display:none\">%s 00:00:00</span>", loc("Draft saved at"));
|
||||||
|
|
||||||
rsprintf("</span></td></tr>\n\n");
|
rsprintf("</span></td></tr>\n\n");
|
||||||
|
|
||||||
rsprintf("</table><!-- show_standard_title -->\n");
|
rsprintf("</table><!-- show_standard_title -->\n");
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>IDESourceControlProjectIdentifier</key>
|
<key>IDESourceControlProjectIdentifier</key>
|
||||||
<string>81431534-03C4-4F18-8910-AA341A0BBED2</string>
|
<string>81431534-03C4-4F18-8910-AA341A0BBED2</string>
|
||||||
<key>IDESourceControlProjectName</key>
|
<key>IDESourceControlProjectName</key>
|
||||||
<string>elogd</string>
|
<string>project</string>
|
||||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>4A8AA611133AD3F7E07C7C33DCF50244FB7A1AB5</key>
|
<key>4A8AA611133AD3F7E07C7C33DCF50244FB7A1AB5</key>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
<string>bitbucket.org:ritt/elog.git</string>
|
<string>bitbucket.org:ritt/elog.git</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>IDESourceControlProjectPath</key>
|
<key>IDESourceControlProjectPath</key>
|
||||||
<string>xcode/elogd.xcodeproj</string>
|
<string>xcode/elogd.xcodeproj/project.xcworkspace</string>
|
||||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>4A8AA611133AD3F7E07C7C33DCF50244FB7A1AB5</key>
|
<key>4A8AA611133AD3F7E07C7C33DCF50244FB7A1AB5</key>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user