* adding welcome.js

This commit is contained in:
Seth Call 2014-02-02 22:25:59 +00:00
parent ef6e3f5fa8
commit aa68a4e2f4
8 changed files with 52 additions and 15 deletions

View File

@ -49,6 +49,10 @@
}
function loadMe() {
if(!context.JK.currentUserId) {
return;
}
$.ajax({
url: '/api/users/' + context.JK.currentUserId
}).done(function(r) {

View File

@ -11,12 +11,15 @@
function events() {
}
function beforeShow() {
}
function afterHide() {
}
function initialize(){
@ -26,9 +29,10 @@
'afterHide': afterHide
};
app.bindDialog('inviteUsers', dialogBindings);
app.bindDialog('signup-dialog', dialogBindings);
console.log("honuth")
events();
}
this.initialize = initialize;

View File

@ -0,0 +1,17 @@
(function(context,$) {
"use strict";
context.JK = context.JK || {};
function initialize() {
$('#signup').click(function(e) {
context.JK.app.layout.showDialog('signup-dialog');
e.preventDefault();
return false;
});
}
initialize()
})(window, jQuery);

View File

@ -10,6 +10,10 @@
z-index: 100;
}
.thin-dialog {
min-width: 100px;
}
.dialog-inner {
padding:25px;
color:#aaa;

View File

@ -131,6 +131,14 @@ input[type="button"] {
font-size:11px;
}
.center {
text-align:center;
}
.block {
display:block;
}
.orange {
color: $ColorScreenPrimary !important;
}

View File

@ -62,19 +62,17 @@
JK.currentUserId = null;
<% end %>
if (JK.currentUserId) {
JK.app = JK.JamKazam();
JK.app.initialize({inClient: false, layoutOpts: {layoutFooter: false}});
JK.app = JK.JamKazam();
JK.app.initialize({inClient: false, layoutOpts: {layoutFooter: false}});
var invitationDialog = new JK.InvitationDialog(JK.app);
invitationDialog.initialize();
var invitationDialog = new JK.InvitationDialog(JK.app);
invitationDialog.initialize();
var userDropdown = new JK.UserDropdown(JK.app);
userDropdown.initialize(invitationDialog);
var userDropdown = new JK.UserDropdown(JK.app);
userDropdown.initialize(invitationDialog);
var signupDialog = new JK.SignupDialog(JK.app);
signupDialog.initialize();
}
var signupDialog = new JK.SignupDialog(JK.app);
signupDialog.initialize();
})
</script>

View File

@ -1,4 +1,4 @@
<div class="dialog overlay-small" layout-id="signup" id="signup-dialog">
<div class="dialog thin-dialog overlay-small" layout-id="signup-dialog" id="signup-dialog">
<!-- ftue header -->
<div class="content-head">

View File

@ -3,7 +3,7 @@
<% end %>
<div class="clearall"></div>
<div class="login-wrapper">
<%= link_to image_tag("/assets/web/cta_button.png", :alt => "Sign up now for your free account!"), signup_path, class: "signup", id: "signup", :'layout-link' => 'signup-dialog' %>
<%= link_to image_tag("/assets/web/cta_button.png", :alt => "Sign up now for your free account!"), '#', class: "signup", id: "signup" %>
<div class="clearall"></div>
<%= link_to "Already have an account?", signin_path, class: "signin", id: "signin" %>
</div>
@ -13,4 +13,6 @@
Have questions about how JamKazam works?
<a href="#" id="faq-open">Here are some answers</a>.
<% end %>
<% end %>
<% end %>
<%= javascript_include_tag "web/welcome" %>