Simon Hunt

GUI -- Added empty table row to Applications view.

- updated table builder comments

Change-Id: I07f4609bdcc5b2cfd728310f701cafae33115313
...@@ -25,10 +25,13 @@ ...@@ -25,10 +25,13 @@
25 25
26 // example params to buildTable: 26 // example params to buildTable:
27 // { 27 // {
28 - // self: this, 28 + // self: this, <- controller object
29 - // scope: $scope, 29 + // scope: $scope, <- controller scope
30 - // tag: 'device' 30 + // tag: 'device', <- table identifier
31 + // selCb: selCb <- row selection callback (optional)
31 // } 32 // }
33 + // Note: selCb() is passed the row data model of the selected row,
34 + // or null when no row is selected.
32 35
33 function buildTable(o) { 36 function buildTable(o) {
34 var handlers = {}, 37 var handlers = {},
......
...@@ -24,18 +24,24 @@ ...@@ -24,18 +24,24 @@
24 </thead> 24 </thead>
25 25
26 <tbody> 26 <tbody>
27 - <tr ng-repeat="app in ctrl.tableData" 27 + <tr ng-hide="ctrl.tableData.length">
28 - ng-click="selectCallback(app)" 28 + <td class="nodata" colspan="5">
29 - ng-class="{selected: app === sel}" 29 + No Applications found
30 - ng-repeat-done> 30 + </td>
31 - <td class="table-icon"> 31 + </tr>
32 - <div icon icon-id="{{app._iconid_state}}"></div> 32 +
33 - </td> 33 + <tr ng-repeat="app in ctrl.tableData"
34 - <td>{{app.id}}</td> 34 + ng-click="selectCallback(app)"
35 - <td>{{app.version}}</td> 35 + ng-class="{selected: app === sel}"
36 - <td>{{app.origin}}</td> 36 + ng-repeat-done>
37 - <td>{{app.desc}}</td> 37 + <td class="table-icon">
38 - </tr> 38 + <div icon icon-id="{{app._iconid_state}}"></div>
39 + </td>
40 + <td>{{app.id}}</td>
41 + <td>{{app.version}}</td>
42 + <td>{{app.origin}}</td>
43 + <td>{{app.desc}}</td>
44 + </tr>
39 </tbody> 45 </tbody>
40 </table> 46 </table>
41 47
......