From a8b134cadfbe3d27bf37095acff4efa5f3fbee1e Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Tue, 31 Jan 2012 13:56:08 +0000 Subject: [PATCH] // Fix Bug with blocklayered and product ordering --- modules/blocklayered/blocklayered.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/blocklayered/blocklayered.js b/modules/blocklayered/blocklayered.js index aa1e9508d..b78d268f6 100644 --- a/modules/blocklayered/blocklayered.js +++ b/modules/blocklayered/blocklayered.js @@ -114,8 +114,13 @@ $(document).ready(function() $('.hide-action').each(function() { hideFilterValueAction(this); }); - - $('#selectPrductSort').live('change', function() { + + // Unbind event change on #selectPrductSort + $('#selectPrductSort').unbind('change'); + + // To be sure there is no other events attached to the selectPrductSort, change the ID + $('#selectPrductSort').attr('id', 'selectPrductSort2'); + $('#selectPrductSort2').live('change', function(event) { reloadContent(); }); @@ -299,9 +304,9 @@ function reloadContent(params_plus) } }); - if ($('#selectPrductSort').length) + if ($('#selectPrductSort2').length) { - var splitData = $('#selectPrductSort').val().split(':'); + var splitData = $('#selectPrductSort2').val().split(':'); data += '&orderby='+splitData[0]+'&orderway='+splitData[1]; }