Skip to content

Commit

Permalink
#29 metric/dimension picker lookup by lowercase.
Browse files Browse the repository at this point in the history
  • Loading branch information
itayw committed Oct 25, 2015
1 parent b370bef commit bff65af
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
8 changes: 4 additions & 4 deletions build/release/joola.js
Original file line number Diff line number Diff line change
Expand Up @@ -40609,7 +40609,7 @@ var DimensionPicker = module.exports = function (options, callback) {

list.forEach(function (dimension) {
var collection = {key: dimension.collection};
var $li = $$('<div class="dimensionOption" data-member="' + (dimension.name || dimension.key) + '">' + (dimension.name || dimension.key) + '</div>');
var $li = $$('<div class="dimensionOption" data-member="' + (dimension.name || dimension.key).toLowerCase() + '">' + (dimension.name || dimension.key) + '</div>');
$li.off('click');
$li.on('click', function (e) {
var $this = $$(this);
Expand Down Expand Up @@ -40650,7 +40650,7 @@ var DimensionPicker = module.exports = function (options, callback) {
var val = $this.val();
if (val.length >= 2) {
$ul.find('div[data-member]').hide();
$ul.find('div[data-member*="' + val + '"]').show();
$ul.find('div[data-member*="' + val.toLowerCase() + '"]').show();
}
else
$ul.find('div[data-member]').show();
Expand Down Expand Up @@ -41820,7 +41820,7 @@ var MetricPicker = module.exports = function (options, callback) {
if (typeof collection !== 'object')
collection = {key: collection};

var $li = $$('<div class="metricOption" data-member="' + collection.key + '.' + (metric.name || metric.key) + '">' + (metric.name || metric.key) + '</div>');
var $li = $$('<div class="metricOption" data-member="' + (collection.key + '.' + (metric.name || metric.key)).toLowerCase() + '">' + (metric.name || metric.key) + '</div>');
$li.off('click');
$li.on('click', function (e) {
var $this = $$(this);
Expand Down Expand Up @@ -41863,7 +41863,7 @@ var MetricPicker = module.exports = function (options, callback) {
var val = $this.val();
if (val.length >= 2) {
$ul.find('div[data-member]').hide();
$ul.find('div[data-member*="' + val + '"]').show();
$ul.find('div[data-member*="' + val.toLowerCase() + '"]').show();
}
else
$ul.find('div[data-member]').show();
Expand Down
9 changes: 5 additions & 4 deletions build/release/joola.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/release/joola.min.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions build/release/joola.shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -37011,7 +37011,7 @@ var DimensionPicker = module.exports = function (options, callback) {

list.forEach(function (dimension) {
var collection = {key: dimension.collection};
var $li = $$('<div class="dimensionOption" data-member="' + (dimension.name || dimension.key) + '">' + (dimension.name || dimension.key) + '</div>');
var $li = $$('<div class="dimensionOption" data-member="' + (dimension.name || dimension.key).toLowerCase() + '">' + (dimension.name || dimension.key) + '</div>');
$li.off('click');
$li.on('click', function (e) {
var $this = $$(this);
Expand Down Expand Up @@ -37052,7 +37052,7 @@ var DimensionPicker = module.exports = function (options, callback) {
var val = $this.val();
if (val.length >= 2) {
$ul.find('div[data-member]').hide();
$ul.find('div[data-member*="' + val + '"]').show();
$ul.find('div[data-member*="' + val.toLowerCase() + '"]').show();
}
else
$ul.find('div[data-member]').show();
Expand Down Expand Up @@ -38222,7 +38222,7 @@ var MetricPicker = module.exports = function (options, callback) {
if (typeof collection !== 'object')
collection = {key: collection};

var $li = $$('<div class="metricOption" data-member="' + collection.key + '.' + (metric.name || metric.key) + '">' + (metric.name || metric.key) + '</div>');
var $li = $$('<div class="metricOption" data-member="' + (collection.key + '.' + (metric.name || metric.key)).toLowerCase() + '">' + (metric.name || metric.key) + '</div>');
$li.off('click');
$li.on('click', function (e) {
var $this = $$(this);
Expand Down Expand Up @@ -38265,7 +38265,7 @@ var MetricPicker = module.exports = function (options, callback) {
var val = $this.val();
if (val.length >= 2) {
$ul.find('div[data-member]').hide();
$ul.find('div[data-member*="' + val + '"]').show();
$ul.find('div[data-member*="' + val.toLowerCase() + '"]').show();
}
else
$ul.find('div[data-member]').show();
Expand Down
8 changes: 4 additions & 4 deletions build/temp/joola.js
Original file line number Diff line number Diff line change
Expand Up @@ -37011,7 +37011,7 @@ var DimensionPicker = module.exports = function (options, callback) {

list.forEach(function (dimension) {
var collection = {key: dimension.collection};
var $li = $$('<div class="dimensionOption" data-member="' + (dimension.name || dimension.key) + '">' + (dimension.name || dimension.key) + '</div>');
var $li = $$('<div class="dimensionOption" data-member="' + (dimension.name || dimension.key).toLowerCase() + '">' + (dimension.name || dimension.key) + '</div>');
$li.off('click');
$li.on('click', function (e) {
var $this = $$(this);
Expand Down Expand Up @@ -37052,7 +37052,7 @@ var DimensionPicker = module.exports = function (options, callback) {
var val = $this.val();
if (val.length >= 2) {
$ul.find('div[data-member]').hide();
$ul.find('div[data-member*="' + val + '"]').show();
$ul.find('div[data-member*="' + val.toLowerCase() + '"]').show();
}
else
$ul.find('div[data-member]').show();
Expand Down Expand Up @@ -38222,7 +38222,7 @@ var MetricPicker = module.exports = function (options, callback) {
if (typeof collection !== 'object')
collection = {key: collection};

var $li = $$('<div class="metricOption" data-member="' + collection.key + '.' + (metric.name || metric.key) + '">' + (metric.name || metric.key) + '</div>');
var $li = $$('<div class="metricOption" data-member="' + (collection.key + '.' + (metric.name || metric.key)).toLowerCase() + '">' + (metric.name || metric.key) + '</div>');
$li.off('click');
$li.on('click', function (e) {
var $this = $$(this);
Expand Down Expand Up @@ -38265,7 +38265,7 @@ var MetricPicker = module.exports = function (options, callback) {
var val = $this.val();
if (val.length >= 2) {
$ul.find('div[data-member]').hide();
$ul.find('div[data-member*="' + val + '"]').show();
$ul.find('div[data-member*="' + val.toLowerCase() + '"]').show();
}
else
$ul.find('div[data-member]').show();
Expand Down
4 changes: 2 additions & 2 deletions src/lib/viz/DimensionPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ var DimensionPicker = module.exports = function (options, callback) {

list.forEach(function (dimension) {
var collection = {key: dimension.collection};
var $li = $$('<div class="dimensionOption" data-member="' + (dimension.name || dimension.key) + '">' + (dimension.name || dimension.key) + '</div>');
var $li = $$('<div class="dimensionOption" data-member="' + (dimension.name || dimension.key).toLowerCase() + '">' + (dimension.name || dimension.key) + '</div>');
$li.off('click');
$li.on('click', function (e) {
var $this = $$(this);
Expand Down Expand Up @@ -137,7 +137,7 @@ var DimensionPicker = module.exports = function (options, callback) {
var val = $this.val();
if (val.length >= 2) {
$ul.find('div[data-member]').hide();
$ul.find('div[data-member*="' + val + '"]').show();
$ul.find('div[data-member*="' + val.toLowerCase() + '"]').show();
}
else
$ul.find('div[data-member]').show();
Expand Down
4 changes: 2 additions & 2 deletions src/lib/viz/MetricPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ var MetricPicker = module.exports = function (options, callback) {
if (typeof collection !== 'object')
collection = {key: collection};

var $li = $$('<div class="metricOption" data-member="' + collection.key + '.' + (metric.name || metric.key) + '">' + (metric.name || metric.key) + '</div>');
var $li = $$('<div class="metricOption" data-member="' + (collection.key + '.' + (metric.name || metric.key)).toLowerCase() + '">' + (metric.name || metric.key) + '</div>');
$li.off('click');
$li.on('click', function (e) {
var $this = $$(this);
Expand Down Expand Up @@ -132,7 +132,7 @@ var MetricPicker = module.exports = function (options, callback) {
var val = $this.val();
if (val.length >= 2) {
$ul.find('div[data-member]').hide();
$ul.find('div[data-member*="' + val + '"]').show();
$ul.find('div[data-member*="' + val.toLowerCase() + '"]').show();
}
else
$ul.find('div[data-member]').show();
Expand Down

0 comments on commit bff65af

Please sign in to comment.