Merge branch 'master' of github.com:magnolia-fan/BeatHaven
This commit is contained in:
@@ -9,12 +9,12 @@ class window.Ajax
|
||||
|
||||
loadIndexPage: ->
|
||||
$('#content').load '/greetings/'
|
||||
_ajax.setTitle ''
|
||||
false
|
||||
|
||||
loadAboutPage: ->
|
||||
$.get '/templates/about.html', (data) ->
|
||||
_page.renderTextpage data
|
||||
_ajax.setTitle 'About'
|
||||
$('#content').load '/about/'
|
||||
_ajax.setTitle 'About'
|
||||
false
|
||||
|
||||
setArchor: (anchor) ->
|
||||
@@ -34,14 +34,12 @@ class window.Ajax
|
||||
detectPage: () ->
|
||||
if m = _ajax.getAnchor().match /\/artist\/(.+)\//
|
||||
_search.loadArtistData m[1]
|
||||
else if _ajax.getAnchor() == ''
|
||||
_ajax.loadIndexPage();
|
||||
else if _ajax.getAnchor().match /\/settings\//
|
||||
_settings.loadSettingsPage()
|
||||
else if _ajax.getAnchor().match /\/about\//
|
||||
_ajax.loadAboutPage()
|
||||
else
|
||||
#_ajax.loadSearchPage()
|
||||
_ajax.loadIndexPage();
|
||||
false
|
||||
|
||||
$(window).bind 'hashchange', ->
|
||||
|
||||
@@ -29,6 +29,9 @@ class window.Page
|
||||
false
|
||||
|
||||
$ ->
|
||||
$('#logo').live 'click', ->
|
||||
_ajax.go '/'
|
||||
false
|
||||
$('.about').live 'click', ->
|
||||
_ajax.go '/about/'
|
||||
false
|
||||
|
||||
@@ -147,10 +147,10 @@ class window.Player
|
||||
false
|
||||
|
||||
onShuffle: ->
|
||||
#return $('#shuffle').hasClass 'active'
|
||||
return $('.shuffle').hasClass 'on'
|
||||
|
||||
onRepeat: ->
|
||||
#return $('#repeat').hasClass 'active'
|
||||
return $('.repeat').hasClass 'on'
|
||||
|
||||
updateNowListening: (track) ->
|
||||
if _session.getUser().lastfm_username
|
||||
@@ -184,11 +184,11 @@ $('.player .progress').live 'click', (e) ->
|
||||
|
||||
# Player Additional Controls
|
||||
|
||||
$('#repeat, #shuffle').live 'click', ->
|
||||
$(this).toggleClass 'active'
|
||||
$('.repeat, .shuffle').live 'click', ->
|
||||
$(this).toggleClass 'on'
|
||||
false
|
||||
|
||||
$('#empty-playlist').live 'click', ->
|
||||
$('.do_empty').live 'click', ->
|
||||
if confirm('Are you sure?')
|
||||
$('.playlist li').remove()
|
||||
$('#jplayer').jPlayer 'clearMedia'
|
||||
|
||||
@@ -19,8 +19,10 @@ class window.Search
|
||||
if data.status in ['ok', 'loading']
|
||||
_ajax.setArchor '/artist/' +name+ '/'
|
||||
_page.print data.html
|
||||
for album in data.albums
|
||||
_player.albums[album.id] = album
|
||||
if _session.getUser().id
|
||||
for album in data.albums
|
||||
_player.albums[album.id] = album
|
||||
$('.button-container').show()
|
||||
_search.hideSpinner()
|
||||
if data.status is 'loading'
|
||||
setTimeout () ->
|
||||
|
||||
@@ -132,8 +132,8 @@ $('#login').live 'click', ->
|
||||
, 8
|
||||
false
|
||||
$('#logout').live 'click', ->
|
||||
_ajax.go '/search/';
|
||||
VK.Auth.logout (response) ->
|
||||
_vkontakte.authInfo(response)
|
||||
$('.button-container').hide()
|
||||
false
|
||||
false
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
max-width: 220px;
|
||||
}
|
||||
.button-container {
|
||||
display: none;
|
||||
text-align: center;
|
||||
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 {
|
||||
|
||||
@@ -11,6 +11,10 @@ class ApplicationController < ActionController::Base
|
||||
render :partial => 'greetings'
|
||||
end
|
||||
|
||||
def about
|
||||
render :partial => 'about'
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
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
|
||||
.container
|
||||
%h3
|
||||
%a{ :href => "#/" } BeatHaven
|
||||
%a#logo{ :href => "#/" } BeatHaven
|
||||
%ul.nav
|
||||
%li
|
||||
%a{ :href => "http://blog.beathaven.org/" }= I18n.t 'global.news'
|
||||
%a{ :href => "http://blog.beathaven.org/", :target => "_blank" }= I18n.t 'global.news'
|
||||
%li
|
||||
%a.about{ :href => "#/about/" }= I18n.t 'global.about'
|
||||
%form#search-form{ :action => "" }
|
||||
@@ -61,6 +61,10 @@
|
||||
%a.btn.large.play ►
|
||||
%a.btn.large.pause II
|
||||
%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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user