X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Ffilter_status%2Fstatic%2Fjs%2Ffilter_status.js;h=324634c677df234732b26de025df95c46aef2c08;hb=2bf82680b1858b71eb13cb3202532deed5280db2;hp=3bcd15c23ccd13d72163a9b8e78ab4b5c471c645;hpb=3aae671a1ca0cef870a268b88ddcde8d520d7621;p=unfold.git diff --git a/plugins/filter_status/static/js/filter_status.js b/plugins/filter_status/static/js/filter_status.js index 3bcd15c2..324634c6 100644 --- a/plugins/filter_status/static/js/filter_status.js +++ b/plugins/filter_status/static/js/filter_status.js @@ -28,6 +28,7 @@ /* Setup query and record handlers */ this.listen_query(options.query_uuid); + this.listen_query(options.query_lease_uuid, 'leases'); /* Setup click handlers */ this.elts('list-group-item').click({'instance': this}, this._on_click); @@ -66,6 +67,11 @@ // XXX }, + on_leases_field_state_changed: function(data) + { + console.log('leases_field_state_changed'); + this.on_field_state_changed(data); + }, on_field_state_changed: function(data) { var query_ext; @@ -117,9 +123,10 @@ // ... and communicate the appropriate filters to the manager // NOTE: we use the manifold namespace for internal filters - if (self.prev_filter_status) - manifold.raise_event(self.options.query_uuid, FILTER_REMOVED, self.prev_filter_status); - + if (self.prev_filter_status) { + var filter = ['manifold:status', '==', self.prev_filter_status]; + manifold.raise_event(self.options.query_uuid, FILTER_REMOVED, filter); + } // XXX The datatables will be refreshed twice ! if (filter_status != 'all') { // No filter for 'all'