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

Side by Side Diff: chrome/browser/resources/options2/autofill_options_list.js

Issue 10391044: retry 136193 - convert localStrings to loadTimeData for options page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync 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 cr.define('options.autofillOptions', function() { 5 cr.define('options.autofillOptions', function() {
6 /** @const */ var DeletableItem = options.DeletableItem; 6 /** @const */ var DeletableItem = options.DeletableItem;
7 /** @const */ var DeletableItemList = options.DeletableItemList; 7 /** @const */ var DeletableItemList = options.DeletableItemList;
8 /** @const */ var InlineEditableItem = options.InlineEditableItem; 8 /** @const */ var InlineEditableItem = options.InlineEditableItem;
9 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; 9 /** @const */ var InlineEditableItemList = options.InlineEditableItemList;
10 10
11 function AutofillEditProfileButton(guid, edit) { 11 function AutofillEditProfileButton(guid, edit) {
12 var editButtonEl = document.createElement('button'); 12 var editButtonEl = document.createElement('button');
13 editButtonEl.className = 'list-inline-button custom-appearance'; 13 editButtonEl.className = 'list-inline-button custom-appearance';
14 editButtonEl.textContent = templateData.autofillEditProfileButton; 14 editButtonEl.textContent =
15 loadTimeData.getString('autofillEditProfileButton');
15 editButtonEl.onclick = function(e) { edit(guid); }; 16 editButtonEl.onclick = function(e) { edit(guid); };
16 17
17 // Don't select the row when clicking the button. 18 // Don't select the row when clicking the button.
18 editButtonEl.onmousedown = function(e) { 19 editButtonEl.onmousedown = function(e) {
19 e.stopPropagation(); 20 e.stopPropagation();
20 }; 21 };
21 22
22 return editButtonEl; 23 return editButtonEl;
23 } 24 }
24 25
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 cell = this.createEditableTextCell(this.middle); 255 cell = this.createEditableTextCell(this.middle);
255 this.contentElement.appendChild(cell); 256 this.contentElement.appendChild(cell);
256 this.middleNameInput = cell.querySelector('input'); 257 this.middleNameInput = cell.querySelector('input');
257 258
258 cell = this.createEditableTextCell(this.last); 259 cell = this.createEditableTextCell(this.last);
259 this.contentElement.appendChild(cell); 260 this.contentElement.appendChild(cell);
260 this.lastNameInput = cell.querySelector('input'); 261 this.lastNameInput = cell.querySelector('input');
261 262
262 if (this.isPlaceholder) { 263 if (this.isPlaceholder) {
263 this.firstNameInput.placeholder = 264 this.firstNameInput.placeholder =
264 templateData.autofillAddFirstNamePlaceholder; 265 loadTimeData.getString('autofillAddFirstNamePlaceholder');
265 this.middleNameInput.placeholder = 266 this.middleNameInput.placeholder =
266 templateData.autofillAddMiddleNamePlaceholder; 267 loadTimeData.getString('autofillAddMiddleNamePlaceholder');
267 this.lastNameInput.placeholder = 268 this.lastNameInput.placeholder =
268 templateData.autofillAddLastNamePlaceholder; 269 loadTimeData.getString('autofillAddLastNamePlaceholder');
269 this.deletable = false; 270 this.deletable = false;
270 } 271 }
271 272
272 this.addEventListener('commitedit', this.onEditCommitted_); 273 this.addEventListener('commitedit', this.onEditCommitted_);
273 }, 274 },
274 275
275 /** @inheritDoc */ 276 /** @inheritDoc */
276 value_: function() { 277 value_: function() {
277 return [this.firstNameInput.value, 278 return [this.firstNameInput.value,
278 this.middleNameInput.value, 279 this.middleNameInput.value,
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 CreditCardListItem: CreditCardListItem, 497 CreditCardListItem: CreditCardListItem,
497 ValuesListItem: ValuesListItem, 498 ValuesListItem: ValuesListItem,
498 NameListItem: NameListItem, 499 NameListItem: NameListItem,
499 AutofillAddressList: AutofillAddressList, 500 AutofillAddressList: AutofillAddressList,
500 AutofillCreditCardList: AutofillCreditCardList, 501 AutofillCreditCardList: AutofillCreditCardList,
501 AutofillValuesList: AutofillValuesList, 502 AutofillValuesList: AutofillValuesList,
502 AutofillNameValuesList: AutofillNameValuesList, 503 AutofillNameValuesList: AutofillNameValuesList,
503 AutofillPhoneValuesList: AutofillPhoneValuesList, 504 AutofillPhoneValuesList: AutofillPhoneValuesList,
504 }; 505 };
505 }); 506 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/autofill_options.js ('k') | chrome/browser/resources/options2/browser_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698