aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-07 14:12:46 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-07 14:12:46 +0000
commit5fe44a6d6e4f6bc5113f4e13df517f66be890a74 (patch)
tree7f5a62a4ad60777cec6d5d40e2287a9bc4ec6bb0 /mod
parent4b47e478929925086f75ac492017c3ce63712ec7 (diff)
downloadelgg-5fe44a6d6e4f6bc5113f4e13df517f66be890a74.tar.gz
elgg-5fe44a6d6e4f6bc5113f4e13df517f66be890a74.tar.bz2
Updating autosave handler and "Saved date" return values.
git-svn-id: http://code.elgg.org/elgg/trunk@5645 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/actions/blog/auto_save_revision.php3
-rw-r--r--mod/blog/views/default/blog/forms/edit.php10
2 files changed, 9 insertions, 4 deletions
diff --git a/mod/blog/actions/blog/auto_save_revision.php b/mod/blog/actions/blog/auto_save_revision.php
index a67939e9f..520d57531 100644
--- a/mod/blog/actions/blog/auto_save_revision.php
+++ b/mod/blog/actions/blog/auto_save_revision.php
@@ -86,4 +86,5 @@ if ($error) {
$msg = elgg_echo('blog:message:saved');
$json = array('success' => TRUE, 'message' => $msg, 'guid' => $blog->getGUID());
echo json_encode($json);
-} \ No newline at end of file
+}
+exit;
diff --git a/mod/blog/views/default/blog/forms/edit.php b/mod/blog/views/default/blog/forms/edit.php
index 7fc5d6c91..2120f04b8 100644
--- a/mod/blog/views/default/blog/forms/edit.php
+++ b/mod/blog/views/default/blog/forms/edit.php
@@ -101,7 +101,11 @@ $body_input = elgg_view('input/longtext', array(
));
$save_status = elgg_echo('blog:save_status');
-$never = elgg_echo('blog:never');
+if ($values['publish_date']) {
+ $saved = date('F j, Y @ H:i', $values['publish_date']);
+} else {
+ $saved = elgg_echo('blog:never');
+}
$status_label = elgg_echo('blog:status');
$status_input = elgg_view('input/pulldown', array(
@@ -174,7 +178,7 @@ $body_input
<br />
<p id="blog_save_status">
- $save_status <span id="blog_save_status_time">$never</span>
+ $save_status <span id="blog_save_status_time">$saved</span>
</p>
<p>
@@ -243,7 +247,7 @@ elgg_clear_sticky_form('blog');
var d = new Date();
var mins = d.getMinutes() + '';
if (mins.length == 1) mins = '0' + mins;
- $("#blog_save_status_time").html(d.getHours() + ":" + mins);
+ $("#blog_save_status_time").html(d.toLocaleDateString() + " @ " + d.getHours() + ":" + mins);
} else {
$("#blog_save_status_time").html("<?php echo elgg_echo('error'); ?>");
}