1
0

enable.sql 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. SET @sName = 'bx_attendant';
  2. -- SETTINGS
  3. SET @iTypeOrder = (SELECT IFNULL(MAX(`order`), 0) + 1 FROM `sys_options_types` WHERE `group` = 'modules');
  4. INSERT INTO `sys_options_types` (`group`, `name`, `caption`, `icon`, `order`)
  5. VALUES('modules', @sName, '_bx_attendant_adm_stg_cpt_type', 'bx_attendant@modules/boonex/attendant/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
  6. SET @iTypeId = LAST_INSERT_ID();
  7. INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `hidden`, `order`) VALUES(@iTypeId, 'bx_attendant_on_profile_creation', '_bx_attendant_adm_stg_cpt_category_on_profile_creation', 0, 2);
  8. SET @iCategoryId = LAST_INSERT_ID();
  9. INSERT INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_params`, `check_error`, `order`) VALUES
  10. (@iCategoryId, 'bx_attendant_on_profile_creation_modules', '_bx_attendant_adm_stg_on_profile_creation_modules_list', '', 'list', 'a:2:{s:6:"module";s:12:"bx_attendant";s:6:"method";s:19:"get_profile_modules";}', '', '', '', 1),
  11. (@iCategoryId, 'bx_attendant_on_profile_event_list', '_bx_attendant_adm_stg_on_profile_creation_event_list', 'confirmation', 'select', 'a:2:{s:6:"module";s:12:"bx_attendant";s:6:"method";s:40:"get_popup_with_recommended_on_event_show";}', '', '', '', 2),
  12. (@iCategoryId, 'bx_attendant_on_profile_after_action_url', '_bx_attendant_adm_stg_on_profile_after_action_url', '', 'select', 'a:2:{s:6:"module";s:12:"bx_attendant";s:6:"method";s:31:"get_options_redirect_after_show";}', '', '', '', 3),
  13. (@iCategoryId, 'bx_attendant_on_profile_after_action_url_custom', '_bx_attendant_adm_stg_on_profile_after_action_url_custom', '', 'digit', '', '', '', '', 4),
  14. (@iCategoryId, 'bx_attendant_redirect_to_entered_page', '_bx_attendant_adm_stg_enable_redirect_to_entered_page', '', 'checkbox', '', '', '', '', 5),
  15. (@iCategoryId, 'bx_attendant_suggest_entered_page', '_bx_attendant_adm_stg_enable_suggest_entered_page', '', 'checkbox', '', '', '', '', 6);
  16. -- INJECTION
  17. INSERT INTO `sys_injections`(`name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES
  18. (@sName, 0, 'injection_footer', 'service', 'a:2:{s:6:"module";s:12:"bx_attendant";s:6:"method";s:18:"handle_action_view";}', '0', '1');
  19. -- ALERTS
  20. INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES
  21. (@sName, 'BxAttendantAlertsResponse', 'modules/boonex/attendant/classes/BxAttendantAlertsResponse.php', '');
  22. SET @iHandler := LAST_INSERT_ID();
  23. INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
  24. ('profile', 'add', @iHandler);
  25. -- MENU: notifications
  26. SET @iMIOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_account_notifications' AND `order` < 9999);
  27. INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
  28. ('sys_account_notifications', @sName, 'notifications-attendant', '_bx_attendant_menu_item_title_system_attendant', '_bx_attendant_menu_item_title_attendant', 'javascript:', 'oBxAttendant.showPopup(1)', '', 'fab buffer', '', '', 2147483646, 1, 0, @iMIOrder + 1);