// some work on style sheets

This commit is contained in:
Kevin Granger
2013-07-18 18:51:24 +02:00
parent 02921dc9d0
commit 0b4512dbcb
1654 changed files with 171753 additions and 294 deletions
@@ -65,13 +65,11 @@
{block name="defaultForm"}
<div class="row-fluid">
<div class="productTabs col-lg-2">
<ul class="tab nav nav-pills nav-stacked">
<div class="list-group">
{foreach $product_tabs key=numStep item=tab}
<li class="tab-row {if $tab.selected}active{/if}">
<a class="tab-page" id="link-{$tab.id}" href="{$tab.href}&amp;updateproduct">{$tab.name}</a>
</li>
<a class="list-group-item {if $tab.selected}active{/if}" id="link-{$tab.id}" href="{$tab.href}&amp;updateproduct">{$tab.name}</a>
{/foreach}
</ul>
</div>
</div>
<script type="text/javascript">
@@ -111,17 +109,17 @@
if (product_type == product_type_pack)
{
$('li.tab-row a[id*="VirtualProduct"]').hide();
$('a[id*="VirtualProduct"]').hide();
}
else if (product_type == product_type_virtual)
{
$('li.tab-row a[id*="Pack"]').hide();
$('li.tab-row a[id*="Shipping"]').hide();
$('a[id*="Pack"]').hide();
$('a[id*="Shipping"]').hide();
}
else
{
$('li.tab-row a[id*="Pack"]').hide();
$('li.tab-row a[id*="VirtualProduct"]').hide();
$('a[id*="Pack"]').hide();
$('a[id*="VirtualProduct"]').hide();
}
$('#desc-product-newCombination').hide();
@@ -131,7 +129,7 @@
e.preventDefault();
// currentId is the current product tab id
currentId = $(".productTabs .tab-row.active a").attr('id').substr(5);
currentId = $(".productTabs a.active").attr('id').substr(5);
//console.log(currentId);
// id is the wanted producttab id
id = $(this).attr('id').substr(5);
@@ -142,9 +140,9 @@
$('#key_tab').val(btn_name);
if ($(this).attr("id") != $(".productTabs .tab-row.active a").attr('id'))
if ($(this).attr("id") != $(".productTabs a.active ").attr('id'))
{
$(".productTabs .tab-row").removeClass('active');
$(".productTabs a").removeClass('active');
$("#product-tab-content-"+currentId).hide();
}
@@ -156,7 +154,7 @@
$(this).trigger('displayed');
//console.log('show tab'+id);
});
$("#link-"+id).parent().addClass('active');
$("#link-"+id).addClass('active');
});
var languages = new Array();
@@ -180,7 +178,7 @@
$('.label-tooltip').tooltip();
});
$(".productTabs .tab-row.active").click();
$(".productTabs a.active").click();
// disable save if Associations tab is not loaded
if ($('#product-tab-content-Associations').hasClass('not-loaded'))
@@ -244,23 +242,24 @@
{if !$product->active && $product->isAssociatedToShop()}
<div class="alert draft" >
<p>
<span style="float: left">
<span >
{l s='Your product will be saved as a draft.'}</span>
<span style="float:right"><a href="#" class="button" style="display: block" onclick="submitAddProductAndPreview()" >{l s='Save and preview.'}</a></span>
<input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" />
<br />
</p>
</div>
{/if}
{* all input are here *}
<div class="row">
{foreach $product_tabs key=numStep item=tab}
<div id="product-tab-content-{$tab.id}" class="{if !$tab.selected}not-loaded{/if} product-tab-content" {if !$tab.selected}style="display:none"{/if}>
<fieldset id="product-tab-content-{$tab.id}" class="{if !$tab.selected}not-loaded{/if} product-tab-content col-lg-12" {if !$tab.selected}style="display:none"{/if}>
{if $tab.selected}
{$custom_form}
{/if}
</div>
</fieldset>
{/foreach}
</div>
<input type="hidden" name="id_product_attribute" id="id_product_attribute" value="0" />
<input type="hidden" name="key_tab" id="key_tab" value="Informations" />
@@ -31,7 +31,7 @@
<span class="badge" id="countImage">{$countImages}</span>
</legend>
<div class="row panel">
<div class="row">
<label class="control-label col-lg-5 file_upload_label">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Format:'} JPG, GIF, PNG. {l s='Filesize:'} {$max_image_size|string_format:"%.2f"} {l s='MB max.'}">
@@ -27,68 +27,69 @@
{else}
{assign var=class_input_ajax value=''}
{/if}
<input type="hidden" name="submitted_tabs[]" value="Informations" />
<legend class="tab">{l s='Info.'}</legend>
<div class="alert alert-info">{l s='Product global information'}</div>
<script type="text/javascript">
{if isset($PS_ALLOW_ACCENTED_CHARS_URL) && $PS_ALLOW_ACCENTED_CHARS_URL}
var PS_ALLOW_ACCENTED_CHARS_URL = 1;
{else}
var PS_ALLOW_ACCENTED_CHARS_URL = 0;
{/if}
{$combinationImagesJs}
{if $check_product_association_ajax}
var search_term = '';
$('document').ready( function() {
$(".check_product_name")
.autocomplete(
'{$link->getAdminLink('AdminProducts', true)|escape:'html'}', {
minChars: 3,
max: 10,
width: $(".check_product_name").width(),
selectFirst: false,
scroll: false,
dataType: "json",
formatItem: function(data, i, max, value, term) {
search_term = term;
// adding the little
if ($('.ac_results').find('.separation').length == 0)
$('.ac_results').css('background-color', '#EFEFEF')
.prepend('<div style="color:#585A69; padding:2px 5px">{l s='Use a product from the list'}<div class="separation"></div></div>');
return value;
},
parse: function(data) {
var mytab = new Array();
for (var i = 0; i < data.length; i++)
mytab[mytab.length] = { data: data[i], value: data[i].name };
return mytab;
},
extraParams: {
ajax: 1,
action: 'checkProductName',
id_lang: {$id_lang}
}
}
)
.result(function(event, data, formatted) {
// keep the searched term in the input
$('#name_{$id_lang}').val(search_term);
jConfirm('{l s='Do you want to use this product?'}&nbsp;<strong>'+data.name+'</strong>', '{l s='Confirmation'}', function(confirm){
if (confirm == true)
document.location.href = '{$link->getAdminLink('AdminProducts', true)}&updateproduct&id_product='+data.id_product;
else
return false;
});
});
});
{/if}
</script>
{if isset($display_common_field) && $display_common_field}
<div class="alert alert-block" style="display: block">{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}</div>
<input type="hidden" name="submitted_tabs[]" value="Informations" />
<legend class="tab">{l s='Info.'}</legend>
<div class="alert alert-info">{l s='Product global information'}</div>
<script type="text/javascript">
{if isset($PS_ALLOW_ACCENTED_CHARS_URL) && $PS_ALLOW_ACCENTED_CHARS_URL}
var PS_ALLOW_ACCENTED_CHARS_URL = 1;
{else}
var PS_ALLOW_ACCENTED_CHARS_URL = 0;
{/if}
{$combinationImagesJs}
{if $check_product_association_ajax}
var search_term = '';
$('document').ready( function() {
$(".check_product_name")
.autocomplete(
'{$link->getAdminLink('AdminProducts', true)|escape:'html'}', {
minChars: 3,
max: 10,
width: $(".check_product_name").width(),
selectFirst: false,
scroll: false,
dataType: "json",
formatItem: function(data, i, max, value, term) {
search_term = term;
// adding the little
if ($('.ac_results').find('.separation').length == 0)
$('.ac_results').css('background-color', '#EFEFEF')
.prepend('<div style="color:#585A69; padding:2px 5px">{l s='Use a product from the list'}<div class="separation"></div></div>');
return value;
},
parse: function(data) {
var mytab = new Array();
for (var i = 0; i < data.length; i++)
mytab[mytab.length] = { data: data[i], value: data[i].name };
return mytab;
},
extraParams: {
ajax: 1,
action: 'checkProductName',
id_lang: {$id_lang}
}
}
)
.result(function(event, data, formatted) {
// keep the searched term in the input
$('#name_{$id_lang}').val(search_term);
jConfirm('{l s='Do you want to use this product?'}&nbsp;<strong>'+data.name+'</strong>', '{l s='Confirmation'}', function(confirm){
if (confirm == true)
document.location.href = '{$link->getAdminLink('AdminProducts', true)}&updateproduct&id_product='+data.id_product;
else
return false;
});
});
});
{/if}
</script>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"}
{if isset($display_common_field) && $display_common_field}
<div class="alert alert-block" style="display: block">{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}</div>
{/if}
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"}
<div id="warn_virtual_combinations" class="alert alert-block" style="display:none">{l s='You cannot use combinations with a virtual product.'}</div>
@@ -194,7 +195,6 @@
</div>
</div>
<div class="row redirect_product_options" style="display:none">
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<label class="control-label col-lg-3">{l s='Redirect:'}</label>
@@ -341,7 +341,6 @@
</div>
<div id="createImageDescription" class="panel" style="display:none">
<div class="row">
<label class="control-label col-lg-3">{l s='Select your image:'}</label>
<div class="col-lg-9">
@@ -357,7 +356,6 @@
</ul>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">{l s='Position:'}</label>
<div class="col-lg-5">
@@ -371,7 +369,6 @@
</p>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">{l s='Select the type of picture:'}</label>
<div class="col-lg-5">
@@ -385,7 +382,6 @@
{/foreach}
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"