Просмотр исходного кода

#273 Image cover area: removing sharing menu popup, vertical centering

Alex Trofimov 10 лет назад
Родитель
Сommit
db6b6cfc69
2 измененных файлов с 5 добавлено и 30 удалено
  1. 4 9
      template/cover.html
  2. 1 21
      template/scripts/BxBaseMenuSubmenu.php

+ 4 - 9
template/cover.html

@@ -1,21 +1,15 @@
-<div class="bx-cover-wrapper bx-menu-toolbar-padding">
+<div class="bx-menu-toolbar-padding">
+<div class="bx-cover-wrapper">
 
 
     <div class="bx-cover bx-def-centered bx-def-page-width bx-def-padding bx-def-box-sizing">
     <div class="bx-cover bx-def-centered bx-def-page-width bx-def-padding bx-def-box-sizing">
 
 
-        <div class="bx-cover-title bx-def-margin-sec-bottom bx-def-font-h1">
+        <div class="bx-cover-title bx-def-margin-sec-topbottom bx-def-font-h1">
 
 
             <bx_if:icon><i class="sys-icon bx-def-font-contrasted __icon__"></i></bx_if:icon>
             <bx_if:icon><i class="sys-icon bx-def-font-contrasted __icon__"></i></bx_if:icon>
             <bx_if:image><img style="background-image:url(__icon_url__)" src="<bx_icon_url:spacer.gif />" /></bx_if:image>
             <bx_if:image><img style="background-image:url(__icon_url__)" src="<bx_icon_url:spacer.gif />" /></bx_if:image>
 
 
             <span class="bx-def-font-contrasted bx-def-margin-sec-left">__title__</span>
             <span class="bx-def-font-contrasted bx-def-margin-sec-left">__title__</span>
 
 
-            <bx_if:sharing>
-                <a class="bx-def-padding-sec-leftright" href="javascript:void(0);" onclick="$('#__id__').dolPopup({pointer:{el:$(this)}})">
-                    <i class="sys-icon bx-def-font-contrasted __icon__"></i>
-                </a>
-               __popup__
-            </bx_if:sharing>
-
         </div>
         </div>
 
 
         <div class="bx-cover-actions">
         <div class="bx-cover-actions">
@@ -25,3 +19,4 @@
     </div>
     </div>
 
 
 </div>
 </div>
+</div>

+ 1 - 21
template/scripts/BxBaseMenuSubmenu.php

@@ -91,7 +91,7 @@ class BxBaseMenuSubmenu extends BxTemplMenu
     public function getParamsForCover ()
     public function getParamsForCover ()
     {
     {
         $aMenuItemSelected = $this->getSelectedMenuItem ();
         $aMenuItemSelected = $this->getSelectedMenuItem ();
-        if (isset($aMenuItemSelected['set_name']) && 'sys_site' == $aMenuItemSelected['set_name'] && 'home' == $aMenuItemSelected['name'])
+        if (!$aMenuItemSelected || (isset($aMenuItemSelected['set_name']) && 'sys_site' == $aMenuItemSelected['set_name'] && 'home' == $aMenuItemSelected['name']))
             return '';
             return '';
 
 
         $oMenuActions = BxDolMenu::getObjectInstance($this->_sObjectActionsMenu);
         $oMenuActions = BxDolMenu::getObjectInstance($this->_sObjectActionsMenu);
@@ -110,31 +110,11 @@ class BxBaseMenuSubmenu extends BxTemplMenu
                 'condition' => false === strpos($aMenuItemSelected['icon'], '.'),
                 'condition' => false === strpos($aMenuItemSelected['icon'], '.'),
                 'content' => array('icon' => $aMenuItemSelected['icon']),
                 'content' => array('icon' => $aMenuItemSelected['icon']),
             ),
             ),
-            'bx_if:sharing' => array (
-                'condition' => false,
-                'content' => array(),
-            ),
         );
         );
 
 
         // if (!$this->_sObjectSubmenu && !$this->_mixedMainMenuItemSelected && $aMenuItemSelected['submenu_object'])
         // if (!$this->_sObjectSubmenu && !$this->_mixedMainMenuItemSelected && $aMenuItemSelected['submenu_object'])
         //    $this->_sObjectSubmenu = $aMenuItemSelected['submenu_object'];
         //    $this->_sObjectSubmenu = $aMenuItemSelected['submenu_object'];
 
 
-        if ($this->_aSocialSharingService) {
-            $sPopupContent = BxDolService::call($this->_aSocialSharingService['module'], $this->_aSocialSharingService['method'], isset($this->_aSocialSharingService['params']) ? $this->_aSocialSharingService['params'] : array(), isset($this->_aSocialSharingService['class']) ? $this->_aSocialSharingService['class'] : 'Module');
-
-            if ($sPopupContent) {
-                $aVars['bx_if:sharing']['condition'] = $sPopupContent;
-                $aVars['bx_if:sharing']['content'] = array (
-                    'id' => 'bx-menu-social-sharing-menu',
-                    'icon' => 'share',
-                    'popup' => BxTemplFunctions::getInstance()->transBox('bx-menu-social-sharing-menu', '<div class="bx-def-padding">' . $sPopupContent . '</div>', true),
-                );
-            }
-        }
-
-        if (!$aVars['bx_if:sharing']['condition'] && !$aMenuItemSelected)
-            return '';
-
         return $aVars;
         return $aVars;
     }
     }