aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/admin.php10
-rw-r--r--views/default/js/admin.php1
2 files changed, 5 insertions, 6 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index c16da9295..93ee43008 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -239,6 +239,9 @@ function admin_init() {
elgg_register_action('profile/fields/reorder', '', 'admin');
elgg_register_simplecache_view('js/admin');
+ $url = elgg_get_simplecache_url('js', 'admin');
+ elgg_register_js('elgg.admin', $url);
+ elgg_register_js('jquery.jeditable', 'vendors/jquery/jquery.jeditable.mini.js');
// administer
// dashboard
@@ -434,11 +437,7 @@ function admin_settings_page_handler($page) {
elgg_set_context('admin');
elgg_unregister_css('elgg');
- $url = elgg_get_simplecache_url('js', 'admin');
- elgg_register_js('elgg.admin', $url);
elgg_load_js('elgg.admin');
-
- elgg_register_js('jquery.jeditable', 'vendors/jquery/jquery.jeditable.mini.js');
elgg_load_js('jquery.jeditable');
// default to dashboard
@@ -548,9 +547,8 @@ function admin_markdown_page_handler($pages) {
elgg_set_context('admin');
elgg_unregister_css('elgg');
- $url = elgg_get_simplecache_url('js', 'admin');
- elgg_register_js('elgg.admin', $url);
elgg_load_js('elgg.admin');
+ elgg_load_js('jquery.jeditable');
elgg_load_library('elgg:markdown');
$plugin_id = elgg_extract(0, $pages);
diff --git a/views/default/js/admin.php b/views/default/js/admin.php
index 2f2f59287..253a73887 100644
--- a/views/default/js/admin.php
+++ b/views/default/js/admin.php
@@ -32,6 +32,7 @@ elgg.admin.init = function () {
});
// in-line editing for custom profile fields.
+ // @note this requires jquery.jeditable plugin
$(".elgg-state-editable").editable(elgg.admin.editProfileField, {
type: 'text',
onblur: 'submit',