OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <!-- This whole page uses the module --> | 2 <!-- This whole page uses the module --> |
3 <html ng-app="diff_viewer"> | 3 <html ng-app="diff_viewer"> |
4 <head> | 4 <head> |
5 <script type="text/javascript" | 5 <script type="text/javascript" |
6 src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.m
in.js"></script> | 6 src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.m
in.js"></script> |
7 <script type="text/javascript" src="skpdiff_output.json"></script> | 7 <script type="text/javascript" src="skpdiff_output.json"></script> |
8 <script type="text/javascript" src="diff_viewer.js"></script> | 8 <script type="text/javascript" src="diff_viewer.js"></script> |
9 <link rel="stylesheet" type="text/css" href="viewer_style.css"> | 9 <link rel="stylesheet" type="text/css" href="viewer_style.css"> |
10 <title>SkPDiff</title> | 10 <title>SkPDiff</title> |
11 </head> | 11 </head> |
12 <body> | 12 <body ng-controller="DiffListController" ng-class="statusClass"> |
13 <!-- | 13 <!-- The commit button --> |
14 All templates are being included with the main page to avoid using AJAX, w
hich would force | 14 <div ng-show="isDynamic" class="commit"> |
15 us to use a webserver. | 15 <button ng-click="commitRebaselines()">Commit</button> |
16 --> | 16 </div> |
17 <script type="text/ng-template" id="/diff_list.html"> | 17 <!-- Give a choice of how to order the differs --> |
18 <div ng-class="statusClass"> | 18 <div style="margin:8px"> |
19 <!-- The commit button --> | 19 Show me the worst by metric: |
20 <div ng-show="isDynamic" class="commit"> | 20 <button ng-repeat="differ in differs" ng-click="setSortIndex($index)"> |
21 <button ng-click="commitRebaselines()">Commit</button> | 21 <span class="result-{{ $index }}" style="padding-left:12px;"> </spa
n> |
22 </div> | 22 {{ differ.title }} |
23 <!-- Give a choice of how to order the differs --> | 23 </button> |
24 <div style="margin:8px"> | 24 </div> |
25 Show me the worst by metric: | 25 <!-- Begin list of differences --> |
26 <button ng-repeat="differ in differs" ng-click="setSortIndex($index)"> | 26 <table> |
27 <span class="result-{{ $index }}" style="padding-left:12px;"> <
/span> | 27 <thead> |
28 {{ differ.title }} | 28 <tr> |
29 </button> | 29 <td ng-show="isDynamic">Rebaseline?</td> |
30 </div> | 30 <td>Name</td> |
31 <!-- Begin list of differences --> | 31 <td>Difference Mask</td> |
32 <table> | 32 <td>Expected Image</td> |
33 <thead> | 33 <td>Actual Image</td> |
34 <tr> | 34 <td>Results</td> |
35 <td ng-show="isDynamic">Rebaseline?</td> | 35 </tr> |
36 <td>Name</td> | 36 </thead> |
37 <td>Expected Image</td> | 37 <tbody> |
38 <td>Actual Image</td> | 38 <!-- |
39 <td>Results</td> | 39 Loops through every record and crates a row for it. This sorts based o
n the whichever |
40 </tr> | 40 metric the user chose, and places a limit on the max number of records
to show. |
41 </thead> | 41 --> |
42 <tbody> | 42 <tr ng-repeat="record in records | orderBy:sortingDiffer | limitTo:500" |
43 <!-- | 43 ng-class="{selected: record.isRebaselined}" |
44 Loops through every record and crates a row for it. This sorts bas
ed on the whichever | 44 ng-controller="ImageController"> |
45 metric the user chose, and places a limit on the max number of rec
ords to show. | 45 <td ng-show="isDynamic"> |
46 --> | 46 <input type="checkbox" |
47 <tr ng-repeat="record in records | orderBy:sortingDiffer | limitTo:5
00" | 47 ng-model="record.isRebaselined" |
48 ng-class="{selected: record.isRebaselined}"> | 48 ng-click="selectedRebaseline($index, $event)" |
49 <td ng-show="isDynamic"> | 49 ng-class="{lastselected: lastSelectedIndex == $index}" /> |
50 <input type="checkbox" | 50 </td> |
51 ng-model="record.isRebaselined" | 51 <td class="common-name">{{ record.commonName }}</td> |
52 ng-click="selectedRebaseline($index, $event)" | 52 <td> |
53 ng-class="{lastselected: lastSelectedIndex == $index}" /> | 53 <img-compare type="alphaMask" |
54 </td> | 54 class="left-image" |
55 <td class="common-name">{{ record.commonName }}</td> | 55 ng-mousedown="MagnifyDraw($event, true)" |
56 <td> | 56 ng-mousemove="MagnifyDraw($event, false)" |
57 <swap-img left-src="{{ record.baselinePath }}" | 57 ng-mouseup="MagnifyEnd($event)" |
58 right-src="{{ record.testPath }}" | 58 ng-mouseleave="MagnifyEnd($event)"/> |
59 side="left" | 59 </td> |
60 class="gm-image left-image" /></td> | 60 <td> |
61 <td> | 61 <img-compare type="baseline" |
62 <swap-img left-src="{{ record.baselinePath }}" | 62 name="{{record.commonName}}" |
63 right-src="{{ record.testPath }}" | 63 class="gm-image left-image" /> |
64 side="right" | 64 </td> |
65 class="gm-image right-image" /></td> | 65 <td> |
66 <td> | 66 <img-compare type="test" |
67 <div ng-repeat="diff in record.diffs" | 67 name="{{record.commonName}}" |
68 ng-mouseover="highlight(diff.differName)" | 68 class="gm-image right-image" /> |
69 class="result result-{{$index}}"> | 69 </td> |
70 <span class="result-button">{{ diff.result }}</span> | 70 <td> |
71 </div> | 71 <div ng-repeat="diff in record.diffs" |
72 </td> | 72 ng-mouseover="highlight(diff.differName)" |
73 </tr> | 73 class="result result-{{$index}}"> |
74 </tbody> | 74 <span class="result-button">{{ diff.result }}</span> |
75 </table> | 75 </div> |
76 </div> | 76 </td> |
77 </script> | 77 </tr> |
78 <!-- Whatever template is used is rendered in the following div --> | 78 </tbody> |
79 <div ng-view></div> | 79 </table> |
80 </body> | 80 </body> |
81 </html> | 81 </html> |
OLD | NEW |