Authored by htoooth

add fav

@@ -570,10 +570,11 @@ bindEvent.add(function() { @@ -570,10 +570,11 @@ bindEvent.add(function() {
570 dialog.$el.on('click', '.ok', function() { 570 dialog.$el.on('click', '.ok', function() {
571 var $this = $(this), 571 var $this = $(this),
572 sku = $this.data('sku'), 572 sku = $this.data('sku'),
573 - isFav = dialog.$el.find('.active').length === 1; 573 + getFav = dialog.$el.find('.active').length === 1,
  574 + isFaved = $('#collect-product').hasClass('coled');
574 575
575 notify.addAsync(skn, sku).then(function() { 576 notify.addAsync(skn, sku).then(function() {
576 - if (isFav) { 577 + if (!isFaved && getFav) {
577 $('#collect-product').triggerHandler('click'); 578 $('#collect-product').triggerHandler('click');
578 } 579 }
579 580