diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-12 08:26:38 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-12 08:26:38 +0000 |
commit | bc421a615ab89cf5416af12173471235cdf5d297 (patch) | |
tree | a4318a7c649423e2a4a23327ba8aa1fa183397eb /modules/comment/helpers | |
parent | ce6d7b8d3799cf5996a7c4fd512bf4efb85d1c5b (diff) |
Implement deleting dashboard blocks.
* Refactor blocks so that they have a separate id vs css_id. This way
we can have a unique identifier for each visual block.
* Store blocks with a random id as their unique identifier
* Add Admin_Dashboard::remove_block() and modify
themes/admin_default/views/block.html.php to call it when you click the
remove box.
Diffstat (limited to 'modules/comment/helpers')
-rw-r--r-- | modules/comment/helpers/comment_block.php | 2 | ||||
-rw-r--r-- | modules/comment/helpers/comment_dashboard.php | 2 | ||||
-rw-r--r-- | modules/comment/helpers/comment_installer.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/comment/helpers/comment_block.php b/modules/comment/helpers/comment_block.php index c9b2dfe8..f24f19b1 100644 --- a/modules/comment/helpers/comment_block.php +++ b/modules/comment/helpers/comment_block.php @@ -25,7 +25,7 @@ class comment_block_Core { public static function photo_bottom($theme) { $block = new Block; - $block->id = "gComments"; + $block->css_id = "gComments"; $block->title = t("Comments"); $view = new View("comments.html"); diff --git a/modules/comment/helpers/comment_dashboard.php b/modules/comment/helpers/comment_dashboard.php index c53ecb47..7edee2f5 100644 --- a/modules/comment/helpers/comment_dashboard.php +++ b/modules/comment/helpers/comment_dashboard.php @@ -26,7 +26,7 @@ class comment_dashboard_Core { $block = new Block(); switch ($block_id) { case "recent_comments": - $block->id = "gRecentComments"; + $block->css_id = "gRecentComments"; $block->title = t("Recent Comments"); $block->content = new View("admin_block_recent_comments.html"); $block->content->comments = diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index 4b3a7259..b54692ec 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -51,7 +51,7 @@ class comment_installer { $dashboard_blocks = unserialize(module::get_var("core", "dashboard_blocks")); - $dashboard_blocks["main"][] = array("comment", "recent_comments"); + $dashboard_blocks["main"][rand()] = array("comment", "recent_comments"); module::set_var("core", "dashboard_blocks", serialize($dashboard_blocks)); module::set_var("comment", "spam_caught", 0); module::set_version("comment", 1); |