minor fixes
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
module ApplicationHelper
|
||||
|
||||
def validate_img_url image, size
|
||||
|
||||
if image.nil?
|
||||
"noImage"
|
||||
else
|
||||
image.each do |img|
|
||||
if img["size"] == size.to_s
|
||||
return img["#text"]
|
||||
image.each do |img|
|
||||
if img["size"] == size.to_s
|
||||
if img["#text"].empty?
|
||||
return "/images/placeholder/artist.png"
|
||||
end
|
||||
return img["#text"]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -10,8 +10,11 @@
|
||||
.active#search_all
|
||||
#search_all_artists
|
||||
%ul.artists
|
||||
- count = 0
|
||||
- @resultsArtists.artistmatches.artist.each_with_index do |artist, i|
|
||||
- break if i == 6
|
||||
- break if (i >= 6 && count >= 6)
|
||||
- next unless artist.listeners.to_i > 15
|
||||
- count += 1
|
||||
%li
|
||||
= link_to "LINK" do
|
||||
= image_tag validate_img_url(artist.image, :large)
|
||||
@@ -45,8 +48,12 @@
|
||||
%sub
|
||||
#search_artists
|
||||
%ul.artists
|
||||
- count = 0
|
||||
- @resultsArtists.artistmatches.artist.each_with_index do |artist, i|
|
||||
- break if i == 18
|
||||
- break if (i >= 18 && count >= 18)
|
||||
- next unless artist.listeners.to_i > 15
|
||||
- count += 1
|
||||
|
||||
%li
|
||||
= link_to "LINK" do
|
||||
= image_tag validate_img_url(artist.image, :large)
|
||||
|
||||
Vendored
+4
-2
@@ -1,7 +1,9 @@
|
||||
$(window).load(function() {
|
||||
$(function() {
|
||||
$(".artists li:nth-child(6n)").css("marginRight", 0);
|
||||
$(".songs.tab li:nth-child(2n)").css("marginRight", 0);
|
||||
|
||||
});
|
||||
|
||||
$(window).load(function() {
|
||||
|
||||
$("ul[steering] li").live("click", function(){
|
||||
$(this).parent().children().each(function(){
|
||||
|
||||
Reference in New Issue
Block a user