Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap

This commit is contained in:
Vincent Augagneur
2013-09-12 10:08:32 +02:00
36 changed files with 882 additions and 440 deletions
File diff suppressed because one or more lines are too long
+29 -22
View File
@@ -1,5 +1,5 @@
//$brand-primary: #1BA6E5
$brand-primary: #6992AF
//light
//$main-color: #F7F7F7
@@ -8,13 +8,15 @@ $brand-primary: #6992AF
//$main-color: #E0E0E0 //gris
//$main-color: #D7D6DE //violet
//$main-color: #F1F8FE //theme wordpress
//dark
//$main-color: #272A31 //bleu PrestaShop
//$main-color: #3D3D3D //gris
//$main-color: #515561 //gris bleu clair
$main-color: #515561 //gris bleu clair
//$main-color: #4D4645 //taupe
//$main-color: #272822 //gris vert
$main-color: #313A45 //gris bleu
//$main-color: #313A45 //gris bleu
//$main-color: #7B8676
//$main-color: #443A42 //violet
//$main-color: #373E35 //vert camo
//$main-color: #262C3F //bleu nuit - pretty sure that a girl could do better naming the colors, sorry about that...
@@ -30,14 +32,17 @@ $main-color: #313A45 //gris bleu
//$secondary-color: #4691D2 //bleu ciel
//$secondary-color: #814C76 //violet
//$secondary-color: #FE635F //saumon
//$secondary-color: #F8235A //rose
//$secondary-color: #FFB4B8 //rose
//$secondary-color: #F2B100 //moutarde
//$secondary-color: #F7854E //abricot
//$secondary-color: #F6A88A //abricot
//$secondary-color: #937976 //taupe clair
//$secondary-color: #60C276 //vert
//$secondary-color: #9DC44B //vert pomme
$secondary-color: #6992AF //theme wordpress
//$secondary-color: #6992AF //theme wordpress
//$secondary-color: #8BC954 //vert PrestaShop
$secondary-color: #AB7073
$brand-primary: #89AFE5
//some tests
//$secondary-color: #79C09D
@@ -68,7 +73,7 @@ $bg-page-head-color : $secondary-color
$bg-panel-heading-color: hsl(hue($secondary-color), 10, 90)
//others
$badge-notif-color: #EF1778
$badge-notif-color: #8BC954
$icon-color: #87C795
@import "compass"
@@ -150,7 +155,7 @@ html, body
background-image: url('../img/patterns/bedge_grunge.png') // texture
#content
padding: 90px 20px 0
padding: 80px 20px 0
margin-left: 240px
@include transition-property(margin)
@include transition-duration(0.4s)
@@ -356,21 +361,21 @@ html, body
text-decoration: none
&:last-child a
border-bottom: none
&.active
a
&.active a
color: contrast-color($brand-primary, white, #333, 10%)
background-color: $brand-primary
border-bottom: solid 1px darken($brand-primary,10%)
#nav-topbar
position: fixed
height: 28px
top: 36px
top: 35px
left: 80
width: 100%
z-index: 600
background-color: white
border-top: black solid 1px
border-bottom: black solid 1px
border-bottom: darken($secondary-color,20%) solid 1px
ul.menu
height: 28px
margin: 0
@@ -415,12 +420,12 @@ html, body
ul.submenu
display: none!important
@include box-shadow(rgba(black,0.3) 0 2px 4px)
> ul.menu > li
ul.submenu.expanded
> ul.menu > li.expanded
ul.submenu
display: block!important
> ul.menu > li
ul.submenu
display: none
display: none!important
position: absolute
margin: 0
padding: 0
@@ -445,9 +450,9 @@ html, body
&:last-child a
border-bottom: none
&.active a
color: contrast-color($main-color, white, #333, 10%)
background-color: $main-color
border-bottom: solid 1px darken($main-color,10%)
color: contrast-color($brand-primary, white, #333, 10%)
background-color: $brand-primary
border-bottom: solid 1px darken($brand-primary,10%)
.page-topbar
#main
@@ -455,7 +460,7 @@ html, body
#nav-sidebar
display: none
.page-head
top: 64px
top: 63px
#content
margin-left: 0
width: 100%
@@ -1262,6 +1267,11 @@ fieldset > .row
margin: 0 4px 0 6px
background-color: #ccc
+border-radius(6px)
.tree-item-disable, .tree-folder-name-disable
color: #ccc
&:hover
color: #ccc
background-color: none
#carrier_wizard
position: relative
@@ -1405,6 +1415,3 @@ fieldset > .row
width: auto
.field_error
border-color: $brand-danger
+76 -34
View File
@@ -25,42 +25,84 @@
$( document ).ready(function() {
//nav side bar
$('#nav-sidebar li.maintab.has_submenu').append('<span class="submenu_expand"></span>');
$('#nav-sidebar .submenu_expand').click(function(){
var $navId = $(this).parent();
$(".submenu-collapse").remove();
if($(".expanded").length ){
$(".expanded > ul").slideUp(
"fast",
function(){
var $target = $(".expanded");
$target.removeClass("expanded");
$($navId).not($target).not(".active").addClass("expanded");
$($navId).not($target).not(".active").children("ul:first").hide().slideDown();
}
);
}
else {
$($navId).not(".active").addClass("expanded");
$($navId).not(".active").children("ul:first").hide().slideDown();
}
});
//nav top bar
$(window).on("resize", function() {
$("#nav-topbar ul.menu").find("li.maintab").each(function(){
if ($(this).position().top > 0) {
$(this).addClass("hide");
function navSidebar(){
$('#nav-sidebar li.maintab.has_submenu').append('<span class="submenu_expand"></span>');
$('#nav-sidebar .submenu_expand').on('click',function(){
var $navId = $(this).parent();
$('.submenu-collapse').remove();
if($('.expanded').length ){
$('.expanded > ul').slideUp(
'fast',
function(){
var $target = $('.expanded');
$target.removeClass('expanded');
$($navId).not($target).not('.active').addClass('expanded');
$($navId).not($target).not('.active').children('ul:first').hide().slideDown();
}
);
}
else {
$($navId).not('.active').addClass('expanded');
$($navId).not('.active').children('ul:first').hide().slideDown();
}
});
});
$("#nav-topbar li.maintab.has_submenu").hover(function(){
$(this).find("ul.submenu").fadeIn("fast").addClass("expanded");
}, function(){
//$(this).removeClass("expanded");
$(this).find("ul.submenu").fadeOut("fast").removeClass("expanded");
});
}
//nav top bar
function navTopbar(){
$('.expanded').removeClass('expanded');
$('#nav-topbar').on('mouseenter', 'li.maintab.has_submenu',
function(){
$(this).addClass('expanded');
});
$('#nav-topbar').on('mouseleave', 'li.maintab.has_submenu',
function(){
$(this).removeClass('expanded');
});
//todo hide element over menu width on load
$('#nav-topbar').find('li.maintab').each(
function(){
if ($(this).position().top > 0) {
$(this).addClass('hide');
}
});
//todo hide element over menu width on resize
$(window).on('resize', function() {
$('#nav-topbar ul.menu').find('li.maintab').each(function(){
if ($(this).position().top > 0) {
$(this).addClass('hide');
}
});
});
}
//nav switch
function navSwitch(){
if ($('body').hasClass('page-sidebar')||$('body').hasClass('page-sidebar-closed')) {
$('body').removeClass('page-sidebar').removeClass('page-sidebar-closed').addClass('page-topbar');
$('#nav-sidebar').attr('id','nav-topbar');
$('#nav-topbar').off();
navTopbar();
} else {
$('body.page-topbar').removeClass('page-topbar').addClass('page-sidebar');
$('#nav-topbar').attr('id','nav-sidebar');
$('#nav-sidebar').off();
navSidebar();
}
}
//todo add condition
navTopbar();
$('#header_shopname').on('click',
function(e){
e.preventDefault();
navSwitch();
}
);
//tooltip
$('.label-tooltip').tooltip();
@@ -0,0 +1,108 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel">
{if isset($header)}{$header}{/if}
{if isset($nodes)}
<ul id="{$id}" class="tree">
{$nodes}
</ul>
{/if}
</div>
<script type="text/javascript">
{if isset($use_checkbox) && $use_checkbox == true}
function checkAllAssociatedCategories($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
}
);
}
function uncheckAllAssociatedCategories($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", false);
$(this).parent().removeClass("tree-selected");
}
);
}
{/if}
{if isset($use_search) && $use_search == true}
$("#{$id}-categories-search").bind("typeahead:selected", function(obj, datum) {
$("#{$id}").find(":input").each(
function()
{
if ($(this).val() == datum.id_category)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
});
{/if}
$(document).ready(function () {
$("#{$id}").tree("collapseAll");
{if isset($selected_categories)}
{assign var=imploded_selected_categories value='","'|implode:$selected_categories}
var selected_categories = new Array("{$imploded_selected_categories}");
$("#{$id}").find(":input").each(
function()
{
if ($.inArray($(this).val(), selected_categories) != -1)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
{/if}
});
</script>
@@ -0,0 +1,34 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-folder">
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
<input type="radio" name="id_parent" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="icon-folder-close"></i>
<label class="tree-toggler ">{$node['name']}</label>
</span>
<ul class="tree">
{$children}
</ul>
</li>
@@ -0,0 +1,31 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<label class="tree-item-name">
<input type="radio" name="id_parent" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i>
{$node['name']}
<label>
</li>
@@ -1,27 +0,0 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$link}"{if isset($action)}onclick="{$action}"{/if} class="btn btn-default btn-xs">
{if isset($icon_class)}<i class="{$icon_class}"></i>&nbsp;{/if}{l s=$label}
</a>
@@ -1,39 +0,0 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<label for="node-search">{l s=$label}</label>&nbsp;<input type="text"{if isset($id)} id="{$id}"{/if}{if isset($name)} name="{$name}"{/if}{if isset($class)} class="{$class}"{/if} />
{if isset($typeahead_source) && isset($id)}
<script type="text/javascript">
$(document).ready(
function()
{
$("#{$id}").typeahead(
{
name: "{$name}",
local: [{$typeahead_source}]
});
}
);
</script>
{/if}
+1 -2
View File
@@ -289,8 +289,7 @@
<div id="main">
{include file='nav-top.tpl'}
{include file='nav-side.tpl'}
<div id="content" class="page-content">
{if $display_header && $install_dir_exists}
<div class="alert alert-warning">
@@ -158,7 +158,19 @@
{if isset($input.disabled) && $input.disabled}disabled="disabled"{/if}
{if isset($input.autocomplete) && !$input.autocomplete}autocomplete="off"{/if} />
{if isset($input.suffix)}{$input.suffix}{/if}
{if !empty($input.desc)}<div class="alert alert-info">{$input.desc}</div>{/if}
{if !empty($input.desc)}
<div class="alert alert-info">
{if is_array($input.desc)}
<ul>
{foreach $input.desc as $desc}
<li>{$desc}</li>
{/foreach}
</ul>
{else}
{$input.desc}
{/if}
</div>
{/if}
{/if}
{elseif $input.type == 'select'}
{if isset($input.options.query) && !$input.options.query && isset($input.empty_message)}
@@ -405,7 +417,7 @@
{elseif $input.type == 'shop'}
{$input.html}
{elseif $input.type == 'categories'}
{include file='helpers/form/form_category.tpl' categories=$input.values}
{$categories_tree}
{elseif $input.type == 'categories_select'}
{$input.category_tree}
{elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop}
@@ -0,0 +1,116 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel">
{if isset($header)}{$header}{/if}
{if isset($nodes)}
<ul id="{$id}" class="tree">
{$nodes}
</ul>
{/if}
</div>
<script type="text/javascript">
{if isset($use_checkbox) && $use_checkbox == true}
function checkAllAssociatedCategories($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
}
);
}
function uncheckAllAssociatedCategories($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", false);
$(this).parent().removeClass("tree-selected");
}
);
}
{/if}
{if isset($use_search) && $use_search == true}
$("#{$id}-categories-search").bind("typeahead:selected", function(obj, datum) {
$("#{$id}").find(":input").each(
function()
{
if ($(this).val() == datum.id_category)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
});
{/if}
$(document).ready(function () {
$("#{$id}").tree("collapseAll");
$("#{$id}").find(":input[type=radio]").click(
function()
{
location.href = location.href.replace(
/&id_category=[0-9]*/, "")+"&id_category="
+$(this).val();
}
);
{if isset($selected_categories)}
{assign var=imploded_selected_categories value='","'|implode:$selected_categories}
var selected_categories = new Array("{$imploded_selected_categories}");
$("#{$id}").find(":input").each(
function()
{
if ($.inArray($(this).val(), selected_categories) != -1)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
{/if}
});
</script>
@@ -22,7 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-folder">
<span class="tree-folder-name">
<i class="icon-folder-close"></i>
@@ -23,8 +23,8 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-folder">
<span class="tree-folder-name">
<input type="checkbox" name="categoryBox[]" value="{$node['id_category']}" />
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
<input type="checkbox" name="categoryBox[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="icon-folder-close"></i>
<label class="tree-toggler">{$node['name']}</label>
</span>
@@ -23,8 +23,8 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-folder">
<span class="tree-folder-name">
<input type="radio" name="id-category" value="{$node['id_category']}" />
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
<input type="radio" name="id-category" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="icon-folder-close"></i>
<label class="tree-toggler ">{$node['name']}</label>
</span>
@@ -22,9 +22,9 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-item">
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<label class="tree-item-name">
<input type="checkbox" name="categoryBox[]" value="{$node['id_category']}" />
<input type="checkbox" name="categoryBox[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i>
{$node['name']}
</label>
@@ -22,9 +22,9 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-item">
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<label class="tree-item-name">
<input type="radio" name="id-category" value="{$node['id_category']}" />
<input type="radio" name="id-category" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i>
{$node['name']}
<label>
@@ -1,4 +1,4 @@
<nav id="nav-topbar" data-spy="affix" data-offset-top="34px" role="navigation">
<nav id="nav-topbar" data-spy="affix" data-offset-top="0" role="navigation">
{if !$tab}
<div class="mainsubtablist" style="display:none"></div>
{/if}