Palette filter on label as well as id

This commit is contained in:
Nick O'Leary 2015-03-20 11:40:34 +00:00
parent 7a0ce0c957
commit 57c049b49f
1 changed files with 2 additions and 1 deletions

View File

@ -232,7 +232,8 @@ RED.palette = (function() {
var re = new RegExp(val,'i');
$(".palette_node").each(function(i,el) {
if (val === "" || re.test(el.id)) {
var currentLabel = $(el).find(".palette_label").text();
if (val === "" || re.test(el.id) || re.test(currentLabel)) {
$(this).show();
} else {
$(this).hide();