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('options.network', function() { | 5 cr.define('options.network', function() { |
6 | 6 |
7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
8 var List = cr.ui.List; | 8 var List = cr.ui.List; |
9 var ListItem = cr.ui.ListItem; | 9 var ListItem = cr.ui.ListItem; |
10 var Menu = cr.ui.Menu; | 10 var Menu = cr.ui.Menu; |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 iconType: 'add-connection', | 755 iconType: 'add-connection', |
756 menu: [{label: loadTimeData.getString('addConnectionWifi'), | 756 menu: [{label: loadTimeData.getString('addConnectionWifi'), |
757 command: addConnection(Constants.TYPE_WIFI)}, | 757 command: addConnection(Constants.TYPE_WIFI)}, |
758 {label: loadTimeData.getString('addConnectionVPN'), | 758 {label: loadTimeData.getString('addConnectionVPN'), |
759 command: addConnection(Constants.TYPE_VPN)}] | 759 command: addConnection(Constants.TYPE_VPN)}] |
760 }); | 760 }); |
761 | 761 |
762 var prefs = options.Preferences.getInstance(); | 762 var prefs = options.Preferences.getInstance(); |
763 prefs.addEventListener('cros.signed.data_roaming_enabled', | 763 prefs.addEventListener('cros.signed.data_roaming_enabled', |
764 function(event) { | 764 function(event) { |
765 enableDataRoaming_ = event.value && event.value['value'] != | 765 enableDataRoaming_ = event.value.value; |
766 undefined ? event.value['value'] : event.value; | |
767 }); | 766 }); |
768 }, | 767 }, |
769 | 768 |
770 /** | 769 /** |
771 * When the list loses focus, unselect all items in the list and close the | 770 * When the list loses focus, unselect all items in the list and close the |
772 * active menu. | 771 * active menu. |
773 * @private | 772 * @private |
774 */ | 773 */ |
775 onBlur_: function() { | 774 onBlur_: function() { |
776 this.selectionModel.unselectAll(); | 775 this.selectionModel.unselectAll(); |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 * Whether the Network list is disabled. Only used for display purpose. | 1085 * Whether the Network list is disabled. Only used for display purpose. |
1087 * @type {boolean} | 1086 * @type {boolean} |
1088 */ | 1087 */ |
1089 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); | 1088 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); |
1090 | 1089 |
1091 // Export | 1090 // Export |
1092 return { | 1091 return { |
1093 NetworkList: NetworkList | 1092 NetworkList: NetworkList |
1094 }; | 1093 }; |
1095 }); | 1094 }); |
OLD | NEW |