Added help message in history panel.
Better resizing for left panel's tabs. git-svn-id: http://google-refine.googlecode.com/svn/trunk@488 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
f1e05194e4
commit
b7c3f99e3c
@ -45,11 +45,14 @@ function resize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resizeTabs() {
|
function resizeTabs() {
|
||||||
var totalHeight = ui.leftPanelTabs.height();
|
var totalHeight = ui.leftPanel.height();
|
||||||
var headerHeight = ui.leftPanelTabs.find(".ui-tabs-nav").innerHeight();
|
var headerHeight = ui.leftPanelTabs.find(".ui-tabs-nav").outerHeight(true);
|
||||||
var tabPanels = ui.leftPanelTabs.find(".ui-tabs-panel")
|
|
||||||
var paddings = tabPanels.innerHeight(true) - tabPanels.height();
|
var visibleTabPanels = ui.leftPanelTabs.find(".ui-tabs-panel:not(.ui-tabs-hide)");
|
||||||
tabPanels.height(totalHeight - headerHeight - paddings);
|
var paddings = visibleTabPanels.innerHeight(true) - visibleTabPanels.height();
|
||||||
|
|
||||||
|
var allTabPanels = ui.leftPanelTabs.find(".ui-tabs-panel");
|
||||||
|
allTabPanels.height(totalHeight - headerHeight - paddings - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function resizeAll() {
|
function resizeAll() {
|
||||||
|
@ -7,8 +7,9 @@ function HistoryWidget(div, tabHeader) {
|
|||||||
HistoryWidget.prototype.resize = function() {
|
HistoryWidget.prototype.resize = function() {
|
||||||
var body = this._div.find(".history-panel-body");
|
var body = this._div.find(".history-panel-body");
|
||||||
var footer = this._div.find(".history-panel-footer");
|
var footer = this._div.find(".history-panel-footer");
|
||||||
|
var bodyPaddings = body.outerHeight(true) - body.height();
|
||||||
|
|
||||||
body.css("height", (this._div.height() - footer.innerHeight(true)) + "px");
|
body.css("height", (this._div.height() - footer.outerHeight(true) - bodyPaddings) + "px");
|
||||||
};
|
};
|
||||||
|
|
||||||
HistoryWidget.prototype.update = function(onDone) {
|
HistoryWidget.prototype.update = function(onDone) {
|
||||||
@ -35,6 +36,11 @@ HistoryWidget.prototype._render = function() {
|
|||||||
.empty()
|
.empty()
|
||||||
.unbind()
|
.unbind()
|
||||||
.html(
|
.html(
|
||||||
|
'<div class="history-panel-help" bind="helpDiv">' +
|
||||||
|
'<h1>Don\'t worry ...</h1>' +
|
||||||
|
'<p>about making mistakes. Every change you make will be shown here, and you can undo changes at any point.</p>' +
|
||||||
|
'<p><a href="">Learn more »</a></p>' +
|
||||||
|
'</div>' +
|
||||||
'<div class="history-panel-body" bind="bodyDiv">' +
|
'<div class="history-panel-body" bind="bodyDiv">' +
|
||||||
'<div class="history-past" bind="pastDiv"></div>' +
|
'<div class="history-past" bind="pastDiv"></div>' +
|
||||||
'<div class="history-now" bind="nowDiv">done upto here</div>' +
|
'<div class="history-now" bind="nowDiv">done upto here</div>' +
|
||||||
@ -56,6 +62,7 @@ HistoryWidget.prototype._render = function() {
|
|||||||
return a;
|
return a;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (this._data.past.length > 0 || this._data.future.length > 0) {
|
||||||
if (!this._data.past.length) {
|
if (!this._data.past.length) {
|
||||||
elmts.pastDiv.html('<div class="history-panel-message">No change to undo</div>');
|
elmts.pastDiv.html('<div class="history-panel-message">No change to undo</div>');
|
||||||
} else {
|
} else {
|
||||||
@ -74,12 +81,20 @@ HistoryWidget.prototype._render = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
elmts.helpDiv.hide();
|
||||||
|
} else {
|
||||||
|
elmts.bodyDiv.hide();
|
||||||
|
}
|
||||||
|
|
||||||
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();
|
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
HistoryWidget.prototype._onClickHistoryEntry = function(evt, entry, lastDoneID) {
|
HistoryWidget.prototype._onClickHistoryEntry = function(evt, entry, lastDoneID) {
|
||||||
|
@ -48,7 +48,7 @@ body {
|
|||||||
.left-panel {
|
.left-panel {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background: white;
|
background: white;
|
||||||
overflow: visible;
|
overflow: hidden;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
@ -111,6 +111,7 @@ body {
|
|||||||
background: #DBE8EB;
|
background: #DBE8EB;
|
||||||
-moz-border-radius-bottomleft: 7px;
|
-moz-border-radius-bottomleft: 7px;
|
||||||
-webkit-border-bottom-left-radius: 7px;
|
-webkit-border-bottom-left-radius: 7px;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.facet-panel {
|
.facet-panel {
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
.history-panel-help {
|
||||||
|
padding: 10px;
|
||||||
|
background: white;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
}
|
||||||
|
.history-panel-help h1 {
|
||||||
|
margin-top: 0px;
|
||||||
|
font-size: 150%;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
.history-panel-body {
|
.history-panel-body {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
Loading…
Reference in New Issue
Block a user