view index.html @ 108:3ad618d3370f

refactored new Automator class into js/black-box.js.
author Atul Varma <avarma@mozilla.com>
date Fri, 30 Apr 2010 04:52:17 -0700
parents 544d339d2b4c
children
line wrap: on
line source

<html>
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
  <link rel="stylesheet" type="text/css" media="all"
        href="css/jquery-ui.css" />
  <link rel="stylesheet" type="text/css" media="all"
        href="css/main.css" />
  <title>Bugzilla Dashboard</title>
</head>
<body>
<div id="header">
  <h1 class="title">Bugzilla Dashboard</h1>
  <ul class="menu hide-while-loading">
    <li data-dialog="login"
        class="requires-no-login"><span>Log In</span></li>
    <li data-dialog="login"
        class="requires-no-auth-login"><span>Authenticate</span></li>
    <li data-dialog="login"
        class="requires-login"><span>Change User</span></li>
    <li data-command="refresh-dashboard"
        class="requires-login"><span>Refresh</span></li>
    <li data-dialog="repair"><span>Repair</span></li>
    <li data-dialog="find-user"
        class="requires-auth-login"><span>Find A User</span></li>
    <li data-dialog="file-bug"><span>File A Bug</span></li>
 </ul>
</div>
<div id="loading-screen" class="loading">&nbsp;</div>
<div id="reports" class="requires-login hide-while-loading">
  <div class="container">
    <div id="code-reviews"><h2>Things To Review</h2></div>
    <div id="assigned-bugs"><h2>Assigned Bugs</h2></div>
    <div id="reported-bugs"><h2>Reported Bugs</h2></div>
    <div id="cc-bugs"><h2>CC'd Bugs</h2></div>
    <div id="fixed-bugs"><h2>Recently Fixed Bugs</h2></div>
  </div>
</div>
<div id="login" class="dialog">
  <div class="content">
  <form id="login-form">
  <p>Enter a user's Bugzilla information below. If you don't
  provide a password, you'll only be able to see the user's
  public bugs, and you also won't be able to use some of this
  page's awesome functionality.</p>
  <table>
    <tr>
      <td>Bugzilla Username</td>
      <td><input type="text" class="username" id="login-username"/></td>
    </tr>
    <tr>
      <td>Bugzilla Password</td>
      <td><input type="password" class="password" id="login-password"/></td>
    </tr>
  </table>
  <br/>
  <input type="submit" id="login-submit" value="View Dashboard"/>
  </form>
  </div>
</div>
<div id="file-bug" class="dialog">
  <div class="content">
  <form id="file-bug">
  <p>Type in part of a product or component below, select from
  the auto-complete list, and press enter. You'll then get sent to a
  Bugzilla page where you can fill out a summary, description, and
  more details for the bug.</p>
  <table>
    <tr>
      <td>Category</td>
      <td><input type="text" class="category" id="file-bug-category"/></td>
    </tr>
  </table>
  </form>
  </div>
</div>
<div id="repair" class="dialog">
  <div class="content">
  <form id="repair-form">
  <p>If this page isn't working as you expect, enter the
  text &ldquo;repair my dashboard&rdquo; below and
  press enter. Hopefully that will fix things.</p>
  <br/>
  <input type="text" class="phrase" id="repair-phrase"/>
  </form>
  <div class="result"></div>
  </div>
</div>
<div id="find-user" class="dialog">
  <div class="content">
  <form id="find-user-form">
  <p>Just type in part of a user name below. You can optionally
  open a customized Bugzilla dashboard for the user, too.</p>
  <table>
   <tr>
      <td>Name</td>
      <td><input type="text" class="query" id="find-user-query"/></td>
    </tr>
  </table>
  <br/>
  <input type="submit" id="find-user-submit"
         value="Show User Dashboard"/>
  </form>
  </div>
</div>
<div id="errors"></div>
<div id="templates">
  <div class="errors">
    <div class="bugzilla-api-error">I had trouble talking to Bugzilla.
    Perhaps you entered the wrong username/password, or I
    messed up.</div>
    <div class="unknown-error">An unknown error occurred.</div>
 </div>
  <div class="repair-success">Done. Try reloading this page and see
  if your problem is fixed.</div>
  <div class="repair-failure">Hey, that wasn't the right text.</div>
  <div class="more-link"><span class="number"></span> more&hellip;</div>
  <div class="bug-tooltip">
    <div>
      <span class="priority"></span>
      <span class="severity"></span>
    </div>
    <div>
      <span class="product"></span>
      <span class="component"></span>
    </div>
    <div>Created <span class="age"></span></div>
  </div>
  <table class="bugs">
    <tr class="header">
      <th>Summary</th>
      <th>Last&nbsp;Changed</th>
    </tr>
    <tr class="bug-row">
      <td class="summary"></td>
      <td class="last-changed"></td>
    </tr>
  </table>
</div>
</body>
<!-- Base Scripts -->
<script src="js/jquery.js"></script>
<script src="js/require.js"></script>
<script>
$(window).ready(function() {
  var moduleScriptNames = [
    "app",
    "date-utils",
    "cache",
    "xhr"
  ];

  var scripts = [
    "js/jquery-ui.js",
    "js/bugzilla.js"
  ];

  moduleScriptNames.forEach(function(name) {
    scripts.push("js/modules/" + name + ".js");
  });

  if (!('JSON' in window))
    scripts.push("js/json2.js");

  Require.preload(document, scripts, function whenLoaded() {
    $("#loading-screen").hide();
    $(".hide-while-loading").show();

    var options = {
      jQuery: jQuery,
      Bugzilla: Bugzilla,
      window: window
    };

    if (document.location.search == "?testing=1") {
      window.parent.onDashboardLoaded(window, options);
      return;
    }

    var moduleExports = {};
    var require = Require.build(Require.modules, moduleExports);
    require("app/loader").init(moduleExports, options);
  });
});
</script>
</html>