public function setMedia() { parent::setMedia(); $this->addJs(_PS_JS_DIR_ . '/admin/email.js'); Media::addJsDefL('textMsg', $this->l('This is a test message. Your server is now configured to send email.', null, true, false)); Media::addJsDefL('textSubject', $this->l('Test message -- Prestashop', null, true, false)); Media::addJsDefL('textSendOk', $this->l('A test email has been sent to the email address you provided.', null, true, false)); Media::addJsDefL('textSendError', $this->l('Error: Please check your configuration', null, true, false)); Media::addJsDefL('token_mail', $this->token); Media::addJsDefL('errorMail', $this->l('This email address is not valid', null, true, false)); }
public function setMedia() { $this->addJquery(); $this->addjqueryPlugin('validate'); $this->addJS(_PS_JS_DIR_ . 'jquery/plugins/validate/localization/messages_' . $this->context->language->iso_code . '.js'); $this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/css/admin-theme.css', 'all', 0); $this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/css/overrides.css', 'all', PHP_INT_MAX); $this->addJS(_PS_JS_DIR_ . 'vendor/spin.js'); $this->addJS(_PS_JS_DIR_ . 'vendor/ladda.js'); Media::addJsDef(array('img_dir' => _PS_IMG_)); Media::addJsDefL('one_error', $this->l('There is one error.', null, true, false)); Media::addJsDefL('more_errors', $this->l('There are several errors.', null, true, false)); Hook::exec('actionAdminLoginControllerSetMedia'); }
public function setMedia() { parent::setMedia(); $this->addJs(_PS_JS_DIR_ . '/admin/attachments.js'); Media::addJsDefL('confirm_text', $this->trans('This attachment is associated with the following products, do you really want to delete it?', array(), 'Admin.Catalog.Notification')); }
public function setMedia() { //Bootstrap $this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/css/' . $this->bo_css, 'all', 0); $this->addJquery(); $this->addjQueryPlugin(array('scrollTo', 'alerts', 'chosen', 'autosize', 'fancybox')); $this->addjQueryPlugin('growl', null, false); $this->addJqueryUI(array('ui.slider', 'ui.datepicker')); Media::addJsDef(array('host_mode' => defined('_PS_HOST_MODE_') && _PS_HOST_MODE_)); $this->addJS(array(_PS_JS_DIR_ . 'admin.js?v=' . _PS_VERSION_, _PS_JS_DIR_ . 'tools.js?v=' . _PS_VERSION_, _PS_JS_DIR_ . 'jquery/plugins/timepicker/jquery-ui-timepicker-addon.js')); //loads specific javascripts for the admin theme $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/vendor/bootstrap.min.js'); $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/vendor/modernizr.min.js'); $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/modernizr-loads.js'); $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/vendor/moment-with-langs.min.js'); if (!$this->lite_display) { $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/help.js'); } if (!Tools::getValue('submitFormAjax')) { $this->addJS(_PS_JS_DIR_ . 'admin/notifications.js'); } if (defined('_PS_HOST_MODE_') && _PS_HOST_MODE_) { $this->addJS('https://cdn.statuspage.io/se-v2.js'); Media::addJsDefL('status_operational', $this->l('Operational', null, true, false)); Media::addJsDefL('status_degraded_performance', $this->l('Degraded Performance', null, true, false)); Media::addJsDefL('status_partial_outage', $this->l('Partial Outage', null, true, false)); Media::addJsDefL('status_major_outage', $this->l('Major Outage', null, true, false)); Media::addJsDef(array('host_cluster' => defined('_PS_HOST_CLUSTER_') ? _PS_HOST_CLUSTER_ : 'fr1')); } // Execute Hook AdminController SetMedia Hook::exec('actionAdminControllerSetMedia'); // Specific Admin Theme $this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/css/overrides.css', 'all', PHP_INT_MAX); }
public function setMedia() { parent::setMedia(); $this->addJs(_PS_JS_DIR_ . '/admin/attachments.js'); Media::addJsDefL('confirm_text', $this->l('This attachment is associated with the following products, do you really want to delete it?', null, true, false)); }
public function setMedia($isNewTheme = false) { if ($isNewTheme) { $this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/new-theme/public/theme.css', 'all', 1); $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/new-theme/public/bundle.js'); $this->addjQueryPlugin(array('chosen')); } else { //Bootstrap $this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/css/' . $this->bo_css, 'all', 0); $this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/css/vendor/titatoggle-min.css', 'all', 0); $this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/public/theme.css', 'all', 0); $this->addJquery(); $this->addjQueryPlugin(array('scrollTo', 'alerts', 'chosen', 'autosize', 'fancybox')); $this->addjQueryPlugin('growl', null, false); $this->addJqueryUI(array('ui.slider', 'ui.datepicker')); $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/vendor/bootstrap.min.js'); $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/vendor/modernizr.min.js'); $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/modernizr-loads.js'); $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/vendor/moment-with-langs.min.js'); $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/public/bundle.js'); $this->addJS(_PS_JS_DIR_ . 'jquery/plugins/timepicker/jquery-ui-timepicker-addon.js'); if (!$this->lite_display) { $this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/help.js'); } if (!Tools::getValue('submitFormAjax')) { $this->addJS(_PS_JS_DIR_ . 'admin/notifications.js'); } if (defined('_PS_HOST_MODE_') && _PS_HOST_MODE_) { $this->addJS('https://cdn.statuspage.io/se-v2.js'); Media::addJsDefL('status_operational', $this->l('Operational', null, true, false)); Media::addJsDefL('status_degraded_performance', $this->l('Degraded Performance', null, true, false)); Media::addJsDefL('status_partial_outage', $this->l('Partial Outage', null, true, false)); Media::addJsDefL('status_major_outage', $this->l('Major Outage', null, true, false)); Media::addJsDef(array('host_cluster' => defined('_PS_HOST_CLUSTER_') ? _PS_HOST_CLUSTER_ : 'fr1')); } // Specific Admin Theme $this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/css/overrides.css', 'all', PHP_INT_MAX); } $this->addJS(array(_PS_JS_DIR_ . 'admin.js?v=' . _PS_VERSION_, _PS_JS_DIR_ . 'cldr.js', _PS_JS_DIR_ . 'tools.js?v=' . _PS_VERSION_, __PS_BASE_URI__ . $this->admin_webpath . '/public/bundle.js')); Media::addJsDef(array('host_mode' => defined('_PS_HOST_MODE_') && _PS_HOST_MODE_)); Media::addJsDef(array('baseDir' => __PS_BASE_URI__)); Media::addJsDef(array('baseAdminDir' => __PS_BASE_URI__ . basename(_PS_ADMIN_DIR_) . '/')); Media::addJsDef(array('currency' => array('iso_code' => Context::getContext()->currency->iso_code, 'sign' => Context::getContext()->currency->sign, 'name' => Context::getContext()->currency->name, 'format' => Context::getContext()->currency->format))); // Execute Hook AdminController SetMedia Hook::exec('actionAdminControllerSetMedia'); }