Merge branch 'master' of github.com:magnolia-fan/BeatHaven
This commit is contained in:
commit
5145320509
4
Gemfile
4
Gemfile
|
@ -14,8 +14,8 @@ gem 'barista'
|
||||||
|
|
||||||
gem 'awesome_print', :require => 'ap'
|
gem 'awesome_print', :require => 'ap'
|
||||||
gem 'delayed_job'
|
gem 'delayed_job'
|
||||||
gem 'lastfm-client', :git => 'http://github.com/magnolia-fan/lastfm-client.git'
|
gem 'lastfm-client', :git => 'http://github.com/pch/lastfm-client.git'
|
||||||
gem 'musicbrainz', '~> 0.4.3'
|
gem 'musicbrainz'
|
||||||
|
|
||||||
gem 'bitmask_attributes'
|
gem 'bitmask_attributes'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
GIT
|
GIT
|
||||||
remote: http://github.com/magnolia-fan/lastfm-client.git
|
remote: http://github.com/pch/lastfm-client.git
|
||||||
revision: 26fec825943d0bb77606bf058386e786ee97572b
|
revision: d17806722c1da685f7d2f283b0064cb92eb96965
|
||||||
specs:
|
specs:
|
||||||
lastfm-client (0.0.2)
|
lastfm-client (0.0.2)
|
||||||
json (>= 1.4.6)
|
json (>= 1.4.6)
|
||||||
|
@ -128,7 +128,7 @@ DEPENDENCIES
|
||||||
haml
|
haml
|
||||||
json
|
json
|
||||||
lastfm-client!
|
lastfm-client!
|
||||||
musicbrainz (~> 0.4.3)
|
musicbrainz
|
||||||
nokogiri
|
nokogiri
|
||||||
pg
|
pg
|
||||||
rails (= 3.1.0)
|
rails (= 3.1.0)
|
||||||
|
|
|
@ -9,12 +9,12 @@ class window.Ajax
|
||||||
|
|
||||||
loadIndexPage: ->
|
loadIndexPage: ->
|
||||||
$('#content').load '/greetings/'
|
$('#content').load '/greetings/'
|
||||||
|
_ajax.setTitle ''
|
||||||
false
|
false
|
||||||
|
|
||||||
loadAboutPage: ->
|
loadAboutPage: ->
|
||||||
$.get '/templates/about.html', (data) ->
|
$('#content').load '/about/'
|
||||||
_page.renderTextpage data
|
_ajax.setTitle 'About'
|
||||||
_ajax.setTitle 'About'
|
|
||||||
false
|
false
|
||||||
|
|
||||||
setArchor: (anchor) ->
|
setArchor: (anchor) ->
|
||||||
|
@ -34,14 +34,12 @@ class window.Ajax
|
||||||
detectPage: () ->
|
detectPage: () ->
|
||||||
if m = _ajax.getAnchor().match /\/artist\/(.+)\//
|
if m = _ajax.getAnchor().match /\/artist\/(.+)\//
|
||||||
_search.loadArtistData m[1]
|
_search.loadArtistData m[1]
|
||||||
else if _ajax.getAnchor() == ''
|
|
||||||
_ajax.loadIndexPage();
|
|
||||||
else if _ajax.getAnchor().match /\/settings\//
|
else if _ajax.getAnchor().match /\/settings\//
|
||||||
_settings.loadSettingsPage()
|
_settings.loadSettingsPage()
|
||||||
else if _ajax.getAnchor().match /\/about\//
|
else if _ajax.getAnchor().match /\/about\//
|
||||||
_ajax.loadAboutPage()
|
_ajax.loadAboutPage()
|
||||||
else
|
else
|
||||||
#_ajax.loadSearchPage()
|
_ajax.loadIndexPage();
|
||||||
false
|
false
|
||||||
|
|
||||||
$(window).bind 'hashchange', ->
|
$(window).bind 'hashchange', ->
|
||||||
|
|
|
@ -29,6 +29,9 @@ class window.Page
|
||||||
false
|
false
|
||||||
|
|
||||||
$ ->
|
$ ->
|
||||||
|
$('#logo').live 'click', ->
|
||||||
|
_ajax.go '/'
|
||||||
|
false
|
||||||
$('.about').live 'click', ->
|
$('.about').live 'click', ->
|
||||||
_ajax.go '/about/'
|
_ajax.go '/about/'
|
||||||
false
|
false
|
||||||
|
|
|
@ -147,10 +147,10 @@ class window.Player
|
||||||
false
|
false
|
||||||
|
|
||||||
onShuffle: ->
|
onShuffle: ->
|
||||||
#return $('#shuffle').hasClass 'active'
|
return $('.shuffle').hasClass 'on'
|
||||||
|
|
||||||
onRepeat: ->
|
onRepeat: ->
|
||||||
#return $('#repeat').hasClass 'active'
|
return $('.repeat').hasClass 'on'
|
||||||
|
|
||||||
updateNowListening: (track) ->
|
updateNowListening: (track) ->
|
||||||
if _session.getUser().lastfm_username
|
if _session.getUser().lastfm_username
|
||||||
|
@ -184,11 +184,11 @@ $('.player .progress').live 'click', (e) ->
|
||||||
|
|
||||||
# Player Additional Controls
|
# Player Additional Controls
|
||||||
|
|
||||||
$('#repeat, #shuffle').live 'click', ->
|
$('.repeat, .shuffle').live 'click', ->
|
||||||
$(this).toggleClass 'active'
|
$(this).toggleClass 'on'
|
||||||
false
|
false
|
||||||
|
|
||||||
$('#empty-playlist').live 'click', ->
|
$('.do_empty').live 'click', ->
|
||||||
if confirm('Are you sure?')
|
if confirm('Are you sure?')
|
||||||
$('.playlist li').remove()
|
$('.playlist li').remove()
|
||||||
$('#jplayer').jPlayer 'clearMedia'
|
$('#jplayer').jPlayer 'clearMedia'
|
||||||
|
|
|
@ -19,8 +19,10 @@ class window.Search
|
||||||
if data.status in ['ok', 'loading']
|
if data.status in ['ok', 'loading']
|
||||||
_ajax.setArchor '/artist/' +name+ '/'
|
_ajax.setArchor '/artist/' +name+ '/'
|
||||||
_page.print data.html
|
_page.print data.html
|
||||||
for album in data.albums
|
if _session.getUser().id
|
||||||
_player.albums[album.id] = album
|
for album in data.albums
|
||||||
|
_player.albums[album.id] = album
|
||||||
|
$('.button-container').show()
|
||||||
_search.hideSpinner()
|
_search.hideSpinner()
|
||||||
if data.status is 'loading'
|
if data.status is 'loading'
|
||||||
setTimeout () ->
|
setTimeout () ->
|
||||||
|
|
|
@ -132,8 +132,8 @@ $('#login').live 'click', ->
|
||||||
, 8
|
, 8
|
||||||
false
|
false
|
||||||
$('#logout').live 'click', ->
|
$('#logout').live 'click', ->
|
||||||
_ajax.go '/search/';
|
|
||||||
VK.Auth.logout (response) ->
|
VK.Auth.logout (response) ->
|
||||||
_vkontakte.authInfo(response)
|
_vkontakte.authInfo(response)
|
||||||
|
$('.button-container').hide()
|
||||||
false
|
false
|
||||||
false
|
false
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
max-width: 220px;
|
max-width: 220px;
|
||||||
}
|
}
|
||||||
.button-container {
|
.button-container {
|
||||||
|
display: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,24 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.secondary-buttons {
|
||||||
|
margin: 10px 0;
|
||||||
|
text-align: center;
|
||||||
|
a {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #cacaca;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #b0b0b0;
|
||||||
|
}
|
||||||
|
&.on {
|
||||||
|
color: #606060;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.playlist {
|
.playlist {
|
||||||
|
|
|
@ -11,6 +11,10 @@ class ApplicationController < ActionController::Base
|
||||||
render :partial => 'greetings'
|
render :partial => 'greetings'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def about
|
||||||
|
render :partial => 'about'
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def authorize
|
def authorize
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
%h2 Write us a letter!
|
||||||
|
%br
|
||||||
|
.row
|
||||||
|
.span3
|
||||||
|
%address
|
||||||
|
%strong Site issues?
|
||||||
|
%br
|
||||||
|
%a{ :href => "mailto:support@beathaven.org" } support@beathaven.org
|
||||||
|
.span6
|
||||||
|
%address
|
||||||
|
%strong Everything else (suggestions, compliments, threats)
|
||||||
|
%br
|
||||||
|
%a{ :href => "mailto:contact@beathaven.org" } contact@beathaven.org
|
|
@ -0,0 +1,13 @@
|
||||||
|
%h2 Напишите нам письмо!
|
||||||
|
%br
|
||||||
|
.row
|
||||||
|
.span3
|
||||||
|
%address
|
||||||
|
%strong Проблемы с сайтом?
|
||||||
|
%br
|
||||||
|
%a{ :href => "mailto:support@beathaven.org" } support@beathaven.org
|
||||||
|
.span6
|
||||||
|
%address
|
||||||
|
%strong Все остальное (пожелания, благодарности, угрозы)
|
||||||
|
%br
|
||||||
|
%a{ :href => "mailto:contact@beathaven.org" } contact@beathaven.org
|
|
@ -0,0 +1 @@
|
||||||
|
%h2 Halló!
|
|
@ -1 +1 @@
|
||||||
%h1 Привет!
|
%h2 Привет!
|
|
@ -15,10 +15,10 @@
|
||||||
.topbar-inner
|
.topbar-inner
|
||||||
.container
|
.container
|
||||||
%h3
|
%h3
|
||||||
%a{ :href => "#/" } BeatHaven
|
%a#logo{ :href => "#/" } BeatHaven
|
||||||
%ul.nav
|
%ul.nav
|
||||||
%li
|
%li
|
||||||
%a{ :href => "http://blog.beathaven.org/" }= I18n.t 'global.news'
|
%a{ :href => "http://blog.beathaven.org/", :target => "_blank" }= I18n.t 'global.news'
|
||||||
%li
|
%li
|
||||||
%a.about{ :href => "#/about/" }= I18n.t 'global.about'
|
%a.about{ :href => "#/about/" }= I18n.t 'global.about'
|
||||||
%form#search-form{ :action => "" }
|
%form#search-form{ :action => "" }
|
||||||
|
@ -61,6 +61,10 @@
|
||||||
%a.btn.large.play ►
|
%a.btn.large.play ►
|
||||||
%a.btn.large.pause II
|
%a.btn.large.pause II
|
||||||
%a.btn.small-round.next »
|
%a.btn.small-round.next »
|
||||||
|
.secondary-buttons
|
||||||
|
%a.shuffle= (I18n.t 'player.shuffle').upcase
|
||||||
|
%a.repeat= (I18n.t 'player.repeat').upcase
|
||||||
|
%a.do_empty= (I18n.t 'player.do_empty').upcase
|
||||||
|
|
||||||
%ul.playlist
|
%ul.playlist
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,6 @@ en:
|
||||||
logout: "Log out"
|
logout: "Log out"
|
||||||
do_add: "Add some music to playlist"
|
do_add: "Add some music to playlist"
|
||||||
do_login: "Don't forget to log in, please. It's simple."
|
do_login: "Don't forget to log in, please. It's simple."
|
||||||
repeat: "Repeat"
|
|
||||||
shuffle: "Shuffle"
|
|
||||||
do_empty: "Empty playlist"
|
|
||||||
hello: "Hi there"
|
hello: "Hi there"
|
||||||
settings: "Settings"
|
settings: "Settings"
|
||||||
your_ad_here: "Your ad couldn't<br/>be here"
|
your_ad_here: "Your ad couldn't<br/>be here"
|
||||||
|
@ -48,4 +45,7 @@ en:
|
||||||
reload_alert: "To change application language it is needed to reload page. Your current playlist will be emptied and music will stop. Do you really wish to continue?"
|
reload_alert: "To change application language it is needed to reload page. Your current playlist will be emptied and music will stop. Do you really wish to continue?"
|
||||||
|
|
||||||
player:
|
player:
|
||||||
add: "Add to Now Playing"
|
add: "Add to Now Playing"
|
||||||
|
repeat: "Repeat"
|
||||||
|
shuffle: "Shuffle"
|
||||||
|
do_empty: "Empty"
|
|
@ -7,9 +7,6 @@ ru:
|
||||||
logout: "Выйти"
|
logout: "Выйти"
|
||||||
do_add: "Добавьте музыку в плей-лист"
|
do_add: "Добавьте музыку в плей-лист"
|
||||||
do_login: "Авторизуйтесь, пожалуйста. Это действительно просто."
|
do_login: "Авторизуйтесь, пожалуйста. Это действительно просто."
|
||||||
repeat: "Повторять"
|
|
||||||
shuffle: "Перемешать"
|
|
||||||
do_empty: "Очистить"
|
|
||||||
hello: "Привет"
|
hello: "Привет"
|
||||||
settings: "Настройки"
|
settings: "Настройки"
|
||||||
your_ad_here: "Здесь не могла бы<br/>быть Ваша реклама"
|
your_ad_here: "Здесь не могла бы<br/>быть Ваша реклама"
|
||||||
|
@ -48,4 +45,7 @@ ru:
|
||||||
reload_alert: "Чтобы изменить язык приложения, необходимо перезагрузить страницу. Ваш текущий плей-лист будет очищен и музыка остановится. Вы действительно хотите продолжить?"
|
reload_alert: "Чтобы изменить язык приложения, необходимо перезагрузить страницу. Ваш текущий плей-лист будет очищен и музыка остановится. Вы действительно хотите продолжить?"
|
||||||
|
|
||||||
player:
|
player:
|
||||||
add: "Добавить в плей-лист"
|
add: "Добавить в плей-лист"
|
||||||
|
repeat: "Повторять"
|
||||||
|
shuffle: "Перемешать"
|
||||||
|
do_empty: "Очистить"
|
|
@ -58,6 +58,7 @@ Beathaven::Application.routes.draw do
|
||||||
|
|
||||||
match '/' => 'application#index'
|
match '/' => 'application#index'
|
||||||
match '/greetings/' => 'application#greetings'
|
match '/greetings/' => 'application#greetings'
|
||||||
|
match '/about/' => 'application#about'
|
||||||
|
|
||||||
match 'user/auth' => 'user#auth'
|
match 'user/auth' => 'user#auth'
|
||||||
match 'user/update' => 'user#update'
|
match 'user/update' => 'user#update'
|
||||||
|
|
Loading…
Reference in New Issue