Adjusted sidebar's and view panel's resizing code to pixel-precision.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1554 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-10-15 04:53:05 +00:00
parent 15e715dce4
commit 855dec26e5
3 changed files with 10 additions and 10 deletions

View File

@ -19,15 +19,15 @@ function resize() {
var top = $("#header").outerHeight();
var height = $(window).height() - top;
var leftPanelPaddings = ui.leftPanel.outerHeight(true) - ui.leftPanel.height();
ui.leftPanel
.css("top", top + "px")
.css("left", "0px")
.css("height", height + "px")
.css("height", (height - leftPanelPaddings) + "px")
.css("width", leftPanelWidth + "px");
var leftPanelPaddings = ui.leftPanel.outerHeight(true) - ui.leftPanel.height();
var leftPanelTabsPaddings = ui.leftPanelTabs.outerHeight(true) - ui.leftPanelTabs.height();
ui.leftPanelTabs.height(ui.leftPanel.height() - leftPanelTabsPaddings - leftPanelPaddings);
ui.leftPanelTabs.height(ui.leftPanel.height() - leftPanelTabsPaddings);
var rightPanelVPaddings = ui.rightPanel.outerHeight(true) - ui.rightPanel.height();
var rightPanelHPaddings = ui.rightPanel.outerWidth(true) - ui.rightPanel.width();
@ -37,7 +37,6 @@ function resize() {
.css("height", (height - rightPanelVPaddings) + "px")
.css("width", (width - leftPanelWidth - rightPanelHPaddings) + "px");
ui.viewPanel.height((height - ui.toolPanel.outerHeight() - rightPanelVPaddings) + "px");
var processPanelWidth = 400;

View File

@ -15,11 +15,12 @@ DataTableView.prototype.getSorting = function() {
};
DataTableView.prototype.resize = function() {
var topHeight = this._div.find(".viewPanel-header").outerHeight(true);
var topHeight = this._div.find(".viewpanel-header").outerHeight(true);
var tableContainerIntendedHeight = this._div.innerHeight() - topHeight;
this._div.find(".data-table-container")
.css("height", (this._div.innerHeight() - topHeight - 1) + "px")
.css("display", "block");
var tableContainer = this._div.find(".data-table-container").css("display", "block");
var tableContainerVPadding = tableContainer.outerHeight(true) - tableContainer.height();
tableContainer.height((tableContainerIntendedHeight - tableContainerVPadding) + "px");
};
DataTableView.prototype.update = function(onDone) {
@ -33,7 +34,7 @@ DataTableView.prototype.render = function() {
var scrollLeft = (oldTableDiv.length > 0) ? oldTableDiv[0].scrollLeft : 0;
var html = $(
'<div id="viewpanel-header">' +
'<div class="viewpanel-header">' +
'<div class="viewpanel-rowrecord" bind="rowRecordControls">Show as ' +
'<span bind="modeSelectors"></span>' +
'</div>' +

View File

@ -1,6 +1,6 @@
@import-less url("../theme.less");
#viewpanel-header {
.viewpanel-header {
position: relative;
background: @chrome_secondary;
font-size: 1.3em;