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

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

Issue 8334010: History: Hide 'edit items' button when there are no items to display. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added my primary account in AUTHORS file. 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
« AUTHORS ('K') | « AUTHORS ('k') | 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..e06d5edde9b45f43cfbdbc3bf35a906f977f1174 100644
--- a/chrome/browser/resources/history.js
+++ b/chrome/browser/resources/history.js
@@ -475,7 +475,8 @@ function HistoryView(model) {
window.onresize = function() {
self.updateEntryAnchorWidth_();
};
- self.updateEditControls_();
+ this.updateEditControls_();
+ this.editButtonTd_.hidden = true;
this.boundUpdateRemoveButton_ = function(e) {
return self.updateRemoveButton_(e);
@@ -583,6 +584,9 @@ HistoryView.prototype.setPageRendered_ = function(page) {
* Update the page with results.
*/
HistoryView.prototype.displayResults_ = function() {
+ // Hide the Edit Button if there are no history results to display.
+ this.editButtonTd_.hidden = !this.model_.getSize();
+
var results = this.model_.getNumberedRange(
this.pageIndex_ * RESULTS_PER_PAGE,
this.pageIndex_ * RESULTS_PER_PAGE + RESULTS_PER_PAGE);
« AUTHORS ('K') | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698