| 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 * Component used for searching for a print destination. | 9 * Component used for searching for a print destination. |
| 10 * This is a modal dialog that allows the user to search and select a | 10 * This is a modal dialog that allows the user to search and select a |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Data store containing the destinations to search through. | 26 * Data store containing the destinations to search through. |
| 27 * @type {!print_preview.DestinationStore} | 27 * @type {!print_preview.DestinationStore} |
| 28 * @private | 28 * @private |
| 29 */ | 29 */ |
| 30 this.destinationStore_ = destinationStore; | 30 this.destinationStore_ = destinationStore; |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * Data store holding printer sharing invitations. | 33 * Data store holding printer sharing invitations. |
| 34 * @type {!print_preview.DestinationStore} | 34 * @type {!print_preview.InvitationStore} |
| 35 * @private | 35 * @private |
| 36 */ | 36 */ |
| 37 this.invitationStore_ = invitationStore; | 37 this.invitationStore_ = invitationStore; |
| 38 | 38 |
| 39 /** | 39 /** |
| 40 * Event target that contains information about the logged in user. | 40 * Event target that contains information about the logged in user. |
| 41 * @type {!print_preview.UserInfo} | 41 * @type {!print_preview.UserInfo} |
| 42 * @private | 42 * @private |
| 43 */ | 43 */ |
| 44 this.userInfo_ = userInfo; | 44 this.userInfo_ = userInfo; |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 this.showInvitation_(this.invitation_); | 466 this.showInvitation_(this.invitation_); |
| 467 } else { | 467 } else { |
| 468 this.invitation_ = null; | 468 this.invitation_ = null; |
| 469 } | 469 } |
| 470 setIsVisible( | 470 setIsVisible( |
| 471 this.getChildElement('.invitation-container'), !!this.invitation_); | 471 this.getChildElement('.invitation-container'), !!this.invitation_); |
| 472 this.reflowLists_(); | 472 this.reflowLists_(); |
| 473 }, | 473 }, |
| 474 | 474 |
| 475 /** | 475 /** |
| 476 * @param {!printe_preview.Invitation} invitation Invitation to show. | 476 * @param {!print_preview.Invitation} invitation Invitation to show. |
| 477 * @private | 477 * @private |
| 478 */ | 478 */ |
| 479 showInvitation_: function(invitation) { | 479 showInvitation_: function(invitation) { |
| 480 var invitationText = ''; | 480 var invitationText = ''; |
| 481 if (invitation.asGroupManager) { | 481 if (invitation.asGroupManager) { |
| 482 invitationText = loadTimeData.getStringF( | 482 invitationText = loadTimeData.getStringF( |
| 483 'groupPrinterSharingInviteText', | 483 'groupPrinterSharingInviteText', |
| 484 invitation.sender, | 484 invitation.sender, |
| 485 invitation.destination.displayName, | 485 invitation.destination.displayName, |
| 486 invitation.receiver); | 486 invitation.receiver); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 onWindowResize_: function() { | 687 onWindowResize_: function() { |
| 688 this.reflowLists_(); | 688 this.reflowLists_(); |
| 689 } | 689 } |
| 690 }; | 690 }; |
| 691 | 691 |
| 692 // Export | 692 // Export |
| 693 return { | 693 return { |
| 694 DestinationSearch: DestinationSearch | 694 DestinationSearch: DestinationSearch |
| 695 }; | 695 }; |
| 696 }); | 696 }); |
| OLD | NEW |