diff options
Diffstat (limited to 'mod/developers/start.php')
| -rw-r--r-- | mod/developers/start.php | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/mod/developers/start.php b/mod/developers/start.php index ab9a174a4..94d0f652c 100644 --- a/mod/developers/start.php +++ b/mod/developers/start.php @@ -23,6 +23,8 @@ function developers_init() { elgg_register_js('jquery.jstree', 'mod/developers/vendors/jsTree/jquery.jstree.js', 'footer'); elgg_register_css('jquery.jstree', 'mod/developers/vendors/jsTree/themes/default/style.css'); + elgg_load_js('jquery.form'); + elgg_register_js('elgg.dev', 'js/developers/developers.js', 'footer'); elgg_load_js('elgg.dev'); } @@ -61,6 +63,7 @@ function developers_setup_menu() { if (elgg_in_context('admin')) { elgg_register_admin_menu_item('develop', 'inspect', 'develop_tools'); elgg_register_admin_menu_item('develop', 'preview', 'develop_tools'); + elgg_register_admin_menu_item('develop', 'unit_tests', 'develop_tools'); elgg_register_menu_item('page', array( 'name' => 'dev_settings', @@ -74,8 +77,8 @@ function developers_setup_menu() { } /** -* Clear all the strings so the raw descriptor strings are displayed -*/ + * Clear all the strings so the raw descriptor strings are displayed + */ function developers_clear_strings() { global $CONFIG; @@ -86,6 +89,15 @@ function developers_clear_strings() { /** * Post-process a view to add wrapper comments to it + * + * 1. Only process views served with the 'default' viewtype. + * 2. Does not wrap views that begin with js/ or css/ as they are not HTML. + * 3. Does not wrap views that are images (start with icon/). Is this still true? + * 4. Does not wrap input and output views (why?). + * 5. Does not wrap html head or the primary page shells + * + * @warning this will break views in the default viewtype that return non-HTML data + * that do not match the above restrictions. */ function developers_wrap_views($hook, $type, $result, $params) { if (elgg_get_viewtype() != "default") { @@ -119,8 +131,8 @@ function developers_wrap_views($hook, $type, $result, $params) { } /** -* Log the events and plugin hooks -*/ + * Log the events and plugin hooks + */ function developers_log_events($name, $type) { // filter out some very common events @@ -157,6 +169,7 @@ function developers_log_events($name, $type) { * Serve the theme preview pages * * @param array $page + * @return bool */ function developers_theme_preview_controller($page) { if (!isset($page[0])) { @@ -165,13 +178,14 @@ function developers_theme_preview_controller($page) { $pages = array( 'buttons', - 'components', - 'forms', - 'grid', + 'components', + 'forms', + 'grid', 'icons', - 'modules', - 'navigation', - 'typography', + 'modules', + 'navigation', + 'typography', + 'miscellaneous' ); foreach ($pages as $page_name) { @@ -191,4 +205,5 @@ function developers_theme_preview_controller($page) { )); echo elgg_view_page($title, $layout, 'theme_preview'); + return true; } |
