//added classes from a to li in carrier wizard

This commit is contained in:
Vincent Augagneur committed 2013-07-03 16:56:19 +02:00
1 parent 943eacdf75
commit 18a6e7839e
2 files changed
+22 -9

No files matched your search

@@ -26,13 +26,26 @@
{extends file="helpers/view/view.tpl"} {extends file="helpers/view/view.tpl"}
{block name="override_tpl"} {block name="override_tpl"}
<script> <script>
cleanClasses = function cleanClasses()
{
$('.anchor li a').each( function () {
$(this).parent('li').addClass($(this).attr('class'));
});
}
$(document).ready(function () { $(document).ready(function () {
$("#carrier_wizard").smartWizard({ $("#carrier_wizard").smartWizard({
'labelNext' : '{$labels.next}', 'labelNext' : '{$labels.next}',
'labelPrevious' : '{$labels.previous}', 'labelPrevious' : '{$labels.previous}',
'labelFinish' : '{$labels.finish}' 'labelFinish' : '{$labels.finish}',
'fixHeight' : true,
'onShowStep' : cleanClasses
}); });
$("#carrier_wizard").smartWizard('fixHeight');
}); });
</script> </script>
<div id="carrier_wizard" class="swMain"> <div id="carrier_wizard" class="swMain">
<ul> <ul>
@@ -49,7 +62,7 @@ $(document).ready(function () {
{/foreach} {/foreach}
</ul> </ul>
{foreach from=$wizard_contents.contents key=step_nbr item=content} {foreach from=$wizard_contents.contents key=step_nbr item=content}
<div id="step-{$step_nbr + 1}"> <div id="step-{$step_nbr + 1}" style="padding-bottom:10px">
{$content} {$content}
</div> </div>
{/foreach} {/foreach}
@@ -116,12 +116,6 @@ class AdminCarrierWizardControllerCore extends AdminController
$this->l('For in-store pickup, enter 0 to replace the carrier name with your shop name.') $this->l('For in-store pickup, enter 0 to replace the carrier name with your shop name.')
) )
), ),
array(
'type' => 'file',
'label' => $this->l('Logo:'),
'name' => 'logo',
'desc' => $this->l('Upload a logo from your computer.').' (.gif, .jpg, .jpeg '.$this->l('or').' .png)'
),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Transit time:'), 'label' => $this->l('Transit time:'),
@@ -140,6 +134,12 @@ class AdminCarrierWizardControllerCore extends AdminController
'size' => 1, 'size' => 1,
'desc' => $this->l('Enter "0" for a longest shipping delay, or "9" for the shortest shipping delay.') 'desc' => $this->l('Enter "0" for a longest shipping delay, or "9" for the shortest shipping delay.')
), ),
array(
'type' => 'file',
'label' => $this->l('Logo:'),
'name' => 'logo',
'desc' => $this->l('Upload a logo from your computer.').' (.gif, .jpg, .jpeg '.$this->l('or').' .png)'
),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('URL:'), 'label' => $this->l('URL:'),
@@ -168,9 +168,9 @@ class AdminCarrierWizardControllerCore extends AdminController
{ {
return array( return array(
'name' => $this->getFieldsValue($carrier, 'name'), 'name' => $this->getFieldsValue($carrier, 'name'),
'logo' => '',
'delay' => $this->getFieldsValue($carrier, 'delay'), 'delay' => $this->getFieldsValue($carrier, 'delay'),
'grade' => $this->getFieldsValue($carrier, 'grade'), 'grade' => $this->getFieldsValue($carrier, 'grade'),
'logo' => '',
'url' => $this->getFieldsValue($carrier, 'url'), 'url' => $this->getFieldsValue($carrier, 'url'),
); );