aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnjali Walsatwar <anjali.walsatwar@huawei.com>2018-04-18 14:41:23 +0530
committerAnjali Walsatwar <anjali.walsatwar@huawei.com>2018-04-18 14:41:23 +0530
commit9705ba3be064c5570389047e46f9b185b838f6c7 (patch)
treeb6090ab43c332b669eb09685f613a2b1a4350a73
parentbee3e9d43fba11fb37bd8ba590c76203e585505d (diff)
sort by not working in main page
Issue-ID: VNFSDK-239 Change-Id: I2a6518f8d03c87c493adfd134650ae8fe6d32c90 Signed-off-by: Anjali Walsatwar <anjali.walsatwar@huawei.com>
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/app/modules/home/marketplace.html8
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/common/locale/locale-en.json2
2 files changed, 5 insertions, 5 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/marketplace.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/marketplace.html
index 64a3f392..f95bba53 100644
--- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/marketplace.html
+++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/marketplace.html
@@ -24,7 +24,7 @@
<md-toolbar id="homeToolbar" class="md-hue-3">
<div class="md-toolbar-tools">
<label ng-if="vm.services.length > 0" class="md-title fontSize marginAuto selectLblAlignment">{{'module.marketplace.main.sortBy.label' | translate}}</label>
- <select ng-model="sortBy" class="md-no-underline noMargin iconMargin md-title fontSize" id="sortByLabel" ng-if="vm.services.length > 0">
+ <select ng-model="vm.filter.sortBy" class="md-no-underline noMargin iconMargin md-title fontSize" id="sortByLabel" ng-if="vm.services.length > 0">
<option class="md-title fontSize " value="" disabled selected>{{'module.marketplace.main.sortBy.title' | translate}}</option>
<option class="md-title fontSize " value="{{'module.marketplace.main.sortBy.options.name.value' | translate}}">{{'module.marketplace.main.sortBy.options.name.key' | translate}}</option>
<option class="md-title fontSize " value="{{'module.marketplace.main.sortBy.options.dateModified.value' | translate}}">{{'module.marketplace.main.sortBy.options.dateModified.key' | translate}}</option>
@@ -82,7 +82,7 @@
</md-toolbar>
</md-card>
<div class="md-padding" layout-xs="column" layout="row" layout-wrap ng-if="vm.hasGridView && vm.services.length > 0" id="gridView">
- <md-card class="gridViewMargin md-padding tiles flex-md-100 flex-gt-md-30 flex-lt-md-100" ng-repeat="service in vm.services | filter: vm.filter.search| orderBy:sortBy"
+ <md-card class="gridViewMargin md-padding tiles flex-md-100 flex-gt-md-30 flex-lt-md-100" ng-repeat="service in vm.services | filter: vm.filter.search| orderBy:vm.filter.sortBy"
layout-wrap>
<md-card-header class="nopadding">
<md-card-header-text>
@@ -143,7 +143,7 @@
<md-card flex="100" ng-if="!vm.hasGridView && vm.services.length > 0" id="listView">
<md-table-container>
<table md-table>
- <thead md-head md-order="sortBy">
+ <thead md-head md-order="vm.filter.sortBy">
<tr md-row>
<th md-column class="text-center fontSize">
<md-tooltip md-direction="top">{{'module.marketplace.main.listView.headers.name' | translate}}</md-tooltip>{{'module.marketplace.main.listView.headers.name'
@@ -176,7 +176,7 @@
</tr>
</thead>
<tbody md-body>
- <tr md-row md-select="dessert" md-select-id="name" md-auto-select ng-repeat="service in vm.services | filter: vm.filter.search | orderBy:sortBy | limitTo: vm.paginationQuery.limit: (vm.paginationQuery.page - 1) * vm.paginationQuery.limit">
+ <tr md-row md-select="dessert" md-select-id="name" md-auto-select ng-repeat="service in vm.services | filter: vm.filter.search | orderBy:vm.filter.sortBy | limitTo: vm.paginationQuery.limit: (vm.paginationQuery.page - 1) * vm.paginationQuery.limit">
<td md-cell class="text-center">
<md-tooltip md-direction="top">{{service.name}}</md-tooltip>
<a class="pointerClick" ng-click="vm.showDetails(service)">{{service.name}}</a>
diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/locale/locale-en.json b/vnfmarket/src/main/webapp/vnfmarket/common/locale/locale-en.json
index f82b567e..d7a7838d 100644
--- a/vnfmarket/src/main/webapp/vnfmarket/common/locale/locale-en.json
+++ b/vnfmarket/src/main/webapp/vnfmarket/common/locale/locale-en.json
@@ -127,7 +127,7 @@
},
"downloads": {
"key": "Downloads",
- "value": "downloads"
+ "value": "downloadCount"
}
}
},