mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-21 00:14:02 +01:00
Albums Grid
*Added CTRL + LMOUSE click on albums to select.
This commit is contained in:
@@ -8,11 +8,11 @@
|
|||||||
<%def name="body()">
|
<%def name="body()">
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('#menu_link_getextra').click(function() {
|
$('#getExtras').click(function() {
|
||||||
$('#dialog').dialog();
|
$('#dialog').dialog();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#menu_link_modifyextra').click(function() {
|
$('#modifyExtras').click(function() {
|
||||||
$('#dialog').dialog();
|
$('#dialog').dialog();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -23,7 +23,8 @@
|
|||||||
<input type="hidden" name="ArtistID" value="${artist['ArtistID']}">
|
<input type="hidden" name="ArtistID" value="${artist['ArtistID']}">
|
||||||
<input type="hidden" name="newstyle" value="true">
|
<input type="hidden" name="newstyle" value="true">
|
||||||
%for extra in extras:
|
%for extra in extras:
|
||||||
<input type="checkbox" id="${extra}" name="${extra}" value="1" ${extras[extra]} />${string.capwords(extra)}<br>
|
<input type="checkbox" id="${extra}" name="${extra}" value="1" ${extras[extra]} />
|
||||||
|
<label for="${extra}">${string.capwords(extra)}</label><br />
|
||||||
%endfor
|
%endfor
|
||||||
<br>
|
<br>
|
||||||
<input id="submit" type="submit" value="Fetch Extras">
|
<input id="submit" type="submit" value="Fetch Extras">
|
||||||
@@ -41,9 +42,9 @@
|
|||||||
%endif
|
%endif
|
||||||
%if artist['IncludeExtras']:
|
%if artist['IncludeExtras']:
|
||||||
<li><a href="removeExtras?ArtistID=${artist['ArtistID']}">Remove Extras</a></li>
|
<li><a href="removeExtras?ArtistID=${artist['ArtistID']}">Remove Extras</a></li>
|
||||||
<li><a class="menu_link_edit" href="#">Modify Extras</a></li>
|
<li><a id="modifyExtras" href="#">Modify Extras</a></li>
|
||||||
%else:
|
%else:
|
||||||
<li><a id="menu_link_getextra" href="#">Get Extras</a></li>
|
<li><a id="getExtras" href="#">Get Extras</a></li>
|
||||||
%endif
|
%endif
|
||||||
</ul>
|
</ul>
|
||||||
<ul id="nav-view">
|
<ul id="nav-view">
|
||||||
@@ -73,13 +74,14 @@
|
|||||||
<option value="Downloaded">Downloaded</option>
|
<option value="Downloaded">Downloaded</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="GO">
|
<input type="submit" value="GO">
|
||||||
|
<small><span class="wsr Tag"></span> Click CTRL + LMOUSE on albums to select.</small>
|
||||||
</p>
|
</p>
|
||||||
<div id="gridView">
|
<div id="gridView">
|
||||||
%for album in albums:
|
%for album in albums:
|
||||||
<%
|
<%
|
||||||
%>
|
%>
|
||||||
<div class="image-container">
|
<div class="image-container">
|
||||||
<div class="image-box ${album['Status']}">
|
<div class="image-box">
|
||||||
<div class="image-tag ${album['Status']}"></div>
|
<div class="image-tag ${album['Status']}"></div>
|
||||||
<img />
|
<img />
|
||||||
<div class="image-actions">
|
<div class="image-actions">
|
||||||
@@ -98,7 +100,7 @@
|
|||||||
|
|
||||||
<div class="image-info">
|
<div class="image-info">
|
||||||
<b style="display: none;">${artist['ArtistName']}</b>
|
<b style="display: none;">${artist['ArtistName']}</b>
|
||||||
<span><a href="albumPage?AlbumID=${album['AlbumID']}" title="${album['AlbumID']}">${album['AlbumTitle']}</a></span>
|
<span><a class="image-url" href="albumPage?AlbumID=${album['AlbumID']}" title="${album['AlbumID']}">${album['AlbumTitle']}</a></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
%endfor
|
%endfor
|
||||||
@@ -194,6 +196,19 @@
|
|||||||
<%def name="javascriptIncludes()">
|
<%def name="javascriptIncludes()">
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
$(".image-box").click(function(evt) {
|
||||||
|
if (evt.ctrlKey)
|
||||||
|
{
|
||||||
|
var input = $(this).find('.image-select');
|
||||||
|
if( $(input).is(':checked') ){
|
||||||
|
$(input).attr('checked', false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$(input).attr('checked', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//Load Art
|
//Load Art
|
||||||
getAlbumArt();
|
getAlbumArt();
|
||||||
getArtistArt();
|
getArtistArt();
|
||||||
|
|||||||
@@ -430,12 +430,8 @@ table#album_table td#albumart { vertical-align: middle; text-align: left; }
|
|||||||
height: 126px;
|
height: 126px;
|
||||||
width: 126px;
|
width: 126px;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 0 6px #000;
|
|
||||||
-moz-box-shadow: 0 0 6px #000;
|
|
||||||
-webkit-box-shadow: 0 0 6px #000;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
.image-container .image-box img {
|
.image-container .image-box img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -445,20 +441,22 @@ table#album_table td#albumart { vertical-align: middle; text-align: left; }
|
|||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-container input {
|
.image-container .image-box input {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
z-index: 2;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: right;
|
text-align: center;
|
||||||
|
box-shadow: 0px 0px 10px rgb(0,0,0);
|
||||||
|
-moz-box-shadow: 0px 0px 10px rgb(0,0,0);
|
||||||
|
-webkit-box-shadow: 0px 0px 10px rgb(0,0,0);
|
||||||
|
-o-box-shadow: 0px 0px 10px rgb(0,0,0);
|
||||||
}
|
}
|
||||||
.image-container input:checked {
|
.image-container .image-box input:checked {
|
||||||
content: "";
|
box-shadow: 0px 0px 10px rgb(0,145,255);
|
||||||
background: rgba(0,0,0,0.1);
|
-moz-box-shadow: 0px 0px 10px rgb(0,145,255);
|
||||||
box-shadow: 0 0 10px rgb(0,145,255);
|
-webkit-box-shadow: 0px 0px 10px rgb(0,145,255);
|
||||||
-moz-box-shadow: 0 0 10px rgb(0,145,255);
|
-0-box-shadow: 0px 0px 10px rgb(0,145,255);
|
||||||
-webkit-box-shadow: 0 0 10px rgb(0,145,255);
|
|
||||||
}
|
}
|
||||||
.image-container .image-actions {
|
.image-container .image-actions {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ function getArtistInfo(name,imgElem,size,artistID) {
|
|||||||
} else {
|
} else {
|
||||||
if ( data.artist === undefined || imageUrl == "" || imageUrl == undefined ) {
|
if ( data.artist === undefined || imageUrl == "" || imageUrl == undefined ) {
|
||||||
var imageLarge = "#";
|
var imageLarge = "#";
|
||||||
var imageUrl = "interfaces/brink/images/no-cover-artist.png";
|
var imageUrl = "interfaces/brink/images/no-artist-art.png";
|
||||||
} else {
|
} else {
|
||||||
var artist = data.artist.mbid;
|
var artist = data.artist.mbid;
|
||||||
var artistBio = data.artist.bio.summary;
|
var artistBio = data.artist.bio.summary;
|
||||||
@@ -42,7 +42,7 @@ function getArtistInfo(name,imgElem,size,artistID) {
|
|||||||
}
|
}
|
||||||
if ( data.artist === undefined || imageUrl == "" ) {
|
if ( data.artist === undefined || imageUrl == "" ) {
|
||||||
var imageLarge = "#";
|
var imageLarge = "#";
|
||||||
var imageUrl = "interfaces/brink/images/no-cover-artist.png";
|
var imageUrl = "interfaces/brink/images/no-artist-art.png";
|
||||||
} else {
|
} else {
|
||||||
var artist = data.artist.name;
|
var artist = data.artist.name;
|
||||||
var artistBio = data.artist.bio.summary;
|
var artistBio = data.artist.bio.summary;
|
||||||
@@ -101,7 +101,7 @@ function getAlbumInfo(name, album, elem,size) {
|
|||||||
$(elem).css("background", "url("+ imageUrl+")");
|
$(elem).css("background", "url("+ imageUrl+")");
|
||||||
}
|
}
|
||||||
$(elem).css("background", "url("+ imageUrl+") center top no-repeat");
|
$(elem).css("background", "url("+ imageUrl+") center top no-repeat");
|
||||||
$(elem).wrap('<a href="'+ imageLarge +'" rel="dialog" title="' + name + '"></a>');
|
//$(elem).wrap('<a href="'+ imageLarge +'" rel="dialog" title="' + name + '"></a>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user