+ // Let's clear the table and only add lines that are visible
+ var self = this;
+ this.clear_table();
+
+ lines = Array();
+ var record_keys = [];
+ manifold.query_store.iter_records(this.options.query_uuid, function (record_key, record) {
+ lines.push(self.new_record(record));
+ record_keys.push(record_key);
+ });
+ this.table.fnAddData(lines);
+ $.each(record_keys, function(i, record_key) {
+ var state = manifold.query_store.get_record_state(self.options.query_uuid, record_key, STATE_SET);
+ var warnings = manifold.query_store.get_record_state(self.options.query_uuid, record_key, STATE_WARNINGS);
+ switch(state) {
+ // XXX The row and checkbox still does not exists !!!!
+ case STATE_SET_IN:
+ case STATE_SET_IN_SUCCESS:
+ case STATE_SET_OUT_FAILURE:
+ self.set_checkbox_from_record_key(record_key, true);
+ break;
+ case STATE_SET_OUT:
+ case STATE_SET_OUT_SUCCESS:
+ case STATE_SET_IN_FAILURE:
+ //self.set_checkbox_from_record_key(record_key, false);
+ break;
+ case STATE_SET_IN_PENDING:
+ self.set_checkbox_from_record_key(record_key, true);
+ self.set_bgcolor(record_key, QUERYTABLE_BGCOLOR_ADDED);
+ break;
+ case STATE_SET_OUT_PENDING:
+ //self.set_checkbox_from_record_key(record_key, false);
+ self.set_bgcolor(record_key, QUERYTABLE_BGCOLOR_REMOVED);
+ break;
+ }
+ self.change_status(record_key, warnings); // XXX will retrieve status again
+ });