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

This commit is contained in:
Kevin Granger
2013-11-20 16:20:56 +01:00
8 changed files with 78 additions and 54 deletions
@@ -37,24 +37,26 @@
<div class="defaultForm">
<div class="panel">
{l s='Carrier name:'} <strong id="summary_name"></strong>
<div id="summary_meta_informations"></div>
<div id="summary_shipping_cost"></div>
<div id="summary_range"></div>
<div>
<div class="panel-heading">{l s='Carrier name:'} <strong id="summary_name"></strong></div>
<div class="panel-body">
<p id="summary_meta_informations"></p>
<p id="summary_shipping_cost"></p>
<p id="summary_range"></p>
<div>
{l s='This carrier will be proposed for those delivery zones:'}
<ul id="summary_zones"></ul>
<ul id="summary_zones"></ul>
</div>
<div>
{l s='And it will be proposed for those client groups:'}
<ul id="summary_groups"></ul>
</div>
{if $is_multishop}
<div>
{l s='Finally, this carrier will be proposed in those shops:'}
<ul id="summary_shops"></ul>
</div>
{/if}
</div>
<div>
{l s='And it will be proposed for those client groups:'}
<ul id="summary_groups"></ul>
</div>
{if $is_multishop}
<div>
{l s='Finally, this carrier will be proposed in those shops:'}
<ul id="summary_shops"></ul>
</div>
{/if}
{$active_form}
</div>
{$active_form}
</div>
@@ -32,7 +32,9 @@
var errorMail = "{l s='This email address is not valid' js=1}";
$(document).ready(function() {
if ($('input[name=PS_MAIL_METHOD]:checked').val() == 2)
$('#smtp').show();
$('#configuration_fieldset_smtp').show();
else
$('#configuration_fieldset_smtp').hide();
});
</script>
<script type="text/javascript" src="../js/sendMailTest.js"></script>
@@ -201,11 +201,11 @@
</p>
</div>
</div>
<div class="form-group">
<label for="match_ref" class="control-label col-lg-3" style="display: none">{l s='Use product reference as key?'}</label>
<div class="form-group" style="display: none">
<label for="match_ref" class="control-label col-lg-3">{l s='Use product reference as key?'}</label>
<div class="col-lg-6">
<p class="checkbox">
<input name="match_ref" id="match_ref" type="checkbox" style="display:none"/>
<input name="match_ref" id="match_ref" type="checkbox" />
</p>
</div>
</div>
@@ -228,22 +228,22 @@
</div>
</div>
<div class="form-group">
<label for="match_ref" class="control-label col-lg-3" style="display: none">{l s='Use product reference as key?'}</label>
<div class="col-lg-6">
<input type="submit" name="submitImportFile" value="{l s='Next step'}" class="btn btn-default" {if empty($files_to_import)}disabled{/if}/>
<div class="col-lg-6 col-lg-push-3">
<input type="submit" name="submitImportFile" id="submitImportFile" value="{l s='Next step'}" class="btn btn-default" {if empty($files_to_import)}disabled{/if}/>
</div>
</div>
{if empty($files_to_import)}
<div class="alert alert-info">{l s='You must upload a file in order to proceed to the next step'}</div>
{/if}
{if empty($files_to_import)}
<div class="alert alert-info">{l s='You must upload a file in order to proceed to the next step'}</div>
{/if}
<div class="alert alert-warning import_products_categories">
<p>{l s='Note that the category import does not support categories of the same name.'}</p>
<p>{l s='Note that you can have several products with the same reference.'}</p>
</div>
<div class="alert alert-warning import_supply_orders_details">
<p>{l s='Importing Supply Order Details will reset products ordered, if there are any.'}</p>
</div>
<div class="alert alert-warning import_products_categories">
<p>{l s='Note that the category import does not support categories of the same name.'}</p>
<p>{l s='Note that you can have several products with the same reference.'}</p>
</div>
<div class="alert alert-warning import_supply_orders_details">
<p>{l s='Importing Supply Order Details will reset products ordered, if there are any.'}</p>
</div>
{if !count($files_to_import)}
<div class="alert alert-warning">
<p>{l s='There is no CSV file available. Please upload one using the \'Upload\' button above.'}</p>
@@ -305,9 +305,9 @@
$('input[name=multiple_value_separator]').val('{if isset($multiple_value_separator_selected)}{$multiple_value_separator_selected}{else},{/if}');
}
if ($("#entity > option:selected").val() == 1)
$("label[for=match_ref], #match_ref").show();
$("#match_ref").closest('.form-group.').show();
else
$("label[for=match_ref], #match_ref").hide();
$("#match_ref").closest('.form-group.').hide();
if ($("#entity > option:selected").val() == 1 || $("#entity > option:selected").val() == 0)
$(".import_products_categories").show();
@@ -316,14 +316,14 @@
if ($("#entity > option:selected").val() == 0 || $("#entity > option:selected").val() == 1 ||
$("#entity > option:selected").val() == 5 || $("#entity > option:selected").val() == 6)
$("label[for=regenerate], #regenerate").show()
$("#regenerate").closest('.form-group.').show();
else
$("label[for=regenerate], #regenerate").hide();
$("#regenerate").closest('.form-group.').hide();
if ($("#entity > option:selected").val() == 0 || $("#entity > option:selected").val() == 1 || $("#entity > option:selected").val() == 3 || $("#entity > option:selected").val() == 5 || $("#entity > option:selected").val() == 6 || $("#entity > option:selected").val() == 7)
$("label[for=forceIDs], #forceIDs").show();
$("#forceIDs").closest('.form-group.').show();
else
$("label[for=forceIDs], #forceIDs").hide();
$("#forceIDs").closest('.form-group.').hide();
$("#entitie").html($("#entity > option:selected").text().toLowerCase());
$.ajax({
url: 'ajax.php',
@@ -179,21 +179,21 @@
</div>
{elseif $field['type'] == 'text'}
<div class="col-lg-9 {if isset($field['suffix'])}input-group{/if}">
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if}/>
{if isset($field['suffix'])}
<span class="input-group-addon">
{$field['suffix']|strval}
</span>
{/if}
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if}/>
</div>
{elseif $field['type'] == 'password'}
<div class="col-lg-9 {if isset($field['suffix'])}input-group{/if}">
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if} />
{if isset($field['suffix'])}
<span class="input-group-addon">
{$field['suffix']|strval}
</span>
{/if}
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if} />
</div>
{elseif $field['type'] == 'textarea'}
<div class="col-lg-9">
@@ -235,7 +235,9 @@
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<!-- name -->
{foreach $languages as $language}
{if $language.id_lang == $id_lang}{$language.iso_code}{/if}
{/foreach}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
@@ -263,7 +265,9 @@
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<!-- name -->
{foreach $languages as $language}
{if $language.id_lang == $id_lang}{$language.iso_code}{/if}
{/foreach}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
@@ -116,6 +116,7 @@ class AdminCmsContentControllerCore extends AdminController
public function renderPageHeaderToolbar()
{
$id_cms_category = (int)Tools::getValue('id_cms_category');
$id_cms_page = Tools::getValue('id_cms');
if (!$id_cms_category)
$id_cms_category = 1;
@@ -124,7 +125,24 @@ class AdminCmsContentControllerCore extends AdminController
$this->toolbar_title[] = 'CMS';
if ($this->display == 'edit_category')
$this->toolbar_title[] = sprintf($this->l('Edit: %s'), $cms_category->name[$this->context->employee->id_lang]);
{
if (Tools::getValue('addcms_category') !== false)
$this->toolbar_title[] =$this->l('Add new');
else
$this->toolbar_title[] = sprintf($this->l('Edit: %s'), $cms_category->name[$this->context->employee->id_lang]);
}
elseif ($this->display == 'edit_page')
{
$this->toolbar_title[] = $cms_category->name[$this->context->employee->id_lang];
if (Tools::getValue('addcms') !== false)
$this->toolbar_title[] = $this->l('Add new');
elseif ($id_cms_page)
{
$cms_page = new CMS($id_cms_page);
$this->toolbar_title[] = sprintf($this->l('Edit: %s'), $cms_page->meta_title[$this->context->employee->id_lang]);
}
}
else
$this->toolbar_title[] = $cms_category->name[$this->context->employee->id_lang];
+3 -5
View File
@@ -62,9 +62,9 @@ class AdminEmailsControllerCore extends AdminController
2 => $this->l('Set my own SMTP parameters. For advanced users ONLY')
),
'js' => array(
1 => 'onclick="$(\'#smtp\').slideUp();"',
2 => 'onclick="$(\'#smtp\').slideDown();"',
3 => 'onclick="$(\'#smtp\').slideUp();"'
1 => 'onclick="$(\'#configuration_fieldset_smtp\').slideUp();"',
2 => 'onclick="$(\'#configuration_fieldset_smtp\').slideDown();"',
3 => 'onclick="$(\'#configuration_fieldset_smtp\').slideUp();"'
),
'visibility' => Shop::CONTEXT_ALL
),
@@ -79,8 +79,6 @@ class AdminEmailsControllerCore extends AdminController
),
'smtp' => array(
'title' => $this->l('Email'),
'top' => '<div id="smtp" style="display: '.((Configuration::get('PS_MAIL_METHOD') == 2) ? 'block' : 'none').';">',
'bottom' => '</div>',
'fields' => array(
'PS_MAIL_DOMAIN' => array(
'title' => $this->l('Mail domain name:'),
+2 -2
View File
@@ -175,14 +175,14 @@ function displaySummary()
$('#summary_zones').html('');
$('.input_zone').each(function(){
if ($(this).attr('checked'))
$('#summary_zones').html($('#summary_zones').html() + '<li><strong>' + $(this).closest().prev().text() + '</strong></li>');
$('#summary_zones').html($('#summary_zones').html() + '<li><strong>' + $(this).closest('tr').find('label').text() + '</strong></li>');
});
// Group restrictions
$('#summary_groups').html('');
$('input[name$="groupBox[]"]').each(function(){
if ($(this).attr('checked'))
$('#summary_groups').html($('#summary_groups').html() + '<li><strong>' + $(this).closest().next().next().text() + '</strong></li>');
$('#summary_groups').html($('#summary_groups').html() + '<li><strong>' + $(this).closest('tr').find('td:eq(2)').text() + '</strong></li>');
});
// shop restrictions
+1 -1
View File
@@ -76,7 +76,7 @@ function verifyMail(testMsg, testSubject)
else
{
mailIsOk = false;
$("#mailResultCheck").addClass("alert-success").removeClass("alert-danger").removeClass('userInfos').html(textSendError + '<br />' + ret);
$("#mailResultCheck").addClass("alert-danger").removeClass("alert-success").removeClass('userInfos').html(textSendError + '<br />' + ret);
}
}
}