// Executes all async. queries - intended for the javascript header to initialize queries
// input queries are specified as a list of {'query_uuid': <query_uuid> }
+ // each plugin is responsible for managing its spinner through on_query_in_progress
asynchroneous_exec : function (query_exec_tuples) {
-// start spinners - be robust if the spin stuff was not loaded for any reason
-// turned off because each plugin is responsible for doing that through on_query_in_progress
-// try {
-// var subjects=$(".need-spin");
-// if (manifold.asynchroneous_debug) {
-// messages.debug("Turning on spin with " + subjects.length + " matches for .need-spin");
-// $.map (subjects, function (subject) { messages.debug("need-spin: "+ subject.id);});
-// }
-// subjects.spin(manifold.spin_presets);
-// } catch (err) { messages.debug("Cannot turn on spins " + err); }
// Loop through input array, and use publish_uuid to publish back results
$.each(query_exec_tuples, function(index, tuple) {
switch(value.request) {
case FIELD_REQUEST_CHANGE:
+ if (update_query.params[value.key] === undefined)
+ update_query.params[value.key] = Array();
update_query.params[value.key] = value.value;
break;
case FIELD_REQUEST_ADD:
if ($.inArray(value.value, update_query_orig.params[value.key]) != -1)
value.request = FIELD_REQUEST_ADD_RESET;
+ if (update_query.params[value.key] === undefined)
+ update_query.params[value.key] = Array();
update_query.params[value.key].push(value.value);
break;
case FIELD_REQUEST_REMOVE:
var arr = update_query.params[value.key];
arr = $.grep(arr, function(x) { return x != value.value; });
+ if (update_query.params[value.key] === undefined)
+ update_query.params[value.key] = Array();
update_query.params[value.key] = arr;
break;