changeset 51:3af7cd6ae638

changed menu items to use data-dialog attr instead of title, which sets tooltips.
author Atul Varma <avarma@mozilla.com>
date Sat, 24 Apr 2010 21:30:58 -0700
parents 7a0bafc5379a
children 8820100ae903
files js/modules/app.js main.html
diffstat 2 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/js/modules/app.js	Sat Apr 24 21:21:08 2010 -0700
+++ b/js/modules/app.js	Sat Apr 24 21:30:58 2010 -0700
@@ -53,9 +53,10 @@
 
   $("#header .menu li").click(
     function openDialog(event) {
-      var dialog = $("#" + this.title);
+      var name = this.getAttribute("data-dialog");
+      var dialog = $("#" + name);
       if (dialog.length == 0)
-        throw new Error("dialog not found: " + this.title);
+        throw new Error("dialog not found: " + name);
       dialog.fadeIn();
     });
 
--- a/main.html	Sat Apr 24 21:21:08 2010 -0700
+++ b/main.html	Sat Apr 24 21:30:58 2010 -0700
@@ -9,13 +9,13 @@
 <div id="header">
   <h1 class="title">Bugzilla Dashboard</h1>
   <ul class="menu hide-while-loading">
-    <li title="login"
-        class="requires-no-login"><span>Log In</span></li>
-    <li title="login"
+    <li data-dialog="login"
+       class="requires-no-login"><span>Log In</span></li>
+    <li data-dialog="login"
         class="requires-login"><span>Change User</span></li>
-    <li title="find-user"
+    <li data-dialog="find-user"
         class="requires-auth-login"><span>Find A User</span></li>
-    <li title="file-bug"><span>File A Bug</span></li>
+    <li data-dialog="file-bug"><span>File A Bug</span></li>
   </ul>
 </div>
 <div id="loading-screen" class="loading">&nbsp;</div>