small gui changes
This commit is contained in:
parent
ed0db217c9
commit
e082628cf6
@ -87,7 +87,7 @@
|
||||
display: none;
|
||||
}
|
||||
.header-breakpoint.ui-grid-b .ui-block-c {
|
||||
width: 35%;
|
||||
width: 33%;
|
||||
}
|
||||
/*playlists*/
|
||||
.pl-breakpoint .ui-block-a, .pl-breakpoint .ui-block-b {
|
||||
@ -100,8 +100,14 @@
|
||||
/*controls*/
|
||||
#btcontrols {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* phone portrait */
|
||||
@media all and (max-width: 20em) {
|
||||
.header-breakpoint.ui-grid-b .ui-block-c {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***********
|
||||
@ -150,7 +156,6 @@
|
||||
color: #ddd;
|
||||
font-size: 14px;
|
||||
text-shadow: 1px 1px #555;
|
||||
/* border: 1px solid white; */
|
||||
}
|
||||
|
||||
#songinfo {
|
||||
@ -179,7 +184,6 @@
|
||||
width: 36px;
|
||||
heigth: 36px;
|
||||
margin-right: 5px;
|
||||
/* border: 1px solid #666; */
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<link href="css/ws.css" rel="stylesheet">
|
||||
<script type="text/javascript" src="/mopidy/mopidy.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="css/add2home.css">
|
||||
<!-- <link rel="stylesheet" href="css/add2home.css"> -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -106,7 +106,7 @@
|
||||
|
||||
<div id="songinfo" class=" ui-block-b">
|
||||
<a href="#controlsmodal" data-position-to="window" data-rel="popup">
|
||||
<img id="infocover" width="36" height="36"></img> <div id="infoname"></div> <div id="infoartist"></div> </a>
|
||||
<img id="infocover" src="images/icons/cd_32x32.png" width="36" height="36"></img> <div id="infoname"></div> <div id="infoartist"></div> </a>
|
||||
</div>
|
||||
|
||||
<div id="slidercontainer" class="ui-block-c">
|
||||
@ -124,7 +124,6 @@
|
||||
</div>
|
||||
<div class="ui-block-b" id="playlisttablediv">
|
||||
<ul data-role="listview" data-theme="c" data-icon="false" id="playlisttable" data-inset="true" data-filter="true"></ul>
|
||||
<img src="images/loader.gif" id="playlistloader" class= "loader" />
|
||||
</div>
|
||||
|
||||
</div><!--/playlistspane-->
|
||||
@ -132,7 +131,6 @@
|
||||
<div data-role="content" class="pane" id="currentpane">
|
||||
<h4>Play Queue</h4>
|
||||
<ul data-role="listview" data-icon="false" data-theme="d" data-inset="true" id="currenttable"></ul>
|
||||
<img src="images/loader.gif" id="currentloader" class= "loader" />
|
||||
</div>
|
||||
|
||||
<div data-role="content" class="pane" id="albumspane">
|
||||
@ -140,7 +138,6 @@
|
||||
<h3 id="h_albumname"></h3>
|
||||
<h5 id="h_albumartist"></h5>
|
||||
<ul data-role="listview" data-icon="false" data-inset="true" id="albumstable"></ul>
|
||||
<img src="images/loader.gif" id="albumsloader" class= "loader" />
|
||||
</div>
|
||||
|
||||
<div data-role="content" class="pane" id="artistspane">
|
||||
@ -148,7 +145,6 @@
|
||||
<a href="#artistpopup" data-position-to="window" data-rel="popup"><img height="90" src="" id="artistviewimage" /></a>
|
||||
<h3 id="h_artistname"></h3>
|
||||
<ul data-role="listview" data-icon="false" data-inset="true" id="artiststable"></ul>
|
||||
<img src="images/loader.gif" id="artistsloader" class="loader" />
|
||||
</div>
|
||||
|
||||
<div data-role="content" class="pane" id="searchpane">
|
||||
@ -159,7 +155,6 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<img src="images/loader.gif" id="allresultloader" class= "loader" />
|
||||
|
||||
<div id="searchresults">
|
||||
<div class="ui-grid-a srch-breakpoint">
|
||||
@ -205,7 +200,7 @@
|
||||
</div><!-- /page one -->
|
||||
|
||||
<script src="js/jquery.truncate.min.js"></script>
|
||||
<script type="text/javascript" src="js/add2home.js" charset="utf-8"></script>
|
||||
<!-- <script type="text/javascript" src="js/add2home.js" charset="utf-8"></script> -->
|
||||
<script src="js/controls.js"></script>
|
||||
<script src="js/library.js"></script>
|
||||
<script src="js/functionsvars.js"></script>
|
||||
|
||||
9
webclient/js/controls.js
vendored
9
webclient/js/controls.js
vendored
@ -4,30 +4,32 @@
|
||||
function playTrack(addtobottom) {
|
||||
$('#popupTracks').popup('close');
|
||||
$('#controlsmodal').popup('close');
|
||||
showLoading(true);
|
||||
|
||||
//function playtrack(uri, playlisturi) {
|
||||
playlisturi = $('#popupTracks').data("list");
|
||||
uri = $('#popupTracks').data("track");
|
||||
var trackslist = new Array();
|
||||
var track;
|
||||
switchContent('current', uri);
|
||||
var tracks = getTracksFromUri(playlisturi);
|
||||
|
||||
if (tracks) {
|
||||
if (!addtobottom) {
|
||||
mopidy.playback.stop(true);
|
||||
mopidy.tracklist.clear();
|
||||
}
|
||||
mopidy.tracklist.add(tracks);
|
||||
$(CURRENT_PLAYLIST_TABLE).empty();
|
||||
} else {
|
||||
tracks = currentplaylist;
|
||||
mopidy.playback.stop(true);
|
||||
}
|
||||
|
||||
if (addtobottom) {
|
||||
showLoading(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
mopidy.playback.stop(true);
|
||||
switchContent('current', uri);
|
||||
|
||||
for (var i = 0; i < tracks.length; i++) {
|
||||
if (tracks[i].uri == uri) {
|
||||
@ -39,6 +41,7 @@ function playTrack(addtobottom) {
|
||||
mopidy.playback.next();
|
||||
}
|
||||
mopidy.playback.play();
|
||||
showLoading(false);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -172,12 +172,13 @@ function resultsToTables(results, target, uri) {
|
||||
}
|
||||
html += ' / <em>' + newalbum[0].album.name + '</em></p>';
|
||||
html += '</a></li>';
|
||||
popupData[newalbum[0].uri] = newalbum[0];
|
||||
newalbum = [];
|
||||
|
||||
} else {
|
||||
html += '<li data-role="list-divider" data-theme="d"><a href="#" onclick="return showAlbum(\'' + results[i].album.uri + '\');">';
|
||||
html += '<img id="' + targetmin + '-cover-' + i + '" class="artistcover" width="30" height="30" />';
|
||||
html += '<p>' + results[i].album.name + '</p><p>';
|
||||
html += '<p><em>' + results[i].album.name + '</em></p><p>';
|
||||
for ( j = 0; j < results[i].album.artists.length; j++) {
|
||||
html += results[i].album.artists[j].name;
|
||||
html += (j == results[i].album.artists.length - 1) ? '' : ' / ';
|
||||
|
||||
@ -25,26 +25,22 @@ function expandSonginfo() {
|
||||
|
||||
function resizeSonginfo() {
|
||||
$("#infoname").html(songname);
|
||||
if ((artiststext.length > 83) || (songname.length > 43)) {
|
||||
$("#infoartist").html(artiststext);
|
||||
//bug in truncate?
|
||||
var spanwidth = $("#infoartist").width() - 38;
|
||||
$("#infoname").truncate({
|
||||
width : spanwidth,
|
||||
token : '…',
|
||||
center : true,
|
||||
multiline : false
|
||||
});
|
||||
$("#infoartist").truncate({
|
||||
width : spanwidth,
|
||||
token : '…',
|
||||
center : true,
|
||||
multiline : false
|
||||
});
|
||||
$("#infoartist").html('<a href="#controlsmodal" data-rel="popup">' + $("#infoartist").html() + '</a>');
|
||||
} else {
|
||||
$("#infoartist").html(artiststext);
|
||||
}
|
||||
$("#infoartist").html(artiststext);
|
||||
//bug in truncate?
|
||||
var spanwidth = $("#infoartist").width() - 38;
|
||||
$("#infoname").truncate({
|
||||
width : spanwidth,
|
||||
token : '…',
|
||||
center : true,
|
||||
multiline : false
|
||||
});
|
||||
$("#infoartist").truncate({
|
||||
width : spanwidth,
|
||||
token : '…',
|
||||
center : true,
|
||||
multiline : false
|
||||
});
|
||||
$("#infoartist").html('<a href="#controlsmodal" data-rel="popup">' + $("#infoartist").html() + '</a>');
|
||||
}
|
||||
|
||||
function setSongInfo(data) {
|
||||
@ -282,6 +278,9 @@ $(document).ready(function() {
|
||||
$("#btback").hide();
|
||||
}
|
||||
|
||||
$(window).resize(function() {
|
||||
resizeSonginfo();
|
||||
});
|
||||
});
|
||||
|
||||
/************************
|
||||
|
||||
Loading…
Reference in New Issue
Block a user