OLD | NEW |
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('options.search_engines', function() { | 5 cr.define('options.search_engines', function() { |
6 const InlineEditableItemList = options.InlineEditableItemList; | 6 const InlineEditableItemList = options.InlineEditableItemList; |
7 const InlineEditableItem = options.InlineEditableItem; | 7 const InlineEditableItem = options.InlineEditableItem; |
8 const ListSelectionController = cr.ui.ListSelectionController; | 8 const ListSelectionController = cr.ui.ListSelectionController; |
9 | 9 |
10 /** | 10 /** |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 var urlEl = this.createEditableTextCell(engine['url']); | 115 var urlEl = this.createEditableTextCell(engine['url']); |
116 var urlWithButtonEl = this.ownerDocument.createElement('div'); | 116 var urlWithButtonEl = this.ownerDocument.createElement('div'); |
117 urlWithButtonEl.appendChild(urlEl); | 117 urlWithButtonEl.appendChild(urlEl); |
118 urlWithButtonEl.className = 'url-column'; | 118 urlWithButtonEl.className = 'url-column'; |
119 urlWithButtonEl.classList.add('weakrtl'); | 119 urlWithButtonEl.classList.add('weakrtl'); |
120 this.contentElement.appendChild(urlWithButtonEl); | 120 this.contentElement.appendChild(urlWithButtonEl); |
121 // Add the Make Default button. Temporary until drag-and-drop re-ordering | 121 // Add the Make Default button. Temporary until drag-and-drop re-ordering |
122 // is implemented. When this is removed, remove the extra div above. | 122 // is implemented. When this is removed, remove the extra div above. |
123 if (engine['canBeDefault']) { | 123 if (engine['canBeDefault']) { |
124 var makeDefaultButtonEl = this.ownerDocument.createElement('button'); | 124 var makeDefaultButtonEl = this.ownerDocument.createElement('button'); |
125 makeDefaultButtonEl.className = "raw-button"; | 125 makeDefaultButtonEl.className = 'raw-button custom-appearance'; |
126 makeDefaultButtonEl.textContent = | 126 makeDefaultButtonEl.textContent = |
127 templateData.makeDefaultSearchEngineButton; | 127 templateData.makeDefaultSearchEngineButton; |
128 makeDefaultButtonEl.onclick = function(e) { | 128 makeDefaultButtonEl.onclick = function(e) { |
129 chrome.send('managerSetDefaultSearchEngine', [engine['modelIndex']]); | 129 chrome.send('managerSetDefaultSearchEngine', [engine['modelIndex']]); |
130 }; | 130 }; |
131 // Don't select the row when clicking the button. | 131 // Don't select the row when clicking the button. |
132 makeDefaultButtonEl.onmousedown = function(e) { | 132 makeDefaultButtonEl.onmousedown = function(e) { |
133 e.stopPropagation(); | 133 e.stopPropagation(); |
134 }; | 134 }; |
135 urlWithButtonEl.appendChild(makeDefaultButtonEl); | 135 urlWithButtonEl.appendChild(makeDefaultButtonEl); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 }, | 307 }, |
308 }; | 308 }; |
309 | 309 |
310 // Export | 310 // Export |
311 return { | 311 return { |
312 SearchEngineList: SearchEngineList | 312 SearchEngineList: SearchEngineList |
313 }; | 313 }; |
314 | 314 |
315 }); | 315 }); |
316 | 316 |
OLD | NEW |