]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/moremenu.php
define Reply::pkeyGet()
[quix0rs-gnu-social.git] / lib / moremenu.php
index e8c16b0d6e25a28e7524941cd48054251be3537b..14e221feb630b23abd72c3facec4e79ace5b4f1b 100644 (file)
@@ -62,11 +62,13 @@ class MoreMenu extends Menu
     {
         $items = $this->getItems();
         $tag = $this->tag();
+        $menuID  = null;
 
         $attrs = array('class' => 'nav');
 
         if (!is_null($tag)) {
-            $attrs['id']  = 'nav_' . $tag;
+            $menuID = 'nav_' . $tag;
+            $attrs['id'] = $menuID;
         }
 
         if (Event::handle('StartNav', array($this, &$tag, &$items))) {
@@ -87,8 +89,10 @@ class MoreMenu extends Menu
             }
 
             if ($total > self::SOFT_MAX + 1) {
-                $this->out->elementStart('li');
-                $this->out->element('a', array('href' => '#'),
+
+                $this->out->elementStart('li', array('class' => 'more_link'));
+                $this->out->element('a', array('href' => '#',
+                                               'onclick' => 'SN.U.showMoreMenuItems("'.$menuID.'"); return false;'),
                                     _('More ▼'));
                 $this->out->elementEnd('li');
 
@@ -99,11 +103,13 @@ class MoreMenu extends Menu
                     $this->item($actionName, $args, $label, $description, $id, 'extended_menu');
                 }
 
-                $seeAll = $this->seeAllItem();
+                if ($total > self::HARD_MAX) {
+                    $seeAll = $this->seeAllItem();
 
-                if (!empty($seeAll)) {
-                    list($actionName, $args, $label, $description, $id) = $seeAll;
-                    $this->item($actionName, $args, $label, $description, $id, 'extended_menu see_all');
+                    if (!empty($seeAll)) {
+                        list($actionName, $args, $label, $description, $id) = $seeAll;
+                        $this->item($actionName, $args, $label, $description, $id, 'extended_menu see_all');
+                    }
                 }
             }