Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4732)

Unified Diff: chrome/browser/resources/history.js

Issue 8118001: Fix to hide Edit Items button when there are no items in history (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix to hide Edit Items button when there are no items in history Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/history.js
diff --git a/chrome/browser/resources/history.js b/chrome/browser/resources/history.js
index 183f42c6aa8514bfc7aa6b72d75cdd0d86bf1fbf..8bb0a7d356d9a1057810ed978f38e6b1281f3011 100644
--- a/chrome/browser/resources/history.js
+++ b/chrome/browser/resources/history.js
@@ -476,6 +476,7 @@ function HistoryView(model) {
self.updateEntryAnchorWidth_();
};
self.updateEditControls_();
+ this.editButtonTd_.hidden = true;
James Hawkins 2011/10/15 20:39:43 Inconsistent. The line directly above this uses se
NaveenBobbili (Motorola) 2011/10/18 04:12:43 Done.
this.boundUpdateRemoveButton_ = function(e) {
return self.updateRemoveButton_(e);
@@ -583,6 +584,13 @@ HistoryView.prototype.setPageRendered_ = function(page) {
* Update the page with results.
*/
HistoryView.prototype.displayResults_ = function() {
+ // Hide the Edit Button if we are not in edit mode and
James Hawkins 2011/10/15 20:39:43 Don't use 'we' in comments; it's ambiguous.
James Hawkins 2011/10/15 20:39:43 nit: Fill up the 80 cols when writing comments ins
NaveenBobbili (Motorola) 2011/10/18 04:12:43 Done.
NaveenBobbili (Motorola) 2011/10/18 04:12:43 Done.
+ // if there are no history results to show.
+ if (this.model_.getSize() <= 0 && !this.model_.getEditMode())
James Hawkins 2011/10/15 20:39:43 When can getSize() return a number < 0?
James Hawkins 2011/10/15 20:39:43 this.editButtonTd_.hidden = this.model_.getSize().
NaveenBobbili (Motorola) 2011/10/18 04:12:43 Done.
NaveenBobbili (Motorola) 2011/10/18 04:12:43 Done.
+ this.editButtonTd_.hidden = true;
+ else
+ this.editButtonTd_.hidden = false;
+
var results = this.model_.getNumberedRange(
this.pageIndex_ * RESULTS_PER_PAGE,
this.pageIndex_ * RESULTS_PER_PAGE + RESULTS_PER_PAGE);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698