aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/start.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 22:25:02 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 22:25:02 +0000
commitbfb0a3e9b289e4036bfeb3e694586387fc4f904e (patch)
tree6beec05b6424702e036d67622db37ac6f8852a54 /mod/pages/start.php
parent1bd696b3d8eb8175cc2b6583716fe3e89110aab0 (diff)
downloadelgg-bfb0a3e9b289e4036bfeb3e694586387fc4f904e.tar.gz
elgg-bfb0a3e9b289e4036bfeb3e694586387fc4f904e.tar.bz2
Fixes #3091 adds load functions for js and css
git-svn-id: http://code.elgg.org/elgg/trunk@8675 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/pages/start.php')
-rw-r--r--mod/pages/start.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/mod/pages/start.php b/mod/pages/start.php
index 23c564da5..3404a8cd2 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -33,9 +33,15 @@ function pages_init() {
elgg_register_action("pages/editwelcome", "$action_base/editwelcome.php");
elgg_register_action("pages/delete", "$action_base/delete.php");
- // Extend some views
+ // Extend the main css view
elgg_extend_view('css/elgg', 'pages/css');
+ // Register javascript needed for sidebar menu
+ $js_url = 'mod/pages/vendors/jquery-treeview/jquery.treeview.min.js';
+ elgg_register_js('jquery-treeview', $js_url);
+ $css_url = 'mod/pages/vendors/jquery-treeview/jquery.treeview.css';
+ elgg_register_css('jquery-treeview', $css_url);
+
// Register entity type for search
elgg_register_entity_type('object', 'page');
elgg_register_entity_type('object', 'page_top');
@@ -100,10 +106,8 @@ function pages_page_handler($page) {
elgg_load_library('elgg:pages');
// add the jquery treeview files for navigation
- $js_url = elgg_get_site_url() . 'mod/pages/vendors/jquery-treeview/jquery.treeview.min.js';
- elgg_register_js('jquery-treeview', $js_url);
- $css_url = elgg_get_site_url() . 'mod/pages/vendors/jquery-treeview/jquery.treeview.css';
- elgg_register_css('jquery-treeview', $css_url);
+ elgg_load_js('jquery-treeview');
+ elgg_load_css('jquery-treeview');
if (!isset($page[0])) {
$page[0] = 'all';