summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-06 18:56:34 +0000
committerjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-06 18:56:34 +0000
commit95069bb8532ac0bea3180516a953463a7db3b883 (patch)
tree0d7014ca5d039760c6ede02b37617afaa4d4bfc6 /remoting
parent9e0ef85896dec799faada64ba8891080b3d25f62 (diff)
downloadchromium_src-95069bb8532ac0bea3180516a953463a7db3b883.zip
chromium_src-95069bb8532ac0bea3180516a953463a7db3b883.tar.gz
chromium_src-95069bb8532ac0bea3180516a953463a7db3b883.tar.bz2
Clean up daemon DOM.
BUG=121148 TEST=Manual Review URL: https://chromiumcodereview.appspot.com/10005046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131159 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/webapp/host_controller.js5
-rw-r--r--remoting/webapp/main.css3
-rw-r--r--remoting/webapp/main.html38
3 files changed, 21 insertions, 25 deletions
diff --git a/remoting/webapp/host_controller.js b/remoting/webapp/host_controller.js
index e839802..acd0a7b7 100644
--- a/remoting/webapp/host_controller.js
+++ b/remoting/webapp/host_controller.js
@@ -59,13 +59,10 @@ remoting.HostController.prototype.updateDom = function() {
// TODO(sergeyu): This code updates UI state. Does it belong here,
// or should it moved somewhere else?
var match = '';
- var row = document.getElementById('this-host-connect');
var state = this.state();
switch (state) {
case remoting.HostController.State.STARTED:
remoting.updateModalUi('enabled', 'data-daemon-state');
- row.classList.remove('host-offline');
- row.classList.add('clickable');
break;
case remoting.HostController.State.NOT_IMPLEMENTED:
document.getElementById('start-daemon').disabled = true;
@@ -76,8 +73,6 @@ remoting.HostController.prototype.updateDom = function() {
case remoting.HostController.State.STOPPED:
case remoting.HostController.State.NOT_INSTALLED:
remoting.updateModalUi('disabled', 'data-daemon-state');
- row.classList.add('host-offline');
- row.classList.remove('clickable');
break;
}
};
diff --git a/remoting/webapp/main.css b/remoting/webapp/main.css
index 0725256..c6efb65 100644
--- a/remoting/webapp/main.css
+++ b/remoting/webapp/main.css
@@ -313,7 +313,8 @@ section {
border-top: 1px solid #EBEBEB;
}
-.section-row:first-child {
+.section-row:first-child,
+.section-row.no-non-local-hosts {
border-top: none;
}
diff --git a/remoting/webapp/main.html b/remoting/webapp/main.html
index 4921dec..fc8bff3 100644
--- a/remoting/webapp/main.html
+++ b/remoting/webapp/main.html
@@ -143,35 +143,35 @@ found in the LICENSE file.
<div id="host-list" hidden></div>
<div id="host-list-error" class="error-state" hidden></div>
<div id="daemon-control" data-daemon-state="enabled disabled" hidden>
- <div id="this-host-connect" class="section-row clickable">
+ <div class="section-row no-non-local-hosts"
+ data-daemon-state="disabled">
+ <img src="icon_host.png" class="host-list-main-icon">
+ <div class="box-spacer host-list-label"
+ id="start-daemon-message"
+ i18n-content="HOME_DAEMON_START_MESSAGE"></div>
+ <div id="this-host-spacer" class="box-spacer"></div>
+ <button type="button"
+ id="start-daemon"
+ i18n-content="HOME_DAEMON_START_BUTTON">
+ </button>
+ </div> <!-- disabled -->
+ <div id="this-host-connect"
+ class="section-row clickable no-non-local-hosts"
+ data-daemon-state="enabled">
<img id="this-host-icon"
src="icon_host.png"
class="host-list-main-icon">
- <div class="box-spacer host-list-label"
- id="start-daemon-message"
- i18n-content="HOME_DAEMON_START_MESSAGE"
- data-daemon-state="disabled"></div>
- <div id="this-host-name"
- data-daemon-state="enabled">
- </div>
+ <div id="this-host-name"></div>
<div id="this-host-spacer" class="box-spacer">
<img id="this-host-rename"
class="host-list-edit host-list-rename-icon"
- src="icon_pencil.png"
- data-daemon-state="enabled">
+ src="icon_pencil.png">
</div>
<button type="button"
id="stop-daemon"
- i18n-content="HOME_DAEMON_STOP_BUTTON"
- data-daemon-state="enabled"
- title="">
- </button>
- <button type="button"
- id="start-daemon"
- i18n-content="HOME_DAEMON_START_BUTTON"
- data-daemon-state="disabled">
+ i18n-content="HOME_DAEMON_STOP_BUTTON">
</button>
- </div>
+ </div> <!-- enabled -->
<div data-daemon-state="enabled">
<span i18n-content="HOME_DAEMON_ACTIVE_MESSAGE"></span>
<a id="change-daemon-pin"