diff --git a/package.json b/package.json index da874af9..25d7a916 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,10 @@ "packages": {}, "dependencies": {}, "devDependencies": { - "angular": "1.5.6", + "angular": "1.5.8", "angular-chart.js": "1.0.0-alpha6", "angular-strap": "2.3.8", - "angular-ui-router": "0.2.18", + "angular-ui-router": "0.3.1", "chart.js": "2.1.0", "coffee-loader": "0.7.2", "coffee-script": "1.10.0", @@ -31,8 +31,7 @@ "gulp-plumber": "1.1.0", "gulp-sourcemaps": "1.6.0", "gulp-util": "3.0.7", - "jquery": "2.2.0", - "jquery-ui": "1.10.5", + "jquery": "2.2.4", "script-loader": "0.7.0", "underscore": "1.8.3", "webpack": "1.13.1", diff --git a/resources/assets/scripts/app/app.coffee b/resources/assets/scripts/app/app.coffee index 7d768c42..2ddf4f7e 100644 --- a/resources/assets/scripts/app/app.coffee +++ b/resources/assets/scripts/app/app.coffee @@ -279,12 +279,12 @@ ponyfm.config [ templateUrl: '/templates/admin/show-songs.html' state.state 'admin.tracks', - url: '/tracks' + url: '/tracks?filter&page' controller: 'admin-tracks' templateUrl: '/templates/admin/tracks.html' state.state 'admin.classifier', - url: '/tracks/unclassified' + url: '/tracks/unclassified?filter&page' controller: 'admin-classifier' templateUrl: '/templates/admin/classifier.html' diff --git a/resources/assets/scripts/app/controllers/admin-classifier.coffee b/resources/assets/scripts/app/controllers/admin-classifier.coffee index cf795510..e8a1dc22 100644 --- a/resources/assets/scripts/app/controllers/admin-classifier.coffee +++ b/resources/assets/scripts/app/controllers/admin-classifier.coffee @@ -21,6 +21,7 @@ window.pfm.preloaders['admin-classifier'] = [ tracks.mainQuery.fromFilterString($state.params.filter) tracks.mainQuery.setPage $state.params.page || 1 tracks.mainQuery.setAdmin true + tracks.mainQuery.fetch(tracks.FetchType.UNCLASSIFIED) ) ] @@ -28,5 +29,4 @@ module.exports = angular.module('ponyfm').controller "admin-classifier", [ '$scope', 'tracks', '$state', ($scope, tracks, $state) -> - ] diff --git a/resources/assets/scripts/app/controllers/admin-tracks.coffee b/resources/assets/scripts/app/controllers/admin-tracks.coffee index 9d66f888..d4d2f0ea 100644 --- a/resources/assets/scripts/app/controllers/admin-tracks.coffee +++ b/resources/assets/scripts/app/controllers/admin-tracks.coffee @@ -21,12 +21,11 @@ window.pfm.preloaders['admin-tracks'] = [ tracks.mainQuery.fromFilterString($state.params.filter) tracks.mainQuery.setPage $state.params.page || 1 tracks.mainQuery.setAdmin true + tracks.mainQuery.fetch(tracks.FetchType.ALL) ) ] module.exports = angular.module('ponyfm').controller "admin-tracks", [ '$scope', 'tracks', '$state', ($scope, tracks, $state) -> - - ] diff --git a/resources/assets/scripts/app/directives/paged-tracks-list.coffee b/resources/assets/scripts/app/directives/paged-tracks-list.coffee index 51ab0074..9e870eb9 100644 --- a/resources/assets/scripts/app/directives/paged-tracks-list.coffee +++ b/resources/assets/scripts/app/directives/paged-tracks-list.coffee @@ -58,16 +58,11 @@ module.exports = angular.module('ponyfm').directive 'pfmPagedTracksList', () -> # The actual last page will always be in the paginator. $scope.pages.push($scope.totalPages) unless $scope.totalPages in $scope.pages - console.log $state - $scope.pageSelectorShown = false $scope.gotoPage = (page) -> - #$state.transitionTo $state.current.name, {filter: $state.params.filter, page: page} - #$location.search 'filter', $state.params.filter - #$location.search 'page', page - tracks.mainQuery.fromFilterString($state.params.filter) - tracks.mainQuery.setPage page || 1 + #$scope.$emit 'pageChange', {filter: $state.params.filter, page: page} + $state.go '.', {filter: $state.params.filter, page: page} $scope.showPageSelector = () -> $scope.pageSelectorShown = true