Commit d738fd2a authored by Steven Bennetts's avatar Steven Bennetts Committed by Commit Bot

Network Settings: Fix navigation and config title

Bug: 870903, 866839
Change-Id: I9747dfdb7c682c86c3aae201db7e74faa126aaf8
Reviewed-on: https://chromium-review.googlesource.com/1184314Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589351}
parent dd6bfc2f
...@@ -84,7 +84,8 @@ Polymer({ ...@@ -84,7 +84,8 @@ Polymer({
value: null, value: null,
}, },
/** Whether a managed network is available in the visible network list. /**
* Whether a managed network is available in the visible network list.
* @private {boolean} * @private {boolean}
*/ */
managedNetworkAvailable: { managedNetworkAvailable: {
...@@ -256,7 +257,9 @@ Polymer({ ...@@ -256,7 +257,9 @@ Polymer({
// iron-list makes the correct timing to focus an item in the list // iron-list makes the correct timing to focus an item in the list
// very complicated, and the item may not exist, so just focus the // very complicated, and the item may not exist, so just focus the
// entire list for now. // entire list for now.
element = this.$$('settings-internet-subpage').$$('#networkList'); let subPage = this.$$('settings-internet-subpage');
if (subPage)
element = subPage.$$('#networkList');
} else if (this.detailType_) { } else if (this.detailType_) {
element = this.$$('network-summary') element = this.$$('network-summary')
.$$(`#${this.detailType_}`) .$$(`#${this.detailType_}`)
...@@ -287,10 +290,14 @@ Polymer({ ...@@ -287,10 +290,14 @@ Polymer({
*/ */
onShowConfig_: function(event) { onShowConfig_: function(event) {
const properties = event.detail; const properties = event.detail;
let configAndConnect = !properties.GUID; // New configuration if (!properties.GUID) {
// New configuration
this.showConfig_(true /* configAndConnect */, properties.Type);
} else {
this.showConfig_( this.showConfig_(
configAndConnect, properties.Type, properties.GUID, false /* configAndConnect */, properties.Type, properties.GUID,
CrOnc.getNetworkName(properties)); CrOnc.getNetworkName(properties));
}
}, },
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment