Skip to content
Browse files

Merge branch 'develop' # do not use develop any more

  • Loading branch information...
2 parents 77ade7d + e528be9 commit e71ab41d8baaebd505922bf7dc1f48623f0ab78f @alswl committed Jul 15, 2014
Showing with 8 additions and 3 deletions.
  1. +1 −0 bower.json
  2. +4 −1 static/js/account.js
  3. +1 −1 templates/accounts/transactions.html
  4. +2 −1 templates/ng_base.html
View
1 bower.json
@@ -11,6 +11,7 @@
"angular-resource": "*",
"ngQuickDate": "~1.2.0",
"momentjs": "~2.5.1",
+ "moment-timezone": "*",
"underscore": "~1.6.0"
},
"devDependencies": {}
View
5 static/js/account.js
@@ -47,7 +47,10 @@ accountModule.controller('AccountTransactionsCtrl', function ($scope, $http) {
var loadTransactions = function () {
$http.get('/api/v1/accounts/' + $scope.id + '/transactions').success(function(data) {
- $scope.transactions = data;
+ $scope.transactions = _.map(data, function(transaction) {
+ transaction.posted_at = moment(transaction.posted_at).tz('Asia/Shanghai').format();
+ return transaction;
+ });
});
};
View
2 templates/accounts/transactions.html
@@ -48,7 +48,7 @@
<tbody>
<tr ng-repeat="transaction in transactions" class="transaction-{index}">
- <td><a class="nami-tooltip" href="javascript:;" data-toggle="tooltip" title="ID: {{ transaction.id }}, 时间: {{ transaction.posted_at | date: 'yyyy/MM/dd HH:mm' }}, tid: {{ transaction.timeline_id }}">{{ transaction.posted_at }}</a></td>
+ <td><a class="nami-tooltip" href="javascript:;" data-toggle="tooltip" title="ID: {{ transaction.id }}, 时间: {{ transaction.posted_at | date: 'yyyy-MM-dd HH:mm' }}, tid: {{ transaction.timeline_id }}">{{ transaction.posted_at | date: 'yyyy-MM-dd' }}</a></td>
<td>{{ transaction.source_account.name }}</td>
<td>{{ transaction.target_account.name }}</td>
<td>{{ transaction.desc }}</td>
View
3 templates/ng_base.html
@@ -27,7 +27,8 @@
<script src="{% static 'bower_components/jquery/dist/jquery.min.js' %}"></script>
<script src="{% static 'bower_components/select2/select2.js' %}"></script>
<script src="{% static 'bower_components/momentjs/min/moment.min.js' %}"></script>
- <script src="{% static 'bower_components/underscore/underscore.js' %}"></script>
+ <script src="{% static 'bower_components/moment-timezone/moment-timezone.js' %}"></script>
+ <script src="{% static 'bower_components/underscore/underscore.js' %}"></script>
<script src="{% static 'bower_components/angular/angular.js' %}"></script>
<script src="{% static 'bower_components/angular-ui-select2/src/select2.js' %}"></script>
<script src="{% static 'bower_components/angular-animate/angular-animate.js' %}"></script>

0 comments on commit e71ab41

Please sign in to comment.
Something went wrong with that request. Please try again.