From d105d7a2ef07c671e135d4d06cf9fe2c52a374de Mon Sep 17 00:00:00 2001 From: rMalie Date: Wed, 23 Nov 2011 15:37:29 +0000 Subject: [PATCH] // Fix multishop javascript for preferences and shop url --- .../themes/template/helper/options/options.tpl | 18 +++++++++--------- admin-dev/themes/template/shop_url/form.tpl | 2 +- js/admin.js | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/admin-dev/themes/template/helper/options/options.tpl b/admin-dev/themes/template/helper/options/options.tpl index b08bfec5a..432a47fb6 100644 --- a/admin-dev/themes/template/helper/options/options.tpl +++ b/admin-dev/themes/template/helper/options/options.tpl @@ -61,7 +61,7 @@ {if isset($categoryData['title'])}{$categoryData['title']}{else}{l s='Options'}{/if} - + {* Category description *} {if (isset($categoryData['description']) && $categoryData['description'])}
{$categoryData['description']}
@@ -70,9 +70,9 @@ {if (isset($categoryData['info']) && $categoryData['info'])}

{$categoryData['info']}

{/if} - + {foreach $categoryData['fields'] AS $key => $field} - + {if $field['type'] == 'hidden'} {else} @@ -93,7 +93,7 @@ {else if isset($input.empty_message)} {$input.empty_message} - {/if} + {/if} {elseif $field['type'] == 'bool'} @@ -174,12 +174,12 @@ {/foreach} {/if} -
+
{/if} {if ($field['multishop_default'])}
{/if} @@ -194,9 +194,9 @@ {/foreach} {if isset($categoryData['submit'])}
- diff --git a/admin-dev/themes/template/shop_url/form.tpl b/admin-dev/themes/template/shop_url/form.tpl index d29f8bf42..957b7a138 100644 --- a/admin-dev/themes/template/shop_url/form.tpl +++ b/admin-dev/themes/template/shop_url/form.tpl @@ -43,7 +43,7 @@ if (physical) url += '/'+physical; if (virtual) - url += '/'+virtual; + url += '/'+virtual+'/'; url = url.replace(/\/+/g, "/"); $('#final_url').val('http://'+url); }; diff --git a/js/admin.js b/js/admin.js index ed57e8bd6..29994cafe 100644 --- a/js/admin.js +++ b/js/admin.js @@ -901,12 +901,12 @@ $(document).ready(function() { var key = $(v).attr('name'); var len = key.length; - checkMultishopDefaultValue(v, key.substr(18, len - 20)); + checkMultishopDefaultValue(v, key.substr(17, len - 18)); }); }); function checkMultishopDefaultValue(obj, key) -{console.log(key) +{ if ($(obj).attr('checked') || $('#'+key).hasClass('isInvisible')) { $('#conf_id_'+key+' input, #conf_id_'+key+' textarea, #conf_id_'+key+' select').attr('disabled', true);