From eefc1157671241b47f46e4fb94ab55c224f9e843 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 28 Jan 2014 11:13:48 +0000 Subject: [PATCH] Consider pop up the group difference message in gategories, only if they are less than original --- admin/js/app.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/admin/js/app.js b/admin/js/app.js index ea4ad0cd63..63570b1e1f 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -254,7 +254,6 @@ app.classes.admin = AppJS.extend( check_owner: function(button) { var select_owner = this.et2.getWidgetById('owner'); var diff = []; - var diffStatFlag = false; if (typeof select_owner != 'undefined') { @@ -285,18 +284,13 @@ app.classes.admin = AppJS.extend( for(var i =0;i < cat_original_owner.length;i++) { - if (selected_groups.search(cat_original_owner[i]) >= 0) + if (selected_groups.search(cat_original_owner[i]) < 0) { - diffStatFlag = false; - } - else - { - diffStatFlag = true; diff.push(cat_original_owner[i]); } } - if (diffStatFlag && diff) + if (diff.length > 0) { var removed_cat_label = jQuery.map(select_owner.options.select_options, function (val, i) {