X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifoldapi%2Fstatic%2Fjs%2Fmanifold.js;h=74fb5d9d6c5e265ffc3600f9881e19faa9e51899;hb=0f9507be5bc87bdef40b3f34d6514bd888ee2abe;hp=17677b95c430d39822f2c89ddd0a3961c989fdc1;hpb=950874373fec8fd1c145968267ef6c21b3faf2b3;p=unfold.git diff --git a/manifoldapi/static/js/manifold.js b/manifoldapi/static/js/manifold.js index 17677b95..74fb5d9d 100644 --- a/manifoldapi/static/js/manifold.js +++ b/manifoldapi/static/js/manifold.js @@ -560,6 +560,8 @@ function QueryStore() { this.iter_records(query_uuid, function(record_key, record) { var is_reserved, is_pending, in_set, is_unconfigured; + + /* By default, a record is visible unless a filter says the opposite */ var visible = true; var record_state = manifold.query_store.get_record_state(query_uuid, record_key, STATE_SET); @@ -629,13 +631,16 @@ function QueryStore() { if (op == '=' || op == '==') { if ( col_value != value || col_value==null || col_value=="" || col_value=="n/a") visible = false; + }else if (op == 'included') { + /* By default, the filter returns false unless the record + * field match at least one value of the included statement + */ + visible = false; $.each(value, function(i,x) { if(x == col_value){ visible = true; return false; // ~ break - }else{ - visible = false; } }); }else if (op == '!=') { @@ -666,7 +671,7 @@ function QueryStore() { }); var end = new Date().getTime(); - console.log("APPLY FILTERS took", end - start, "ms"); + console.log("APPLY FILTERS [", filters, "] took", end - start, "ms"); }