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 * Namespace for utility functions. | 8 * Namespace for utility functions. |
9 */ | 9 */ |
10 var filelist = {}; | 10 var filelist = {}; |
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 */ | 976 */ |
977 get: function() { | 977 get: function() { |
978 return this.hasAttribute('selected'); | 978 return this.hasAttribute('selected'); |
979 }, | 979 }, |
980 | 980 |
981 /** | 981 /** |
982 * @this {ListItem} | 982 * @this {ListItem} |
983 */ | 983 */ |
984 set: function(v) { | 984 set: function(v) { |
985 if (v) | 985 if (v) |
986 this.setAttribute('selected'); | 986 this.setAttribute('selected', ''); |
987 else | 987 else |
988 this.removeAttribute('selected'); | 988 this.removeAttribute('selected'); |
989 var checkBox = this.querySelector('input.file-checkbox'); | 989 var checkBox = this.querySelector('input.file-checkbox'); |
990 if (checkBox) | 990 if (checkBox) |
991 checkBox.checked = !!v; | 991 checkBox.checked = !!v; |
992 } | 992 } |
993 }); | 993 }); |
994 }; | 994 }; |
995 | 995 |
996 /** | 996 /** |
(...skipping 30 matching lines...) Expand all Loading... |
1027 // crbug.com/246611. | 1027 // crbug.com/246611. |
1028 } | 1028 } |
1029 | 1029 |
1030 if (driveProps.customIconUrl) { | 1030 if (driveProps.customIconUrl) { |
1031 var iconDiv = li.querySelector('.detail-icon'); | 1031 var iconDiv = li.querySelector('.detail-icon'); |
1032 if (!iconDiv) | 1032 if (!iconDiv) |
1033 return; | 1033 return; |
1034 iconDiv.style.backgroundImage = 'url(' + driveProps.customIconUrl + ')'; | 1034 iconDiv.style.backgroundImage = 'url(' + driveProps.customIconUrl + ')'; |
1035 } | 1035 } |
1036 }; | 1036 }; |
OLD | NEW |