Display "Draft saved at..."
This commit is contained in:
+14
-1
@@ -36,9 +36,22 @@ function asend() {
|
||||
var r = XMLHttpRequestGeneric();
|
||||
r.onreadystatechange = function()
|
||||
{
|
||||
// restore original title after successful sending form data
|
||||
// after successful completion ...
|
||||
if (r.readyState==4 && r.status==200) {
|
||||
// restore original 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 (document.getElementById('edit_id') == null) {
|
||||
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"));
|
||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
||||
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");
|
||||
|
||||
/*---- entry form ----*/
|
||||
@@ -11947,6 +11950,9 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
||||
loc("Preview"));
|
||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
||||
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("</table><!-- show_standard_title -->\n");
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>81431534-03C4-4F18-8910-AA341A0BBED2</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>elogd</string>
|
||||
<string>project</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>4A8AA611133AD3F7E07C7C33DCF50244FB7A1AB5</key>
|
||||
@@ -16,7 +16,7 @@
|
||||
<string>bitbucket.org:ritt/elog.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>xcode/elogd.xcodeproj</string>
|
||||
<string>xcode/elogd.xcodeproj/project.xcworkspace</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>4A8AA611133AD3F7E07C7C33DCF50244FB7A1AB5</key>
|
||||
|
||||
Reference in New Issue
Block a user