getWidgetsMap(); // get all widgets by preloading their assets (if any) $widgets_names = $widgets_helper->getWidgetNames($preload = true); $widgets_welcome = $widgets_helper->showWelcome(); // global permissions are necessary to customize the admin widgets $vbo_auth_global = JFactory::getUser()->authorise('core.vbo.global', 'com_vikbooking'); // check if the notification audio file exists within VCM $notif_audio_path = implode(DIRECTORY_SEPARATOR, [VCM_ADMIN_PATH, 'assets', 'css', 'audio', 'new_notification.mp3']); $notif_audio_url = is_file($notif_audio_path) ? (VCM_ADMIN_URI . implode('/', ['assets', 'css', 'audio', 'new_notification.mp3'])) : null; // load sortable library JHtml::fetch('jquery.framework', true, true); JHtml::fetch('script', VBO_SITE_URI.'resources/jquery-ui.sortable.min.js'); // load language vars for JavaScript JText::script('VBO_WIDGETS_WELCOME'); JText::script('VBO_WIDGETS_ADDWIDGCONT'); JText::script('VBO_WIDGETS_RESTDEFAULT'); JText::script('VBO_WIDGETS_ADDNEWWIDG'); JText::script('VBO_WIDGETS_SAVINGMAP'); JText::script('VBO_WIDGETS_ERRSAVINGMAP'); JText::script('VBO_WIDGETS_LASTUPD'); JText::script('VBO_WIDGETS_ENTERSECTNAME'); JText::script('VBO_WIDGETS_NEWSECT'); JText::script('VBO_WIDGETS_CONFRMELEM'); JText::script('VBO_WIDGETS_SELCONTSIZE'); JText::script('VBO_WIDGETS_UPDWIDGCONT'); JText::script('VBO_WIDGETS_EDITWIDGCONT'); JText::script('VBO_WIDGETS_ERRDISPWIDG'); JText::script('VBO_STICKYN_TITLE'); JText::script('VBO_STICKYN_TEXT'); JText::script('VBO_STICKYN_TEXT2'); JText::script('VBO_STICKYN_CUSTOMURI'); JText::script('VBO_BROWSER_NOTIFS_ON'); JText::script('VBO_BROWSER_NOTIFS_OFF'); JText::script('VBO_BROWSER_NOTIFS_OFF_HELP'); JText::script('VBO_ADMIN_WIDGET'); JText::script('VBO_CONGRATS'); /** * Monitor request vars to see if a widget should be loaded within a modal. * Only the dashboard at the moment allows to render an admin widget within * a modal through query string values, because all other pages will render * the multitask panel that can quickly render any admin widget. * * @since 1.16.0 (J) - 1.6.0 (WP) */ $app = JFactory::getApplication(); $load_widget = $app->input->get('load_widget', ''); $injected_data = $app->input->get('multitask_data', [], 'array'); if (!empty($load_widget) && $desired_widget = $widgets_helper->getWidget($load_widget)) { $injected_data['_modalTitle'] = $desired_widget->getName(); $payload_json = json_encode($injected_data); // append script to DOM to render the widget within a modal JFactory::getDocument()->addScriptDeclaration( << { VBOCore.renderModalWidget('$load_widget', $payload_json, false); }, 500); }); })(jQuery); JS ); } ?>
printYesNoButtons('vbocustwidgets', JText::translate('VBYES'), JText::translate('VBNO'), 0, 1, 0, 'vboWidgetsToggleManage(false);'); ?>
sections as $seck => $section) { ?>
containers)) { $section->containers = array(); } $tot_containers = count($section->containers); foreach ($section->containers as $conk => $container) { $container_css = $widgets_helper->getContainerCssClass($container->size); ?>
widgets)) { $container->widgets = array(); } foreach ($container->widgets as $widk => $widget_id) { $widget_instance = $widgets_helper->getWidget($widget_id); if ($widget_instance === false) { continue; } ?>
render(); ?>

×