* VRFS-1757 - updated signin dialog to 'modern' standards; VRFS-1826 - 2/3 fixed
This commit is contained in:
parent
aedd719b7f
commit
cbe4bf1747
|
|
@ -29,7 +29,7 @@ module JamRuby
|
|||
start = start.to_i
|
||||
|
||||
time_range = params[:time_range]
|
||||
time_range ||= 'month'
|
||||
time_range ||= 'all'
|
||||
raise "not valid time_range #{time_range}" unless TIME_RANGES.has_key?(time_range)
|
||||
|
||||
type_filter = params[:type]
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ describe Feed do
|
|||
claimed_recording1.recording.feed.created_at = 32.days.ago
|
||||
claimed_recording1.recording.feed.save!
|
||||
|
||||
feeds, start = Feed.index(user1, :type => 'recording')
|
||||
feeds, start = Feed.index(user1, :type => 'recording', time_range: 'month')
|
||||
feeds.length.should == 0
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -114,11 +114,13 @@
|
|||
|
||||
if(options.buttons) {
|
||||
var $buttons = $banner.find('.buttons')
|
||||
context._.each(options.buttons, function(button) {
|
||||
context._.each(options.buttons, function(button, i) {
|
||||
if(!button.name) throw "button.name must be specified";
|
||||
if(!button.click) throw "button.click must be specified";
|
||||
|
||||
var $btn = $('<a class="button-orange user-btn">' + button.name + '</a>');
|
||||
var buttonStyle = options.buttons.length == i + 1 ? 'button-orange' : 'button-grey';
|
||||
|
||||
var $btn = $('<a class="' + buttonStyle + ' user-btn">' + button.name + '</a>');
|
||||
$btn.click(function() {
|
||||
button.click();
|
||||
hide();
|
||||
|
|
|
|||
|
|
@ -774,6 +774,10 @@
|
|||
logger.debug("SessionLiveBroadcastStop requested");
|
||||
}
|
||||
|
||||
function RegisterQuitCallback() {
|
||||
|
||||
}
|
||||
|
||||
// Javascript Bridge seems to camel-case
|
||||
// Set the instance functions:
|
||||
this.AbortRecording = AbortRecording;
|
||||
|
|
@ -804,6 +808,7 @@
|
|||
this.IsMyNetworkWireless = IsMyNetworkWireless;
|
||||
this.SetNetworkTestScore = SetNetworkTestScore;
|
||||
this.GetNetworkTestScore = GetNetworkTestScore;
|
||||
this.RegisterQuitCallback = RegisterQuitCallback;
|
||||
this.connected = true;
|
||||
|
||||
// FTUE (round 3)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@
|
|||
};
|
||||
|
||||
context.JK.EVENTS = {
|
||||
DIALOG_CLOSED : 'dialog_closed'
|
||||
DIALOG_CLOSED : 'dialog_closed',
|
||||
SHOW_SIGNUP : 'show_signup',
|
||||
SHOW_SIGNIN : 'show_signin'
|
||||
}
|
||||
|
||||
context.JK.ALERT_NAMES = {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,35 @@
|
|||
//= require jquery
|
||||
//= require jquery.monkeypatch
|
||||
//= require jquery_ujs
|
||||
//= require jquery.ui.draggable
|
||||
//= require jquery.queryparams
|
||||
//= require jquery.hoverIntent
|
||||
//= require jquery.cookie
|
||||
//= require jquery.clipboard
|
||||
//= require jquery.easydropdown
|
||||
//= require jquery.carousel-1.1
|
||||
//= require jquery.mousewheel-3.1.9
|
||||
//= require jquery.timeago
|
||||
//= require jquery.dotdotdot
|
||||
//= require jquery.listenbroadcast
|
||||
//= require jquery.listenRecording
|
||||
//= require jquery.browser
|
||||
//= require jquery.custom-protocol
|
||||
//= require jquery.ba-bbq
|
||||
//= require AAA_Log
|
||||
//= require AAC_underscore
|
||||
//= require globals
|
||||
//= require AAB_message_factory
|
||||
//= require facebook_helper
|
||||
//= require layout
|
||||
//= require jamkazam
|
||||
//= require utils
|
||||
//= require ui_helper
|
||||
//= require ga
|
||||
//= require jam_rest
|
||||
//= require web/signup_helper
|
||||
//= require web/signin_helper
|
||||
//= require web/signin
|
||||
//= require landing/init
|
||||
//= require landing/signup
|
||||
//= require shareDialog
|
||||
|
|
@ -746,10 +746,10 @@
|
|||
}
|
||||
|
||||
if (step == STEP_SELECT_TYPE && createSessionSettings.createType == 'start-scheduled' && createSessionSettings.selectedSessionId == null) {
|
||||
$btnNext.removeClass('button-orange').addClass('button-grey');
|
||||
$btnNext.addClass('disabled');
|
||||
}
|
||||
else {
|
||||
$btnNext.removeClass('button-grey').addClass('button-orange');
|
||||
$btnNext.removeClass('disabled');
|
||||
}
|
||||
|
||||
if (step == STEP_SELECT_CONFIRM) {
|
||||
|
|
@ -770,7 +770,7 @@
|
|||
event.preventDefault();
|
||||
}
|
||||
|
||||
if ($(this).is('.button-grey')) return false;
|
||||
if ($(this).is('.disabled')) return false;
|
||||
if ($.inArray(createSessionSettings.createType, ['start-scheduled', 'quick-start']) > -1)
|
||||
step = STEP_SELECT_TYPE;
|
||||
else
|
||||
|
|
@ -806,7 +806,7 @@
|
|||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
if ($(this).is('.button-grey')) return false;
|
||||
if ($(this).is('.disabled')) return false;
|
||||
|
||||
if ($.inArray(createSessionSettings.createType, ['start-scheduled', 'quick-start']) > -1)
|
||||
step = STEP_SELECT_CONFIRM;
|
||||
|
|
@ -1072,10 +1072,10 @@
|
|||
|
||||
var $btnNext = $('#create-session-buttons .btn-next');
|
||||
if (step == STEP_SELECT_TYPE && createSessionSettings.createType == 'start-scheduled' && createSessionSettings.selectedSessionId == null) {
|
||||
$btnNext.removeClass('button-orange').addClass('button-grey');
|
||||
$btnNext.addClass('disabled')
|
||||
}
|
||||
else {
|
||||
$btnNext.removeClass('button-grey').addClass('button-orange');
|
||||
$btnNext.removeClass('disabled');
|
||||
}
|
||||
|
||||
toggleStepStatus();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
(function (context, $) {
|
||||
|
||||
"use strict";
|
||||
|
||||
context.JK = context.JK || {};
|
||||
|
||||
context.JK.ShutdownDialog = function (app) {
|
||||
var logger = context.JK.logger;
|
||||
|
||||
function show() {
|
||||
context.JK.Banner.showAlert(
|
||||
{ title: "Close JamKazam Application",
|
||||
buttons: [
|
||||
{name: 'Completely Shut Down the App', click: function() {context.jamClient.ShutdownApplication()}},
|
||||
{name: 'Let App Run in Background', click: function() {context.jamClient.ShutdownApplication()}}
|
||||
],
|
||||
html: $('#template-shutdown-prompt').html()});
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
//context.jamClient.RegisterQuitCallback("window.JK.ShutdownDialogCallback");
|
||||
}
|
||||
|
||||
function quitCallback(options) {
|
||||
logger.debug("oh hai");
|
||||
show();
|
||||
}
|
||||
|
||||
this.initialize = initialize;
|
||||
|
||||
context.JK.ShutdownDialogCallback = quitCallback;
|
||||
|
||||
return this;
|
||||
|
||||
}
|
||||
})(window, jQuery);
|
||||
|
|
@ -85,7 +85,11 @@
|
|||
function handleWhatsNext(userProfile) {
|
||||
if (notYetShownWhatsNext && gon.isNativeClient && userProfile.show_whats_next) {
|
||||
notYetShownWhatsNext = false;
|
||||
app.layout.showDialog('whatsNext');
|
||||
console.log("window.location.pathname", window.location.pathname, gon.client_path, window.location.pathname.indexOf(gon.client_url));
|
||||
if(window.location.pathname.indexOf(gon.client_path) == 0) {
|
||||
app.layout.showDialog('whatsNext');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
(function (context, $) {
|
||||
|
||||
"use strict";
|
||||
|
||||
context.JK = context.JK || {};
|
||||
|
||||
var $signin;
|
||||
var $signinRoot;
|
||||
var $signupRoot;
|
||||
|
||||
var rest = context.JK.Rest();
|
||||
var logger = context.JK.logger;
|
||||
var EVENTS = context.JK.EVENTS;
|
||||
|
||||
function initialize() {
|
||||
|
||||
$signinRoot = $('.signin-common');
|
||||
$signupRoot = $('.signup-common');
|
||||
|
||||
var signinHelper = new context.JK.SigninHelper(context.JK.app);
|
||||
$(signinHelper).on(EVENTS.SHOW_SIGNUP, function() {
|
||||
$signinRoot.hide();
|
||||
$signupRoot.show();
|
||||
});
|
||||
signinHelper.initialize($signinRoot, false);
|
||||
|
||||
var signupHelper = new context.JK.SignupHelper(context.JK.app);
|
||||
$(signupHelper).on(EVENTS.SHOW_SIGNIN, function() {
|
||||
$signupRoot.hide();
|
||||
$signinRoot.show();
|
||||
});
|
||||
signupHelper.initialize($signupRoot);
|
||||
|
||||
$signinRoot.find('input[name="session[email]"]').focus();
|
||||
}
|
||||
|
||||
context.JK.SigninPage = initialize;
|
||||
|
||||
})(window, jQuery);
|
||||
|
|
@ -5,78 +5,21 @@
|
|||
context.JK = context.JK || {};
|
||||
|
||||
context.JK.SigninDialog = function(app) {
|
||||
var EVENTS = context.JK.EVENTS;
|
||||
var logger = context.JK.logger;
|
||||
var rest = context.JK.Rest();
|
||||
var dialogId = '#signin-dialog';
|
||||
var $dialog = null;
|
||||
var signinHelper = null;
|
||||
|
||||
function reset() {
|
||||
$(dialogId + ' #signin-form').removeClass('login-error')
|
||||
|
||||
$(dialogId + ' input[name=email]').val('');
|
||||
$(dialogId + ' input[name=password]').val('');
|
||||
$(dialogId + ' input[name=remember_me]').attr('checked', 'checked')
|
||||
}
|
||||
|
||||
function login() {
|
||||
var email = $(dialogId + ' input[name=email]').val();
|
||||
var password = $(dialogId + ' input[name=password]').val();
|
||||
var rememberMe = $(dialogId + ' input[name=remember_me]').is(':checked')
|
||||
|
||||
rest.login({email: email, password: password, remember_me: rememberMe})
|
||||
.done(function() {
|
||||
app.layout.closeDialog('signin-dialog')
|
||||
|
||||
var redirectTo = $.QueryString['redirect-to'];
|
||||
if(redirectTo) {
|
||||
logger.debug("redirectTo:" + redirectTo);
|
||||
window.location.href = redirectTo;
|
||||
}
|
||||
else {
|
||||
logger.debug("default post-login path");
|
||||
window.location.href = '/client'
|
||||
}
|
||||
})
|
||||
.fail(function(jqXHR) {
|
||||
if(jqXHR.status == 422) {
|
||||
$(dialogId + ' #signin-form').addClass('login-error')
|
||||
}
|
||||
else {
|
||||
app.notifyServerError(jqXHR, "Unable to log in")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function events() {
|
||||
$(dialogId + ' .signin-cancel').click(function(e) {
|
||||
app.layout.closeDialog('signin-dialog');
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(dialogId + ' #signin-form').submit(function(e) {
|
||||
login();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(dialogId + ' .signin-submit').click(function(e) {
|
||||
login();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(dialogId + ' .show-signup-dialog').click(function(e) {
|
||||
app.layout.closeDialog('signin-dialog')
|
||||
app.layout.showDialog('signup-dialog')
|
||||
return false;
|
||||
})
|
||||
}
|
||||
|
||||
function beforeShow() {
|
||||
logger.debug("showing login form")
|
||||
reset();
|
||||
signinHelper.reset();
|
||||
}
|
||||
|
||||
function afterShow() {
|
||||
$(dialogId + ' input[name=email]').focus();
|
||||
$dialog.find('input[name="session[email]"]').focus();
|
||||
}
|
||||
|
||||
function afterHide() {
|
||||
|
|
@ -93,10 +36,16 @@
|
|||
|
||||
app.bindDialog('signin-dialog', dialogBindings);
|
||||
|
||||
events();
|
||||
$dialog = $(dialogId);
|
||||
|
||||
signinHelper = new context.JK.SigninHelper(app);
|
||||
$(signinHelper).on(EVENTS.SHOW_SIGNUP, function() {
|
||||
app.layout.closeDialog('signin-dialog')
|
||||
app.layout.showDialog('signup-dialog')
|
||||
})
|
||||
signinHelper.initialize($dialog, true);
|
||||
}
|
||||
|
||||
this.initialize = initialize;
|
||||
|
||||
}
|
||||
})(window, jQuery);
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
(function(context,$) {
|
||||
|
||||
"use strict";
|
||||
|
||||
context.JK = context.JK || {};
|
||||
|
||||
context.JK.SigninHelper = function(app) {
|
||||
|
||||
if(!app) throw "no app defined";
|
||||
|
||||
var logger = context.JK.logger;
|
||||
var rest = context.JK.Rest();
|
||||
var $self = $(this);
|
||||
var $parent = null;
|
||||
var $signinBtn = null;
|
||||
var $signinForm = null;
|
||||
var $signinCancelBtn = null;
|
||||
var $email = null;
|
||||
var $password = null;
|
||||
var $rememberMe = null;
|
||||
var useAjax = false;
|
||||
var EVENTS = context.JK.EVENTS;
|
||||
|
||||
function reset() {
|
||||
$signinForm.removeClass('login-error')
|
||||
|
||||
$email.val('');
|
||||
$password.val('');
|
||||
$rememberMe.attr('checked', 'checked')
|
||||
}
|
||||
|
||||
function login() {
|
||||
var email = $email.val();
|
||||
var password = $password.val();
|
||||
var rememberMe = $rememberMe.is(':checked')
|
||||
|
||||
reset();
|
||||
|
||||
$signinBtn.text('TRYING...');
|
||||
|
||||
rest.login({email: email, password: password, remember_me: rememberMe})
|
||||
.done(function() {
|
||||
//app.layout.closeDialog('signin-dialog')
|
||||
|
||||
var redirectTo = $.QueryString['redirect-to'];
|
||||
if(redirectTo) {
|
||||
logger.debug("redirectTo:" + redirectTo);
|
||||
window.location.href = redirectTo;
|
||||
}
|
||||
else {
|
||||
logger.debug("default post-login path");
|
||||
window.location.href = '/client'
|
||||
}
|
||||
})
|
||||
.fail(function(jqXHR) {
|
||||
if(jqXHR.status == 422) {
|
||||
$signinForm.addClass('login-error')
|
||||
}
|
||||
else {
|
||||
app.notifyServerError(jqXHR, "Unable to log in")
|
||||
}
|
||||
})
|
||||
.always(function() {
|
||||
$signinBtn.text('SIGN IN')
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function events() {
|
||||
$signinCancelBtn.click(function(e) {
|
||||
app.layout.closeDialog('signin-dialog');
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
|
||||
if(useAjax) {
|
||||
$signinForm.submit(function(e) {
|
||||
login();
|
||||
return false;
|
||||
});
|
||||
|
||||
$signinBtn.click(function(e) {
|
||||
login();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$parent.find('.show-signup-dialog').click(function(e) {
|
||||
$self.triggerHandler(EVENTS.SHOW_SIGNUP);
|
||||
return false;
|
||||
})
|
||||
}
|
||||
|
||||
function initialize(_$parent, _useAjax){
|
||||
$parent = _$parent;
|
||||
useAjax = _useAjax;
|
||||
|
||||
$signinBtn = $parent.find('.signin-submit')
|
||||
$signinForm = $parent.find('.signin-form')
|
||||
$signinCancelBtn = $parent.find('.signin-cancel')
|
||||
$email = $parent.find('input[name="session[email]"]');
|
||||
$password = $parent.find('input[name="session[password]"]');
|
||||
$rememberMe = $parent.find('input[name="user[remember_me]"]');
|
||||
|
||||
if($signinForm.length == 0) throw "no signin form found";
|
||||
events();
|
||||
}
|
||||
|
||||
this.initialize = initialize;
|
||||
this.reset = reset;
|
||||
|
||||
return this;
|
||||
}
|
||||
})(window, jQuery);
|
||||
|
|
@ -1,49 +1,43 @@
|
|||
(function(context,$) {
|
||||
(function (context, $) {
|
||||
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
context.JK = context.JK || {};
|
||||
context.JK = context.JK || {};
|
||||
|
||||
context.JK.SignupDialog = function(app) {
|
||||
var logger = context.JK.logger;
|
||||
var rest = context.JK.Rest();
|
||||
var dialogId = '#signup-dialog';
|
||||
|
||||
function events() {
|
||||
$(dialogId + ' .signup-cancel').click(function(e) {
|
||||
app.layout.closeDialog('signup-dialog');
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(dialogId + ' .show-signin-dialog').click(function(e) {
|
||||
app.layout.closeDialog('signup-dialog')
|
||||
app.layout.showDialog('signin-dialog')
|
||||
return false;
|
||||
})
|
||||
}
|
||||
|
||||
function beforeShow() {
|
||||
|
||||
}
|
||||
|
||||
function afterHide() {
|
||||
|
||||
}
|
||||
|
||||
function initialize(){
|
||||
|
||||
var dialogBindings = {
|
||||
'beforeShow' : beforeShow,
|
||||
'afterHide': afterHide
|
||||
};
|
||||
|
||||
app.bindDialog('signup-dialog', dialogBindings);
|
||||
|
||||
events();
|
||||
}
|
||||
|
||||
this.initialize = initialize;
|
||||
context.JK.SignupDialog = function (app) {
|
||||
var logger = context.JK.logger;
|
||||
var rest = context.JK.Rest();
|
||||
var dialogId = '#signup-dialog';
|
||||
var $dialog = null;
|
||||
var signupHelper = null;
|
||||
var EVENTS = context.JK.EVENTS;
|
||||
|
||||
function beforeShow() {
|
||||
}
|
||||
|
||||
function afterHide() {
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
|
||||
var dialogBindings = {
|
||||
'beforeShow': beforeShow,
|
||||
'afterHide': afterHide
|
||||
};
|
||||
|
||||
app.bindDialog('signup-dialog', dialogBindings);
|
||||
|
||||
$dialog = $(dialogId);
|
||||
|
||||
signupHelper = new context.JK.SignupHelper(app);
|
||||
$(signupHelper).on(EVENTS.SHOW_SIGNIN, function () {
|
||||
app.layout.closeDialog('signup-dialog')
|
||||
app.layout.showDialog('signin-dialog')
|
||||
})
|
||||
signupHelper.initialize($dialog);
|
||||
}
|
||||
|
||||
this.initialize = initialize;
|
||||
|
||||
}
|
||||
})(window, jQuery);
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
(function(context,$) {
|
||||
|
||||
"use strict";
|
||||
|
||||
context.JK = context.JK || {};
|
||||
|
||||
context.JK.SignupHelper = function(app) {
|
||||
|
||||
if(!app) throw "no app defined";
|
||||
|
||||
var logger = context.JK.logger;
|
||||
var rest = context.JK.Rest();
|
||||
var $self = $(this);
|
||||
var $parent = null;
|
||||
var $signupCancel = null;
|
||||
var $showSigninDialog = null;
|
||||
var EVENTS = context.JK.EVENTS;
|
||||
|
||||
function events() {
|
||||
$parent.find('.signup-cancel').click(function(e) {
|
||||
app.layout.closeDialog('signup-dialog');
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
|
||||
$parent.find('.show-signin-dialog').click(function(e) {
|
||||
$self.triggerHandler(EVENTS.SHOW_SIGNIN);
|
||||
return false;
|
||||
})
|
||||
}
|
||||
|
||||
function initialize(_$parent){
|
||||
$parent = _$parent;
|
||||
|
||||
$showSigninDialog = $parent.find('.show-signin-dialog')
|
||||
$signupCancel = $parent.find('.signup-cancel')
|
||||
|
||||
if($showSigninDialog.length == 0) throw "no $showSigninDialog found";
|
||||
if($signupCancel.length == 0) throw "no $signupCancel form found";
|
||||
events();
|
||||
}
|
||||
|
||||
this.initialize = initialize;
|
||||
|
||||
return this;
|
||||
}
|
||||
})(window, jQuery);
|
||||
|
|
@ -21,7 +21,9 @@
|
|||
//= require globals
|
||||
//= require AAB_message_factory
|
||||
//= require facebook_helper
|
||||
//= require web/signup_helper
|
||||
//= require web/signupDialog
|
||||
//= require web/signin_helper
|
||||
//= require web/signinDialog
|
||||
//= require web/videoDialog
|
||||
//= require invitationDialog
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
return false;
|
||||
});
|
||||
|
||||
$('#signin').click(function (e) {
|
||||
$('#signin.signin').click(function (e) {
|
||||
if (context.JK.currentUserId) {
|
||||
rest.getUserDetail({id:context.JK.currentUserId})
|
||||
.done(function () {
|
||||
|
|
@ -73,6 +73,12 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('.like-link').click(function() {
|
||||
var like_site = $(this).data('site');
|
||||
JK.GA.trackJKSocial(JK.GA.Categories.jkLike, like_site, JK.clientType());
|
||||
window.open("/endorse/0/"+like_site, '_blank');
|
||||
});
|
||||
}
|
||||
|
||||
context.JK.WelcomePage = initialize;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
}
|
||||
|
||||
.session-wrapper {
|
||||
padding: 10px 35px 5px 35px;
|
||||
padding: 10px 35px 0 35px;
|
||||
white-space: initial;
|
||||
|
||||
h3 {
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
|
||||
.btn-select-files {
|
||||
margin-top: 10px;
|
||||
margin-left:0;
|
||||
margin-left:2px;
|
||||
width:110px;
|
||||
@include border_box_sizing;
|
||||
}
|
||||
|
|
@ -287,11 +287,6 @@
|
|||
#session-step-5 {
|
||||
}
|
||||
|
||||
.session-buttons {
|
||||
padding-right: 30px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
#session-name-disp {
|
||||
font-style:italic;
|
||||
}
|
||||
|
|
@ -319,10 +314,42 @@
|
|||
margin-bottom:20px;
|
||||
}
|
||||
|
||||
#create-session-buttons {
|
||||
margin-top:10px;
|
||||
|
||||
.session-buttons {
|
||||
position:absolute;
|
||||
width:100%;
|
||||
bottom:15px;
|
||||
|
||||
.left-buttons {
|
||||
position:absolute;
|
||||
left:29px;
|
||||
bottom:0;
|
||||
}
|
||||
|
||||
.right-buttons {
|
||||
position:absolute;
|
||||
right:29px;
|
||||
bottom:0;
|
||||
}
|
||||
|
||||
#create-session-buttons {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width:100%;
|
||||
@include border_box_sizing;
|
||||
padding-right:45px;
|
||||
padding-bottom:15px;
|
||||
|
||||
.btn-help {
|
||||
float:left;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.error-text {
|
||||
margin:2px 0 0 2em;
|
||||
|
||||
|
|
@ -346,6 +373,8 @@
|
|||
}
|
||||
|
||||
#create-session-form {
|
||||
position:relative;
|
||||
padding-bottom:50px;
|
||||
.musician_access .dropdown-wrapper {
|
||||
|
||||
width:75px;
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ div[layout-id="ftue3"] {
|
|||
*/
|
||||
|
||||
/* Start Jeff's ftue.css */
|
||||
.signin-overlay {
|
||||
.landing-overlay {
|
||||
z-index:100;
|
||||
width:800px;
|
||||
height:auto;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
@include border_box_sizing;
|
||||
padding-right:45px;
|
||||
padding-bottom:15px;
|
||||
|
||||
}
|
||||
|
||||
.wizard-buttons-holder {
|
||||
|
|
|
|||
|
|
@ -6,4 +6,6 @@
|
|||
*= require client/ftue
|
||||
*= require landing/simple_landing
|
||||
*= require landing/footer
|
||||
*= require users/signinCommon
|
||||
*= require users/signin
|
||||
*/
|
||||
|
|
@ -27,6 +27,11 @@ body {
|
|||
top:0;
|
||||
}
|
||||
|
||||
.landing-overlay {
|
||||
position:relative;
|
||||
top:0;
|
||||
}
|
||||
|
||||
|
||||
strong {
|
||||
font-weight: 600;
|
||||
|
|
@ -92,86 +97,22 @@ strong {
|
|||
|
||||
// all custom CSS for the sign-in page goes here
|
||||
.signin-page {
|
||||
.ftue-inner {
|
||||
line-height:18px;
|
||||
z-index:100;
|
||||
width:300px;
|
||||
height:auto;
|
||||
position:absolute;
|
||||
top:110px;
|
||||
background-color:#333;
|
||||
border: 1px solid #ed3618;
|
||||
margin-left:-150px;
|
||||
|
||||
.overlay-inner {
|
||||
height:auto;
|
||||
margin-left:0;
|
||||
}
|
||||
|
||||
.ftue-left, .ftue-right {
|
||||
|
||||
}
|
||||
|
||||
fieldset[name=text-input]{
|
||||
float:right;
|
||||
margin-right:18px;
|
||||
}
|
||||
|
||||
fieldset[name=signin-options] {
|
||||
float:left;
|
||||
margin:10px 0 0 10px;
|
||||
|
||||
small {
|
||||
float:left;
|
||||
}
|
||||
}
|
||||
|
||||
fieldset[name=actions] {
|
||||
float:right;
|
||||
margin: 10px 19px 0 0;
|
||||
}
|
||||
|
||||
.field {
|
||||
right:0;
|
||||
}
|
||||
|
||||
.email {
|
||||
float:left;
|
||||
margin-right:10px;
|
||||
|
||||
}
|
||||
|
||||
.password {
|
||||
float:left;
|
||||
}
|
||||
|
||||
label {
|
||||
margin:27px 0 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.already-member {
|
||||
|
||||
}
|
||||
|
||||
.keep-logged-in {
|
||||
|
||||
}
|
||||
|
||||
.forgot-password {
|
||||
font-size:11px;
|
||||
float:right;
|
||||
margin:15px 19px 0 0;
|
||||
|
||||
a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.login-error {
|
||||
background-color: #330000;
|
||||
border: 1px solid #990000;
|
||||
padding:4px;
|
||||
}
|
||||
|
||||
.login-error-msg {
|
||||
.signin-cancel {
|
||||
display:none;
|
||||
margin-top:10px;
|
||||
text-align:center;
|
||||
color:#F00;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
fieldset.login-error .login-error-msg {
|
||||
display:block;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
body.signin {
|
||||
|
||||
.signup-common {
|
||||
display:none;
|
||||
|
||||
.signup-cancel {
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
.signin-common {
|
||||
|
||||
div.field {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
div.overlay-inner {
|
||||
height:auto;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom:2px;
|
||||
}
|
||||
|
||||
div.email {
|
||||
margin-top:5px;
|
||||
}
|
||||
|
||||
div.password {
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
div.actions {
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
.login-error {
|
||||
background-color: #330000;
|
||||
border: 1px solid #990000;
|
||||
padding:4px;
|
||||
|
||||
div.actions {
|
||||
margin-top:10px;
|
||||
}
|
||||
}
|
||||
|
||||
.login-error-msg {
|
||||
display:none;
|
||||
margin-top:10px;
|
||||
text-align:center;
|
||||
color:#F00;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
.login-error .login-error-msg {
|
||||
display:block;
|
||||
}
|
||||
|
||||
input[type=text], input[type=password]{
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,59 +1,3 @@
|
|||
#signin-dialog {
|
||||
height:auto;
|
||||
}
|
||||
|
||||
#signin-dialog {
|
||||
|
||||
div.field {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
div.overlay-inner {
|
||||
height:auto;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom:2px;
|
||||
}
|
||||
|
||||
div.email {
|
||||
margin-top:5px;
|
||||
}
|
||||
|
||||
div.password {
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
div.actions {
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
.login-error {
|
||||
background-color: #330000;
|
||||
border: 1px solid #990000;
|
||||
padding:4px;
|
||||
|
||||
div.actions {
|
||||
margin-top:10px;
|
||||
}
|
||||
}
|
||||
|
||||
.login-error-msg {
|
||||
display:none;
|
||||
margin-top:10px;
|
||||
text-align:center;
|
||||
color:#F00;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
.login-error .login-error-msg {
|
||||
display:block;
|
||||
}
|
||||
|
||||
input[type=text], input[type=password]{
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
|
@ -453,6 +453,10 @@ body.web {
|
|||
top:0;
|
||||
}
|
||||
|
||||
.landing-overlay {
|
||||
position:relative;
|
||||
top:0;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 600;
|
||||
|
|
@ -593,4 +597,7 @@ strong {
|
|||
|
||||
body.jam.web.welcome .no-websocket-connection {
|
||||
display:none;
|
||||
}
|
||||
body.jam.web.register .no-websocket-connection {
|
||||
display:none;
|
||||
}
|
||||
|
|
@ -22,5 +22,6 @@
|
|||
*= require web/welcome
|
||||
#= require web/sessions
|
||||
*= require web/events
|
||||
*= require users/signinCommon
|
||||
*= require users/signinDialog
|
||||
*/
|
||||
|
|
@ -3,7 +3,7 @@ class SessionsController < ApplicationController
|
|||
|
||||
layout "web"
|
||||
|
||||
def new
|
||||
def signin
|
||||
@login_error = false
|
||||
@sso = params[:sso]
|
||||
@send_back_to = request.headers['REFERER']
|
||||
|
|
@ -25,7 +25,7 @@ class SessionsController < ApplicationController
|
|||
@login_error = true
|
||||
@sso = params[:sso]
|
||||
@send_back_to = params[:send_back_to]
|
||||
render 'new', :layout => "landing"
|
||||
render 'signin', :layout => "landing"
|
||||
else
|
||||
|
||||
if jkclient_agent?
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ module ClientHelper
|
|||
def gon_setup
|
||||
|
||||
gon.root_url = root_url
|
||||
gon.client_path = client_path
|
||||
# use gon to pass variables into javascript
|
||||
if Rails.env == "development"
|
||||
# if in development mode, we assume you are running websocket-gateway
|
||||
|
|
|
|||
|
|
@ -30,4 +30,18 @@
|
|||
%li In the resulting screen, drag the JamKazam icon to the Applications folder. It will show a progress bar as it copies.
|
||||
%li Double-click the Applications folder to go into it.
|
||||
%li If you are still running the JamKazam application, you will need to stop it before executing the last step.
|
||||
%li Find the JamKazam application in the Applications folder, and double-click the icon to launch it!
|
||||
%li Find the JamKazam application in the Applications folder, and double-click the icon to launch it!
|
||||
|
||||
%script{type: 'text/template', id: 'template-shutdown-prompt'}
|
||||
.shutdown-prompt
|
||||
We strongly recommend that you leave the JamKazam application running in the background.
|
||||
This is a very lightweight app that will not disrupt your use of your computer and other applications, and leaving this app running will deliver the following benefits to you:
|
||||
%ul
|
||||
%li
|
||||
%span.definition Scoring Service
|
||||
= '- If you leave the app running, there is a service that can check your Internet latency to other JamKazam users. This is critical data that will guide you on which musicians and which sessions will offer a good online play experience.'
|
||||
%li
|
||||
%span.definition Recordings
|
||||
= '- If you leave the app running, any recordings that you and others have made during sessions can be mastered - i.e. uploaded, mixed on our servers, and downloaded back to your computer - so that you have high quality versions of your recordings available.'
|
||||
|
||||
Please consider leaving this lightweight app running in the background for your own benefit, thanks!
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
This is good option to choose if you just want to jump into a quick test session alone to make
|
||||
sure you audio gear is working properly, and to familiarize yourself with the session interface.
|
||||
Choosing this option will set your session to private so that you won't be disturbed, and will
|
||||
set other options to defaults. To use this option, just click the NEXT buttono to proceed.
|
||||
set other options to defaults. To use this option, just click the NEXT button to proceed.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -407,14 +407,17 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="session-buttons">
|
||||
<div id="create-session-buttons" class="right"></div>
|
||||
<div class="clearall"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearall"></div>
|
||||
<div class="session-buttons">
|
||||
<div id="create-session-buttons" class="right"></div>
|
||||
<div class="clearall"></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="clearall"></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -438,9 +441,13 @@
|
|||
|
||||
<script type="text/template" id="template-session-buttons">
|
||||
<div class="sessionbuttons-holder">
|
||||
<a class="button-orange btn-help" href="http://jamkazam.desk.com/" target="_blank">HELP</a>
|
||||
<a class="button-orange btn-back" href="#">BACK</a>
|
||||
<div class="left-buttons">
|
||||
<a class="button-grey btn-help" href="http://jamkazam.desk.com/" target="_blank">HELP</a>
|
||||
</div>
|
||||
<div class="right-buttons">
|
||||
<a class="button-grey btn-back" href="#">BACK</a>
|
||||
<a class="button-orange btn-next" href="#">NEXT</a>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,15 @@
|
|||
// you need to be logged in to use this part of the interface.
|
||||
// save original URL, and redirect to the home page
|
||||
logger.debug("redirecting back to / because not logged in")
|
||||
window.location.href = '/?redirect-to=' + encodeURIComponent(JK.locationPath());
|
||||
|
||||
var redirectPath= '?redirect-to=' + encodeURIComponent(JK.locationPath());
|
||||
if(gon.isNativeClient) {
|
||||
window.location.href = '/signin' + redirectPath;
|
||||
}
|
||||
else {
|
||||
window.location.href = '/' + redirectPath;
|
||||
}
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
|
|
@ -130,6 +138,9 @@
|
|||
if (this.didInitAfterConnect) return;
|
||||
this.didInitAfterConnect = true
|
||||
|
||||
var shutdownDialog = new JK.ShutdownDialog(JK.app);
|
||||
shutdownDialog.initialize();
|
||||
|
||||
// This is a helper class with a singleton. No need to instantiate.
|
||||
JK.GenreSelectorHelper.initialize(JK.app);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<%= render "layouts/social_meta" %>
|
||||
<% end %>
|
||||
</head>
|
||||
<body class="jam">
|
||||
<body class="jam landing <%= yield(:page_name) %>">
|
||||
<div id="landing-container">
|
||||
<%= javascript_include_tag "landing/landing" %>
|
||||
|
||||
|
|
@ -63,14 +63,22 @@
|
|||
JK.currentUserId = '<%= current_user.id %>';
|
||||
JK.currentUserAvatarUrl = JK.resolveAvatarUrl('<%= current_user.photo_url %>');
|
||||
JK.currentUserName = '<%= current_user.name %>';
|
||||
JK.currentUserMusician = '<%= current_user.musician %>';
|
||||
<% else %>
|
||||
JK.currentUserId = null;
|
||||
JK.currentUserAvatarUrl = null;
|
||||
JK.currentUserName = null;
|
||||
JK.currentUserMusician = null;
|
||||
<% end %>
|
||||
|
||||
JK.app = JK.JamKazam();
|
||||
|
||||
JK.app.initialize({inClient: false, layoutOpts: {layoutFooter: false, sizeOverlayToContent: true}});
|
||||
})
|
||||
</script>
|
||||
|
||||
<%= yield(:extra_js) %>
|
||||
|
||||
<%= render "shared/ga" %>
|
||||
<!-- version info: <%= version %> -->
|
||||
</body>
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
<% provide(:title, 'Sign in') %>
|
||||
<div class="signin-overlay signin-page">
|
||||
|
||||
<!-- ftue header -->
|
||||
<div class="content-head">
|
||||
<h1>sign in or register</h1>
|
||||
</div>
|
||||
|
||||
<!-- inner wrapper -->
|
||||
<div class="ftue-inner">
|
||||
|
||||
<!-- sign in left column -->
|
||||
<div class="ftue-left"><br />
|
||||
|
||||
<span class="white already-member"><strong>Already a member?</strong></span>
|
||||
Enter your email address and password:
|
||||
|
||||
<div>
|
||||
<%= form_for(:session, url: signin_path + (request.query_string.blank? ? '' : '?' + request.query_string)) do |f| %>
|
||||
<input type="hidden" name="sso" value="<%= @sso %>">
|
||||
<input type="hidden" name="send_back_to" value="<%= @send_back_to %>">
|
||||
<fieldset name="text-input" class="<%= 'login-error' if @login_error %>">
|
||||
|
||||
<div class="field email">
|
||||
<%= f.label :email, "Email Address:" %>
|
||||
<%= f.text_field :email, :autofocus=>true %>
|
||||
</div>
|
||||
|
||||
<div class="field password">
|
||||
<%= f.label :password, "Password:" %>
|
||||
<%= f.password_field :password %>
|
||||
</div>
|
||||
|
||||
<br clear="all" />
|
||||
<div class="login-error-msg">Invalid login</div>
|
||||
</fieldset>
|
||||
|
||||
<br clear="all" />
|
||||
|
||||
<fieldset name="signin-options">
|
||||
<script type="text/javascript">
|
||||
if(window.jamClient === undefined) {
|
||||
document.write('<input name="user[remember_me]" type="hidden" value="0">');
|
||||
document.write('<small><input type="checkbox" class="keep-logged-in" value="1" name="user[remember_me]" id="user_remember_me" checked> Keep me logged in</small>');
|
||||
}
|
||||
</script>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="actions">
|
||||
<%= f.submit "SIGN IN", class: "button-orange m0" %>
|
||||
</fieldset>
|
||||
|
||||
<br clear="all" />
|
||||
|
||||
<div class="forgot-password"><a href="/request_reset_password">Forgot Password?</a></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end left column -->
|
||||
|
||||
<!-- sign in right column -->
|
||||
<div class="ftue-right">
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<div align="center"><span class="white"><strong>Not a member?</strong></span> Join JamKazam for free:<br>
|
||||
<br>
|
||||
<a href="/signup" rel="external" class="button-orange">REGISTER NOW</a>
|
||||
</div>
|
||||
<!-- end right column -->
|
||||
|
||||
|
||||
</div>
|
||||
<br clear="all">
|
||||
<!--
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<span class="white"><strong>Have a Facebook account?</strong></span> Login or
|
||||
register via Facebook:<br>
|
||||
<br>
|
||||
<a href="/auth/facebook">
|
||||
<%= image_tag "content/button_facebook.png", {:height => 34, :width => 245} %>
|
||||
</a><br>
|
||||
<br>
|
||||
We recommend using <span class="white"><strong>Connect with Facebook</strong></span> because it will make it easier to find and/or invite your musician friends using the JamKazam service.
|
||||
-->
|
||||
</div>
|
||||
<!-- end right column -->
|
||||
|
||||
</div>
|
||||
<!-- end inner -->
|
||||
<!-- end overlay content -->
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
- provide(:title, 'Sign in')
|
||||
- provide(:page_name, 'signin')
|
||||
|
||||
.signin-overlay.signin-page
|
||||
.content-head
|
||||
%h1 sign in or register
|
||||
|
||||
= render "users/signin"
|
||||
|
||||
= render "users/signup"
|
||||
|
||||
%br{clear: 'all'}
|
||||
|
||||
- content_for :extra_js do
|
||||
:javascript
|
||||
$(function () {
|
||||
window.JK.SigninPage();
|
||||
})
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="signin-overlay">
|
||||
<div class="landing-overlay">
|
||||
|
||||
<!-- ftue header -->
|
||||
<div class="content-head">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
.overlay-inner.signin-common
|
||||
= link_to image_tag("content/button_facebook_signin.png", {:width => 249, :height => 46}), '/auth/facebook', class: "signin-facebook"
|
||||
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%strong.white Or sign in with JamKazam Account
|
||||
%br
|
||||
%br
|
||||
|
||||
= form_for(:session, url: signin_path + (request.query_string.blank? ? '' : '?' + request.query_string), html: {class:"signin-form #{'login-error' if @login_error}"}) do |f|
|
||||
%input{type:'hidden', name: 'sso', value: @sso}
|
||||
%input{type:'hidden', name: 'send_back_to', value: @send_back_to}
|
||||
|
||||
.field.email
|
||||
= f.label :email, "Email Address:"
|
||||
= f.text_field :email, autofocus: true
|
||||
|
||||
.field.password
|
||||
= f.label :password, "Password:"
|
||||
= f.password_field :password, autofocus: true
|
||||
|
||||
:javascript
|
||||
if(window.jamClient === undefined) {
|
||||
document.write('<input name="user[remember_me]" type="hidden" value="0">');
|
||||
document.write('<small><input type="checkbox" name="remember_me" class="keep-logged-in" value="1" name="user[remember_me]" id="user_remember_me" checked> Keep me logged in</small>');
|
||||
} else {
|
||||
document.write('<input name="user[remember_me]" type="hidden" value="1">');
|
||||
}
|
||||
|
||||
.login-error-msg Invalid login
|
||||
|
||||
%br{clear:'all'}
|
||||
|
||||
.actions{align: 'center'}
|
||||
%a.button-grey.signin-cancel{href:'#' } CANCEL
|
||||
= f.submit "SIGN IN",class: 'button-orange signin-submit'
|
||||
%br
|
||||
%br
|
||||
%small
|
||||
%a.forgot-password{href:'/request_reset_password'} Forgot Password?
|
||||
|
||||
%br
|
||||
|
||||
.center
|
||||
%small
|
||||
Don't have an account?
|
||||
%a.show-signup-dialog{href: '#'} Sign Up
|
||||
|
|
@ -1,66 +1,11 @@
|
|||
<div class="dialog thin-dialog overlay-small" layout-id="signin-dialog" id="signin-dialog">
|
||||
|
||||
<!-- ftue header -->
|
||||
<div class="content-head">
|
||||
<h1>sign in</h1>
|
||||
</div>
|
||||
|
||||
<!-- inner wrapper -->
|
||||
<div class="overlay-inner">
|
||||
<%= render "users/signin" %>
|
||||
|
||||
<%= link_to image_tag("content/button_facebook_signin.png", {:width => 249, :height => 46}), '/auth/facebook', class: "signin-facebook" %>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<strong class="white">Or sign in with JamKazam Account</strong>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<form id="signin-form" method="post" action="/">
|
||||
|
||||
<div class="field email">
|
||||
<label for="email">Email Address:</label>
|
||||
<input type="text" name="email"/>
|
||||
</div>
|
||||
|
||||
<div class="field password">
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" name="password"/>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
if(window.jamClient === undefined) {
|
||||
document.write('<input name="user[remember_me]" type="hidden" value="0">');
|
||||
document.write('<small><input type="checkbox" name="remember_me" class="keep-logged-in" value="1" name="user[remember_me]" id="user_remember_me" checked> Keep me logged in</small>');
|
||||
} else {
|
||||
document.write('<input name="user[remember_me]" type="hidden" value="1">');
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="login-error-msg">Invalid login</div>
|
||||
|
||||
<br clear="all"/>
|
||||
|
||||
<div align="center" class="actions">
|
||||
|
||||
<a href="#" class="button-grey signin-cancel">CANCEL</a> <input type="submit" value="SIGN IN" href="#" class="button-orange m0 signin-submit" />
|
||||
<br>
|
||||
<br>
|
||||
<small><a class='forgot-password' href="/request_reset_password">Forgot Password?</a></small>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<div class="center">
|
||||
<small>Don't have an account? <a href="#" class="show-signup-dialog">Sign Up</a></small>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- end inner -->
|
||||
<br clear="all">
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
.overlay-inner.signup-common
|
||||
= link_to image_tag("content/button_facebook_signup.png", {:width => 249, :height => 46 }), '/auth/facebook', class: "signup-facebook"
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
.center
|
||||
%strong.white Or
|
||||
%br
|
||||
%br
|
||||
.center
|
||||
= link_to "SIGN UP WITH YOUR EMAIL", signup_path, class: "button-orange block signup-email"
|
||||
%br
|
||||
.center
|
||||
%small
|
||||
Already have an account?
|
||||
%a.show-signin-dialog{href: '#'} Sign In
|
||||
%br
|
||||
%br
|
||||
%a.signup-cancel{href: '#'} Cancel
|
||||
%br{clear: 'all'}
|
||||
|
|
@ -5,29 +5,6 @@
|
|||
<h1>sign up for jamkazam</h1>
|
||||
</div>
|
||||
|
||||
<!-- inner wrapper -->
|
||||
<div class="overlay-inner">
|
||||
|
||||
<%= link_to image_tag("content/button_facebook_signup.png", {:width => 249, :height => 46 }), '/auth/facebook', class: "signup-facebook" %>
|
||||
<br>
|
||||
<br><br>
|
||||
|
||||
<div class="center"><strong class="white">Or</strong></div>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<div class="center"><%= link_to "SIGN UP WITH YOUR EMAIL", signup_path, class: "button-orange block signup-email" %>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="center">
|
||||
<small>Already have an account? <a href="#" class='show-signin-dialog'>Sign In</a><br>
|
||||
<br>
|
||||
<a href="#" class="signup-cancel">Cancel</a></small>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end inner -->
|
||||
<br clear="all">
|
||||
</div>
|
||||
<%= render "users/signup" %>
|
||||
<!-- end overlay content -->
|
||||
</div>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<% provide(:title, 'Already Signed Up') %>
|
||||
|
||||
<div class="signin-overlay">
|
||||
<div class="landing-overlay">
|
||||
<!-- ftue header -->
|
||||
<div class="content-head">
|
||||
<h1>You have already signed up with this invitation</h1>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<% provide(:title, 'Register') %>
|
||||
<% provide(:page_name, 'register') %>
|
||||
<% provide(:title, 'Register') %>
|
||||
|
||||
<div class="content-wrapper register-page">
|
||||
<h2>Create a JamKazam account</h2>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<% provide(:title, "Reset password") %>
|
||||
<div class="signin-overlay">
|
||||
<% provide(:page_name, "request-reset-password") %>
|
||||
|
||||
<div class="landing-overlay">
|
||||
|
||||
<!-- ftue header -->
|
||||
<div class="content-head">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<% provide(:title, "Reset password") %>
|
||||
<div class="signin-overlay">
|
||||
<div class="landing-overlay">
|
||||
|
||||
<!-- ftue header -->
|
||||
<div class="content-head">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<% provide(:title, "Reset password") %>
|
||||
|
||||
<div class="signin-overlay">
|
||||
<div class="landing-overlay">
|
||||
|
||||
<!-- ftue header -->
|
||||
<div class="content-head">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<% provide(:title, "Reset password") %>
|
||||
|
||||
<div class="signin-overlay">
|
||||
<div class="landing-overlay">
|
||||
|
||||
<!-- ftue header -->
|
||||
<div class="content-head">
|
||||
|
|
|
|||
|
|
@ -30,12 +30,6 @@
|
|||
:javascript
|
||||
$(function () {
|
||||
window.JK.WelcomePage();
|
||||
|
||||
$('.like-link').click(function() {
|
||||
var like_site = $(this).data('site');
|
||||
JK.GA.trackJKSocial(JK.GA.Categories.jkLike, like_site, JK.clientType());
|
||||
window.open("/endorse/0/"+like_site, '_blank');
|
||||
});
|
||||
})
|
||||
|
||||
- content_for :extra_dialogs do
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ SampleApp::Application.routes.draw do
|
|||
match '/congratulations_fan', to: 'users#congratulations_fan'
|
||||
match '/downloads', to: 'users#downloads'
|
||||
|
||||
match '/signin', to: 'sessions#new', via: :get
|
||||
match '/signin', to: 'sessions#signin', via: :get
|
||||
match '/signin', to: 'sessions#create', via: :post
|
||||
match '/signout', to: 'sessions#destroy', via: :delete
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ describe SessionsController do
|
|||
|
||||
describe "GET 'new'" do
|
||||
it "should work" do
|
||||
get :new
|
||||
get :signin
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
it "should have the right title" do
|
||||
get :new
|
||||
get :signin
|
||||
response.body.should have_title("JamKazam | Sign in")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe "signin" do
|
||||
describe "signin" do
|
||||
|
||||
subject { page }
|
||||
|
||||
|
|
@ -12,8 +12,8 @@ describe "signin" do
|
|||
|
||||
it "success" do
|
||||
visit signin_path
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
|
||||
find('.curtain', text: 'Connecting...')
|
||||
|
|
@ -21,8 +21,8 @@ describe "signin" do
|
|||
|
||||
it "success with redirect" do
|
||||
visit signin_path + '?' + {'redirect-to' => '/'}.to_query
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
|
||||
find('h1', text: 'Play music together over the Internet as if in the same room')
|
||||
|
|
@ -32,15 +32,15 @@ describe "signin" do
|
|||
it 'failure, then success with redirect' do
|
||||
|
||||
visit signin_path + '?' + {'redirect-to' => '/'}.to_query
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: 'wrong'
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: 'wrong'
|
||||
click_button "SIGN IN"
|
||||
|
||||
find('h1', text:'sign in or register')
|
||||
find('.login-error')
|
||||
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
|
||||
find('h1', text: 'Play music together over the Internet as if in the same room')
|
||||
|
|
@ -48,8 +48,8 @@ describe "signin" do
|
|||
|
||||
it "success with forum sso" do
|
||||
visit signin_path + '?' + {:sso => :forums}.to_query
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
|
||||
find('h1', text: 'welcome to fake login page')
|
||||
|
|
@ -64,15 +64,15 @@ describe "signin" do
|
|||
it "failure, then success with forum sso" do
|
||||
visit signin_path + '?' + {:sso => :forums}.to_query
|
||||
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: 'wrong'
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: 'wrong'
|
||||
click_button "SIGN IN"
|
||||
|
||||
find('h1', text:'sign in or register')
|
||||
find('.login-error')
|
||||
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
|
||||
find('h1', text: 'welcome to fake login page')
|
||||
|
|
@ -87,8 +87,8 @@ describe "signin" do
|
|||
it "success with forum sso w/ custom redirect" do
|
||||
visit signin_path + '?' + {:sso => :forums, send_back_to: '/junk'}.to_query
|
||||
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
|
||||
find('h1', text: 'welcome to fake login page')
|
||||
|
|
@ -105,8 +105,8 @@ describe "signin" do
|
|||
it "redirects back to /client" do
|
||||
visit signin_path
|
||||
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
find('.curtain', text: 'Connecting...')
|
||||
|
||||
|
|
@ -118,8 +118,8 @@ describe "signin" do
|
|||
it "redirects back to forum if sso=forum" do
|
||||
visit signin_path
|
||||
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
find('.curtain', text: 'Connecting...')
|
||||
|
||||
|
|
@ -131,6 +131,14 @@ describe "signin" do
|
|||
|
||||
describe "with javascript", :js => true, :type => :feature, :capybara_feature => true do
|
||||
|
||||
it "shows signup form when asked" do
|
||||
find('.show-signup-dialog').trigger(:click)
|
||||
# toggle back to signin
|
||||
find('.show-signin-dialog').trigger(:click)
|
||||
# toggle back to signup
|
||||
find('.show-signup-dialog').trigger(:click)
|
||||
end
|
||||
|
||||
# if a cookie with the default domain is found with another, delete the one with the default domain
|
||||
it "delete duplicate session cookies" do
|
||||
|
||||
|
|
@ -143,8 +151,8 @@ describe "signin" do
|
|||
|
||||
visit signin_path
|
||||
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
|
||||
find('h1', text: 'Play music together over the Internet as if in the same room')
|
||||
|
|
@ -167,8 +175,8 @@ describe "signin" do
|
|||
|
||||
visit signin_path
|
||||
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
|
||||
find('h1', text: 'Play music together over the Internet as if in the same room')
|
||||
|
|
@ -200,7 +208,6 @@ describe "signin" do
|
|||
end
|
||||
|
||||
|
||||
|
||||
it "can't signout with custom domain for cookie" do
|
||||
sign_in_poltergeist(user)
|
||||
original = Rails.application.config.session_cookie_domain
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ describe "Welcome", :js => true, :type => :feature, :capybara_feature => true d
|
|||
describe "signin natively" do
|
||||
|
||||
it "redirects to client on login" do
|
||||
within('#signin-form') do
|
||||
fill_in "email", with: user.email
|
||||
fill_in "password", with: user.password
|
||||
within('.signin-form') do
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
end
|
||||
|
||||
|
|
@ -74,9 +74,9 @@ describe "Welcome", :js => true, :type => :feature, :capybara_feature => true d
|
|||
end
|
||||
|
||||
it "shows error if bad login" do
|
||||
within('#signin-form') do
|
||||
fill_in "email", with: "junk"
|
||||
fill_in "password", with: user.password
|
||||
within('.signin-form') do
|
||||
fill_in "Email Address:", with: "junk"
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
end
|
||||
|
||||
|
|
@ -91,11 +91,10 @@ describe "Welcome", :js => true, :type => :feature, :capybara_feature => true d
|
|||
it "redirect on login" do
|
||||
visit "/client#/account"
|
||||
find('.curtain')
|
||||
find('h1', text: 'Play music together over the Internet as if in the same room')
|
||||
find('#signin').trigger(:click)
|
||||
within('#signin-form') do
|
||||
fill_in "email", with: user.email
|
||||
fill_in "password", with: user.password
|
||||
find('h1', text: 'sign in or register')
|
||||
within('.signin-form') do
|
||||
fill_in "Email Address:", with: user.email
|
||||
fill_in "Password:", with: user.password
|
||||
click_button "SIGN IN"
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue