Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf8a651
commit fbc3783
Showing
5 changed files
with
189 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.UNCONFIRMED { background: #FFF; } | ||
.RESOLVEDFIXED { background: #E3FEDF; } | ||
|
||
.RESOLVEDINVALID, | ||
.CLOSEDWONTFIX, | ||
.RESOLVEDWONTFIX { background: #000; color:white; } | ||
|
||
.CLOSEDWONTFIX:before, #badge.RESOLVEDWONTFIX:before { content: "WONTFIX"} | ||
.NEW:before {content: "NEW"} | ||
.UNCONFIRMED:before {content: "UNCO"} | ||
.RESOLVEDFIXED:before {content: "FIXED"} | ||
.VERIFIEDFIXED:before {content: "VERIFIED!"} | ||
.VERIFIEDDUPLICATE:before, #badge.RESOLVEDDUPLICATE:before {content: "DUPE"} | ||
.RESOLVEDINVALID:before {content: "INVALID"} | ||
.RESOLVEDWORKSFORME:before {content: "WFM"} | ||
.REOPENED:before {content: "REOPENED"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300); | ||
body {font-family: 'Open Sans', sans-serif} | ||
body {background-image: url("noise.png"), -moz-linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.4));} | ||
body { | ||
margin: 0 auto; | ||
max-width: 600px; | ||
} | ||
|
||
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;} | ||
form { | ||
display: block; | ||
margin-top: 100px; | ||
-moz-transition-property: margin-top; | ||
-moz-transition-duration: 300ms; | ||
-moz-transition-delay: 300ms; | ||
} | ||
input { | ||
width: -moz-calc(100% - 60px); | ||
} | ||
button, input { | ||
font-family: 'Open Sans'; | ||
font-size: 12px; | ||
line-height: 15px; | ||
border: 1px solid #CCC; | ||
padding: 5px; | ||
} | ||
button { | ||
width: 50px; | ||
min-height: 0; | ||
-moz-appearance: none; | ||
} | ||
button:not([disabled]):active:hover { | ||
-moz-transform: translateY(1px); | ||
} | ||
|
||
form.submittedonce { | ||
margin-top: 10px; | ||
} | ||
|
||
input[disabled] { | ||
background-image: url(throbber.gif); | ||
background-position: center right; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
dl { | ||
font-size: 12px; | ||
color: #999; | ||
} | ||
|
||
a { | ||
color: inherit; | ||
text-decoration: none; | ||
} | ||
|
||
dd { | ||
margin-left: 60px; | ||
font-size: 11px; | ||
} | ||
|
||
dd > a > span { | ||
color: black; | ||
} | ||
|
||
.bugid { | ||
display: inline-block; | ||
width: 60px; | ||
color: #999; | ||
} | ||
|
||
.bugsummary { | ||
color: black; | ||
} | ||
|
||
.bugdate { | ||
color: #999; | ||
} | ||
|
||
.flags { | ||
display: inline-block; | ||
font-size: 10px; | ||
} | ||
|
||
.flags > span { | ||
background-color: #DDF; | ||
padding: 0 3px; | ||
color: black; | ||
} | ||
|
||
|
||
@media (max-width: 600px) { | ||
input { | ||
width: 100%; | ||
} | ||
button { | ||
margin: 20px 0; | ||
width: 100%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!DOCTYPE html> | ||
|
||
<meta charset="utf8"> | ||
<title></title> | ||
<link rel="stylesheet" href="search.css"> | ||
|
||
<script src="mustache.js"></script> | ||
<script src="date.js"></script> | ||
<script type="application/javascript;version=1.8" src="bz.js"></script> | ||
<script type="application/javascript;version=1.8" src="utils.js"></script> | ||
<script type="application/javascript;version=1.8" src="template.js"></script> | ||
<script type="application/javascript;version=1.8"> | ||
let gBz = new BugzillaClient(); | ||
let searching = false; | ||
|
||
window.onhashchange = window.onload = function() { | ||
let hash = window.location.hash.split("#")[1]; | ||
if (hash) { | ||
let input = $("input"); | ||
input.value = hash; | ||
} | ||
} | ||
|
||
function search() { | ||
if (searching) return; | ||
if (!$("input").value) return; | ||
searching = true; | ||
let input = $("input"); | ||
$("form").classList.add("submittedonce"); | ||
$("button").setAttribute("disabled", "true"); | ||
$("input").setAttribute("disabled", "true"); | ||
window.location.hash = $("input").value; | ||
gBz.searchBugs({ | ||
"include_fields": "id,status,summary,priority,resolution,creator,assigned_to,creation_time,last_change_time", | ||
"quicksearch": $("input").value | ||
}, function(error, bugs) { | ||
searching = false; | ||
$("input").removeAttribute("disabled"); | ||
$("button").removeAttribute("disabled"); | ||
if (error) { | ||
console.error(error); | ||
return; | ||
} | ||
for (let bug of bugs) { | ||
if (bug.priority == "--") bug.priority = ""; | ||
if (bug.assigned_to.name == "nobody") bug.assigned_to.name = null; | ||
bug.prettydate_creation = humaneDate(bug.creation_time); | ||
bug.prettydate_activity = humaneDate(bug.last_change_time); | ||
} | ||
gTemplates.render("results", {bugs:bugs}); | ||
}); | ||
} | ||
</script> | ||
|
||
<form onsubmit="search();return false"> | ||
<input placeholder="your query" name="query"> | ||
<button onclick="search()">search</button> | ||
</form> | ||
|
||
<script type="text/html" template="results" tagname="dl"> | ||
{{#bugs}} | ||
<dt><a href="index.html#{{id}}"><span class="bugid">{{id}} - </span><span class="bugsummary">{{summary}}</span></a> <div class="flags">{{#priority}}<span class="bugpriority">{{priority}}</span>{{/priority}}{{#platform}} <span class="bugos">{{platform}}</span>{{/platform}} <span class="bugstatus {{status}}{{resolution}}"></span></div></a> | ||
<dd><a href="index.html#{{id}}">by <span class="bugcreator">{{creator.name}}</span> <span class="bugdate">{{prettydate_creation}}</span>.{{#assigned_to.name}} Assigned to <span class="bugassignee">{{assigned_to.real_name}}{{^assigned_to.real_name}}{{assigned_to.name}}{{/assigned_to.real_name}}</span>{{/assigned_to.name}}</a> | ||
{{/bugs}} | ||
{{^bugs}} | ||
No bugs found. | ||
{{/bugs}} | ||
</script> |