3.3.1 changes

This commit is contained in:
Trevor Squillario 2014-04-11 10:36:42 -04:00
parent 8731b9efb8
commit b6d80caee3
8 changed files with 51 additions and 31 deletions

View file

@ -103,8 +103,8 @@
<div id="playerleft" class="floatleft">
<div class="playeractions floatleft">
<a class="button" id="PreviousTrack" title="Previous Track" ng-click="previousTrack()"><img src="images/first_24x24.png" /></a>
<a class="button" id="PlayTrack" title="Play/Pause" ng-click="defaultPlay()"><img src="images/play_24x32.png" /></a>
<a class="button" id="PauseTrack" title="Play/Pause" style="display: none;"><img src="images/pause_24x32.png" /></a>
<a class="button PlayTrack" title="Play/Pause" ng-click="defaultPlay()"><img src="images/play_24x32.png" /></a>
<a class="button PauseTrack" title="Play/Pause" style="display: none;"><img src="images/pause_24x32.png" /></a>
<a class="button" id="NextTrack" title="Next Track" ng-click="nextTrack()"><img src="images/last_24x24.png" /></a>
</div>
<div id="songdetails">
@ -148,15 +148,19 @@
</div>
</div>
</div> <!-- End container -->
<div id="footer">
<ul id="showqueue" class="simplelist songlist noselect" style="width: 1200px;" ng-if="queue.length > 0">
<div id="queue">
<div class="queueactions">
<a href="" class="button" title="Shuffle Queue" ng-click="queueShuffle()">Shuffle</a>
<a href="" class="button" id="action_Empty" title="Delete Queue" ng-click="queueEmpty()">Empty</a>
<a href="" class="button" id="action_DeleteSelected" title="Remove Selected From Queue" ng-click="queueRemoveSelected()">Remove</a>
<!--<a href="" class="button buttonvertical" id="action_QueueToPlaylist" title="Create Playlist From Queue"><img src="images/list_gd_12x11.png" /></a>-->
<a class="button" id="PreviousTrack" title="Previous Track" ng-click="previousTrack()"><img src="images/first_12x12.png" /></a>
<a class="button PlayTrack" title="Play/Pause" ng-click="defaultPlay()"><img src="images/play_12x16.png" /></a>
<a class="button PauseTrack" title="Play/Pause" style="display: none;"><img src="images/pause_12x16.png" /></a>
<a class="button" id="NextTrack" title="Next Track" ng-click="nextTrack()"><img src="images/last_12x12.png" /></a>
<a class="button" title="Shuffle Queue" ng-click="queueShuffle()">Shuffle</a>
<a class="button" id="action_Empty" title="Delete Queue" ng-click="queueEmpty()">Empty</a>
<a class="button" id="action_DeleteSelected" title="Remove Selected From Queue" ng-click="queueRemoveSelected()">Remove</a>
</div>
<div ng-repeat="song in [queue]" ng-include src="'js/partials/songs.html'" sortable></div>
<ul class="simplelist songlist noselect" style="width: 1200px;" ng-if="queue.length > 0">
<div ng-repeat="song in [queue]" class="songs" ng-include src="'js/partials/songs.html'" sortable></div>
</ul>
</div>
<script>

View file

@ -146,7 +146,7 @@ function AppCtrl($scope, $rootScope, $document, $window, $location, $cookieStore
});
$('.showQueue').fancybox({
href: '#showqueue',
href: '#queue',
autoWidth: false,
width: '100%',
//margin: [50, 10, 50, 10], // top, right, bottom, left
@ -318,14 +318,17 @@ function AppCtrl($scope, $rootScope, $document, $window, $location, $cookieStore
};
$scope.playFrom = function (index) {
var from = $rootScope.song.slice(index,$rootScope.song.length);
$scope.selectedSongs = [];
angular.forEach(from, function (item, key) {
$scope.selectedSongs.push(item);
item.selected = true;
});
if ($scope.selectedSongs.length > 0) {
$rootScope.queue = [];
$scope.addSongsToQueue();
var next = $rootScope.queue[0];
$rootScope.playSong(false, next);
}
};
$scope.selectNone = function () {
angular.forEach($rootScope.song, function (item, key) {
@ -336,7 +339,7 @@ function AppCtrl($scope, $rootScope, $document, $window, $location, $cookieStore
$scope.addSongsToQueue = function () {
if ($scope.selectedSongs.length !== 0) {
angular.forEach($scope.selectedSongs, function (item, key) {
$scope.queue.push(item);
$rootScope.queue.push(item);
item.selected = false;
});
//$rootScope.showQueue();
@ -344,10 +347,14 @@ function AppCtrl($scope, $rootScope, $document, $window, $location, $cookieStore
$scope.selectedSongs.length = 0;
}
};
$scope.removeSongFromQueue = function (item) {
var index = $rootScope.queue.indexOf(item)
$rootScope.queue.splice(index, 1);
}
$scope.removeSong = function (item) {
var index = $rootScope.song.indexOf(item)
$rootScope.song.splice(index, 1);
}
};
$scope.isActive = function (route) {
return route === $location.path();
};

View file

@ -29,6 +29,7 @@ function SettingsCtrl($rootScope, $scope, $routeParams, $location, utils, global
};
$scope.save = function () {
if ($scope.settings.Password !== '' && globals.settings.Password.substring(0, 4) != 'enc:') { $scope.settings.Password = 'enc:' + utils.HexEncode($scope.settings.Password); }
if ($scope.settings.Server.indexOf('http://') != 0 && $scope.settings.Server.indexOf('https://') != 0) { $scope.settings.Server = 'http://' + $scope.settings.Server; }
if ($scope.settings.NotificationSong) {
notifications.requestPermissionIfRequired();
if (!notifications.hasNotificationSupport()) {
@ -68,7 +69,7 @@ function SettingsCtrl($rootScope, $scope, $routeParams, $location, utils, global
$scope.setupDemo = function () {
var Username = "android-guest";
var Password = "guest";
var Server = "http://subsonic.org/demo";
var Server = "http://demo.subsonic.org";
var Tab = "tabLibrary";
if (utils.confirmDelete("Do you want to connect to the Subsonic Demo server?")) {
globals.settings.Username = Username;
@ -80,7 +81,6 @@ function SettingsCtrl($rootScope, $scope, $routeParams, $location, utils, global
};
/* Load on Startup */
// https://tsquillario.dyndns.org:8443/Jamstash/beta/#/settings?url=https://tsquillario.dyndns.org:8443/subsonic&u=tsquillario
if (typeof $location.search()['url'] != 'undefined' && $scope.settings.Server === '') {
if (globals.settings.Debug) { console.log("Setting Provided: " + $location.search()['url']); }
$scope.settings.Server = $location.search()['url'];

View file

@ -1,4 +1,10 @@
[
{
"date": "4/11/2014", "version": "3.3.1",
"changes": [
{ "text": "- Added player controls to queue, fixed song actions" }
]
},
{
"date": "3/29/2014", "version": "3.3",
"changes": [

View file

@ -9,7 +9,7 @@
<label for="Password">Password <span class="red">*</span></label><br />
<input type="password" id="Password" name="Password" class="large" ng-model="settings.Password" /><br />
<label for="Server">Server <span class="red">*</span> (<a href="" title="Connect to Demo Subsonic Server" ng-click="setupDemo()">Demo</a>)</label><br />
<input type="text" id="Server" name="Server" class="xlarge" title="Subsonic Server URL Ex: http://host:port/subsonic" ng-model="settings.Server" /><br />
<input type="text" id="Server" name="Server" class="xlarge" title="Subsonic Server URL Ex: http://host:port" ng-model="settings.Server" /><br />
<!--<a href="#" class="button" id="action_RequestURL" title="Request Permission for Server URL">Enable URL</a><br />-->
<label for="SubsonicVersion">Subsonic API: <span class="apiversion" id="SubsonicVersion">{{settings.ApiVersion}}</span></label><br />
<label for="SMStats">Audio State: <span id="SMStats"></span></label><br /><br />

View file

@ -1,7 +1,7 @@
<li class="row song" ng-repeat="o in song" ng-click="selectSong(o)" ng-dblclick="playSong(false, o)" ng-class="{'selected': o.selected, 'playing': o.playing}">
<div class="itemactions">
<a class="add" href="" title="Add To Queue" ng-click="addSongToQueue(o)" stop-event="click"></a>
<a class="remove" href="" title="Remove From Queue"></a>
<a class="remove" href="" title="Remove From Queue" ng-click="removeSongFromQueue(o)" stop-event="click"></a>
<a class="play" href="" title="Start Playing From This Song" ng-click="playFrom($index)" stop-event="click"></a>
<a class="download" href="" title="Download Song" ng-click="download(o.id)"></a>
<a href="" title="Favorite" ng-class="{'favorite': o.starred, 'rate': !o.starred}" ng-click="updateFavorite(o)" stop-event="click"></a>

View file

@ -228,10 +228,10 @@
volume: volume,
errorAlerts: false,
warningAlerts: false,
cssSelectorAncestor: "#player",
cssSelectorAncestor: "",
cssSelector: {
play: "#PlayTrack",
pause: "#PauseTrack",
play: ".PlayTrack",
pause: ".PauseTrack",
seekBar: "#audiocontainer .scrubber",
playBar: "#audiocontainer .progress",
mute: "#action_Mute",

View file

@ -714,7 +714,6 @@ ul.songlist .row
cursor: pointer;
border-bottom: 1px solid #EFEFEF;
line-height: 30px;
font-size: 12px;
}
ul.songlist .row a
{
@ -960,10 +959,6 @@ ul.songlist li:hover
padding: 0 0 0 5px;
float: right;
}
.queueactions {
padding: 0 0 5px 0;
text-align: left;
}
#globalactions
{
position: absolute;
@ -1116,10 +1111,18 @@ ul.songlist li:hover
{
}
#showqueue {
#queue {
width: 1200px;
display: none;
}
#queue .songlist {
padding: 35px 0 0 0;
}
.queueactions {
padding: 0;
text-align: left;
position: fixed;
}
/* Player Style */
#player