Permalink
Browse files

Make it prettier.

  • Loading branch information...
jdm committed Dec 1, 2011
1 parent f29fbd2 commit f3172b0b8493a3a11da4ec8752b0fe3e2b902b2b
Showing with 110 additions and 40 deletions.
  1. +29 −11 index.html
  2. BIN loading.gif
  3. +24 −4 magic.js
  4. +57 −25 style.css
View
@@ -41,24 +41,42 @@
</div>
<div id="bugs">
- <div id="bugs_content"><div class="even"><span>woooooo</span></div><div class="odd"><span>ablooo ablooo</span></div></div>
+ <div id="header">Results <span id="total"></span> <img id="throbber" src="loading.gif" style="visibility: hidden; float: right"></div>
+ <div id="bugs_content">
+ <div class="bug"><span>No categories specified.</span></div>
+ </div>
</div>
</div>
<ul id="extra">
-<li>
- <div id="mobile-extra">Extra information for Mobile:<br/>
- <a href="https://wiki.mozilla.org/Mobile/Get_Involved">Get Involved</a>
- </div>
-</li>
-<li>
- <div id="py-extra">Extra information for Python:<br/>
- <a href="https://wiki.mozilla.org/Auto-tools/New_Contributor/Skills_and_Areas">Get Involved with the Auto-Tools Team</a>
- </div>
-</li>
</ul>
+<script>
+ function addExtra(cat, header, content) {
+ var extra = document.getElementById('extra');
+ var elem = document.createElement('li');
+ elem.setAttribute('id', cat + '-extra');
+ var h = document.createElement('div');
+ h.setAttribute('class', 'extra_header');
+ var tn = document.createTextNode(header);
+ h.appendChild(tn);
+ elem.appendChild(h);
+ var c = document.createElement('div');
+ c.setAttribute('class', 'extra_body');
+ //tn = document.createTextNode(content);
+ //c.appendChild(tn);
+ c.innerHTML = content;
+ elem.appendChild(c);
+ extra.appendChild(elem);
+ }
+
+ addExtra('mobile', 'Extra information for Mobile', '<a href="https://wiki.mozilla.org/Mobile/Get_Involved">Get involved with the Mobile team</a>');
+ addExtra('py', 'Extra information for Python', '<a href="https://wiki.mozilla.org/Auto-tools/New_Contributor/Skills_and_Areas">Get involved with the Auto-Tools team</a>');
+ addExtra('gfx', 'Extra information for Graphics', '<a href="https://wiki.mozilla.org/Platform/GFX/Contribute">Get involved with the Graphics team</a>');
+ addExtra('jseng', 'Extra information for the JS engine', '<a href="https://wiki.mozilla.org/JavaScript:New_to_SpiderMonkey">Get involved with the JS engine team</a>');
+</script>
+
<center><div id="help"></div>
</center>
</body>
View
Binary file not shown.
View
@@ -84,10 +84,26 @@ function rebuildTableContents() {
link.appendChild(text);
inner.appendChild(link);
inner.appendChild(text2);
- elem.setAttribute('class', ["even", "odd"][idx % 2]);
+ //elem.setAttribute('class', ["even", "odd"][idx % 2] + " bug");
+ elem.setAttribute('class', "bug");
content.appendChild(elem);
}
+ if (orderedBugList.length == 0 || interestingComponents.length == 0) {
+ var elem = document.createElement('div');
+ var inner = document.createElement('span');
+ var text = document.createTextNode(interestingComponents.length == 0 ?
+ 'No categories specified' :
+ 'No bugs found');
+ inner.appendChild(text);
+ elem.appendChild(inner);
+ content.appendChild(elem);
+ elem.setAttribute('class', 'bug');
+ }
t.appendChild(content);
+
+ document.getElementById('total').textContent = '(' + orderedBugList.length + ')';
+
+ document.getElementById('throbber').style.visibility = "hidden";
}
function retrieveResults(category) {
@@ -96,6 +112,8 @@ function retrieveResults(category) {
return;
}
+ document.getElementById('throbber').style.visibility = "visible";
+
var mapping = categoryMapping[category];
var expectedResults = mapping.length;
@@ -108,7 +126,9 @@ function retrieveResults(category) {
if (expectedResults == 0) {
unfinishedResults[category] =
unfinishedResults[category].sort(function(a, b) { return b.id - a.id; });
- resultsCache[category] = [unfinishedResults[category][0]];
+ resultsCache[category] = [];
+ if (unfinishedResults[category].length > 0)
+ resultsCache[category].push(unfinishedResults[category][0]);
for (var i = 1; i < unfinishedResults[category].length; i++) {
if (unfinishedResults[category][i].id != unfinishedResults[category][i-1].id)
resultsCache[category].push(unfinishedResults[category][i]);
@@ -158,8 +178,8 @@ function toggleCategory(e)
function switchHelp(e)
{
- var id = e.target.getAttribute('for');
+ /*var id = e.target.getAttribute('for');
var box = document.getElementById("help");
box.innerHTML = helpText[id];
- box.style.display = "table";
+ box.style.display = "table";*/
}
View
@@ -1,3 +1,9 @@
+body {
+ font-family: Helvetica, sans-serif;
+ font-size: 13px;
+ color: #111;
+}
+
#content {
width: 100%;
/* width: 70%;
@@ -21,48 +27,74 @@ top: 100px;*/
}
#bugs {
- display: table;
- /*border: blue solid 1px;*/
- padding-left: 25px;
- /*float: left;*/
-}
-
-div.odd {
- background: #FFEEEE;
+ float: left;
+ width: 550px;
+ font-size: 1.02em;
+ margin-left: 5.2em;
+ box-shadow: rgba(0,0,0,.2) 0 .15em 0.6em;
+ border-radius: 4px 4px 0 0;
}
-div .even {
- background: #EEDDDD;
+#header {
+ background-color: #DEF0F7;
+ overflow: hidden;
+ font-size: 1.1em;
+ border: 1px solid #ccc;
+ border-radius: 4px 4px 0 0;
+ padding: 9px 14px;
+ font-weight: bold;
}
-div span {
- margin: 40px;
+div .bug {
+ padding-bottom: 1em;
+ padding-top: 1em;
+ border-bottom: 1px solid #CCC;
+ line-height: 1.2em;
+ padding-left: 14px;
}
#help {
- clear:left;
- background: #EEEEEE;
+ /*clear:left;*/
+ background: #F9F9F9;
border: 1px black dashed;
width: 40%;
- /*float: right;*/
+ float: right;
padding: 8px;
display: none;
}
#extra {
- display: inline;
- clear: both;
list-style-type: none;
}
-#extra div {
- display: none;
- background: #E0E0EF;
- padding: 12px;
- border: 1px dashed;
+#extra li {
+ float:left;
+ font-size: 1.02em;
+ margin-left: 5.2em;
+ box-shadow: rgba(0,0,0,.2) 0 .15em 0.6em;
+ border-radius: 4px 4px 0 0;
+ text-align: center;
+ width: 25%;
+ display: none;
+ margin-bottom: 2em;
+}
+
+.extra_header {
+ background-color: #E4E4E4;
+ overflow: hidden;
+ font-size: 1.1em;
+ border: 1px solid #ccc;
+ border-radius: 4px 4px 0 0;
+ padding: 9px 14px;
+ font-weight: bold;
}
-/*body {
-color: red;
-}*/
+.extra_body {
+ padding-bottom: 1em;
+ padding-top: 1em;
+ border-bottom: 1px solid #CCC;
+ line-height: 1.2em;
+ padding-left: 14px;
+ padding-right: 14px;
+}

0 comments on commit f3172b0

Please sign in to comment.