[Chromoting] Improve the text on the buttons in the connection-failed dialog.

BUG=117300


Review URL: http://codereview.chromium.org/9827002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128269 0039d316-1c4b-4281-b951-d872f2087c98
parent 19347a2d
...@@ -470,6 +470,7 @@ ...@@ -470,6 +470,7 @@
'webapp/verify-webapp.py', 'webapp/verify-webapp.py',
'<(PRODUCT_DIR)/remoting/webapp_verified.stamp', '<(PRODUCT_DIR)/remoting/webapp_verified.stamp',
'webapp/_locales/en/messages.json', 'webapp/_locales/en/messages.json',
'webapp/client_screen.js',
'webapp/main.html', 'webapp/main.html',
'webapp/host_table_entry.js', 'webapp/host_table_entry.js',
'webapp/manifest.json', 'webapp/manifest.json',
......
...@@ -312,6 +312,10 @@ ...@@ -312,6 +312,10 @@
"message": "Reconnect", "message": "Reconnect",
"description": "Label for button to reconnect to the previous Me2Me host. This button appears on the 'session-finished' page." "description": "Label for button to reconnect to the previous Me2Me host. This button appears on the 'session-finished' page."
}, },
"RETRY": {
"message": "Retry",
"description": "Label for button to retry connecting to a Me2Me host, after failing to connect to that host. This button appears on the 'session-finished' page."
},
"SIGN_OUT_BUTTON": { "SIGN_OUT_BUTTON": {
"message": "Sign out", "message": "Sign out",
"description": "Sign out button, visible if the user has authenticated. Clicking this clears authentication credentials and returns the web-app to the initial 'unauthenticated' state." "description": "Sign out button, visible if the user has authenticated. Clicking this clears authentication credentials and returns the web-app to the initial 'unauthenticated' state."
......
...@@ -196,6 +196,7 @@ function onClientStateChange_(oldState, newState) { ...@@ -196,6 +196,7 @@ function onClientStateChange_(oldState, newState) {
} else if (newState == remoting.ClientSession.State.CONNECTED) { } else if (newState == remoting.ClientSession.State.CONNECTED) {
if (remoting.clientSession) { if (remoting.clientSession) {
clearPin = true; clearPin = true;
setConnectionInterruptedButtonsText_();
remoting.setMode(remoting.AppMode.IN_SESSION); remoting.setMode(remoting.AppMode.IN_SESSION);
remoting.toolbar.center(); remoting.toolbar.center();
remoting.toolbar.preview(); remoting.toolbar.preview();
...@@ -329,6 +330,20 @@ function showConnectError_(errorTag) { ...@@ -329,6 +330,20 @@ function showConnectError_(errorTag) {
} }
} }
/**
* Set the text on the buttons shown under the error message so that they are
* easy to understand in the case where a successful connection failed, as
* opposed to the case where a connection never succeeded.
*/
function setConnectionInterruptedButtonsText_() {
var button1 = document.getElementById('client-reconnect-button');
l10n.localizeElementFromTag(button1, /*i18n-content*/'RECONNECT');
button1.removeAttribute('autofocus');
var button2 = document.getElementById('client-finished-me2me-button');
l10n.localizeElementFromTag(button2, /*i18n-content*/'OK');
button2.setAttribute('autofocus', 'autofocus');
}
/** /**
* Parse the response from the server to a request to resolve a support id. * Parse the response from the server to a request to resolve a support id.
* *
......
...@@ -337,14 +337,14 @@ found in the LICENSE file. ...@@ -337,14 +337,14 @@ found in the LICENSE file.
<div data-ui-mode="home.client.connect-failed.me2me home.client.session-finished.me2me" <div data-ui-mode="home.client.connect-failed.me2me home.client.session-finished.me2me"
class="centered"> class="centered">
<button id="client-finished-me2me-button" <button id="client-reconnect-button"
type="button" type="button"
i18n-content="OK" i18n-content="RETRY"
autofocus="autofocus"> autofocus="autofocus">
</button> </button>
<button id="client-reconnect-button" <button id="client-finished-me2me-button"
type="button" type="button"
i18n-content="RECONNECT"> i18n-content="CANCEL">
</button> </button>
</div> <!-- connect-failed.me2me session-finished.me2me --> </div> <!-- connect-failed.me2me session-finished.me2me -->
......
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