diff --git a/main/webapp/modules/core/scripts/project/history-entry.html b/main/webapp/modules/core/scripts/project/history-entry.html
index 62b825a0a..1ccd60484 100644
--- a/main/webapp/modules/core/scripts/project/history-entry.html
+++ b/main/webapp/modules/core/scripts/project/history-entry.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/main/webapp/modules/core/scripts/project/history-panel.html b/main/webapp/modules/core/scripts/project/history-panel.html
index deaf3fe83..858ed8147 100644
--- a/main/webapp/modules/core/scripts/project/history-panel.html
+++ b/main/webapp/modules/core/scripts/project/history-panel.html
@@ -12,18 +12,10 @@
-
- 0.
- Create Project
-
-
No change to undo
-
-
done upto here
-
+
'
\ No newline at end of file
diff --git a/main/webapp/modules/core/scripts/project/history-panel.js b/main/webapp/modules/core/scripts/project/history-panel.js
index cc7ebd723..b5b2b66e9 100644
--- a/main/webapp/modules/core/scripts/project/history-panel.js
+++ b/main/webapp/modules/core/scripts/project/history-panel.js
@@ -44,47 +44,55 @@ HistoryPanel.prototype._render = function() {
var renderEntry = function(container, index, entry, lastDoneID, past) {
var a = $(DOM.loadHTML("core", "scripts/project/history-entry.html")).appendTo(container);
- a.attr("title", past ? "Undo to here" : "Redo to here")
- .click(function(evt) {
- return self._onClickHistoryEntry(evt, entry, lastDoneID);
- })
- .mouseover(function() {
- if (past) {
- elmts.pastHighlightDiv.show().height(elmts.pastDiv.height() - this.offsetTop);
- } else {
- elmts.futureHighlightDiv.show().height(this.offsetTop + this.offsetHeight);
- }
- })
- .mouseout(function() {
- if (past) {
- elmts.pastHighlightDiv.hide();
- } else {
- elmts.futureHighlightDiv.hide();
- }
- });
-
+ if (lastDoneID >= 0) {
+ a.attr("href", "javascript:{}")
+ .click(function(evt) {
+ return self._onClickHistoryEntry(evt, entry, lastDoneID);
+ })
+ .mouseover(function() {
+ if (past) {
+ elmts.pastHighlightDiv.show().height(elmts.pastDiv.height() - this.offsetTop - this.offsetHeight);
+ } else {
+ elmts.futureHighlightDiv.show().height(this.offsetTop + this.offsetHeight);
+ }
+ })
+ .mouseout(function() {
+ if (past) {
+ elmts.pastHighlightDiv.hide();
+ } else {
+ elmts.futureHighlightDiv.hide();
+ }
+ });
+ }
+
a[0].appendChild(document.createTextNode(entry.description));
- a[0].firstChild.appendChild(document.createTextNode((index + 1) + "."));
+ a[0].firstChild.appendChild(document.createTextNode(index + "."));
return a;
};
if (this._data.past.length > 0 || this._data.future.length > 0) {
if (!this._data.past.length) {
- elmts.noUndoDiv.show();
+ renderEntry(elmts.nowDiv, 0, {
+ description: "Create project"
+ }, 0, true);
} else {
- for (var i = 0; i < this._data.past.length; i++) {
+ renderEntry(elmts.pastDiv, 0, {
+ description: "Create project"
+ }, 0, true);
+
+ for (var i = 0; i < this._data.past.length - 1; i++) {
var entry = this._data.past[i];
- renderEntry(elmts.pastDiv, i, entry, i === 0 ? 0 : this._data.past[i - 1].id, true);
+ renderEntry(elmts.pastDiv, i + 1, entry, entry.id, true);
}
+
+ renderEntry(elmts.nowDiv, this._data.past.length, this._data.past[this._data.past.length - 1], -1);
}
- if (!this._data.future.length) {
- elmts.noRedoDiv.show();
- } else {
+ if (this._data.future.length) {
for (var i = 0; i < this._data.future.length; i++) {
var entry = this._data.future[i];
- renderEntry(elmts.futureDiv, this._data.past.length + i, entry, entry.id, false);
+ renderEntry(elmts.futureDiv, this._data.past.length + i + 1, entry, entry.id, false);
}
}
diff --git a/main/webapp/modules/core/styles/project/sidebar.less b/main/webapp/modules/core/styles/project/sidebar.less
index a53fe2e89..7398e9e75 100644
--- a/main/webapp/modules/core/styles/project/sidebar.less
+++ b/main/webapp/modules/core/styles/project/sidebar.less
@@ -102,14 +102,7 @@
background: @history_done_background;
}
.history-now {
- padding: 3px 0;
background: @history_now_background;
- color: white;
- font-size: 80%;
- text-transform: uppercase;
- text-align: center;
- font-variant: small-caps;
- font-weight: bold;
}
.history-future {
position: relative;
@@ -149,16 +142,11 @@ a.history-entry {
color: black;
border-top: 1px dotted #ddd;
}
-.history-future a.history-entry {
- color: @near_black;
+.history-future a.history-entry, .history-future a.history-entry-index {
+ color: @light_grey;
}
-.history-past a.history-entry:hover{
- padding-top: @history_entry_vpadding - 2px;
- border-top: 2px solid @history_now_background;
-}
-.history-future a.history-entry:hover{
- padding-bottom: @history_entry_vpadding - 2px;
+.history-past a.history-entry:hover, .history-future a.history-entry:hover {
border-bottom: 2px solid @history_now_background;
}