From 67a31ed436f613b386a74bd5ad6464ba1c0aa90b Mon Sep 17 00:00:00 2001 From: flyskyko Date: Tue, 27 Sep 2011 00:37:51 +0000 Subject: [PATCH] issue 160, fixed a bug for infinite loop in XE.cheackboxToggleAll git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9347 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/common.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/js/common.js b/common/js/common.js index ee4b5e7be..5d1fd8d08 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -46,6 +46,7 @@ if(jQuery) jQuery.noConflict(); itemName = arguments[0]; } else { $.extend(options, arguments[0] || {}); + itemName = 'cart'; } break; case 2: @@ -61,8 +62,8 @@ if(jQuery) jQuery.noConflict(); } else { var obj = $('input[name='+itemName+']:checkbox'); } - - if(options.checked == 'toggle') { + + if(options.checked == 'toggle') { obj.each(function() { $(this).attr('checked', ($(this).attr('checked')) ? false : true); });