Got the history panel to resize properly in its tab.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@463 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
ea2eff6117
commit
84bc49b3d5
src/main/webapp
@ -98,7 +98,7 @@ function initializeUI(uiState) {
|
|||||||
ui.menuBarContainer.css("top", $("#header").outerHeight() + "px");
|
ui.menuBarContainer.css("top", $("#header").outerHeight() + "px");
|
||||||
ui.menuBar = new MenuBar(ui.menuBarPanel); // construct the menu first so we can resize everything else
|
ui.menuBar = new MenuBar(ui.menuBarPanel); // construct the menu first so we can resize everything else
|
||||||
|
|
||||||
ui.leftPanelTabs.tabs();
|
ui.leftPanelTabs.tabs({ selected: 0 });
|
||||||
resize();
|
resize();
|
||||||
resizeTabs();
|
resizeTabs();
|
||||||
|
|
||||||
@ -107,6 +107,14 @@ function initializeUI(uiState) {
|
|||||||
ui.historyWidget = new HistoryWidget(ui.historyPanel, ui.historyTabHeader);
|
ui.historyWidget = new HistoryWidget(ui.historyPanel, ui.historyTabHeader);
|
||||||
ui.dataTableView = new DataTableView(ui.viewPanel);
|
ui.dataTableView = new DataTableView(ui.viewPanel);
|
||||||
|
|
||||||
|
ui.leftPanelTabs.bind('tabsshow', function(event, tabs) {
|
||||||
|
if (tabs.index === 0) {
|
||||||
|
ui.browsingEngine.resize();
|
||||||
|
} else if (tabs.index === 1) {
|
||||||
|
ui.historyWidget.resize();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$(window).bind("resize", resizeAll);
|
$(window).bind("resize", resizeAll);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,10 @@ function HistoryWidget(div, tabHeader) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HistoryWidget.prototype.resize = function() {
|
HistoryWidget.prototype.resize = function() {
|
||||||
|
var body = this._div.find(".history-panel-body");
|
||||||
|
var footer = this._div.find(".history-panel-footer");
|
||||||
|
console.log(this._div.height());
|
||||||
|
body.css("height", (this._div.height() - footer.innerHeight(true)) + "px");
|
||||||
};
|
};
|
||||||
|
|
||||||
HistoryWidget.prototype.update = function(onDone) {
|
HistoryWidget.prototype.update = function(onDone) {
|
||||||
@ -36,7 +40,7 @@ HistoryWidget.prototype._render = function() {
|
|||||||
'<div class="history-now" bind="nowDiv">done upto here</div>' +
|
'<div class="history-now" bind="nowDiv">done upto here</div>' +
|
||||||
'<div class="history-future" bind="futureDiv"></div>' +
|
'<div class="history-future" bind="futureDiv"></div>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="history-panel-footer">' +
|
'<div class="history-panel-footer" bind="footerDiv">' +
|
||||||
'<a href="javascript:{}" bind="extractLink">extract</a> • ' +
|
'<a href="javascript:{}" bind="extractLink">extract</a> • ' +
|
||||||
'<a href="javascript:{}" bind="applyLink">apply</a>' +
|
'<a href="javascript:{}" bind="applyLink">apply</a>' +
|
||||||
'</div>'
|
'</div>'
|
||||||
@ -72,6 +76,9 @@ HistoryWidget.prototype._render = function() {
|
|||||||
|
|
||||||
elmts.extractLink.click(function() { self._extractOperations(); });
|
elmts.extractLink.click(function() { self._extractOperations(); });
|
||||||
elmts.applyLink.click(function() { self._showApplyOperationsDialog(); });
|
elmts.applyLink.click(function() { self._showApplyOperationsDialog(); });
|
||||||
|
|
||||||
|
this.resize();
|
||||||
|
|
||||||
elmts.bodyDiv[0].scrollTop = elmts.nowDiv[0].offsetTop + elmts.nowDiv[0].offsetHeight - elmts.bodyDiv[0].offsetHeight;
|
elmts.bodyDiv[0].scrollTop = elmts.nowDiv[0].offsetTop + elmts.nowDiv[0].offsetHeight - elmts.bodyDiv[0].offsetHeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,17 +1,7 @@
|
|||||||
.history-panel-body {
|
.history-panel-body {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
height: 400px;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.history-panel-body-controls {
|
|
||||||
font-size: 80%;
|
|
||||||
padding: 0.5em;
|
|
||||||
text-align: center;
|
|
||||||
background: #eee;
|
|
||||||
border-left: 1px solid #888;
|
|
||||||
border-right: 1px solid #888;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.history-panel-message {
|
.history-panel-message {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -65,20 +55,10 @@ a.history-entry:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.history-panel-footer {
|
.history-panel-footer {
|
||||||
margin: 0;
|
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
background: #b8b8b8;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 90%;
|
|
||||||
border: 1px solid #888;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
-moz-border-radius-bottomleft: 10px;
|
|
||||||
-webkit-border-bottom-left-radius: 10px;
|
|
||||||
-moz-border-radius-bottomright: 10px;
|
|
||||||
-webkit-border-bottom-right-radius: 10px;
|
|
||||||
}
|
}
|
||||||
.history-panel-footer a {
|
.history-panel-footer a {
|
||||||
color: white;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user