diff --git a/app/assets/javascripts/landing.js b/app/assets/javascripts/landing.js new file mode 100644 index 000000000..8efdb9929 --- /dev/null +++ b/app/assets/javascripts/landing.js @@ -0,0 +1,23 @@ +/** +* Javascript for controlling the landing page. +* This is the page you'll see when you visit the +* client home page without being logged in. +*/ +(function(context,$) { + + context.JK = context.JK || {}; + + context.JK.LandingPage = function() { + var logger = context.JK.logger; + logger.debug("Landing Page TODO"); + + this.initialize = function() { + $('div[layout="landing"]').show(); + JK.hideCurtain(400); + }; + + return this; + + }; + + }(window,jQuery)); \ No newline at end of file diff --git a/app/assets/javascripts/layout.js b/app/assets/javascripts/layout.js index 0e6bbadd5..d1f403fed 100644 --- a/app/assets/javascripts/layout.js +++ b/app/assets/javascripts/layout.js @@ -10,6 +10,16 @@ (function(context,$) { context.JK = context.JK || {}; + + // Static function to hide the 'curtain' which hides the underlying + // stuff until we can get it laid out. Called from both the main + // client as well as the landing page. + context.JK.hideCurtain = function(duration) { + setTimeout(function() { + $('.curtain').fadeOut(2*duration); + }, duration); + }; + context.JK.Layout = function() { // privates @@ -49,19 +59,13 @@ $('[layout="sidebar"]').show(); $('[layout="panel"]').show(); layout(); - hideCurtain(); + JK.hideCurtain(opts.animationDuration); } function setInitialExpandedSidebarPanel() { expandedPanel = $('[layout="panel"]').first().attr("layout-id"); } - function hideCurtain() { - setTimeout(function() { - $('.curtain').fadeOut(2*opts.animationDuration); - }, opts.animationDuration); - } - function layout() { width = $(window).width(); height = $(window).height(); diff --git a/app/assets/javascripts/utils.js b/app/assets/javascripts/utils.js index 0698d6d67..b42338c12 100644 --- a/app/assets/javascripts/utils.js +++ b/app/assets/javascripts/utils.js @@ -15,7 +15,6 @@ return template; }; - /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. diff --git a/app/assets/stylesheets/client/jamkazam.css.scss b/app/assets/stylesheets/client/jamkazam.css.scss index c105e9bbe..bdc1311ad 100644 --- a/app/assets/stylesheets/client/jamkazam.css.scss +++ b/app/assets/stylesheets/client/jamkazam.css.scss @@ -82,6 +82,7 @@ label { } .notify { + display:none; background-color: $color8; color:#000; overflow:auto; @@ -92,6 +93,7 @@ label { } .dialog { + display:none; background-color:$color8; border: #666; color:#000; @@ -158,6 +160,10 @@ label { background: scale-lightness($color7, 10%); } +.screen { + display:none; +} + .screen.secondary { } .buttonrow, .screen.secondary .footer { diff --git a/app/controllers/clients_controller.rb b/app/controllers/clients_controller.rb index fad1d3213..915f40046 100644 --- a/app/controllers/clients_controller.rb +++ b/app/controllers/clients_controller.rb @@ -2,9 +2,6 @@ class ClientsController < ApplicationController include UsersHelper - # have to be signed in currently to see this screen - before_filter :signed_in_user - def index # use gon to pass variables into javascript gon.websocket_gateway_uri = Rails.application.config.websocket_gateway_uri diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index e5e5f6b6f..37398285f 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -59,12 +59,12 @@ class SessionsController < ApplicationController def complete_sign_in(user) sign_in user - redirect_back_or music_sessions_url + redirect_back_or client_url end def destroy sign_out - redirect_to root_url + redirect_to client_url end def failure diff --git a/app/views/clients/index.html.erb b/app/views/clients/index.html.erb index b52d70c06..55f293a7b 100644 --- a/app/views/clients/index.html.erb +++ b/app/views/clients/index.html.erb @@ -1,6 +1,16 @@ -
-