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

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

Issue 14589007: Files.app: Fixed the icon of image open item in default action dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 'use strict'; 5 'use strict';
6 6
7 7
8 /** 8 /**
9 * DefaultActionDialog contains a message, a list box, an ok button, and a 9 * DefaultActionDialog contains a message, a list box, an ok button, and a
10 * cancel button. 10 * cancel button.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 /** 62 /**
63 * Renders item for list. 63 * Renders item for list.
64 * @param {Object} item Item to render. 64 * @param {Object} item Item to render.
65 */ 65 */
66 DefaultActionDialog.prototype.renderItem = function(item) { 66 DefaultActionDialog.prototype.renderItem = function(item) {
67 var result = this.document_.createElement('li'); 67 var result = this.document_.createElement('li');
68 68
69 var div = this.document_.createElement('div'); 69 var div = this.document_.createElement('div');
70 div.textContent = item.label; 70 div.textContent = item.label;
71 71
72 if (item.iconType) 72 if (item.iconType) {
73 div.setAttribute('file-type-icon', item.iconType); 73 div.setAttribute('file-type-icon', item.iconType);
74 74 } else if (item.iconUrl) {
75 if (item.iconUrl)
76 div.style.backgroundImage = 'url(' + item.iconUrl + ')'; 75 div.style.backgroundImage = 'url(' + item.iconUrl + ')';
76 }
77 77
78 if (item.class) 78 if (item.class)
79 div.classList.add(item.class); 79 div.classList.add(item.class);
80 80
81 result.appendChild(div); 81 result.appendChild(div);
82 82
83 cr.defineProperty(result, 'lead', cr.PropertyKind.BOOL_ATTR); 83 cr.defineProperty(result, 'lead', cr.PropertyKind.BOOL_ATTR);
84 cr.defineProperty(result, 'selected', cr.PropertyKind.BOOL_ATTR); 84 cr.defineProperty(result, 'selected', cr.PropertyKind.BOOL_ATTR);
85 85
86 return result; 86 return result;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 this.onCancelClick_(event); 144 this.onCancelClick_(event);
145 event.preventDefault(); 145 event.preventDefault();
146 } else if (event.keyCode == 32 || event.keyCode == 13) { 146 } else if (event.keyCode == 32 || event.keyCode == 13) {
147 this.onOkClick_(); 147 this.onOkClick_();
148 event.preventDefault(); 148 event.preventDefault();
149 } 149 }
150 }; 150 };
151 151
152 return {DefaultActionDialog: DefaultActionDialog}; 152 return {DefaultActionDialog: DefaultActionDialog};
153 }); 153 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698