[+] FO : mobile theme re-included in the trunk

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17060 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-08-28 15:47:12 +00:00
parent caccf77b10
commit 85f8e3db2f
97 changed files with 8534 additions and 32 deletions
@@ -160,6 +160,12 @@ class AdminThemesControllerCore extends AdminController
'type' => 'text',
'size' => 20
),
'PS_ALLOW_MOBILE_DEVICE' => array(
'title' => $this->l('Enable mobile theme'),
'desc' => $this->l('Allows visitors browsing on a mobile device, to have a light version of website'),
'cast' => 'intval',
'type' => 'bool',
)
),
'submit' => array('title' => $this->l('Save'), 'class' => 'button')
),
+11 -6
View File
@@ -191,7 +191,7 @@ class OrderOpcControllerCore extends ParentOrderController
$this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice'));
if (!$this->context->cart->update())
$this->errors[] = Tools::displayError('An error occurred while updating your cart.');
// Address has changed, so we check if the cart rules still apply
CartRule::autoRemoveFromCart($this->context);
CartRule::autoAddToCart($this->context);
@@ -271,11 +271,16 @@ class OrderOpcControllerCore extends ParentOrderController
{
parent::setMedia();
// Adding CSS style sheet
$this->addCSS(_THEME_CSS_DIR_.'order-opc.css');
// Adding JS files
$this->addJS(_THEME_JS_DIR_.'order-opc.js');
$this->addJqueryPlugin('scrollTo');
if ($this->context->getMobileDevice() == false)
{
// Adding CSS style sheet
$this->addCSS(_THEME_CSS_DIR_.'order-opc.css');
// Adding JS files
$this->addJS(_THEME_JS_DIR_.'order-opc.js');
$this->addJqueryPlugin('scrollTo');
}
else
$this->addJS(_THEME_MOBILE_JS_DIR_.'opc.js');
$this->addJS(_THEME_JS_DIR_.'tools/statesManagement.js');
}
+19 -7
View File
@@ -41,13 +41,25 @@ class ProductControllerCore extends FrontController
{
parent::setMedia();
$this->addCSS(_THEME_CSS_DIR_.'product.css');
$this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'screen');
$this->addJqueryPlugin(array('fancybox', 'idTabs', 'scrollTo', 'serialScroll'));
$this->addJS(array(
_THEME_JS_DIR_.'tools.js',
_THEME_JS_DIR_.'product.js'
));
if ($this->context->getMobileDevice() == false)
{
$this->addCSS(_THEME_CSS_DIR_.'product.css');
$this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'screen');
$this->addJqueryPlugin(array('fancybox', 'idTabs', 'scrollTo', 'serialScroll'));
$this->addJS(array(
_THEME_JS_DIR_.'tools.js',
_THEME_JS_DIR_.'product.js'
));
}
else
{
$this->addJqueryPlugin(array('scrollTo', 'serialScroll'));
$this->addJS(array(
_THEME_JS_DIR_.'tools.js',
_THEME_MOBILE_JS_DIR_.'product.js',
_THEME_MOBILE_JS_DIR_.'jquery.touch-gallery.js'
));
}
if (Configuration::get('PS_DISPLAY_JQZOOM') == 1)
$this->addJqueryPlugin('jqzoom');