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

Side by Side Diff: chrome/browser/resources/print_preview/settings/destination_settings.js

Issue 387073002: Print preview changes for App Kiosk mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PrintPreviewWebUITest.* Created 6 years, 5 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('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 // TODO(rltoscano): This class needs a throbber while loading the destination 8 // TODO(rltoscano): This class needs a throbber while loading the destination
9 // or another solution is persist the settings of the printer so that next 9 // or another solution is persist the settings of the printer so that next
10 // load is fast. 10 // load is fast.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 offlineStatusEl.title = offlineStatusText; 133 offlineStatusEl.title = offlineStatusText;
134 134
135 var isOffline = destination.isOffline; 135 var isOffline = destination.isOffline;
136 destinationSettingsBoxEl.classList.toggle( 136 destinationSettingsBoxEl.classList.toggle(
137 DestinationSettings.Classes_.STALE, isOffline); 137 DestinationSettings.Classes_.STALE, isOffline);
138 setIsVisible(locationEl, !isOffline); 138 setIsVisible(locationEl, !isOffline);
139 setIsVisible(offlineStatusEl, isOffline); 139 setIsVisible(offlineStatusEl, isOffline);
140 } 140 }
141 141
142 setIsVisible( 142 setIsVisible(
143 this.getChildElement('.throbber-container'), destination == null); 143 this.getChildElement('.throbber-container'),
144 setIsVisible(destinationSettingsBoxEl, destination != null); 144 this.destinationStore_.isAutoSelectDestinationInProgress);
145 setIsVisible(destinationSettingsBoxEl, !!destination);
145 }, 146 },
146 147
147 onSelectedDestinationNameSet_: function() { 148 onSelectedDestinationNameSet_: function() {
148 var destinationName = 149 var destinationName =
149 this.destinationStore_.selectedDestination.displayName; 150 this.destinationStore_.selectedDestination.displayName;
150 var nameEl = this.getElement().getElementsByClassName( 151 var nameEl = this.getElement().getElementsByClassName(
151 DestinationSettings.Classes_.THOBBER_NAME)[0]; 152 DestinationSettings.Classes_.THOBBER_NAME)[0];
152 nameEl.textContent = destinationName; 153 nameEl.textContent = destinationName;
153 nameEl.title = destinationName; 154 nameEl.title = destinationName;
154 } 155 }
155 }; 156 };
156 157
157 // Export 158 // Export
158 return { 159 return {
159 DestinationSettings: DestinationSettings 160 DestinationSettings: DestinationSettings
160 }; 161 };
161 }); 162 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698