diff --git a/.playbot_database_dump.sql.swp b/.playbot_database_dump.sql.swp new file mode 100644 index 0000000000000000000000000000000000000000..8efbe05eabd9b793368801145a424e2af6b30313 Binary files /dev/null and b/.playbot_database_dump.sql.swp differ diff --git a/app/assets/javascripts/music_player.js b/app/assets/javascripts/music_player.js index 63d0ab5ecd87d3352e6f810f4647bbb8559c7def..7f57305f8c962dda219c7d0c5e6f6c0c740544d7 100644 --- a/app/assets/javascripts/music_player.js +++ b/app/assets/javascripts/music_player.js @@ -17,6 +17,11 @@ $("a").on( 'click', function(event){ event.stopPropagation(); }); +$( document ).ready(function () { + if ($(location).attr("hash") == "#autoplay=on") { + $(".clickable_links").first().trigger('click'); + } +}); function youtube_click() { music_info = $(this); @@ -52,11 +57,10 @@ function youtube_player() { function next_music() { music_info = $("li[data-id=\'"+music_info.data().id+"\']").next(); if (music_info.length == 0) { - - window.location.href = $(".next a").attr('href'); - - //setTimeout($(".clickable_links").first().trigger("click"),2000); - //console.log($(".clickable_links").first()); + next_page = $(".next a").attr('href') + if ( next_page.length != 0 ){ + window.location.href = next_page+"#autoplay=on"; + } } if (music_info.data().player == "youtube" ) { youtube_player(); @@ -141,9 +145,8 @@ function soundcloud_player() { setTimeout(soundcloud_listener, 2000 ); } }); - - var white_top = $("#header").height(); - $("#white").css({'height':white_top}).slideDown(); + + $("#white").css({'height':68+player_height}).slideDown(); player_min = 20; player_max = 120; } diff --git a/app/assets/stylesheets/.music_index.css.swp b/app/assets/stylesheets/.music_index.css.swp index ba4e1e690d16628d0ff3ab8693514058f9f78121..7e67096eb612efdee07df41e8f95a8d3362a5a21 100644 Binary files a/app/assets/stylesheets/.music_index.css.swp and b/app/assets/stylesheets/.music_index.css.swp differ diff --git a/app/assets/stylesheets/music_index.css b/app/assets/stylesheets/music_index.css index e2ec1d384204308445cc44b52012e7238289ec95..cee5237f5a035f8945c9789db9efd3fda1b0e3f0 100644 --- a/app/assets/stylesheets/music_index.css +++ b/app/assets/stylesheets/music_index.css @@ -38,9 +38,8 @@ ul .clickable_links { - /*0 110 140 0.8*/ background-color: rgba(0, 110, 140, 1); - margin: 2px; + margin: 2px 10px; cursor: pointer; padding: 10px 0; border-radius: 12px; @@ -59,11 +58,13 @@ ul color: rgba(0, 110, 140, 0.95); } -.clickable_links:hover{ - background-color: rgba(0, 110, 140, 0.8); +#on_play{ + background-color: rgba(0,70,100,1); + margin-left: 20px; + margin-right: 0; } -#on_play { +.clickable_links:hover{ background-color: rgba(0, 110, 140, 0.8); } diff --git a/app/assets/javascripts/.music_player.js.swo b/app/views/shared/._music.html.erb.swp similarity index 54% rename from app/assets/javascripts/.music_player.js.swo rename to app/views/shared/._music.html.erb.swp index a1c8aa8500088941548c92fbbd3ffa219f5ba17d..90d9d4cd893e547b9d9fc4f32775895694c76012 100644 Binary files a/app/assets/javascripts/.music_player.js.swo and b/app/views/shared/._music.html.erb.swp differ diff --git a/app/views/shared/_music.html.erb b/app/views/shared/_music.html.erb index f9047c23eee40e062d037df3ac75ae8f110c5c28..950c50c19ec3692460b376ec352b7a53656cccb5 100644 --- a/app/views/shared/_music.html.erb +++ b/app/views/shared/_music.html.erb @@ -12,7 +12,7 @@ <%= link_to music.channel.chan, '/musics/channels/'+music.channel.chan.sub('#','') %> </span> <span class="music_title"> - <%= link_to music.title, music.url %> + <%= music.title %> </span> <span class="music_tags"> <%= raw(music.tags.map{|t| link_to t.tag, '/musics/tags/'+t.tag}.join(" ")) %>