aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-25 15:10:14 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-25 15:10:14 +0000
commite8e2cfa6c924b02d95f3d31f69560a5e3eaf825a (patch)
tree794aa9d04dc49456fa6857e910e0d60a2a923d00 /mod
parentac5024fb4a4df5f634cb9cd219bac671e3ee417b (diff)
downloadelgg-e8e2cfa6c924b02d95f3d31f69560a5e3eaf825a.tar.gz
elgg-e8e2cfa6c924b02d95f3d31f69560a5e3eaf825a.tar.bz2
Updating Default Widgets administration to use new canvas layout.
git-svn-id: http://code.elgg.org/elgg/trunk@6205 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/defaultwidgets/dashboard.php2
-rw-r--r--mod/defaultwidgets/profile.php2
-rw-r--r--mod/defaultwidgets/start.php26
-rw-r--r--mod/defaultwidgets/views/default/defaultwidgets/editor.php2
4 files changed, 16 insertions, 16 deletions
diff --git a/mod/defaultwidgets/dashboard.php b/mod/defaultwidgets/dashboard.php
index 889bc8121..86f96cb67 100644
--- a/mod/defaultwidgets/dashboard.php
+++ b/mod/defaultwidgets/dashboard.php
@@ -28,4 +28,4 @@ $context = 'dashboard';
$content = elgg_view ( "defaultwidgets/editor", array ('token' => $token, 'ts' => $ts, 'context' => $context ) );
// Display main admin menu
-page_draw ( 'Default dashboard widgets for new users', $content );
+page_draw('Default dashboard widgets for new users', elgg_view_layout('administration', $content));
diff --git a/mod/defaultwidgets/profile.php b/mod/defaultwidgets/profile.php
index 68bf7a492..69640a845 100644
--- a/mod/defaultwidgets/profile.php
+++ b/mod/defaultwidgets/profile.php
@@ -28,4 +28,4 @@ $context = 'profile';
$content = elgg_view ( "defaultwidgets/editor", array ('token' => $token, 'ts' => $ts, 'context' => $context ) );
// Display main admin menu
-page_draw ( 'Default profile widgets for new users', $content );
+page_draw('Default profile widgets for new users', elgg_view_layout('administration', $content));
diff --git a/mod/defaultwidgets/start.php b/mod/defaultwidgets/start.php
index e76e16e26..1143cafa6 100644
--- a/mod/defaultwidgets/start.php
+++ b/mod/defaultwidgets/start.php
@@ -30,6 +30,7 @@ global $CONFIG;
* @param unknown_type $object
*/
function defaultwidgets_init() {
+ global $CONFIG;
// Load system configuration
register_page_handler ( 'defaultwidgets', 'defaultwidgets_page_handler' );
@@ -44,6 +45,18 @@ function defaultwidgets_init() {
// Override metadata permissions
//register_plugin_hook ( 'permissions_check:metadata', 'object', 'defaultwidgets_can_edit_metadata' );
+
+ elgg_add_submenu_item(array(
+ 'text' => elgg_echo('defaultwidgets:menu:profile'),
+ 'href' => "{$CONFIG->wwwroot}pg/defaultwidgets/profile",
+ 'parent_id' => 'appearance',
+ ), 'admin', 'default');
+
+ elgg_add_submenu_item(array(
+ 'text' => elgg_echo('defaultwidgets:menu:dashboard'),
+ 'href' => "{$CONFIG->wwwroot}pg/defaultwidgets/dashboard",
+ 'parent_id' => 'appearance',
+ ), 'admin', 'default');
}
/**
@@ -233,21 +246,8 @@ function defaultwidgets_page_handler($page) {
return true;
}
-/**
- * Page setup. Adds admin controls to the admin panel.
- *
- */
-function defaultwidgets_pagesetup() {
- if (get_context () == 'admin' && isadminloggedin ()) {
- global $CONFIG;
- add_submenu_item ( elgg_echo ( 'defaultwidgets:menu:profile' ), $CONFIG->wwwroot . 'pg/defaultwidgets/profile' );
- add_submenu_item ( elgg_echo ( 'defaultwidgets:menu:dashboard' ), $CONFIG->wwwroot . 'pg/defaultwidgets/dashboard' );
- }
-}
-
// Make sure the status initialisation function is called on initialisation
register_elgg_event_handler ( 'init', 'system', 'defaultwidgets_init' );
-register_elgg_event_handler ( 'pagesetup', 'system', 'defaultwidgets_pagesetup' );
register_plugin_hook ( 'permissions_check', 'user', 'defaultwidgets_can_edit' );
register_plugin_hook ( 'permissions_check', 'object', 'defaultwidgets_can_edit' );
diff --git a/mod/defaultwidgets/views/default/defaultwidgets/editor.php b/mod/defaultwidgets/views/default/defaultwidgets/editor.php
index 2241dd264..ef883ac01 100644
--- a/mod/defaultwidgets/views/default/defaultwidgets/editor.php
+++ b/mod/defaultwidgets/views/default/defaultwidgets/editor.php
@@ -53,7 +53,7 @@
?>
<script type="text/javascript">
$(document).ready(function () {
- $('div#customise_editpanel').slideToggle("fast");
+ //$('div#customise_editpanel').slideToggle("fast");
});
</script>