Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap
This commit is contained in:
@@ -13,7 +13,7 @@ Tree.prototype =
|
||||
{
|
||||
var that = $(this);
|
||||
|
||||
this.$element.find("label.tree-toggler").click(
|
||||
this.$element.find("label.tree-toggler, .icon-folder-close, .icon-folder-open").click(
|
||||
function ()
|
||||
{
|
||||
if ($(this).parent().parent().children("ul.tree").is(":visible"))
|
||||
|
||||
@@ -132,11 +132,11 @@
|
||||
<section class="dash_simulation panel">
|
||||
<h3><i class="icon-link"></i> {l s="Simulation Mode"}</h3>
|
||||
<span class="switch prestashop-switch">
|
||||
<input id="PS_DASHBOARD_SIMULATION_on" class="ps_dashboard_simulation" type="radio" checked="checked" value="1" name="PS_DASHBOARD_SIMULATION">
|
||||
<input id="PS_DASHBOARD_SIMULATION_on" class="ps_dashboard_simulation" type="radio" {if $PS_DASHBOARD_SIMULATION == 1}checked="checked"{/if} value="1" name="PS_DASHBOARD_SIMULATION">
|
||||
<label class="radioCheck" for="PS_DASHBOARD_SIMULATION_on">
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes'}
|
||||
</label>
|
||||
<input id="PS_DASHBOARD_SIMULATION_off" class="ps_dashboard_simulation" type="radio" value="0" name="PS_DASHBOARD_SIMULATION">
|
||||
<input id="PS_DASHBOARD_SIMULATION_off" class="ps_dashboard_simulation" type="radio" {if $PS_DASHBOARD_SIMULATION == 0}checked="checked"{/if} value="0" name="PS_DASHBOARD_SIMULATION">
|
||||
<label class="radioCheck" for="PS_DASHBOARD_SIMULATION_off">
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No'}
|
||||
</label>
|
||||
|
||||
@@ -146,6 +146,9 @@
|
||||
// if the tab has not already been loaded, load it now
|
||||
tabs_manager.display(id, true);
|
||||
|
||||
if (btn_name == 'Associations')
|
||||
handleSaveButtons();
|
||||
|
||||
tabs_manager.onLoad(id, function(){
|
||||
$("#product-tab-content-"+id).show(0, function(){
|
||||
$(this).trigger('displayed');
|
||||
@@ -169,7 +172,8 @@
|
||||
{
|
||||
$('#desc-product-newCombination').hide();
|
||||
// if pack is enabled, save button are visible only if pack is valid
|
||||
handleSaveButtons();
|
||||
if (btn_name != 'Informations')
|
||||
handleSaveButtons();
|
||||
}
|
||||
hideOtherLanguage(default_language);
|
||||
$('.label-tooltip').tooltip();
|
||||
@@ -181,10 +185,6 @@
|
||||
if ($('#product-tab-content-Associations').hasClass('not-loaded'))
|
||||
disableSave();
|
||||
|
||||
tabs_manager.onLoad('Associations', function(){
|
||||
handleSaveButtons();
|
||||
});
|
||||
|
||||
$('.confirm_leave').live('click', function(){
|
||||
// Double quotes are necessary when the translated string has single quotes
|
||||
return confirm("{l s='You will lose all unsaved modifications. Are you sure that you\'d like to proceed?' js=1}");
|
||||
|
||||
+40
@@ -38,6 +38,14 @@
|
||||
function()
|
||||
{
|
||||
$(this).prop("checked", true);
|
||||
|
||||
$('select#id_category_default').append('<option value="'+$(this).val()+'">'+($(this).val() !=1 ? $(this).parent().find('label').html() : home)+'</option>');
|
||||
if ($('select#id_category_default option').length > 0)
|
||||
{
|
||||
$('select#id_category_default').closest('.form-group').show();
|
||||
$('#no_default_category').hide();
|
||||
}
|
||||
|
||||
$(this).parent().addClass("tree-selected");
|
||||
}
|
||||
);
|
||||
@@ -49,6 +57,14 @@
|
||||
function()
|
||||
{
|
||||
$(this).prop("checked", false);
|
||||
|
||||
$('select#id_category_default option[value='+$(this).val()+']').remove();
|
||||
if ($('select#id_category_default option').length == 0)
|
||||
{
|
||||
$('select#id_category_default').closest('.form-group').hide();
|
||||
$('#no_default_category').show();
|
||||
}
|
||||
|
||||
$(this).parent().removeClass("tree-selected");
|
||||
}
|
||||
);
|
||||
@@ -112,5 +128,29 @@
|
||||
}
|
||||
);
|
||||
{/if}
|
||||
|
||||
$("#{$id}").find(":input[type=checkbox]").click(
|
||||
function()
|
||||
{
|
||||
if ($(this).prop("checked"))
|
||||
{
|
||||
$('select#id_category_default').append('<option value="'+$(this).val()+'">'+($(this).val() !=1 ? $(this).parent().find('label').html() : home)+'</option>');
|
||||
if ($('select#id_category_default option').length > 0)
|
||||
{
|
||||
$('select#id_category_default').closest('.form-group').show();
|
||||
$('#no_default_category').hide();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$('select#id_category_default option[value='+$(this).val()+']').remove();
|
||||
if ($('select#id_category_default option').length == 0)
|
||||
{
|
||||
$('select#id_category_default').closest('.form-group').hide();
|
||||
$('#no_default_category').show();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
@@ -57,7 +57,7 @@
|
||||
},
|
||||
function(res)
|
||||
{
|
||||
$('#categories-treeview').parent().html(res);
|
||||
$('#categories-tree').parent().parent().html(res);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
* 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="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>
|
||||
<span class="tree-item-name{if isset($node['disabled']) && $node['disabled'] == true} tree-item-name-disable{/if}">
|
||||
<input type="checkbox" name="categoryBox[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
<i class="tree-dot"></i>
|
||||
<label class="tree-toggler">{$node['name']}</label>
|
||||
</span>
|
||||
</li>
|
||||
Reference in New Issue
Block a user