summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordevelop@tzik.jp <develop@tzik.jp@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-11 08:26:45 +0000
committerdevelop@tzik.jp <develop@tzik.jp@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-11 08:26:45 +0000
commitfaf081f3ae3181180e45a50cc27629a3013fbea1 (patch)
tree763f9480bc119811919d8c56798332eebdc2e3ba
parent1087a763ae4366d681d176e101d9cf029e63e0be (diff)
downloadchromium_src-faf081f3ae3181180e45a50cc27629a3013fbea1.zip
chromium_src-faf081f3ae3181180e45a50cc27629a3013fbea1.tar.gz
chromium_src-faf081f3ae3181180e45a50cc27629a3013fbea1.tar.bz2
Enable History Deletion from Search Result
BUG=4728 TEST=None Review URL: http://codereview.chromium.org/6801071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81077 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/history.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/resources/history.html b/chrome/browser/resources/history.html
index bc65141..9a63077 100644
--- a/chrome/browser/resources/history.html
+++ b/chrome/browser/resources/history.html
@@ -110,6 +110,15 @@ Page.prototype.getSearchResultDOM = function() {
var datecell = createElementWithClassName('td', 'time');
datecell.appendChild(document.createTextNode(this.dateShort));
row.appendChild(datecell);
+ if (this.model_.getEditMode()) {
+ var checkbox = document.createElement('input');
+ checkbox.type = "checkbox";
+ checkbox.name = this.id_;
+ checkbox.time = this.time.toString();
+ checkbox.addEventListener("click", checkboxClicked, false);
+ id2checkbox[this.id_] = checkbox;
+ datecell.appendChild(checkbox);
+ }
var titleCell = document.createElement('td');
titleCell.valign = 'top';
@@ -484,9 +493,6 @@ HistoryView.prototype.setSearch = function(term, opt_page) {
this.pageIndex_ = parseInt(opt_page || 0, 10);
window.scrollTo(0, 0);
this.model_.setSearchText(term, this.pageIndex_);
- if (term) {
- this.setEditMode(false);
- }
this.updateEditControls_();
pageState.setUIState(this.model_.getEditMode(), term, this.pageIndex_);
};
@@ -640,12 +646,6 @@ HistoryView.prototype.displaySummaryBar_ = function() {
HistoryView.prototype.updateEditControls_ = function() {
// Display a button (looking like a link) to enable/disable edit mode.
var oldButton = this.editButtonTd_.firstChild;
- if (this.model_.getSearchText()) {
- this.editButtonTd_.replaceChild(document.createElement('p'), oldButton);
- this.editingControlsDiv_.textContent = '';
- return;
- }
-
var editMode = this.model_.getEditMode();
var button = createElementWithClassName('button', 'edit-button');
button.onclick = toggleEditMode;