Re-layout when window is resized.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@236 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
ac50b3c48b
commit
6472e1f076
@ -55,11 +55,9 @@ function initializeUI(uiState) {
|
|||||||
body.append(table);
|
body.append(table);
|
||||||
|
|
||||||
var tr = table.insertRow(0);
|
var tr = table.insertRow(0);
|
||||||
|
|
||||||
var tdLeft = tr.insertCell(0);
|
var tdLeft = tr.insertCell(0);
|
||||||
var tdRight = tr.insertCell(1);
|
var tdRight = tr.insertCell(1);
|
||||||
tdLeft.setAttribute("width", "82%");
|
tdRight.setAttribute("width", "250");
|
||||||
tdRight.setAttribute("width", "18%");
|
|
||||||
|
|
||||||
ui.viewPanel = $('<div></div>').appendTo(tdLeft);
|
ui.viewPanel = $('<div></div>').appendTo(tdLeft);
|
||||||
ui.facetPanel = $('<div></div>').appendTo(tdRight);
|
ui.facetPanel = $('<div></div>').appendTo(tdRight);
|
||||||
|
@ -2,9 +2,21 @@ function DataTableView(div) {
|
|||||||
this._div = div;
|
this._div = div;
|
||||||
this._pageSize = 20;
|
this._pageSize = 20;
|
||||||
this._showRecon = true;
|
this._showRecon = true;
|
||||||
|
|
||||||
|
this._initializeUI();
|
||||||
this._showRows(0);
|
this._showRows(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DataTableView.prototype._initializeUI = function() {
|
||||||
|
this._div.addClass("view-panel");
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
$(window).resize(function() {
|
||||||
|
var dataTableContainer = self._div.find(".data-table-container");
|
||||||
|
dataTableContainer.hide().width(self._div.width() + "px").show();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
DataTableView.prototype.update = function(onDone) {
|
DataTableView.prototype.update = function(onDone) {
|
||||||
this._showRows(0, onDone);
|
this._showRows(0, onDone);
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
.view-panel {
|
||||||
|
}
|
||||||
.data-table-container {
|
.data-table-container {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
Loading…
Reference in New Issue
Block a user