| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'settings-ui' implements the UI for the Settings page. | 7 * 'settings-ui' implements the UI for the Settings page. |
| 8 * | 8 * |
| 9 * Example: | 9 * Example: |
| 10 * | 10 * |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 created: function() { | 56 created: function() { |
| 57 settings.initializeRouteFromUrl(); | 57 settings.initializeRouteFromUrl(); |
| 58 }, | 58 }, |
| 59 | 59 |
| 60 /** | 60 /** |
| 61 * @override | 61 * @override |
| 62 * @suppress {es5Strict} Object literals cannot contain duplicate keys in ES5 | 62 * @suppress {es5Strict} Object literals cannot contain duplicate keys in ES5 |
| 63 * strict mode. | 63 * strict mode. |
| 64 */ | 64 */ |
| 65 ready: function() { | 65 ready: function() { |
| 66 this.$$('cr-toolbar').addEventListener('search-changed', function(e) { | 66 var toolbar = this.$$('cr-toolbar'); |
| 67 toolbar.showMenuPromo = false; |
| 68 toolbar.addEventListener('search-changed', function(e) { |
| 67 this.$$('settings-main').searchContents(e.detail); | 69 this.$$('settings-main').searchContents(e.detail); |
| 68 }.bind(this)); | 70 }.bind(this)); |
| 69 | 71 |
| 70 // Lazy-create the drawer the first time it is opened or swiped into view. | 72 // Lazy-create the drawer the first time it is opened or swiped into view. |
| 71 var drawer = assert(this.$$('app-drawer')); | 73 var drawer = assert(this.$$('app-drawer')); |
| 72 listenOnce(drawer, 'track opened-changed', function() { | 74 listenOnce(drawer, 'track opened-changed', function() { |
| 73 this.$.drawerTemplate.if = true; | 75 this.$.drawerTemplate.if = true; |
| 74 }.bind(this)); | 76 }.bind(this)); |
| 75 | 77 |
| 76 window.addEventListener('popstate', function(e) { | 78 window.addEventListener('popstate', function(e) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 onMenuButtonTap_: function() { | 130 onMenuButtonTap_: function() { |
| 129 this.$$('app-drawer').toggle(); | 131 this.$$('app-drawer').toggle(); |
| 130 }, | 132 }, |
| 131 | 133 |
| 132 /** @private */ | 134 /** @private */ |
| 133 directionDelegateChanged_: function() { | 135 directionDelegateChanged_: function() { |
| 134 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? | 136 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? |
| 135 'right' : 'left'; | 137 'right' : 'left'; |
| 136 }, | 138 }, |
| 137 }); | 139 }); |
| OLD | NEW |