Hide player for unauthorized users, ad place
This commit is contained in:
parent
c726d1ca44
commit
dffc5bf735
|
@ -35,3 +35,13 @@ class window.Session
|
|||
_session.setUser ar.user
|
||||
false
|
||||
false
|
||||
|
||||
displayAuthorizedContent: ->
|
||||
$('.playlist, .player').show()
|
||||
$('.ad_here, #login').hide()
|
||||
$('#authorized').css display: 'block'
|
||||
|
||||
hideAuthorizedContent: ->
|
||||
$('.playlist, .player, #authorized').hide()
|
||||
$('.ad_here').show()
|
||||
$('#login').css display: 'block'
|
||||
|
|
|
@ -36,16 +36,14 @@ class window.Vkontakte
|
|||
.html (if _session.getUser().name then _session.getUser().name else '%username%')
|
||||
window._session = _session
|
||||
_ajax.detectPage()
|
||||
$('.fullscreen').hide();
|
||||
$('#login').hide()
|
||||
_session.displayAuthorizedContent()
|
||||
$('#authorized').css display: 'block'
|
||||
else
|
||||
_session.setUser ar.user
|
||||
|
||||
$('#username')
|
||||
.html (if _session.getUser().name then _session.getUser().name else '%username%')
|
||||
$('#login').hide()
|
||||
$('#authorized').css display: 'block'
|
||||
_session.displayAuthorizedContent()
|
||||
window._session = _session
|
||||
_ajax.detectPage()
|
||||
$('.fullscreen').hide();
|
||||
|
@ -58,8 +56,7 @@ class window.Vkontakte
|
|||
else
|
||||
_session = new Session({})
|
||||
_session.setUser {}
|
||||
$('#login').css display: 'block'
|
||||
$('#authorized').hide()
|
||||
_session.hideAuthorizedContent()
|
||||
window._session = _session
|
||||
_ajax.detectPage()
|
||||
$('.fullscreen').hide();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #ffffff;
|
||||
@include opacity(0.9);
|
||||
//@include opacity(0.9);
|
||||
.inner {
|
||||
position: relative;
|
||||
top: 50%;
|
||||
|
|
|
@ -12,4 +12,16 @@
|
|||
top: 45px;
|
||||
width: 210px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.player, .playlist {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ad_here {
|
||||
display: block;
|
||||
border: #e0e0e0 1px solid;
|
||||
padding: 200px 20px;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
}
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
|
||||
.span5.columns
|
||||
.ad_here= (I18n.t 'global.your_ad_here').html_safe
|
||||
.player
|
||||
%h5.now-playing= I18n.t 'global.do_add'
|
||||
.progress
|
||||
|
|
|
@ -12,6 +12,7 @@ en:
|
|||
do_empty: "Empty playlist"
|
||||
hello: "Hi there"
|
||||
settings: "Settings"
|
||||
your_ad_here: "Your ad couldn't<br/>be here"
|
||||
|
||||
search:
|
||||
fail: "Something very bad happened while we tried out to load some info about this artist. How about some other one?"
|
||||
|
|
|
@ -12,6 +12,7 @@ ru:
|
|||
do_empty: "Очистить"
|
||||
hello: "Привет"
|
||||
settings: "Настройки"
|
||||
your_ad_here: "Здесь не могла бы<br/>быть Ваша реклама"
|
||||
|
||||
search:
|
||||
fail: "Что-то ужасное произошло пока мы собирали информацию об этом исполнителе. Может пока поищем другого?"
|
||||
|
|
Loading…
Reference in New Issue