mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-03 02:09:28 +01:00
Upgraded all JavaScript libraries. Moved UI parts from default interface to global. Fixed JavaScript Errors
This commit is contained in:
@@ -68,25 +68,30 @@ function getInfo(elem,id,type) {
|
||||
}
|
||||
|
||||
function getImageLinks(elem,id,type) {
|
||||
|
||||
if ( type == 'artist' ) {
|
||||
var infoURL = "getImageLinks?ArtistID=" + id;
|
||||
} else {
|
||||
var infoURL = "getImageLinks?AlbumID=" + id;
|
||||
}
|
||||
|
||||
// Get Data from the cache by ID
|
||||
$.ajax({
|
||||
url: infoURL,
|
||||
cache: true,
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
if ( data.thumbnail == "" || data.thumbnail == undefined ) {
|
||||
if (!data) {
|
||||
// Invalid response
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.thumbnail) {
|
||||
var thumbnail = "interfaces/default/images/no-cover-artist.png";
|
||||
}
|
||||
else {
|
||||
var thumbnail = data.thumbnail;
|
||||
}
|
||||
if ( data.artwork == "" || data.artwork == undefined ) {
|
||||
if (!data.artwork) {
|
||||
var artwork = "interfaces/default/images/no-cover-artist.png";
|
||||
}
|
||||
else {
|
||||
@@ -359,12 +364,6 @@ function resetFilters(text){
|
||||
}
|
||||
}
|
||||
|
||||
function preventDefault(){
|
||||
$("a[href='#']").live('click', function(){
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function initFancybox() {
|
||||
if ( $("a[rel=dialog]").length > 0 ) {
|
||||
$.getScript('interfaces/default/js/fancybox/jquery.fancybox-1.3.4.js', function() {
|
||||
@@ -374,11 +373,6 @@ function initFancybox() {
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
initHeader();
|
||||
preventDefault();
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
init();
|
||||
initHeader();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user