Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(cart): Fixes for cart
Browse files Browse the repository at this point in the history
replaces big red X with subtle trash can
changed default row order
add date_added_to_cart locally stored file
Closes 580, 591
Daniel Stern committed Mar 17, 2015

Verified

This commit was signed with the committer’s verified signature.
primeos Michael Weiss
1 parent c62330c commit db08ab4
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/scripts/cart/cart.controllers.ts
Original file line number Diff line number Diff line change
@@ -102,7 +102,6 @@ module ngApp.cart.controllers {
}
})
} else {
console.log("Clear chart data.");
$scope.chartData = undefined;
}

3 changes: 2 additions & 1 deletion app/scripts/cart/cart.services.ts
Original file line number Diff line number Diff line change
@@ -101,7 +101,8 @@ module ngApp.cart.services {
'projects': file.projectIds,
'data_type': file.data_type || '--',
'data_format': file.data_format || '--',
'file_size': file.file_size || 0
'file_size': file.file_size || 0,
'date_added_to_cart':Date.now()
};
this.files.push(fileNeededFieldsOnly);
addedFiles.push(fileNeededFieldsOnly);
6 changes: 3 additions & 3 deletions app/scripts/cart/templates/cart.html
Original file line number Diff line number Diff line change
@@ -115,19 +115,19 @@ <h3 class="panel-title pull-left" data-translate>Cart Items</h3>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="file in cc.displayedFiles track by $index">
<tr data-ng-repeat="file in cc.displayedFiles track by $index | orderBy:date_added_to_cart">
<td>
<button type="button" class="btn btn-default"
data-ng-click="file.selected = !file.selected">
<i class="fa"
data-ng-class="file.selected ? 'fa-check-circle-o' : 'fa-circle-o'"></i>
data-ng-class="file.selected ? 'fa-check' : 'fa-circle-o'"></i>
</button>

</td>
<td scope="col" class="text-center">
<button class="btn btn-primary" download-button files=file><i class="fa fa-download"></i></button>

<button class="btn btn-danger" data-ng-click="cc.remove(file.file_id)" files=file><i class="fa fa-times"></i></button>
<button class="btn btn-default" data-ng-click="cc.remove(file.file_id)" files=file><i class="fa fa-trash-o"></i></button>
</td>
<td scope="col" class="text-center"
data-ng-if="cc.UserService.currentUser">

0 comments on commit db08ab4

Please sign in to comment.