diff --git a/css/player.css b/css/player.css index c48bbaf..23136df 100644 --- a/css/player.css +++ b/css/player.css @@ -2,6 +2,28 @@ a { cursor: pointer; } +*::-webkit-scrollbar-track +{ + box-shadow: inset 0 0 6px rgba(0,0,0,0.3); + border-radius: 10px; + background-color: #F5F5F5; +} + +*::-webkit-scrollbar +{ + width: 12px; + background-color: #F5F5F5; + border-radius: 12px; +} + +*::-webkit-scrollbar-thumb +{ + border-radius: 10px; + box-shadow: inset 0 0 6px rgba(0,0,0,.3); + background-color: #555; +} + + .shadow { position: fixed; background: rgba(30,30,30,0.9); @@ -92,19 +114,20 @@ a { } .site-wrapper { - width:100%; + /* width:1000px; */ + margin:0 auto 0 auto; overflow:hidden; - position: absolute; - padding-left: 17px; + top: 0; left: 0; bottom: 0; right: 0; + position: absolute; } .site-wrapper-innerd { overflow-y: scroll; - margin-top: 90px; + margin: 90px auto 0 auto; /* uncomment the line below will hide the scroll bar */ /*padding-right: 17px;*/ - box-sizing:content-box; - width:100%; + box-sizing: content-box; + /* width: 1000px; */ background-color: #333; } @@ -726,7 +749,6 @@ li { text-indent: -9999px; width: 36px; height: 36px; - margin-right: 8px; margin-top: 0; background: url(../images/player_large.png) no-repeat 0 9999px; } @@ -748,45 +770,37 @@ li { } .playlist-detail .detail-head-title .link { - background-position: -256px 0px; + background-position: -250px 0px; } .playlist-detail .detail-head-title .link:hover { - background-position: -256px -36px; + background-position: -250px -36px; } .playlist-detail .detail-head-title .edit { - display: inline-block; - text-indent: -9999px; - width: 36px; - height: 36px; - margin-right: 8px; - margin-top: 0; - background: url(../images/player_large.png) no-repeat 0 9999px; background-position: -288px 0px; } .playlist-detail .detail-head-title .edit:hover { - background: url(../images/player_large.png) no-repeat 0 9999px; background-position: -288px -36px; } .playlist-detail .detail-head-title .clone { - display: inline-block; - text-indent: -9999px; - width: 36px; - height: 36px; - margin-right: 8px; - margin-top: 0; - background: url(../images/player_large.png) no-repeat 0 9999px; background-position: -144px 0px; } .playlist-detail .detail-head-title .clone:hover { - background: url(../images/player_large.png) no-repeat 0 9999px; background-position: -144px -36px; } +.playlist-detail .detail-head-title .merge { + background-position: -324px 0px; +} + +.playlist-detail .detail-head-title .merge:hover { + background-position: -324px -36px; +} + .playlist-detail .detail-head-title .ply:hover { background-position: -40px -204px; } @@ -957,6 +971,32 @@ li { font-size: 17px; } +.dialog-merge-playlist { + padding-left: 0px; + text-align: left; +} + +.dialog-merge-playlist li { + cursor: pointer; + height: 112px; + padding: 6px; +} + +.dialog-merge-playlist li:hover { + background-color: #555555; +} + +.dialog-merge-playlist li img { + float: left; + height: 100px; + width: 100px; +} + +.dialog-merge-playlist li h2{ + margin-left: 125px; + font-size: 17px; +} + .dialog-newplaylist input{ margin-bottom: 22px; } @@ -1040,6 +1080,7 @@ li { .settings-content { padding: 20px; + } .btn-group button,.btn-pagination,.btn-pagination:focus { diff --git a/images/player_large.png b/images/player_large.png index 7e5259e..b670fce 100644 Binary files a/images/player_large.png and b/images/player_large.png differ diff --git a/js/app.js b/js/app.js index 8dbbd37..3c11305 100644 --- a/js/app.js +++ b/js/app.js @@ -236,6 +236,14 @@ if (dialog_type == 5) { $scope.dialog_title = '打开歌单'; $scope.dialog_type = 5; + } + if (dialog_type == 6) { + $scope.dialog_title = '歌单导入合并'; + var url = '/show_myplaylist'; + loWeb.get(url).success(function(data) { + $scope.myplaylist = data.result; + }); + $scope.dialog_type = 6; } }; @@ -312,6 +320,27 @@ }); }; + $scope.mergePlaylist = function(target_list_id) { + Notification.info('正在合并导入歌单……'); + var url = '/merge_playlist'; + loWeb.post({ + url: url, + method: 'POST', + data: $httpParamSerializerJQLike({ + source: $scope.list_id, + target: target_list_id, + }), + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + } + }).success(function() { + Notification.success('合并歌单成功'); + $scope.closeDialog(); + $scope.popWindow(); + $scope.showPlaylist($scope.list_id); + }); + }; + $scope.removeSongFromPlaylist = function(song, list_id) { var url = '/remove_track_from_myplaylist'; diff --git a/js/loweb.js b/js/loweb.js index 95f28eb..34f36ad 100644 --- a/js/loweb.js +++ b/js/loweb.js @@ -67,7 +67,7 @@ function($rootScope, $log, $http, $httpParamSerializerJQLike) { var url = '/playlist?list_id=' + list_id; return { success: function(fn) { - provider.get_playlist(url, $http, $httpParamSerializerJQLike).success(function(data){ + provider.get_playlist(url, $http, $httpParamSerializerJQLike).success(function(data){ myplaylist.save_myplaylist(data); fn(); }); @@ -142,6 +142,30 @@ function($rootScope, $log, $http, $httpParamSerializerJQLike) { return fn({'result': result}); } } + } + if (request.url.search('/merge_playlist') != -1) { + var source = getParameterByName('source', url+'?'+request.data); + var target = getParameterByName('target', url+'?'+request.data); + var tarData = (localStorage.getObject(target)).tracks; + var srcData = (localStorage.getObject(source)).tracks; + var isInSourceList = false; + for(var i in tarData){ + isInSourceList = false; + for(var j in srcData){ + if(tarData[i].id==srcData[j].id){ + isInSourceList = true; + break; + } + }; + if(!isInSourceList){ + myplaylist.add_myplaylist(source, tarData[i]); + }; + }; + return { + success: function(fn) { + fn(); + } + }; } }, bootstrapTrack: function(success, failure) { diff --git a/listen1.html b/listen1.html index 49781e5..79c9a0c 100644 --- a/listen1.html +++ b/listen1.html @@ -122,6 +122,13 @@ + +