Minor typo fixes; in-spec issue tracking enhancements.
authormmarquis
Tue, 09 Oct 2012 12:34:14 -0400
changeset 15 04f0850a4473
parent 14 bb49d50c975e
child 16 ea392185be54
Minor typo fixes; in-spec issue tracking enhancements.
responsive-images/responsive-images.html
--- a/responsive-images/responsive-images.html	Tue Oct 09 10:45:41 2012 -0400
+++ b/responsive-images/responsive-images.html	Tue Oct 09 12:34:14 2012 -0400
@@ -63,6 +63,26 @@
 a:not([href]) {
   color: red
 }
+
+#open-issues-xhr {
+  font-size: .9em;
+}
+#open-issues-xhr li {
+  padding: .25em 0;
+}
+#open-issues-xhr .meta {
+  display: block;
+  font: normal .8em/1 sans-serif;
+  padding: .35em 0 0 0;
+}
+#open-issues-xhr .meta b {
+  font-weight: normal;
+}
+#open-issues-xhr .meta span {
+  display: block;
+  float: left;
+  width: 5.5em;
+}
 </style>
 </head>
 <body>
@@ -344,8 +364,18 @@
   }
   if(issues && issues.length > 0){
     for (var i = 0, issues_html = ''; i < issues.length; i++) {
-       issue = issues[i]; 
-       issues_html += '<li><a href="' + issue['html_url'] + '">Issue ' + issue['number'] + '</a> - ' +  issue['title']+  '</li>';
+       var issue = issues[i],
+          labelcount = issue['labels'].length,
+          assigned = issue['assignee'] ? "<b class='meta'><span>Assigned:</span> <a href='" + issue['assignee'].url + "'>" + issue['assignee'].login + "</a></b>" : '',
+          labels = [];
+
+        if( labelcount !== 0 ) {
+          for (var j = 0; j < labelcount; j++) {
+            labels.push( "[ <b style='color: #" + issue['labels'][j].color + "'>" + issue['labels'][j].name + "</b> ]" );
+          }
+        }
+
+       issues_html += '<li><a href="' + issue['html_url'] + '">Issue ' + issue['number'] + '</a> - ' +  issue['title'] + assigned + ( labelcount ? "<b class='meta'><span>Labels:</span> " + labels.join(" ") + "</b>" : '') + '</li>';
     }
   }
   issues_html = '<ul>' + issues_html + '</ul>';