本文整理汇总了PHP中Media::addJsDefL方法的典型用法代码示例。如果您正苦于以下问题:PHP Media::addJsDefL方法的具体用法?PHP Media::addJsDefL怎么用?PHP Media::addJsDefL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Media
的用法示例。
在下文中一共展示了Media::addJsDefL方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setMedia
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));
}
示例2: setMedia
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');
}
示例3: setMedia
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'));
}
示例4: setMedia
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);
}
示例5: setMedia
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));
}
示例6: setMedia
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');
}