# set checkboxes if a final column with checkboxes is desired
# pass columns as the initial set of columns
# if None then this is taken from the query's fields
- def __init__ (self, query, **settings):
+ def __init__ (self, query, query_all, **settings):
Plugin.__init__ (self, **settings)
- self.query=query
+ self.query = query
+ self.query_all = query_all
+ self.query_all_uuid = query_all.query_uuid
def template_file (self):
return "senslabmap.html"
return reqs
# the list of things passed to the js plugin
- def json_settings_list (self): return ['plugin_uuid','query_uuid']
+ def json_settings_list (self): return ['plugin_uuid', 'dom_id', 'query_uuid', 'query_all_uuid']
init: function(options, element) {
this._super(options, element);
- /* Member variables */
- // query status
- this.received_all = false;
- this.received_set = false;
- this.in_set_buffer = Array();
+ this.elmt().on('show', this, this.on_show);
- var query = manifold.query_store.find_analyzed_query(options.query_uuid);
this.method = query.object;
- var keys = manifold.metadata.get_key(this.method);
- this.key = (keys && keys.length == 1) ? keys[0] : null;
-
/* Setup query and record handlers */
this.listen_query(options.query_uuid);
- this.listen_query(options.query_uuid, 'all');
-
+ this.listen_query(options.query_all_uuid, 'all');
+
/* GUI setup and event binding */
this.initialize_map();
},
initialize_map: function() {
+ console.log("init toto");
// TODO: this is static, retrieve directly nodes
nodes = nodes_gre;
init();
parseNodebox();
},
+
+ refresh: function() {
+ console.log("refresh");
+ myrender();
+ },
on_show: function(e) {
- // TODO
+ /* GUI setup and event binding */
+ e.data.refresh();
},
- on_filter_added: function(filter) {
- console.log(filter);
+ on_all_new_record: function(record) {
+ console.log("All New Record : " + record);
},
on_new_record: function(record) {
- console.log(record);
+ console.log("New Record : " + record);
+ },
+
+ on_query_in_progress: function()
+ {
+ console.log('on_query_in_progress');
},
- on_record_received: function(record) {
- console.log(record);
+ on_query_done: function()
+ {
+ console.log('on_query_done');
+ },
+
+ on_all_query_in_progress: function()
+ {
+ console.log('on_all_query_in_progress');
},
+
+ on_all_query_done: function()
+ {
+ console.log('on_all_query_done');
+ }
});
$.plugin('SensLabMap', SensLabMap);
})(jQuery);