Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Добавление нового пункта в разделе меню
- код в init.php
- <?
- AddEventHandler("mobile", "onMobileMenuStructureBuilt", Array("CStudiobitEvents", "onMobileMenuStructureBuilt"));
- class CStudiobitEvents
- {
- public function onMobileMenuStructureBuilt($menu)
- {
- $menu[] = array(
- 'title' => 'Другое',
- 'min_api_version' => 22,
- 'hidden' => false,
- 'sort' => 22,
- 'items' =>
- array(
- array(
- 'title' => 'Компания',
- 'color' => '#8bd100',
- 'unselectable' => true,
- 'imageUrl' => '/bitrix/components/bitrix/mobile.jscomponent/jscomponents/more/images/crm/icon-crm-company.png',
- 'attrs' =>
- array (
- 'url' => '/mobile/about/',
- 'id' => 'company_about',
- ),
- ),
- )
- );
- return $menu;
- }
- }
- ?>
- Добавление выпадающего меню на страницах
- <script>
- BX.ready(function(){
- var customItems = [
- /*{
- name: 'История',
- image: "/bitrix/js/mobile/images/plus.png",
- action: function()
- {
- BXMobileApp.PageManager.loadPageModal({
- url: "/mobile/about/index.php"
- });
- }
- },*/
- {
- name: 'Миссия. Видение. Ценности.',
- image: "/bitrix/js/mobile/images/plus.png",
- action: function()
- {
- BXMobileApp.PageManager.loadPageModal({
- url: "/mobile/about/mvts.php"
- });
- }
- },
- {
- name: 'Новости',
- image: "/bitrix/js/mobile/images/plus.png",
- action: function()
- {
- BXMobileApp.PageManager.loadPageModal({
- url: "/mobile/about/business_news.php"
- });
- }
- },
- {
- name: 'Единая горячая линия',
- image: "/bitrix/js/mobile/images/plus.png",
- action: function()
- {
- BXMobileApp.PageManager.loadPageModal({
- url: "http://hotline.tui.ru/hotline/SitePages/home.aspx"
- });
- }
- },
- ];
- var menu = new BXMobileApp.UI.Menu({
- items: customItems
- }, "crmMobileMenu");
- BXMobileApp.UI.Page.TopBar.title.setText('Компания');
- BXMobileApp.UI.Page.TopBar.title.show();
- BXMobileApp.UI.Page.TopBar.title.setCallback(function (){
- menu.show();
- });
- var menu = new BXMobileApp.UI.Menu({ items: items }, "crmMobileMenu"); BXMobileApp.UI.Page.TopBar.title.setText('Компания'); BXMobileApp.UI.Page.TopBar.title.show(); BXMobileApp.UI.Page.TopBar.title.setCallback(function (){ menu.show(); });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement