diff options
author | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 20:32:13 +0000 |
---|---|---|
committer | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 20:32:13 +0000 |
commit | 6341c8dcfe0d225b7eb4e13a955816f462156ac8 (patch) | |
tree | c4f202fc93ab6fed491a2ac340e72ca19dc02b36 | |
parent | 0714640cb5ed3955abc1f599206acbeb52ca97cc (diff) | |
download | chromium_src-6341c8dcfe0d225b7eb4e13a955816f462156ac8.zip chromium_src-6341c8dcfe0d225b7eb4e13a955816f462156ac8.tar.gz chromium_src-6341c8dcfe0d225b7eb4e13a955816f462156ac8.tar.bz2 |
Fixed random jank in internet settings page.
BUG=chromium-os:8025, chromium-os:8010, chromium-os:7880
TEST=none
Review URL: http://codereview.chromium.org/4072003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63554 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/resources/options/chromeos_internet_network_element.js | 9 | ||||
-rw-r--r-- | chrome/browser/resources/options/chromeos_internet_options_page.css | 14 |
2 files changed, 9 insertions, 14 deletions
diff --git a/chrome/browser/resources/options/chromeos_internet_network_element.js b/chrome/browser/resources/options/chromeos_internet_network_element.js index 79ab3b1..3f8a85a 100644 --- a/chrome/browser/resources/options/chromeos_internet_network_element.js +++ b/chrome/browser/resources/options/chromeos_internet_network_element.js @@ -118,6 +118,7 @@ cr.define('options.internet', function() { * @type {number} */ NetworkItem.MIN_WIRELESS_PASSWORD_LENGTH = 5; + NetworkItem.MIN_WIRELESS_SSID_LENGTH = 1; // Cellular activation states: NetworkItem.ACTIVATION_STATE_UNKNOWN = 0; NetworkItem.ACTIVATION_STATE_ACTIVATED = 1; @@ -312,9 +313,6 @@ cr.define('options.internet', function() { passwordDiv.appendChild(ssidInput); var passInput = this.ownerDocument.createElement('input'); passInput.placeholder = localStrings.getString('inetPassPrompt'); - passInput.addEventListener('keydown', function(e) { - e.returnValue = e.keyCode != ' '.charCodeAt(); - }); passwordDiv.appendChild(passInput); var buttonEl = this.ownerDocument.createElement('button'); buttonEl.textContent = localStrings.getString('inetLogin'); @@ -323,6 +321,11 @@ cr.define('options.internet', function() { buttonEl.style.visibility = 'visible'; passwordDiv.appendChild(buttonEl); this.appendChild(passwordDiv); + + ssidInput.addEventListener('keydown', function(e) { + buttonEl.disabled = + ssidInput.value.length < NetworkItem.MIN_WIRELESS_SSID_LENGTH; + }); this.connecting = true; }, diff --git a/chrome/browser/resources/options/chromeos_internet_options_page.css b/chrome/browser/resources/options/chromeos_internet_options_page.css index 3bf3cea..9a2fa2c 100644 --- a/chrome/browser/resources/options/chromeos_internet_options_page.css +++ b/chrome/browser/resources/options/chromeos_internet_options_page.css @@ -20,7 +20,8 @@ } #networkingControls { - text-align: center; + display: -webkit-box; + -webkit-margin-start: 10px; } .networks { @@ -157,14 +158,5 @@ html[dir='rtl'] .details-button { } #wirelessButtons > * > button { - display: block; -} - -#wirelessButtons[wifiEnabled] > * > #enableWifi, -#wirelessButtons:not([wifiEnabled]) > * > #disableWifi, -#wirelessButtons[cellularEnabled] > * > #enableCellular, -#wirelessButtons:not([cellularEnabled]) > * > #disableCellular, -#wirelessButtons:not([cellularAvail]) > * > #disableCellular, -#wirelessButtons:not([cellularAvail]) > * > #enableCellular { - display: none; + margin-left: 5px; } |