X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifold%2Fstatic%2Fjs%2Fmanifold.js;h=b5085fbe8f971cb5250878cf086aed7814fe5a16;hb=546d5148434646dd3e5121c8b49cfa80b8890117;hp=8c23cf6fe373b8c93c82db882ba5ea89fefd9587;hpb=6e286d340b35106b65a543ecd1a3c8086953f50e;p=unfold.git diff --git a/manifold/static/js/manifold.js b/manifold/static/js/manifold.js index 8c23cf6f..b5085fbe 100644 --- a/manifold/static/js/manifold.js +++ b/manifold/static/js/manifold.js @@ -346,17 +346,8 @@ var manifold = { // Executes all async. queries - intended for the javascript header to initialize queries // input queries are specified as a list of {'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) { @@ -808,11 +799,15 @@ var manifold = { 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: @@ -821,6 +816,8 @@ var manifold = { 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;