This repository has been archived by the owner on Jan 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from dirkgroenen/development
Fixed all issues for Milestone: 1.1.5
- Loading branch information
Showing
21 changed files
with
316 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use strict'; | ||
|
||
angular.module('mopify.modal.playlistselect', [ | ||
"mopify.services.playlistmanager" | ||
]) | ||
|
||
/** | ||
* After defining the routes we create the controller for this module | ||
*/ | ||
.controller("PlaylistSelectModalController", function PlaylistSelectModalController($scope, $modalInstance, PlaylistManager){ | ||
|
||
$scope.userplaylists = []; | ||
|
||
// Get filtered user playlists | ||
PlaylistManager.getPlaylists({ | ||
useronly: true | ||
}).then(function(data){ | ||
$scope.userplaylists = data; | ||
}); | ||
|
||
|
||
/** | ||
* Cancel the modal | ||
* @return {[type]} [description] | ||
*/ | ||
$scope.cancel = function(){ | ||
$modalInstance.dismiss('cancel'); | ||
}; | ||
|
||
/** | ||
* Close the modal and return the selected playlist | ||
* @param {string} playlisturi the URI of the selected playlist | ||
*/ | ||
$scope.addToPlaylist = function(playlisturi){ | ||
$modalInstance.close(playlisturi); | ||
}; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<div class="modal-header"> | ||
<h4 class="modal-title ng-binding">Select playlist</h4> | ||
</div> | ||
|
||
<div class="selectplaylist row"> | ||
<div class="col-sm-6"> | ||
<ul class="playlists" role="menu"> | ||
<li ng-repeat="playlist in userplaylists" ng-if="$index % 2 == 0" ng-click="addToPlaylist(playlist.uri)"> | ||
{{ playlist.name }} | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="col-sm-6"> | ||
<ul class="dropdown-menu" role="menu"> | ||
<li ng-repeat="playlist in userplaylists" ng-if="$index % 2 == 1" ng-click="addToPlaylist(playlist.uri)"> | ||
{{ playlist.name }} | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="modal-footer"> | ||
<button class="btn btn-warning" ng-click="cancel()">Cancel</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.