Reduce filtered out history items' heights rather than hiding them entirely
git-svn-id: http://google-refine.googlecode.com/svn/trunk@1606 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
83e94d240c
commit
69b7d34e09
@ -1 +1 @@
|
|||||||
<a class="history-entry"><span class="history-entry-index" bind="index"></span></a>
|
<a class="history-entry"><span class="history-entry-index"></span><span></span></a>
|
@ -65,8 +65,8 @@ HistoryPanel.prototype._render = function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
a[0].appendChild(document.createTextNode(entry.description));
|
a[0].childNodes[0].appendChild(document.createTextNode(index + "."));
|
||||||
a[0].firstChild.appendChild(document.createTextNode(index + "."));
|
a[0].childNodes[1].appendChild(document.createTextNode(entry.description));
|
||||||
|
|
||||||
return a;
|
return a;
|
||||||
};
|
};
|
||||||
@ -101,11 +101,15 @@ HistoryPanel.prototype._render = function() {
|
|||||||
elmts.filterInput.keyup(function() {
|
elmts.filterInput.keyup(function() {
|
||||||
var filter = $.trim(this.value.toLowerCase());
|
var filter = $.trim(this.value.toLowerCase());
|
||||||
if (filter.length == 0) {
|
if (filter.length == 0) {
|
||||||
elmts.bodyDiv.find(".history-entry").show();
|
elmts.bodyDiv.find(".history-entry").removeClass("filtered-out");
|
||||||
} else {
|
} else {
|
||||||
elmts.bodyDiv.find(".history-entry").each(function() {
|
elmts.bodyDiv.find(".history-entry").each(function() {
|
||||||
var text = this.childNodes[1].nodeValue;
|
var text = this.childNodes[1].firstChild.nodeValue;
|
||||||
this.style.display = (text.toLowerCase().indexOf(filter) >= 0) ? "block" : "none";
|
if (text.toLowerCase().indexOf(filter) >= 0) {
|
||||||
|
$(this).removeClass("filtered-out");
|
||||||
|
} else {
|
||||||
|
$(this).addClass("filtered-out");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -142,6 +142,15 @@ a.history-entry {
|
|||||||
color: black;
|
color: black;
|
||||||
border-top: 1px dotted #ddd;
|
border-top: 1px dotted #ddd;
|
||||||
}
|
}
|
||||||
|
a.history-entry.filtered-out {
|
||||||
|
height: 1px;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
}
|
||||||
|
a.history-entry.filtered-out > * {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.history-future a.history-entry, .history-future a.history-entry-index {
|
.history-future a.history-entry, .history-future a.history-entry-index {
|
||||||
color: @light_grey;
|
color: @light_grey;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user