OLD | NEW |
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 * FileGrid constructor. | 8 * FileGrid constructor. |
9 * | 9 * |
10 * Represents grid for the Grid Vew in the File Manager. | 10 * Represents grid for the Grid Vew in the File Manager. |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 166 |
167 /** | 167 /** |
168 * @param {Element} li List item element. | 168 * @param {Element} li List item element. |
169 * @param {Entry} entry File entry. | 169 * @param {Entry} entry File entry. |
170 * @param {FileGrid} grid Owner. | 170 * @param {FileGrid} grid Owner. |
171 */ | 171 */ |
172 FileGrid.Item.decorate = function(li, entry, grid) { | 172 FileGrid.Item.decorate = function(li, entry, grid) { |
173 li.__proto__ = FileGrid.Item.prototype; | 173 li.__proto__ = FileGrid.Item.prototype; |
174 FileGrid.decorateThumbnail(li, entry, grid.metadataCache_, true); | 174 FileGrid.decorateThumbnail(li, entry, grid.metadataCache_, true); |
175 | 175 |
176 if (grid.selectionModel.multiple) { | 176 if (!util.platform.newUI() && grid.selectionModel.multiple) { |
177 var checkBox = li.ownerDocument.createElement('input'); | 177 var checkBox = li.ownerDocument.createElement('input'); |
178 filelist.decorateSelectionCheckbox(checkBox, entry, grid); | 178 filelist.decorateSelectionCheckbox(checkBox, entry, grid); |
179 checkBox.classList.add('white'); | 179 checkBox.classList.add('white'); |
180 var bottom = li.querySelector('.thumbnail-bottom'); | 180 var bottom = li.querySelector('.thumbnail-bottom'); |
181 bottom.appendChild(checkBox); | 181 bottom.appendChild(checkBox); |
182 bottom.classList.add('show-checkbox'); | 182 bottom.classList.add('show-checkbox'); |
183 } | 183 } |
184 | 184 |
185 // Override the default role 'listitem' to 'option' to match the parent's | 185 // Override the default role 'listitem' to 'option' to match the parent's |
186 // role (listbox). | 186 // role (listbox). |
187 li.setAttribute('role', 'option'); | 187 li.setAttribute('role', 'option'); |
188 }; | 188 }; |
OLD | NEW |