// small js fixes
This commit is contained in:
@@ -24,7 +24,6 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* 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" />
|
<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">{$autocompleteList}</script>
|
||||||
<script type="text/javascript" src="{$smarty.const._PS_JS_DIR_}jquery/plugins/autocomplete/jquery.autocomplete.js"></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'}';
|
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}
|
{if isset($smarty.get.anchor)}var anchor = '{$smarty.get.anchor|htmlentities|replace:'(':''|replace:')':''|replace:'{':''|replace:'}':''|replace:'\'':''|replace:'/':''}';{else}var anchor = '';{/if}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{literal}
|
{literal}
|
||||||
|
|
||||||
function getPrestaStore(){if(getE("prestastore").style.display!='block')return;$.post(dirNameCurrentIndex+"/ajax.php",{page:"prestastore"},function(a){getE("prestastore-content").innerHTML=a;})}
|
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.location.href=currentIndex+'&token='+token+'&'+action+'='+module_list.substring(1, module_list.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$('document').ready( function() {
|
$('document').ready( function() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ScrollTo
|
// ScrollTo
|
||||||
if (anchor != '')
|
if (anchor != '')
|
||||||
$.scrollTo('#'+anchor, 1200, {offset: -100});
|
$.scrollTo('#'+anchor, 1200, {offset: -100});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// AutoComplete Search
|
// AutoComplete Search
|
||||||
$('input[name="filtername"]').autocomplete(moduleList, {
|
$('input[name="filtername"]').autocomplete(moduleList, {
|
||||||
minChars: 0,
|
minChars: 0,
|
||||||
@@ -98,28 +88,23 @@
|
|||||||
$('#filternameForm').submit();
|
$('#filternameForm').submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Method to check / uncheck all modules checkbox
|
// Method to check / uncheck all modules checkbox
|
||||||
$('#checkme').click(function()
|
$('#checkme').click(function()
|
||||||
{
|
{
|
||||||
if ($(this).attr("rel") == 'false')
|
if ($(this).attr("rel") == 'false')
|
||||||
{
|
{
|
||||||
$(this).attr("checked", "checked");
|
$(this).attr("checked", true);
|
||||||
$(this).attr("rel", "true");
|
$(this).attr("rel", "true");
|
||||||
$("input[name=modules]").attr("checked", "checked");
|
$("input[name=modules]").attr("checked", true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$(this).attr("checked", "");
|
$(this).removeAttr("checked");
|
||||||
$(this).attr("rel", "false");
|
$(this).attr("rel", "false");
|
||||||
$("input[name=modules]").attr("checked", "");
|
$("input[name=modules]").removeAttr("checked");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Method to reload filter in ajax
|
// Method to reload filter in ajax
|
||||||
$('.categoryModuleFilterLink').click(function()
|
$('.categoryModuleFilterLink').click(function()
|
||||||
{
|
{
|
||||||
@@ -156,8 +141,6 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Method to get modules_list.xml from prestashop.com and default_country_modules_list.xml from addons.prestashop.com
|
// Method to get modules_list.xml from prestashop.com and default_country_modules_list.xml from addons.prestashop.com
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -186,8 +169,6 @@
|
|||||||
}
|
}
|
||||||
catch(e) { }
|
catch(e) { }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Method to log on PrestaShop Addons WebServices
|
// Method to log on PrestaShop Addons WebServices
|
||||||
$('#addons_login_button').click(function()
|
$('#addons_login_button').click(function()
|
||||||
{
|
{
|
||||||
@@ -233,7 +214,6 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Method to log out PrestaShop Addons WebServices
|
// Method to log out PrestaShop Addons WebServices
|
||||||
$('#addons_logout_button').click(function()
|
$('#addons_logout_button').click(function()
|
||||||
{
|
{
|
||||||
@@ -275,7 +255,6 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Method to set filter on modules
|
// Method to set filter on modules
|
||||||
function setFilter()
|
function setFilter()
|
||||||
{
|
{
|
||||||
@@ -320,9 +299,6 @@
|
|||||||
$('#module_status_filter').change(function() { setFilter(); });
|
$('#module_status_filter').change(function() { setFilter(); });
|
||||||
$('#country_module_value_filter').change(function() { setFilter(); });
|
$('#country_module_value_filter').change(function() { setFilter(); });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Method to save favorites preferences
|
// Method to save favorites preferences
|
||||||
$('.moduleFavorite').change(function()
|
$('.moduleFavorite').change(function()
|
||||||
{
|
{
|
||||||
@@ -360,10 +336,6 @@
|
|||||||
catch(e){}
|
catch(e){}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
{/literal}
|
{/literal}
|
||||||
</script>
|
</script>
|
||||||
@@ -299,7 +299,7 @@ product_tabs['Combinations'] = new function(){
|
|||||||
/* Check combination images */
|
/* Check combination images */
|
||||||
if (typeof(combination_images[id_product_attribute]) != 'undefined')
|
if (typeof(combination_images[id_product_attribute]) != 'undefined')
|
||||||
for (i = 0; i < combination_images[id_product_attribute].length; i++)
|
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_impact();
|
||||||
check_weight_impact();
|
check_weight_impact();
|
||||||
check_unit_impact();
|
check_unit_impact();
|
||||||
@@ -1185,7 +1185,7 @@ product_tabs['Suppliers'] = new function(){
|
|||||||
{
|
{
|
||||||
if (item.is(':checked'))
|
if (item.is(':checked'))
|
||||||
{
|
{
|
||||||
item.attr("checked", "");
|
item.removeAttr("checked");
|
||||||
default_is_ok = false;
|
default_is_ok = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1203,7 +1203,7 @@ product_tabs['Suppliers'] = new function(){
|
|||||||
|
|
||||||
if (item.is(':disabled') == false)
|
if (item.is(':disabled') == false)
|
||||||
{
|
{
|
||||||
item.attr("checked", "checked");
|
item.attr("checked", true);
|
||||||
default_is_ok = true;
|
default_is_ok = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1328,11 +1328,11 @@ product_tabs['Warehouses'] = new function(){
|
|||||||
|
|
||||||
if (item.is(':checked'))
|
if (item.is(':checked'))
|
||||||
{
|
{
|
||||||
item.attr("checked", "");
|
item.removeAttr("checked");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
item.attr("checked", "checked");
|
item.attr("checked", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user