Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: remoting/webapp/ui_mode.js

Issue 9903008: Added first-run infographic screens for IT2Me and Me2Me. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/webapp/remoting.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Functions related to controlling the modal UI state of the app. UI states 7 * Functions related to controlling the modal UI state of the app. UI states
8 * are expressed as HTML attributes with a dotted hierarchy. For example, the 8 * are expressed as HTML attributes with a dotted hierarchy. For example, the
9 * string 'host.shared' will match any elements with an associated attribute 9 * string 'host.shared' will match any elements with an associated attribute
10 * of 'host' or 'host.shared', showing those elements and hiding all others. 10 * of 'host' or 'host.shared', showing those elements and hiding all others.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 }; 113 };
114 114
115 /** 115 /**
116 * Get the major mode that the app is running in. 116 * Get the major mode that the app is running in.
117 * @return {string} The app's current major mode. 117 * @return {string} The app's current major mode.
118 */ 118 */
119 remoting.getMajorMode = function() { 119 remoting.getMajorMode = function() {
120 return remoting.currentMode.split('.')[0]; 120 return remoting.currentMode.split('.')[0];
121 }; 121 };
122
123 remoting.showOrHideIt2MeUi = function() {
124 var visited = !!window.localStorage.getItem('it2me-visited');
125 document.getElementById('it2me-first-run').hidden = visited;
126 document.getElementById('it2me-content').hidden = !visited;
127 };
128
129 remoting.showOrHideMe2MeUi = function() {
130 var visited = !!window.localStorage.getItem('me2me-visited');
131 document.getElementById('me2me-first-run').hidden = visited;
132 document.getElementById('me2me-content').hidden = !visited;
133 };
134
135 remoting.showIt2MeUiAndSave = function() {
136 window.localStorage.setItem('it2me-visited', true);
137 remoting.showOrHideIt2MeUi();
138 };
139
140 remoting.showMe2MeUiAndSave = function() {
141 window.localStorage.setItem('me2me-visited', true);
142 remoting.showOrHideMe2MeUi();
143 };
144
145 remoting.resetInfographics = function() {
146 window.localStorage.removeItem('it2me-visited');
147 window.localStorage.removeItem('me2me-visited');
148 remoting.showOrHideIt2MeUi();
149 remoting.showOrHideMe2MeUi();
150 }
OLDNEW
« no previous file with comments | « remoting/webapp/remoting.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698