| 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 cr.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Creates a MarginSettings object. This object encapsulates all settings and | 9 * Creates a MarginSettings object. This object encapsulates all settings and |
| 10 * logic related to the margins mode. | 10 * logic related to the margins mode. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * @private | 22 * @private |
| 23 */ | 23 */ |
| 24 this.marginsTypeTicketItem_ = marginsTypeTicketItem; | 24 this.marginsTypeTicketItem_ = marginsTypeTicketItem; |
| 25 } | 25 } |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * CSS classes used by the margin settings component. | 28 * CSS classes used by the margin settings component. |
| 29 * @enum {string} | 29 * @enum {string} |
| 30 * @private | 30 * @private |
| 31 */ | 31 */ |
| 32 MarginSettings.Classes_ = { | 32 MarginSettings.Classes_ = {SELECT: 'margin-settings-select'}; |
| 33 SELECT: 'margin-settings-select' | |
| 34 }; | |
| 35 | 33 |
| 36 MarginSettings.prototype = { | 34 MarginSettings.prototype = { |
| 37 __proto__: print_preview.SettingsSection.prototype, | 35 __proto__: print_preview.SettingsSection.prototype, |
| 38 | 36 |
| 39 /** @override */ | 37 /** @override */ |
| 40 isAvailable: function() { | 38 isAvailable: function() { |
| 41 return this.marginsTypeTicketItem_.isCapabilityAvailable(); | 39 return this.marginsTypeTicketItem_.isCapabilityAvailable(); |
| 42 }, | 40 }, |
| 43 | 41 |
| 44 /** @override */ | 42 /** @override */ |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 if (marginsType != selectedMarginsType) { | 99 if (marginsType != selectedMarginsType) { |
| 102 select.options[selectedMarginsType].selected = false; | 100 select.options[selectedMarginsType].selected = false; |
| 103 select.options[marginsType].selected = true; | 101 select.options[marginsType].selected = true; |
| 104 } | 102 } |
| 105 } | 103 } |
| 106 this.updateUiStateInternal(); | 104 this.updateUiStateInternal(); |
| 107 } | 105 } |
| 108 }; | 106 }; |
| 109 | 107 |
| 110 // Export | 108 // Export |
| 111 return { | 109 return {MarginSettings: MarginSettings}; |
| 112 MarginSettings: MarginSettings | |
| 113 }; | |
| 114 }); | 110 }); |
| OLD | NEW |