diff --git a/public/templates/tracks/frame.html b/public/templates/tracks/frame.html
index d09abefc..c0240ba3 100644
--- a/public/templates/tracks/frame.html
+++ b/public/templates/tracks/frame.html
@@ -1,5 +1,5 @@
-
+
@@ -11,7 +11,7 @@
-
+
Download
file_download
diff --git a/resources/assets/scripts/app/controllers/album.coffee b/resources/assets/scripts/app/controllers/album.coffee
index fd979cc3..95b11891 100644
--- a/resources/assets/scripts/app/controllers/album.coffee
+++ b/resources/assets/scripts/app/controllers/album.coffee
@@ -21,8 +21,8 @@ window.pfm.preloaders['album'] = [
]
module.exports = angular.module('ponyfm').controller "album", [
- '$scope', 'meta', 'albums', '$state', 'playlists', 'auth', '$modal', 'download-cached', '$window', '$timeout'
- ($scope, meta, albums, $state, playlists, auth, $modal, cachedAlbum, $window, $timeout) ->
+ '$scope', 'meta', 'albums', '$state', 'playlists', 'auth', '$mdDialog', 'download-cached', '$window', '$timeout'
+ ($scope, meta, albums, $state, playlists, auth, $mdDialog, cachedAlbum, $window, $timeout) ->
album = null
albums.fetch($state.params.id).done (albumResponse) ->
@@ -33,11 +33,18 @@ module.exports = angular.module('ponyfm').controller "album", [
$scope.playlists = []
- $scope.share = () ->
- dialog = $modal
+ $scope.share = (ev) ->
+ $mdDialog.show(
templateUrl: '/templates/partials/album-share-dialog.html',
scope: $scope,
- show: true
+ clickOutsideToClose: true,
+ controller: ($scope, $mdDialog) ->
+ $scope.closeDialog = ->
+ $mdDialog.cancel()
+ ).then (() ->
+ return
+ ), ->
+ $scope.$apply()
if auth.data.isLogged
playlists.refreshOwned().done (lists) ->
diff --git a/resources/assets/scripts/app/controllers/playlist.coffee b/resources/assets/scripts/app/controllers/playlist.coffee
index da2fb71f..52a07b47 100644
--- a/resources/assets/scripts/app/controllers/playlist.coffee
+++ b/resources/assets/scripts/app/controllers/playlist.coffee
@@ -21,8 +21,8 @@ window.pfm.preloaders['playlist'] = [
]
module.exports = angular.module('ponyfm').controller 'playlist', [
- '$scope', 'meta', '$state', 'playlists', '$modal', 'download-cached', '$window', '$timeout'
- ($scope, meta, $state, playlists, $modal, cachedPlaylist, $window, $timeout) ->
+ '$scope', 'meta', '$state', 'playlists', '$mdDialog', 'download-cached', '$window', '$timeout'
+ ($scope, meta, $state, playlists, $mdDialog, cachedPlaylist, $window, $timeout) ->
playlist = null
playlists.fetch($state.params.id).done (playlistResponse) ->
@@ -31,18 +31,25 @@ module.exports = angular.module('ponyfm').controller 'playlist', [
meta.setTitle("#{playlist.title} | #{playlist.user.name}")
meta.setDescription("Listen to \"#{playlist.title}\", a playlist by #{playlist.user.name}, on the largest pony music site.")
- $scope.share = () ->
- dialog = $modal
+ $scope.share = (ev) ->
+ $mdDialog.show(
templateUrl: '/templates/partials/playlist-share-dialog.html',
- controller: ['$scope', ($scope) -> $scope.playlist = playlist; $scope.close = () -> dialog.close()],
- show: true
+ scope: $scope,
+ clickOutsideToClose: true,
+ controller: ($scope, $mdDialog) ->
+ $scope.closeDialog = ->
+ $mdDialog.cancel()
+ ).then (() ->
+ return
+ ), ->
+ $scope.$apply()
$scope.checkMixedLosslessness = (format) ->
if format.isMixedLosslessness == true
$scope.format = format
$modal({scope: $scope, templateUrl: 'templates/partials/collection-mixed-losslessness-dialog.html', show: true})
-
+
$scope.getCachedPlaylist = (id, format) ->
$scope.isInProgress = true
diff --git a/resources/assets/scripts/app/controllers/track.coffee b/resources/assets/scripts/app/controllers/track.coffee
index cf7ef57e..2a6bf054 100644
--- a/resources/assets/scripts/app/controllers/track.coffee
+++ b/resources/assets/scripts/app/controllers/track.coffee
@@ -15,8 +15,8 @@
# along with this program. If not, see .
module.exports = angular.module('ponyfm').controller "track", [
- '$scope', 'meta', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$modal', 'download-cached', '$window', '$timeout', '$mdDialog'
- ($scope, meta, tracks, $state, playlists, auth, favourites, $modal, cachedTrack, $window, $timeout, $mdDialog) ->
+ '$scope', 'meta', 'tracks', '$state', 'playlists', 'auth', 'favourites', 'download-cached', '$window', '$timeout', '$mdDialog'
+ ($scope, meta, tracks, $state, playlists, auth, favourites, cachedTrack, $window, $timeout, $mdDialog) ->
$scope.track
$scope.trackId = parseInt($state.params.id)
updateTrackData = (forceUpdate = false) ->
diff --git a/resources/assets/styles/body.less b/resources/assets/styles/body.less
index 80694174..0423621e 100644
--- a/resources/assets/styles/body.less
+++ b/resources/assets/styles/body.less
@@ -136,6 +136,10 @@ a {
}
.details-columns {
+ .flex-50 {
+ margin: 0 10px;
+ }
+
.left {
margin-right: 310px;
margin-left: 5px;
diff --git a/resources/assets/styles/mobile.less b/resources/assets/styles/mobile.less
index 027e0e57..4c66e8dc 100644
--- a/resources/assets/styles/mobile.less
+++ b/resources/assets/styles/mobile.less
@@ -76,7 +76,7 @@
z-index: 1011;
height: ~"calc(100% - 64px)";
box-shadow: 0 8px 8px rgba(0,0,0,0.5);
- overflow-y: scroll;
+ overflow-y: auto;
> a {
display: none;