diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl index 7e397c572..ac8329c7f 100644 --- a/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl @@ -23,6 +23,17 @@ * International Registered Trademark & Property of PrestaShop SA *} +
+ +

+ + +

+

+ {l s='Format:'} JPG, GIF, PNG. {l s='Filesize:'} {$max_image_size|string_format:"%.2f"} {l s='MB max.'} +

+
+ -
- -

- - -

-

- {l s='Format:'} JPG, GIF, PNG. {l s='Filesize:'} {$max_image_size|string_format:"%.2f"} {l s='MB max.'} -

-
\ No newline at end of file + + function fixCarrierLogoDisplay() + { + $('').attr('src', $('#carrier_logo_img').attr('src')).load(function(){ + var maxHeight = 200; + var maxWidth = 200; + var res = this.width / this.height; + $('#carrier_logo_img').width(this.width); + $('#carrier_logo_img').height(this.height); + if ($('#carrier_logo_img').width() > maxWidth) + { + $('#carrier_logo_img').width(maxWidth); + $('#carrier_logo_img').height(maxWidth / res); + } + if ($('#carrier_logo_img').height() > maxHeight) + { + $('#carrier_logo_img').height(maxHeight); + $('#carrier_logo_img').width(maxHeight * res); + } + }); + } + + fixCarrierLogoDisplay(); + \ No newline at end of file diff --git a/js/admin_carrier_wizard.js b/js/admin_carrier_wizard.js index 8e1e6d7cc..bbf932573 100644 --- a/js/admin_carrier_wizard.js +++ b/js/admin_carrier_wizard.js @@ -49,8 +49,8 @@ function onShowStepCallback() $('.anchor li a').each( function () { $(this).parent('li').addClass($(this).attr('class')); }); + $('#carrier_logo_block').prependTo($('div.content').filter(function() { return $(this).css('display') != 'none' }).children('.defaultForm').children('fieldset')); resizeWizard(); - $('#carrier_logo_block').prependTo($('#fieldset_form')); } function onFinishCallback(obj, context)