[-] BO : theme mobile : #PSCFV-3910

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17218 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2012-09-06 16:28:23 +00:00
parent 85f9330df2
commit 9be7d9b0f9
5 changed files with 20 additions and 19 deletions
+6 -13
View File
@@ -103,11 +103,6 @@ class ContextCore
*/
protected $mobile_device;
/**
* @var boolean|string touch pad device of the customer
*/
protected $touchpad_device;
public function getMobileDevice()
{
if (is_null($this->mobile_device))
@@ -117,23 +112,21 @@ class ContextCore
{
$detect = new Mobile_Detect();
switch (Configuration::get('PS_ALLOW_MOBILE_DEVICE'))
switch ((int)Configuration::get('PS_ALLOW_MOBILE_DEVICE'))
{
case '1': // Only for mobile device
case 1: // Only for mobile device
if ($detect->isMobile() && !$detect->isTablet())
$this->mobile_device = true;
break;
case '2': // Only for touchpads
case 2: // Only for touchpads
if ($detect->isTablet() && !$detect->is_mobile())
$this->mobile_device = true;
break;
case '3': // For touchpad and mobile devices
if ($detect->isMobile() && $detect->isTablet())
case 3: // For touchpad or mobile devices
if ($detect->isMobile() || $detect->isTablet())
$this->mobile_device = true;
break;
}
if ($detect->isMobile() && !$detect->isTablet())
$this->mobile_device = true;
}
}
@@ -143,7 +136,7 @@ class ContextCore
protected function checkMobileContext()
{
return file_exists(_PS_THEME_MOBILE_DIR_)
&& Configuration::get('PS_ALLOW_MOBILE_DEVICE')
&& (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE')
&& isset($_SERVER['HTTP_USER_AGENT'])
&& !Context::getContext()->cookie->no_mobile;
}
+4 -1
View File
@@ -252,6 +252,8 @@ class FrontControllerCore extends Controller
// Check mobile context
if (Tools::isSubmit('no_mobile_theme'))
$this->context->cookie->no_mobile = true;
else if (Tools::isSubmit('mobile_theme_ok'))
$this->context->cookie->no_mobile = false;
$locale = strtolower(Configuration::get('PS_LOCALE_LANGUAGE')).'_'.strtoupper(Configuration::get('PS_LOCALE_COUNTRY').'.UTF-8');
setlocale(LC_COLLATE, $locale);
@@ -792,7 +794,8 @@ class FrontControllerCore extends Controller
'HOOK_FOOTER' => Hook::exec('displayFooter'),
'conditions' => Configuration::get('PS_CONDITIONS'),
'id_cgv' => Configuration::get('PS_CONDITIONS_CMS_ID'),
'PS_SHOP_NAME' => Configuration::get('PS_SHOP_NAME')
'PS_SHOP_NAME' => Configuration::get('PS_SHOP_NAME'),
'PS_ALLOW_MOBILE_DEVICE' => file_exists(_PS_THEME_MOBILE_DIR_) && (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE')
));
}
+2
View File
@@ -59,6 +59,8 @@ body{
/* positionnement ****************************************************************************** */
.hidden {display:none}
.f_right {float:right}
p.center {text-align:center}
.clearBoth {clear:both}}
/* title *************************************************************************************** */
h1 {
+4 -1
View File
@@ -34,7 +34,10 @@
</div>
<!-- Footer -->
<div id="footer" class="grid_9 alpha omega clearfix">{$HOOK_FOOTER}</div>
<div id="footer" class="grid_9 alpha omega clearfix">
{$HOOK_FOOTER}
<p class="center clearBoth"><a href="{$link->getPageLink('index', true)}?mobile_theme_ok">{l s='Consult the mobile site'}</a></p>
</div>
</div>
{/if}
</body>
+4 -4
View File
@@ -237,6 +237,7 @@ $_LANG['errors_5fbddd8d4e0d8c7a868272f2f171df09'] = 'Il y a %d erreur';
$_LANG['errors_9ead913c5b7c87efda39ca9640c46ae4'] = 'Il y a %d erreurs';
$_LANG['errors_f117e0acb7542168cb93c7e084f998c8'] = 'Il y a %d erreur :';
$_LANG['footer_2e9c2af4367e14bd8173c62a59eeba1f'] = 'Consultez le site complet';
$_LANG['footer_4475c84bd0eb5c4efa671dad4bf4bfc3'] = 'Consultez la version mobile du site';
$_LANG['footer_e4045598261988d9988c594243a9434d'] = 'Conditions générale de vente';
$_LANG['guest-tracking_109636f722b8fccc95d072b2760a6282'] = 'Transformez votre compte invité en un compte client et profitez :';
$_LANG['guest-tracking_1f1015bbef5f42d858e8486397ad8f3e'] = 'Retours produits simplifiés';
@@ -257,8 +258,8 @@ $_LANG['guest-tracking_dec9cc6702179299ae451c11633915c6'] = 'Passage de commande
$_LANG['guest-tracking_df1555fe48479f594280a2e03f9a8186'] = 'E-mail :';
$_LANG['header_0fcd4065ff78fceb3083316ddb958bc1'] = 'Vous ne pouvez pas créer de nouvelle commande depuis votre pays :';
$_LANG['header_a85eba4c6c699122b2bb1387ea4813ad'] = 'Panier';
$_LANG['header_bffe9a3c9a7e00ba00a11749e022d911'] = 'Identifiez-vous';
$_LANG['header_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte';
$_LANG['header_ea80ace13d1f296d26cadbaca1992e36'] = 'Authentification';
$_LANG['history_01abfc750a0c942167651c40d088531d'] = '#';
$_LANG['history_0b3db27bc15f682e92ff250ebb167d4b'] = 'Retour à votre compte';
$_LANG['history_0eede552438475bdfe820c13f24c9399'] = 'Prix total';
@@ -530,9 +531,9 @@ $_LANG['order-opc-address_ece53f91d0525eaa402014fe2736a158'] = 'Adresse de factu
$_LANG['order-opc-carrier_0a5737e9ac4d4cdbf41e473674c0e557'] = 'J\'ai lu les conditions générales de vente et j\'y adhère sans réserve.';
$_LANG['order-opc-carrier_0d9175fe89fb80d815e7d03698b6e83a'] = 'Cadeau';
$_LANG['order-opc-carrier_0fce1189b263c211a8239fb0e9df004d'] = 'J\'accepte de recevoir ma commande dans un emballage recyclé';
$_LANG['order-opc-carrier_31aba5ee8968339a38ff554a14b2c679'] = 'Choisissez la méthode de livraison';
$_LANG['order-opc-carrier_b4e59f3a4554655a099738382ebedbff'] = 'Vous pouvez ajouter un message d\'accompagnement à votre commande.';
$_LANG['order-opc-carrier_c1fb97680f5f203d44744a2355ed87ae'] = '(Lire les Conditions générales de vente)';
$_LANG['order-opc-carrier_e085dcd05d73bdd5afe338e5b6e42a18'] = 'Choisissez votre mode de livraison';
$_LANG['order-opc-carrier_e4045598261988d9988c594243a9434d'] = 'Conditions générales de vente';
$_LANG['order-opc-carrier_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Transport';
$_LANG['order-opc-carrier_f60920a83c506f883cff36d8322816a4'] = 'Je souhaite que ma commande soit emballée dans un papier-cadeau.';
@@ -691,11 +692,10 @@ $_LANG['order-steps_99dea78007133396a7b8ed70578ac6ae'] = 'Identifiez-vous';
$_LANG['order-steps_c453a4b8e8d98e82f35b67f433e3b4da'] = 'Paiement';
$_LANG['order-steps_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse';
$_LANG['order-steps_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Frais de port';
$_LANG['pages-list_4fbb483bb2abca4cefe1818eddb3c6b5'] = 'Plan du site';
$_LANG['pages-list_5813ce0ec7196c492c97596718f71969'] = 'Plan du site';
$_LANG['pages-list_bbaff12800505b22a853e8b7f4eb6a22'] = 'Contact';
$_LANG['pages-list_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte';
$_LANG['pagination_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Suivant';
$_LANG['pagination_14230d11143a03f4330c6433d5032a9d'] = 'Précédent';
$_LANG['pagination_6c583afb157e33bfb5b7c3d4114c4dd5'] = 'produits :';
$_LANG['pagination_dd1f775e443ff3b9a89270713580a51b'] = 'Précédent';
$_LANG['pagination_e0aa021e21dddbd6d8cecec71e9cf564'] = 'OK';