From 943b81b851572b2d6a62b70bf36e1639d324c47d Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Mon, 17 Mar 2014 01:42:14 +0100 Subject: [PATCH] Implemented page loader. --- html/main.html | 4 +-- src/styles/components/_usability.scss | 2 +- src/styles/global/_base.scss | 13 ++++++++ static/js/directives/directives.js | 8 +++-- static/js/directives/usability.js | 11 +++---- static/partials/usability.html | 43 --------------------------- 6 files changed, 26 insertions(+), 55 deletions(-) diff --git a/html/main.html b/html/main.html index 1ebcaef6..196232ff 100644 --- a/html/main.html +++ b/html/main.html @@ -6,9 +6,7 @@
-
- -
+
<%template "logo" .%> diff --git a/src/styles/components/_usability.scss b/src/styles/components/_usability.scss index 9c0e075f..a225df91 100644 --- a/src/styles/components/_usability.scss +++ b/src/styles/components/_usability.scss @@ -20,7 +20,7 @@ */ #help { position:absolute; -top:120px; +top:80px; bottom:10px; left:0px; right:0px; diff --git a/src/styles/global/_base.scss b/src/styles/global/_base.scss index 5fc17aa3..f3557244 100644 --- a/src/styles/global/_base.scss +++ b/src/styles/global/_base.scss @@ -100,4 +100,17 @@ z-index:0; } #loader.done { opacity:0; +} +#page { + position:absolute; + top:44px; + bottom:0px; + left:0px; + right:0px; +} +.welcome { + color:#aaa; + text-shadow: 0 0 5px black; + font-size:1.1em; + margin-top:80px; } \ No newline at end of file diff --git a/static/js/directives/directives.js b/static/js/directives/directives.js index e26318b4..48e4e4c0 100644 --- a/static/js/directives/directives.js +++ b/static/js/directives/directives.js @@ -33,8 +33,9 @@ define([ 'directives/fileinfo', 'directives/screenshare', 'directives/roombar', - 'directives/socialshare' -], function(_, onEnter, onEscape, statusMessage, buddyList, settings, chat, audioVideo, usability, audioLevel, fileInfo, screenshare, roomBar, socialShare) { + 'directives/socialshare', + 'directives/page' +], function(_, onEnter, onEscape, statusMessage, buddyList, settings, chat, audioVideo, usability, audioLevel, fileInfo, screenshare, roomBar, socialShare, page) { var directives = { onEnter: onEnter, @@ -49,7 +50,8 @@ define([ fileInfo: fileInfo, screenshare: screenshare, roomBar: roomBar, - socialShare: socialShare + socialShare: socialShare, + page: page }; var initialize = function (angModule) { diff --git a/static/js/directives/usability.js b/static/js/directives/usability.js index 9d3a97bd..04bda034 100644 --- a/static/js/directives/usability.js +++ b/static/js/directives/usability.js @@ -34,7 +34,7 @@ define(['jquery', 'underscore', 'text!partials/usability.html'], function($, _, var ctrl = this; ctrl.setInfo = function(info) { $scope.usabilityInfo = info; - } + }; ctrl.setInfo("waiting"); $scope.continueConnect = function(status) { @@ -45,14 +45,15 @@ define(['jquery', 'underscore', 'text!partials/usability.html'], function($, _, $scope.connect() ctrl.setInfo("initializing"); initializer = $timeout(function() { - ctrl.setInfo("noroom"); + ctrl.setInfo("ok"); + $scope.$emit("welcome"); }, 1000); complete = true; } else { ctrl.setInfo("denied"); } // Check if we should show settings per default. - $scope.showSettings = $scope.loadedUser ? 0 : 1; + $scope.$parent.showSettings = $scope.loadedUser ? 0 : 1; }); }; @@ -91,13 +92,13 @@ define(['jquery', 'underscore', 'text!partials/usability.html'], function($, _, }); $scope.$on("room", function(event, room) { - console.log("roomStatus", room !== null ? true : false); + //console.log("roomStatus", room !== null ? true : false); if (complete) { if (initializer !== null) { $timeout.cancel(initializer); initializer = null; } - ctrl.setInfo(room !== null ? "room" : "noroom"); + ctrl.setInfo("ok"); } }); diff --git a/static/partials/usability.html b/static/partials/usability.html index ac2d510f..a321eff6 100644 --- a/static/partials/usability.html +++ b/static/partials/usability.html @@ -2,49 +2,6 @@
{{_("Checking camera and microphone access.")}}
-
-
-

{{_("Room")}} {{roomid}}

-

{{_("Link:")}}

-

-

- -
-

-

{{_("You are in this room.")}}

- -
    -
  • {{_("Share this URL with the people you want to meet.")}}
  • -
  • {{_("You can use and re-use this room as many times as you want.")}}
  • -
-
- -
-
-

{{_("You are in the general room.")}}

-

{{_('Break out into a seperate room at any time by clicking on the icon in the top left corner.')}}

-
-
-
-

{{_("Create your room")}}

-

{{_("This is your room link:")}}

-

-

- - - - -
-

-

{{_("Just click start")}}

- -
    -
  • {{_("Share this URL with the people you want to meet.")}}
  • -
  • {{_("You can use and re-use this room as many times as you want.")}}
  • -
-
- -
{{_("Please allow access to your camera and microphone.")}}
{{_("Camera / microphone access required.")}}