2.1.7 Small Tweaks

This commit is contained in:
Trevor Squillario 2012-10-13 13:48:39 -04:00
parent aefc7d04ba
commit db8cb0865a
9 changed files with 189 additions and 130 deletions

View file

@ -11,14 +11,46 @@ var server;
var smwidth;
var volume = 50;
function getCookie(value) {
if ($.cookie(value)) {
return $.cookie(value);
} else {
return false;
}
/* jQuery.cookies.js
if (browserStorageCheck) {
var item = localStorage.getItem(value);
if (item != '' && item != undefined) {
return true;
} else {
return false;
}
} else {
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
}
*/
}
function setCookie(key, value) {
$.cookie(key, value, { expires: 365 });
/* jQuery.cookies.js
try {
if (debug) { console.log('Saving : ' + key + ':' + value); }
localStorage.setItem(key, value);
} catch (e) {
if (e == QUOTA_EXCEEDED_ERR) {
alert('Quota exceeded!');
}
}
*/
}
//Sound manager
soundManager.url = 'js/sm/swf';
if ($.cookie('ForceFlash')) {
if (getCookie('ForceFlash')) {
soundManager.preferFlash = true;
} else {
soundManager.preferFlash = false;
}
soundManager.debugMode = false;
soundManager.useHTML5Audio = true;
// Set auth cookies if specified in URL on launch
@ -26,43 +58,43 @@ var u = getParameterByName('u');
var p = getParameterByName('p');
var s = getParameterByName('s');
if (u && p && s) {
if (!$.cookie('username')) {
$.cookie('username', u, { expires: 365 });
if (!getCookie('username')) {
setCookie('username', u);
username = u;
}
if (!$.cookie('passwordenc')) {
$.cookie('passwordenc', p, { expires: 365 });
if (!getCookie('passwordenc')) {
setCookie('passwordenc', p);
password = p;
}
if (!$.cookie('Server')) {
$.cookie('Server', s, { expires: 365 });
baseURL = $.cookie('Server') + '/rest';
if (!getCookie('Server')) {
setCookie('Server', s, { expires: 365 });
baseURL = getCookie('Server') + '/rest';
}
window.location.href = getPathFromUrl(window.location);
}
if ($.cookie('Server')) {
baseURL = $.cookie('Server') + '/rest';
if (getCookie('Server')) {
baseURL = getCookie('Server') + '/rest';
}
var applicationName;
if ($.cookie('ApplicationName')) {
applicationName = $.cookie('ApplicationName');
if (getCookie('ApplicationName')) {
applicationName = getCookie('ApplicationName');
} else {
applicationName = 'MiniSub';
}
if ($.cookie('username')) {
username = $.cookie('username');
if (getCookie('username')) {
username = getCookie('username');
}
if ($.cookie('passwordenc')) {
password = $.cookie('passwordenc');
if (getCookie('passwordenc')) {
password = getCookie('passwordenc');
} else {
if ($.cookie('password')) {
password = 'enc:' + HexEncode($.cookie('password'));
if (getCookie('password')) {
password = 'enc:' + HexEncode(getCookie('password'));
}
}
var auth = makeBaseAuth(username, password);
if ($.cookie('password')) {
$.cookie('passwordenc', 'enc:' + HexEncode($.cookie('password')), { expires: 365 });
$.cookie('password', null);
if (getCookie('password')) {
setCookie('passwordenc', 'enc:' + HexEncode(getCookie('password')));
setCookie('password', null);
}
var version = '1.6.0';
@ -71,8 +103,8 @@ function loadTabContent(tab) {
switch (tab) {
case '#tabLibrary':
if (debug) { console.log("TAG LIBRARY"); }
if ($.cookie('MusicFolders')) {
loadArtists($.cookie('MusicFolders'), false);
if (getCookie('MusicFolders')) {
loadArtists(getCookie('MusicFolders'), false);
} else {
loadArtists();
}
@ -110,3 +142,5 @@ function loadTabContent(tab) {

View file

@ -125,7 +125,7 @@ function getMusicFolders() {
folders[0] = data["subsonic-response"].musicFolders.musicFolder;
}
var savedMusicFolder = $.cookie('MusicFolders');
var savedMusicFolder = getCookie('MusicFolders');
var options = [];
options.push('<option value="all">All Folders</option>');
$.each(folders, function (i, folder) {
@ -158,7 +158,7 @@ function loadAutoPlaylists(refresh) {
}
var content = $('#AutoPlaylistContainer').html();
if (content === "") {
var genres = $.cookie('AutoPlaylists');
var genres = getCookie('AutoPlaylists');
var genresArr = [];
if (genres) {
genresArr = genres.split(',');
@ -237,10 +237,10 @@ function getAlbums(id, action, appendto) {
}
function getAlbumListBy(id) {
var size;
if ($.cookie('AutoAlbumSize') === null) {
if (getCookie('AutoAlbumSize') === null) {
size = 15;
} else {
size = $.cookie('AutoAlbumSize');
size = getCookie('AutoAlbumSize');
}
$.ajax({
url: baseURL + '/getAlbumList.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=' + size + '&type=' + id,
@ -285,8 +285,8 @@ function getAlbumListBy(id) {
function getRandomSongList(action, appendto, genre, folder) {
var size, gstring;
gstring = '';
if ($.cookie('AutoPlaylistSize')) {
size = $.cookie('AutoPlaylistSize');
if (getCookie('AutoPlaylistSize')) {
size = getCookie('AutoPlaylistSize');
} else {
size = 25;
}
@ -296,7 +296,7 @@ function getRandomSongList(action, appendto, genre, folder) {
if (genre == 'Random') {
gstring = '';
}
if (folder !== undefined) {
if (folder !== undefined && folder != '') {
gstring = '&musicFolderId=' + folder;
}
if (genre == 'Starred') {
@ -334,10 +334,11 @@ function getRandomSongList(action, appendto, genre, folder) {
} else {
rowcolor = 'odd';
}
var track, starred;
var track, starred, duration;
if (item.starred !== undefined) { starred = true; } else { starred = false; }
if (item.track === undefined) { track = "&nbsp;"; } else { track = item.track; }
html = generateSongHTML(rowcolor, item.id, item.parent, track, item.title, '', item.artist, item.album, item.coverArt, item.userRating, starred, item.duration);
if (item.duration !== undefined) { duration = item.duration; } else { duration = ''; }
html = generateSongHTML(rowcolor, item.id, item.parent, track, item.title, '', item.artist, item.album, item.coverArt, item.userRating, starred, duration);
$(html).appendTo(appendto);
});
if (appendto === '#TrackContainer tbody') {
@ -360,8 +361,8 @@ function getRandomSongList(action, appendto, genre, folder) {
}
function getStarred(action, appendto, type) {
var size;
if ($.cookie('AutoPlaylistSize')) {
size = $.cookie('AutoPlaylistSize');
if (getCookie('AutoPlaylistSize')) {
size = getCookie('AutoPlaylistSize');
} else {
size = 25;
}
@ -501,7 +502,7 @@ function updateNowPlaying(showPopup) {
} else {
coverartSrc = baseURL + '/getCoverArt.view?v=' + version + '&c=' + applicationName + '&f=json&size=50&id=' + msg.coverArt;
}
if ($.cookie('Notification_NowPlaying')) {
if (getCookie('Notification_NowPlaying')) {
var sid = msg.username + '-' + msg.id;
if (jQuery.inArray(sid, updaterNowPlayingIdList) === -1 && username != msg.username) {
showNotification(coverartSrc, toHTML.un(msg.username + ':' + msg.playerName), toHTML.un(msg.artist + ' - ' + msg.title), 'text');
@ -562,10 +563,11 @@ function search(type, query) {
if (isDir === true) {
albumhtml = generateAlbumHTML(rowcolor, child.id, child.parent, child.coverArt, child.title, child.artist, child.userRating, starred);
} else {
var track, starred;
var track, starred, duration;
if (child.starred !== undefined) { starred = true; } else { starred = false; }
if (child.track === undefined) { track = "&nbsp;"; } else { track = child.track; }
albumhtml = generateSongHTML(rowcolor, child.id, child.parent, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, child.duration);
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
albumhtml = generateSongHTML(rowcolor, child.id, child.parent, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, duration);
}
$(albumhtml).appendTo("#AlbumRows");
});
@ -821,7 +823,7 @@ function countCurrentPlaylist(container) {
var time = 0;
$(container + ' tr.song').each(function (index) {
var duration = $(this).attr('duration');
if (duration !== undefined && duration != '') {
if (duration != '') {
time += parseInt(duration);
}
});
@ -851,7 +853,7 @@ function saveCurrentPlaylist() {
function deleteCurrentPlaylist() {
if (browserStorageCheck) {
localStorage.removeItem('CurrentPlaylist');
$.cookie('CurrentSong', null);
setCookie('CurrentSong', null);
if (debug) { console.log('Removing Current Playlist'); }
} else {
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
@ -935,10 +937,11 @@ function getPlaylist(id, action, appendto) {
} else {
rowcolor = 'odd';
}
var track, starred;
var track, starred, duration;
if (child.starred !== undefined) { starred = true; } else { starred = false; }
if (child.track === undefined) { track = "&nbsp;"; } else { track = child.track; }
html = generateSongHTML(rowcolor, child.id, child.parent, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, child.duration);
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
html = generateSongHTML(rowcolor, child.id, child.parent, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, duration);
$(html).appendTo(appendto);
});
if (appendto === '#TrackContainer tbody') {
@ -1047,10 +1050,11 @@ function getPodcast(id, action, appendto) {
var description = 'Published: ' + date + '\n\n';
description += child.description;
var starred;
var starred, duration;
if (child.starred !== undefined) { starred = true; } else { starred = false; }
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
var time = secondsToTime(child.duration);
html = generateSongHTML(rowcolor, child.streamId, child.parent, child.track, child.title, description, child.artist, child.album, child.coverArt, child.userRating, starred, child.duration);
html = generateSongHTML(rowcolor, child.streamId, child.parent, child.track, child.title, description, child.artist, child.album, child.coverArt, child.userRating, starred, duration);
$(html).appendTo(appendto);
count++;
});

View file

@ -1,13 +1,14 @@
function generateRowHTML(child, appendto, rowcolor) {
var albumhtml, isDir, starred, i;
var albumhtml, isDir, starred, duration, i;
isDir = child.isDir;
if (child.starred !== undefined) { starred = true; } else { starred = false; }
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
if (isDir === true) {
albumhtml = generateAlbumHTML(rowcolor, child.id, child.parent, child.coverArt, child.title, child.artist, child.userRating, starred);
} else {
var track;
if (child.track === undefined) { track = "&nbsp;"; } else { track = child.track; }
albumhtml = generateSongHTML(rowcolor, child.id, child.parent, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, child.duration);
albumhtml = generateSongHTML(rowcolor, child.id, child.parent, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, duration);
}
return albumhtml;
}
@ -44,7 +45,12 @@ function generateSongHeaderHTML() {
return html;
}
function generateSongHTML(rowcolor, childid, parentid, track, title, description, artist, album, coverart, rating, starred, duration) {
var time = secondsToTime(duration);
var time;
if (duration == '') {
time = '00:00'
} else {
time = secondsToTime(duration);
}
var html;
html = '<tr class=\"song ' + rowcolor + '\" id=\"' + childid + '\" childid=\"' + childid + '\" parentid=\"' + parentid + '\" duration=\"' + duration + '\" userrating=\"' + rating + '\">';
html += '<td class=\"itemactions\"><a class=\"add\" href=\"\" title=\"Add To Current Playlist\"></a>';

View file

@ -128,7 +128,7 @@ function playSong(el, songid, albumid, position, loadonly) {
onfinish: function () {
var next = $('#CurrentPlaylistContainer tr.playing').next();
if (!changeTrack(next)) {
if ($.cookie('AutoPilot')) {
if (getCookie('AutoPilot')) {
//var genre = $(this).data('genre');
//var folder = $(this).data('folder');
getRandomSongList('', '#CurrentPlaylistContainer tbody', '', '');
@ -161,10 +161,10 @@ function playSong(el, songid, albumid, position, loadonly) {
scrobbleSong(false);
scrobbled = false;
if ($.cookie('Notification_Song')) {
if (getCookie('Notification_Song')) {
showNotification(coverartSrc, toHTML.un(title), toHTML.un(artist + ' - ' + album), 'text');
}
if ($.cookie('ScrollTitle')) {
if (getCookie('ScrollTitle')) {
scrollTitle(toHTML.un(artist) + ' - ' + toHTML.un(title));
} else {
setTitle(toHTML.un(artist) + ' - ' + toHTML.un(title));
@ -254,8 +254,8 @@ function playPauseSong() {
var el = $('#songdetails_song');
var songid = el.attr('childid');
if (songid != '') {
if ($.cookie("CurrentSong")) {
var currentSong = JSON.parse($.cookie("CurrentSong"));
if (getCookie("CurrentSong")) {
var currentSong = JSON.parse(getCookie("CurrentSong"));
playSong($('#' + songid), currentSong.songid, currentSong.albumid, currentSong.position, false);
var playing = $('#' + songid);
if (playing != undefined) {
@ -333,7 +333,7 @@ function saveTrackPosition() {
albumid: albumid,
position: position
};
$.cookie('CurrentSong', JSON.stringify(currentSong));
setCookie('CurrentSong', JSON.stringify(currentSong));
saveCurrentPlaylist();
}
}

View file

@ -1,16 +1,16 @@
$(window).load(function () {
if ($.cookie('defaultsmwidth')) {
var width = $.cookie('defaultsmwidth');
if (getCookie('defaultsmwidth')) {
var width = getCookie('defaultsmwidth');
smwidth = width;
resizeSMSection(width);
}
if ($.cookie('sidebar') && $.cookie('username') && $.cookie('passwordenc')) {
if (getCookie('sidebar') && getCookie('username') && getCookie('passwordenc')) {
$('#SideBar').show();
updateChatMessages();
updateNowPlaying();
}
if ($.cookie('HideAZ')) {
if (getCookie('HideAZ')) {
$('#BottomContainer').hide();
}
$('ul#ChangeLog li.log').each(function (i, el) {
@ -18,9 +18,9 @@
$(el).hide();
}
});
if ($.cookie('SaveTrackPosition')) {
if (getCookie('SaveTrackPosition')) {
window.setInterval(function () {
if ($.cookie('SaveTrackPosition')) {
if (getCookie('SaveTrackPosition')) {
var sm = soundManager.getSoundById('audio');
if (sm !== undefined) {
saveTrackPosition();
@ -28,8 +28,8 @@
}
}, 5000);
}
if ($.cookie('CurrentSong')) {
var currentSong = JSON.parse($.cookie("CurrentSong"));
if (getCookie('CurrentSong')) {
var currentSong = JSON.parse(getCookie("CurrentSong"));
playSong(null, currentSong.songid, currentSong.albumid, currentSong.position, true);
loadCurrentPlaylist();
}
@ -48,7 +48,7 @@ function resizeContent() {
var smheight = $('.smsection').height();
var smwidth = $('.smsection').width();
$('#BottomContainer').css({ 'top': smheight + 35 + 'px' });
if ($.cookie('sidebar')) {
if (getCookie('sidebar')) {
var tabwidth = $(window).width() - 264;
if (tabwidth >= 700) {
$('.tabcontent').css({ 'width': tabwidth + 'px' });
@ -76,7 +76,7 @@ function resizeSMSection(x) {
$('.smsection').css({ 'width': (newsmwidth) + 'px' });
$('.actions').css({ 'width': (newsmwidth - 5) + 'px' });
$('#BottomContainer').css({ 'width': (newsmwidth - 23) + 'px' });
$.cookie('defaultsmwidth', newwidth, { expires: 365, path: '/' });
setCookie('defaultsmwidth', newwidth);
var ulwidth = newsmwidth + 6;
$('#AlbumContainer, #TrackContainer, #PodcastContainer').css({ 'margin-left': ulwidth + 'px' });
}

View file

@ -1,63 +1,63 @@
$(document).ready(function () {
//User config staff
$('#Username').val($.cookie('username'));
//$('#Password').val($.cookie('passwordenc'));
$('#AutoPlaylists').val($.cookie('AutoPlaylists'));
$('#AutoAlbumSize').val($.cookie('AutoAlbumSize'));
$('#AutoPlaylistSize').val($.cookie('AutoPlaylistSize'));
$('#Server').val($.cookie('Server'));
$('#ApplicationName').val($.cookie('ApplicationName'));
if (getCookie('username')) { $('#Username').val(getCookie('username')); }
//$('#Password').val(getCookie('passwordenc'));
if (getCookie('AutoPlaylists')) { $('#AutoPlaylists').val(getCookie('AutoPlaylists')); }
if (getCookie('AutoAlbumSize')) { $('#AutoAlbumSize').val(getCookie('AutoAlbumSize')); }
if (getCookie('AutoPlaylistSize')) { $('#AutoPlaylistSize').val(getCookie('AutoPlaylistSize')); }
if (getCookie('Server')) { $('#Server').val(getCookie('Server')); }
if (getCookie('ApplicationName')) { $('#ApplicationName').val(getCookie('ApplicationName')); }
// Set Preferences defaults
if ($.cookie('Theme')) {
$('#Theme').val($.cookie('Theme'));
var theme = $.cookie('Theme');
if (getCookie('Theme')) {
$('#Theme').val(getCookie('Theme'));
var theme = getCookie('Theme');
switchTheme(theme);
}
if ($.cookie('HideAZ')) {
if (getCookie('HideAZ')) {
$('#HideAZ').attr('checked', true);
} else {
$('#HideAZ').attr('checked', false);
}
if ($.cookie('Notification_Song')) {
if (getCookie('Notification_Song')) {
$('#Notification_Song').attr('checked', true);
} else {
$('#Notification_Song').attr('checked', false);
}
if ($.cookie('Notification_NowPlaying')) {
if (getCookie('Notification_NowPlaying')) {
$('#Notification_NowPlaying').attr('checked', true);
} else {
$('#Notification_NowPlaying').attr('checked', false);
}
if ($.cookie('ScrollTitle')) {
if (getCookie('ScrollTitle')) {
$('#ScrollTitle').attr('checked', true);
} else {
$('#ScrollTitle').attr('checked', false);
}
if ($.cookie('Debug')) {
if (getCookie('Debug')) {
$('#Debug').attr('checked', true);
debug = true;
soundManager.debugMode = true;
} else {
$('#Debug').attr('checked', false);
}
if ($.cookie('ForceFlash')) {
if (getCookie('ForceFlash')) {
$('#ForceFlash').attr('checked', true);
} else {
$('#ForceFlash').attr('checked', false);
}
if ($.cookie('SaveTrackPosition')) {
if (getCookie('SaveTrackPosition')) {
$('#SaveTrackPosition').attr('checked', true);
} else {
$('#SaveTrackPosition').attr('checked', false);
}
if ($.cookie('AutoPilot')) {
$.cookie('AutoPilot', null)
if (getCookie('AutoPilot')) {
setCookie('AutoPilot', null)
}
// Tabs
$('.tabcontent').hide(); //Hide all content
if (!$.cookie('username') && !$.cookie('passwordenc') && !$.cookie('Server')) {
if (!getCookie('username') && !getCookie('passwordenc') && !getCookie('Server')) {
$('ul.tabs li a').each(function () {
if ($(this).attr("href") == '#tabPreferences') {
$(this).addClass("active"); //Add "active" class to selected tab
@ -81,9 +81,9 @@
var firstTab = $("ul.tabs li:first a").attr("href");
loadTabContent(firstTab);
}
$('a#logo').attr("href", $.cookie('Server'));
$('a#logo').attr("href", getCookie('Server'));
$('a#logo').attr("title", 'Launch Subsonic');
if ($.cookie('Notification_NowPlaying')) {
if (getCookie('Notification_NowPlaying')) {
updateNowPlaying(true);
}
ping();
@ -158,7 +158,7 @@
$('#MusicFolders').live('change', function () {
var folder = $(this).val();
loadArtists(folder, true);
$.cookie('MusicFolders', folder, { expires: 365 });
setCookie('MusicFolders', folder);
});
$('#ArtistContainer li.item').live('click', function () {
$('#AutoAlbumContainer li').removeClass('selected');
@ -375,8 +375,8 @@
});
$('#action_RefreshArtists').click(function () {
//loadArtists("", true);
if ($.cookie('MusicFolders')) {
loadArtists($.cookie('MusicFolders'), true);
if (getCookie('MusicFolders')) {
loadArtists(getCookie('MusicFolders'), true);
} else {
loadArtists(null, true);
}
@ -535,16 +535,18 @@
});
$('#action_AutoPilot').click(function () {
var msg;
if ($.cookie('AutoPilot')) {
$.cookie('AutoPilot', null);
if (getCookie('AutoPilot')) {
setCookie('AutoPilot', null);
msg = 'Autopilot Off';
$('#action_AutoPilot').removeClass('selected');
} else {
$('#CurrentPlaylistContainer tbody').empty();
getRandomSongList('', '#CurrentPlaylistContainer tbody', '', '');
$.cookie('AutoPilot', true, { expires: 365 });
setCookie('AutoPilot', true);
$('#action_AutoPilot').addClass('selected');
msg = 'Autopilot On';
if ($('#CurrentPlaylistContainer tbody').html() == '') {
$('#CurrentPlaylistContainer tbody').empty();
getRandomSongList('', '#CurrentPlaylistContainer tbody', '', '');
}
}
$(this).attr("title", msg);
updateMessage(msg);
@ -696,13 +698,13 @@
// Side Bar Click Events
$('#action_ToggleSideBar').live('click', function () {
if ($.cookie('sidebar')) {
$.cookie('sidebar', null);
if (getCookie('sidebar')) {
setCookie('sidebar', null);
$('#SideBar').hide();
stopUpdateChatMessages();
stopUpdateNowPlaying();
} else {
$.cookie('sidebar', true, { expires: 365 });
setCookie('sidebar', true);
$('#SideBar').show();
updateChatMessages();
updateNowPlaying(false);
@ -725,30 +727,30 @@
$('#SavePreferences').live('click', function () {
var username = $('#Username').val();
var password = $('#Password').val();
$.cookie('username', username, { expires: 365 });
setCookie('username', username);
if (password != "") {
$.cookie('passwordenc', 'enc:' + HexEncode(password), { expires: 365 });
setCookie('passwordenc', 'enc:' + HexEncode(password));
}
var AutoPlaylists = $('#AutoPlaylists').val();
$.cookie('AutoPlaylists', AutoPlaylists, { expires: 365 });
setCookie('AutoPlaylists', AutoPlaylists);
var AutoAlbumSize = $('#AutoAlbumSize').val();
$.cookie('AutoAlbumSize', AutoAlbumSize, { expires: 365 });
setCookie('AutoAlbumSize', AutoAlbumSize);
var AutoPlaylistSize = $('#AutoPlaylistSize').val();
$.cookie('AutoPlaylistSize', AutoPlaylistSize, { expires: 365 });
setCookie('AutoPlaylistSize', AutoPlaylistSize);
var server = $('#Server').val();
if (server != "") {
$.cookie('Server', server, { expires: 365 });
setCookie('Server', server);
}
var applicationname = $('#ApplicationName').val();
if (applicationname != "") {
$.cookie('ApplicationName', applicationname, { expires: 365 });
setCookie('ApplicationName', applicationname);
}
location.reload(true);
});
$('#Theme').live('change', function () {
var theme = $(this).val();
switchTheme(theme);
$.cookie('Theme', theme, { expires: 365 });
setCookie('Theme', theme);
});
$('#Genres').live('change', function () {
var genre = $(this).val();
@ -763,10 +765,10 @@
});
$('#HideAZ').live('click', function () {
if ($('#HideAZ').is(':checked')) {
$.cookie('HideAZ', '1', { expires: 365 });
setCookie('HideAZ', '1');
$('#BottomContainer').hide();
} else {
$.cookie('HideAZ', null);
setCookie('HideAZ', null);
$('#BottomContainer').show();
}
});
@ -774,54 +776,60 @@
if ($('#Notification_Song').is(':checked')) {
requestPermissionIfRequired();
if (hasNotificationPermission()) {
$.cookie('Notification_Song', '1', { expires: 365 });
setCookie('Notification_Song', '1');
} else {
alert('HTML5 Notifications are not available for your current browser, Sorry :(');
return false;
}
} else {
$.cookie('Notification_Song', null);
setCookie('Notification_Song', null);
}
});
$('#Notification_NowPlaying').live('click', function () {
if ($('#Notification_NowPlaying').is(':checked')) {
requestPermissionIfRequired();
if (hasNotificationPermission()) {
$.cookie('Notification_NowPlaying', '1', { expires: 365 });
setCookie('Notification_NowPlaying', '1');
} else {
alert('HTML5 Notifications are not available for your current browser, Sorry :(');
return false;
}
} else {
$.cookie('Notification_NowPlaying', null);
setCookie('Notification_NowPlaying', null);
}
});
$('#ScrollTitle').live('click', function () {
if ($('#ScrollTitle').is(':checked')) {
$.cookie('ScrollTitle', '1', { expires: 365 });
setCookie('ScrollTitle', '1');
}
});
$('#Debug').live('click', function () {
if ($('#Debug').is(':checked')) {
$.cookie('Debug', '1', { expires: 365 });
setCookie('Debug', '1');
debug = true;
} else {
$.cookie('Debug', null);
setCookie('Debug', null);
debug = false;
}
});
$('#ForceFlash').live('click', function () {
if ($('#ForceFlash').is(':checked')) {
$.cookie('ForceFlash', '1', { expires: 365 });
setCookie('ForceFlash', '1');
} else {
$.cookie('ForceFlash', null);
setCookie('ForceFlash', null);
}
location.reload(true);
});
$('#SaveTrackPosition').live('click', function () {
if ($('#SaveTrackPosition').is(':checked')) {
$.cookie('SaveTrackPosition', '1', { expires: 365 });
setCookie('SaveTrackPosition', '1');
var sm = soundManager.getSoundById('audio');
if (sm !== undefined) {
saveTrackPosition();
}
} else {
$.cookie('SaveTrackPosition', null);
$.cookie('CurrentSong', null);
setCookie('SaveTrackPosition', null);
setCookie('CurrentSong', null);
deleteCurrentPlaylist();
}
//location.reload(true);
@ -833,13 +841,13 @@
}
});
$('#ResetPreferences').live('click', function () {
$.cookie('username', null);
$.cookie('password', null);
$.cookie('AutoAlbumSize', null);
$.cookie('AutoPlaylistSize', null);
$.cookie('Server', null);
$.cookie('ApplicationName', null);
$.cookie('HideAZ', null);
setCookie('username', null);
setCookie('password', null);
setCookie('AutoAlbumSize', null);
setCookie('AutoPlaylistSize', null);
setCookie('Server', null);
setCookie('ApplicationName', null);
setCookie('HideAZ', null);
location.reload(true);
});
$('#ChangeLogShowMore').live('click', function () {

View file

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "MiniSub (Beta)",
"description": "MiniSub - HTML5 Mini Player for Subsonic",
"version": "2.1.6",
"version": "2.1.7",
"app": {
"launch": {
"local_path": "index.html"

View file

@ -100,6 +100,12 @@ h3.title {
background: #2e2e2e;
border: 1px solid #5a5a5a;
}
#status
{
background: #222;
border-top: 1px solid #1D1D1D;
border-left: 1px solid #1D1D1D;
}
#player
{
background: #2E2E2E;
@ -130,7 +136,7 @@ a.button {
-moz-transition: border .218s;
-o-transition: border-color .218s;
transition: border-color .218s;
background: #f3f3f3;
background: #2E2E2E;
background: -webkit-gradient(linear,0% 40%,0% 70%,from(#323232),to(#2e2e2e));
background: -moz-linear-gradient(linear,0% 40%,0% 70%,from(#323232),to(#2e2e2e));
border: solid 1px #1d1d1d;

View file

@ -494,7 +494,8 @@ table.songlist tr.song td.itemactions
{
width: 85px;
padding-left: 26px;
display: block;
/*display: block;*/
margin: auto 0;
height: 18px;
}
table.songlist tr.song td.track
@ -609,7 +610,7 @@ table.songlist tr.playing
}
table.songlist tr.playing td:first-child
{
background: url('../images/play_alt_gd_16x16.png') 8px 11px no-repeat;
background: url('../images/play_alt_gd_16x16.png') 8px center no-repeat;
}
table.songlist tr.selected
{