Fixed minor bug introduced in last change: recon candidates didn't get rendered at all.
Added "refresh" link for list facets. git-svn-id: http://google-refine.googlecode.com/svn/trunk@133 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
2eb3a67125
commit
e449617960
@ -50,10 +50,10 @@ DataTableCellUI.prototype._render = function() {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$(divContent).html(cell.v);
|
$(divContent).html(cell.v);
|
||||||
$('<span> </span>').appendTo(divContent);
|
|
||||||
|
|
||||||
|
if (this._dataTableView._showRecon) {
|
||||||
var ul = $('<div></div>').addClass("data-table-recon-candidates").appendTo(divContent);
|
var ul = $('<div></div>').addClass("data-table-recon-candidates").appendTo(divContent);
|
||||||
if (this._dataTableView._showRecon && "c" in r && r.c.length > 0) {
|
if ("c" in r && r.c.length > 0) {
|
||||||
var candidates = r.c;
|
var candidates = r.c;
|
||||||
var renderCandidate = function(candidate, index) {
|
var renderCandidate = function(candidate, index) {
|
||||||
var li = $('<div></div>').addClass("data-table-recon-candidate").appendTo(ul);
|
var li = $('<div></div>').addClass("data-table-recon-candidate").appendTo(ul);
|
||||||
@ -119,6 +119,7 @@ DataTableCellUI.prototype._render = function() {
|
|||||||
.appendTo($('<div>').appendTo(divContent));
|
.appendTo($('<div>').appendTo(divContent));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
DataTableCellUI.prototype._doRematch = function() {
|
DataTableCellUI.prototype._doRematch = function() {
|
||||||
|
@ -255,7 +255,7 @@ DataTableView.prototype.render = function() {
|
|||||||
td.innerHTML = " ";
|
td.innerHTML = " ";
|
||||||
} else {
|
} else {
|
||||||
var cell = (column.cellIndex < cells.length) ? cells[column.cellIndex] : null;
|
var cell = (column.cellIndex < cells.length) ? cells[column.cellIndex] : null;
|
||||||
new DataTableCellUI(this, cell, row.i, column.cellIndex, td);
|
new DataTableCellUI(self, cell, row.i, column.cellIndex, td);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -150,18 +150,24 @@ ListFacet.prototype.render = function() {
|
|||||||
|
|
||||||
var footerDiv = $('<div></div>').addClass("facet-footer").appendTo(container);
|
var footerDiv = $('<div></div>').addClass("facet-footer").appendTo(container);
|
||||||
if (this._options.sort == "name") {
|
if (this._options.sort == "name") {
|
||||||
$('<a href="javascript:{}"></a>').addClass("action").text("re-sort choices by count").click(function() {
|
$('<a href="javascript:{}"></a>').addClass("action").text("re-sort by count").click(function() {
|
||||||
self._options.sort = "count";
|
self._options.sort = "count";
|
||||||
self._reSortChoices();
|
self._reSortChoices();
|
||||||
self.render();
|
self.render();
|
||||||
}).appendTo(footerDiv);
|
}).appendTo(footerDiv);
|
||||||
} else {
|
} else {
|
||||||
$('<a href="javascript:{}"></a>').addClass("action").text("re-sort choices by name").click(function() {
|
$('<a href="javascript:{}"></a>').addClass("action").text("re-sort by name").click(function() {
|
||||||
self._options.sort = "name";
|
self._options.sort = "name";
|
||||||
self._reSortChoices();
|
self._reSortChoices();
|
||||||
self.render();
|
self.render();
|
||||||
}).appendTo(footerDiv);
|
}).appendTo(footerDiv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('<span>').html(" • ").appendTo(footerDiv);
|
||||||
|
|
||||||
|
$('<a href="javascript:{}"></a>').addClass("action").text("refresh").click(function() {
|
||||||
|
ui.browsingEngine.update();
|
||||||
|
}).appendTo(footerDiv);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user