From 0c77b4ce6c4780a623a7c3a50e383d24a685fda7 Mon Sep 17 00:00:00 2001 From: Dumeng <793763955@qq.com> Date: Fri, 15 Dec 2017 15:40:17 +0800 Subject: [PATCH] Mirror fix fix some mirror bugs --- css/player.css | 37 ++++++++++++++++++++++++++++++------- js/app.js | 3 ++- js/loweb.js | 20 ++++++++++++++++---- 3 files changed, 48 insertions(+), 12 deletions(-) diff --git a/css/player.css b/css/player.css index 66e3dcb..369be6e 100644 --- a/css/player.css +++ b/css/player.css @@ -2,6 +2,28 @@ a { cursor: pointer; } +*::-webkit-scrollbar-track +{ + -webkit-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: 10px; +} + +*::-webkit-scrollbar-thumb +{ + border-radius: 10px; + -webkit-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; } @@ -1082,4 +1105,4 @@ li { .settings-content { padding: 20px; -} +} \ No newline at end of file diff --git a/js/app.js b/js/app.js index bc85d38..9561f38 100644 --- a/js/app.js +++ b/js/app.js @@ -333,9 +333,10 @@ 'Content-Type': 'application/x-www-form-urlencoded' } }).success(function() { - $scope.showPlaylist($scope.list_id); Notification.success('合并歌单成功'); $scope.closeDialog(); + $scope.popWindow(); + $scope.showPlaylist($scope.list_id); }); }; diff --git a/js/loweb.js b/js/loweb.js index 5aec14d..17ff4b3 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(); }); @@ -146,9 +146,21 @@ function($rootScope, $log, $http, $httpParamSerializerJQLike) { if (request.url.search('/merge_playlist') != -1) { var source = getParameterByName('source', url+'?'+request.data); var target = getParameterByName('target', url+'?'+request.data); - var data = localStorage.getObject(target); - for(var i in data.tracks){ - myplaylist.add_myplaylist(source, data.tracks[i]); + var tarData = (localStorage.getObject(target)).tracks; + var srcData = (localStorage.getObject(source)).tracks; + let isInSourceList = false; + for(var i in tarData){ + isInSourceList = false; + for(var j in srcData){ + if(tarData[i].id==srcData[j].id){ + isInSourceList = true; + console.log(tarData[i]); + break; + } + }; + if(!isInSourceList){ + myplaylist.add_myplaylist(source, tarData[i]); + }; }; return { success: function(fn) {