diff options
Diffstat (limited to 'mod/messageboard')
-rw-r--r-- | mod/messageboard/manifest.xml | 1 | ||||
-rw-r--r-- | mod/messageboard/pages/messageboard/owner.php | 2 | ||||
-rw-r--r-- | mod/messageboard/start.php | 2 | ||||
-rw-r--r-- | mod/messageboard/views/default/messageboard/js.php | 14 | ||||
-rw-r--r-- | mod/messageboard/views/default/widgets/messageboard/content.php | 2 |
5 files changed, 12 insertions, 9 deletions
diff --git a/mod/messageboard/manifest.xml b/mod/messageboard/manifest.xml index 602c991d2..25c42ee93 100644 --- a/mod/messageboard/manifest.xml +++ b/mod/messageboard/manifest.xml @@ -4,6 +4,7 @@ <author>Core developers</author> <version>1.8</version> <category>bundled</category> + <category>widget</category> <description>This plugin allows users to put a message board on their profile for other users to post comments.</description> <website>http://www.elgg.org/</website> <copyright>See COPYRIGHT.txt</copyright> diff --git a/mod/messageboard/pages/messageboard/owner.php b/mod/messageboard/pages/messageboard/owner.php index 7fd88a9d4..58021c29e 100644 --- a/mod/messageboard/pages/messageboard/owner.php +++ b/mod/messageboard/pages/messageboard/owner.php @@ -24,7 +24,7 @@ if ($history_user) { $title = elgg_echo('messageboard:owner_history', array($history_user->name, $page_owner->name)); if ($page_owner instanceof ElggGroup) { - $mb_url = "messageboard/group/$page_owner->guid/owner"; + $mb_url = "messageboard/group/$page_owner->guid/all"; } else { $mb_url = "messageboard/owner/$page_owner->username"; } diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php index 899df19c3..efe453286 100644 --- a/mod/messageboard/start.php +++ b/mod/messageboard/start.php @@ -36,7 +36,7 @@ function messageboard_init() { * User's messageboard: messageboard/owner/<username> * Y's history of posts on X's board: messageboard/owner/<X>/history/<Y> * New post: messageboard/add/<guid> (container: user or group) - * Group messageboard: messageboard/group/<guid>/owner + * Group messageboard: messageboard/group/<guid>/all (not implemented) * * @param array $page Array of page elements * @return bool diff --git a/mod/messageboard/views/default/messageboard/js.php b/mod/messageboard/views/default/messageboard/js.php index 131c96c8a..5d89fcd69 100644 --- a/mod/messageboard/views/default/messageboard/js.php +++ b/mod/messageboard/views/default/messageboard/js.php @@ -1,16 +1,18 @@ - +//<script> elgg.provide('elgg.messageboard'); elgg.messageboard.init = function() { var form = $('form[name=elgg-messageboard]'); form.find('input[type=submit]').live('click', elgg.messageboard.submit); - // can't undelete because of init load order - form.parent().find('a.elgg-requires-confirmation').removeClass('elgg-requires-confirmation'); - // delegate() instead of live() because live() has to be at the top level of chains...can't use parent(). + // remove the default binding for confirmation since we're doing extra stuff. + // @todo remove if we add a hook to the requires confirmation callback + form.parent().find('a.elgg-requires-confirmation') + .click(elgg.messageboard.deletePost) - // delete is a little-known operator in JS. IE loses its mind if you name a method that. - form.parent().delegate('.elgg-button-delete a', 'click', elgg.messageboard.deletePost); + // double whammy for in case the load order changes. + .unbind('click', elgg.ui.requiresConfirmation) + .removeClass('elgg-requires-confirmation'); } elgg.messageboard.submit = function(e) { diff --git a/mod/messageboard/views/default/widgets/messageboard/content.php b/mod/messageboard/views/default/widgets/messageboard/content.php index 55b12f29b..63f389e6a 100644 --- a/mod/messageboard/views/default/widgets/messageboard/content.php +++ b/mod/messageboard/views/default/widgets/messageboard/content.php @@ -23,7 +23,7 @@ $options = array( echo elgg_list_annotations($options); if ($owner instanceof ElggGroup) { - $url = "messageboard/group/$owner->guid/owner"; + $url = "messageboard/group/$owner->guid/all"; } else { $url = "messageboard/owner/$owner->username"; } |