Skip to content

Commit

Permalink
Merge pull request #16 from mmrose/master
Browse files Browse the repository at this point in the history
Added button to hide users list and therefore enlarge chat
  • Loading branch information
kraiz committed Mar 26, 2015
2 parents 060f68b + 10f1d02 commit b368863
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ul.chat {
list-style: none;
display: block;
position: relative;
height: 200px;
height: 600px;
overflow: auto;
/*padding: 10px 15px;*/
/*border: 1px solid #ddd;*/
Expand Down
9 changes: 9 additions & 0 deletions app/js/controllers/hubs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ EiskaltApp.controller('HubsCtrl', function ($scope, EiskaltRPC) {
$scope.disconnect = function (huburl) {
EiskaltRPC.HubDel(huburl).success(loadHubs);
};

$scope.enlargedChat = false;
$scope.enlargeChat = function () {
$scope.enlargedChat = true;
};

$scope.enlargeUsers = function () {
$scope.enlargedChat = false;
};
});

EiskaltApp.controller('HubCtrl', function ($scope, $interval, $localStorage, settings, EiskaltRPC) {
Expand Down
26 changes: 21 additions & 5 deletions app/partials/hubs.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
</alert>
<div class="row" ng-show="hub.connected">
<!-- User List -->
<ul class="user-list list-group col-sm-3 col-sm-push-9">
<ul class="user-list list-group"
ng-class="enlargedChat ? 'col-sm-1 col-sm-push-11' : 'col-sm-3 col-sm-push-9'">
<li class="list-group-item pull-right">
</li>
<li ng-repeat="user in users | orderBy:'NickOrder' " class="list-group-item" ng-controller="UserCtrl"
popover="{{ user.IP }} - {{ user.Connection }} - {{ user.Tag }}"
popover-trigger="mouseenter" popover-placement="left">
popover-trigger="mouseenter" popover-placement="left"
ng-hide="enlargedChat">
<button class="btn btn-primary btn-xs pull-right" type="button"
title="Download {{ user.Nick }}'s filelist"
ng-click="downloadFilelist(user.Nick)"
Expand All @@ -24,17 +28,29 @@
{{ downloading && 'Downloading' || 'Browse' }}
</button>
<span class="badge">{{ user.Shared | numeraljs:'0.0 b' }}</span>
<span class="nick" style="color: {{ user.Nick | stringToColor }}">{{ user.Nick }}</span>
<span class="nick" style="color: {{ user.Nick | stringToColor }}">{{ user.Nick }}</span>
</li>
<li class="list-group-item pull-right">
<li class="list-group-item" ng-hide="enlargedChat">
<button class="btn btn-danger btn-xs" type="button" title="Disconnect from this hub"
ng-click="disconnect(hub.huburl)">
<span class="glyphicon glyphicon-log-out"></span>
Disconnect
</button>
<button class="btn btn-default btn-xs pull-right" type="button" title="Enlarge chat"
ng-click="enlargeChat()">
Enlarge chat
<span class="glyphicon glyphicon-triangle-right"></span>
</button>
</li>
<li class="list-group-item" ng-show="enlargedChat">
<button class="btn btn-default btn-xs pull-right" type="button" title="Enlarge users"
ng-click="enlargeUsers()">
<span class="glyphicon glyphicon-triangle-left"></span>
</button>
&nbsp;
</li>
</ul>
<div class="col-sm-9 col-sm-pull-3">
<div ng-class="enlargedChat ? 'col-sm-11 col-sm-pull-1' : 'col-sm-9 col-sm-pull-3'">
<!-- Chat Log -->
<div class="row">
<ul class="chat col-sm-12" scroll-glue>
Expand Down

0 comments on commit b368863

Please sign in to comment.