lots of nothing

This commit is contained in:
Trevor Squillario 2014-12-06 20:26:19 -05:00
parent 9b6044361f
commit e3fc948a77
9 changed files with 48 additions and 18 deletions

View file

@ -11,15 +11,6 @@ angular.module('JamStash').directive('sortable', function () {
}
};
})
/*
.directive('split', function () {
return {
link: function (scope, elm, attrs) {
elm.splitPane();
}
};
})
*/
.directive('fancybox', ['$compile', function($compile){
return {
restrict: 'A',
@ -123,4 +114,22 @@ angular.module('JamStash').directive('sortable', function () {
}
});
};
})
.directive("ngMsgs", function() {
/* Not Using */
return {
restrict: 'E',
transclude : false,
scope: {
msgs: "="
},
template: '<span id="msg_{{$index}}" class="message">{{ item }}</span>',
link: function (scope, elm, attrs) {
scope.$watch(scope.Messages, function () {
var content = $compile((template)(scope));
elm.append(content);
$(elm).parent().fadeIn();
});
}
};
});

View file

@ -9,6 +9,7 @@
$rootScope.playingSong = null;
$rootScope.MusicFolders = [];
$rootScope.Genres = [];
$rootScope.Messages = [];
$rootScope.SelectedMusicFolder = "";
$rootScope.unity = null;
@ -301,6 +302,9 @@
$scope.isActive = function (route) {
return route === $location.path();
};
$rootScope.reloadRoute = function (reload) {
utils.reloadRoute(reload);
};
$rootScope.getSplitPosition = function (scope, elm) {
window.alert(elm.getBoundingClientRect().left);
};
@ -434,6 +438,7 @@
return $sce.trustAsHtml(html);
};
/* Launch on Startup */
$scope.loadSettings();
utils.switchTheme(globals.settings.Theme);

View file

@ -11,11 +11,8 @@ angular.module('jamstash.notifications', [])
var msgIndex = 1;
this.updateMessage = function (msg, autohide) {
if (msg !== '') {
var id = msgIndex;
$('#messages').append('<span id=\"msg_' + id + '\" class="message">' + msg + '</span>');
$rootScope.Messages.push(msg);
$('#messages').fadeIn();
$("#messages").scrollTo('100%');
var el = '#msg_' + id;
if (autohide) {
setTimeout(function () {
$(el).fadeOut(function () { $(this).remove(); });
@ -26,7 +23,6 @@ angular.module('jamstash.notifications', [])
return false;
});
}
msgIndex++;
}
};
this.requestPermissionIfRequired = function () {

View file

@ -337,6 +337,13 @@ angular.module('jamstash.utils', ['jamstash.settings'])
}
}
};
this.reloadRoute = function (date) {
if (reload) {
$window.location.reload();
} else {
$route.reload();
}
};
this.parseDate = function (date) {
// input: "2012-09-23 20:00:00.0"
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];

View file

@ -23,7 +23,9 @@
<body ng-controller="AppCtrl">
<div id="container">
<div id="header">
<div id="messages"></div>
<div id="messages">
<span id="msg_{{$index}}" class="message" ng-repeat="item in Messages track by $index" ng-bind-html="item"></span>
</div>
<div id="loading"></div>
<a id="jslogo" title="Jamstash" class="showQueue" href=""></a>
<a id="sslogo" target="_blank" ng-show="settings.Server" ng-href="{{settings.Server}}" title="{{settings.Server}}"></a>

View file

@ -65,6 +65,8 @@ angular.module('jamstash.settings', [])
this.SavedGenres = [];
this.Player1 = '#playdeck_1';
this.archiveUrl = 'https://archive.org/';
this.ChangeLog = null;
this.Messages = [];
this.BaseURL = function () { return this.settings.Server + '/rest'; };
this.BaseParams = function () { return 'u=' + this.settings.Username + '&p=' + this.settings.Password + '&f=' + this.settings.Protocol + '&v=' + this.settings.ApiVersion + '&c=' + this.settings.ApplicationName; };

View file

@ -124,7 +124,7 @@
<li><em>&rarr;</em> Next Track</li>
<li><em>&larr;</em> Previous Track</li>
<li><em>-/_</em> Volume Down <em>=/+</em> Volume Up</li>
<li><em>Media Keys</em> via <a href="https://chrome.google.com/webstore/detail/swayfm-unified-music-medi/icckhjgjjompfgoiidainoapgjepncej" target="_blank">Sway.fm Unified Music Media Keys</a></li>
<li><em>Media Keys</em> via <a href="https://chrome.google.com/webstore/detail/key-socket-media-keys/fphfgdknbpakeedbaenojjdcdoajihik" target="_blank">Key Socket Media Keys</a></li>
</ul>
<div id="donate" class="subsection floatleft">
<h3 class="title">Buy me a <span class="beer">beer</span>! I'd like that :)</h3>

View file

@ -67,7 +67,16 @@
};
json.getChangeLog(function (data) {
$scope.changeLog = data.slice(0, 10);
//notifications.updateMessage('Latest Version: ' + $scope.changeLog[0].version, true);
globals.ChangeLog = data;
var newVersion = $scope.changeLog[0].version;
if (!utils.getValue('JamstashVersion')) {
utils.setValue('JamstashVersion', newVersion);
}
var oldVersion = utils.getValue('JamstashVersion');
if (utils.checkVersionNewer(oldVersion, newVersion)) {
utils.setValue('JamstashVersion', newVersion);
notifications.updateMessage('Version ' + oldVersion + ' to ' + newVersion, true);
}
});
$scope.changeLogShowMore = function () {
json.getChangeLog(function (data) {

View file

@ -872,7 +872,7 @@ ul.songlist .row .itemactions
{
/*width: 15%;*/
float: left;
padding: 6px 10px 0 6px;
padding: 6px 10px 0 15px;
}
ul.songlist .row .itemactions a
{