Skip to content

Commit

Permalink
Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop
Browse files Browse the repository at this point in the history
…into bootstrap
  • Loading branch information
Jerome Nadaud committed Nov 29, 2013
2 parents 6da40e7 + 90e1a39 commit cbc79c6
Show file tree
Hide file tree
Showing 14 changed files with 172 additions and 131 deletions.
2 changes: 1 addition & 1 deletion modules/blockbanner/blockbanner.tpl
Expand Up @@ -29,7 +29,7 @@
<div class="container">
<a href="{$banner_link}" title="{$banner_desc}">
{if isset($banner_img)}
<img class="img-responsive" src="{$module_dir}{$banner_img}" alt=""/>
<img class="img-responsive" src="{$module_dir}{$banner_img}" alt="{$banner_desc}" title="{$banner_desc}"/>
{else}
{$banner_desc}
{/if}
Expand Down
2 changes: 1 addition & 1 deletion modules/blockcategories/category-tree-branch.tpl
Expand Up @@ -25,7 +25,7 @@

<li class="category_{$node.id}{if isset($last) && $last == 'true'} last{/if}">
<a href="{$node.link|escape:'html':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if}
title="{$node.desc|strip_tags|trim|escape:'html':'UTF-8'}">{$node.name|escape:'html':'UTF-8'}</a>
title="{$node.desc|strip_tags|trim|truncate:255:'...'|escape:'html':'UTF-8'}">{$node.name|escape:'html':'UTF-8'}</a>
{if $node.children|@count > 0}
<ul>
{foreach from=$node.children item=child name=categoryTreeBranch}
Expand Down
2 changes: 1 addition & 1 deletion modules/themeconfigurator/views/templates/admin/items.tpl
Expand Up @@ -15,7 +15,7 @@
{foreach name=items from=$hookItems item=hItem}
<li id="item-{$hItem.id_item}" class="item panel">
<span class="item-order">{if $hItem.item_order le 9}0{/if}{$hItem.item_order}</span>
<!--<i class="icon-sort"></i>-->
{if $hItem.image}<span><img src="{$module_dir}images/{$hItem.image}" alt="" title="" class="preview" /></span>{/if}
<span class="item-title">{$hItem.title}</span>
<span class="button btn btn-default button-edit pull-right"><i class="icon-edit"></i>{l s='Edit' mod='themeconfigurator'}</span>
<span class="button btn btn-default button-close pull-right"><i class="icon-remove"></i>{l s='Close' mod='themeconfigurator'}</span>
Expand Down
52 changes: 0 additions & 52 deletions themes/default-bootstrap/addresses.tpl
Expand Up @@ -23,58 +23,6 @@
* International Registered Trademark & Property of PrestaShop SA
*}

{*
** Retro compatibility for PrestaShop version < 1.4.2.5 with a recent theme
*}

{* Two variable are necessaries to display the address with the new layout system *}
{* Will be deleted for 1.5 version and more *}
{if !isset($multipleAddresses)}
{$ignoreList.0 = "id_address"}
{$ignoreList.1 = "id_country"}
{$ignoreList.2 = "id_state"}
{$ignoreList.3 = "id_customer"}
{$ignoreList.4 = "id_manufacturer"}
{$ignoreList.5 = "id_supplier"}
{$ignoreList.6 = "date_add"}
{$ignoreList.7 = "date_upd"}
{$ignoreList.8 = "active"}
{$ignoreList.9 = "deleted"}

{* PrestaShop < 1.4.2 compatibility *}
{if isset($addresses)}
{$address_number = 0}
{foreach from=$addresses key=k item=address}
{counter start=0 skip=1 assign=address_key_number}
{foreach from=$address key=address_key item=address_content}
{if !in_array($address_key, $ignoreList)}
{$multipleAddresses.$address_number.ordered.$address_key_number = $address_key}
{$multipleAddresses.$address_number.formated.$address_key = $address_content}
{counter}
{/if}
{/foreach}
{$multipleAddresses.$address_number.object = $address}
{$address_number = $address_number + 1}
{/foreach}
{/if}
{/if}

{* Define the style if it doesn't exist in the PrestaShop version*}
{* Will be deleted for 1.5 version and more *}
{if !isset($addresses_style)}
{$addresses_style.company = 'address_company'}
{$addresses_style.vat_number = 'address_company'}
{$addresses_style.firstname = 'address_name'}
{$addresses_style.lastname = 'address_name'}
{$addresses_style.address1 = 'address_address1'}
{$addresses_style.address2 = 'address_address2'}
{$addresses_style.city = 'address_city'}
{$addresses_style.country = 'address_country'}
{$addresses_style.phone = 'address_phone'}
{$addresses_style.phone_mobile = 'address_phone_mobile'}
{$addresses_style.alias = 'address_title'}
{/if}

<script type="text/javascript">
//<![CDATA[
{literal}
Expand Down
3 changes: 0 additions & 3 deletions themes/default-bootstrap/authentication.tpl
Expand Up @@ -82,9 +82,6 @@ $(document).ready(function() {
<script type="text/javascript">
{literal}
$(document).ready(function(){
// Retrocompatibility with 1.4
if (typeof baseUri === "undefined" && typeof baseDir !== "undefined")
baseUri = baseDir;
$('#create-account_form').submit(function(){
submitFunction();
return false;
Expand Down
65 changes: 65 additions & 0 deletions themes/default-bootstrap/css/global.css
Expand Up @@ -2405,6 +2405,64 @@ a.price_discount_delete:hover {
background: white;
}

@media (max-width: 767px) {
#order-detail-content #cart_summary table, #order-detail-content #cart_summary thead, #order-detail-content #cart_summary tbody, #order-detail-content #cart_summary th, #order-detail-content #cart_summary td, #order-detail-content #cart_summary tr {
display: block;
}
#order-detail-content #cart_summary thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
#order-detail-content #cart_summary tr {
border-bottom: 1px solid #ccc;
overflow: hidden;
}
#order-detail-content #cart_summary td {
border: none;
position: relative;
width: 50%;
float: left;
white-space: normal;
}
#order-detail-content #cart_summary td.cart_avail {
clear: both;
}
#order-detail-content #cart_summary td.cart_quantity {
clear: both;
padding: 9px 8px 11px 18px;
}
#order-detail-content #cart_summary td.cart_delete {
width: 100%;
clear: both;
text-align: right;
}
#order-detail-content #cart_summary td.cart_delete:before {
display: inline-block;
padding-right: 0.5em;
position: relative;
top: -3px;
}
#order-detail-content #cart_summary td.cart_delete div {
display: inline;
}
#order-detail-content #cart_summary td:before {
content: attr(data-title);
display: block;
}
#order-detail-content #cart_summary tfoot td {
float: none;
width: 100%;
}
#order-detail-content #cart_summary tfoot td:before {
display: inline;
}
#order-detail-content #cart_summary tfoot tr .text-right, #order-detail-content #cart_summary tfoot tr .price {
display: block;
float: left;
width: 50%;
}
}
.cart_voucher {
vertical-align: top !important;
}
Expand Down Expand Up @@ -3451,3 +3509,10 @@ div.star.star_hover:after {
.ie8 #facebook_block, .ie8 #cmsinfo_block {
height: 344px;
}

/************************* Zoom ******************************/
@media (max-width: 1199px) {
.zoomdiv {
display: none !important;
}
}
9 changes: 8 additions & 1 deletion themes/default-bootstrap/css/product.css
Expand Up @@ -569,8 +569,15 @@ span.view_scroll_spacer {
display: none;
}
}
.box-info-product .exclusive.disabled:before {
.box-info-product .exclusive.added:before {
content: "";
}
.box-info-product .exclusive.added.disabled:before, .box-info-product .exclusive.disabled:before {
content: "";
animation: 2s linear 0s normal none infinite spin;
-webkit-animation: 2s linear 0s normal none infinite spin;
-moz-animation: 2s linear 0s normal none infinite spin;
border: none;
}
.box-info-product .exclusive:after {
background: url(../img/border-1.gif) repeat-y 0 0;
Expand Down
9 changes: 8 additions & 1 deletion themes/default-bootstrap/js/modules/blockcart/ajax-cart.js
Expand Up @@ -176,8 +176,15 @@ var ajaxCart = {
ajaxCart.updateCart(jsonData);

//reactive the button when adding has finished
if (addedFromProductPage)
if (addedFromProductPage) {
$('#add_to_cart button').removeAttr('disabled').removeClass('disabled');
if (!jsonData.hasError || jsonData.hasError==false) {
$('#add_to_cart button').addClass('added');
}
else {
$('#add_to_cart button').removeClass('added');
}
}
else
$('.ajax_add_to_cart_button').removeAttr('disabled');
},
Expand Down
4 changes: 2 additions & 2 deletions themes/default-bootstrap/js/product.js
Expand Up @@ -545,8 +545,8 @@ $(document).ready(function()
{
$('#bigpic').attr('rel', $('#bigpic').attr('src').replace('large', 'thickbox'));
$('img.jqzoom').jqueryzoom({
xzoom: 200, //zooming div default width(default width value is 200)
yzoom: 200, //zooming div default width(default height value is 200)
xzoom: 600, //zooming div default width(default width value is 200)
yzoom: 600, //zooming div default width(default height value is 200)
offset: 21 //zooming div default offset(default offset value is 10)
//position: "right" //zooming div position(default position value is "right")
});
Expand Down
29 changes: 0 additions & 29 deletions themes/default-bootstrap/order-address-multishipping.tpl
Expand Up @@ -30,35 +30,6 @@
{assign var="back_order_page" value="order.php"}
{/if}

{* Will be deleted for 1.5 version and more *}
{if !isset($formatedAddressFieldsValuesList)}
{$ignoreList.0 = "id_address"}
{$ignoreList.1 = "id_country"}
{$ignoreList.2 = "id_state"}
{$ignoreList.3 = "id_customer"}
{$ignoreList.4 = "id_manufacturer"}
{$ignoreList.5 = "id_supplier"}
{$ignoreList.6 = "date_add"}
{$ignoreList.7 = "date_upd"}
{$ignoreList.8 = "active"}
{$ignoreList.9 = "deleted"}

{* PrestaShop 1.4.0.17 compatibility *}
{if isset($addresses)}
{foreach from=$addresses key=k item=address}
{counter start=0 skip=1 assign=address_key_number}
{$id_address = $address.id_address}
{foreach from=$address key=address_key item=address_content}
{if !in_array($address_key, $ignoreList)}
{$formatedAddressFieldsValuesList.$id_address.ordered_fields.$address_key_number = $address_key}
{$formatedAddressFieldsValuesList.$id_address.formated_fields_values.$address_key = $address_content}
{counter}
{/if}
{/foreach}
{/foreach}
{/if}
{/if}

<script type="text/javascript">
// <![CDATA[
{if !$opc}
Expand Down
34 changes: 0 additions & 34 deletions themes/default-bootstrap/order-address.tpl
Expand Up @@ -29,40 +29,6 @@
{assign var="back_order_page" value="order.php"}
{/if}

{*
** Retro compatibility for PrestaShop version < 1.4.2.5 with a recent theme
** Syntax smarty for v2
*}

{* Will be deleted for 1.5 version and more *}
{if !isset($formatedAddressFieldsValuesList)}
{$ignoreList.0 = "id_address"}
{$ignoreList.1 = "id_country"}
{$ignoreList.2 = "id_state"}
{$ignoreList.3 = "id_customer"}
{$ignoreList.4 = "id_manufacturer"}
{$ignoreList.5 = "id_supplier"}
{$ignoreList.6 = "date_add"}
{$ignoreList.7 = "date_upd"}
{$ignoreList.8 = "active"}
{$ignoreList.9 = "deleted"}

{* PrestaShop 1.4.0.17 compatibility *}
{if isset($addresses)}
{foreach from=$addresses key=k item=address}
{counter start=0 skip=1 assign=address_key_number}
{$id_address = $address.id_address}
{foreach from=$address key=address_key item=address_content}
{if !in_array($address_key, $ignoreList)}
{$formatedAddressFieldsValuesList.$id_address.ordered_fields.$address_key_number = $address_key}
{$formatedAddressFieldsValuesList.$id_address.formated_fields_values.$address_key = $address_content}
{counter}
{/if}
{/foreach}
{/foreach}
{/if}
{/if}

<script type="text/javascript">
// <![CDATA[
{if !$opc}
Expand Down
71 changes: 71 additions & 0 deletions themes/default-bootstrap/sass/global.scss
Expand Up @@ -2230,6 +2230,70 @@ a.price_discount_delete {
}
}
}
@media (max-width: 767px) {
#order-detail-content{
#cart_summary{
table, thead, tbody, th, td, tr{display: block;}
thead tr{
position: absolute;
top: -9999px;
left: -9999px;
}
tr{
border-bottom: 1px solid #ccc;
overflow: hidden;
}
td{
border: none;
position: relative;
width: 50%;
float: left;
white-space: normal;
&.cart_product{}
&.cart_description{}
&.cart_avail{clear: both;}
&.cart_unit{}
&.cart_quantity{
clear: both;
padding: 9px 8px 11px 18px;
}
&.cart_total{}
&.cart_delete{
width: 100%;
clear: both;
text-align: right;
&:before{
display: inline-block;
padding-right: 0.5em;
position: relative;
top: -3px;
}
div{display: inline;}
}
}
td:before {
content: attr(data-title);
display: block;
}
tfoot{
td{
float: none;
width: 100%;
&:before{
display: inline;
}
}
tr{
.text-right, .price{
display: block;
float: left;
width: 50%;
}
}
}
}
}
}
.cart_voucher {
vertical-align:top !important;
h4 {
Expand Down Expand Up @@ -3201,4 +3265,11 @@ div.star.star_hover {
#facebook_block, #cmsinfo_block {
height:344px;
}
}

/************************* Zoom ******************************/
@media (max-width: $screen-md-max) { // max 1199px
.zoomdiv {
display:none !important;
}
}
13 changes: 11 additions & 2 deletions themes/default-bootstrap/sass/product.scss
Expand Up @@ -555,9 +555,18 @@ padding:18px 19px 12px;
}

}
&.disabled {
&.added {
&:before {
content:"";
content:"";
}
}
&.added.disabled, &.disabled {
&:before {
content:"";
animation:2s linear 0s normal none infinite spin;
-webkit-animation:2s linear 0s normal none infinite spin;
-moz-animation:2s linear 0s normal none infinite spin;
border:none;
}
}

Expand Down

0 comments on commit cbc79c6

Please sign in to comment.