From 5fe44a6d6e4f6bc5113f4e13df517f66be890a74 Mon Sep 17 00:00:00 2001 From: nickw Date: Wed, 7 Apr 2010 14:12:46 +0000 Subject: Updating autosave handler and "Saved date" return values. git-svn-id: http://code.elgg.org/elgg/trunk@5645 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/actions/blog/auto_save_revision.php | 3 ++- mod/blog/views/default/blog/forms/edit.php | 10 +++++++--- 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

- $save_status $never + $save_status $saved

@@ -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(""); } -- cgit v1.2.3