OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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', function() { | 5 cr.define('options', function() { |
6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
8 | 8 |
9 /** | 9 /** |
10 * ManagedUserImportOverlay class. | 10 * ManagedUserImportOverlay class. |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 219 |
220 /** | 220 /** |
221 * Closes the overlay if importing the managed user was successful. Also | 221 * Closes the overlay if importing the managed user was successful. Also |
222 * reset the cached list of managed users in order to get an updated list | 222 * reset the cached list of managed users in order to get an updated list |
223 * when the overlay is reopened. | 223 * when the overlay is reopened. |
224 * @private | 224 * @private |
225 */ | 225 */ |
226 onSuccess_: function() { | 226 onSuccess_: function() { |
227 this.updateImportInProgress_(false); | 227 this.updateImportInProgress_(false); |
228 options.ManagedUserListData.resetPromise(); | 228 options.ManagedUserListData.resetPromise(); |
229 OptionsPage.closeOverlay(); | 229 OptionsPage.closeAllOverlays(); |
230 }, | 230 }, |
231 }; | 231 }; |
232 | 232 |
233 // Forward public APIs to private implementations. | 233 // Forward public APIs to private implementations. |
234 [ | 234 [ |
235 'onSuccess', | 235 'onSuccess', |
236 ].forEach(function(name) { | 236 ].forEach(function(name) { |
237 ManagedUserImportOverlay[name] = function() { | 237 ManagedUserImportOverlay[name] = function() { |
238 var instance = ManagedUserImportOverlay.getInstance(); | 238 var instance = ManagedUserImportOverlay.getInstance(); |
239 return instance[name + '_'].apply(instance, arguments); | 239 return instance[name + '_'].apply(instance, arguments); |
240 }; | 240 }; |
241 }); | 241 }); |
242 | 242 |
243 // Export | 243 // Export |
244 return { | 244 return { |
245 ManagedUserImportOverlay: ManagedUserImportOverlay, | 245 ManagedUserImportOverlay: ManagedUserImportOverlay, |
246 }; | 246 }; |
247 }); | 247 }); |
OLD | NEW |