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

Side by Side Diff: chrome/browser/resources/file_manager/js/combobutton.js

Issue 10411018: [FileBrowser] Added DefaultAction dialog to choose default action. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with master. Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 /** 5 /**
6 * @fileoverview This implements a combobutton control. 6 * @fileoverview This implements a combobutton control.
7 */ 7 */
8 8
9 cr.define('cr.ui', function() { 9 cr.define('cr.ui', function() {
10 /** 10 /**
(...skipping 17 matching lines...) Expand all
28 this.menu.clear(); 28 this.menu.clear();
29 this.multiple = false; 29 this.multiple = false;
30 }, 30 },
31 31
32 addDropDownItem: function(item) { 32 addDropDownItem: function(item) {
33 this.multiple = true; 33 this.multiple = true;
34 this.menu.addMenuItem(item).data = item; 34 this.menu.addMenuItem(item).data = item;
35 }, 35 },
36 36
37 /** 37 /**
38 * Adds separator to drop-down list.
39 */
40 addSeparator: function() {
41 this.menu.addSeparator();
42 },
43
44 /**
38 * Default item to fire on combobox click 45 * Default item to fire on combobox click
39 */ 46 */
40 get defaultItem() { 47 get defaultItem() {
41 return this.defaultItem_; 48 return this.defaultItem_;
42 }, 49 },
43 set defaultItem(defaultItem) { 50 set defaultItem(defaultItem) {
44 this.defaultItem_ = defaultItem; 51 this.defaultItem_ = defaultItem;
45 if (defaultItem.label) { 52 if (defaultItem.label) {
46 this.labelNode_.textContent = defaultItem.label; 53 this.labelNode_.textContent = defaultItem.label;
47 } else { 54 } else {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 134 }
128 }; 135 };
129 136
130 cr.defineProperty(ComboButton, 'disabled', cr.PropertyKind.BOOL_ATTR); 137 cr.defineProperty(ComboButton, 'disabled', cr.PropertyKind.BOOL_ATTR);
131 cr.defineProperty(ComboButton, 'multiple', cr.PropertyKind.BOOL_ATTR); 138 cr.defineProperty(ComboButton, 'multiple', cr.PropertyKind.BOOL_ATTR);
132 139
133 return { 140 return {
134 ComboButton: ComboButton 141 ComboButton: ComboButton
135 }; 142 };
136 }); 143 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698