From 9b11dab806c79400401555520bc9924d15f210ba Mon Sep 17 00:00:00 2001 From: "jamiewalch@google.com" Date: Fri, 6 Apr 2012 01:13:57 +0000 Subject: Don't propagate the click event if the user disables the daemon. BUG=None TEST=Manual Review URL: https://chromiumcodereview.appspot.com/10009032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131056 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/webapp/event_handlers.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'remoting') diff --git a/remoting/webapp/event_handlers.js b/remoting/webapp/event_handlers.js index 1fe85ea..98b6a1c 100644 --- a/remoting/webapp/event_handlers.js +++ b/remoting/webapp/event_handlers.js @@ -37,6 +37,11 @@ function onLoad() { var doAuthRedirect = function() { remoting.oauth2.doAuthRedirect(); }; + /** @param {Event} event The event. */ + var stopDaemon = function(event) { + remoting.hostSetupDialog.showForStop(); + event.stopPropagation(); + }; /** @type {Array.<{event: string, id: string, fn: function(Event):void}>} */ var actions = [ { event: 'click', id: 'clear-oauth', fn: remoting.clearOAuth2 }, @@ -64,8 +69,7 @@ function onLoad() { fn: function() { remoting.hostSetupDialog.showForStart(); } }, { event: 'click', id: 'change-daemon-pin', fn: function() { remoting.hostSetupDialog.showForPin(); } }, - { event: 'click', id: 'stop-daemon', - fn: function() { remoting.hostSetupDialog.showForStop(); } }, + { event: 'click', id: 'stop-daemon', fn: stopDaemon }, { event: 'submit', id: 'access-code-form', fn: sendAccessCode }, { event: 'submit', id: 'pin-form', fn: connectHostWithPin }, { event: 'click', id: 'get-started-it2me', -- cgit v1.1