Bad local time fix, social buttons
This commit is contained in:
parent
b55da886db
commit
4c40a928ab
|
@ -13,4 +13,6 @@
|
|||
//= require page
|
||||
//= require settings
|
||||
|
||||
//= require beathaven
|
||||
//= require beathaven
|
||||
|
||||
//= require_tree ./social
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) {return;}
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
|
@ -1,6 +1,7 @@
|
|||
class window.Vkontakte
|
||||
|
||||
api_id: null
|
||||
session_length: 3600 # seconds
|
||||
|
||||
constructor: (@api_id) ->
|
||||
|
||||
|
@ -12,6 +13,7 @@ class window.Vkontakte
|
|||
window.vkAsyncInit = ->
|
||||
VK.init apiId: _vkontakte.getApiId()
|
||||
_vkontakte.auth()
|
||||
|
||||
|
||||
setTimeout ->
|
||||
$('#vk_api_transport').append($('<script async="async" type="text/javascript" src="http://vkontakte.ru/js/api/openapi.js">'))
|
||||
|
@ -49,7 +51,9 @@ class window.Vkontakte
|
|||
$('.fullscreen').hide();
|
||||
|
||||
if response.session.expire?
|
||||
expire_in = response.session.expire * 1000 - new Date().getTime()
|
||||
# expire_in = response.session.expire * 1000 - new Date().getTime()
|
||||
# the time is an illusion...
|
||||
expire_in = @session_length * 1000
|
||||
log "Session will expire in #{Math.round(expire_in / 1000)} seconds"
|
||||
setTimeout ->
|
||||
log "Session expired"
|
||||
|
@ -78,6 +82,7 @@ $('#login').live 'click', ->
|
|||
false
|
||||
, 8
|
||||
false
|
||||
|
||||
$('#logout').live 'click', ->
|
||||
VK.Auth.logout (response) ->
|
||||
_vkontakte.authInfo(response)
|
||||
|
|
|
@ -40,4 +40,13 @@ table.stats {
|
|||
&:hover {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.fb-like, .vk-like {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.vk-like td {
|
||||
padding: 0 !important;
|
||||
line-height: 12px;
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
.fb-like{ "data-href" => "http://facebook.com/BeatHavenHQ", "data-send" => "false", "data-layout" => "button_count", "data-width" => "100", "data-show-faces" => "false", "data-font" => "lucida grande" }
|
||||
.vk-like
|
||||
%script{ type: "text/javascript" }
|
||||
document.write(VK.Share.button(false, {type: "round", text: "Нравится"}));
|
|
@ -8,10 +8,11 @@
|
|||
%link{ rel: "shortcut icon", href: "/favicon.ico" }
|
||||
%link{ rel: "apple-touch-icon", href: image_path("logo.png") }
|
||||
%link{ rel: "search", type: "application/opensearchdescription+xml", title: "BeatHaven", href: "/opensearch.xml"}
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= stylesheet_link_tag :application, cache: true
|
||||
= javascript_include_tag :application, cache: true
|
||||
= javascript_include_tag "http://vkontakte.ru/js/api/share.js", charset: "windows-1251"
|
||||
%body
|
||||
|
||||
#fb-root
|
||||
.topbar-wrapper
|
||||
.topbar
|
||||
.topbar-inner
|
||||
|
@ -52,7 +53,6 @@
|
|||
.row
|
||||
.span11.columns#content
|
||||
|
||||
|
||||
.span5.columns
|
||||
.ad_here= t('global.your_ad_here').html_safe
|
||||
.player
|
||||
|
@ -73,14 +73,11 @@
|
|||
.quality-buttons
|
||||
%a.q-good{ :title => t('player.thumbs_up') }= image_tag "icns/thumbs-up.png"
|
||||
%a.q-bad{ :title => t('player.thumbs_down') }= image_tag "icns/thumbs-down.png"
|
||||
|
||||
|
||||
|
||||
%ul.playlist
|
||||
|
||||
.row
|
||||
.span11= render "like"
|
||||
.fullscreen
|
||||
.inner
|
||||
= image_tag "loader.gif"
|
||||
|
||||
#vk_api_transport
|
||||
#jplayer
|
||||
|
|
Loading…
Reference in New Issue