本文整理汇总了PHP中Media::getJqueryPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Media::getJqueryPath方法的具体用法?PHP Media::getJqueryPath怎么用?PHP Media::getJqueryPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Media
的用法示例。
在下文中一共展示了Media::getJqueryPath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayAccount
public function displayAccount()
{
if (!isset($this->context->cookie->stats_date_from)) {
$this->context->cookie->stats_date_from = date('Y-m-01');
}
if (!isset($this->context->cookie->stats_date_to)) {
$this->context->cookie->stats_date_to = date('Y-m-t');
}
Referrer::refreshCache(array(array('id_referrer' => (int) $this->context->cookie->tracking_id)));
$referrer = new Referrer((int) $this->context->cookie->tracking_id);
$this->smarty->assign('referrer', $referrer);
$this->smarty->assign('datepickerFrom', $this->context->cookie->stats_date_from);
$this->smarty->assign('datepickerTo', $this->context->cookie->stats_date_to);
$display_tab = array('uniqs' => $this->l('Unique visitors'), 'visitors' => $this->l('Visitors'), 'visits' => $this->l('Visits'), 'pages' => $this->l('Pages viewed'), 'registrations' => $this->l('Registrations'), 'orders' => $this->l('Orders'), 'base_fee' => $this->l('Base fee'), 'percent_fee' => $this->l('Percent fee'), 'click_fee' => $this->l('Click fee'), 'sales' => $this->l('Sales'), 'cart' => $this->l('Average cart'), 'reg_rate' => $this->l('Registration rate'), 'order_rate' => $this->l('Order rate'));
$this->smarty->assign('displayTab', $display_tab);
$products = Product::getSimpleProducts($this->context->language->id);
$products_array = array();
foreach ($products as $product) {
$products_array[] = $product['id_product'];
}
$js_files = array();
$jquery_files = Media::getJqueryPath();
if (is_array($jquery_files)) {
$js_files = array_merge($js_files, $jquery_files);
} else {
$js_files[] = $jquery_files;
}
$jquery_ui_files = Media::getJqueryUIPath('ui.datepicker', 'base', true);
$js_files = array_merge($js_files, $jquery_ui_files['js']);
$css_files = $jquery_ui_files['css'];
$js_files[] = $this->_path . 'js/trackingfront.js';
$js_tpl_var = array('product_ids' => implode(', ', $products_array), 'referrer_id' => $referrer->id, 'token' => $this->context->cookie->tracking_passwd, 'display_tab' => implode('", "', array_keys($display_tab)));
$this->smarty->assign(array('js' => $js_files, 'css' => $css_files, 'js_tpl_var' => $js_tpl_var));
return $this->display(__FILE__, 'views/templates/front/account.tpl');
}
示例2: addJquery
/**
* Add a new javascript file in page header.
*
* @param mixed $js_uri
* @return void
*/
public function addJquery($version = null, $folder = null, $minifier = true)
{
$this->addJS(Media::getJqueryPath($version, $folder, $minifier));
}
示例3: displayTinyMcePopup
/**
* Affichage de la popin TinyMce dans l'admin
*/
public function displayTinyMcePopup()
{
//Liste des pages cms
$this->context->smarty->assign('cms_categories_html', $this->getCmsLinks());
//Liste des widgets du module
$this->context->smarty->assign('widgets_list', $this->getWidgetsList());
//Token Admin ( celui récupéré automatiquement ne fonctionne pas )
$cookie = new Cookie('psAdmin');
$token = Tools::getAdminToken('Wysiwyg' . (int) Tab::getIdFromClassName('Wysiwyg') . (int) $cookie->id_employee);
$ajax_page = $this->context->link->getAdminLink('module=eicmslinks&controller=Wysiwyg&ajax=1', false);
$this->context->smarty->assign('js_token', $token);
$this->context->smarty->assign('ajax_page', $ajax_page);
$this->context->smarty->assign('admin_dir', Configuration::get('eicmslinks_admin_path'));
//Js nécessaires au fonctionnement de la popin
$jquery_files = Media::getJqueryPath();
$this->context->smarty->assign('jquery_file', $jquery_files[0]);
$this->context->smarty->assign('js_file', __PS_BASE_URI__ . 'modules/' . $this->name . '/js/tinymce_popup.js');
$this->context->smarty->assign('css_file', __PS_BASE_URI__ . 'modules/' . $this->name . '/css/tinymce_popup.css');
//Version de prestashop concernée
if (_PS_VERSION_ > '1.6') {
$ps_version = '16';
} else {
$ps_version = '15';
}
$this->context->smarty->assign('ps_version', $ps_version);
echo $this->display(__FILE__, 'views/tinymce_popup.tpl');
}