Chromium Code Reviews

Side by Side Diff: chrome/browser/resources/options/deletable_item_list.js

Issue 6241006: DOMUI: Polish common HTML controls to match the rest of the DOMUI pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 const List = cr.ui.List; 6 const List = cr.ui.List;
7 const ListItem = cr.ui.ListItem; 7 const ListItem = cr.ui.ListItem;
8 8
9 /** 9 /**
10 * Creates a deletable list item, which has a button that will trigger a call 10 * Creates a deletable list item, which has a button that will trigger a call
(...skipping 41 matching lines...)
52 /** @inheritDoc */ 52 /** @inheritDoc */
53 decorate: function() { 53 decorate: function() {
54 ListItem.prototype.decorate.call(this); 54 ListItem.prototype.decorate.call(this);
55 55
56 this.classList.add('deletable-item'); 56 this.classList.add('deletable-item');
57 57
58 this.contentElement_ = this.ownerDocument.createElement('div'); 58 this.contentElement_ = this.ownerDocument.createElement('div');
59 this.appendChild(this.contentElement_); 59 this.appendChild(this.contentElement_);
60 60
61 this.closeButtonElement_ = this.ownerDocument.createElement('button'); 61 this.closeButtonElement_ = this.ownerDocument.createElement('button');
62 this.closeButtonElement_.className = 'close-button'; 62 this.closeButtonElement_.classList.add('raw-button');
63 this.closeButtonElement_.classList.add('close-button');
63 this.closeButtonElement_.addEventListener('mousedown', 64 this.closeButtonElement_.addEventListener('mousedown',
64 this.handleMouseDownUpOnClose_); 65 this.handleMouseDownUpOnClose_);
65 this.closeButtonElement_.addEventListener('mouseup', 66 this.closeButtonElement_.addEventListener('mouseup',
66 this.handleMouseDownUpOnClose_); 67 this.handleMouseDownUpOnClose_);
67 this.appendChild(this.closeButtonElement_); 68 this.appendChild(this.closeButtonElement_);
68 }, 69 },
69 70
70 /** 71 /**
71 * Returns the element subclasses should add content to. 72 * Returns the element subclasses should add content to.
72 * @return {HTMLElement} The element subclasses should popuplate. 73 * @return {HTMLElement} The element subclasses should popuplate.
(...skipping 72 matching lines...)
145 */ 146 */
146 deleteItemAtIndex: function(index) { 147 deleteItemAtIndex: function(index) {
147 }, 148 },
148 }; 149 };
149 150
150 return { 151 return {
151 DeletableItemList: DeletableItemList, 152 DeletableItemList: DeletableItemList,
152 DeletableItem: DeletableItem, 153 DeletableItem: DeletableItem,
153 }; 154 };
154 }); 155 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/options.html » ('j') | chrome/browser/resources/options/options_page.css » ('J')

Powered by Google App Engine