OSBI/saiku-ui — Issue #100: Search Field
Author: buggtb
Created: 2011-10-11 14:44:18+00:00
State: open

Hi,

I implement a feature, if you are interested to add it in the new version of saiku.
It is an input field in the selection view, wich allow to filter the result in the selection menu, i upload two screen.

(function($){
$.fn.liveFilter = function (list) {
// Grabs the id of the element containing the filter
var wrap = '#' + $(this).attr('id');

// Listen for the value of the input to change
$(wrap).keyup(function() {

// Grab the current value of the filter
var filter = $(this).val();

// Hide all elements that do not contain the filter string
$(list+':not(:Contains("' + filter + '"))').attr("disabled","disabled").hide();

// Show already hidden elements that do contain the filter string
$(list+':Contains("' + filter + '")').attr("disabled","").show();

});

jQuery.expr[':'].Contains = function(a,i,m){

var reg=new RegExp("[ ,;]+", "g");

var tableau=m3.split(reg);
var yo=0;

for (var i=0; i