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

Unified Diff: static/js/main/main.js

Issue 58593002: chromium-status: add status field help text (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/chromium-status
Patch Set: split <input> change out into sep CL Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | status.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: static/js/main/main.js
diff --git a/static/js/main/main.js b/static/js/main/main.js
new file mode 100644
index 0000000000000000000000000000000000000000..576253609bf1084c7dc58a68610cac32a07a3514
--- /dev/null
+++ b/static/js/main/main.js
@@ -0,0 +1,41 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/*
+ * Code for the main user-visible status page.
+ */
+
+window.onload = function() {
+ document.add_new_message.message.focus();
+ help_init();
+}
+
+/*
+ * Functions for managing the help text.
+ */
+
+function help_init() {
+ // Set up the help text logic.
+ var message = document.add_new_message.message;
+ message.onmouseover = help_show;
+ message.onmousemove = help_show;
+ message.onmouseout = help_hide;
+
+ var help = document.getElementById('help');
+ help.onmouseover = help_show;
+ help.onmouseout = help_hide;
+}
+
+function help_show() {
+ var message = document.add_new_message.message;
+ var help = document.getElementById('help');
+ help.style.left = message.offsetLeft + 'px';
+ help.style.top = message.offsetTop + message.offsetHeight + 'px';
+ help.hidden = false;
+}
+
+function help_hide() {
+ var help = document.getElementById('help');
+ help.hidden = true;
+}
« no previous file with comments | « no previous file | status.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698