Skip to content

Commit

Permalink
polish code for multiselection
Browse files Browse the repository at this point in the history
  • Loading branch information
Emery committed Jul 31, 2017
1 parent af1cc48 commit c7d2be4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
1 change: 0 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@
$scope.closeDialog();
// add to current playing list
if (option_id == $scope.current_list_id) {
console.log('添加到歌单成功', $scope.dialog_song);
if (Array.isArray($scope.dialog_song)) {
angularPlayer.addTrackArray($scope.dialog_song);
} else {
Expand Down
1 change: 0 additions & 1 deletion js/myplaylist.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ var myplaylist = (function () {
}

var add_myplaylist = function (playlist_id, track) {
console.log('add_myplaylist track ', track);
var playlist = localStorage.getObject(playlist_id);
if (playlist == null) {
return;
Expand Down
14 changes: 1 addition & 13 deletions listen1.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
</head>

<body ng-controller="NavigationController">

<!-- dialog -->
<div class="shadow" ng-hide="is_dialog_hidden==1"></div>
<div class="dialog" ng-hide="is_dialog_hidden==1" ng-style="myStyle">
Expand Down Expand Up @@ -115,7 +114,6 @@ <h2> {{ playlist.info.title }} </h2>

</div>
</div>

<!-- page header -->
<div class="masthead clearfix">
<div class="inner">
Expand All @@ -131,8 +129,6 @@ <h3 class="masthead-brand" ng-click="showTag(2)">Listen 1</h3>
</nav>
</div>
</div>


<!-- content page: 我的歌单 -->
<div class="site-wrapper" ng-show="current_tag==1" ng-controller="MyPlayListController">
<div class="site-wrapper-innerd" resize>
Expand All @@ -157,8 +153,6 @@ <h3 class="masthead-brand" ng-click="showTag(2)">Listen 1</h3>
</div>
</div>
</div>


<!-- content page: 精选歌单 -->
<div class="site-wrapper" ng-show="current_tag==2" ng-controller="PlayListController" ng-init="loadPlaylist();">
<div class="cover-container container-placeholder">
Expand Down Expand Up @@ -193,8 +187,6 @@ <h3 class="masthead-brand" ng-click="showTag(2)">Listen 1</h3>
</div>
</div>
</div>


<!-- content page: 快速搜索 -->
<div class="site-wrapper" ng-show="current_tag==3">
<div class="site-wrapper-innerd" resize>
Expand All @@ -215,7 +207,7 @@ <h3 class="masthead-brand" ng-click="showTag(2)">Listen 1</h3>
</div>
</ul>
<ul class="detail-songlist">
<li ng-repeat="song in result" ng-class-odd="'odd'" ng-class-even="'even'" ng-mouseenter="options=true" ng-mouseleave="options=false">
<li ng-repeat="song in result" ng-click="song.checked=!song.checked;onMultiSelect();" ng-class-odd="'odd'" ng-class-even="'even'" ng-mouseenter="options=true" ng-mouseleave="options=false">
<div style="position:absolute;" ng-show="song.checked || options">
<input type="checkbox" ng-model="song.checked" ng-change="onMultiSelect()" style="cursor:pointer;">
</div>
Expand All @@ -236,8 +228,6 @@ <h3 class="masthead-brand" ng-click="showTag(2)">Listen 1</h3>
</div>
</div>
</div>


<!-- content page: 设置 -->
<div class="site-wrapper" ng-show="current_tag==4" ng-init="lastfm.updateStatus()">
<div class="site-wrapper-innerd" resize>
Expand Down Expand Up @@ -285,8 +275,6 @@ <h3 class="masthead-brand" ng-click="showTag(2)">Listen 1</h3>
</div>
</div>
</div>


<!-- track list window -->
<div class="site-wrapper" ng-hide="is_window_hidden==1">
<div class="cover-container container-placeholder">
Expand Down

4 comments on commit c7d2be4

@yfdyh000
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有一个bug,搜索结果多选时,单击条目可正常选中,单击左侧的复选框无效果。

@emeryao
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jyma1991 验证一下

@emeryao
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yfdyh000 有bug的话应该是提一个issue 而不是评论commit

@jyma1991
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yfdyh000 什么环境? 什么浏览器?什么版本?

Please sign in to comment.