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

Ticket #1524 - Group based modules. Usage in Events module. Fixed the issue with a number of similar menus (with Auto More item) on a page.

AntonLV 8 лет назад
Родитель
Сommit
7a0038bff2

+ 55 - 50
inc/js/classes/BxDolMenuMoreAuto.js

@@ -17,13 +17,6 @@ function BxDolMenuMoreAuto(options)
     this._sClassItemMore = this._sClassItem + '.bx-menu-item-more-auto';
     this._sClassItemMoreSubmenu = '.bx-menu-submenu-more-auto';
 
-    this._oMenu = null;
-    this._iMenu = 0;
-    this._iParent = 0;
-    this._oItemMore = null;
-    this._iItemMore = 0;
-    this._oItemMoreSubmenu = null;
-
     var $this = this;
     $(document).ready(function () {
         $this.init();
@@ -35,24 +28,54 @@ function BxDolMenuMoreAuto(options)
 }
 
 BxDolMenuMoreAuto.prototype.init = function() {
-    this._getData();
+    var $this = this;
+
+    $('.bx-menu-object-' + this._sObject).each(function() {
+        var oMenu = $(this);
+        var oItemMore = oMenu.find($this._sClassItemMore);
+        var oItemMoreSubmenu = oItemMore.find($this._sClassItemMoreSubmenu);
+
+        var iMenu = 0;
+        oMenu.children($this._sClassItem + ':visible').each(function() {
+            iMenu += $this._getWidth($(this));
+        });
+
+        var iParent = oMenu.parent().width();
 
-    this._oMenu.css('overflow', 'visible');
+        var iItemMore = oItemMore.outerWidth(true);
 
-    if(this._iMenu < this._iParent)
-        return;
+        oMenu.css('overflow', 'visible');
 
-    this._moveToSubmenu();
+        if(iMenu < iParent)
+            return;
+
+        $this._moveToSubmenu(oMenu, oItemMore, oItemMoreSubmenu, iParent, iItemMore);
+    });
 };
 
 BxDolMenuMoreAuto.prototype.update = function()
 {
-    this._getData();
+    var $this = this;
+
+    $('.bx-menu-object-' + this._sObject).each(function() {
+        var oMenu = $(this);
+        var oItemMore = oMenu.find($this._sClassItemMore);
+        var oItemMoreSubmenu = oItemMore.find($this._sClassItemMoreSubmenu);
+
+        var iMenu = 0;
+        oMenu.children($this._sClassItem + ':visible').each(function() {
+            iMenu += $this._getWidth($(this));
+        });
+
+        var iParent = oMenu.parent().width();
+
+        var iItemMore = oItemMore.outerWidth(true);
 
-    if(this._iMenu > this._iParent)
-        this._moveToSubmenu();
-    if(this._iMenu < this._iParent)
-        this._moveFromSubmenu();
+        if(iMenu > iParent)
+            $this._moveToSubmenu(oMenu, oItemMore, oItemMoreSubmenu, iParent, iItemMore);
+        if(iMenu < iParent)
+            $this._moveFromSubmenu(oMenu, oItemMore, oItemMoreSubmenu, iParent, iMenu);
+    });
 };
 
 BxDolMenuMoreAuto.prototype.more = function(oElement)
@@ -67,20 +90,20 @@ BxDolMenuMoreAuto.prototype.more = function(oElement)
     });
 }
 
-BxDolMenuMoreAuto.prototype._moveToSubmenu = function()
+BxDolMenuMoreAuto.prototype._moveToSubmenu = function(oMenu, oItemMore, oItemMoreSubmenu, iParent, iItemMore)
 {
     var $this = this;
 
     var bRelocateOthers = false;
-    var iWidthTotal = this._iItemMore;
-    var oSubmenuItemFirst = this._oItemMoreSubmenu.children(this._sClassItem + ':first');
+    var iWidthTotal = iItemMore;
+    var oSubmenuItemFirst = oItemMoreSubmenu.children(this._sClassItem + ':first');
 
-    this._oMenu.children(this._sClassItem + ':not(' + this._sClassItemMore + ')').each(function() {
+    oMenu.children(this._sClassItem + ':not(' + this._sClassItemMore + ')').each(function() {
         var oItem = $(this);
         var iItem = $this._getWidth(oItem);
-        if(bRelocateOthers || iWidthTotal + iItem > $this._iParent) {
+        if(bRelocateOthers || iWidthTotal + iItem > iParent) {
             if(!oSubmenuItemFirst.length)
-                $this._oItemMoreSubmenu.append(oItem.detach());
+                oItemMoreSubmenu.append(oItem.detach());
             else
                 oSubmenuItemFirst.before(oItem.detach());
             bRelocateOthers = true;
@@ -90,52 +113,34 @@ BxDolMenuMoreAuto.prototype._moveToSubmenu = function()
         iWidthTotal += iItem;
     });
 
-    if(this._oItemMoreSubmenu.find('li').length)
-        this._oItemMore.show();
+    if(oItemMoreSubmenu.find('li').length)
+        oItemMore.show();
    
 };
 
-BxDolMenuMoreAuto.prototype._moveFromSubmenu = function()
+BxDolMenuMoreAuto.prototype._moveFromSubmenu = function(oMenu, oItemMore, oItemMoreSubmenu, iParent, iMenu)
 {
     var $this = this;
 
     var bStopRelocation = false;
-    var iWidthTotal = this._iMenu;
-    this._oItemMoreSubmenu.children(this._sClassItem).each(function() {
+    var iWidthTotal = iMenu;
+    oItemMoreSubmenu.children(this._sClassItem).each(function() {
         if(bStopRelocation) 
             return;
 
         var oItem = $(this);
         var iItem = $this._getWidth(oItem);
-        if(iWidthTotal + iItem > $this._iParent) {
+        if(iWidthTotal + iItem > iParent) {
             bStopRelocation = true;
             return;
         }
 
-        $this._oItemMore.before(oItem.detach());
+        oItemMore.before(oItem.detach());
         iWidthTotal += iItem;
     });
 
-    if(!this._oItemMoreSubmenu.find('li').length)
-        this._oItemMore.hide();
-};
-
-BxDolMenuMoreAuto.prototype._getData = function()
-{
-    var $this = this;
-
-    this._oMenu = $('.bx-menu-object-' + this._sObject);
-    this._oItemMore = this._oMenu.find(this._sClassItemMore);
-    this._oItemMoreSubmenu = this._oItemMore.find(this._sClassItemMoreSubmenu);
-
-    this._iMenu = 0;
-    this._oMenu.children(this._sClassItem + ':visible').each(function() {
-        $this._iMenu += $this._getWidth($(this));
-    });
-    
-    this._iParent = this._oMenu.parent().width();
-
-    this._iItemMore = this._oItemMore.outerWidth(true);
+    if(!oItemMoreSubmenu.find('li').length)
+        oItemMore.hide();
 };
 
 BxDolMenuMoreAuto.prototype._getWidth = function(oItem)

+ 25 - 17
modules/base/groups/classes/BxBaseModGroupsMenuView.php

@@ -18,28 +18,36 @@ class BxBaseModGroupsMenuView extends BxBaseModProfileMenuView
     public function __construct($aObject, $oTemplate = false)
     {
         parent::__construct($aObject, $oTemplate);
+    }
+    
+    public function setContentId($iContentId)
+    {
+        parent::setContentId($iContentId);
+
+        if(!$this->_oProfile || !isLogged())
+            return;
 
-        if ($this->_oProfile && isLogged()) {
-            $CNF = &$this->_oModule->_oConfig->CNF;
-            $oConn = isset($CNF['OBJECT_CONNECTIONS']) ? BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTIONS']) : false;
-            if ($oConn && $oConn->isConnectedNotMutual(bx_get_logged_profile_id(), $this->_oProfile->id())) {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        $oConn = isset($CNF['OBJECT_CONNECTIONS']) ? BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTIONS']) : false;
+        if ($oConn && $oConn->isConnectedNotMutual(bx_get_logged_profile_id(), $this->_oProfile->id())) {
+            $this->addMarkers(array(
+                'title_add_fan' => _t($CNF['T']['menu_item_title_become_fan_sent']),
+                'title_remove_fan' => _t($CNF['T']['menu_item_title_leave_group_cancel_request']),
+            ));
+        } 
+        else {
+            if (isset($CNF['T']['menu_item_title_become_fan']) && isset($CNF['T']['menu_item_title_leave_group'])){
                 $this->addMarkers(array(
-                    'title_add_fan' => _t($CNF['T']['menu_item_title_become_fan_sent']),
-                    'title_remove_fan' => _t($CNF['T']['menu_item_title_leave_group_cancel_request']),
+                    'title_add_fan' => _t($CNF['T']['menu_item_title_become_fan']),
+                    'title_remove_fan' => _t($CNF['T']['menu_item_title_leave_group']),
                 ));
-            } else {
-                if (isset($CNF['T']['menu_item_title_become_fan']) && isset($CNF['T']['menu_item_title_leave_group'])){
-                    $this->addMarkers(array(
-                        'title_add_fan' => _t($CNF['T']['menu_item_title_become_fan']),
-                        'title_remove_fan' => _t($CNF['T']['menu_item_title_leave_group']),
-                    ));
-                }
             }
+        }
 
-            if ($oConn && $this->_oModule->isFan($this->_aContentInfo[$CNF['FIELD_ID']])) {
-                $a = $oConn->getConnectedInitiators($this->_oProfile->id());
-                $this->addMarkers(array('recipients' => implode(',', $a)));
-            }
+        if ($oConn && $this->_oModule->isFan($this->_aContentInfo[$CNF['FIELD_ID']])) {
+            $a = $oConn->getConnectedInitiators($this->_oProfile->id());
+            $this->addMarkers(array('recipients' => implode(',', $a)));
         }
     }
 }

+ 33 - 0
modules/base/groups/classes/BxBaseModGroupsMenuViewActionsAll.php

@@ -0,0 +1,33 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    BaseGroups Base classes for groups modules
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * View entry all actions menu
+ */
+class BxBaseModGroupsMenuViewActionsAll extends BxBaseModProfileMenuViewActionsAll
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        parent::__construct($aObject, $oTemplate);
+    }
+
+    protected function _getMenuItemProfileFanAdd($aItem)
+    {
+        return $this->_getMenuItemByNameActions($aItem);
+    }
+
+    protected function _getMenuItemProfileFanRemove($aItem)
+    {
+        return $this->_getMenuItemByNameActionsMore($aItem);
+    }
+}
+
+/** @} */

+ 1 - 1
modules/base/profile/classes/BxBaseModProfileMenuView.php

@@ -28,7 +28,7 @@ class BxBaseModProfileMenuView extends BxBaseModGeneralMenuView
             $iContentId = BxDolProfile::getInstance(bx_process_input(bx_get('profile_id'), BX_DATA_INT))->getContentId();
 
         if(!empty($iContentId))
-            $this->setContentId($iContentId);       
+            $this->setContentId($iContentId);
     }
 
     public function setContentId($iContentId)

+ 3 - 0
modules/base/profile/classes/BxBaseModProfileMenuViewActionsAll.php

@@ -17,6 +17,9 @@ class BxBaseModProfileMenuViewActionsAll extends BxBaseModGeneralMenuViewActions
     public function __construct($aObject, $oTemplate = false)
     {
         parent::__construct($aObject, $oTemplate);
+
+        if(empty($this->_iContentId) && bx_get('profile_id') !== false)
+            $this->setContentId(BxDolProfile::getInstance(bx_process_input(bx_get('profile_id'), BX_DATA_INT))->getContentId());
     }
 
     protected function _getMenuItemProfileFriendAdd($aItem)

+ 3 - 2
modules/base/profile/template/css/main.css

@@ -75,10 +75,11 @@ p.bx-base-pofile-unit-ava {
 	color: #ffffff;
 }
 p.bx-base-pofile-unit-ava {
-	line-height: 94px;
+    line-height: 94px;
     line-height: 5.9rem;
 
-	font-size: 48px;
+    text-align: center;
+    font-size: 48px;
     font-size: 3.0rem;
     font-weight: 700;
 }

+ 1 - 0
modules/boonex/events/classes/BxEventsConfig.php

@@ -106,6 +106,7 @@ class BxEventsConfig extends BxBaseModProfileConfig
             'OBJECT_FORM_ENTRY_DISPLAY_INVITE' => 'bx_event_invite',
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_events_view_actions', // actions menu on view entry page
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_events_view_actions_more', // actions menu on view entry page for "more" popup
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY_ALL' => 'bx_events_view_actions_all', // all actions menu on view entry page
             'OBJECT_MENU_ACTIONS_MY_ENTRIES' => 'bx_events_my', // actions menu on profile entries page
             'OBJECT_MENU_SUBMENU' => 'bx_events_submenu', // main module submenu
             'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_events_view_submenu',  // view entry submenu

+ 45 - 0
modules/boonex/events/classes/BxEventsMenuViewActionsAll.php

@@ -0,0 +1,45 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Events Events
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * View entry all actions menu
+ */
+class BxEventsMenuViewActionsAll extends BxBaseModGroupsMenuViewActionsAll
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->_sModule = 'bx_events';
+
+        parent::__construct($aObject, $oTemplate);
+    }
+
+    protected function _getMenuItemEditEventCover($aItem)
+    {
+        return $this->_getMenuItemByNameActionsMore($aItem);
+    }
+
+    protected function _getMenuItemEditEventProfile($aItem)
+    {
+        return $this->_getMenuItemByNameActionsMore($aItem);
+    }
+
+    protected function _getMenuItemInviteToEvent($aItem)
+    {
+        return $this->_getMenuItemByNameActionsMore($aItem);
+    }
+
+    protected function _getMenuItemDeleteEventProfile($aItem)
+    {
+        return $this->_getMenuItemByNameActionsMore($aItem);
+    }
+}
+
+/** @} */

+ 1 - 0
modules/boonex/events/install/langs/en.xml

@@ -147,6 +147,7 @@
 	<string name="_bx_events_page_block_title_system_manage_administration"><![CDATA[Manage All Events]]></string>
 	<string name="_bx_events_page_block_title_manage"><![CDATA[Manage Events]]></string>
     <string name="_bx_events_page_block_title_top_profiles"><![CDATA[Top Events]]></string>
+    <string name="_bx_events_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
     <string name="_bx_events_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
     <string name="_bx_events_page_block_title_categories"><![CDATA[Event categories]]></string>
     <string name="_bx_events_page_block_title_calendar"><![CDATA[Events calendar]]></string>

+ 1 - 1
modules/boonex/events/install/sql/disable.sql

@@ -13,7 +13,7 @@ DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_events' OR `object` IN('bx_e
 -- MENU
 DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_events';
 DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_events';
-DELETE FROM `sys_menu_items` WHERE `module` = 'bx_events' OR `set_name` IN('bx_events_view_submenu', 'bx_events_submenu', 'bx_events_view_actions', 'bx_events_view_actions_more', 'bx_events_my', 'bx_events_snippet_meta', 'bx_events_menu_manage_tools');
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_events' OR `set_name` IN('bx_events_view_submenu', 'bx_events_submenu', 'bx_events_view_actions', 'bx_events_view_actions_more', 'bx_events_view_actions_all', 'bx_events_my', 'bx_events_snippet_meta', 'bx_events_menu_manage_tools');
 
 -- ACL
 DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_events';

+ 33 - 1
modules/boonex/events/install/sql/enable.sql

@@ -39,7 +39,8 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('bx_events_view_profile', 4, 'bx_events', '', '_bx_events_page_block_title_profile_comments', 11, '', 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 0),
 ('bx_events_view_profile', 4, 'bx_events', '', '_bx_events_page_block_title_profile_description', 13, '', 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 0),
 ('bx_events_view_profile', 2, 'bx_events', '', '_bx_events_page_block_title_profile_info', 11, '', 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 0),
-('bx_events_view_profile', 1, 'bx_events', '', '_bx_events_page_block_title_entry_social_sharing', 13, '', 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 1, 0),
+('bx_events_view_profile', 1, 'bx_events', '', '_bx_events_page_block_title_entry_social_sharing', 13, '', 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 0, 0),
+('bx_events_view_profile', 1, 'bx_events', '', '_bx_events_page_block_title_entry_all_actions', 13, '', 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_events";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 1, 0),
 ('bx_events_view_profile', 3, 'bx_events', '', '_bx_events_page_block_title_profile_calendar', 11, '', 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:8:\"calendar\";s:6:\"params\";a:2:{i:0;a:1:{s:5:\"event\";s:12:\"{content_id}\";}i:1;s:21:\"calendar_compact.html\";}}', 0, 0, 1, 0),
 ('bx_events_view_profile', 4, 'bx_events', '', '_bx_events_page_block_title_fans', 11, '', 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:4:\"fans\";}', 0, 0, 1, 1),
 ('bx_events_view_profile', 4, 'bx_events', '', '_bx_events_page_block_title_admins', 11, '', 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:6:\"admins\";}', 0, 0, 1, 2),
@@ -235,6 +236,37 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_events_view_actions_more', 'bx_events', 'invite-to-event', '_bx_events_menu_item_title_system_invite', '_bx_events_menu_item_title_invite', 'page.php?i=invite-to-event&id={content_id}', '', '', 'user-plus', '', 2147483647, 1, 0, 42),
 ('bx_events_view_actions_more', 'bx_events', 'delete-event-profile', '_bx_events_menu_item_title_system_delete_profile', '_bx_events_menu_item_title_delete_profile', 'page.php?i=delete-event-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 50);
 
+-- MENU: all actions menu for view entry 
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_events_view_actions_all', '_sys_menu_title_view_actions', 'bx_events_view_actions_all', 'bx_events', 15, 0, 1, 'BxEventsMenuViewActionsAll', 'modules/boonex/events/classes/BxEventsMenuViewActionsAll.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_events_view_actions_all', 'bx_events', '_sys_menu_set_title_view_actions', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_events_view_actions_all', 'bx_events', 'profile-fan-add', '_bx_events_menu_item_title_system_become_fan', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 10),
+('bx_events_view_actions_all', 'bx_events', 'profile-fan-remove', '_bx_events_menu_item_title_system_leave_group', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 20),
+('bx_events_view_actions_all', 'bx_events', 'profile-subscribe-add', '_bx_events_menu_item_title_system_subscribe', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 30),
+('bx_events_view_actions_all', 'bx_events', 'profile-subscribe-remove', '_bx_events_menu_item_title_system_unsubscribe', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 40),
+('bx_events_view_actions_all', 'bx_events', 'comment', '_sys_menu_item_title_system_va_comment', '', '', '', '', '', '', '', 0, 2147483647, 0, 0, 200),
+('bx_events_view_actions_all', 'bx_events', 'view', '_sys_menu_item_title_system_va_view', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 210),
+('bx_events_view_actions_all', 'bx_events', 'vote', '_sys_menu_item_title_system_va_vote', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 220),
+('bx_events_view_actions_all', 'bx_events', 'score', '_sys_menu_item_title_system_va_score', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 230),
+('bx_events_view_actions_all', 'bx_events', 'favorite', '_sys_menu_item_title_system_va_favorite', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 240),
+('bx_events_view_actions_all', 'bx_events', 'feature', '_sys_menu_item_title_system_va_feature', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 250),
+('bx_events_view_actions_all', 'bx_events', 'repost', '_sys_menu_item_title_system_va_repost', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 260),
+('bx_events_view_actions_all', 'bx_events', 'report', '_sys_menu_item_title_system_va_report', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 270),
+('bx_events_view_actions_all', 'bx_events', 'social-sharing-facebook', '_sys_menu_item_title_system_social_sharing_facebook', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 300),
+('bx_events_view_actions_all', 'bx_events', 'social-sharing-googleplus', '_sys_menu_item_title_system_social_sharing_googleplus', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 310),
+('bx_events_view_actions_all', 'bx_events', 'social-sharing-twitter', '_sys_menu_item_title_system_social_sharing_twitter', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 320),
+('bx_events_view_actions_all', 'bx_events', 'social-sharing-pinterest', '_sys_menu_item_title_system_social_sharing_pinterest', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 330),
+('bx_events_view_actions_all', 'bx_events', 'edit-event-cover', '_bx_events_menu_item_title_system_edit_cover', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 400),
+('bx_events_view_actions_all', 'bx_events', 'edit-event-profile', '_bx_events_menu_item_title_system_edit_profile', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 410),
+('bx_events_view_actions_all', 'bx_events', 'invite-to-event', '_bx_events_menu_item_title_system_invite', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 420),
+('bx_events_view_actions_all', 'bx_events', 'delete-event-profile', '_bx_events_menu_item_title_system_delete_profile', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 430),
+('bx_events_view_actions_all', 'bx_events', 'more-auto', '_sys_menu_item_title_system_va_more_auto', '_sys_menu_item_title_va_more_auto', 'javascript:void(0)', '', '', 'ellipsis-v', '', '', 0, 2147483647, 1, 0, 9999);
+
 -- MENU: actions menu for my entries
 
 INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 

+ 1 - 0
modules/boonex/events/template/entry-all-actions.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/entry-all-actions.html />

+ 1 - 0
modules/boonex/russian/data/langs/bx_events/ru.xml

@@ -147,6 +147,7 @@
 	<string name="_bx_events_page_block_title_system_manage_administration"><![CDATA[Управление всеми событиями]]></string>
 	<string name="_bx_events_page_block_title_manage"><![CDATA[Управление]]></string>
     <string name="_bx_events_page_block_title_top_profiles"><![CDATA[Популярные события]]></string>
+    <string name="_bx_events_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
     <string name="_bx_events_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
     <string name="_bx_events_page_block_title_categories"><![CDATA[Категории событий]]></string>
     <string name="_bx_events_page_block_title_calendar"><![CDATA[Календарь событий]]></string>

+ 1 - 1
template/scripts/BxBaseMenuCustom.php

@@ -81,7 +81,7 @@ class BxBaseMenuCustom extends BxTemplMenu
             'sObject' => $this->_sObject,
             'aHtmlIds' => $this->_aHtmlIds
         );
-        return $this->_oTemplate->_wrapInTagJsCode("var " . $this->_sJsObjectMoreAuto . " = new BxDolMenuMoreAuto(" . json_encode($aParams) . ");");
+        return $this->_oTemplate->_wrapInTagJsCode("if(!" . $this->_sJsObjectMoreAuto . ") var " . $this->_sJsObjectMoreAuto . " = new BxDolMenuMoreAuto(" . json_encode($aParams) . ");");
     }
 
     protected function _getMenuItem ($aItem)