aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/lib/blog.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 07:00:35 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 07:00:35 +0000
commit131b559a6136fc6f6f9b1c9aac54898b9a3aa74c (patch)
tree79c1a64bdaa28b714a234f8e588f2e176967501c /mod/blog/lib/blog.php
parent567de1ec8eed575003d6e4f96f4b3a364854df78 (diff)
downloadelgg-131b559a6136fc6f6f9b1c9aac54898b9a3aa74c.tar.gz
elgg-131b559a6136fc6f6f9b1c9aac54898b9a3aa74c.tar.bz2
Cleaned up blog js
git-svn-id: http://code.elgg.org/elgg/trunk@8419 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/lib/blog.php')
-rw-r--r--mod/blog/lib/blog.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php
index 326b224bb..5287844ab 100644
--- a/mod/blog/lib/blog.php
+++ b/mod/blog/lib/blog.php
@@ -309,9 +309,11 @@ function blog_get_page_content_edit($page, $guid = 0, $revision = NULL) {
elgg_push_breadcrumb($blog->title, $blog->getURL());
elgg_push_breadcrumb(elgg_echo('edit'));
+
+ $blog_js = elgg_get_simplecache_url('js', 'blog/save_draft');
+ elgg_register_js($blog_js, 'blog');
$content = elgg_view_form('blog/save', $vars, $body_vars);
- $content .= elgg_view('js/blog/save_draft');
$sidebar = elgg_view('blog/sidebar/revisions', $vars);
} else {
$content = elgg_echo('blog:error:cannot_edit_post');
@@ -328,7 +330,9 @@ function blog_get_page_content_edit($page, $guid = 0, $revision = NULL) {
$title = elgg_echo('blog:add');
$content = elgg_view_form('blog/save', $vars, $body_vars);
- $content .= elgg_view('js/blog/save_draft');
+
+ $blog_js = elgg_get_simplecache_url('js', 'blog/save_draft');
+ elgg_register_js($blog_js, 'blog');
}
$return['title'] = $title;