Browse Source

Added buddy classes to let css react on component hide/show stuff.

pull/12/head
Simon Eisenmann 11 years ago committed by Simon Eisenmann
parent
commit
90f3eb8724
  1. 4
      html/main.html
  2. 6
      src/styles/components/_audiovideo.scss
  3. 6
      src/styles/components/_rightslide.scss
  4. 8
      src/styles/components/_usability.scss
  5. 8
      static/js/controllers/mediastreamcontroller.js

4
html/main.html

@ -3,7 +3,7 @@
<head> <head>
<%template "head" .%> <%template "head" .%>
</head> </head>
<body ng-controller="MediastreamController"> <body ng-controller="MediastreamController" ng-class="{withBuddylist: showBuddylist, withChat: chatEnabled, withSettings: showSettings, slideright: !showBuddylist}">
<div id="background"></div> <div id="background"></div>
<div id="loader"><div><i class="fa fa-spinner fa-spin"></i></div></div> <div id="loader"><div><i class="fa fa-spinner fa-spin"></i></div></div>
<div class="ng-cloak" id="help"> <div class="ng-cloak" id="help">
@ -36,7 +36,7 @@
<div id="screenshare" class="ng-cloak mainview" ng-show="mainview=='screenshare'"> <div id="screenshare" class="ng-cloak mainview" ng-show="mainview=='screenshare'">
<screenshare/> <screenshare/>
</div> </div>
<div class="ng-cloak nicescroll" id="rightslide" ng-show="roomstatus" ng-class="{slideright: !showBuddylist}"> <div class="ng-cloak nicescroll" id="rightslide" ng-show="roomstatus">
<div class="rightslidepane"> <div class="rightslidepane">
<div id="buddylist"><buddy-list/></div> <div id="buddylist"><buddy-list/></div>
<div id="chat"><chat/></div> <div id="chat"><chat/></div>

6
src/styles/components/_audiovideo.scss

@ -33,6 +33,12 @@ bottom:0px;
left:0px; left:0px;
background:black; background:black;
} }
.withChat #audiovideo, .withBuddylist #audiovideo {
right:260px;
}
.withBuddylist.withChat #audiovideo {
right:520px;
}
#audiovideo.fullscreen .remoteVideo .peeractions { #audiovideo.fullscreen .remoteVideo .peeractions {
display:none; display:none;
} }

6
src/styles/components/_rightslide.scss

@ -1,7 +1,7 @@
#rightslide { #rightslide {
position: absolute; position: absolute;
top: 44px; top: 44px;
right: 0px; right: -260px;
bottom: 0px; bottom: 0px;
left: 0px; left: 0px;
z-index:5; z-index:5;
@ -14,8 +14,8 @@ pointer-events:none;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
} }
#rightslide.slideright { .withBuddylist #rightslide {
right:-260px; right:0px;
} }
#rightslide .rightslidepane { #rightslide .rightslidepane {
position:relative; position:relative;

8
src/styles/components/_usability.scss

@ -28,6 +28,14 @@ width:350px;
font-size:1.1em; font-size:1.1em;
color:#aaa; color:#aaa;
margin: 0 auto; margin: 0 auto;
-webkit-transition: left 200ms ease-in-out;
-moz-transition: left 200ms ease-in-out;
-ms-transition: left 200ms ease-in-out;
-o-transition: left 200ms ease-in-out;
transition: left 200ms ease-in-out;
}
.withSettings #help, .withChat.withBuddylist #help {
left:-22%;
} }
#help > div { #help > div {
margin-left:-55%; margin-left:-55%;

8
static/js/controllers/mediastreamcontroller.js

@ -20,7 +20,7 @@
*/ */
define(['underscore', 'bigscreen', 'moment', 'webrtc.adapter'], function(_, BigScreen, moment) { define(['underscore', 'bigscreen', 'moment', 'webrtc.adapter'], function(_, BigScreen, moment) {
return ["$scope", "$rootScope", "$window", "$timeout", "safeDisplayName", "safeApply", "mediaStream", "appData", "playSound", "desktopNotify", "alertify", "toastr", "translation", "fileDownload", function($scope, $rootScope, $window, $timeout, safeDisplayName, safeApply, mediaStream, appData, playSound, desktopNotify, alertify, toastr, translation, fileDownload) { return ["$scope", "$rootScope", "$element", "$window", "$timeout", "safeDisplayName", "safeApply", "mediaStream", "appData", "playSound", "desktopNotify", "alertify", "toastr", "translation", "fileDownload", function($scope, $rootScope, $element, $window, $timeout, safeDisplayName, safeApply, mediaStream, appData, playSound, desktopNotify, alertify, toastr, translation, fileDownload) {
/*console.log("route", $route, $routeParams, $location);*/ /*console.log("route", $route, $routeParams, $location);*/
@ -552,6 +552,12 @@ define(['underscore', 'bigscreen', 'moment', 'webrtc.adapter'], function(_, BigS
} }
}); });
$scope.$watch(function() {
return $element.attr("class");
}, function() {
$scope.$broadcast("mainresize");
});
mediaStream.webrtc.e.on("done", function() { mediaStream.webrtc.e.on("done", function() {
if (mediaStream.connector.connected) { if (mediaStream.connector.connected) {
$scope.setStatus("waiting"); $scope.setStatus("waiting");

Loading…
Cancel
Save