// small js fixes

This commit is contained in:
tDidierjean
2012-05-11 13:39:08 +00:00
parent 002ed831db
commit cd54f3f8df
2 changed files with 10 additions and 38 deletions
@@ -24,7 +24,6 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<link href="{$smarty.const._PS_JS_DIR_}jquery/plugins/fancybox/jquery.fancybox.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">{$autocompleteList}</script>
<script type="text/javascript" src="{$smarty.const._PS_JS_DIR_}jquery/plugins/autocomplete/jquery.autocomplete.js"></script>
@@ -40,9 +39,6 @@
var confirmPreferencesSaved = '{l s='Preferences saved'}';
{if isset($smarty.get.anchor)}var anchor = '{$smarty.get.anchor|htmlentities|replace:'(':''|replace:')':''|replace:'{':''|replace:'}':''|replace:'\'':''|replace:'/':''}';{else}var anchor = '';{/if}
{literal}
function getPrestaStore(){if(getE("prestastore").style.display!='block')return;$.post(dirNameCurrentIndex+"/ajax.php",{page:"prestastore"},function(a){getE("prestastore-content").innerHTML=a;})}
@@ -67,17 +63,11 @@
document.location.href=currentIndex+'&token='+token+'&'+action+'='+module_list.substring(1, module_list.length);
}
$('document').ready( function() {
// ScrollTo
if (anchor != '')
$.scrollTo('#'+anchor, 1200, {offset: -100});
// AutoComplete Search
$('input[name="filtername"]').autocomplete(moduleList, {
minChars: 0,
@@ -98,28 +88,23 @@
$('#filternameForm').submit();
});
// Method to check / uncheck all modules checkbox
$('#checkme').click(function()
{
if ($(this).attr("rel") == 'false')
{
$(this).attr("checked", "checked");
$(this).attr("checked", true);
$(this).attr("rel", "true");
$("input[name=modules]").attr("checked", "checked");
$("input[name=modules]").attr("checked", true);
}
else
{
$(this).attr("checked", "");
$(this).removeAttr("checked");
$(this).attr("rel", "false");
$("input[name=modules]").attr("checked", "");
$("input[name=modules]").removeAttr("checked");
}
});
// Method to reload filter in ajax
$('.categoryModuleFilterLink').click(function()
{
@@ -156,8 +141,6 @@
return false;
});
// Method to get modules_list.xml from prestashop.com and default_country_modules_list.xml from addons.prestashop.com
try
{
@@ -186,8 +169,6 @@
}
catch(e) { }
// Method to log on PrestaShop Addons WebServices
$('#addons_login_button').click(function()
{
@@ -233,7 +214,6 @@
return false;
});
// Method to log out PrestaShop Addons WebServices
$('#addons_logout_button').click(function()
{
@@ -275,7 +255,6 @@
return false;
});
// Method to set filter on modules
function setFilter()
{
@@ -320,9 +299,6 @@
$('#module_status_filter').change(function() { setFilter(); });
$('#country_module_value_filter').change(function() { setFilter(); });
// Method to save favorites preferences
$('.moduleFavorite').change(function()
{
@@ -360,10 +336,6 @@
catch(e){}
return false;
});
});
{/literal}
</script>
</script>
+5 -5
View File
@@ -299,7 +299,7 @@ product_tabs['Combinations'] = new function(){
/* Check combination images */
if (typeof(combination_images[id_product_attribute]) != 'undefined')
for (i = 0; i < combination_images[id_product_attribute].length; i++)
$('#id_image_attr_' + combination_images[id_product_attribute][i]).attr('checked', 'checked');
$('#id_image_attr_' + combination_images[id_product_attribute][i]).attr('checked', true);
check_impact();
check_weight_impact();
check_unit_impact();
@@ -1185,7 +1185,7 @@ product_tabs['Suppliers'] = new function(){
{
if (item.is(':checked'))
{
item.attr("checked", "");
item.removeAttr("checked");
default_is_ok = false;
}
}
@@ -1203,7 +1203,7 @@ product_tabs['Suppliers'] = new function(){
if (item.is(':disabled') == false)
{
item.attr("checked", "checked");
item.attr("checked", true);
default_is_ok = true;
}
break;
@@ -1328,11 +1328,11 @@ product_tabs['Warehouses'] = new function(){
if (item.is(':checked'))
{
item.attr("checked", "");
item.removeAttr("checked");
}
else
{
item.attr("checked", "checked");
item.attr("checked", true);
}
}
});