Browse Source

Implemented buddy list toggle icon.

pull/12/head
Simon Eisenmann 11 years ago committed by Simon Eisenmann
parent
commit
0ce3444915
  1. 2
      html/main.html
  2. 34
      src/styles/components/_buddylist.scss
  3. 1
      src/styles/components/_roombar.scss
  4. 12
      static/js/controllers/mediastreamcontroller.js
  5. 1
      static/js/directives/audiovideo.js

2
html/main.html

@ -38,7 +38,7 @@
</div> </div>
<div class="ng-cloak nicescroll" id="rightslide" ng-show="roomstatus"> <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" ng-mouseenter="toggleBuddylist(true)" ng-mouseleave="toggleBuddylist(false)"><buddy-list/></div>
<div id="chat"><chat/></div> <div id="chat"><chat/></div>
</div> </div>
</div> </div>

34
src/styles/components/_buddylist.scss

@ -24,6 +24,26 @@ top: 0px;
right: 0px; right: 0px;
bottom: 0px; bottom: 0px;
width:285px; width:285px;
pointer-events:auto;
}
#buddylist:before {
position:absolute;
width:25px;
height:25px;
margin: auto;
left: 0px;
top:0px;
bottom:0px;
content:"\f100";
font-family: 'FontAwesome';
color:#ccc;
font-size:1.8em;
text-align:center;
cursor:pointer;
text-shadow: 0 0 5px black;
}
.withBuddylist #buddylist:before {
display:none;
} }
.buddylist { .buddylist {
position:absolute; position:absolute;
@ -126,7 +146,6 @@ background:rgba(255,255,255,0.5);
z-index:5; z-index:5;
line-height:66px; line-height:66px;
padding:0 10px; padding:0 10px;
/*width:110px;*/
transition-property: right; transition-property: right;
-webkit-transition-property: right; -webkit-transition-property: right;
transition-duration: .3s; transition-duration: .3s;
@ -140,16 +159,3 @@ font-size:2em;
.buddy.hovered .buddyactions { .buddy.hovered .buddyactions {
right:0px; right:0px;
} }
@media only screen and (max-width: 400px) {
#buddylist {
left:0px;
width:auto;
margin-bottom:26px;
}
.buddylist .buddylistempty {
background: transparent;
color:#ccc;
padding-top:14px;
}
}

1
src/styles/components/_roombar.scss

@ -25,6 +25,7 @@
right:3px; right:3px;
height:32px; height:32px;
color:#ccc; color:#ccc;
text-shadow: 0 0 5px black;
z-index:4; z-index:4;
} }
#roombar .roombar { #roombar .roombar {

12
static/js/controllers/mediastreamcontroller.js

@ -316,6 +316,18 @@ define(['underscore', 'bigscreen', 'moment', 'webrtc.adapter'], function(_, BigS
}; };
$scope.toggleBuddylist = (function() {
var oldState = null;
return function(status, force) {
if (status || force) {
oldState = $scope.showBuddylist;
$scope.showBuddylist = !!status;
} else {
$scope.showBuddylist = oldState;
}
}
}());
$scope.$watch("cameraMute", function(cameraMute) { $scope.$watch("cameraMute", function(cameraMute) {
mediaStream.webrtc.setVideoMute(cameraMute); mediaStream.webrtc.setVideoMute(cameraMute);
}); });

1
static/js/directives/audiovideo.js

@ -343,7 +343,6 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/
$($window).on("resize", scope.resize); $($window).on("resize", scope.resize);
scope.$on("mainresize", function() { scope.$on("mainresize", function() {
console.log("mainResize called");
_.defer(scope.resize); _.defer(scope.resize);
}); });
scope.resize(); scope.resize();

Loading…
Cancel
Save