aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/classes/ElggMenuItem.php4
-rw-r--r--engine/lib/navigation.php2
-rw-r--r--js/lib/ui.js6
-rw-r--r--mod/groups/start.php4
-rw-r--r--mod/logbrowser/views/default/logbrowser/form.php8
-rw-r--r--mod/profile/views/default/profile/owner_block.php2
-rw-r--r--mod/reportedcontent/views/default/object/reported_content.php2
-rw-r--r--views/default/object/plugin/advanced.php2
-rw-r--r--views/default/object/plugin/invalid.php2
-rw-r--r--views/default/object/widget/elements/controls.php6
-rw-r--r--views/default/page/layouts/widgets/add_button.php11
11 files changed, 30 insertions, 19 deletions
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index cd6267ad6..1181583f2 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -504,6 +504,10 @@ class ElggMenuItem {
$vars['class'] = $this->getLinkClass();
}
+ if ($this->link_rel) {
+ $vars['rel'] = $this->link_rel;
+ }
+
if ($this->rel) {
$vars['rel'] = $this->rel;
}
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php
index b51c63b49..4b2c998a2 100644
--- a/engine/lib/navigation.php
+++ b/engine/lib/navigation.php
@@ -276,7 +276,7 @@ function elgg_river_menu_setup($hook, $type, $return, $params) {
'href' => "#comments-add-$object->guid",
'text' => elgg_view_icon('speech-bubble'),
'title' => elgg_echo('comment:this'),
- 'link_class' => "elgg-toggler",
+ 'link_rel' => 'toggle',
'priority' => 50,
);
$return[] = ElggMenuItem::factory($options);
diff --git a/js/lib/ui.js b/js/lib/ui.js
index 89a996122..fd20acbd1 100644
--- a/js/lib/ui.js
+++ b/js/lib/ui.js
@@ -11,7 +11,7 @@ elgg.ui.init = function () {
$('.elgg-system-messages li').animate({opacity: 0.9}, 6000);
$('.elgg-system-messages li').fadeOut('slow');
- $('.elgg-toggler').live('click', elgg.ui.toggles);
+ $('[rel=toggle]').live('click', elgg.ui.toggles);
$('[rel=popup]').live('click', elgg.ui.popsUp);
@@ -27,8 +27,8 @@ elgg.ui.init = function () {
/**
* Toggles an element based on clicking a separate element
*
- * Use .elgg-toggler on the toggler element
- * Set the href to target the item you want to toggle (<a class="elgg-toggler" href="#id-of-target">)
+ * Use rel="toggle" on the toggler element
+ * Set the href to target the item you want to toggle (<a rel="toggle" href="#id-of-target">)
*
* @param {Object} event
* @return void
diff --git a/mod/groups/start.php b/mod/groups/start.php
index f35c058b6..57c40af5d 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -764,7 +764,7 @@ function discussion_owner_block_menu($hook, $type, $return, $params) {
* Add the reply button for the river
*/
function discussion_add_to_river_menu($hook, $type, $return, $params) {
- if (elgg_is_logged_in() && !elgg_get_context('widgets')) {
+ if (elgg_is_logged_in() && !elgg_in_context('widgets')) {
$item = $params['item'];
$object = $item->getObjectEntity();
if (elgg_instanceof($object, 'object', 'groupforumtopic')) {
@@ -776,7 +776,7 @@ function discussion_add_to_river_menu($hook, $type, $return, $params) {
'href' => "#groups-reply-$object->guid",
'text' => elgg_view_icon('speech-bubble'),
'title' => elgg_echo('reply:this'),
- 'link_class' => "elgg-toggler",
+ 'link_rel' => 'toggle',
'priority' => 50,
);
$return[] = ElggMenuItem::factory($options);
diff --git a/mod/logbrowser/views/default/logbrowser/form.php b/mod/logbrowser/views/default/logbrowser/form.php
index d2476afac..d5cf9f6b8 100644
--- a/mod/logbrowser/views/default/logbrowser/form.php
+++ b/mod/logbrowser/views/default/logbrowser/form.php
@@ -59,9 +59,12 @@
$toggle_link = elgg_view('output/url', array(
'href' => '#log-browser-search-form',
'text' => elgg_echo('logbrowser:search'),
- 'class' => 'elgg-toggler',
+ 'rel' => 'toggle',
));
?>
+ <p>
+ <?php echo $toggle_link; ?>
+ </p>
<div id="log-browser-search-form" class="elgg-module elgg-module-inline hidden">
<div class="elgg-head">
<h3><?php echo elgg_echo('logbrowser:search'); ?></h3>
@@ -70,7 +73,4 @@
<?php echo $wrappedform; ?>
</div>
</div>
- <p>
- <?php echo $toggle_link; ?>
- </p>
</div> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/owner_block.php b/mod/profile/views/default/profile/owner_block.php
index 48d7ff24f..5a65a3a26 100644
--- a/mod/profile/views/default/profile/owner_block.php
+++ b/mod/profile/views/default/profile/owner_block.php
@@ -35,7 +35,7 @@ if (elgg_is_admin_logged_in() && elgg_get_logged_in_user_guid() != elgg_get_page
$text = elgg_echo('admin:options');
$admin_links = '<ul class="profile-admin-menu-wrapper">';
- $admin_links .= "<li><a class=\"elgg-toggler\" href=\"#profile-menu-admin\">$text&hellip;</a>";
+ $admin_links .= "<li><a rel=\"toggle\" href=\"#profile-menu-admin\">$text&hellip;</a>";
$admin_links .= '<ul class="profile-admin-menu" id="profile-menu-admin">';
foreach ($admin as $menu_item) {
$admin_links .= elgg_view('navigation/menu/elements/item', array('item' => $menu_item));
diff --git a/mod/reportedcontent/views/default/object/reported_content.php b/mod/reportedcontent/views/default/object/reported_content.php
index b8c443450..6bcbf6e5d 100644
--- a/mod/reportedcontent/views/default/object/reported_content.php
+++ b/mod/reportedcontent/views/default/object/reported_content.php
@@ -58,7 +58,7 @@ if ($report->state == 'archived') {
<?php echo elgg_view('output/url', array(
'href' => "#report-$report->guid",
'text' => elgg_echo('reportedcontent:moreinfo'),
- 'class' => "elgg-toggler",
+ 'rel' => "toggle",
));
?>
</p>
diff --git a/views/default/object/plugin/advanced.php b/views/default/object/plugin/advanced.php
index 51fb69d17..84fc0439b 100644
--- a/views/default/object/plugin/advanced.php
+++ b/views/default/object/plugin/advanced.php
@@ -242,7 +242,7 @@ if (elgg_view_exists($settings_view_old) || elgg_view_exists($settings_view_new)
echo elgg_view('output/url', array(
'href' => "#elgg-plugin-manifest-{$plugin->getID()}",
'text' => elgg_echo("admin:plugins:label:moreinfo"),
- 'class' => 'elgg-toggler',
+ 'rel' => 'toggle',
));
?>
</div>
diff --git a/views/default/object/plugin/invalid.php b/views/default/object/plugin/invalid.php
index 9e239b7ca..f29ee8d12 100644
--- a/views/default/object/plugin/invalid.php
+++ b/views/default/object/plugin/invalid.php
@@ -29,7 +29,7 @@ $error = $plugin->getError();
echo elgg_view('output/url', array(
'href' => "#elgg-plugin-manifest-{$plugin->getID()}",
'text' => elgg_echo("admin:plugins:label:moreinfo"),
- 'class' => 'elgg-toggler',
+ 'rel' => 'toggle',
));
?>
</div>
diff --git a/views/default/object/widget/elements/controls.php b/views/default/object/widget/elements/controls.php
index 83a2f5767..abf2154fc 100644
--- a/views/default/object/widget/elements/controls.php
+++ b/views/default/object/widget/elements/controls.php
@@ -12,7 +12,8 @@ $show_edit = elgg_extract('show_edit', $vars, true);
$params = array(
'text' => ' ',
'href' => "#elgg-widget-content-$widget->guid",
- 'class' => 'elgg-widget-collapse-button elgg-toggler',
+ 'class' => 'elgg-widget-collapse-button',
+ 'rel' => 'toggle',
);
$collapse_link = elgg_view('output/url', $params);
@@ -33,7 +34,8 @@ if ($widget->canEdit()) {
'text' => elgg_view_icon('settings-alt'),
'title' => elgg_echo('widget:edit'),
'href' => "#widget-edit-$widget->guid",
- 'class' => "elgg-toggler elgg-widget-edit-button",
+ 'class' => "elgg-widget-edit-button",
+ 'rel' => 'toggle',
);
$edit_link = elgg_view('output/url', $params);
}
diff --git a/views/default/page/layouts/widgets/add_button.php b/views/default/page/layouts/widgets/add_button.php
index a8670146b..89e83b096 100644
--- a/views/default/page/layouts/widgets/add_button.php
+++ b/views/default/page/layouts/widgets/add_button.php
@@ -4,7 +4,12 @@
*/
?>
<div class="elgg-widget-add-control">
- <a class="elgg-button elgg-button-action elgg-toggler" href="#widgets-add-panel">
- <?php echo elgg_echo('widgets:add'); ?>
- </a>
+<?php
+ echo elgg_view('output/url', array(
+ 'href' => '#widgets-add-panel',
+ 'text' => elgg_echo('widgets:add'),
+ 'class' => 'elgg-button elgg-button-action',
+ 'rel' => 'toggle',
+ ));
+?>
</div>