mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 20:21:37 +00:00
Empty commit
This commit is contained in:
parent
de9865a4f2
commit
483730e755
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
$artist_id = $_GET["id"];
|
||||
$artist_limit = $_GET["limit"];
|
||||
|
||||
$DB->query("
|
||||
SELECT
|
||||
@ -13,7 +14,7 @@
|
||||
JOIN artists_group AS ag ON ag.ArtistID=s2.ArtistID
|
||||
WHERE s1.ArtistID=".$artist_id."
|
||||
ORDER BY ass.Score DESC
|
||||
LIMIT 14");
|
||||
LIMIT $artist_limit");
|
||||
|
||||
|
||||
while(list($ArtistID, $Name, $Score) = $DB->next_record(MYSQLI_NUM, false)){
|
||||
|
@ -803,7 +803,7 @@ function compare($X, $Y){
|
||||
<div id="similar_artist_map" class="box">
|
||||
<div id="flipper_head" class="head">
|
||||
<strong id="flipper_title">Similar Artist Map</strong>
|
||||
<a id="flip_to" href="#null" onclick="flipView();"></a>
|
||||
<a id="flip_to" href="#null" onclick="flipView();"> [Switch to Cloud]</a>
|
||||
</div>
|
||||
<div id="flip_view_1" style="display:block;width:<?=WIDTH?>px;height:<?=HEIGHT?>px;position:relative;background-image:url(static/similar/<?=$ArtistID?>.png?t=<?=time()?>)">
|
||||
<?
|
||||
|
@ -1,5 +1,6 @@
|
||||
(function($) {
|
||||
|
||||
var LIMIT = 10;
|
||||
var artistId, artistName;
|
||||
var artistTags;
|
||||
$(document).ready(function() {
|
||||
@ -17,11 +18,17 @@ function initArtistCloud() {
|
||||
|
||||
|
||||
function loadArtists() {
|
||||
$.getJSON('ajax.php?action=similar_artists&id='+artistId, function(data) {
|
||||
var items = [];
|
||||
|
||||
$.each(data, function(key, val) {
|
||||
addArtist(val['id'], val['name'], val['score']);
|
||||
$.getJSON('ajax.php?action=similar_artists&id='+artistId+'&limit='+LIMIT, function(data) {
|
||||
var first = true;
|
||||
var ratio;
|
||||
$.each(data, function(key, val) {
|
||||
if(first) {
|
||||
ratio = val['score'] / 300;
|
||||
first = false;
|
||||
}
|
||||
var score = val['score'] / ratio;
|
||||
score = score <= 150 ? 150 : score;
|
||||
addArtist(val['id'], val['name'], score);
|
||||
});
|
||||
|
||||
createCloud();
|
||||
@ -30,8 +37,7 @@ function loadArtists() {
|
||||
}
|
||||
|
||||
function addArtist(id, name, score) {
|
||||
var item = $('<li><a data-weight="' + score + '">' + name + '</a></li>');
|
||||
// var item = $('<li><a class="green large">' + name + '</a></li>');
|
||||
var item = $('<li><a style="color:#007DC6;" data-weight="' + score + '">' + name + '</a></li>');
|
||||
|
||||
|
||||
$(item).click(function(e) {
|
||||
@ -44,9 +50,7 @@ function addArtist(id, name, score) {
|
||||
}
|
||||
|
||||
function addArtistMain(name) {
|
||||
var item = $('<li><a data-weight="350">' + name + '</a></li>');
|
||||
|
||||
// var item = $('<li><a class="red large">' + name + '</a></li>');
|
||||
var item = $('<li><a style="color:#007DC6;" data-weight="350">' + name + '</a></li>');
|
||||
|
||||
$("#currentArtist").attr('href', 'artist.php?id=' + artistId);
|
||||
$("#currentArtist").text(artistName);
|
||||
|
Loading…
Reference in New Issue
Block a user