equal
deleted
inserted
replaced
624 window.ajaxCatSave = function() |
624 window.ajaxCatSave = function() |
625 { |
625 { |
626 // IE <6 pseudo-compatibility |
626 // IE <6 pseudo-compatibility |
627 if ( KILL_SWITCH ) |
627 if ( KILL_SWITCH ) |
628 return true; |
628 return true; |
629 if(!catlist) |
629 var query = 'hello='; |
630 { |
630 $('.catCheck input:checkbox:checked').each(function(i, e) |
631 alert('Var catlist has no properties'); |
631 { |
632 return; |
632 query += '&categories[]=' + ajaxEscape($(e).val()) |
633 } |
633 }); |
634 query=''; |
634 |
635 for(i=0;i<catlist.length;i++) |
|
636 { |
|
637 var s = ( document.forms.mdgCatForm['mdgCat_' + catlist[i]]['checked'] ) ? true : false; |
|
638 if(s) query = query + '&' + catlist[i] + '=true'; |
|
639 } |
|
640 setAjaxLoading(); |
|
641 query = query.substring(1, query.length); |
|
642 ajaxPost(stdAjaxPrefix+'&_mode=catsave', query, function(ajax) { |
635 ajaxPost(stdAjaxPrefix+'&_mode=catsave', query, function(ajax) { |
643 if ( ajax.readyState == 4 && ajax.status == 200 ) { |
636 if ( ajax.readyState == 4 && ajax.status == 200 ) { |
644 unsetAjaxLoading(); |
637 unsetAjaxLoading(); |
645 edit_open = false; |
638 edit_open = false; |
646 if(ajax.responseText != 'GOOD') alert(ajax.responseText); |
639 if(ajax.responseText != 'GOOD') alert(ajax.responseText); |