当前位置: 首页>>代码示例>>PHP>>正文


PHP Media::addJsDefL方法代码示例

本文整理汇总了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));
 }
开发者ID:prestanesia,项目名称:PrestaShop,代码行数:11,代码来源:AdminEmailsController.php

示例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');
 }
开发者ID:prestanesia,项目名称:PrestaShop,代码行数:14,代码来源:AdminLoginController.php

示例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'));
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:6,代码来源:AdminAttachmentsController.php

示例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);
 }
开发者ID:pixiefrog,项目名称:PrestaShop,代码行数:34,代码来源:AdminController.php

示例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));
 }
开发者ID:prestanesia,项目名称:PrestaShop,代码行数:6,代码来源:AdminAttachmentsController.php

示例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');
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:46,代码来源:AdminController.php


注:本文中的Media::addJsDefL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。