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

Side by Side Diff: chrome/browser/resources/shared/js/cr/ui/menu_item.js

Issue 9609023: css hack n' slash, continued: New styles for checkboxes and radios. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: csilv review Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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('cr.ui', function() { 5 cr.define('cr.ui', function() {
6 const Command = cr.ui.Command; 6 const Command = cr.ui.Command;
7 7
8 /** 8 /**
9 * Creates a new menu item element. 9 * Creates a new menu item element.
10 * @param {Object=} opt_propertyBag Optional properties. 10 * @param {Object=} opt_propertyBag Optional properties.
(...skipping 18 matching lines...) Expand all
29 /** 29 /**
30 * Initializes the menu item. 30 * Initializes the menu item.
31 */ 31 */
32 decorate: function() { 32 decorate: function() {
33 var commandId; 33 var commandId;
34 if ((commandId = this.getAttribute('command'))) 34 if ((commandId = this.getAttribute('command')))
35 this.command = commandId; 35 this.command = commandId;
36 36
37 this.addEventListener('mouseup', this.handleMouseUp_); 37 this.addEventListener('mouseup', this.handleMouseUp_);
38 38
39 // Adding the 'custom-appearance' class prevents button.css from changing 39 // Adding the 'custom-appearance' class prevents widgets.css from changing
40 // the appearance of this element. 40 // the appearance of this element.
41 this.classList.add('custom-appearance'); 41 this.classList.add('custom-appearance');
42 }, 42 },
43 43
44 /** 44 /**
45 * The command associated with this menu item. If this is set to a string 45 * The command associated with this menu item. If this is set to a string
46 * of the form "#element-id" then the element is looked up in the document 46 * of the form "#element-id" then the element is looked up in the document
47 * of the command. 47 * of the command.
48 * @type {cr.ui.Command} 48 * @type {cr.ui.Command}
49 */ 49 */
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 * Whether the menu item is checked or not. 159 * Whether the menu item is checked or not.
160 * @type {boolean} 160 * @type {boolean}
161 */ 161 */
162 cr.defineProperty(MenuItem, 'checked', cr.PropertyKind.BOOL_ATTR); 162 cr.defineProperty(MenuItem, 'checked', cr.PropertyKind.BOOL_ATTR);
163 163
164 // Export 164 // Export
165 return { 165 return {
166 MenuItem: MenuItem 166 MenuItem: MenuItem
167 }; 167 };
168 }); 168 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/shared/js/cr/ui/menu_button.js ('k') | chrome/browser/resources/shared_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698