Skip to content

Commit

Permalink
imprive and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
evlach committed Jun 12, 2014
1 parent d10d60d commit 88fbbc3
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 111 deletions.
5 changes: 4 additions & 1 deletion js/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ window.accessdb.appRouter.on('route:results-technique', function (id) {
accessdb.TestResultsFullViewByTechnique.reload({techNameId : id});
});
window.accessdb.appRouter.on('route:results-test', function (id) {
TestUnit.prototype.loadById(id, function(test){
$(".results-test-id").html(test.testUnitId);
$(".results-test-title").html(test.title);
});
this.params.testUnitId = id;

window.accessdb.appRouter.loadPage("results-test");
accessdb.TreeHelper.loadTrees();
accessdb.TestResultsFullViewByTest = new accessdb.Views.TestResultsFullViewByTest();
Expand Down
23 changes: 10 additions & 13 deletions js/testresult-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ accessdb.Views.TestResultsDataOverview = function (){
}
else
callback(error);
});
}, this.$el);
}
};
this.reload = function(){
Expand Down Expand Up @@ -86,7 +86,7 @@ accessdb.Views.TestResultsDataTestCaseOverview = function (){
}
else
callback(error);
});
}, this.$el);
}
};
this.reload = function(){
Expand Down Expand Up @@ -130,7 +130,7 @@ accessdb.Views.TestResultsFullViewByTechnique = function (){
}
else
callback(error);
});
}, this.$el);
}
};
this.reload = function(params){
Expand Down Expand Up @@ -173,7 +173,7 @@ accessdb.Views.TestResultsFullViewByTechniqueRelatedTests = function (){
}
else
callback(error);
});
}, this.$el);
}
};
this.reload = function(params){
Expand Down Expand Up @@ -218,7 +218,7 @@ accessdb.Views.TestResultsFullViewByTest = function (){
}
else
callback(error);
});
}, this.$el);
}
};
this.reload = function(params){
Expand All @@ -240,7 +240,7 @@ accessdb.Views.TestResultsDetails = function (){
this.results = null;
this.render = function(){
if(this.results){
var groupedResults = _.groupBy(this.results, 'testUnitDescription');
var groupedResults = _.groupBy(this.results, 'testUnitId');
var results = [];
for (r in groupedResults){
var resPerTest = groupedResults[r];
Expand All @@ -258,7 +258,7 @@ accessdb.Views.TestResultsDetails = function (){
os: res.testingProfile.platform.name + " " + res.testingProfile.platform.version.text,
plugin: res.testingProfile.plugin.name ,
comment: res.comment,
contributor: "TODO"
contributor: res.userId
});
}
}
Expand All @@ -280,14 +280,11 @@ accessdb.Views.TestResultsDetails = function (){
else {
var filter = _.clone(params.filter);
if(params.ua)
filter.uas = [{name: params.ua, version: params.uaVer}];
filter.uas = [{id: "0", name: params.ua, type:"UAgent", version: params.uaVer}];
if(params.at)
filter.ats = [{name: params.at, version: params.atVer}];
filter.ats = [{id:"0", name: params.at, type:"AssistiveTechnology", version: params.atVer}];
else
filter.ats = [];

console.log(filter);

accessdb.API.TESTRESULT.filter(filter, function (error, data, status) {
if(!error){
console.log(data);
Expand All @@ -296,7 +293,7 @@ accessdb.Views.TestResultsDetails = function (){
}
else
callback(error);
});
}, this.$el);
}
};
this.reload = function(params){
Expand Down
18 changes: 1 addition & 17 deletions pages/results-technique.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,7 @@ <h3>Test cases covering this technique:</h3>

</div>
<div id="RelatedTestCasesDiv">
<ul id="RelatedTestCases">
<!-- Put data from Template “RelatedTestCases_template” here -->
<li>73: Em and strong elements can be used to stress parts of a text
<a href="h4.html" class="btn btn-small">
<span class="chart" style="display:none"><%= r.noOfPass %>/<%= r.noOfAll %></span>
<%= r.noOfPass %>/<%= r.noOfAll %>
<span class="icon-arrow-right2">
<span class="visuallyhidden">Show results</span>
</span>
</a>
</li>
<li>74: sub elements indicate subscript in HTML</li>
<li>75: sup elements indicate superscript in HTML</li>
<li>76: abbr and acronym can identify special text in html</li>
<li>77: b, i and u can identify special text in HTML</li>
<li>78: small identifies special text in HTML</li>
</ul>

</div>

</div>
Expand Down
76 changes: 1 addition & 75 deletions pages/results-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1 class="page-title">
</nav>
<div class="content">
<div class="grid">
<h2>Details for Technique <span><strong>H4:</strong> Creating a logical tab order through links, form controls, and objects</span></h2>
<h2>Details for Test <span><strong class="results-test-id">H4:</strong>: <span class="results-test-title">Creating a logical tab order through links, form controls, and objects</span></span></h2>
<div class="with-filter">
<aside class="column-first" aria-label="Filter results">
<div class="column-filters">
Expand All @@ -31,82 +31,8 @@ <h4>Operating System</h4>
</aside>
<div class="column-second">
<div id="TestResultsFullViewByTestDiv">
<table class="result-details">
<caption>In the columns, you can find browser versions.<br>The rows show assistive technologies.</caption>
<thead>
<tr>
<th rowspan="2" colspan="2"> </th>
<th colspan="3" scope="colgroup">Firefox</th>
<th colspan="2" scope="colgroup">Internet Explorer</th>
</tr>
<tr>
<th scope="col" data-accessdbproductver="25" data-accessdbproductname="Firefox"><span class="visuallyhidden">Firefox</span> 25</th>
<th scope="col" data-accessdbproductver="27" data-accessdbproductname="Firefox"><span class="visuallyhidden">Firefox</span> 27</th>
<th scope="col" data-accessdbproductver="30" data-accessdbproductname="Firefox"><span class="visuallyhidden">Firefox</span> 30</th>
<th scope="col" data-accessdbproductver="10" data-accessdbproductname="Internet Explorer"><span class="visuallyhidden">Internet Explorer</span> 10</th>
<th scope="col" data-accessdbproductver="11" data-accessdbproductname="Internet Explorer"><span class="visuallyhidden">Internet Explorer</span> 11</th>
</tr>
</thead>
<tbody>
<tr>
<th data-accessdbproductver="" data-accessdbproductname="" colspan="2" scope="row">None</th>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
<td><span class="chart">2/2</span> <a title="show test results of this combination" href="" class="TestResultFullViewTechniqueAnchor">2/2</a></td>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
</tr>
<tr>
<th data-accessdbproductver="10" data-accessdbproductname="Cobra">Cobra</th>
<th scope="row"><span class="visuallyhidden">Cobra</span> 10</th>
<td><span class="chart">0/1</span> <a title="show test results of this combination" href="" class="TestResultFullViewTechniqueAnchor">0/1</a></td>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
<td><span class="chart">0/1</span> <a title="show test results of this combination" href="" class="TestResultFullViewTechniqueAnchor">0/1</a></td>
<td class="untested">Not tested</td>
</tr>
<tr>
<th data-accessdbproductver="15" data-accessdbproductname="Jaws">Jaws</th>
<th scope="row"><span class="visuallyhidden">Jaws</span> 15</th>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
<td><span class="chart">0/1</span> <a title="show test results of this combination" href="" class="TestResultFullViewTechniqueAnchor">0/1</a></td>
<td><span class="chart">1/1</span> <a title="show test results of this combination" href="" class="TestResultFullViewTechniqueAnchor">1/1</a></td>
</tr>
<tr>
<th data-accessdbproductver="2013.2" data-accessdbproductname="NVDA">NVDA</th>
<th scope="row"><span class="visuallyhidden">NVDA</span> 2013.2</th>
<td><span class="chart">1/1</span> <a title="show test results of this combination" href="" class="TestResultFullViewTechniqueAnchor">1/1</a></td>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
</tr>
<tr>
<th data-accessdbproductver="2013.3" data-accessdbproductname="NVDA">NVDA</th>
<th scope="row"><span class="visuallyhidden">NVDA</span> 2013.3</th>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
<td><span class="chart">1/1</span> <a title="show test results of this combination" href="" class="TestResultFullViewTechniqueAnchor">1/1</a></td>

</tr>
<tr>
<th data-accessdbproductver="8.4" data-accessdbproductname="Window-Eyes">Window-Eyes</th>
<th scope="row"><span class="visuallyhidden">Window Eyes</span> 8.4</th>
<td class="untested">Not tested</td>
<td><span class="chart">0/1</span> <a title="show test results of this combination" href="" class="TestResultFullViewTechniqueAnchor">0/1</a></td>
<td class="untested">Not tested</td>
<td class="untested">Not tested</td>
<td><span class="chart">0/1</span> <a title="show test results of this combination" href="" class="TestResultFullViewTechniqueAnchor">0/1</a></td>
</tr>
</tbody>
</table>
</div>


</div>
</div>
</div>
Expand Down
13 changes: 8 additions & 5 deletions templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ <h4>Test Results</h4>
<th>Passed</th>
</tr>
</thead>
<% _.each(results, function(r) { %>
<% _.each(results, function(r) {
if(r.noOfAll>0)
{
%>
<tbody class="collapsed">
<tr>
<td class="liketh">
Expand All @@ -247,7 +250,9 @@ <h4>Test Results</h4>
</tr>
</tbody>
<tbody class="testcases"></tbody>
<% }); %>
<%
}
}); %>
</table>
</script>
<script type="text/template" id="TestResultsDataOverviewTestCases_template">
Expand Down Expand Up @@ -378,9 +383,7 @@ <h4>Test Results</h4>
accessdb.p.at = col.product.name;
accessdb.p.atVer = col.product.version.text;
%>
<th data-accessdbproductver="<%= col.product.version.text %>" data-accessdbproductname="<%= col.product.name %>" colspan="2" scope="row"><%=col.product.name %></th>
<th scope="row"><span class="visuallyhidden"><%=col.product.name %></span> <%= col.product.version.text %></th>

<th data-accessdbproductver="<%= col.product.version.text %>" data-accessdbproductname="<%= col.product.name %>" colspan="1" scope="row"><%=col.product.name %> <%= col.product.version.text %></th>
<% } else { %>
<th data-accessdbproductver="" data-accessdbproductname="" colspan="1" scope="row">None</th>
<% }
Expand Down

0 comments on commit 88fbbc3

Please sign in to comment.