Add accordian effect to display in test-cases.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Wed, 28 Aug 2013 16:54:49 -0700
changeset 1948 3987fd184cdf
parent 1947 47648af2c547
child 1949 c1c66daf5460
Add accordian effect to display in test-cases.
static/css/bootstrap/bootstrap.css
test-suite/index.html
--- a/static/css/bootstrap/bootstrap.css	Wed Aug 28 15:17:25 2013 -0700
+++ b/static/css/bootstrap/bootstrap.css	Wed Aug 28 16:54:49 2013 -0700
@@ -6535,6 +6535,227 @@
   opacity: 0.5;
 }
 
+.panel {
+  margin-bottom: 20px;
+  background-color: #ffffff;
+  border: 1px solid transparent;
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+          box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+
+.panel-body {
+  padding: 15px;
+}
+
+.panel-body:before,
+.panel-body:after {
+  display: table;
+  content: " ";
+}
+
+.panel-body:after {
+  clear: both;
+}
+
+.panel-body:before,
+.panel-body:after {
+  display: table;
+  content: " ";
+}
+
+.panel-body:after {
+  clear: both;
+}
+
+.panel > .list-group {
+  margin-bottom: 0;
+}
+
+.panel > .list-group .list-group-item {
+  border-width: 1px 0;
+}
+
+.panel > .list-group .list-group-item:first-child {
+  border-top-right-radius: 0;
+  border-top-left-radius: 0;
+}
+
+.panel > .list-group .list-group-item:last-child {
+  border-bottom: 0;
+}
+
+.panel-heading + .list-group .list-group-item:first-child {
+  border-top-width: 0;
+}
+
+.panel > .table {
+  margin-bottom: 0;
+}
+
+.panel > .panel-body + .table {
+  border-top: 1px solid #dddddd;
+}
+
+.panel-heading {
+  padding: 10px 15px;
+  border-bottom: 1px solid transparent;
+  border-top-right-radius: 3px;
+  border-top-left-radius: 3px;
+}
+
+.panel-title {
+  margin-top: 0;
+  margin-bottom: 0;
+  font-size: 16px;
+}
+
+.panel-title > a {
+  color: inherit;
+}
+
+.panel-footer {
+  padding: 10px 15px;
+  background-color: #f5f5f5;
+  border-top: 1px solid #dddddd;
+  border-bottom-right-radius: 3px;
+  border-bottom-left-radius: 3px;
+}
+
+.panel-group .panel {
+  margin-bottom: 0;
+  overflow: hidden;
+  border-radius: 4px;
+}
+
+.panel-group .panel + .panel {
+  margin-top: 5px;
+}
+
+.panel-group .panel-heading {
+  border-bottom: 0;
+}
+
+.panel-group .panel-heading + .panel-collapse .panel-body {
+  border-top: 1px solid #dddddd;
+}
+
+.panel-group .panel-footer {
+  border-top: 0;
+}
+
+.panel-group .panel-footer + .panel-collapse .panel-body {
+  border-bottom: 1px solid #dddddd;
+}
+
+.panel-default {
+  border-color: #dddddd;
+}
+
+.panel-default > .panel-heading {
+  color: #333333;
+  background-color: #f5f5f5;
+  border-color: #dddddd;
+}
+
+.panel-default > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #dddddd;
+}
+
+.panel-default > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #dddddd;
+}
+
+.panel-primary {
+  border-color: #428bca;
+}
+
+.panel-primary > .panel-heading {
+  color: #ffffff;
+  background-color: #428bca;
+  border-color: #428bca;
+}
+
+.panel-primary > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #428bca;
+}
+
+.panel-primary > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #428bca;
+}
+
+.panel-success {
+  border-color: #d6e9c6;
+}
+
+.panel-success > .panel-heading {
+  color: #468847;
+  background-color: #dff0d8;
+  border-color: #d6e9c6;
+}
+
+.panel-success > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #d6e9c6;
+}
+
+.panel-success > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #d6e9c6;
+}
+
+.panel-warning {
+  border-color: #fbeed5;
+}
+
+.panel-warning > .panel-heading {
+  color: #c09853;
+  background-color: #fcf8e3;
+  border-color: #fbeed5;
+}
+
+.panel-warning > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #fbeed5;
+}
+
+.panel-warning > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #fbeed5;
+}
+
+.panel-danger {
+  border-color: #eed3d7;
+}
+
+.panel-danger > .panel-heading {
+  color: #b94a48;
+  background-color: #f2dede;
+  border-color: #eed3d7;
+}
+
+.panel-danger > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #eed3d7;
+}
+
+.panel-danger > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #eed3d7;
+}
+
+.panel-info {
+  border-color: #bce8f1;
+}
+
+.panel-info > .panel-heading {
+  color: #3a87ad;
+  background-color: #d9edf7;
+  border-color: #bce8f1;
+}
+
+.panel-info > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #bce8f1;
+}
+
+.panel-info > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #bce8f1;
+}
+
 .well {
   border: none;
   -webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2), -1px -1px 0 rgba(0, 0, 0, 0.1);
--- a/test-suite/index.html	Wed Aug 28 15:17:25 2013 -0700
+++ b/test-suite/index.html	Wed Aug 28 16:54:49 2013 -0700
@@ -17,8 +17,14 @@
   <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.min.js"></script>
   <script id="manifest" tile="application/ld+json" src="manifest.jsonld"></script>
   <script id="manifest-template" type="text/x-handlebars-template">
-    <h3><a href="{{id}}">{{name}}</a> tests</h3>
+    <div class="panel-heading">
+      <h3 class="panel-title">
+        <a class="accordion-toggle" data-toggle="collapse" data-parent="#manifest" href="#{{anchor}}">{{name}} tests</a>
+      </h3>
+    </div>
+    <div id="{{anchor}}" class="panel-collapse collapse {{in}}"><div class="panel-body">
     <p>{{description}}</p>
+    <p>Raw manifest: <a href="{{id}}">{{id}}</a>.</p>
     <dl class="test-description">
       {{#each sequence}}
       <dt>Test {{number this}}: {{this.name}}</dt>
@@ -41,6 +47,7 @@
       </dd>
       {{/each}}
     </dl>
+    </div></div>
   </script>
   <script>
     (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -53,6 +60,8 @@
   </script>
   <style>
     li code, p code {display: inline;}
+
+    
   </style>
 </head>
 <body onload="load_manifests();">
@@ -204,7 +213,7 @@
         <h2 class="span12" style="text-align: center;">Test Manifests</h2>
       </div>
       <div class="row">
-        <section id="manifests" class="offset2 span8">
+        <section id="manifests" class="panel-group offset2 span8">
         </section>
       </div>
       <div id="footer">
@@ -234,8 +243,10 @@
   var man_tmpl = Handlebars.compile($("#manifest-template").html());
   $.getJSON($("#manifest").attr("src"), null, function(data, status) {
     data.sequence.forEach(function(man, index) {
-      $("#manifests").append($("<section id='" + index + "'/>"));
-      $.getJSON(man, null, function(data, status) {
+      $("#manifests").append($("<section id='" + index + "' class='panel panel-default'/>"));
+      $.getJSON(man, null, function(data, status, xhv) {
+        if (data.name == "Compaction") {data['in'] = 'in'}
+        data.anchor = data.name.replace(' ', '-');
         $("#manifests section#" + index).append($(man_tmpl(data)));
       });
     });