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

Side by Side Diff: chrome/browser/resources/print_preview/search/fedex_tos.js

Issue 590643002: Move Print Preview onto newer i18nTemplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update new invitations code Created 6 years, 3 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
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('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Widget that renders a terms-of-service agreement for using the FedEx Office 9 * Widget that renders a terms-of-service agreement for using the FedEx Office
10 * print destination. 10 * print destination.
(...skipping 23 matching lines...) Expand all
34 this.getElement().style.height = heightHelperEl.offsetHeight + 'px'; 34 this.getElement().style.height = heightHelperEl.offsetHeight + 'px';
35 } else { 35 } else {
36 this.getElement().style.height = 0; 36 this.getElement().style.height = 0;
37 } 37 }
38 }, 38 },
39 39
40 /** @override */ 40 /** @override */
41 createDom: function() { 41 createDom: function() {
42 this.setElementInternal(this.cloneTemplateInternal('fedex-tos-template')); 42 this.setElementInternal(this.cloneTemplateInternal('fedex-tos-template'));
43 var tosTextEl = this.getElement().querySelector('.tos-text'); 43 var tosTextEl = this.getElement().querySelector('.tos-text');
44 tosTextEl.innerHTML = localStrings.getStringF( 44 tosTextEl.innerHTML = loadTimeData.getStringF(
45 'fedexTos', 45 'fedexTos',
46 '<a href="http://www.fedex.com/us/office/copyprint/online/' + 46 '<a href="http://www.fedex.com/us/office/copyprint/online/' +
47 'googlecloudprint/termsandconditions">', 47 'googlecloudprint/termsandconditions">',
48 '</a>'); 48 '</a>');
49 }, 49 },
50 50
51 /** @override */ 51 /** @override */
52 enterDocument: function() { 52 enterDocument: function() {
53 var agreeCheckbox = this.getElement().querySelector('.agree-checkbox'); 53 var agreeCheckbox = this.getElement().querySelector('.agree-checkbox');
54 this.tracker.add( 54 this.tracker.add(
55 agreeCheckbox, 'click', this.onAgreeCheckboxClick_.bind(this)); 55 agreeCheckbox, 'click', this.onAgreeCheckboxClick_.bind(this));
56 }, 56 },
57 57
58 /** 58 /**
59 * Called when the agree checkbox is clicked. Dispatches a AGREE event. 59 * Called when the agree checkbox is clicked. Dispatches a AGREE event.
60 * @private 60 * @private
61 */ 61 */
62 onAgreeCheckboxClick_: function() { 62 onAgreeCheckboxClick_: function() {
63 cr.dispatchSimpleEvent(this, FedexTos.EventType.AGREE); 63 cr.dispatchSimpleEvent(this, FedexTos.EventType.AGREE);
64 } 64 }
65 }; 65 };
66 66
67 // Export 67 // Export
68 return { 68 return {
69 FedexTos: FedexTos 69 FedexTos: FedexTos
70 }; 70 };
71 }); 71 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698