3.2.1
BIN
images/loop_alt4_gd_16x12.png
Normal file
After Width: | Height: | Size: 234 B |
BIN
images/loop_alt4_gl_16x12.png
Normal file
After Width: | Height: | Size: 234 B |
BIN
images/volume_gd_12x9.png
Normal file
After Width: | Height: | Size: 231 B |
BIN
images/volume_gl_12x9.png
Normal file
After Width: | Height: | Size: 231 B |
BIN
images/volume_mute_gd_12x9.png
Normal file
After Width: | Height: | Size: 203 B |
BIN
images/volume_mute_gl_12x9.png
Normal file
After Width: | Height: | Size: 203 B |
61
index.html
|
@ -9,7 +9,7 @@
|
||||||
<link rel="icon" href="images/subsonic_32x32.png" sizes="32x32"/>
|
<link rel="icon" href="images/subsonic_32x32.png" sizes="32x32"/>
|
||||||
<link href="style/Style.css" rel="stylesheet" type="text/css" data-name="main" />
|
<link href="style/Style.css" rel="stylesheet" type="text/css" data-name="main" />
|
||||||
<link href="" rel="stylesheet" type="text/css" data-name="theme" />
|
<link href="" rel="stylesheet" type="text/css" data-name="theme" />
|
||||||
<link href="js/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" />
|
<link href="js/fancybox/jquery.fancybox.css" rel="stylesheet" type="text/css" />
|
||||||
<script src="js/plugins/jquery-1.7.2.min.js" type="text/javascript"></script>
|
<script src="js/plugins/jquery-1.7.2.min.js" type="text/javascript"></script>
|
||||||
<script src="js/plugins/jquery-ui-1.8.20.min.js" type="text/javascript"></script>
|
<script src="js/plugins/jquery-ui-1.8.20.min.js" type="text/javascript"></script>
|
||||||
<script src="js/plugins/jquery.base64.js" type="text/javascript"></script>
|
<script src="js/plugins/jquery.base64.js" type="text/javascript"></script>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<script src="js/plugins/jquery.periodic.js" type="text/javascript"></script>
|
<script src="js/plugins/jquery.periodic.js" type="text/javascript"></script>
|
||||||
<script src="js/plugins/jquery.scrollTo-1.4.2-min.js" type="text/javascript"></script>
|
<script src="js/plugins/jquery.scrollTo-1.4.2-min.js" type="text/javascript"></script>
|
||||||
<script src="js/jplayer/jquery.jplayer.min.js" type="text/javascript"></script>
|
<script src="js/jplayer/jquery.jplayer.min.js" type="text/javascript"></script>
|
||||||
<script src="js/fancybox/jquery.fancybox-1.3.4.pack.js" type="text/javascript"></script>
|
<script src="js/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>
|
||||||
<script src="js/libs/api.js" type="text/javascript"></script>
|
<script src="js/libs/api.js" type="text/javascript"></script>
|
||||||
<script src="js/libs/utils.js" type="text/javascript"></script>
|
<script src="js/libs/utils.js" type="text/javascript"></script>
|
||||||
<script src="js/libs/chat.js" type="text/javascript"></script>
|
<script src="js/libs/chat.js" type="text/javascript"></script>
|
||||||
|
@ -41,9 +41,10 @@
|
||||||
<div id="nav">
|
<div id="nav">
|
||||||
<ul class="tabs">
|
<ul class="tabs">
|
||||||
<li><a href="#tabLibrary" id="action_tabLibrary" class="first" title="Library"><img src="images/headphones_gd_16x14.png" /></a></li>
|
<li><a href="#tabLibrary" id="action_tabLibrary" class="first" title="Library"><img src="images/headphones_gd_16x14.png" /></a></li>
|
||||||
<li><a href="#tabCurrent" id="action_tabCurrent" title="Current Playlist"><img src="images/play_alt_gd_16x16.png" /></a></li>
|
<li><a href="#tabQueue" id="action_tabQueue" title="Play Queue"><img src="images/play_alt_gd_16x16.png" /></a></li>
|
||||||
<li><a href="#tabPlaylists" id="action_tabPlaylists" title="Playlists"><img src="images/list_gd_16x14.png" /></a></li>
|
<li><a href="#tabPlaylists" id="action_tabPlaylists" title="Playlists"><img src="images/list_gd_16x14.png" /></a></li>
|
||||||
<li><a href="#tabPodcasts" id="action_tabPodcasts" title="Podcasts"><img src="images/rss_16x16.png" /></a></li>
|
<li><a href="#tabPodcasts" id="action_tabPodcasts" title="Podcasts"><img src="images/rss_16x16.png" /></a></li>
|
||||||
|
<li><a href="#tabVideos" id="action_tabVideos" title="Videos"><img src="images/movie_gd_16x16.png" /></a></li>
|
||||||
<li><a href="#tabPreferences" id="action_tabPreferences" class="last" title="Preferences"><img src="images/cog_16x16.png" /></a></li>
|
<li><a href="#tabPreferences" id="action_tabPreferences" class="last" title="Preferences"><img src="images/cog_16x16.png" /></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="toploading"></div>
|
<div id="toploading"></div>
|
||||||
|
@ -59,10 +60,9 @@
|
||||||
<div id="songActions">
|
<div id="songActions">
|
||||||
<a href="#" class="button disabled" id="action_SelectAll" title="Select All">All</a>
|
<a href="#" class="button disabled" id="action_SelectAll" title="Select All">All</a>
|
||||||
<a href="#" class="button disabled" id="action_SelectNone" title="Select None">None</a>
|
<a href="#" class="button disabled" id="action_SelectNone" title="Select None">None</a>
|
||||||
|
<a href="#" class="button disabled" id="action_AddToQueue" title="Add To Play Queue">+ Queue</a>
|
||||||
<a href="#" class="button disabled" id="action_AddToPlaylist" title="Add Selected To Playlist">+ Playlist</a>
|
<a href="#" class="button disabled" id="action_AddToPlaylist" title="Add Selected To Playlist">+ Playlist</a>
|
||||||
<div id="submenu_AddToPlaylist" class="submenu shadow" style="display: none;"></div>
|
<div id="submenu_AddToPlaylist" class="submenu shadow" style="display: none;"></div>
|
||||||
<a href="#" class="button disabled" id="action_AddToCurrent" title="Add Selected To Current Playlist">+ Current</a>
|
|
||||||
<a href="#" class="button disabled" id="action_AddAllToCurrent" title="Add All to Current Playlist">+All</a>
|
|
||||||
<a href="#" class="button disabled" id="action_PlayAlbum" title="Play Album"><img src="images/play_gl_6x8.png" /></a>
|
<a href="#" class="button disabled" id="action_PlayAlbum" title="Play Album"><img src="images/play_gl_6x8.png" /></a>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" id="Search" class="medium" title="Wildcards (*) supported"/>
|
<input type="text" id="Search" class="medium" title="Wildcards (*) supported"/>
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="status_Library" class="status alignleft" data-type="" data-offset=""><img src="images/arrow_left_gl_8x8.png" /> <a id="action_PreviousAlbumList" class="previous" href="#">Previous</a> | <a id="action_NextAlbumList" class="next" href="#">Next</a> <img src="images/arrow_right_gl_8x8.png" /></div>
|
<div id="status_Library" class="status alignleft" data-type="" data-offset=""><img src="images/arrow_left_gl_8x8.png" /> <a id="action_PreviousAlbumList" class="previous" href="#">Previous</a> | <a id="action_NextAlbumList" class="next" href="#">Next</a> <img src="images/arrow_right_gl_8x8.png" /></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="tabCurrent" class="tabcontent">
|
<div id="tabQueue" class="tabcontent">
|
||||||
<div class="actions floatleft">
|
<div class="actions floatleft">
|
||||||
<a href="#" class="button" id="action_Shuffle" title="Shuffle"><img src="images/fork_11x12.png" /></a>
|
<a href="#" class="button" id="action_Shuffle" title="Shuffle"><img src="images/fork_11x12.png" /></a>
|
||||||
<a href="#" class="button" id="action_Empty" title="Remove All">Empty</a>
|
<a href="#" class="button" id="action_Empty" title="Remove All">Empty</a>
|
||||||
|
@ -124,13 +124,13 @@
|
||||||
<div id="tabPlaylists" class="tabcontent">
|
<div id="tabPlaylists" class="tabcontent">
|
||||||
<div class="actions floatleft">
|
<div class="actions floatleft">
|
||||||
<a href="#" class="button" id="action_RefreshPlaylists" title="Refresh Playlists"><img class="pad" src="images/reload_9x11.png" /></a>
|
<a href="#" class="button" id="action_RefreshPlaylists" title="Refresh Playlists"><img class="pad" src="images/reload_9x11.png" /></a>
|
||||||
|
<a href="#" class="button" id="action_NewPlaylist" title="New Playlist">+ New</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="subactions floatleft">
|
<div id="playlistActions" class="subactions floatleft">
|
||||||
<a href="#" class="button" id="action_NewPlaylist" onclick="newPlaylist(); return false;" title="New Playlist">+ New</a>
|
<a href="#" class="button disabled" id="action_DeletePlaylist" title="Delete Selected Playlist">Delete</a>
|
||||||
<a href="#" class="button" id="action_DeletePlaylist" title="Delete Selected Playlist">Delete</a>
|
<a href="#" class="button disabled" id="action_SavePlaylist" title="Save Playlist">Save</a>
|
||||||
<a href="#" class="button" id="action_SavePlaylist" title="Save Playlist">Save</a>
|
<a href="#" class="button disabled" id="action_ShufflePlaylist" title="Shuffle Playlist"><img class="pad" src="images/fork_11x12.png" /></a>
|
||||||
<a href="#" class="button" id="action_ShufflePlaylist" title="Shuffle Playlist"><img class="pad" src="images/fork_11x12.png" /></a>
|
<a href="#" class="button disabled" id="action_RemoveSongs" title="Remove selected song(s) from playlist">Remove Song(s)</a>
|
||||||
<a href="#" class="button" id="action_RemoveSongs" title="Remove selected song(s) from playlist">Remove Song(s)</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<div id="Tracks" class="section lgsection floatleft noselect">
|
<div id="Tracks" class="section lgsection floatleft noselect">
|
||||||
|
@ -174,6 +174,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="status_Podcasts" class="status">0 song(s), 00:00:00 total time</div>
|
<div id="status_Podcasts" class="status">0 song(s), 00:00:00 total time</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="tabVideos" class="tabcontent">
|
||||||
|
<div class="actions floatleft">
|
||||||
|
<a href="#" class="button" id="action_RefreshVideos" title="Refresh Videos"><img class="pad" src="images/reload_9x11.png" /></a>
|
||||||
|
</div>
|
||||||
|
<div class="subactions floatleft"><span class="alert">***Opens new window to the video URL...</span>
|
||||||
|
</div>
|
||||||
|
<div id="Videos" class="section fullsection floatleft noselect">
|
||||||
|
<table id="VideosContainer" class="simplelist songlist" cellspacing="1">
|
||||||
|
<thead></thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
<div id="videodeck"></div>
|
||||||
|
<div id="videooverlay" class="darkoverlay"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div id="tabPreferences" class="tabcontent">
|
<div id="tabPreferences" class="tabcontent">
|
||||||
<div class="actions floatleft">
|
<div class="actions floatleft">
|
||||||
<a href="#" class="button" id="ResetPreferences" title="Reset Preferences">Reset</a>
|
<a href="#" class="button" id="ResetPreferences" title="Reset Preferences">Reset</a>
|
||||||
|
@ -190,7 +205,7 @@
|
||||||
<label for="Server">Server <span class="red">*</span></label><br />
|
<label for="Server">Server <span class="red">*</span></label><br />
|
||||||
<input type="text" id="Server" name="Server" class="xlarge" title="Subsonic Server URL Ex: http://host:port/subsonic"/><br />
|
<input type="text" id="Server" name="Server" class="xlarge" title="Subsonic Server URL Ex: http://host:port/subsonic"/><br />
|
||||||
<!--<a href="#" class="button" id="action_RequestURL" title="Request Permission for Server URL">Enable URL</a><br />-->
|
<!--<a href="#" class="button" id="action_RequestURL" title="Request Permission for Server URL">Enable URL</a><br />-->
|
||||||
<label for="SubsonicVersion">Subsonic API: <span id="SubsonicVersion"></span></label><br />
|
<label for="SubsonicVersion">Subsonic API: <span class="apiversion" id="SubsonicVersion"></span></label><br />
|
||||||
<label for="SMStats">Audio State: <span id="SMStats"></span></label><br />
|
<label for="SMStats">Audio State: <span id="SMStats"></span></label><br />
|
||||||
</div>
|
</div>
|
||||||
<div class="subsection floatleft">
|
<div class="subsection floatleft">
|
||||||
|
@ -201,7 +216,6 @@
|
||||||
<li><em>Spacebar</em> Play/Pause</li>
|
<li><em>Spacebar</em> Play/Pause</li>
|
||||||
<li><em>→</em> Next Track</li>
|
<li><em>→</em> Next Track</li>
|
||||||
<li><em>←</em> Previous Track</li>
|
<li><em>←</em> Previous Track</li>
|
||||||
<li><em>-/_</em> Volume Down <em>=/+</em> Volume Up</li>
|
|
||||||
<li><span></span></li>
|
<li><span></span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -255,7 +269,7 @@
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<span>Local Storage</span><br />
|
<span>Local Storage</span><br />
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<div class="inputwrap"><input type="checkbox" id="SaveTrackPosition" name="SaveTrackPosition" value="1" title="Saves Current Playlist & Track Position Periodically (Uses HTML5: localStorage)"/></div>
|
<div class="inputwrap"><input type="checkbox" id="SaveTrackPosition" name="SaveTrackPosition" value="1" title="Saves Play Queue & Track Position Periodically (Uses HTML5: localStorage)"/></div>
|
||||||
<label for="SaveTrackPosition">Save Current Position</label>
|
<label for="SaveTrackPosition">Save Current Position</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
@ -280,8 +294,15 @@
|
||||||
<span class="changes">- </span>
|
<span class="changes">- </span>
|
||||||
</li>
|
</li>
|
||||||
-->
|
-->
|
||||||
|
<li class="log"><span class="version">11/1/2012 - 2.3.1</span>
|
||||||
|
<span class="changes">- Autopilot & Auto Playlists will use the currently selected Music Folder</span>
|
||||||
|
<span class="changes">- Volume slider, mute button added</span>
|
||||||
|
<span class="changes">- Added Created Date to Albums</span>
|
||||||
|
<span class="changes">- Click song notification to skip to next track</span>
|
||||||
|
</li>
|
||||||
<li class="log"><span class="version">10/30/2012 - 2.2.7</span>
|
<li class="log"><span class="version">10/30/2012 - 2.2.7</span>
|
||||||
<span class="changes">- Added Shortcuts!</span>
|
<span class="changes">- Added Shortcuts!</span>
|
||||||
|
<span class="changes">- Upgraded to FancyBox2</span>
|
||||||
<span class="changes">- Switched to <a href="http://www.jplayer.org" target="_blank">jPlayer</a> for HTML5/Flash audio+video, video support coming soon!</span>
|
<span class="changes">- Switched to <a href="http://www.jplayer.org" target="_blank">jPlayer</a> for HTML5/Flash audio+video, video support coming soon!</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="log"><span class="version">10/26/2012 - 2.2.6</span>
|
<li class="log"><span class="version">10/26/2012 - 2.2.6</span>
|
||||||
|
@ -439,11 +460,17 @@
|
||||||
<a href="#" class="button" id="NextTrack" title="Next Track"><img src="images/last_24x24.png" /></a>
|
<a href="#" class="button" id="NextTrack" title="Next Track"><img src="images/last_24x24.png" /></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="songdetails">
|
<div id="songdetails">
|
||||||
<div id="coverart"><a id="coverartimage" href="images/albumdefault_120.jpg"><img src="images/albumdefault_56.jpg" alt=""/></a></div>
|
<div id="coverart"><a id="coverartimage" href="images/albumdefault_120.jpg"><img src="images/albumdefault_60.jpg" alt=""/></a></div>
|
||||||
<ul id="songdetailstext">
|
<ul>
|
||||||
<li id="songdetails_song" class="song" title=""></li>
|
<li id="songdetails_song" class="song" title=""></li>
|
||||||
<li id="songdetails_artist" class="album" title=""></li>
|
<li id="songdetails_artist" class="album" title=""></li>
|
||||||
<li id="songdetails_specs" class="specs"></li>
|
<li id="songdetails_specs" class="specs"></li>
|
||||||
|
<li id="songdetails_controls">
|
||||||
|
<!--<a href="#" id="action_ShuffleMode" class="shuffle first" title="Shuffle Mode"></a>-->
|
||||||
|
<a href="#" id="action_Mute" class="mute first" title="Mute"></a>
|
||||||
|
<a href="#" id="action_UnMute" class="unmute first" title="Unmute" style="display: none;"></a>
|
||||||
|
<div class="jp-volume-bar"><div class="jp-volume-bar-value"></div></div><a href="#" id="action_VolumeMax" class="volume" title="Max Volume"></a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="rate"><a id="songdetails_rate" class="rate" href="" title="Add To Favorites"></a></div>
|
<div class="rate"><a id="songdetails_rate" class="rate" href="" title="Add To Favorites"></a></div>
|
||||||
<div class="vertshade"></div>
|
<div class="vertshade"></div>
|
||||||
|
|
22
js/app.js
|
@ -3,14 +3,13 @@ var debug = false;
|
||||||
var audio = null;
|
var audio = null;
|
||||||
var hostURL = location.href;
|
var hostURL = location.href;
|
||||||
var baseURL;
|
var baseURL;
|
||||||
var version;
|
var apiVersion;
|
||||||
var username;
|
var username;
|
||||||
var password;
|
var password;
|
||||||
var passwordenc;
|
var passwordenc;
|
||||||
var server;
|
var server;
|
||||||
var smwidth;
|
var smwidth;
|
||||||
var volume = 50;
|
var currentVersion = '2.3.1';
|
||||||
var currentVersion = '2.2.7';
|
|
||||||
|
|
||||||
function getCookie(value) {
|
function getCookie(value) {
|
||||||
if ($.cookie(value)) {
|
if ($.cookie(value)) {
|
||||||
|
@ -88,13 +87,14 @@ if (getCookie('password')) {
|
||||||
setCookie('passwordenc', 'enc:' + HexEncode(getCookie('password')));
|
setCookie('passwordenc', 'enc:' + HexEncode(getCookie('password')));
|
||||||
setCookie('password', null);
|
setCookie('password', null);
|
||||||
}
|
}
|
||||||
if (getCookie('Volume')) {
|
var apiVersion = '1.6.0';
|
||||||
volume = parseInt(getCookie('Volume'));
|
|
||||||
}
|
|
||||||
var version = '1.6.0';
|
|
||||||
|
|
||||||
function loadTabContent(tab) {
|
function loadTabContent(tab) {
|
||||||
if (username && password) {
|
var tabid = '#action_' + tab.substring(1, tab.length);
|
||||||
|
$("ul.tabs li a").removeClass("active"); //Remove any "active" class
|
||||||
|
$(tabid).addClass("active"); //Add "active" class to selected tab
|
||||||
|
$(".tabcontent").hide(); //Hide all tab content
|
||||||
|
window.location.hash = tab;
|
||||||
switch (tab) {
|
switch (tab) {
|
||||||
case '#tabLibrary':
|
case '#tabLibrary':
|
||||||
if (debug) { console.log("TAG LIBRARY"); }
|
if (debug) { console.log("TAG LIBRARY"); }
|
||||||
|
@ -105,8 +105,8 @@ function loadTabContent(tab) {
|
||||||
}
|
}
|
||||||
getMusicFolders();
|
getMusicFolders();
|
||||||
break;
|
break;
|
||||||
case '#tabCurrent':
|
case '#tabQueue':
|
||||||
if (debug) { console.log("TAG CURRENT"); }
|
if (debug) { console.log("TAG QUEUE"); }
|
||||||
var header = generateSongHeaderHTML();
|
var header = generateSongHeaderHTML();
|
||||||
$('#CurrentPlaylistContainer thead').html(header);
|
$('#CurrentPlaylistContainer thead').html(header);
|
||||||
var count = $('#CurrentPlaylistContainer tbody tr.song').size();
|
var count = $('#CurrentPlaylistContainer tbody tr.song').size();
|
||||||
|
@ -141,7 +141,7 @@ function loadTabContent(tab) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
$(tab).fadeIn('fast'); //Fade in the active ID content
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 106 B |
Before Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 503 B |
Before Width: | Height: | Size: 96 B |
Before Width: | Height: | Size: 70 B |
Before Width: | Height: | Size: 506 B |
Before Width: | Height: | Size: 203 B |
Before Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 15 KiB |
BIN
js/fancybox/fancybox_loading.gif
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
js/fancybox/fancybox_overlay.png
Normal file
After Width: | Height: | Size: 1,003 B |
BIN
js/fancybox/fancybox_sprite.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
js/fancybox/helpers/fancybox_buttons.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
96
js/fancybox/helpers/jquery.fancybox-buttons.css
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
#fancybox-buttons {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 8050;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons.top {
|
||||||
|
top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons.bottom {
|
||||||
|
bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons ul {
|
||||||
|
display: block;
|
||||||
|
width: 166px;
|
||||||
|
height: 30px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
border: 1px solid #111;
|
||||||
|
border-radius: 3px;
|
||||||
|
-webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
||||||
|
-moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
||||||
|
box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
||||||
|
background: rgb(50,50,50);
|
||||||
|
background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%);
|
||||||
|
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51)));
|
||||||
|
background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
||||||
|
background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
||||||
|
background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
||||||
|
background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons ul li {
|
||||||
|
float: left;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons a {
|
||||||
|
display: block;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
text-indent: -9999px;
|
||||||
|
background-image: url('fancybox_buttons.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
outline: none;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons a:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons a.btnPrev {
|
||||||
|
background-position: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons a.btnNext {
|
||||||
|
background-position: -33px 0;
|
||||||
|
border-right: 1px solid #3e3e3e;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons a.btnPlay {
|
||||||
|
background-position: 0 -30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons a.btnPlayOn {
|
||||||
|
background-position: -30px -30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons a.btnToggle {
|
||||||
|
background-position: 3px -60px;
|
||||||
|
border-left: 1px solid #111;
|
||||||
|
border-right: 1px solid #3e3e3e;
|
||||||
|
width: 35px
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons a.btnToggleOn {
|
||||||
|
background-position: -27px -60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons a.btnClose {
|
||||||
|
border-left: 1px solid #111;
|
||||||
|
width: 35px;
|
||||||
|
background-position: -56px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-buttons a.btnDisabled {
|
||||||
|
opacity : 0.4;
|
||||||
|
cursor: default;
|
||||||
|
}
|
121
js/fancybox/helpers/jquery.fancybox-buttons.js
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
/*!
|
||||||
|
* Buttons helper for fancyBox
|
||||||
|
* version: 1.0.5 (Mon, 15 Oct 2012)
|
||||||
|
* @requires fancyBox v2.0 or later
|
||||||
|
*
|
||||||
|
* Usage:
|
||||||
|
* $(".fancybox").fancybox({
|
||||||
|
* helpers : {
|
||||||
|
* buttons: {
|
||||||
|
* position : 'top'
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
(function ($) {
|
||||||
|
//Shortcut for fancyBox object
|
||||||
|
var F = $.fancybox;
|
||||||
|
|
||||||
|
//Add helper object
|
||||||
|
F.helpers.buttons = {
|
||||||
|
defaults : {
|
||||||
|
skipSingle : false, // disables if gallery contains single image
|
||||||
|
position : 'top', // 'top' or 'bottom'
|
||||||
|
tpl : '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:jQuery.fancybox.close();"></a></li></ul></div>'
|
||||||
|
},
|
||||||
|
|
||||||
|
list : null,
|
||||||
|
buttons: null,
|
||||||
|
|
||||||
|
beforeLoad: function (opts, obj) {
|
||||||
|
//Remove self if gallery do not have at least two items
|
||||||
|
|
||||||
|
if (opts.skipSingle && obj.group.length < 2) {
|
||||||
|
obj.helpers.buttons = false;
|
||||||
|
obj.closeBtn = true;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Increase top margin to give space for buttons
|
||||||
|
obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
|
||||||
|
},
|
||||||
|
|
||||||
|
onPlayStart: function () {
|
||||||
|
if (this.buttons) {
|
||||||
|
this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onPlayEnd: function () {
|
||||||
|
if (this.buttons) {
|
||||||
|
this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
afterShow: function (opts, obj) {
|
||||||
|
var buttons = this.buttons;
|
||||||
|
|
||||||
|
if (!buttons) {
|
||||||
|
this.list = $(opts.tpl).addClass(opts.position).appendTo('body');
|
||||||
|
|
||||||
|
buttons = {
|
||||||
|
prev : this.list.find('.btnPrev').click( F.prev ),
|
||||||
|
next : this.list.find('.btnNext').click( F.next ),
|
||||||
|
play : this.list.find('.btnPlay').click( F.play ),
|
||||||
|
toggle : this.list.find('.btnToggle').click( F.toggle )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Prev
|
||||||
|
if (obj.index > 0 || obj.loop) {
|
||||||
|
buttons.prev.removeClass('btnDisabled');
|
||||||
|
} else {
|
||||||
|
buttons.prev.addClass('btnDisabled');
|
||||||
|
}
|
||||||
|
|
||||||
|
//Next / Play
|
||||||
|
if (obj.loop || obj.index < obj.group.length - 1) {
|
||||||
|
buttons.next.removeClass('btnDisabled');
|
||||||
|
buttons.play.removeClass('btnDisabled');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
buttons.next.addClass('btnDisabled');
|
||||||
|
buttons.play.addClass('btnDisabled');
|
||||||
|
}
|
||||||
|
|
||||||
|
this.buttons = buttons;
|
||||||
|
|
||||||
|
this.onUpdate(opts, obj);
|
||||||
|
},
|
||||||
|
|
||||||
|
onUpdate: function (opts, obj) {
|
||||||
|
var toggle;
|
||||||
|
|
||||||
|
if (!this.buttons) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
|
||||||
|
|
||||||
|
//Size toggle button
|
||||||
|
if (obj.canShrink) {
|
||||||
|
toggle.addClass('btnToggleOn');
|
||||||
|
|
||||||
|
} else if (!obj.canExpand) {
|
||||||
|
toggle.addClass('btnDisabled');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeClose: function () {
|
||||||
|
if (this.list) {
|
||||||
|
this.list.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.list = null;
|
||||||
|
this.buttons = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}(jQuery));
|
196
js/fancybox/helpers/jquery.fancybox-media.js
Normal file
|
@ -0,0 +1,196 @@
|
||||||
|
/*!
|
||||||
|
* Media helper for fancyBox
|
||||||
|
* version: 1.0.5 (Tue, 23 Oct 2012)
|
||||||
|
* @requires fancyBox v2.0 or later
|
||||||
|
*
|
||||||
|
* Usage:
|
||||||
|
* $(".fancybox").fancybox({
|
||||||
|
* helpers : {
|
||||||
|
* media: true
|
||||||
|
* }
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
* Set custom URL parameters:
|
||||||
|
* $(".fancybox").fancybox({
|
||||||
|
* helpers : {
|
||||||
|
* media: {
|
||||||
|
* youtube : {
|
||||||
|
* params : {
|
||||||
|
* autoplay : 0
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
* Or:
|
||||||
|
* $(".fancybox").fancybox({,
|
||||||
|
* helpers : {
|
||||||
|
* media: true
|
||||||
|
* },
|
||||||
|
* youtube : {
|
||||||
|
* autoplay: 0
|
||||||
|
* }
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
* Supports:
|
||||||
|
*
|
||||||
|
* Youtube
|
||||||
|
* http://www.youtube.com/watch?v=opj24KnzrWo
|
||||||
|
* http://www.youtube.com/embed/opj24KnzrWo
|
||||||
|
* http://youtu.be/opj24KnzrWo
|
||||||
|
* Vimeo
|
||||||
|
* http://vimeo.com/40648169
|
||||||
|
* http://vimeo.com/channels/staffpicks/38843628
|
||||||
|
* http://vimeo.com/groups/surrealism/videos/36516384
|
||||||
|
* http://player.vimeo.com/video/45074303
|
||||||
|
* Metacafe
|
||||||
|
* http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
|
||||||
|
* http://www.metacafe.com/watch/7635964/
|
||||||
|
* Dailymotion
|
||||||
|
* http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
|
||||||
|
* Twitvid
|
||||||
|
* http://twitvid.com/QY7MD
|
||||||
|
* Twitpic
|
||||||
|
* http://twitpic.com/7p93st
|
||||||
|
* Instagram
|
||||||
|
* http://instagr.am/p/IejkuUGxQn/
|
||||||
|
* http://instagram.com/p/IejkuUGxQn/
|
||||||
|
* Google maps
|
||||||
|
* http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
|
||||||
|
* http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
|
||||||
|
* http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
|
||||||
|
*/
|
||||||
|
(function ($) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
//Shortcut for fancyBox object
|
||||||
|
var F = $.fancybox,
|
||||||
|
format = function( url, rez, params ) {
|
||||||
|
params = params || '';
|
||||||
|
|
||||||
|
if ( $.type( params ) === "object" ) {
|
||||||
|
params = $.param(params, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$.each(rez, function(key, value) {
|
||||||
|
url = url.replace( '$' + key, value || '' );
|
||||||
|
});
|
||||||
|
|
||||||
|
if (params.length) {
|
||||||
|
url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params;
|
||||||
|
}
|
||||||
|
|
||||||
|
return url;
|
||||||
|
};
|
||||||
|
|
||||||
|
//Add helper object
|
||||||
|
F.helpers.media = {
|
||||||
|
defaults : {
|
||||||
|
youtube : {
|
||||||
|
matcher : /(youtube\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,
|
||||||
|
params : {
|
||||||
|
autoplay : 1,
|
||||||
|
autohide : 1,
|
||||||
|
fs : 1,
|
||||||
|
rel : 0,
|
||||||
|
hd : 1,
|
||||||
|
wmode : 'opaque',
|
||||||
|
enablejsapi : 1
|
||||||
|
},
|
||||||
|
type : 'iframe',
|
||||||
|
url : '//www.youtube.com/embed/$3'
|
||||||
|
},
|
||||||
|
vimeo : {
|
||||||
|
matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
|
||||||
|
params : {
|
||||||
|
autoplay : 1,
|
||||||
|
hd : 1,
|
||||||
|
show_title : 1,
|
||||||
|
show_byline : 1,
|
||||||
|
show_portrait : 0,
|
||||||
|
fullscreen : 1
|
||||||
|
},
|
||||||
|
type : 'iframe',
|
||||||
|
url : '//player.vimeo.com/video/$1'
|
||||||
|
},
|
||||||
|
metacafe : {
|
||||||
|
matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,
|
||||||
|
params : {
|
||||||
|
autoPlay : 'yes'
|
||||||
|
},
|
||||||
|
type : 'swf',
|
||||||
|
url : function( rez, params, obj ) {
|
||||||
|
obj.swf.flashVars = 'playerVars=' + $.param( params, true );
|
||||||
|
|
||||||
|
return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dailymotion : {
|
||||||
|
matcher : /dailymotion.com\/video\/(.*)\/?(.*)/,
|
||||||
|
params : {
|
||||||
|
additionalInfos : 0,
|
||||||
|
autoStart : 1
|
||||||
|
},
|
||||||
|
type : 'swf',
|
||||||
|
url : '//www.dailymotion.com/swf/video/$1'
|
||||||
|
},
|
||||||
|
twitvid : {
|
||||||
|
matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,
|
||||||
|
params : {
|
||||||
|
autoplay : 0
|
||||||
|
},
|
||||||
|
type : 'iframe',
|
||||||
|
url : '//www.twitvid.com/embed.php?guid=$1'
|
||||||
|
},
|
||||||
|
twitpic : {
|
||||||
|
matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,
|
||||||
|
type : 'image',
|
||||||
|
url : '//twitpic.com/show/full/$1/'
|
||||||
|
},
|
||||||
|
instagram : {
|
||||||
|
matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,
|
||||||
|
type : 'image',
|
||||||
|
url : '//$1/p/$2/media/'
|
||||||
|
},
|
||||||
|
google_maps : {
|
||||||
|
matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,
|
||||||
|
type : 'iframe',
|
||||||
|
url : function( rez ) {
|
||||||
|
return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeLoad : function(opts, obj) {
|
||||||
|
var url = obj.href || '',
|
||||||
|
type = false,
|
||||||
|
what,
|
||||||
|
item,
|
||||||
|
rez,
|
||||||
|
params;
|
||||||
|
|
||||||
|
for (what in opts) {
|
||||||
|
item = opts[ what ];
|
||||||
|
rez = url.match( item.matcher );
|
||||||
|
|
||||||
|
if (rez) {
|
||||||
|
type = item.type;
|
||||||
|
params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null));
|
||||||
|
|
||||||
|
url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params );
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type) {
|
||||||
|
obj.href = url;
|
||||||
|
obj.type = type;
|
||||||
|
|
||||||
|
obj.autoHeight = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}(jQuery));
|
54
js/fancybox/helpers/jquery.fancybox-thumbs.css
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
#fancybox-thumbs {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 8050;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-thumbs.bottom {
|
||||||
|
bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-thumbs.top {
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-thumbs ul {
|
||||||
|
position: relative;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-thumbs ul li {
|
||||||
|
float: left;
|
||||||
|
padding: 1px;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-thumbs ul li.active {
|
||||||
|
opacity: 0.75;
|
||||||
|
padding: 0;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-thumbs ul li:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-thumbs ul li a {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid #222;
|
||||||
|
background: #111;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-thumbs ul li img {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
162
js/fancybox/helpers/jquery.fancybox-thumbs.js
Normal file
|
@ -0,0 +1,162 @@
|
||||||
|
/*!
|
||||||
|
* Thumbnail helper for fancyBox
|
||||||
|
* version: 1.0.7 (Mon, 01 Oct 2012)
|
||||||
|
* @requires fancyBox v2.0 or later
|
||||||
|
*
|
||||||
|
* Usage:
|
||||||
|
* $(".fancybox").fancybox({
|
||||||
|
* helpers : {
|
||||||
|
* thumbs: {
|
||||||
|
* width : 50,
|
||||||
|
* height : 50
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
(function ($) {
|
||||||
|
//Shortcut for fancyBox object
|
||||||
|
var F = $.fancybox;
|
||||||
|
|
||||||
|
//Add helper object
|
||||||
|
F.helpers.thumbs = {
|
||||||
|
defaults : {
|
||||||
|
width : 50, // thumbnail width
|
||||||
|
height : 50, // thumbnail height
|
||||||
|
position : 'bottom', // 'top' or 'bottom'
|
||||||
|
source : function ( item ) { // function to obtain the URL of the thumbnail image
|
||||||
|
var href;
|
||||||
|
|
||||||
|
if (item.element) {
|
||||||
|
href = $(item.element).find('img').attr('src');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!href && item.type === 'image' && item.href) {
|
||||||
|
href = item.href;
|
||||||
|
}
|
||||||
|
|
||||||
|
return href;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
wrap : null,
|
||||||
|
list : null,
|
||||||
|
width : 0,
|
||||||
|
|
||||||
|
init: function (opts, obj) {
|
||||||
|
var that = this,
|
||||||
|
list,
|
||||||
|
thumbWidth = opts.width,
|
||||||
|
thumbHeight = opts.height,
|
||||||
|
thumbSource = opts.source;
|
||||||
|
|
||||||
|
//Build list structure
|
||||||
|
list = '';
|
||||||
|
|
||||||
|
for (var n = 0; n < obj.group.length; n++) {
|
||||||
|
list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body');
|
||||||
|
this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap);
|
||||||
|
|
||||||
|
//Load each thumbnail
|
||||||
|
$.each(obj.group, function (i) {
|
||||||
|
var href = thumbSource( obj.group[ i ] );
|
||||||
|
|
||||||
|
if (!href) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$("<img />").load(function () {
|
||||||
|
var width = this.width,
|
||||||
|
height = this.height,
|
||||||
|
widthRatio, heightRatio, parent;
|
||||||
|
|
||||||
|
if (!that.list || !width || !height) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Calculate thumbnail width/height and center it
|
||||||
|
widthRatio = width / thumbWidth;
|
||||||
|
heightRatio = height / thumbHeight;
|
||||||
|
|
||||||
|
parent = that.list.children().eq(i).find('a');
|
||||||
|
|
||||||
|
if (widthRatio >= 1 && heightRatio >= 1) {
|
||||||
|
if (widthRatio > heightRatio) {
|
||||||
|
width = Math.floor(width / heightRatio);
|
||||||
|
height = thumbHeight;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
width = thumbWidth;
|
||||||
|
height = Math.floor(height / widthRatio);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this).css({
|
||||||
|
width : width,
|
||||||
|
height : height,
|
||||||
|
top : Math.floor(thumbHeight / 2 - height / 2),
|
||||||
|
left : Math.floor(thumbWidth / 2 - width / 2)
|
||||||
|
});
|
||||||
|
|
||||||
|
parent.width(thumbWidth).height(thumbHeight);
|
||||||
|
|
||||||
|
$(this).hide().appendTo(parent).fadeIn(300);
|
||||||
|
|
||||||
|
}).attr('src', href);
|
||||||
|
});
|
||||||
|
|
||||||
|
//Set initial width
|
||||||
|
this.width = this.list.children().eq(0).outerWidth(true);
|
||||||
|
|
||||||
|
this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)));
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeLoad: function (opts, obj) {
|
||||||
|
//Remove self if gallery do not have at least two items
|
||||||
|
if (obj.group.length < 2) {
|
||||||
|
obj.helpers.thumbs = false;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Increase bottom margin to give space for thumbs
|
||||||
|
obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15);
|
||||||
|
},
|
||||||
|
|
||||||
|
afterShow: function (opts, obj) {
|
||||||
|
//Check if exists and create or update list
|
||||||
|
if (this.list) {
|
||||||
|
this.onUpdate(opts, obj);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.init(opts, obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Set active element
|
||||||
|
this.list.children().removeClass('active').eq(obj.index).addClass('active');
|
||||||
|
},
|
||||||
|
|
||||||
|
//Center list
|
||||||
|
onUpdate: function (opts, obj) {
|
||||||
|
if (this.list) {
|
||||||
|
this.list.stop(true).animate({
|
||||||
|
'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))
|
||||||
|
}, 150);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeClose: function () {
|
||||||
|
if (this.wrap) {
|
||||||
|
this.wrap.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.wrap = null;
|
||||||
|
this.list = null;
|
||||||
|
this.width = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}(jQuery));
|
|
@ -1,359 +0,0 @@
|
||||||
/*
|
|
||||||
* FancyBox - jQuery Plugin
|
|
||||||
* Simple and fancy lightbox alternative
|
|
||||||
*
|
|
||||||
* Examples and documentation at: http://fancybox.net
|
|
||||||
*
|
|
||||||
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
|
||||||
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
|
||||||
*
|
|
||||||
* Version: 1.3.4 (11/11/2010)
|
|
||||||
* Requires: jQuery v1.3+
|
|
||||||
*
|
|
||||||
* Dual licensed under the MIT and GPL licenses:
|
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*/
|
|
||||||
|
|
||||||
#fancybox-loading {
|
|
||||||
position: fixed;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
margin-top: -20px;
|
|
||||||
margin-left: -20px;
|
|
||||||
cursor: pointer;
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 1104;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-loading div {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 40px;
|
|
||||||
height: 480px;
|
|
||||||
background-image: url('fancybox.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-overlay {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 1100;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-tmp {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border: 0;
|
|
||||||
overflow: auto;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-wrap {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
padding: 20px;
|
|
||||||
z-index: 1101;
|
|
||||||
outline: none;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-outer {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-content {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
padding: 0;
|
|
||||||
outline: none;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 1102;
|
|
||||||
border: 0px solid #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-hide-sel-frame {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: transparent;
|
|
||||||
z-index: 1101;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-close {
|
|
||||||
position: absolute;
|
|
||||||
top: -15px;
|
|
||||||
right: -15px;
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
background: transparent url('fancybox.png') -40px 0px;
|
|
||||||
cursor: pointer;
|
|
||||||
z-index: 1103;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-error {
|
|
||||||
color: #444;
|
|
||||||
font: normal 12px/20px Arial;
|
|
||||||
padding: 14px;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
line-height: 0;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-frame {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border: none;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-left, #fancybox-right {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0px;
|
|
||||||
height: 100%;
|
|
||||||
width: 35%;
|
|
||||||
cursor: pointer;
|
|
||||||
outline: none;
|
|
||||||
background: transparent url('blank.gif');
|
|
||||||
z-index: 1102;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-left {
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-right {
|
|
||||||
right: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-left-ico, #fancybox-right-ico {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: -9999px;
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
margin-top: -15px;
|
|
||||||
cursor: pointer;
|
|
||||||
z-index: 1102;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-left-ico {
|
|
||||||
background-image: url('fancybox.png');
|
|
||||||
background-position: -40px -30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-right-ico {
|
|
||||||
background-image: url('fancybox.png');
|
|
||||||
background-position: -40px -60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-left:hover, #fancybox-right:hover {
|
|
||||||
visibility: visible; /* IE6 */
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-left:hover span {
|
|
||||||
left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-right:hover span {
|
|
||||||
left: auto;
|
|
||||||
right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fancybox-bg {
|
|
||||||
position: absolute;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border: 0;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
z-index: 1001;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-bg-n {
|
|
||||||
top: -20px;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
background-image: url('fancybox-x.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-bg-ne {
|
|
||||||
top: -20px;
|
|
||||||
right: -20px;
|
|
||||||
background-image: url('fancybox.png');
|
|
||||||
background-position: -40px -162px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-bg-e {
|
|
||||||
top: 0;
|
|
||||||
right: -20px;
|
|
||||||
height: 100%;
|
|
||||||
background-image: url('fancybox-y.png');
|
|
||||||
background-position: -20px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-bg-se {
|
|
||||||
bottom: -20px;
|
|
||||||
right: -20px;
|
|
||||||
background-image: url('fancybox.png');
|
|
||||||
background-position: -40px -182px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-bg-s {
|
|
||||||
bottom: -20px;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
background-image: url('fancybox-x.png');
|
|
||||||
background-position: 0px -20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-bg-sw {
|
|
||||||
bottom: -20px;
|
|
||||||
left: -20px;
|
|
||||||
background-image: url('fancybox.png');
|
|
||||||
background-position: -40px -142px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-bg-w {
|
|
||||||
top: 0;
|
|
||||||
left: -20px;
|
|
||||||
height: 100%;
|
|
||||||
background-image: url('fancybox-y.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-bg-nw {
|
|
||||||
top: -20px;
|
|
||||||
left: -20px;
|
|
||||||
background-image: url('fancybox.png');
|
|
||||||
background-position: -40px -122px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-title {
|
|
||||||
font-family: Helvetica;
|
|
||||||
font-size: 12px;
|
|
||||||
z-index: 1102;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fancybox-title-inside {
|
|
||||||
padding-bottom: 10px;
|
|
||||||
text-align: center;
|
|
||||||
color: #333;
|
|
||||||
background: #fff;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fancybox-title-outside {
|
|
||||||
padding-top: 10px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fancybox-title-over {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
color: #FFF;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-title-over {
|
|
||||||
padding: 10px;
|
|
||||||
background-image: url('fancy_title_over.png');
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fancybox-title-float {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: -20px;
|
|
||||||
height: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-title-float-wrap {
|
|
||||||
border: none;
|
|
||||||
border-collapse: collapse;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-title-float-wrap td {
|
|
||||||
border: none;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-title-float-left {
|
|
||||||
padding: 0 0 0 15px;
|
|
||||||
background: url('fancybox.png') -40px -90px no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-title-float-main {
|
|
||||||
color: #FFF;
|
|
||||||
line-height: 29px;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0 0 3px 0;
|
|
||||||
background: url('fancybox-x.png') 0px -40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-title-float-right {
|
|
||||||
padding: 0 0 0 15px;
|
|
||||||
background: url('fancybox.png') -55px -90px no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* IE6 */
|
|
||||||
|
|
||||||
.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
|
|
||||||
|
|
||||||
.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
|
|
||||||
.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
|
|
||||||
|
|
||||||
.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
|
|
||||||
.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
|
|
||||||
.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
|
|
||||||
.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
|
|
||||||
|
|
||||||
.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
|
|
||||||
height: expression(this.parentNode.clientHeight + "px");
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-loading.fancybox-ie6 {
|
|
||||||
position: absolute; margin-top: 0;
|
|
||||||
top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
|
|
||||||
}
|
|
||||||
|
|
||||||
#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
|
|
||||||
|
|
||||||
/* IE6, IE7, IE8 */
|
|
||||||
|
|
||||||
.fancybox-ie .fancybox-bg { background: transparent !important; }
|
|
||||||
|
|
||||||
.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
|
|
||||||
.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
|
|
||||||
.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
|
|
||||||
.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
|
|
||||||
.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
|
|
||||||
.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
|
|
||||||
.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
|
|
||||||
.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
|
|
|
@ -1,46 +0,0 @@
|
||||||
/*
|
|
||||||
* FancyBox - jQuery Plugin
|
|
||||||
* Simple and fancy lightbox alternative
|
|
||||||
*
|
|
||||||
* Examples and documentation at: http://fancybox.net
|
|
||||||
*
|
|
||||||
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
|
||||||
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
|
||||||
*
|
|
||||||
* Version: 1.3.4 (11/11/2010)
|
|
||||||
* Requires: jQuery v1.3+
|
|
||||||
*
|
|
||||||
* Dual licensed under the MIT and GPL licenses:
|
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*/
|
|
||||||
|
|
||||||
;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
|
|
||||||
F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
|
|
||||||
c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
|
|
||||||
false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
|
|
||||||
function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+
|
|
||||||
'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
|
|
||||||
"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+
|
|
||||||
";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
|
|
||||||
opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
|
|
||||||
d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
|
|
||||||
y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
|
|
||||||
i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
|
|
||||||
f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
|
|
||||||
37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
|
|
||||||
s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j);
|
|
||||||
f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
|
|
||||||
j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
|
|
||||||
"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
|
|
||||||
10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
|
|
||||||
b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
|
|
||||||
0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
|
|
||||||
1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
|
|
||||||
true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
|
|
||||||
b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
|
|
||||||
d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
|
|
||||||
D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
|
|
||||||
b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};
|
|
||||||
b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
|
|
||||||
easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);
|
|
249
js/fancybox/jquery.fancybox.css
vendored
Normal file
|
@ -0,0 +1,249 @@
|
||||||
|
/*! fancyBox v2.1.3 fancyapps.com | fancyapps.com/fancybox/#license */
|
||||||
|
.fancybox-wrap,
|
||||||
|
.fancybox-skin,
|
||||||
|
.fancybox-outer,
|
||||||
|
.fancybox-inner,
|
||||||
|
.fancybox-image,
|
||||||
|
.fancybox-wrap iframe,
|
||||||
|
.fancybox-wrap object,
|
||||||
|
.fancybox-nav,
|
||||||
|
.fancybox-nav span,
|
||||||
|
.fancybox-tmp
|
||||||
|
{
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border: 0;
|
||||||
|
outline: none;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-wrap {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 8020;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-skin {
|
||||||
|
position: relative;
|
||||||
|
background: #f9f9f9;
|
||||||
|
color: #444;
|
||||||
|
text-shadow: none;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-opened {
|
||||||
|
z-index: 8030;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-opened .fancybox-skin {
|
||||||
|
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
||||||
|
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
||||||
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-outer, .fancybox-inner {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-inner {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-type-iframe .fancybox-inner {
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-error {
|
||||||
|
color: #444;
|
||||||
|
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 15px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-image, .fancybox-iframe {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-image {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
||||||
|
background-image: url('fancybox_sprite.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-loading {
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin-top: -22px;
|
||||||
|
margin-left: -22px;
|
||||||
|
background-position: 0 -108px;
|
||||||
|
opacity: 0.8;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 8060;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fancybox-loading div {
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
background: url('fancybox_loading.gif') center center no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-close {
|
||||||
|
position: absolute;
|
||||||
|
top: -18px;
|
||||||
|
right: -18px;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 8040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-nav {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
width: 40%;
|
||||||
|
height: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
background: transparent url('blank.gif'); /* helps IE */
|
||||||
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||||
|
z-index: 8040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-prev {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-next {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-nav span {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
width: 36px;
|
||||||
|
height: 34px;
|
||||||
|
margin-top: -18px;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 8040;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-prev span {
|
||||||
|
left: 10px;
|
||||||
|
background-position: 0 -36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-next span {
|
||||||
|
right: 10px;
|
||||||
|
background-position: 0 -72px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-nav:hover span {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-tmp {
|
||||||
|
position: absolute;
|
||||||
|
top: -99999px;
|
||||||
|
left: -99999px;
|
||||||
|
visibility: hidden;
|
||||||
|
max-width: 99999px;
|
||||||
|
max-height: 99999px;
|
||||||
|
overflow: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Overlay helper */
|
||||||
|
|
||||||
|
.fancybox-lock {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
display: none;
|
||||||
|
z-index: 8010;
|
||||||
|
background: url('fancybox_overlay.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-overlay-fixed {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-lock .fancybox-overlay {
|
||||||
|
overflow: auto;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Title helper */
|
||||||
|
|
||||||
|
.fancybox-title {
|
||||||
|
visibility: hidden;
|
||||||
|
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||||
|
position: relative;
|
||||||
|
text-shadow: none;
|
||||||
|
z-index: 8050;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-opened .fancybox-title {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-title-float-wrap {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
right: 50%;
|
||||||
|
margin-bottom: -35px;
|
||||||
|
z-index: 8050;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-title-float-wrap .child {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: -100%;
|
||||||
|
padding: 2px 20px;
|
||||||
|
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
||||||
|
background: rgba(0, 0, 0, 0.8);
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
border-radius: 15px;
|
||||||
|
text-shadow: 0 1px 2px #222;
|
||||||
|
color: #FFF;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 24px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-title-outside-wrap {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 10px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-title-inside-wrap {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-title-over-wrap {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
color: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
background: #000;
|
||||||
|
background: rgba(0, 0, 0, .8);
|
||||||
|
}
|
1985
js/fancybox/jquery.fancybox.js
vendored
Normal file
45
js/fancybox/jquery.fancybox.pack.js
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
/*! fancyBox v2.1.3 fancyapps.com | fancyapps.com/fancybox/#license */
|
||||||
|
(function(B,x,f,q){var r=f(B),m=f(x),b=f.fancybox=function(){b.open.apply(this,arguments)},u=null,n=x.createTouch!==q,s=function(a){return a&&a.hasOwnProperty&&a instanceof f},p=function(a){return a&&"string"===f.type(a)},E=function(a){return p(a)&&0<a.indexOf("%")},k=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},v=function(a,b){return k(a,b)+"px"};f.extend(b,{version:"2.1.3",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,
|
||||||
|
maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!n,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},
|
||||||
|
prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
|
||||||
|
(f.browser.msie?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",
|
||||||
|
openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,
|
||||||
|
isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=s(a)?f(a).get():[a]),f.each(a,function(e,c){var j={},g,h,i,l,k;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),s(c)?(j={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,
|
||||||
|
j,c.metadata())):j=c);g=d.href||j.href||(p(c)?c:null);h=d.title!==q?d.title:j.title||"";l=(i=d.content||j.content)?"html":d.type||j.type;!l&&j.isDom&&(l=c.data("fancybox-type"),l||(l=(l=c.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));p(g)&&(l||(b.isImage(g)?l="image":b.isSWF(g)?l="swf":"#"===g.charAt(0)?l="inline":p(c)&&(l="html",i=c)),"ajax"===l&&(k=g.split(/\s+/,2),g=k.shift(),k=k.shift()));i||("inline"===l?g?i=f(p(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isDom&&(i=c):"html"===l?i=g:!l&&(!g&&
|
||||||
|
j.isDom)&&(l="inline",i=c));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==q&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
|
||||||
|
b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
|
||||||
|
setTimeout(b.next,b.current.playSpeed))},c=function(){d();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":c,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(p(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},
|
||||||
|
prev:function(a){var d=b.current;d&&(p(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=k(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==q&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,j;c&&(j=b._getPosition(d),a&&"scroll"===a.type?(delete j.position,c.stop(!0,!0).animate(j,200)):(c.css(j),e.pos=f.extend({},
|
||||||
|
e.dim,j)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(u),u=null);b.isOpen&&!u&&(u=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),u=null)},e&&!n?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,n&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),
|
||||||
|
b.trigger("onUpdate")),b.update())},hideLoading:function(){m.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");m.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||
|
||||||
|
!1,d={x:r.scrollLeft(),y:r.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=n&&B.innerWidth?B.innerWidth:r.width(),d.h=n&&B.innerHeight?B.innerHeight:r.height());return d},unbindEvents:function(){b.wrap&&s(b.wrap)&&b.wrap.unbind(".fb");m.unbind(".fb");r.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(r.bind("orientationchange.fb"+(n?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&m.bind("keydown.fb",function(e){var c=e.which||e.keyCode,j=
|
||||||
|
e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(d,function(d,j){if(1<a.group.length&&j[c]!==q)return b[d](j[c]),e.preventDefault(),!1;if(-1<f.inArray(c,j))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,j,g){for(var h=f(d.target||null),i=!1;h.length&&!i&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)i=h[0]&&!(h[0].style.overflow&&
|
||||||
|
"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!i&&1<b.group.length&&!a.canShrink){if(0<g||0<j)b.prev(0<g?"down":"left");else if(0>g||0>j)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,
|
||||||
|
e){e&&(b.helpers[d]&&f.isFunction(b.helpers[d][a]))&&(e=f.extend(!0,{},b.helpers[d].defaults,e),b.helpers[d][a](e,c))});f.event.trigger(a+".fb")}},isImage:function(a){return p(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isSWF:function(a){return p(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c,a=k(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&
|
||||||
|
(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=
|
||||||
|
!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&n&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(n?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,v(d.padding[a]))});b.trigger("onReady");
|
||||||
|
if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=
|
||||||
|
this.width;b.coming.height=this.height;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,
|
||||||
|
(new Date).getTime())).attr("scrolling",n?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);n||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=
|
||||||
|
b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,j,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();
|
||||||
|
e=a.content;c=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):s(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
|
||||||
|
!1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!s(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
|
||||||
|
a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,j=b.skin,g=b.inner,h=b.current,c=h.width,i=h.height,l=h.minWidth,t=h.minHeight,m=h.maxWidth,
|
||||||
|
n=h.maxHeight,r=h.scrolling,p=h.scrollOutside?h.scrollbarWidth:0,w=h.margin,y=k(w[1]+w[3]),q=k(w[0]+w[2]),x,z,s,C,A,F,B,D,u;e.add(j).add(g).width("auto").height("auto").removeClass("fancybox-tmp");w=k(j.outerWidth(!0)-j.width());x=k(j.outerHeight(!0)-j.height());z=y+w;s=q+x;C=E(c)?(a.w-z)*k(c)/100:c;A=E(i)?(a.h-s)*k(i)/100:i;if("iframe"===h.type){if(u=h.content,h.autoHeight&&1===u.data("ready"))try{u[0].contentWindow.document.location&&(g.width(C).height(9999),F=u.contents().find("body"),p&&F.css("overflow-x",
|
||||||
|
"hidden"),A=F.height())}catch(G){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=k(C);i=k(A);D=C/A;l=k(E(l)?k(l,"w")-z:l);m=k(E(m)?k(m,"w")-z:m);t=k(E(t)?k(t,"h")-s:t);n=k(E(n)?k(n,"h")-s:n);F=m;B=n;h.fitToView&&(m=Math.min(a.w-z,m),n=Math.min(a.h-s,n));z=a.w-y;q=a.h-q;h.aspectRatio?(c>m&&(c=m,i=k(c/D)),i>n&&(i=n,c=k(i*D)),c<l&&(c=l,i=k(c/D)),i<t&&
|
||||||
|
(i=t,c=k(i*D))):(c=Math.max(l,Math.min(c,m)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),i=g.height()),i=Math.max(t,Math.min(i,n)));if(h.fitToView)if(g.width(c).height(i),e.width(c+w),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>q)&&(c>l&&i>t)&&!(19<d++);)i=Math.max(t,Math.min(n,i-10)),c=k(i*D),c<l&&(c=l,i=k(c/D)),c>m&&(c=m,i=k(c/D)),g.width(c).height(i),e.width(c+w),a=e.width(),y=e.height();else c=Math.max(l,Math.min(c,c-(a-z))),i=Math.max(t,Math.min(i,i-(y-q)));p&&("auto"===r&&i<A&&c+w+
|
||||||
|
p<z)&&(c+=p);g.width(c).height(i);e.width(c+w);a=e.width();y=e.height();e=(a>z||y>q)&&c>l&&i>t;c=h.aspectRatio?c<F&&i<B&&c<C&&i<A:(c<F||i<B)&&(c<C||i<A);f.extend(h,{dim:{width:v(a),height:v(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:w,hPadding:x,wrapSpace:y-j.outerHeight(!0),skinSpace:j.height()-i});!u&&(h.autoHeight&&i>t&&i<n&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",
|
||||||
|
top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=v(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=v(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&
|
||||||
|
(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind(n?"touchstart.fb":"click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=
|
||||||
|
!1,b.play()))},_afterZoomOut:function(a){a=a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,i=a.wPadding,l=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));s(e)?(c=e.offset(),
|
||||||
|
e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(c.top=l.y+(l.h-g)*a.topRatio,c.left=l.x+(l.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=l.y,c.left-=l.x;return c={top:v(c.top-h*a.topRatio),left:v(c.left-i*a.leftRatio),width:v(f+i),height:v(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](k("width"===
|
||||||
|
f?c:c-g*e)),b.inner[f](k("width"===f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,j=f.extend({opacity:1},d);delete j.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(j,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&
|
||||||
|
(c.opacity=0.1));b.wrap.animate(c,{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=v(k(e[g])-200),c[g]="+=200px"):(e[g]=v(k(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:function(){setTimeout(b._afterZoomIn,
|
||||||
|
20)}})},changeOut:function(){var a=b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!n,fixed:!0},overlay:null,fixed:!1,create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();
|
||||||
|
this.overlay=f('<div class="fancybox-overlay"></div>').appendTo("body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this,a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(r.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){f(a.target).hasClass("fancybox-overlay")&&
|
||||||
|
(b.isActive?b.close():d.close())});this.overlay.css(a.css).show()},close:function(){f(".fancybox-overlay").remove();r.unbind("resize.overlay");this.overlay=null;!1!==this.margin&&(f("body").css("margin-right",this.margin),this.margin=!1);this.el&&this.el.removeClass("fancybox-lock")},update:function(){var a="100%",b;this.overlay.width(a).height("100%");f.browser.msie?(b=Math.max(x.documentElement.offsetWidth,x.body.offsetWidth),m.width()>b&&(a=m.width())):m.width()>r.width()&&(a=m.width());this.overlay.width(a).height(m.height())},
|
||||||
|
onReady:function(a,b){f(".fancybox-overlay").stop(!0,!0);this.overlay||(this.margin=m.height()>r.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,this.el=x.all&&!x.querySelector?f("html"):f("body"),this.create(a));a.locked&&this.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+
|
||||||
|
b.scrollbarWidth));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.isActive&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(p(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=
|
||||||
|
b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),f.browser.msie&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(k(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",j=function(g){var h=f(this).blur(),i=d,j,k;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(j=a.groupAttr||"data-fancybox-group",k=h.attr(j),k||(j="rel",
|
||||||
|
k=h.get(0)[j]),k&&(""!==k&&"nofollow"!==k)&&(h=c.length?f(c):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventDefault())},a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",j):m.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);this.filter("[data-fancybox-start=1]").trigger("click");return this};m.ready(function(){f.scrollbarWidth===q&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),
|
||||||
|
b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===q){var a=f.support,d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
|
180
js/libs/api.js
|
@ -6,8 +6,8 @@ function ping() {
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data["subsonic-response"].status == 'ok') {
|
if (data["subsonic-response"].status == 'ok') {
|
||||||
version = data["subsonic-response"].version;
|
apiVersion = data["subsonic-response"].version;
|
||||||
$('#SubsonicVersion').html(version);
|
$('#SubsonicVersion').html(apiVersion);
|
||||||
} else {
|
} else {
|
||||||
if (typeof data["subsonic-response"].error != 'undefined') {
|
if (typeof data["subsonic-response"].error != 'undefined') {
|
||||||
alert(data["subsonic-response"].error.message);
|
alert(data["subsonic-response"].error.message);
|
||||||
|
@ -26,11 +26,11 @@ function loadArtists(id, refresh) {
|
||||||
}
|
}
|
||||||
var url;
|
var url;
|
||||||
if (id == "all") {
|
if (id == "all") {
|
||||||
url = baseURL + '/getIndexes.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json';
|
url = baseURL + '/getIndexes.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json';
|
||||||
} else if (id) {
|
} else if (id) {
|
||||||
url = baseURL + '/getIndexes.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&musicFolderId=' + id;
|
url = baseURL + '/getIndexes.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&musicFolderId=' + id;
|
||||||
} else {
|
} else {
|
||||||
url = baseURL + '/getIndexes.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json';
|
url = baseURL + '/getIndexes.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json';
|
||||||
}
|
}
|
||||||
if (debug) { console.log(url); }
|
if (debug) { console.log(url); }
|
||||||
var content = $('#ArtistContainer').html();
|
var content = $('#ArtistContainer').html();
|
||||||
|
@ -102,6 +102,7 @@ function loadArtists(id, refresh) {
|
||||||
$("#BottomIndex").empty();
|
$("#BottomIndex").empty();
|
||||||
$(indexlist).appendTo("#BottomIndex");
|
$(indexlist).appendTo("#BottomIndex");
|
||||||
}
|
}
|
||||||
|
var indexes = [];
|
||||||
if (data["subsonic-response"].indexes.child !== undefined) {
|
if (data["subsonic-response"].indexes.child !== undefined) {
|
||||||
var rowcolor;
|
var rowcolor;
|
||||||
if (data["subsonic-response"].indexes.child.length > 0) {
|
if (data["subsonic-response"].indexes.child.length > 0) {
|
||||||
|
@ -112,13 +113,10 @@ function loadArtists(id, refresh) {
|
||||||
var appendto = '#AlbumContainer tbody';
|
var appendto = '#AlbumContainer tbody';
|
||||||
$(appendto).empty();
|
$(appendto).empty();
|
||||||
$.each(indexes, function (i, child) {
|
$.each(indexes, function (i, child) {
|
||||||
if (i % 2 === 0) {
|
if (child.isVideo != true) {
|
||||||
rowcolor = 'even';
|
var html = generateRowHTML(child, appendto);
|
||||||
} else {
|
$(html).appendTo(appendto);
|
||||||
rowcolor = 'odd';
|
|
||||||
}
|
}
|
||||||
var html = generateRowHTML(child, appendto, rowcolor);
|
|
||||||
$(html).appendTo(appendto);
|
|
||||||
});
|
});
|
||||||
header = generateSongHeaderHTML();
|
header = generateSongHeaderHTML();
|
||||||
}
|
}
|
||||||
|
@ -141,7 +139,7 @@ function loadArtists(id, refresh) {
|
||||||
}
|
}
|
||||||
function getMusicFolders() {
|
function getMusicFolders() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getMusicFolders.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json',
|
url: baseURL + '/getMusicFolders.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -155,11 +153,11 @@ function getMusicFolders() {
|
||||||
folders[0] = data["subsonic-response"].musicFolders.musicFolder;
|
folders[0] = data["subsonic-response"].musicFolders.musicFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
var savedMusicFolder = getCookie('MusicFolders');
|
var savedMusicFolder = getCookie('MusicFolders') ? getCookie('MusicFolders') : null;
|
||||||
var options = [];
|
var options = [];
|
||||||
options.push('<option value="all">All Folders</option>');
|
options.push('<option value="all">All Folders</option>');
|
||||||
$.each(folders, function (i, folder) {
|
$.each(folders, function (i, folder) {
|
||||||
if (savedMusicFolder == folder.id) {
|
if (savedMusicFolder == folder.id && savedMusicFolder != null) {
|
||||||
options.push('<option value="' + folder.id + '" selected>' + folder.name + '</option>');
|
options.push('<option value="' + folder.id + '" selected>' + folder.name + '</option>');
|
||||||
} else {
|
} else {
|
||||||
options.push('<option value="' + folder.id + '">' + folder.name + '</option>');
|
options.push('<option value="' + folder.id + '">' + folder.name + '</option>');
|
||||||
|
@ -203,7 +201,7 @@ function loadAutoPlaylists(refresh) {
|
||||||
html += '<li class=\"item\" data-genre=\"' + genre + '\">';
|
html += '<li class=\"item\" data-genre=\"' + genre + '\">';
|
||||||
html += '<span>' + genre + '</span>';
|
html += '<span>' + genre + '</span>';
|
||||||
html += '<div class=\"floatright\"><a class=\"play\" href=\"\" data-genre=\"' + genre + '\" title=\"Play\"></a></div>';
|
html += '<div class=\"floatright\"><a class=\"play\" href=\"\" data-genre=\"' + genre + '\" title=\"Play\"></a></div>';
|
||||||
html += '<div class=\"floatright\"><a class=\"add\" href=\"\" data-genre=\"' + genre + '\" title=\"Add To Current Playlist\"></a></div>';
|
html += '<div class=\"floatright\"><a class=\"add\" href=\"\" data-genre=\"' + genre + '\" title=\"Add To Play Queue\"></a></div>';
|
||||||
html += '</li>';
|
html += '</li>';
|
||||||
$(html).appendTo("#AutoPlaylistContainer");
|
$(html).appendTo("#AutoPlaylistContainer");
|
||||||
});
|
});
|
||||||
|
@ -211,7 +209,7 @@ function loadAutoPlaylists(refresh) {
|
||||||
}
|
}
|
||||||
function getAlbums(id, action, appendto) {
|
function getAlbums(id, action, appendto) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getMusicDirectory.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + id,
|
url: baseURL + '/getMusicDirectory.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + id,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -239,13 +237,8 @@ function getAlbums(id, action, appendto) {
|
||||||
var rowcolor;
|
var rowcolor;
|
||||||
var header;
|
var header;
|
||||||
$.each(children, function (i, child) {
|
$.each(children, function (i, child) {
|
||||||
if (i % 2 === 0) {
|
|
||||||
rowcolor = 'even';
|
|
||||||
} else {
|
|
||||||
rowcolor = 'odd';
|
|
||||||
}
|
|
||||||
if (child.isDir == true) { isDir = true; }
|
if (child.isDir == true) { isDir = true; }
|
||||||
var html = generateRowHTML(child, appendto, rowcolor);
|
var html = generateRowHTML(child, appendto);
|
||||||
$(html).appendTo(appendto).hide().fadeIn('fast');
|
$(html).appendTo(appendto).hide().fadeIn('fast');
|
||||||
});
|
});
|
||||||
toggleAlbumListNextPrev('#status_Library', false, '', '');
|
toggleAlbumListNextPrev('#status_Library', false, '', '');
|
||||||
|
@ -276,9 +269,9 @@ function getAlbumListBy(id, offset) {
|
||||||
size = 15;
|
size = 15;
|
||||||
}
|
}
|
||||||
if (offset > 0) {
|
if (offset > 0) {
|
||||||
url = baseURL + '/getAlbumList.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=' + size + '&type=' + id + '&offset=' + offset
|
url = baseURL + '/getAlbumList.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&size=' + size + '&type=' + id + '&offset=' + offset
|
||||||
} else {
|
} else {
|
||||||
url = baseURL + '/getAlbumList.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=' + size + '&type=' + id
|
url = baseURL + '/getAlbumList.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&size=' + size + '&type=' + id
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
|
@ -302,16 +295,11 @@ function getAlbumListBy(id, offset) {
|
||||||
var rowcolor;
|
var rowcolor;
|
||||||
var html;
|
var html;
|
||||||
$.each(albums, function (i, album) {
|
$.each(albums, function (i, album) {
|
||||||
if (i % 2 === 0) {
|
|
||||||
rowcolor = 'even';
|
|
||||||
} else {
|
|
||||||
rowcolor = 'odd';
|
|
||||||
}
|
|
||||||
// Only show albums, not songs (Rated songs will also be returned in API call, trying to display them will break Back button, disabled for now)
|
// Only show albums, not songs (Rated songs will also be returned in API call, trying to display them will break Back button, disabled for now)
|
||||||
var albumhtml, starred;
|
var albumhtml, starred;
|
||||||
if (album.starred !== undefined) { starred = true; } else { starred = false; }
|
if (album.starred !== undefined) { starred = true; } else { starred = false; }
|
||||||
if (album.isDir === true) {
|
if (album.isDir === true) {
|
||||||
albumhtml = generateAlbumHTML(rowcolor, album.id, album.parent, album.coverArt, album.title, album.artist, album.userRating, starred);
|
albumhtml = generateAlbumHTML(album.id, album.parent, album.coverArt, album.title, album.artist, album.userRating, starred, album.created);
|
||||||
}
|
}
|
||||||
$(albumhtml).appendTo("#AlbumContainer tbody").hide().fadeIn('fast');
|
$(albumhtml).appendTo("#AlbumContainer tbody").hide().fadeIn('fast');
|
||||||
});
|
});
|
||||||
|
@ -355,16 +343,16 @@ function getRandomSongList(action, appendto, genre, folder) {
|
||||||
if (genre != '' && genre != 'Random') {
|
if (genre != '' && genre != 'Random') {
|
||||||
gstring = '&genre=' + genre;
|
gstring = '&genre=' + genre;
|
||||||
}
|
}
|
||||||
if (typeof folder == 'number' && folder == 0) {
|
if (typeof folder == 'number' && folder == 0 && folder != 'all') {
|
||||||
gstring = '&musicFolderId=' + folder;
|
gstring = '&musicFolderId=' + folder;
|
||||||
} else if (folder != '') {
|
} else if (folder != '' && folder != 'all') {
|
||||||
gstring = '&musicFolderId=' + folder;
|
gstring = '&musicFolderId=' + folder;
|
||||||
}
|
}
|
||||||
if (genre == 'Starred') {
|
if (genre == 'Starred') {
|
||||||
getStarred(action, appendto, 'song');
|
getStarred(action, appendto, 'song');
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getRandomSongs.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=' + size + gstring,
|
url: baseURL + '/getRandomSongs.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&size=' + size + gstring,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -390,16 +378,11 @@ function getRandomSongList(action, appendto, genre, folder) {
|
||||||
var rowcolor;
|
var rowcolor;
|
||||||
var html;
|
var html;
|
||||||
$.each(items, function (i, item) {
|
$.each(items, function (i, item) {
|
||||||
if (i % 2 === 0) {
|
|
||||||
rowcolor = 'even';
|
|
||||||
} else {
|
|
||||||
rowcolor = 'odd';
|
|
||||||
}
|
|
||||||
var track, starred, duration;
|
var track, starred, duration;
|
||||||
if (item.starred !== undefined) { starred = true; } else { starred = false; }
|
if (item.starred !== undefined) { starred = true; } else { starred = false; }
|
||||||
if (item.track === undefined) { track = " "; } else { track = item.track; }
|
if (item.track === undefined) { track = " "; } else { track = item.track; }
|
||||||
if (item.duration !== undefined) { duration = item.duration; } else { 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 = generateSongHTML(item.id, item.parent, track, item.title, '', item.artist, item.album, item.coverArt, item.userRating, starred, duration);
|
||||||
$(html).appendTo(appendto);
|
$(html).appendTo(appendto);
|
||||||
});
|
});
|
||||||
if (appendto === '#TrackContainer tbody') {
|
if (appendto === '#TrackContainer tbody') {
|
||||||
|
@ -427,7 +410,7 @@ function getStarred(action, appendto, type) {
|
||||||
size = 25;
|
size = 25;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getStarred.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=' + size,
|
url: baseURL + '/getStarred.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&size=' + size,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -479,11 +462,6 @@ function getStarred(action, appendto, type) {
|
||||||
var rowcolor;
|
var rowcolor;
|
||||||
var html;
|
var html;
|
||||||
$.each(items, function (i, item) {
|
$.each(items, function (i, item) {
|
||||||
if (i % 2 === 0) {
|
|
||||||
rowcolor = 'even';
|
|
||||||
} else {
|
|
||||||
rowcolor = 'odd';
|
|
||||||
}
|
|
||||||
var track, starred;
|
var track, starred;
|
||||||
if (item.starred !== undefined) { starred = true; } else { starred = false; }
|
if (item.starred !== undefined) { starred = true; } else { starred = false; }
|
||||||
if (item.track === undefined) { track = " "; } else { track = item.track; }
|
if (item.track === undefined) { track = " "; } else { track = item.track; }
|
||||||
|
@ -492,10 +470,10 @@ function getStarred(action, appendto, type) {
|
||||||
case 'artist':
|
case 'artist':
|
||||||
break;
|
break;
|
||||||
case 'album':
|
case 'album':
|
||||||
html = generateRowHTML(item, appendto, rowcolor);
|
html = generateRowHTML(item, appendto);
|
||||||
break;
|
break;
|
||||||
case 'song':
|
case 'song':
|
||||||
html = generateRowHTML(item, appendto, rowcolor);
|
html = generateRowHTML(item, appendto);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -523,7 +501,7 @@ function updateNowPlaying(showPopup) {
|
||||||
updaterNowPlaying = $.periodic({ period: 4000, decay: 1.5, max_period: 30000 }, function () {
|
updaterNowPlaying = $.periodic({ period: 4000, decay: 1.5, max_period: 30000 }, function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
periodic: this,
|
periodic: this,
|
||||||
url: baseURL + '/getNowPlaying.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json',
|
url: baseURL + '/getNowPlaying.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -560,12 +538,12 @@ function updateNowPlaying(showPopup) {
|
||||||
if (msg.coverArt === undefined) {
|
if (msg.coverArt === undefined) {
|
||||||
coverartSrc = 'images/albumdefault_50.jpg';
|
coverartSrc = 'images/albumdefault_50.jpg';
|
||||||
} else {
|
} else {
|
||||||
coverartSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=50&id=' + msg.coverArt;
|
coverartSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&size=50&id=' + msg.coverArt;
|
||||||
}
|
}
|
||||||
if (getCookie('Notification_NowPlaying')) {
|
if (getCookie('Notification_NowPlaying')) {
|
||||||
var sid = msg.username + '-' + msg.id;
|
var sid = msg.username + '-' + msg.id;
|
||||||
if (jQuery.inArray(sid, updaterNowPlayingIdList) === -1 && username != msg.username) {
|
if (jQuery.inArray(sid, updaterNowPlayingIdList) === -1 && username != msg.username) {
|
||||||
showNotification(coverartSrc, toHTML.un(msg.username + ':' + msg.playerName), toHTML.un(msg.artist + ' - ' + msg.title), 'text');
|
showNotification(coverartSrc, toHTML.un(msg.username + ':' + msg.playerName), toHTML.un(msg.artist + ' - ' + msg.title), 'text', '');
|
||||||
updaterNowPlayingIdList.push(sid);
|
updaterNowPlayingIdList.push(sid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -581,7 +559,7 @@ function stopUpdateNowPlaying() {
|
||||||
|
|
||||||
function search(type, query) {
|
function search(type, query) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/search2.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&query=' + query,
|
url: baseURL + '/search2.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&query=' + query,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -613,22 +591,17 @@ function search(type, query) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$.each(children, function (i, child) {
|
$.each(children, function (i, child) {
|
||||||
if (i % 2 === 0) {
|
|
||||||
rowcolor = 'even';
|
|
||||||
} else {
|
|
||||||
rowcolor = 'odd';
|
|
||||||
}
|
|
||||||
var starred;
|
var starred;
|
||||||
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
||||||
isDir = child.isDir;
|
isDir = child.isDir;
|
||||||
if (isDir === true) {
|
if (isDir === true) {
|
||||||
albumhtml = generateAlbumHTML(rowcolor, child.id, child.parent, child.coverArt, child.title, child.artist, child.userRating, starred);
|
albumhtml = generateAlbumHTML(child.id, child.parent, child.coverArt, child.title, child.artist, child.userRating, starred, child.created);
|
||||||
} else {
|
} else {
|
||||||
var track, starred, duration;
|
var track, starred, duration;
|
||||||
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
||||||
if (child.track === undefined) { track = " "; } else { track = child.track; }
|
if (child.track === undefined) { track = " "; } else { track = child.track; }
|
||||||
if (child.duration !== undefined) { duration = child.duration; } else { 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 = generateSongHTML(child.id, child.parent, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, duration);
|
||||||
}
|
}
|
||||||
$(albumhtml).appendTo("#AlbumContainer tbody");
|
$(albumhtml).appendTo("#AlbumContainer tbody");
|
||||||
});
|
});
|
||||||
|
@ -646,7 +619,7 @@ function loadFolders(refresh) {
|
||||||
if (content === "") {
|
if (content === "") {
|
||||||
// Load Folders
|
// Load Folders
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getMusicFolders.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json',
|
url: baseURL + '/getMusicFolders.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -662,7 +635,7 @@ function loadFolders(refresh) {
|
||||||
html += '<li id=\"' + musicFolder.id + '\" class=\"item\" data-folder=\"' + musicFolder.id + '\">';
|
html += '<li id=\"' + musicFolder.id + '\" class=\"item\" data-folder=\"' + musicFolder.id + '\">';
|
||||||
html += '<span>' + musicFolder.name + '</span>';
|
html += '<span>' + musicFolder.name + '</span>';
|
||||||
html += '<div class=\"floatright\"><a class=\"play\" href=\"\" data-folder=\"' + musicFolder.id + '\" title=\"Play\"></a></div>';
|
html += '<div class=\"floatright\"><a class=\"play\" href=\"\" data-folder=\"' + musicFolder.id + '\" title=\"Play\"></a></div>';
|
||||||
html += '<div class=\"floatright\"><a class=\"add\" href=\"\" data-folder=\"' + musicFolder.id + '\" title=\"Add To Current Playlist\"></a></div>';
|
html += '<div class=\"floatright\"><a class=\"add\" href=\"\" data-folder=\"' + musicFolder.id + '\" title=\"Add To Play Queue\"></a></div>';
|
||||||
html += '</li>';
|
html += '</li>';
|
||||||
$(html).appendTo("#FolderContainer");
|
$(html).appendTo("#FolderContainer");
|
||||||
});
|
});
|
||||||
|
@ -679,7 +652,7 @@ function loadPlaylists(refresh) {
|
||||||
if (content === "") {
|
if (content === "") {
|
||||||
// Load Playlists
|
// Load Playlists
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getPlaylists.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json',
|
url: baseURL + '/getPlaylists.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -696,7 +669,7 @@ function loadPlaylists(refresh) {
|
||||||
html += '<li id=\"' + playlist.id + '\" class=\"item\">';
|
html += '<li id=\"' + playlist.id + '\" class=\"item\">';
|
||||||
html += '<div class=\"floatright\"><a class=\"play\" href=\"\" title=\"Play\"></a></div>';
|
html += '<div class=\"floatright\"><a class=\"play\" href=\"\" title=\"Play\"></a></div>';
|
||||||
html += '<div class=\"floatright\"><a class=\"download\" href=\"\" title=\"Download\"></a></div>';
|
html += '<div class=\"floatright\"><a class=\"download\" href=\"\" title=\"Download\"></a></div>';
|
||||||
html += '<div class=\"floatright\"><a class=\"add\" href=\"\" title=\"Add To Current Playlist\"></a></div>';
|
html += '<div class=\"floatright\"><a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a></div>';
|
||||||
html += '<div class="name"><span>' + playlist.name + '</span></div>';
|
html += '<div class="name"><span>' + playlist.name + '</span></div>';
|
||||||
html += '</li>';
|
html += '</li>';
|
||||||
$(html).appendTo("#PlaylistContainer");
|
$(html).appendTo("#PlaylistContainer");
|
||||||
|
@ -720,7 +693,7 @@ function savePlaylist(playlistid) {
|
||||||
url: baseURL + '/createPlaylist.view?u=' + username + '&p=' + password,
|
url: baseURL + '/createPlaylist.view?u=' + username + '&p=' + password,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
data: { v: version, c: applicationName, f: "json", playlistId: playlistid, songId: songs },
|
data: { v: apiVersion, c: applicationName, f: "json", playlistId: playlistid, songId: songs },
|
||||||
success: function () {
|
success: function () {
|
||||||
getPlaylist(playlistid);
|
getPlaylist(playlistid);
|
||||||
updateMessage('Playlist Updated!');
|
updateMessage('Playlist Updated!');
|
||||||
|
@ -731,7 +704,7 @@ function savePlaylist(playlistid) {
|
||||||
}
|
}
|
||||||
function getPlaylist(id, action, appendto) {
|
function getPlaylist(id, action, appendto) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getPlaylist.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + id,
|
url: baseURL + '/getPlaylist.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + id,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -758,16 +731,11 @@ function getPlaylist(id, action, appendto) {
|
||||||
var html;
|
var html;
|
||||||
var count = children.length;
|
var count = children.length;
|
||||||
$.each(children, function (i, child) {
|
$.each(children, function (i, child) {
|
||||||
if (i % 2 === 0) {
|
|
||||||
rowcolor = 'even';
|
|
||||||
} else {
|
|
||||||
rowcolor = 'odd';
|
|
||||||
}
|
|
||||||
var track, starred, duration;
|
var track, starred, duration;
|
||||||
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
||||||
if (child.track === undefined) { track = " "; } else { track = child.track; }
|
if (child.track === undefined) { track = " "; } else { track = child.track; }
|
||||||
if (child.duration !== undefined) { duration = child.duration; } else { 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 = generateSongHTML(child.id, child.parent, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, duration);
|
||||||
$(html).appendTo(appendto);
|
$(html).appendTo(appendto);
|
||||||
});
|
});
|
||||||
if (appendto === '#TrackContainer tbody') {
|
if (appendto === '#TrackContainer tbody') {
|
||||||
|
@ -790,7 +758,7 @@ function getPlaylist(id, action, appendto) {
|
||||||
function loadPlaylistsForMenu(menu) {
|
function loadPlaylistsForMenu(menu) {
|
||||||
$('#' + menu).empty();
|
$('#' + menu).empty();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getPlaylists.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json',
|
url: baseURL + '/getPlaylists.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -812,9 +780,9 @@ function loadPlaylistsForMenu(menu) {
|
||||||
}
|
}
|
||||||
function newPlaylist() {
|
function newPlaylist() {
|
||||||
var reply = prompt("Choose a name for your new playlist.", "");
|
var reply = prompt("Choose a name for your new playlist.", "");
|
||||||
if (reply != null || reply != "") {
|
if (reply != 'null' && reply != null && reply != '') {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/createPlaylist.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&name=' + reply,
|
url: baseURL + '/createPlaylist.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&name=' + reply,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -826,7 +794,7 @@ function newPlaylist() {
|
||||||
}
|
}
|
||||||
function deletePlaylist(id) {
|
function deletePlaylist(id) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/deletePlaylist.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + id,
|
url: baseURL + '/deletePlaylist.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + id,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -852,7 +820,7 @@ function addToPlaylist(playlistid, from) {
|
||||||
// Get songs from playlist
|
// Get songs from playlist
|
||||||
var currentsongs = [];
|
var currentsongs = [];
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getPlaylist.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + playlistid,
|
url: baseURL + '/getPlaylist.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + playlistid,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -878,15 +846,15 @@ function addToPlaylist(playlistid, from) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
var runningVersion = parseVersionString(version);
|
var runningVersion = parseVersionString(apiVersion);
|
||||||
var minimumVersion = parseVersionString('1.8.0');
|
var minimumVersion = parseVersionString('1.8.0');
|
||||||
if (checkVersion(runningVersion, minimumVersion)) {
|
if (checkVersion(runningVersion, minimumVersion)) { // is 1.8.0 or newer
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: baseURL + '/updatePlaylist.view?u=' + username + '&p=' + password,
|
url: baseURL + '/updatePlaylist.view?u=' + username + '&p=' + password,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
data: { v: version, c: applicationName, f: "json", playlistId: playlistid, songIdToAdd: selected },
|
data: { v: apiVersion, c: applicationName, f: "json", playlistId: playlistid, songIdToAdd: selected },
|
||||||
success: function () {
|
success: function () {
|
||||||
$('table.songlist tr.song').each(function () {
|
$('table.songlist tr.song').each(function () {
|
||||||
$(this).removeClass('selected');
|
$(this).removeClass('selected');
|
||||||
|
@ -896,12 +864,12 @@ function addToPlaylist(playlistid, from) {
|
||||||
traditional: true // Fixes POST with an array in JQuery 1.4
|
traditional: true // Fixes POST with an array in JQuery 1.4
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({ // Depreciated: 11/5/2012
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: baseURL + '/createPlaylist.view?u=' + username + '&p=' + password,
|
url: baseURL + '/createPlaylist.view?u=' + username + '&p=' + password,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
data: { v: version, c: applicationName, f: "json", playlistId: playlistid, songId: currentsongs },
|
data: { v: apiVersion, c: applicationName, f: "json", playlistId: playlistid, songId: currentsongs },
|
||||||
success: function () {
|
success: function () {
|
||||||
$('table.songlist tr.song').each(function () {
|
$('table.songlist tr.song').each(function () {
|
||||||
$(this).removeClass('selected');
|
$(this).removeClass('selected');
|
||||||
|
@ -922,7 +890,7 @@ function addToPlaylist(playlistid, from) {
|
||||||
url: baseURL + '/createPlaylist.view?u=' + username + '&p=' + password,
|
url: baseURL + '/createPlaylist.view?u=' + username + '&p=' + password,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
data: { v: version, c: applicationName, f: "json", name: "" + reply + "", songId: selected },
|
data: { v: apiVersion, c: applicationName, f: "json", name: "" + reply + "", songId: selected },
|
||||||
success: function () {
|
success: function () {
|
||||||
$('table.songlist tr.song').each(function () {
|
$('table.songlist tr.song').each(function () {
|
||||||
$(this).removeClass('selected');
|
$(this).removeClass('selected');
|
||||||
|
@ -979,7 +947,7 @@ function saveCurrentPlaylist() {
|
||||||
if (current != '' && current != html) {
|
if (current != '' && current != html) {
|
||||||
try {
|
try {
|
||||||
localStorage.setItem('CurrentPlaylist', current);
|
localStorage.setItem('CurrentPlaylist', current);
|
||||||
if (debug) { console.log('Saving Current Playlist: ' + current.length + ' characters'); }
|
if (debug) { console.log('Saving Play Queue: ' + current.length + ' characters'); }
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e == QUOTA_EXCEEDED_ERR) {
|
if (e == QUOTA_EXCEEDED_ERR) {
|
||||||
alert('Quota exceeded!');
|
alert('Quota exceeded!');
|
||||||
|
@ -994,7 +962,7 @@ function deleteCurrentPlaylist() {
|
||||||
if (browserStorageCheck) {
|
if (browserStorageCheck) {
|
||||||
localStorage.removeItem('CurrentPlaylist');
|
localStorage.removeItem('CurrentPlaylist');
|
||||||
setCookie('CurrentSong', null);
|
setCookie('CurrentSong', null);
|
||||||
if (debug) { console.log('Removing Current Playlist'); }
|
if (debug) { console.log('Removing Play Queue'); }
|
||||||
} else {
|
} else {
|
||||||
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
|
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
|
||||||
}
|
}
|
||||||
|
@ -1004,7 +972,7 @@ function loadCurrentPlaylist() {
|
||||||
var html = localStorage.getItem('CurrentPlaylist');
|
var html = localStorage.getItem('CurrentPlaylist');
|
||||||
if (html != '' && html !== undefined && html !== null) {
|
if (html != '' && html !== undefined && html !== null) {
|
||||||
$('#CurrentPlaylistContainer tbody').html(html);
|
$('#CurrentPlaylistContainer tbody').html(html);
|
||||||
if (debug) { console.log('Load Current Playlist From localStorage: ' + html.length + ' characters'); }
|
if (debug) { console.log('Load Play Queue From localStorage: ' + html.length + ' characters'); }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
|
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
|
||||||
|
@ -1037,7 +1005,7 @@ function downloadItem(id, type) {
|
||||||
reqDownload = 'playlistUtf8Hex=' + id;
|
reqDownload = 'playlistUtf8Hex=' + id;
|
||||||
}
|
}
|
||||||
if (reqDownload) {
|
if (reqDownload) {
|
||||||
url = baseURL + '/download.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&' + reqDownload;
|
url = baseURL + '/download.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&' + reqDownload;
|
||||||
window.location = url;
|
window.location = url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1052,7 +1020,7 @@ function loadPodcasts(refresh) {
|
||||||
if (content === "") {
|
if (content === "") {
|
||||||
// Load Podcasts
|
// Load Podcasts
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getPodcasts.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json',
|
url: baseURL + '/getPodcasts.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -1071,7 +1039,7 @@ function loadPodcasts(refresh) {
|
||||||
html += '<li id=\"' + podcast.id + '\" albumid=\"' + albumId + '\" class=\"item\">';
|
html += '<li id=\"' + podcast.id + '\" albumid=\"' + albumId + '\" class=\"item\">';
|
||||||
html += '<div class=\"floatright\"><a class=\"play\" href=\"\" title=\"Play\"></a></div>';
|
html += '<div class=\"floatright\"><a class=\"play\" href=\"\" title=\"Play\"></a></div>';
|
||||||
html += '<div class=\"floatright\"><a class=\"download\" href=\"\" title=\"Download\"></a></div>';
|
html += '<div class=\"floatright\"><a class=\"download\" href=\"\" title=\"Download\"></a></div>';
|
||||||
html += '<div class=\"floatright\"><a class=\"add\" href=\"\" title=\"Add To Current Playlist\"></a></div>';
|
html += '<div class=\"floatright\"><a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a></div>';
|
||||||
html += '<div class=\"name\"><span>' + podcast.title + '</span></div>';
|
html += '<div class=\"name\"><span>' + podcast.title + '</span></div>';
|
||||||
html += '</li>';
|
html += '</li>';
|
||||||
$(html).appendTo("#ChannelsContainer");
|
$(html).appendTo("#ChannelsContainer");
|
||||||
|
@ -1086,7 +1054,7 @@ function loadPodcasts(refresh) {
|
||||||
}
|
}
|
||||||
function getPodcast(id, action, appendto) {
|
function getPodcast(id, action, appendto) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getPodcasts.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json',
|
url: baseURL + '/getPodcasts.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -1121,11 +1089,6 @@ function getPodcast(id, action, appendto) {
|
||||||
var count = 0;
|
var count = 0;
|
||||||
$.each(children, function (i, child) {
|
$.each(children, function (i, child) {
|
||||||
if (child.status == "skipped") return; // Skip podcasts that are not yet downloaded
|
if (child.status == "skipped") return; // Skip podcasts that are not yet downloaded
|
||||||
if (i % 2 === 0) {
|
|
||||||
rowcolor = 'even';
|
|
||||||
} else {
|
|
||||||
rowcolor = 'odd';
|
|
||||||
}
|
|
||||||
var date = parseDate(child.publishDate);
|
var date = parseDate(child.publishDate);
|
||||||
var description = 'Published: ' + date + '\n\n';
|
var description = 'Published: ' + date + '\n\n';
|
||||||
description += child.description;
|
description += child.description;
|
||||||
|
@ -1134,8 +1097,7 @@ function getPodcast(id, action, appendto) {
|
||||||
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
||||||
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
|
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
|
||||||
if (child.publishDate !== undefined) { publishdate = child.publishDate.substring(0, child.publishDate.indexOf(" ")); } else { publishdate = ''; }
|
if (child.publishDate !== undefined) { publishdate = child.publishDate.substring(0, child.publishDate.indexOf(" ")); } else { publishdate = ''; }
|
||||||
var time = secondsToTime(child.duration);
|
html = generateSongHTML(child.streamId, child.parent, publishdate, child.title, description, child.artist, child.album, child.coverArt, child.userRating, starred, duration);
|
||||||
html = generateSongHTML(rowcolor, child.streamId, child.parent, publishdate, child.title, description, child.artist, child.album, child.coverArt, child.userRating, starred, duration);
|
|
||||||
$(html).appendTo(appendto);
|
$(html).appendTo(appendto);
|
||||||
count++;
|
count++;
|
||||||
});
|
});
|
||||||
|
@ -1157,23 +1119,23 @@ function getPodcast(id, action, appendto) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function loadVideos(refresh) {
|
function loadVideos(refresh) {
|
||||||
if (debug) { console.log("LOAD PODCASTS"); }
|
if (debug) { console.log("LOAD VIDEOS"); }
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
$('#VideoContainer').empty();
|
$('#VideosContainer').empty();
|
||||||
}
|
}
|
||||||
var content = $('#VideoContainer').html();
|
var content = $('#VideosContainer').html();
|
||||||
if (content == "") {
|
if (content == "") {
|
||||||
// Load Videos
|
// Load Videos
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/getVideos.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json',
|
url: baseURL + '/getVideos.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data["subsonic-response"].videos != '') {
|
if (data["subsonic-response"].videos != '') {
|
||||||
var videos = [];
|
var videos = [];
|
||||||
if (data["subsonic-response"].videos.length > 0) {
|
if (data["subsonic-response"].videos.video.length > 0) {
|
||||||
videos = data["subsonic-response"].videos;
|
videos = data["subsonic-response"].videos.video;
|
||||||
} else {
|
} else {
|
||||||
videos[0] = data["subsonic-response"].videos.video;
|
videos[0] = data["subsonic-response"].videos.video;
|
||||||
}
|
}
|
||||||
|
@ -1185,11 +1147,13 @@ function loadVideos(refresh) {
|
||||||
} else {
|
} else {
|
||||||
rowcolor = 'odd';
|
rowcolor = 'odd';
|
||||||
}
|
}
|
||||||
html = '<tr class=\"song ' + rowcolor + '\" childid=\"' + video.id + '\" parentid=\"' + video.parent + '\" userrating=\"\">';
|
var videoURL = baseURL + '/stream.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + video.id;
|
||||||
html += '<td class=\"itemactions\"><a class=\"add\" href=\"\" title=\"Add To Current Playlist\"></a>';
|
html = '<tr class=\"row video\" childid=\"' + video.id + '\" parentid=\"' + video.parent + '\" bitrate=\"' + video.bitRate + '\" userrating=\"\">';
|
||||||
html += '<a class=\"remove\" href=\"\" title=\"Remove\"></a>';
|
html += '<td class=\"itemactions\">';
|
||||||
html += '<a class=\"play\" href=\"\" title=\"Play\"></a>';
|
//html += '<a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a>';
|
||||||
html += '<a class=\"download\" href=\"\" title=\"Download\"></a>';
|
//html += '<a class=\"remove\" href=\"\" title=\"Remove\"></a>';
|
||||||
|
html += '<a class=\"play\" href=\"' + videoURL + '\" title=\"Play (Opens In New Window)\" target=\"_blank\"></a>';
|
||||||
|
//html += '<a class=\"download\" href=\"\" title=\"Download\"></a>';
|
||||||
html += '</td>';
|
html += '</td>';
|
||||||
html += '<td class=\"track\"></td>';
|
html += '<td class=\"track\"></td>';
|
||||||
html += '<td class=\"title\">' + video.title + '</td>';
|
html += '<td class=\"title\">' + video.title + '</td>';
|
||||||
|
@ -1198,13 +1162,13 @@ function loadVideos(refresh) {
|
||||||
if (video.coverArt === undefined) {
|
if (video.coverArt === undefined) {
|
||||||
coverartSrc = 'images/albumdefault_25.jpg';
|
coverartSrc = 'images/albumdefault_25.jpg';
|
||||||
} else {
|
} else {
|
||||||
coverartSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=25&id=' + video.coverArt;
|
coverartSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&size=25&id=' + video.coverArt;
|
||||||
}
|
}
|
||||||
var time = secondsToTime(video.duration);
|
var time = secondsToTime(video.duration);
|
||||||
html += '<td class=\"album\"><img src=\"' + coverartSrc + '\" />' + video.album + '</td>';
|
html += '<td class=\"album\"><img src=\"' + coverartSrc + '\" />' + video.album + '</td>';
|
||||||
html += '<td class=\"time\">' + time + '</td>';
|
html += '<td class=\"time\">' + time + '</td>';
|
||||||
html += '</tr>';
|
html += '</tr>';
|
||||||
$(html).appendTo("#VideoContainer");
|
$(html).appendTo("#VideosContainer");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ function updateChatMessages() {
|
||||||
updater = $.periodic({ period: 1000, decay: 1.5, max_period: 1800000 }, function () {
|
updater = $.periodic({ period: 1000, decay: 1.5, max_period: 1800000 }, function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
periodic: this,
|
periodic: this,
|
||||||
url: baseURL + '/getChatMessages.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&since=' + starttime,
|
url: baseURL + '/getChatMessages.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&since=' + starttime,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -52,7 +52,7 @@ function addChatMessage(msg) {
|
||||||
url: baseURL + '/addChatMessage.view?u=' + username + '&p=' + password,
|
url: baseURL + '/addChatMessage.view?u=' + username + '&p=' + password,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
data: { v: version, c: applicationName, f: "json", message: msg },
|
data: { v: apiVersion, c: applicationName, f: "json", message: msg },
|
||||||
success: function () {
|
success: function () {
|
||||||
updater.reset();
|
updater.reset();
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
function generateRowHTML(child, appendto, rowcolor) {
|
function generateRowHTML(child, appendto) {
|
||||||
var html, isDir, starred, duration, artist, i;
|
var html, isDir, starred, duration, artist, i;
|
||||||
isDir = child.isDir;
|
isDir = child.isDir;
|
||||||
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
||||||
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
|
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
|
||||||
if (child.artist !== undefined) { artist = child.artist; } else { artist = ''; }
|
if (child.artist !== undefined) { artist = child.artist; } else { artist = ''; }
|
||||||
if (isDir === true) {
|
if (isDir === true) {
|
||||||
html = generateAlbumHTML(rowcolor, child.id, child.parent, child.coverArt, child.title, artist, child.userRating, starred);
|
html = generateAlbumHTML(child.id, child.parent, child.coverArt, child.title, artist, child.userRating, starred, child.created);
|
||||||
} else {
|
} else {
|
||||||
var track;
|
var track;
|
||||||
if (child.track === undefined) { track = " "; } else { track = child.track; }
|
if (child.track === undefined) { track = " "; } else { track = child.track; }
|
||||||
html = generateSongHTML(rowcolor, child.id, child.parent, track, child.title, '', artist, child.album, child.coverArt, child.userRating, starred, duration);
|
html = generateSongHTML(child.id, child.parent, track, child.title, '', artist, child.album, child.coverArt, child.userRating, starred, duration);
|
||||||
}
|
}
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
function generateAlbumHeaderHTML() {
|
function generateAlbumHeaderHTML() {
|
||||||
var html;
|
var html;
|
||||||
html = '<tr><th></th><th></th><th class=\"type-string\">Album</th><th class=\"type-string\">Artist</th></tr>';
|
html = '<tr><th></th><th></th><th class=\"type-string\">Album</th><th class=\"type-string\">Artist</th><th class=\"type-string\">Created</th></tr>';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
function generateAlbumHTML(rowcolor, childid, parentid, coverart, title, artist, rating, starred) {
|
function generateAlbumHTML(childid, parentid, coverart, title, artist, rating, starred, created) {
|
||||||
var html;
|
var html;
|
||||||
html = '<tr class=\"album ' + rowcolor + '\" childid=\"' + childid + '\" parentid=\"' + parentid + '\" userrating=\"' + rating + '\">';
|
html = '<tr class=\"album\" childid=\"' + childid + '\" parentid=\"' + parentid + '\" userrating=\"' + rating + '\">';
|
||||||
html += '<td class=\"itemactions\"><a class=\"add\" href=\"\" title=\"Add To Current Playlist\"></a>';
|
html += '<td class=\"itemactions\"><a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a>';
|
||||||
html += '<a class=\"play\" href=\"\" title=\"Play\"></a>';
|
html += '<a class=\"play\" href=\"\" title=\"Play\"></a>';
|
||||||
html += '<a class=\"download\" href=\"\" title=\"Download\"></a>';
|
html += '<a class=\"download\" href=\"\" title=\"Download\"></a>';
|
||||||
if (starred) {
|
if (starred) {
|
||||||
|
@ -33,10 +33,11 @@ function generateAlbumHTML(rowcolor, childid, parentid, coverart, title, artist,
|
||||||
if (coverart == undefined) {
|
if (coverart == undefined) {
|
||||||
html += '<td class=\"albumart\"><img src=\"images/albumdefault_50.jpg\" /></td>';
|
html += '<td class=\"albumart\"><img src=\"images/albumdefault_50.jpg\" /></td>';
|
||||||
} else {
|
} else {
|
||||||
html += '<td class=\"albumart\"><img src=\"' + baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=50&id=' + coverart + '\" /></td>';
|
html += '<td class=\"albumart\"><img src=\"' + baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&size=50&id=' + coverart + '\" /></td>';
|
||||||
}
|
}
|
||||||
html += '<td class=\"album\">' + title + '</td>';
|
html += '<td class=\"album\">' + title + '</td>';
|
||||||
html += '<td class=\"artist\">' + artist + '</td>';
|
html += '<td class=\"artist\">' + artist + '</td>';
|
||||||
|
html += '<td class=\"date\">' + $.format.date(new Date(created), "yyyy-MM-dd h:mm a") + '</td>';
|
||||||
html += '</tr>';
|
html += '</tr>';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -45,7 +46,7 @@ function generateSongHeaderHTML() {
|
||||||
html = '<tr><th></th><th class=\"type-int\">Track</th><th class=\"type-string\">Title</th><th class=\"type-string\">Artist</th><th class=\"type-string\">Album</th><th class=\"alignright\">Time</th></tr>';
|
html = '<tr><th></th><th class=\"type-int\">Track</th><th class=\"type-string\">Title</th><th class=\"type-string\">Artist</th><th class=\"type-string\">Album</th><th class=\"alignright\">Time</th></tr>';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
function generateSongHTML(rowcolor, childid, parentid, track, title, description, artist, album, coverart, rating, starred, duration) {
|
function generateSongHTML(childid, parentid, track, title, description, artist, album, coverart, rating, starred, duration) {
|
||||||
var time;
|
var time;
|
||||||
if (duration == '') {
|
if (duration == '') {
|
||||||
time = '00:00'
|
time = '00:00'
|
||||||
|
@ -53,8 +54,8 @@ function generateSongHTML(rowcolor, childid, parentid, track, title, description
|
||||||
time = secondsToTime(duration);
|
time = secondsToTime(duration);
|
||||||
}
|
}
|
||||||
var html;
|
var html;
|
||||||
html = '<tr class=\"song ' + rowcolor + '\" id=\"' + childid + '\" childid=\"' + childid + '\" parentid=\"' + parentid + '\" duration=\"' + duration + '\" userrating=\"' + rating + '\">';
|
html = '<tr class=\"row song\" id=\"' + childid + '\" childid=\"' + childid + '\" parentid=\"' + parentid + '\" duration=\"' + duration + '\" userrating=\"' + rating + '\">';
|
||||||
html += '<td class=\"itemactions\"><a class=\"add\" href=\"\" title=\"Add To Current Playlist\"></a>';
|
html += '<td class=\"itemactions\"><a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a>';
|
||||||
html += '<a class=\"remove\" href=\"\" title=\"Remove\"></a>';
|
html += '<a class=\"remove\" href=\"\" title=\"Remove\"></a>';
|
||||||
html += '<a class=\"play\" href=\"\" title=\"Play\"></a>';
|
html += '<a class=\"play\" href=\"\" title=\"Play\"></a>';
|
||||||
html += '<a class=\"download\" href=\"\" title=\"Download\"></a>';
|
html += '<a class=\"download\" href=\"\" title=\"Download\"></a>';
|
||||||
|
@ -75,7 +76,7 @@ function generateSongHTML(rowcolor, childid, parentid, track, title, description
|
||||||
if (coverart == undefined) {
|
if (coverart == undefined) {
|
||||||
coverartSrc = 'images/albumdefault_25.jpg';
|
coverartSrc = 'images/albumdefault_25.jpg';
|
||||||
} else {
|
} else {
|
||||||
coverartSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=25&id=' + coverart;
|
coverartSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&size=25&id=' + coverart;
|
||||||
}
|
}
|
||||||
html += '<td class=\"album\" data-order-by=\"' + album + '\"><a href="#" class=\"albumlink\"><img src=\"' + coverartSrc + '\" />' + album + '</a></td>';
|
html += '<td class=\"album\" data-order-by=\"' + album + '\"><a href="#" class=\"albumlink\"><img src=\"' + coverartSrc + '\" />' + album + '</a></td>';
|
||||||
html += '<td class=\"time\">' + time + '</td>';
|
html += '<td class=\"time\">' + time + '</td>';
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
var scrobbled = false;
|
var scrobbled = false;
|
||||||
var timerid = 0;
|
var timerid = 0;
|
||||||
function playSong(el, songid, albumid, position, loadonly) {
|
function getSongData(el, songid, albumid, position, loadonly) {
|
||||||
ajaxUrl = baseURL + '/getMusicDirectory.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + albumid;
|
var runningVersion = parseVersionString(apiVersion);
|
||||||
|
var minimumVersion = parseVersionString('1.8.0');
|
||||||
|
if (checkVersion(runningVersion, minimumVersion)) {
|
||||||
|
if (debug) { console.log('apiVersion at or above 1.8.0 using getSong.view'); }
|
||||||
|
ajaxUrl = baseURL + '/getSong.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + songid;
|
||||||
|
} else {
|
||||||
|
if (debug) { console.log('apiVersion below 1.8.0 using getMusicDirectory.view'); }
|
||||||
|
ajaxUrl = baseURL + '/getMusicDirectory.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + albumid; // Deprecated: apiVersion 1.8.0
|
||||||
|
}
|
||||||
if (debug) { console.log(ajaxUrl) }
|
if (debug) { console.log(ajaxUrl) }
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: ajaxUrl,
|
url: ajaxUrl,
|
||||||
|
@ -11,29 +19,56 @@ function playSong(el, songid, albumid, position, loadonly) {
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
var title, artist, album, rating, starred, contenttype, suffix;
|
var title, artist, album, rating, starred, contenttype, suffix;
|
||||||
var specs = '';
|
var specs = '';
|
||||||
if (data["subsonic-response"].directory.child !== undefined) {
|
|
||||||
// There is a bug in the API that doesn't return a JSON array for one artist
|
if (typeof data["subsonic-response"].song != "undefined") {
|
||||||
var children = [];
|
var song = data["subsonic-response"].song;
|
||||||
if (data["subsonic-response"].directory.child.length > 0) {
|
title = song.title.toString();
|
||||||
children = data["subsonic-response"].directory.child;
|
if (song.artist !== undefined) { artist = song.artist.toString(); } else { artist = ''; }
|
||||||
} else {
|
album = song.album;
|
||||||
children[0] = data["subsonic-response"].directory.child;
|
coverart = song.coverArt;
|
||||||
}
|
rating = song.userRating;
|
||||||
$.each(children, function (i, child) {
|
if (song.contentType == 'audio/ogg') { contenttype = song.contentType; } else { contenttype = 'audio/mp3'; }
|
||||||
if (child.id == songid) {
|
if (song.starred !== undefined) { starred = true; } else { starred = false; }
|
||||||
title = child.title.toString();
|
if (song.bitRate !== undefined) { specs += song.bitRate + ' Kbps'; }
|
||||||
if (child.artist !== undefined) { artist = child.artist.toString(); } else { artist = ''; }
|
if (song.transcodedSuffix !== undefined) { specs += ', transcoding:' + song.suffix + ' > ' + song.transcodedSuffix; } else { specs += ', ' + song.suffix; }
|
||||||
album = child.album;
|
if (song.transcodedSuffix !== undefined) { suffix = song.transcodedSuffix; } else { suffix = song.suffix; }
|
||||||
coverart = child.coverArt;
|
if (suffix == 'ogg') { suffix = 'oga'; }
|
||||||
rating = child.userRating;
|
}
|
||||||
if (child.contentType == 'audio/ogg') { contenttype = child.contentType; } else { contenttype = 'audio/mp3'; }
|
if (typeof data["subsonic-response"].directory != 'undefined') { // Deprecated: apiVersion 1.8.0
|
||||||
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
if (typeof data["subsonic-response"].directory.child != 'undefined') {
|
||||||
if (child.bitRate !== undefined) { specs += child.bitRate + ' Kbps'; }
|
// There is a bug in the API that doesn't return a JSON array for one artist
|
||||||
if (child.transcodedSuffix !== undefined) { specs += ', transcoding:' + child.suffix + ' > ' + child.transcodedSuffix; } else { specs += ', ' + child.suffix; }
|
var children = [];
|
||||||
if (child.transcodedSuffix !== undefined) { suffix = child.transcodedSuffix; } else { suffix = child.suffix; }
|
if (data["subsonic-response"].directory.child.length > 0) {
|
||||||
if (suffix == 'ogg') { suffix = 'oga'; }
|
children = data["subsonic-response"].directory.child;
|
||||||
|
} else {
|
||||||
|
children[0] = data["subsonic-response"].directory.child;
|
||||||
}
|
}
|
||||||
});
|
$.each(children, function (i, child) {
|
||||||
|
if (child.id == songid) {
|
||||||
|
title = child.title.toString();
|
||||||
|
if (child.artist !== undefined) { artist = child.artist.toString(); } else { artist = ''; }
|
||||||
|
album = child.album;
|
||||||
|
coverart = child.coverArt;
|
||||||
|
rating = child.userRating;
|
||||||
|
if (child.contentType == 'audio/ogg') { contenttype = child.contentType; } else { contenttype = 'audio/mp3'; }
|
||||||
|
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
||||||
|
if (child.bitRate !== undefined) { specs += child.bitRate + ' Kbps'; }
|
||||||
|
if (child.transcodedSuffix !== undefined) { specs += ', transcoding:' + child.suffix + ' > ' + child.transcodedSuffix; } else { specs += ', ' + child.suffix; }
|
||||||
|
if (child.transcodedSuffix !== undefined) { suffix = child.transcodedSuffix; } else { suffix = child.suffix; }
|
||||||
|
if (suffix == 'ogg') { suffix = 'oga'; }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
playSong(el, songid, albumid, title, artist, album, coverart, rating, starred, contenttype, suffix, specs, loadonly);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function playSong(el, songid, albumid, title, artist, album, coverart, rating, starred, contenttype, suffix, specs, loadonly) {
|
||||||
|
var volume = 1;
|
||||||
|
if (getCookie('Volume')) {
|
||||||
|
volume = parseFloat(getCookie('Volume'));
|
||||||
}
|
}
|
||||||
if (starred) {
|
if (starred) {
|
||||||
$('#songdetails_rate').attr('class', 'favorite');
|
$('#songdetails_rate').attr('class', 'favorite');
|
||||||
|
@ -49,122 +84,155 @@ function playSong(el, songid, albumid, position, loadonly) {
|
||||||
$('#songdetails_specs').html(specs);
|
$('#songdetails_specs').html(specs);
|
||||||
var coverartSrc, coverartFullSrc;
|
var coverartSrc, coverartFullSrc;
|
||||||
if (coverart == undefined) {
|
if (coverart == undefined) {
|
||||||
coverartSrc = 'images/albumdefault_56.jpg';
|
coverartSrc = 'images/albumdefault_60.jpg';
|
||||||
coverartFullSrc = '';
|
coverartFullSrc = '';
|
||||||
} else {
|
} else {
|
||||||
coverartSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=56&id=' + coverart;
|
coverartSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&size=60&id=' + coverart;
|
||||||
coverartFullSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + coverart;
|
coverartFullSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + coverart;
|
||||||
}
|
}
|
||||||
$('#coverartimage').attr('href', coverartFullSrc);
|
$('#coverartimage').attr('href', coverartFullSrc);
|
||||||
$('#coverartimage img').attr('src', coverartSrc);
|
$('#coverartimage img').attr('src', coverartSrc);
|
||||||
$('#playermiddle').css('visibility', 'visible');
|
$('#playermiddle').css('visibility', 'visible');
|
||||||
$('#songdetails').css('visibility', 'visible');
|
$('#songdetails').css('visibility', 'visible');
|
||||||
var salt = Math.floor(Math.random() * 100000);
|
var salt = Math.floor(Math.random() * 100000);
|
||||||
// jPlayer Setup
|
// jPlayer Setup
|
||||||
var audioSolution = "html,flash";
|
var audioSolution = "html,flash";
|
||||||
if (getCookie('ForceFlash')) {
|
if (getCookie('ForceFlash')) {
|
||||||
audioSolution = "flash,html";
|
audioSolution = "flash,html";
|
||||||
}
|
}
|
||||||
$("#playdeck").jPlayer("destroy");
|
$("#playdeck").jPlayer("destroy");
|
||||||
$("#playdeck").jPlayer({
|
$("#playdeck").jPlayer({
|
||||||
swfPath: "js/jplayer",
|
swfPath: "js/jplayer",
|
||||||
wmode: "window",
|
wmode: "window",
|
||||||
solution: audioSolution,
|
solution: audioSolution,
|
||||||
supplied: suffix,
|
supplied: suffix,
|
||||||
errorAlerts: debug,
|
volume: volume,
|
||||||
warningAlerts: false,
|
errorAlerts: debug,
|
||||||
volume: parseInt(volume)/100,
|
warningAlerts: false,
|
||||||
cssSelectorAncestor: "#player",
|
cssSelectorAncestor: "#player",
|
||||||
cssSelector: {
|
cssSelector: {
|
||||||
play: "#PlayTrack",
|
play: "#PlayTrack",
|
||||||
pause: "#PauseTrack",
|
pause: "#PauseTrack",
|
||||||
seekBar: "#audiocontainer .scrubber",
|
seekBar: "#audiocontainer .scrubber",
|
||||||
playBar: "#audiocontainer .progress",
|
playBar: "#audiocontainer .progress",
|
||||||
//mute: "#mute",
|
mute: "#action_Mute",
|
||||||
//unmute: "#unmute",
|
unmute: "#action_UnMute",
|
||||||
currentTime: "#played",
|
volumeMax: "#action_VolumeMax",
|
||||||
duration: "#duration"
|
currentTime: "#played",
|
||||||
},
|
duration: "#duration"
|
||||||
ready: function () {
|
},
|
||||||
if (suffix == 'oga') {
|
ready: function () {
|
||||||
$(this).jPlayer("setMedia", {
|
if (suffix == 'oga') {
|
||||||
oga: baseURL + '/stream.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt,
|
$(this).jPlayer("setMedia", {
|
||||||
});
|
oga: baseURL + '/stream.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt,
|
||||||
} else if (suffix == 'mp3') {
|
});
|
||||||
$(this).jPlayer("setMedia", {
|
} else if (suffix == 'mp3') {
|
||||||
mp3: baseURL + '/stream.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt,
|
$(this).jPlayer("setMedia", {
|
||||||
});
|
mp3: baseURL + '/stream.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt,
|
||||||
}
|
});
|
||||||
if (!loadonly) {
|
}
|
||||||
$(this).jPlayer("play")
|
if (!loadonly) {
|
||||||
} else {
|
$(this).jPlayer("play");
|
||||||
$(this).jPlayer("pause", position)
|
} else {
|
||||||
}
|
$(this).jPlayer("pause", position);
|
||||||
},
|
}
|
||||||
ended: function() { // The $.jPlayer.event.ended event
|
},
|
||||||
var next = $('#CurrentPlaylistContainer tr.playing').next();
|
volumechange: function(event) { // The $.jPlayer.event.ended event
|
||||||
if (!changeTrack(next)) {
|
setCookie('Volume', event.jPlayer.options.volume);
|
||||||
if (getCookie('AutoPilot')) {
|
},
|
||||||
getRandomSongList('autoplayappend', '#CurrentPlaylistContainer tbody', '', '');
|
ended: function() { // The $.jPlayer.event.ended event
|
||||||
}
|
var next = $('#CurrentPlaylistContainer tr.playing').next();
|
||||||
|
if (!changeTrack(next)) {
|
||||||
|
if (getCookie('AutoPilot')) {
|
||||||
|
getRandomSongList('autoplayappend', '#CurrentPlaylistContainer tbody', '', '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
if (getCookie('SaveTrackPosition')) {
|
});
|
||||||
if (timerid != 0) {
|
if (getCookie('SaveTrackPosition')) {
|
||||||
clearInterval(timerid);
|
if (timerid != 0) {
|
||||||
}
|
clearInterval(timerid);
|
||||||
timerid = window.setInterval(function () {
|
}
|
||||||
if (getCookie('SaveTrackPosition')) {
|
timerid = window.setInterval(function () {
|
||||||
var audio = typeof $("#playdeck").data("jPlayer") != 'undefined' ? true : false;
|
if (getCookie('SaveTrackPosition')) {
|
||||||
if (audio) {
|
var audio = typeof $("#playdeck").data("jPlayer") != 'undefined' ? true : false;
|
||||||
saveTrackPosition();
|
if (audio) {
|
||||||
}
|
saveTrackPosition();
|
||||||
}
|
}
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
var submenu = $('div#submenu_CurrentPlaylist');
|
|
||||||
if (submenu.is(":visible")) {
|
|
||||||
submenu.fadeOut();
|
|
||||||
}
|
|
||||||
var spechtml = '';
|
|
||||||
var data = $('#playdeck').data().jPlayer;
|
|
||||||
for (i = 0; i < data.solutions.length; i++) {
|
|
||||||
var solution = data.solutions[i];
|
|
||||||
if (data[solution].used) {
|
|
||||||
spechtml += "<strong>" + solution + "</strong> is";
|
|
||||||
spechtml += " being used with<strong>";
|
|
||||||
for (format in data[solution].support) {
|
|
||||||
if (data[solution].support[format]) {
|
|
||||||
spechtml += " " + format;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
spechtml += "</strong> support";
|
|
||||||
}
|
}
|
||||||
|
}, 5000);
|
||||||
|
}
|
||||||
|
var submenu = $('div#submenu_CurrentPlaylist');
|
||||||
|
if (submenu.is(":visible")) {
|
||||||
|
submenu.fadeOut();
|
||||||
|
}
|
||||||
|
var spechtml = '';
|
||||||
|
var data = $('#playdeck').data().jPlayer;
|
||||||
|
for (i = 0; i < data.solutions.length; i++) {
|
||||||
|
var solution = data.solutions[i];
|
||||||
|
if (data[solution].used) {
|
||||||
|
spechtml += "<strong>" + solution + "</strong> is";
|
||||||
|
spechtml += " being used with<strong>";
|
||||||
|
for (format in data[solution].support) {
|
||||||
|
if (data[solution].support[format]) {
|
||||||
|
spechtml += " " + format;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spechtml += "</strong> support";
|
||||||
}
|
}
|
||||||
$('#SMStats').html(spechtml);
|
}
|
||||||
$('table.songlist tr.song').removeClass('playing');
|
$('#SMStats').html(spechtml);
|
||||||
if (el != null) {
|
$('table.songlist tr.song').removeClass('playing');
|
||||||
$(el).addClass('playing');
|
if (el != null) {
|
||||||
}
|
$(el).addClass('playing');
|
||||||
scrobbleSong(false);
|
}
|
||||||
scrobbled = false;
|
scrobbleSong(false);
|
||||||
|
scrobbled = false;
|
||||||
|
|
||||||
if (getCookie('Notification_Song')) {
|
if (getCookie('Notification_Song')) {
|
||||||
showNotification(coverartSrc, toHTML.un(title), toHTML.un(artist + ' - ' + album), 'text');
|
showNotification(coverartSrc, toHTML.un(title), toHTML.un(artist + ' - ' + album), 'text', '#NextTrack');
|
||||||
}
|
}
|
||||||
if (getCookie('ScrollTitle')) {
|
if (getCookie('ScrollTitle')) {
|
||||||
scrollTitle(toHTML.un(artist) + ' - ' + toHTML.un(title));
|
scrollTitle(toHTML.un(artist) + ' - ' + toHTML.un(title));
|
||||||
} else {
|
} else {
|
||||||
setTitle(toHTML.un(artist) + ' - ' + toHTML.un(title));
|
setTitle(toHTML.un(artist) + ' - ' + toHTML.un(title));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
function playVideo(id, bitrate) {
|
||||||
|
var w, h;
|
||||||
|
bitrate = parseInt(bitrate);
|
||||||
|
if (bitrate <= 600) {
|
||||||
|
w = 320; h = 240;
|
||||||
|
} else if (bitrate <= 1000) {
|
||||||
|
w = 480; h = 360;
|
||||||
|
} else {
|
||||||
|
w = 640; h = 480;
|
||||||
|
}
|
||||||
|
//$("#jPlayerSelector").jPlayer("option", "fullScreen", true);
|
||||||
|
$("#videodeck").jPlayer({
|
||||||
|
ready: function () {
|
||||||
|
/*
|
||||||
|
$.fancybox({
|
||||||
|
autoSize: false,
|
||||||
|
width: w + 10,
|
||||||
|
height: h + 10,
|
||||||
|
content: $('#videodeck')
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
$(this).jPlayer("setMedia", {
|
||||||
|
m4v: 'https://&id=' + id + '&salt=83132'
|
||||||
|
}).jPlayer("play");
|
||||||
|
$('#videooverlay').show();
|
||||||
|
},
|
||||||
|
swfPath: "js/jplayer",
|
||||||
|
solution: "html, flash",
|
||||||
|
supplied: "m4v"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
function scrobbleSong(submission) {
|
function scrobbleSong(submission) {
|
||||||
var songid = $('#songdetails_song').attr('childid');
|
var songid = $('#songdetails_song').attr('childid');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/scrobble.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + songid + "&submission=" + submission,
|
url: baseURL + '/scrobble.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + songid + "&submission=" + submission,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -177,7 +245,7 @@ function scrobbleSong(submission) {
|
||||||
}
|
}
|
||||||
function rateSong(songid, rating) {
|
function rateSong(songid, rating) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseURL + '/setRating.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + songid + "&rating=" + rating,
|
url: baseURL + '/setRating.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + songid + "&rating=" + rating,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
@ -190,9 +258,9 @@ function starItem(itemid, starred) {
|
||||||
var url;
|
var url;
|
||||||
if (itemid !== undefined) {
|
if (itemid !== undefined) {
|
||||||
if (starred) {
|
if (starred) {
|
||||||
url = baseURL + '/star.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + itemid;
|
url = baseURL + '/star.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + itemid;
|
||||||
} else {
|
} else {
|
||||||
url = baseURL + '/unstar.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + itemid;
|
url = baseURL + '/unstar.view?u=' + username + '&p=' + password + '&v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + itemid;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
|
@ -218,7 +286,7 @@ function changeTrack(next) {
|
||||||
var songid = $(next).attr('childid');
|
var songid = $(next).attr('childid');
|
||||||
if (songid !== undefined) {
|
if (songid !== undefined) {
|
||||||
var albumid = $(next).attr('parentid');
|
var albumid = $(next).attr('parentid');
|
||||||
playSong(next, songid, albumid, 0, false);
|
getSongData(next, songid, albumid, 0, false);
|
||||||
$('#CurrentPlaylist').scrollTo($('#' + songid), 400); //Scroll to object
|
$('#CurrentPlaylist').scrollTo($('#' + songid), 400); //Scroll to object
|
||||||
if (debug) { console.log('Changing Track: songid:' + songid + ', albumid:' + albumid); }
|
if (debug) { console.log('Changing Track: songid:' + songid + ', albumid:' + albumid); }
|
||||||
return true;
|
return true;
|
||||||
|
@ -236,13 +304,13 @@ function autoPlay(loadonly) {
|
||||||
song = $('#CurrentPlaylistContainer tr.song:first');
|
song = $('#CurrentPlaylistContainer tr.song:first');
|
||||||
var songid = $(song).attr('childid');
|
var songid = $(song).attr('childid');
|
||||||
var albumid = $(song).attr('parentid');
|
var albumid = $(song).attr('parentid');
|
||||||
playSong(song, songid, albumid, 0, true);
|
getSongData(song, songid, albumid, 0, true);
|
||||||
} else {
|
} else {
|
||||||
// No songs currently playing, so get first and play
|
// No songs currently playing, so get first and play
|
||||||
song = $('#CurrentPlaylistContainer tr.song:first');
|
song = $('#CurrentPlaylistContainer tr.song:first');
|
||||||
var songid = $(song).attr('childid');
|
var songid = $(song).attr('childid');
|
||||||
var albumid = $(song).attr('parentid');
|
var albumid = $(song).attr('parentid');
|
||||||
playSong(song, songid, albumid, 0, false);
|
getSongData(song, songid, albumid, 0, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (nextSong.length == 1) {
|
if (nextSong.length == 1) {
|
||||||
|
@ -250,13 +318,13 @@ function autoPlay(loadonly) {
|
||||||
song = $('#CurrentPlaylistContainer tr.playing').next();
|
song = $('#CurrentPlaylistContainer tr.playing').next();
|
||||||
var songid = $(song).attr('childid');
|
var songid = $(song).attr('childid');
|
||||||
var albumid = $(song).attr('parentid');
|
var albumid = $(song).attr('parentid');
|
||||||
playSong(song, songid, albumid, 0, false);
|
getSongData(song, songid, albumid, 0, false);
|
||||||
} else {
|
} else {
|
||||||
// Otherwise get
|
// Otherwise get
|
||||||
song = $('#CurrentPlaylistContainer tr.playing');
|
song = $('#CurrentPlaylistContainer tr.playing');
|
||||||
var songid = $(song).attr('childid');
|
var songid = $(song).attr('childid');
|
||||||
var albumid = $(song).attr('parentid');
|
var albumid = $(song).attr('parentid');
|
||||||
playSong(song, songid, albumid, 0, false);
|
getSongData(song, songid, albumid, 0, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,344 +0,0 @@
|
||||||
var scrobbled = false;
|
|
||||||
var timerid = 0;
|
|
||||||
function playSong(el, songid, albumid, position, loadonly) {
|
|
||||||
ajaxUrl = baseURL + '/getMusicDirectory.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + albumid;
|
|
||||||
if (debug) { console.log(ajaxUrl) }
|
|
||||||
$.ajax({
|
|
||||||
url: ajaxUrl,
|
|
||||||
method: 'GET',
|
|
||||||
dataType: 'json',
|
|
||||||
timeout: 10000,
|
|
||||||
success: function (data) {
|
|
||||||
var title, artist, album, rating, starred, contenttype;
|
|
||||||
var specs = '';
|
|
||||||
if (data["subsonic-response"].directory.child !== undefined) {
|
|
||||||
// There is a bug in the API that doesn't return a JSON array for one artist
|
|
||||||
var children = [];
|
|
||||||
if (data["subsonic-response"].directory.child.length > 0) {
|
|
||||||
children = data["subsonic-response"].directory.child;
|
|
||||||
} else {
|
|
||||||
children[0] = data["subsonic-response"].directory.child;
|
|
||||||
}
|
|
||||||
$.each(children, function (i, child) {
|
|
||||||
if (child.id == songid) {
|
|
||||||
title = child.title.toString();
|
|
||||||
if (child.artist !== undefined) { artist = child.artist.toString(); } else { artist = ''; }
|
|
||||||
album = child.album;
|
|
||||||
coverart = child.coverArt;
|
|
||||||
rating = child.userRating;
|
|
||||||
if (child.contentType == 'audio/ogg') { contenttype = child.contentType; } else { contenttype = 'audio/mp3'; }
|
|
||||||
if (child.starred !== undefined) { starred = true; } else { starred = false; }
|
|
||||||
if (child.bitRate !== undefined) { specs += child.bitRate + ' Kbps'; }
|
|
||||||
if (child.transcodedSuffix !== undefined) { specs += ', transcoding:' + child.suffix + ' > ' + child.transcodedSuffix; } else { specs += ', ' + child.suffix; }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (starred) {
|
|
||||||
$('#songdetails_rate').attr('class', 'favorite');
|
|
||||||
} else {
|
|
||||||
$('#songdetails_rate').attr('class', 'rate');
|
|
||||||
}
|
|
||||||
$('#songdetails_song').html(title);
|
|
||||||
$('#songdetails_song').attr('title', title);
|
|
||||||
$('#songdetails_song').attr('parentid', albumid);
|
|
||||||
$('#songdetails_song').attr('childid', songid);
|
|
||||||
$('#songdetails_artist').html(artist + ' - ' + album);
|
|
||||||
$('#songdetails_artist').attr('title', toHTML.un(artist + ' - ' + album));
|
|
||||||
$('#songdetails_specs').html(specs);
|
|
||||||
var coverartSrc, coverartFullSrc;
|
|
||||||
if (coverart == undefined) {
|
|
||||||
coverartSrc = 'images/albumdefault_56.jpg';
|
|
||||||
coverartFullSrc = '';
|
|
||||||
} else {
|
|
||||||
coverartSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&size=56&id=' + coverart;
|
|
||||||
coverartFullSrc = baseURL + '/getCoverArt.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + coverart;
|
|
||||||
}
|
|
||||||
$('#coverartimage').attr('href', coverartFullSrc);
|
|
||||||
$('#coverartimage img').attr('src', coverartSrc);
|
|
||||||
$('#playermiddle').css('visibility', 'visible');
|
|
||||||
$('#songdetails').css('visibility', 'visible');
|
|
||||||
if (!loadonly) { // Sometimes we only want to load the track and not play
|
|
||||||
// SoundManager Initialize
|
|
||||||
var salt = Math.floor(Math.random() * 100000);
|
|
||||||
soundManager.onready(function () {
|
|
||||||
if (debug) {
|
|
||||||
console.log("SM HTML5 STATUS");
|
|
||||||
$.each(soundManager.html5, function (key, value) {
|
|
||||||
console.log(key + ': ' + value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var sm = soundManager.getSoundById('audio');
|
|
||||||
if (typeof sm !== undefined) {
|
|
||||||
soundManager.destroySound('audio');
|
|
||||||
}
|
|
||||||
soundManager.createSound({
|
|
||||||
id: 'audio',
|
|
||||||
url: baseURL + '/stream.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt,
|
|
||||||
stream: true,
|
|
||||||
type: contenttype,
|
|
||||||
multiShot: false,
|
|
||||||
whileloading: function () {
|
|
||||||
//if (debug) { console.log('loaded:' + this.bytesLoaded + ' total:' + this.bytesTotal); }
|
|
||||||
var percent = this.bytesLoaded / this.bytesTotal;
|
|
||||||
var scrubber = $('#audio_wrapper0').find(".scrubber");
|
|
||||||
var loaded = $('#audio_wrapper0').find(".loaded");
|
|
||||||
loaded.css('width', (scrubber.get(0).offsetWidth * percent) + 'px');
|
|
||||||
loaded.attr('title', Math.round(percent * 100) + '% loaded');
|
|
||||||
},
|
|
||||||
whileplaying: function () {
|
|
||||||
//if (debug) { console.log('position:' + this.position + ' duration:' + this.duration); }
|
|
||||||
var percent = this.position / this.duration;
|
|
||||||
var scrubber = $('#audio_wrapper0').find(".scrubber");
|
|
||||||
var progress = $('#audio_wrapper0').find(".progress");
|
|
||||||
progress.css('width', (scrubber.get(0).offsetWidth * percent) + 'px');
|
|
||||||
|
|
||||||
var played = $('#audio_wrapper0').find(".played");
|
|
||||||
var p = (this.duration / 1000) * percent,
|
|
||||||
m = Math.floor(p / 60),
|
|
||||||
s = Math.floor(p % 60);
|
|
||||||
played.html((m < 10 ? '0' : '') + m + ':' + (s < 10 ? '0' : '') + s);
|
|
||||||
|
|
||||||
// Scrobble song once percentage is reached
|
|
||||||
if (!scrobbled && p > 30 && (percent > 0.5 || p > 480)) {
|
|
||||||
if (debug) { console.log("LAST.FM SCROBBLE"); }
|
|
||||||
scrobbleSong(true);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onload: function () {
|
|
||||||
var duration = $('#audio_wrapper0').find(".duration");
|
|
||||||
var dp = this.duration / 1000,
|
|
||||||
dm = Math.floor(dp / 60),
|
|
||||||
ds = Math.floor(dp % 60);
|
|
||||||
duration.html((dm < 10 ? '0' : '') + dm + ':' + (ds < 10 ? '0' : '') + ds);
|
|
||||||
var scrubber = $('#audio_wrapper0').find(".scrubber");
|
|
||||||
scrubber.unbind("click");
|
|
||||||
scrubber.click(function (e) {
|
|
||||||
var x = (e.pageX - this.offsetLeft) / scrubber.width();
|
|
||||||
var position = Math.round(dp * 1000 * x);
|
|
||||||
var s = soundManager.getSoundById('audio');
|
|
||||||
s.setPosition(position);
|
|
||||||
});
|
|
||||||
scrubber.mouseover(function (e) {
|
|
||||||
$('.audiojs .scrubber').stop().animate({ height: '8px' });
|
|
||||||
});
|
|
||||||
scrubber.mouseout(function (e) {
|
|
||||||
$('.audiojs .scrubber').stop().animate({ height: '4px' });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onpause: function () {
|
|
||||||
if (debug) { console.log('Pause Event: ' + ' playState:' + this.playState + ', readyState:' + this.readyState + ', position:' + this.position + ', duration:' + this.duration + ', durationEstimate:' + this.durationEstimate + ', isBuffering:' + this.isBuffering); }
|
|
||||||
},
|
|
||||||
onresume: function () {
|
|
||||||
if (debug) { console.log('Resume Event: ' + ' playState:' + this.playState + ', readyState:' + this.readyState + ', position:' + this.position + ', duration:' + this.duration + ', durationEstimate:' + this.durationEstimate + ', isBuffering:' + this.isBuffering); }
|
|
||||||
},
|
|
||||||
onsuspend: function () {
|
|
||||||
if (debug) { console.log('Suspend Event: ' + ' playState:' + this.playState + ', readyState:' + this.readyState + ', position:' + this.position + ', duration:' + this.duration + ', durationEstimate:' + this.durationEstimate + ', isBuffering:' + this.isBuffering); }
|
|
||||||
},
|
|
||||||
onfinish: function () {
|
|
||||||
var next = $('#CurrentPlaylistContainer tr.playing').next();
|
|
||||||
if (!changeTrack(next)) {
|
|
||||||
if (getCookie('AutoPilot')) {
|
|
||||||
getRandomSongList('autoplayappend', '#CurrentPlaylistContainer tbody', '', '');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ontimeout: function (status) {
|
|
||||||
if (debug) { console.log('The status is ' + status.success + ', the error type is ' + status.error.type); }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (position == 0) {
|
|
||||||
soundManager.play('audio');
|
|
||||||
soundManager.setVolume('audio', volume);
|
|
||||||
} else {
|
|
||||||
var p = position;
|
|
||||||
seekAndPlay('audio', p);
|
|
||||||
soundManager.setVolume('audio', volume);
|
|
||||||
}
|
|
||||||
if (getCookie('SaveTrackPosition')) {
|
|
||||||
if (timerid != 0) {
|
|
||||||
clearInterval(timerid);
|
|
||||||
}
|
|
||||||
timerid = window.setInterval(function () {
|
|
||||||
if (getCookie('SaveTrackPosition')) {
|
|
||||||
var sm = soundManager.getSoundById('audio');
|
|
||||||
if (sm !== undefined) {
|
|
||||||
saveTrackPosition();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
var submenu = $('div#submenu_CurrentPlaylist');
|
|
||||||
if (submenu.is(":visible")) {
|
|
||||||
submenu.fadeOut();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('table.songlist tr.song').removeClass('playing');
|
|
||||||
if (el != null) {
|
|
||||||
$(el).addClass('playing');
|
|
||||||
}
|
|
||||||
$('#PlayTrack').find('img').attr('src', 'images/pause_24x32.png');
|
|
||||||
$('#PlayTrack').addClass('playing');
|
|
||||||
scrobbleSong(false);
|
|
||||||
scrobbled = false;
|
|
||||||
|
|
||||||
if (getCookie('Notification_Song')) {
|
|
||||||
showNotification(coverartSrc, toHTML.un(title), toHTML.un(artist + ' - ' + album), 'text');
|
|
||||||
}
|
|
||||||
if (getCookie('ScrollTitle')) {
|
|
||||||
scrollTitle(toHTML.un(artist) + ' - ' + toHTML.un(title));
|
|
||||||
} else {
|
|
||||||
setTitle(toHTML.un(artist) + ' - ' + toHTML.un(title));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function seekAndPlay(soundID, soundPosition) {
|
|
||||||
var s = soundManager.getSoundById(soundID);
|
|
||||||
if (s) {
|
|
||||||
s.unload();
|
|
||||||
if (s.readyState === 0) { // hasn't started loading yet...
|
|
||||||
// load the whole sound, and play when it's done
|
|
||||||
s.load({
|
|
||||||
onload: function () {
|
|
||||||
this.play({
|
|
||||||
position: soundPosition
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (s.readyState === 3) {
|
|
||||||
// sound has already loaded, ready to go
|
|
||||||
s.play({
|
|
||||||
position: soundPosition
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function scrobbleSong(submission) {
|
|
||||||
var songid = $('#songdetails_song').attr('childid');
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + '/scrobble.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + songid + "&submission=" + submission,
|
|
||||||
method: 'GET',
|
|
||||||
dataType: 'json',
|
|
||||||
timeout: 10000,
|
|
||||||
success: function () {
|
|
||||||
if (submission) {
|
|
||||||
scrobbled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function rateSong(songid, rating) {
|
|
||||||
$.ajax({
|
|
||||||
url: baseURL + '/setRating.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + songid + "&rating=" + rating,
|
|
||||||
method: 'GET',
|
|
||||||
dataType: 'json',
|
|
||||||
timeout: 10000,
|
|
||||||
success: function () {
|
|
||||||
updateMessage('Rating Updated!');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function starItem(itemid, starred) {
|
|
||||||
var url;
|
|
||||||
if (itemid !== undefined) {
|
|
||||||
if (starred) {
|
|
||||||
url = baseURL + '/star.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + itemid;
|
|
||||||
} else {
|
|
||||||
url = baseURL + '/unstar.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=json&id=' + itemid;
|
|
||||||
}
|
|
||||||
$.ajax({
|
|
||||||
url: url,
|
|
||||||
method: 'GET',
|
|
||||||
dataType: 'json',
|
|
||||||
timeout: 10000,
|
|
||||||
success: function () {
|
|
||||||
updateMessage('Favorite Updated!');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function playPauseSong() {
|
|
||||||
var el = '#PlayTrack';
|
|
||||||
if ($(el).hasClass('playing')) {
|
|
||||||
$(el).find('img').attr('src', 'images/play_24x32.png');
|
|
||||||
$(el).removeClass('playing');
|
|
||||||
$(el).addClass('paused');
|
|
||||||
soundManager.pause('audio');
|
|
||||||
} else if ($(el).hasClass('paused')) {
|
|
||||||
$(el).find('img').attr('src', 'images/pause_24x32.png');
|
|
||||||
$(el).removeClass('paused');
|
|
||||||
$(el).addClass('playing');
|
|
||||||
soundManager.resume('audio');
|
|
||||||
} else {
|
|
||||||
var el = $('#songdetails_song');
|
|
||||||
var songid = el.attr('childid');
|
|
||||||
if (songid != '') {
|
|
||||||
if (getCookie("CurrentSong")) {
|
|
||||||
var currentSong = JSON.parse(getCookie("CurrentSong"));
|
|
||||||
playSong($('#' + songid), currentSong.songid, currentSong.albumid, currentSong.position, false);
|
|
||||||
var playing = $('#' + songid);
|
|
||||||
if (playing != undefined) {
|
|
||||||
$('#CurrentPlaylist').scrollTo(playing, 400);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Start playing song
|
|
||||||
var play = $('#CurrentPlaylistContainer tr.selected').first();
|
|
||||||
if (changeTrack(play)) {
|
|
||||||
$(el).find('img').attr('src', 'images/pause_24x32.png');
|
|
||||||
$(el).addClass('playing');
|
|
||||||
} else {
|
|
||||||
var first = $('#CurrentPlaylistContainer tr').first();
|
|
||||||
changeTrack(first);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function changeTrack(next) {
|
|
||||||
var songid = $(next).attr('childid');
|
|
||||||
if (songid !== undefined) {
|
|
||||||
var albumid = $(next).attr('parentid');
|
|
||||||
playSong(next, songid, albumid, 0, false);
|
|
||||||
$('#CurrentPlaylist').scrollTo($('#' + songid), 400); //Scroll to object
|
|
||||||
if (debug) { console.log('Changing Track: songid:' + songid + ', albumid:' + albumid); }
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function autoPlay(loadonly) {
|
|
||||||
if (debug) { console.log('Next Play'); }
|
|
||||||
var song = $('#CurrentPlaylistContainer tr.playing');
|
|
||||||
var nextSong = $('#CurrentPlaylistContainer tr.playing').next();
|
|
||||||
if (song.length == 0) {
|
|
||||||
if (loadonly) {
|
|
||||||
// No songs currently playing, so get first and do not play
|
|
||||||
song = $('#CurrentPlaylistContainer tr.song:first');
|
|
||||||
var songid = $(song).attr('childid');
|
|
||||||
var albumid = $(song).attr('parentid');
|
|
||||||
playSong(song, songid, albumid, 0, true);
|
|
||||||
} else {
|
|
||||||
// No songs currently playing, so get first and play
|
|
||||||
song = $('#CurrentPlaylistContainer tr.song:first');
|
|
||||||
var songid = $(song).attr('childid');
|
|
||||||
var albumid = $(song).attr('parentid');
|
|
||||||
playSong(song, songid, albumid, 0, false);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (nextSong.length == 1) {
|
|
||||||
// Get next song after currently playing
|
|
||||||
song = $('#CurrentPlaylistContainer tr.playing').next();
|
|
||||||
var songid = $(song).attr('childid');
|
|
||||||
var albumid = $(song).attr('parentid');
|
|
||||||
playSong(song, songid, albumid, 0, false);
|
|
||||||
} else {
|
|
||||||
// Otherwise get
|
|
||||||
song = $('#CurrentPlaylistContainer tr.playing');
|
|
||||||
var songid = $(song).attr('childid');
|
|
||||||
var albumid = $(song).attr('parentid');
|
|
||||||
playSong(song, songid, albumid, 0, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,4 +1,23 @@
|
||||||
/* Reusable Functions */
|
/* Reusable Functions */
|
||||||
|
function clickButton(el) {
|
||||||
|
var el = $(el);
|
||||||
|
if (el) {
|
||||||
|
var classes = $(el).attr('class').split(" ");
|
||||||
|
for (var i = 0, l = classes.length; i < l; ++i) {
|
||||||
|
var types = ['shuffle', 'mute'];
|
||||||
|
if (jQuery.inArray(classes[i], types) >= 0) {
|
||||||
|
var up = classes[i] + '_up';
|
||||||
|
if (el.hasClass(up)) {
|
||||||
|
el.removeClass(up);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
el.addClass(up);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
function confirmDelete() {
|
function confirmDelete() {
|
||||||
var question = confirm('Are you sure you want to delete the selected item(s)?');
|
var question = confirm('Are you sure you want to delete the selected item(s)?');
|
||||||
if (question) {
|
if (question) {
|
||||||
|
@ -217,7 +236,7 @@ function hasNotificationPermission() {
|
||||||
return !!(window.webkitNotifications) && (window.webkitNotifications.checkPermission() == 0);
|
return !!(window.webkitNotifications) && (window.webkitNotifications.checkPermission() == 0);
|
||||||
}
|
}
|
||||||
var notifications = new Array();
|
var notifications = new Array();
|
||||||
function showNotification(pic, title, text, type) {
|
function showNotification(pic, title, text, type, bind) {
|
||||||
if (hasNotificationPermission()) {
|
if (hasNotificationPermission()) {
|
||||||
//closeAllNotifications()
|
//closeAllNotifications()
|
||||||
var popup;
|
var popup;
|
||||||
|
@ -226,9 +245,14 @@ function showNotification(pic, title, text, type) {
|
||||||
} else if (type == 'html') {
|
} else if (type == 'html') {
|
||||||
popup = window.webkitNotifications.createHTMLNotification(text);
|
popup = window.webkitNotifications.createHTMLNotification(text);
|
||||||
}
|
}
|
||||||
|
if (bind = '#NextTrack') {
|
||||||
|
popup.addEventListener('click', function () {
|
||||||
|
$(bind).click();
|
||||||
|
})
|
||||||
|
}
|
||||||
notifications.push(popup);
|
notifications.push(popup);
|
||||||
setTimeout(function (notWin) {
|
setTimeout(function (notWin) {
|
||||||
notWin.cancel();
|
notWin.cancel();
|
||||||
}, 10000, popup);
|
}, 10000, popup);
|
||||||
popup.show();
|
popup.show();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
(function ($) {
|
(function (jQuery) {
|
||||||
|
|
||||||
var daysInWeek = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
var daysInWeek = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
||||||
var shortMonthsInYear = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
var shortMonthsInYear = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
shortMonthsToNumber["Nov"] = "11";
|
shortMonthsToNumber["Nov"] = "11";
|
||||||
shortMonthsToNumber["Dec"] = "12";
|
shortMonthsToNumber["Dec"] = "12";
|
||||||
|
|
||||||
$.format = (function () {
|
jQuery.format = (function () {
|
||||||
function strDay(value) {
|
function strDay(value) {
|
||||||
return daysInWeek[parseInt(value, 10)] || value;
|
return daysInWeek[parseInt(value, 10)] || value;
|
||||||
}
|
}
|
||||||
|
@ -84,13 +84,16 @@
|
||||||
var dayOfMonth = null;
|
var dayOfMonth = null;
|
||||||
var dayOfWeek = null;
|
var dayOfWeek = null;
|
||||||
var time = null;
|
var time = null;
|
||||||
if (typeof value.getFullYear === "function") {
|
if (typeof value == "number"){
|
||||||
|
return this.date(new Date(value), format);
|
||||||
|
} else if (typeof value.getFullYear == "function") {
|
||||||
year = value.getFullYear();
|
year = value.getFullYear();
|
||||||
month = value.getMonth() + 1;
|
month = value.getMonth() + 1;
|
||||||
dayOfMonth = value.getDate();
|
dayOfMonth = value.getDate();
|
||||||
dayOfWeek = value.getDay();
|
dayOfWeek = value.getDay();
|
||||||
time = parseTime(value.toTimeString());
|
time = parseTime(value.toTimeString());
|
||||||
} else if (value.search(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.?\d{0,3}[-+]?\d{2}:\d{2}/) != -1) { /* 2009-04-19T16:11:05+02:00 */
|
} else if (value.search(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.?\d{0,3}[Z\-+]?(\d{2}:?\d{2})?/) != -1) {
|
||||||
|
/* 2009-04-19T16:11:05+02:00 || 2009-04-19T16:11:05Z */
|
||||||
var values = value.split(/[T\+-]/);
|
var values = value.split(/[T\+-]/);
|
||||||
year = values[0];
|
year = values[0];
|
||||||
month = values[1];
|
month = values[1];
|
||||||
|
@ -133,6 +136,16 @@
|
||||||
date = new Date(year, month - 1, dayOfMonth);
|
date = new Date(year, month - 1, dayOfMonth);
|
||||||
dayOfWeek = date.getDay();
|
dayOfWeek = date.getDay();
|
||||||
break;
|
break;
|
||||||
|
case 1:
|
||||||
|
/* added by Jonny, for 2012-02-07CET00:00:00 (Doctrine Entity -> Json Serializer) */
|
||||||
|
var values2 = values[0].split("");
|
||||||
|
year=values2[0]+values2[1]+values2[2]+values2[3];
|
||||||
|
month= values2[5]+values2[6];
|
||||||
|
dayOfMonth = values2[8]+values2[9];
|
||||||
|
time = parseTime(values2[13]+values2[14]+values2[15]+values2[16]+values2[17]+values2[18]+values2[19]+values2[20])
|
||||||
|
date = new Date(year, month - 1, dayOfMonth);
|
||||||
|
dayOfWeek = date.getDay();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
@ -140,6 +153,7 @@
|
||||||
|
|
||||||
var pattern = "";
|
var pattern = "";
|
||||||
var retValue = "";
|
var retValue = "";
|
||||||
|
var unparsedRest = "";
|
||||||
/*
|
/*
|
||||||
Issue 1 - variable scope issue in format.date
|
Issue 1 - variable scope issue in format.date
|
||||||
Thanks jakemonO
|
Thanks jakemonO
|
||||||
|
@ -147,6 +161,7 @@
|
||||||
for (var i = 0; i < format.length; i++) {
|
for (var i = 0; i < format.length; i++) {
|
||||||
var currentPattern = format.charAt(i);
|
var currentPattern = format.charAt(i);
|
||||||
pattern += currentPattern;
|
pattern += currentPattern;
|
||||||
|
unparsedRest = "";
|
||||||
switch (pattern) {
|
switch (pattern) {
|
||||||
case "ddd":
|
case "ddd":
|
||||||
retValue += strDay(dayOfWeek);
|
retValue += strDay(dayOfWeek);
|
||||||
|
@ -162,6 +177,13 @@
|
||||||
retValue += dayOfMonth;
|
retValue += dayOfMonth;
|
||||||
pattern = "";
|
pattern = "";
|
||||||
break;
|
break;
|
||||||
|
case "d":
|
||||||
|
if (format.charAt(i + 1) == "d") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
retValue += parseInt(dayOfMonth, 10);
|
||||||
|
pattern = "";
|
||||||
|
break;
|
||||||
case "MMMM":
|
case "MMMM":
|
||||||
retValue += strLongMonth(month);
|
retValue += strLongMonth(month);
|
||||||
pattern = "";
|
pattern = "";
|
||||||
|
@ -183,19 +205,46 @@
|
||||||
retValue += month;
|
retValue += month;
|
||||||
pattern = "";
|
pattern = "";
|
||||||
break;
|
break;
|
||||||
|
case "M":
|
||||||
|
if (format.charAt(i + 1) == "M") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
retValue += parseInt(month, 10);
|
||||||
|
pattern = "";
|
||||||
|
break;
|
||||||
case "yyyy":
|
case "yyyy":
|
||||||
retValue += year;
|
retValue += year;
|
||||||
pattern = "";
|
pattern = "";
|
||||||
break;
|
break;
|
||||||
|
case "yy":
|
||||||
|
if (format.charAt(i + 1) == "y" &&
|
||||||
|
format.charAt(i + 2) == "y") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
retValue += String(year).slice(-2);
|
||||||
|
pattern = "";
|
||||||
|
break;
|
||||||
case "HH":
|
case "HH":
|
||||||
retValue += time.hour;
|
retValue += time.hour;
|
||||||
pattern = "";
|
pattern = "";
|
||||||
break;
|
break;
|
||||||
case "hh":
|
case "hh":
|
||||||
/* time.hour is "00" as string == is used instead of === */
|
/* time.hour is "00" as string == is used instead of === */
|
||||||
retValue += (time.hour == 0 ? 12 : time.hour < 13 ? time.hour : time.hour - 12);
|
var hour = (time.hour == 0 ? 12 : time.hour < 13 ? time.hour : time.hour - 12);
|
||||||
|
hour = String(hour).length == 1 ? '0' + hour : hour;
|
||||||
|
retValue += hour;
|
||||||
pattern = "";
|
pattern = "";
|
||||||
break;
|
break;
|
||||||
|
case "h":
|
||||||
|
if (format.charAt(i + 1) == "h") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var hour = (time.hour == 0 ? 12 : time.hour < 13 ? time.hour : time.hour - 12);
|
||||||
|
retValue += parseInt(hour, 10);
|
||||||
|
// Fixing issue https://github.com/phstc/jquery-dateFormat/issues/21
|
||||||
|
// retValue = parseInt(retValue, 10);
|
||||||
|
pattern = "";
|
||||||
|
break;
|
||||||
case "mm":
|
case "mm":
|
||||||
retValue += time.minute;
|
retValue += time.minute;
|
||||||
pattern = "";
|
pattern = "";
|
||||||
|
@ -231,9 +280,12 @@
|
||||||
pattern = pattern.substring(1, 2);
|
pattern = pattern.substring(1, 2);
|
||||||
} else if ((pattern.length === 3 && pattern.indexOf("yyy") === -1)) {
|
} else if ((pattern.length === 3 && pattern.indexOf("yyy") === -1)) {
|
||||||
pattern = "";
|
pattern = "";
|
||||||
|
} else {
|
||||||
|
unparsedRest = pattern;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
retValue += unparsedRest;
|
||||||
return retValue;
|
return retValue;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
@ -244,20 +296,22 @@
|
||||||
}());
|
}());
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|
||||||
|
jQuery.format.date.defaultShortDateFormat = "dd/MM/yyyy";
|
||||||
|
jQuery.format.date.defaultLongDateFormat = "dd/MM/yyyy hh:mm:ss";
|
||||||
|
|
||||||
$(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
$(".shortDateFormat").each(function (idx, elem) {
|
jQuery(".shortDateFormat").each(function (idx, elem) {
|
||||||
if ($(elem).is(":input")) {
|
if (jQuery(elem).is(":input")) {
|
||||||
$(elem).val($.format.date($(elem).val(), "dd/MM/yyyy"));
|
jQuery(elem).val(jQuery.format.date(jQuery(elem).val(), jQuery.format.date.defaultShortDateFormat));
|
||||||
} else {
|
} else {
|
||||||
$(elem).text($.format.date($(elem).text(), "dd/MM/yyyy"));
|
jQuery(elem).text(jQuery.format.date(jQuery(elem).text(), jQuery.format.date.defaultShortDateFormat));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(".longDateFormat").each(function (idx, elem) {
|
jQuery(".longDateFormat").each(function (idx, elem) {
|
||||||
if ($(elem).is(":input")) {
|
if (jQuery(elem).is(":input")) {
|
||||||
$(elem).val($.format.date($(elem).val(), "dd/MM/yyyy hh:mm:ss"));
|
jQuery(elem).val(jQuery.format.date(jQuery(elem).val(), jQuery.format.date.defaultLongDateFormat));
|
||||||
} else {
|
} else {
|
||||||
$(elem).text($.format.date($(elem).text(), "dd/MM/yyyy hh:mm:ss"));
|
jQuery(elem).text(jQuery.format.date(jQuery(elem).text(), jQuery.format.date.defaultLongDateFormat));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -19,7 +19,7 @@
|
||||||
});
|
});
|
||||||
if (getCookie('CurrentSong')) {
|
if (getCookie('CurrentSong')) {
|
||||||
var currentSong = JSON.parse(getCookie("CurrentSong"));
|
var currentSong = JSON.parse(getCookie("CurrentSong"));
|
||||||
playSong(null, currentSong.songid, currentSong.albumid, currentSong.position, true);
|
getSongData(null, currentSong.songid, currentSong.albumid, currentSong.position, true);
|
||||||
loadCurrentPlaylist();
|
loadCurrentPlaylist();
|
||||||
}
|
}
|
||||||
resizeContent();
|
resizeContent();
|
||||||
|
@ -43,17 +43,20 @@ function resizeContent() {
|
||||||
$('.tabcontent').css({ 'width': tabwidth + 'px' });
|
$('.tabcontent').css({ 'width': tabwidth + 'px' });
|
||||||
}
|
}
|
||||||
var sbheight = $(window).height() - 152;
|
var sbheight = $(window).height() - 152;
|
||||||
$('#SideBar').css({ 'height': (sbheight + 107) + 'px' });
|
var sbwidth = $('#SideBar').width();
|
||||||
|
$('#SideBar').css({ 'height': (sbheight + 104) + 'px' });
|
||||||
$('#ChatMsgs').css({ 'height': (sbheight - 166) + 'px' });
|
$('#ChatMsgs').css({ 'height': (sbheight - 166) + 'px' });
|
||||||
|
$('.status').css({ 'right': (sbwidth + 10) + 'px' });
|
||||||
} else {
|
} else {
|
||||||
var tabwidth = $(window).width() - 58;
|
var tabwidth = $(window).width() - 58;
|
||||||
if (tabwidth >= 300) {
|
if (tabwidth >= 300) {
|
||||||
$('.tabcontent').css({ 'width': tabwidth + 'px' });
|
$('.tabcontent').css({ 'width': tabwidth + 'px' });
|
||||||
|
$('.status').css({ 'right': 4 + 'px' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var tabwidth = $('.tabcontent').width();
|
var tabwidth = $('.tabcontent').width();
|
||||||
$('#AlbumContainer, #TrackContainer, #PodcastContainer, #CurrentPlaylistContainer').css({ 'width': (tabwidth - smwidth - 45) + 'px' });
|
$('#AlbumContainer, #TrackContainer, #PodcastContainer').css({ 'width': (tabwidth - smwidth - 45) + 'px' });
|
||||||
$('#CurrentPlaylistContainer').css({ 'width': (tabwidth - 30) + 'px' });
|
$('#CurrentPlaylistContainer, #VideosContainer').css({ 'width': (tabwidth - 30) + 'px' });
|
||||||
$('#player').css({ 'width': tabwidth + 'px' });
|
$('#player').css({ 'width': tabwidth + 'px' });
|
||||||
}
|
}
|
||||||
function resizeSMSection(x) {
|
function resizeSMSection(x) {
|
||||||
|
|
186
js/ui-ready.js
|
@ -76,27 +76,13 @@
|
||||||
|
|
||||||
// Tabs
|
// Tabs
|
||||||
$('.tabcontent').hide(); //Hide all content
|
$('.tabcontent').hide(); //Hide all content
|
||||||
if (!getCookie('username') && !getCookie('passwordenc') && !getCookie('Server')) {
|
if (!getCookie('username') && !getCookie('passwordenc') && !getCookie('Server')) { // Show Preferences
|
||||||
$('ul.tabs li a').each(function () {
|
|
||||||
if ($(this).attr("href") == '#tabPreferences') {
|
|
||||||
$(this).addClass("active"); //Add "active" class to selected tab
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('#tabPreferences').show(); //Show first tab content
|
|
||||||
loadTabContent('#tabPreferences');
|
loadTabContent('#tabPreferences');
|
||||||
} else {
|
} else {
|
||||||
if (window.location.hash) {
|
if (window.location.hash) {
|
||||||
var hash = window.location.hash;
|
var hash = window.location.hash;
|
||||||
$('ul.tabs li a').each(function () {
|
|
||||||
if ($(this).attr("href") == hash) {
|
|
||||||
$(this).addClass("active"); //Add "active" class to selected tab
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$(hash).show(); //Fade in the active ID content
|
|
||||||
loadTabContent(hash);
|
loadTabContent(hash);
|
||||||
} else {
|
} else {
|
||||||
$("ul.tabs li:first a").addClass("active").show(); //Activate first tab
|
|
||||||
$(".tabcontent:first").show(); //Show first tab content
|
|
||||||
var firstTab = $("ul.tabs li:first a").attr("href");
|
var firstTab = $("ul.tabs li:first a").attr("href");
|
||||||
loadTabContent(firstTab);
|
loadTabContent(firstTab);
|
||||||
}
|
}
|
||||||
|
@ -113,12 +99,11 @@
|
||||||
var currentTab = window.location.hash;
|
var currentTab = window.location.hash;
|
||||||
var activeTab = $(this).attr("href"); //Find the href attribute value to identify the active tab + content
|
var activeTab = $(this).attr("href"); //Find the href attribute value to identify the active tab + content
|
||||||
if (currentTab != activeTab) {
|
if (currentTab != activeTab) {
|
||||||
$("ul.tabs li a").removeClass("active"); //Remove any "active" class
|
if (getCookie('username') && getCookie('passwordenc') && getCookie('Server')) {
|
||||||
$(this).addClass("active"); //Add "active" class to selected tab
|
loadTabContent(activeTab);
|
||||||
$(".tabcontent").hide(); //Hide all tab content
|
}
|
||||||
$(activeTab).fadeIn('fast'); //Fade in the active ID content
|
|
||||||
}
|
}
|
||||||
loadTabContent(activeTab);
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Ajax Loading Screen
|
// Ajax Loading Screen
|
||||||
|
@ -157,25 +142,10 @@
|
||||||
// spacebar
|
// spacebar
|
||||||
} else if (unicode == 32 || unicode == 179 || unicode == 0179) {
|
} else if (unicode == 32 || unicode == 179 || unicode == 0179) {
|
||||||
playPauseSong();
|
playPauseSong();
|
||||||
|
return false;
|
||||||
} else if (unicode == 36 && $('#tabLibrary').is(':visible')) {
|
} else if (unicode == 36 && $('#tabLibrary').is(':visible')) {
|
||||||
$('#Artists').stop().scrollTo('#auto', 400);
|
$('#Artists').stop().scrollTo('#auto', 400);
|
||||||
}
|
}
|
||||||
if (unicode == 189) { // dash
|
|
||||||
if (volume <= 100 && volume > 0 && source == '') {
|
|
||||||
volume += -10;
|
|
||||||
$("#playdesk").jPlayer("volume", volume/100);
|
|
||||||
setCookie('Volume', volume);
|
|
||||||
updateMessage('Volume: ' + volume + '%');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (unicode == 187) { // equals
|
|
||||||
if (volume < 100 && volume >= 0 && source == '') {
|
|
||||||
volume += 10;
|
|
||||||
$("#playdesk").jPlayer("volume", volume / 100);
|
|
||||||
setCookie('Volume', volume);
|
|
||||||
updateMessage('Volume: ' + volume + '%');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -183,8 +153,12 @@
|
||||||
// Albums Click Event
|
// Albums Click Event
|
||||||
$('#MusicFolders').live('change', function () {
|
$('#MusicFolders').live('change', function () {
|
||||||
var folder = $(this).val();
|
var folder = $(this).val();
|
||||||
|
if (folder != 'all') {
|
||||||
|
setCookie('MusicFolders', folder);
|
||||||
|
} else {
|
||||||
|
setCookie('MusicFolders', null);
|
||||||
|
}
|
||||||
loadArtists(folder, true);
|
loadArtists(folder, true);
|
||||||
setCookie('MusicFolders', folder);
|
|
||||||
});
|
});
|
||||||
$('#ArtistContainer li.item').live('click', function () {
|
$('#ArtistContainer li.item').live('click', function () {
|
||||||
$('#AutoAlbumContainer li').removeClass('selected');
|
$('#AutoAlbumContainer li').removeClass('selected');
|
||||||
|
@ -285,12 +259,12 @@
|
||||||
//$(this).addClass('playing').siblings().removeClass('playing');
|
//$(this).addClass('playing').siblings().removeClass('playing');
|
||||||
var songid = $(this).attr('childid');
|
var songid = $(this).attr('childid');
|
||||||
var albumid = $(this).attr('parentid');
|
var albumid = $(this).attr('parentid');
|
||||||
playSong(this, songid, albumid, 0, false);
|
getSongData(this, songid, albumid, 0, false);
|
||||||
});
|
});
|
||||||
$('table.songlist tr.song a.play').live('click', function (event) {
|
$('table.songlist tr.song a.play').live('click', function (event) {
|
||||||
var songid = $(this).parent().parent().attr('childid');
|
var songid = $(this).parent().parent().attr('childid');
|
||||||
var albumid = $(this).parent().parent().attr('parentid');
|
var albumid = $(this).parent().parent().attr('parentid');
|
||||||
if (!$('#tabCurrent').is(':visible')) {
|
if (!$('#tabQueue').is(':visible')) {
|
||||||
$('#CurrentPlaylistContainer tbody').empty();
|
$('#CurrentPlaylistContainer tbody').empty();
|
||||||
var track = $(this).parent().parent();
|
var track = $(this).parent().parent();
|
||||||
$(track).clone().appendTo('#CurrentPlaylistContainer');
|
$(track).clone().appendTo('#CurrentPlaylistContainer');
|
||||||
|
@ -306,9 +280,9 @@
|
||||||
var firstsong = $('#CurrentPlaylistContainer tr.song:first');
|
var firstsong = $('#CurrentPlaylistContainer tr.song:first');
|
||||||
songid = $(firstsong).attr('childid');
|
songid = $(firstsong).attr('childid');
|
||||||
albumid = $(firstsong).attr('parentid');
|
albumid = $(firstsong).attr('parentid');
|
||||||
playSong(firstsong, songid, albumid, 0, false);
|
getSongData(firstsong, songid, albumid, 0, false);
|
||||||
} else {
|
} else {
|
||||||
playSong($(this).parent().parent(), songid, albumid, 0, false);
|
getSongData($(this).parent().parent(), songid, albumid, 0, false);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
@ -393,15 +367,13 @@
|
||||||
$('div.submenu').hide();
|
$('div.submenu').hide();
|
||||||
//setTimeout(function () { if (submenu_active == false) $('div.submenu').stop().fadeOut(); }, 400);
|
//setTimeout(function () { if (submenu_active == false) $('div.submenu').stop().fadeOut(); }, 400);
|
||||||
});
|
});
|
||||||
$('a#action_AddToCurrent').click(function () {
|
$('a#action_AddToQueue').click(function () {
|
||||||
if (!$(this).hasClass('disabled')) {
|
if (!$(this).hasClass('disabled')) {
|
||||||
addToCurrent(false);
|
if ($('#AlbumContainer tr.selected').size() > 0) {
|
||||||
}
|
addToCurrent(false);
|
||||||
return false;
|
} else {
|
||||||
});
|
addToCurrent(true);
|
||||||
$('a#action_AddAllToCurrent').click(function () {
|
}
|
||||||
if (!$(this).hasClass('disabled')) {
|
|
||||||
addToCurrent(true);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
@ -497,7 +469,7 @@
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Current Playlist Click Events
|
// Play Queue Click Events
|
||||||
$('#action_Shuffle').live('click', function () {
|
$('#action_Shuffle').live('click', function () {
|
||||||
$('#CurrentPlaylistContainer tbody tr.song:not(#CurrentPlaylistContainer tbody tr.playing)').shuffle();
|
$('#CurrentPlaylistContainer tbody tr.song:not(#CurrentPlaylistContainer tbody tr.playing)').shuffle();
|
||||||
/* Sets currently playing song first in list after sort
|
/* Sets currently playing song first in list after sort
|
||||||
|
@ -544,8 +516,8 @@
|
||||||
$('#songdetails').click(function (e) {
|
$('#songdetails').click(function (e) {
|
||||||
var source = e.target.nodeName;
|
var source = e.target.nodeName;
|
||||||
var hash = window.location.hash;
|
var hash = window.location.hash;
|
||||||
if (source != 'IMG' && hash != '#tabCurrent') {
|
if (source != 'A' && hash != '#tabQueue') {
|
||||||
$('#action_tabCurrent').click();
|
loadTabContent('#tabQueue');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#songdetails').mouseover(function () {
|
$('#songdetails').mouseover(function () {
|
||||||
|
@ -634,12 +606,16 @@
|
||||||
$('#action_AutoPilot').addClass('selected');
|
$('#action_AutoPilot').addClass('selected');
|
||||||
msg = 'Autopilot On';
|
msg = 'Autopilot On';
|
||||||
var audio = typeof $("#playdeck").data("jPlayer") != 'undefined' ? true : false;
|
var audio = typeof $("#playdeck").data("jPlayer") != 'undefined' ? true : false;
|
||||||
|
var folder = '';
|
||||||
|
if (getCookie('MusicFolders')) {
|
||||||
|
folder = getCookie('MusicFolders')
|
||||||
|
}
|
||||||
if ($('#CurrentPlaylistContainer tbody').html() == '' && !audio) {
|
if ($('#CurrentPlaylistContainer tbody').html() == '' && !audio) {
|
||||||
$('#CurrentPlaylistContainer tbody').empty();
|
$('#CurrentPlaylistContainer tbody').empty();
|
||||||
getRandomSongList('autoplay', '#CurrentPlaylistContainer tbody', '', '');
|
getRandomSongList('autoplay', '#CurrentPlaylistContainer tbody', '', folder);
|
||||||
$('#currentActions a.button').removeClass('disabled');
|
$('#currentActions a.button').removeClass('disabled');
|
||||||
} else {
|
} else {
|
||||||
getRandomSongList('', '#CurrentPlaylistContainer tbody', '', '');
|
getRandomSongList('', '#CurrentPlaylistContainer tbody', '', folder);
|
||||||
$('#currentActions a.button').removeClass('disabled');
|
$('#currentActions a.button').removeClass('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -649,28 +625,47 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
// Playlist Click Events
|
// Playlist Click Events
|
||||||
$('#AutoPlaylistContainer li.item, #FolderContainer li.item').live('click', function () {
|
$('#AutoPlaylistContainer li.item').live('click', function () {
|
||||||
$('#AutoPlaylistContainer li, #FolderContainer li, #PlaylistContainer li').removeClass('selected');
|
$('#AutoPlaylistContainer li, #FolderContainer li, #PlaylistContainer li').removeClass('selected');
|
||||||
$(this).addClass('selected');
|
$(this).addClass('selected');
|
||||||
var genre = $(this).data('genre') !== undefined ? $(this).data('genre') : '';
|
var genre = $(this).data('genre') !== undefined ? $(this).data('genre') : '';
|
||||||
var folder = $(this).data('folder') !== undefined ? $(this).data('folder') : '';
|
var folder = getCookie('MusicFolders') ? getCookie('MusicFolders') : '';
|
||||||
|
$('#playlistActions a.button').addClass('disabled');
|
||||||
getRandomSongList('', '#TrackContainer tbody', genre, folder);
|
getRandomSongList('', '#TrackContainer tbody', genre, folder);
|
||||||
});
|
});
|
||||||
$('#AutoPlaylistContainer li.item a.play, #FolderContainer li.item a.play').live('click', function () {
|
$('#AutoPlaylistContainer li.item a.play').live('click', function () {
|
||||||
var genre = $(this).data('genre') !== undefined ? $(this).data('genre') : '';
|
var genre = $(this).data('genre') !== undefined ? $(this).data('genre') : '';
|
||||||
var folder = $(this).data('folder') !== undefined ? $(this).data('folder') : '';
|
var folder = getCookie('MusicFolders') ? getCookie('MusicFolders') : '';
|
||||||
getRandomSongList('autoplay', '#CurrentPlaylistContainer tbody', genre, folder);
|
getRandomSongList('autoplay', '#CurrentPlaylistContainer tbody', genre, folder);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#AutoPlaylistContainer li.item a.add, #FolderContainer li.item a.add').live('click', function () {
|
$('#AutoPlaylistContainer li.item a.add').live('click', function () {
|
||||||
var genre = $(this).data('genre') !== undefined ? $(this).data('genre') : '';
|
var genre = $(this).data('genre') !== undefined ? $(this).data('genre') : '';
|
||||||
var folder = $(this).data('folder') !== undefined ? $(this).data('folder') : '';
|
var folder = getCookie('MusicFolders') ? getCookie('MusicFolders') : '';
|
||||||
getRandomSongList('', '#CurrentPlaylistContainer tbody', genre, folder);
|
getRandomSongList('', '#CurrentPlaylistContainer tbody', genre, folder);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
$('#FolderContainer li.item').live('click', function () {
|
||||||
|
$('#AutoPlaylistContainer li, #FolderContainer li, #PlaylistContainer li').removeClass('selected');
|
||||||
|
$(this).addClass('selected');
|
||||||
|
var folder = $(this).data('folder') !== undefined ? $(this).data('folder') : '';
|
||||||
|
$('#playlistActions a.button').addClass('disabled');
|
||||||
|
getRandomSongList('', '#TrackContainer tbody', '', folder);
|
||||||
|
});
|
||||||
|
$('#FolderContainer li.item a.play').live('click', function () {
|
||||||
|
var folder = $(this).data('folder') !== undefined ? $(this).data('folder') : '';
|
||||||
|
getRandomSongList('autoplay', '#CurrentPlaylistContainer tbody', '', folder);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$('#FolderContainer li.item a.add').live('click', function () {
|
||||||
|
var folder = $(this).data('folder') !== undefined ? $(this).data('folder') : '';
|
||||||
|
getRandomSongList('', '#CurrentPlaylistContainer tbody', '', folder);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
$('#PlaylistContainer li.item').live('click', function () {
|
$('#PlaylistContainer li.item').live('click', function () {
|
||||||
$('#AutoPlaylistContainer li, #FolderContainer li, #PlaylistContainer li').removeClass('selected');
|
$('#AutoPlaylistContainer li, #FolderContainer li, #PlaylistContainer li').removeClass('selected');
|
||||||
$(this).addClass('selected');
|
$(this).addClass('selected');
|
||||||
|
$('#playlistActions a.button').removeClass('disabled');
|
||||||
getPlaylist($(this).attr("id"), '', '#TrackContainer tbody');
|
getPlaylist($(this).attr("id"), '', '#TrackContainer tbody');
|
||||||
});
|
});
|
||||||
$('#PlaylistContainer li.item a.play').live('click', function () {
|
$('#PlaylistContainer li.item a.play').live('click', function () {
|
||||||
|
@ -691,35 +686,47 @@
|
||||||
loadFolders(true);
|
loadFolders(true);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
$('#action_NewPlaylist').click(function () {
|
||||||
|
newPlaylist();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
$('#action_DeletePlaylist').click(function () {
|
$('#action_DeletePlaylist').click(function () {
|
||||||
if ($('#PlaylistContainer li.selected').length > 0) {
|
if (!$(this).hasClass('disabled')) {
|
||||||
if (confirmDelete()) {
|
if ($('#PlaylistContainer li.selected').length > 0) {
|
||||||
$('#PlaylistContainer li.selected').each(function () {
|
if (confirmDelete()) {
|
||||||
deletePlaylist($(this).attr("id"));
|
$('#PlaylistContainer li.selected').each(function () {
|
||||||
});
|
deletePlaylist($(this).attr("id"));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#action_SavePlaylist').click(function () {
|
$('#action_SavePlaylist').click(function () {
|
||||||
if ($('#PlaylistContainer li.selected').length > 0) {
|
if (!$(this).hasClass('disabled')) {
|
||||||
$('#PlaylistContainer li.selected').each(function () {
|
if ($('#PlaylistContainer li.selected').length > 0) {
|
||||||
savePlaylist($(this).attr("id"));
|
$('#PlaylistContainer li.selected').each(function () {
|
||||||
});
|
savePlaylist($(this).attr("id"));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#action_RemoveSongs').click(function () {
|
$('#action_RemoveSongs').click(function () {
|
||||||
if ($('#TrackContainer tr.selected').length > 0) {
|
if (!$(this).hasClass('disabled')) {
|
||||||
$('#TrackContainer tr.selected').each(function () {
|
if ($('#TrackContainer tr.selected').length > 0) {
|
||||||
$(this).remove();
|
$('#TrackContainer tr.selected').each(function () {
|
||||||
});
|
$(this).remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#action_ShufflePlaylist').live('click', function () {
|
$('#action_ShufflePlaylist').live('click', function () {
|
||||||
$('#TrackContainer thead').find('th').removeClass('sorted ascending descending');
|
if (!$(this).hasClass('disabled')) {
|
||||||
$('#TrackContainer tbody tr.song').shuffle();
|
$('#TrackContainer thead').find('th').removeClass('sorted ascending descending');
|
||||||
|
$('#TrackContainer tbody tr.song').shuffle();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -748,6 +755,19 @@
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Video Click Events
|
||||||
|
$('#VideosContainer tr.video').live('dblclick', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var id = $(this).attr('childid');
|
||||||
|
$(this).find('a.play').click();
|
||||||
|
//var bitrate = $(this).attr('bitrate');
|
||||||
|
//playVideo(id, bitrate);
|
||||||
|
});
|
||||||
|
$('#action_RefreshVideos').click(function () {
|
||||||
|
loadVideos(true);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
// Player Click Events
|
// Player Click Events
|
||||||
$('#NextTrack').live('click', function () {
|
$('#NextTrack').live('click', function () {
|
||||||
var next;
|
var next;
|
||||||
|
@ -792,6 +812,20 @@
|
||||||
$('#audiocontainer .scrubber').mouseout(function (e) {
|
$('#audiocontainer .scrubber').mouseout(function (e) {
|
||||||
$('.audiojs .scrubber').stop().animate({ height: '4px' });
|
$('.audiojs .scrubber').stop().animate({ height: '4px' });
|
||||||
});
|
});
|
||||||
|
$('#action_ShuffleMode').live('click', function () {
|
||||||
|
clickButton(this);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
/*
|
||||||
|
$('#action_Mute').live('click', function () {
|
||||||
|
if (clickButton(this)) {
|
||||||
|
$("#playdeck").jPlayer("mute");
|
||||||
|
} else {
|
||||||
|
$("#playdeck").jPlayer("unmute");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
// Side Bar Click Events
|
// Side Bar Click Events
|
||||||
$('#action_ToggleSideBar').live('click', function () {
|
$('#action_ToggleSideBar').live('click', function () {
|
||||||
|
@ -967,5 +1001,5 @@
|
||||||
$("#TrackContainer tbody").sortable({
|
$("#TrackContainer tbody").sortable({
|
||||||
helper: fixHelper
|
helper: fixHelper
|
||||||
}).disableSelection();
|
}).disableSelection();
|
||||||
}); // End document.ready
|
}); // End document.ready
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "MiniSub",
|
"name": "MiniSub",
|
||||||
"description": "MiniSub - HTML5 Mini Player for Subsonic",
|
"description": "MiniSub - HTML5 Mini Player for Subsonic",
|
||||||
"version": "2.2.7",
|
"version": "2.3.1",
|
||||||
"app": {
|
"app": {
|
||||||
"launch": {
|
"launch": {
|
||||||
"local_path": "index.html"
|
"local_path": "index.html"
|
||||||
|
|
|
@ -14,6 +14,10 @@ a:hover
|
||||||
h3.title {
|
h3.title {
|
||||||
color: #f2f2f2;
|
color: #f2f2f2;
|
||||||
}
|
}
|
||||||
|
span.apiversion
|
||||||
|
{
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
#content
|
#content
|
||||||
{
|
{
|
||||||
|
@ -112,12 +116,12 @@ h3.title {
|
||||||
background: #2E2E2E;
|
background: #2E2E2E;
|
||||||
border: 1px solid #1D1D1D;
|
border: 1px solid #1D1D1D;
|
||||||
}
|
}
|
||||||
#coverart
|
|
||||||
{
|
|
||||||
border: 1px solid #232323;
|
|
||||||
}
|
|
||||||
.vertshade {
|
.vertshade {
|
||||||
background-image: -webkit-gradient( linear, left top, right top, from(rgba(46, 46, 46, 0)), to(rgba(46, 46, 46, 1)));
|
background: -webkit-gradient(linear, left top, right top, from(rgba(46, 46, 46, 0)), to(rgba(46, 46, 46, 1)));
|
||||||
|
}
|
||||||
|
.horizshade
|
||||||
|
{
|
||||||
|
background: -webkit-gradient(linear, center top, center bottom, from(rgba(46, 46, 46, 0)), to(rgba(46, 46, 46, 1)));
|
||||||
}
|
}
|
||||||
#songdetails
|
#songdetails
|
||||||
{
|
{
|
||||||
|
@ -126,10 +130,19 @@ h3.title {
|
||||||
#songdetails.hover
|
#songdetails.hover
|
||||||
{
|
{
|
||||||
border: solid 1px #212121;
|
border: solid 1px #212121;
|
||||||
|
background: -webkit-gradient(linear, center top, center bottom, from(rgba(46, 46, 46, 0)), to(rgba(34, 34, 34, .4)));
|
||||||
}
|
}
|
||||||
#songdetails ul {
|
#songdetails ul {
|
||||||
color: #F2F2F2;
|
color: #F2F2F2;
|
||||||
}
|
}
|
||||||
|
#songdetails a.rate
|
||||||
|
{
|
||||||
|
background-color: #2e2e2e;
|
||||||
|
}
|
||||||
|
#songdetails a.rate:hover
|
||||||
|
{
|
||||||
|
background-color: #2e2e2e;
|
||||||
|
}
|
||||||
/* Button Style */
|
/* Button Style */
|
||||||
a.button {
|
a.button {
|
||||||
color: #6e6e6e;
|
color: #6e6e6e;
|
||||||
|
@ -203,7 +216,8 @@ ul.simplelist li.selected
|
||||||
#BottomContainer
|
#BottomContainer
|
||||||
{
|
{
|
||||||
border-top: 1px solid #F2F2F2;
|
border-top: 1px solid #F2F2F2;
|
||||||
background: #2a2a2a;
|
/*background: #2a2a2a;*/
|
||||||
|
background: rgba(42, 42, 42, .8);
|
||||||
}
|
}
|
||||||
#BottomContainer #BottomIndex li a
|
#BottomContainer #BottomIndex li a
|
||||||
{
|
{
|
||||||
|
@ -229,22 +243,22 @@ table.songlist tr.album td.albumart img
|
||||||
{
|
{
|
||||||
border: 1px solid #232323;
|
border: 1px solid #232323;
|
||||||
}
|
}
|
||||||
table.songlist tr.song {
|
table.songlist tr.row {
|
||||||
border-bottom: 1px solid #232323;
|
border-bottom: 1px solid #232323;
|
||||||
}
|
}
|
||||||
table.songlist tr.song:hover
|
table.songlist tr.row:hover
|
||||||
{
|
{
|
||||||
background: #1d1d1d;
|
background: #1d1d1d;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.album img
|
table.songlist tr.row td.album img
|
||||||
{
|
{
|
||||||
border: 1px solid #232323;
|
border: 1px solid #232323;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.album a
|
table.songlist tr.row td.album a
|
||||||
{
|
{
|
||||||
color: #f2f2f2;
|
color: #f2f2f2;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.album a:hover
|
table.songlist tr.row td.album a:hover
|
||||||
{
|
{
|
||||||
color: #d6d469;
|
color: #d6d469;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|
204
style/Style.css
|
@ -20,6 +20,18 @@ h3.title
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
}
|
}
|
||||||
|
span.alert
|
||||||
|
{
|
||||||
|
color: #6BA2D6;
|
||||||
|
font-size: 12px;
|
||||||
|
margin: 0 0 0 10px;
|
||||||
|
}
|
||||||
|
span.apiversion
|
||||||
|
{
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.border { border: 2px solid #d9d9d9; }
|
.border { border: 2px solid #d9d9d9; }
|
||||||
.floatleft { float: left; }
|
.floatleft { float: left; }
|
||||||
|
@ -404,7 +416,7 @@ table.songlist th
|
||||||
{
|
{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-variant: small-caps;
|
font-variant: small-caps;
|
||||||
padding: 5px 5px 5px 12px;
|
padding: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-bottom: 1px solid #ffffff;
|
border-bottom: 1px solid #ffffff;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
@ -520,17 +532,17 @@ table.songlist tr.album a.favorite
|
||||||
background: url('../images/star_yo_12x12.png') 2px center no-repeat;
|
background: url('../images/star_yo_12x12.png') 2px center no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.songlist tr.song
|
table.songlist tr.row
|
||||||
{
|
{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
border-bottom: 1px solid #f0f0f0;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td
|
table.songlist tr.row td
|
||||||
{
|
{
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding: 9px 10px;
|
padding: 9px 10px;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.itemactions
|
table.songlist tr.row td.itemactions
|
||||||
{
|
{
|
||||||
width: 85px;
|
width: 85px;
|
||||||
padding-left: 26px;
|
padding-left: 26px;
|
||||||
|
@ -538,20 +550,20 @@ table.songlist tr.song td.itemactions
|
||||||
margin: auto 0;
|
margin: auto 0;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.track
|
table.songlist tr.row td.track
|
||||||
{
|
{
|
||||||
width: 80px;
|
width: 80px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.title
|
table.songlist tr.row td.title
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.album
|
table.songlist tr.row td.album
|
||||||
{
|
{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
line-height: 31px;
|
line-height: 31px;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.album a
|
table.songlist tr.row td.album a
|
||||||
{
|
{
|
||||||
color: #829FC0;
|
color: #829FC0;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
@ -560,11 +572,11 @@ table.songlist tr.song td.album a
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.album a:hover
|
table.songlist tr.row td.album a:hover
|
||||||
{
|
{
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.album img
|
table.songlist tr.row td.album img
|
||||||
{
|
{
|
||||||
border: 1px solid #DEDEDE;
|
border: 1px solid #DEDEDE;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -573,14 +585,14 @@ table.songlist tr.song td.album img
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.artist
|
table.songlist tr.row td.artist
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
table.songlist tr.song td.time
|
table.songlist tr.row td.time
|
||||||
{
|
{
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
table.songlist tr.song a.play
|
table.songlist tr.row a.play
|
||||||
{
|
{
|
||||||
float: left;
|
float: left;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
@ -589,11 +601,11 @@ table.songlist tr.song a.play
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background: url('../images/play_gl_6x8.png') no-repeat 7px center;
|
background: url('../images/play_gl_6x8.png') no-repeat 7px center;
|
||||||
}
|
}
|
||||||
table.songlist tr.song a.play:hover
|
table.songlist tr.row a.play:hover
|
||||||
{
|
{
|
||||||
background: url('../images/play_6x8.png') no-repeat 7px center #DEECFB;
|
background: url('../images/play_6x8.png') no-repeat 7px center #DEECFB;
|
||||||
}
|
}
|
||||||
table.songlist tr.song a.download
|
table.songlist tr.row a.download
|
||||||
{
|
{
|
||||||
float: left;
|
float: left;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
@ -601,11 +613,11 @@ table.songlist tr.song a.download
|
||||||
display: block;
|
display: block;
|
||||||
background: url('../images/download_gl_9x12.png') no-repeat 5px center;
|
background: url('../images/download_gl_9x12.png') no-repeat 5px center;
|
||||||
}
|
}
|
||||||
table.songlist tr.song a.download:hover
|
table.songlist tr.row a.download:hover
|
||||||
{
|
{
|
||||||
background: url('../images/download_gd_9x12.png') no-repeat 5px center #DEECFB;
|
background: url('../images/download_gd_9x12.png') no-repeat 5px center #DEECFB;
|
||||||
}
|
}
|
||||||
table.songlist tr.song a.add
|
table.songlist tr.row a.add
|
||||||
{
|
{
|
||||||
float: left;
|
float: left;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
@ -614,11 +626,11 @@ table.songlist tr.song a.add
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background: url('../images/plus_gl_8x8.png') no-repeat 6px center;
|
background: url('../images/plus_gl_8x8.png') no-repeat 6px center;
|
||||||
}
|
}
|
||||||
table.songlist tr.song a.add:hover
|
table.songlist tr.row a.add:hover
|
||||||
{
|
{
|
||||||
background: url('../images/plus_8x8.png') no-repeat 6px center #DEECFB;
|
background: url('../images/plus_8x8.png') no-repeat 6px center #DEECFB;
|
||||||
}
|
}
|
||||||
table.songlist tr.song a.rate
|
table.songlist tr.row a.rate
|
||||||
{
|
{
|
||||||
float: left;
|
float: left;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
@ -627,11 +639,11 @@ table.songlist tr.song a.rate
|
||||||
display: block;
|
display: block;
|
||||||
background: url('../images/star_wo_12x12.png') center 3px no-repeat;
|
background: url('../images/star_wo_12x12.png') center 3px no-repeat;
|
||||||
}
|
}
|
||||||
table.songlist tr.song a.rate:hover
|
table.songlist tr.row a.rate:hover
|
||||||
{
|
{
|
||||||
background: url('../images/star_lgo_12x12.png') center 3px no-repeat;
|
background: url('../images/star_lgo_12x12.png') center 3px no-repeat;
|
||||||
}
|
}
|
||||||
table.songlist tr.song a.favorite
|
table.songlist tr.row a.favorite
|
||||||
{
|
{
|
||||||
float: left;
|
float: left;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
@ -671,7 +683,7 @@ table.songlist tr.selected td.album a
|
||||||
#BottomContainer
|
#BottomContainer
|
||||||
{
|
{
|
||||||
border-top: 1px solid #F2F2F2;
|
border-top: 1px solid #F2F2F2;
|
||||||
background: #fff;
|
background: rgba(255, 255, 255, .8);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
height: 43px;
|
height: 43px;
|
||||||
width: 178px;
|
width: 178px;
|
||||||
|
@ -873,7 +885,7 @@ table.songlist tr.selected td.album a
|
||||||
.audiojs .scrubber
|
.audiojs .scrubber
|
||||||
{
|
{
|
||||||
height: 4px;
|
height: 4px;
|
||||||
margin: 36px 5px 0px 5px;
|
margin: 35px 5px 0px 5px;
|
||||||
float: none;
|
float: none;
|
||||||
width: auto;
|
width: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -925,63 +937,80 @@ table.songlist tr.selected td.album a
|
||||||
}
|
}
|
||||||
.playeractions
|
.playeractions
|
||||||
{
|
{
|
||||||
margin: 16px 12px 0 20px;
|
margin: 16px 12px 7px 20px;
|
||||||
width: 160px;
|
width: 160px;
|
||||||
}
|
}
|
||||||
.playeractionssmall
|
.playeractionssmall
|
||||||
{
|
{
|
||||||
margin: 25px 8px 0 14px;
|
margin: 24px 8px 0 14px;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
#playermiddle
|
#playermiddle
|
||||||
{
|
{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/*visibility: hidden;*/
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
#coverart
|
#coverart
|
||||||
{
|
{
|
||||||
width: 56px;
|
width: 60px;
|
||||||
height: 56px;
|
height: 60px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: 2px 8px 0 0;
|
margin: 1px 8px 0 1px;
|
||||||
float: left;
|
float: left;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
border: 1px solid #DEDEDE;
|
}
|
||||||
|
#songdetails
|
||||||
|
{
|
||||||
|
width: 322px;
|
||||||
|
margin: 2px 6px;
|
||||||
|
float: left;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
#songdetails.hover
|
#songdetails.hover
|
||||||
{
|
{
|
||||||
border: solid 1px gainsboro;
|
border: solid 1px gainsboro;
|
||||||
|
background: -webkit-gradient(linear, center top, center bottom, from(rgba(255, 255, 255, 0)), to(rgba(244, 244, 244, .2)));
|
||||||
}
|
}
|
||||||
#songdetails
|
#songdetails .jp-volume-bar {
|
||||||
{
|
overflow: hidden;
|
||||||
width: 288px;
|
background: #cccccc;
|
||||||
margin: 2px 6px;
|
width: 46px;
|
||||||
float: left;
|
height: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 3px;
|
float: left;
|
||||||
border: 1px solid #fff;
|
margin: 7px 4px 0 0;
|
||||||
|
}
|
||||||
|
#songdetails .jp-volume-bar-value {
|
||||||
|
background-color: #5A5A5A;
|
||||||
|
width: 0px;
|
||||||
|
height: 4px;
|
||||||
}
|
}
|
||||||
#songdetails ul
|
#songdetails ul
|
||||||
{
|
{
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
margin: 6px 0;
|
margin: 4px 0 2px 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 52px;
|
height: 58px;
|
||||||
width: 185px;
|
width: 215px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
#songdetails li
|
#songdetails ul li
|
||||||
{
|
{
|
||||||
|
display: block;
|
||||||
|
height: 14px;
|
||||||
}
|
}
|
||||||
#songdetails li.song
|
#songdetails li.song
|
||||||
{
|
{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
margin: 6px 0 2px 0;
|
margin: 0 0 2px 0;
|
||||||
}
|
}
|
||||||
#songdetails li.album
|
#songdetails li.album
|
||||||
{
|
{
|
||||||
|
@ -992,7 +1021,7 @@ table.songlist tr.selected td.album a
|
||||||
{
|
{
|
||||||
opacity: .6;
|
opacity: .6;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
line-height: 15px;
|
line-height: 14px;
|
||||||
}
|
}
|
||||||
#songdetails li span.label
|
#songdetails li span.label
|
||||||
{
|
{
|
||||||
|
@ -1005,14 +1034,16 @@ table.songlist tr.selected td.album a
|
||||||
#songdetails a.rate
|
#songdetails a.rate
|
||||||
{
|
{
|
||||||
float: left;
|
float: left;
|
||||||
height: 64px;
|
height: 66px;
|
||||||
width: 30px;
|
width: 32px;
|
||||||
display: block;
|
display: block;
|
||||||
background: url('../images/star_wo_12x12.png') 10px center no-repeat;
|
background: url('../images/star_wo_12x12.png') 10px center no-repeat;
|
||||||
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
#songdetails a.rate:hover
|
#songdetails a.rate:hover
|
||||||
{
|
{
|
||||||
background: url('../images/star_lgo_12x12.png') 10px center no-repeat;
|
background: url('../images/star_lgo_12x12.png') 10px center no-repeat;
|
||||||
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
#songdetails a.favorite
|
#songdetails a.favorite
|
||||||
{
|
{
|
||||||
|
@ -1022,14 +1053,82 @@ table.songlist tr.selected td.album a
|
||||||
display: block;
|
display: block;
|
||||||
background: url('../images/star_yo_12x12.png') 10px center no-repeat;
|
background: url('../images/star_yo_12x12.png') 10px center no-repeat;
|
||||||
}
|
}
|
||||||
|
#songdetails a.mute
|
||||||
|
{
|
||||||
|
float: left;
|
||||||
|
margin: 2px;
|
||||||
|
height: 12px;
|
||||||
|
width: 16px;
|
||||||
|
display: block;
|
||||||
|
background: url('../images/volume_mute_gd_12x9.png') 0 center no-repeat;
|
||||||
|
}
|
||||||
|
#songdetails a.unmute
|
||||||
|
{
|
||||||
|
float: left;
|
||||||
|
margin: 2px;
|
||||||
|
height: 12px;
|
||||||
|
width: 16px;
|
||||||
|
display: block;
|
||||||
|
background: url('../images/volume_mute_gl_12x9.png') 0 center no-repeat;
|
||||||
|
}
|
||||||
|
#songdetails a.volume
|
||||||
|
{
|
||||||
|
float: left;
|
||||||
|
margin: 2px;
|
||||||
|
height: 12px;
|
||||||
|
width: 16px;
|
||||||
|
display: block;
|
||||||
|
background: url('../images/volume_gd_12x9.png') 0 center no-repeat;
|
||||||
|
}
|
||||||
|
#songdetails a.shuffle
|
||||||
|
{
|
||||||
|
float: left;
|
||||||
|
margin: 2px;
|
||||||
|
height: 12px;
|
||||||
|
width: 16px;
|
||||||
|
display: block;
|
||||||
|
background: url('../images/loop_alt4_gd_16x12.png') 0 center no-repeat;
|
||||||
|
}
|
||||||
|
#songdetails a.shuffle:hover, #songdetails a.shuffle_up
|
||||||
|
{
|
||||||
|
background: url('../images/loop_alt4_gl_16x12.png') 0 center no-repeat;
|
||||||
|
}
|
||||||
|
#songdetails a.first
|
||||||
|
{
|
||||||
|
margin: 2px 2px 2px 0;
|
||||||
|
}
|
||||||
.vertshade {
|
.vertshade {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 229px;
|
left: 259px;
|
||||||
width: 28px;
|
width: 32px;
|
||||||
height: 62px;
|
height: 66px;
|
||||||
background-image: -webkit-gradient( linear, left top, right top, from(rgba(255, 255, 255, 0)), to(rgba(255, 255, 255, 1)));
|
background-image: -webkit-gradient( linear, left top, right top, from(rgba(255, 255, 255, 0)), to(rgba(255, 255, 255, 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Video */
|
||||||
|
#videodeck
|
||||||
|
{
|
||||||
|
position: relative;
|
||||||
|
margin: 0 auto;
|
||||||
|
z-index:1002;
|
||||||
|
}
|
||||||
|
.darkoverlay
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 0%;
|
||||||
|
left: 0%;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: black;
|
||||||
|
z-index:1001;
|
||||||
|
-moz-opacity: 0.8;
|
||||||
|
opacity:.80;
|
||||||
|
filter: alpha(opacity=80);
|
||||||
|
}
|
||||||
|
/* Settings */
|
||||||
ul.preferences
|
ul.preferences
|
||||||
{
|
{
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
@ -1149,15 +1248,16 @@ a.button img.pad { margin: 1px 0 -1px 0; }
|
||||||
/* Scrollbar Style */
|
/* Scrollbar Style */
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 12px;
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
}
|
}
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
-webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
|
-webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
|
||||||
-webkit-border-radius: 12px;
|
-webkit-border-radius: 10px;
|
||||||
border-radius: 12px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
-webkit-border-radius: 12px;
|
-webkit-border-radius: 10px;
|
||||||
border-radius: 12px;
|
border-radius: 10px;
|
||||||
background: rgba(237, 237, 237, 0.4);
|
background: rgba(237, 237, 237, 0.4);
|
||||||
-webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
|
-webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
|
||||||
}
|
}
|
||||||
|
|