X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fscheduler2%2Fstatic%2Fjs%2Fscheduler2.js;h=0b5339fe1ba9d827d813ddfc050870a45f43ef7d;hb=376307342a51ecd274fc8c0d24a14030c73cd292;hp=77545c02cf418a2f6970169ffffd643374cdaa66;hpb=7467200c1cfcd1eafa871ee69c6458ff18e090c7;p=unfold.git diff --git a/plugins/scheduler2/static/js/scheduler2.js b/plugins/scheduler2/static/js/scheduler2.js index 77545c02..0b5339fe 100755 --- a/plugins/scheduler2/static/js/scheduler2.js +++ b/plugins/scheduler2/static/js/scheduler2.js @@ -226,7 +226,7 @@ var SCHEDULER_COLWIDTH = 50; } manifold.raise_event($scope.instance.options.query_lease_uuid, FIELD_STATE_CHANGED, data); /* Remove from local cache also, unless we listen to events from outside */ - $.grep($scope._leases_by_resource[other.resource], function(x) { return x != other; }); + $scope._leases_by_resource[other.resource] = $.grep($scope._leases_by_resource[other.resource], function(x) { return x != other; }); } @@ -278,7 +278,7 @@ var SCHEDULER_COLWIDTH = 50; } manifold.raise_event($scope.instance.options.query_lease_uuid, FIELD_STATE_CHANGED, data); /* Remove from local cache also, unless we listen to events from outside */ - $.grep($scope._leases_by_resource[model_resource.urn], function(x) { return x != other; }); + $scope._leases_by_resource[model_resource.urn] = $.grep($scope._leases_by_resource[model_resource.urn], function(x) { return x != other; }); return false; // ~ break }); @@ -305,9 +305,9 @@ var SCHEDULER_COLWIDTH = 50; op : STATE_SET_REMOVE, value: other_key } - manifold.raise_event($scope.instance.options.query_lease_uuid, FIELD_STATE_CHANGED, other_key); + manifold.raise_event($scope.instance.options.query_lease_uuid, FIELD_STATE_CHANGED, data); /* Remove from local cache also, unless we listen to events from outside */ - $.grep($scope._leases_by_resource[model_resource.urn], function(x) { return x != other; }); + $scope._leases_by_resource[model_resource.urn] = $.grep($scope._leases_by_resource[model_resource.urn], function(x) { return x != other; }); return false; // ~ break }); }