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 66958271..9e870eb9 100644 --- a/resources/assets/scripts/app/directives/paged-tracks-list.coffee +++ b/resources/assets/scripts/app/directives/paged-tracks-list.coffee @@ -23,8 +23,8 @@ module.exports = angular.module('ponyfm').directive 'pfmPagedTracksList', () -> class: '@class' controller: [ - '$scope', 'tracks', '$state', - ($scope, tracks, $state) -> + '$scope', 'tracks', '$state', '$location' + ($scope, tracks, $state, $location) -> typeEnum = switch when $scope.type == 'normal' then tracks.FetchType.NORMAL when $scope.type == 'all' then tracks.FetchType.ALL @@ -61,7 +61,8 @@ module.exports = angular.module('ponyfm').directive 'pfmPagedTracksList', () -> $scope.pageSelectorShown = false $scope.gotoPage = (page) -> - $state.transitionTo $state.current.name, {filter: $state.params.filter, page: page} + #$scope.$emit 'pageChange', {filter: $state.params.filter, page: page} + $state.go '.', {filter: $state.params.filter, page: page} $scope.showPageSelector = () -> $scope.pageSelectorShown = true