diff options
author | 2017-06-09 16:18:59 +0200 | |
---|---|---|
committer | 2017-06-09 16:18:59 +0200 | |
commit | 60bb98696ee93f979914d8e88ed4708f59fcff9c (patch) | |
tree | a404880ec261f95c69fa4a6a1edd50ef9a66d160 /moonv4/moon_gui/static/app/pdp | |
parent | 8039214d0caedfec5456bd8ee0898a1b9a55629a (diff) |
Stable version
Change-Id: I70001bedbdf1823cb9e8dccd545800387777201b
Diffstat (limited to 'moonv4/moon_gui/static/app/pdp')
-rw-r--r-- | moonv4/moon_gui/static/app/pdp/edit/pdp-edit.tpl.html | 10 | ||||
-rw-r--r-- | moonv4/moon_gui/static/app/pdp/pdp-list.tpl.html | 36 | ||||
-rw-r--r-- | moonv4/moon_gui/static/app/pdp/pdp.controller.list.js | 19 |
3 files changed, 35 insertions, 30 deletions
diff --git a/moonv4/moon_gui/static/app/pdp/edit/pdp-edit.tpl.html b/moonv4/moon_gui/static/app/pdp/edit/pdp-edit.tpl.html index bc4582ce..1fbd555a 100644 --- a/moonv4/moon_gui/static/app/pdp/edit/pdp-edit.tpl.html +++ b/moonv4/moon_gui/static/app/pdp/edit/pdp-edit.tpl.html @@ -48,7 +48,15 @@ </div> - <moon-policy-mapped-list pdp="edit.pdp"></moon-policy-mapped-list> + <div class="panel-body"> + + <div class="row"> + + <moon-policy-mapped-list pdp="edit.pdp"></moon-policy-mapped-list> + + </div> + + </div> </div> </div> diff --git a/moonv4/moon_gui/static/app/pdp/pdp-list.tpl.html b/moonv4/moon_gui/static/app/pdp/pdp-list.tpl.html index 6716ebba..8aa4e653 100644 --- a/moonv4/moon_gui/static/app/pdp/pdp-list.tpl.html +++ b/moonv4/moon_gui/static/app/pdp/pdp-list.tpl.html @@ -21,49 +21,49 @@ <div> </div> <div class="row" > - + <div class="table-responsive" data-role="table"> - + <table class="table table-striped table-hover" ng-table="list.table"> <thead> - + <tr> - + <th class="customTables sortable" ng-class="{ 'sort-asc': list.table.isSortBy('name', 'asc'), 'sort-desc': list.table.isSortBy('name', 'desc') }" ng-click="list.table.sorting('name', list.table.isSortBy('name', 'asc') ? 'desc' : 'asc')"> <div data-translate="moon.pdp.list.table.name">Name</div> </th> - - <th class="customTables sortable" + + <th class="customTables sortable" ng-class="{ 'sort-asc': list.table.isSortBy('security_pipeline', 'asc'), 'sort-desc': list.table.isSortBy('security_pipeline', 'desc') }" ng-click="list.table.sorting('security_pipeline', list.table.isSortBy('policy', 'asc') ? 'desc' : 'asc')"> <div data-translate="moon.pdp.list.table.security_pipeline.number">Number of Securities</div> </th> - + <th class="customTables" ng-class="{ 'sort-asc': list.table.isSortBy('project', 'asc'), 'sort-desc': list.table.isSortBy('project', 'desc') }" ng-click="list.table.sorting('project', list.table.isSortBy('project', 'asc') ? 'desc' : 'asc')"> <div data-translate="moon.pdp.list.table.project">Project</div> </th> - + <th class="customTables"> <div data-translate="moon.pdp.list.action.title">Actions</div> </th> - + </tr> - + </thead> - + <tbody ng-if="!list.hasPDPs()"> <tr> <td colspan="12"><span data-translate="moon.pdp.list.table.notFound">There is no PDP</span></td> </tr> </tbody> - + <tbody ng-if="list.hasPDPs()"> - + <tr ng-repeat="pdp in $data | filter:list.search.find | orderBy:sort:reverse"> <td ng-bind="list.getPDPName(pdp)"></td> <td ng-bind="list.getSecPipelineFromPdp(pdp).length"></td> @@ -111,15 +111,15 @@ </ul> </div> </td> - + </tr> - + </tbody> - + </table> - + </div> - + <div class="container"> <div class="form-inline form-group"> <a href="" ng-click="list.add.showModal()" class="btn btn-default"> diff --git a/moonv4/moon_gui/static/app/pdp/pdp.controller.list.js b/moonv4/moon_gui/static/app/pdp/pdp.controller.list.js index 07c9aa2a..a831cfe3 100644 --- a/moonv4/moon_gui/static/app/pdp/pdp.controller.list.js +++ b/moonv4/moon_gui/static/app/pdp/pdp.controller.list.js @@ -15,7 +15,7 @@ '$scope', '$filter', '$modal', - 'ngTableParams', + 'NgTableParams', 'pdps', 'projectService']; @@ -23,7 +23,7 @@ $scope, $filter, $modal, - ngTableParams, + NgTableParams, pdps, projectService) { @@ -79,11 +79,11 @@ 'event:pdpDeletedError': $rootScope.$on('event:pdpDeletedError', pdpDeletedError), }; - - for (var unbind in rootListeners) { - $scope.$on('$destroy', rootListeners[unbind]); - } - + + _.each(rootListeners, function(unbind){ + $scope.$on('$destroy', rootListeners[unbind]); + }); + /* * */ @@ -189,13 +189,10 @@ */ function newPDPsTable() { - list.table = new ngTableParams({ + list.table = new NgTableParams({ page: 1, // show first page count: 10, // count per page - sorting: { - name: 'asc' // initial sorting - } }, { |