Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
shehan committed Apr 24, 2017
1 parent aa935a1 commit 825743c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"angular-ui-router": "^0.4.2",
"angular-animate": "^1.6.2",
"jquery-ui": "^1.12.1",
"angular-bootstrap-colorpicker": "^3.0.26"
"angular-bootstrap-colorpicker": "^3.0.26",
"angular-fx": "^1.1.0"
}
}
5 changes: 3 additions & 2 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<link rel="stylesheet" href="libs/angular-bootstrap-colorpicker/css/colorpicker.min.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="libs/animate.css/animate.min.css">
<link rel="stylesheet" href="libs/angular-fx/dist/angular-fx.min.css">

<!-- Libraries -->
<script src="libs/angular/angular.min.js"></script>
Expand Down Expand Up @@ -45,12 +47,11 @@
<script src="js/group-interjections-controller.js"></script>
<script src="js/interjection-manage-controller.js"></script>
<script src="libs/angular-bootstrap-colorpicker/js/bootstrap-colorpicker-module.min.js"></script>

<script src="libs/angular-fx/dist/angular-fx.min.js"></script>

<title>CollabAll</title>



</head>

<body ng-app="CollabAll">
Expand Down
32 changes: 21 additions & 11 deletions client/js/group-chat-controller.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
(function () {
'use strict';

angular.module('GroupChatControllerModule', [])
angular.module('GroupChatControllerModule', ['720kb.fx'])

.controller('groupChatController', ['$scope', 'AuthService', '$state', '$http', '$stateParams', '$window',
function ($scope, AuthService, $state, $http, $stateParams, $window) {
.controller('groupChatController', ['$scope', 'AuthService', '$state', '$http', '$stateParams', '$window','$timeout',
function ($scope, AuthService, $state, $http, $stateParams, $window, $timeout) {

$timeout(function () {
$scope.x = 3;
}, 100);

$scope.title = "CollabAll - Group Chat";
$scope.contactAuthor = AuthService.authenticatedUser().FirstName + " " + AuthService.authenticatedUser().LastName;
Expand Down Expand Up @@ -226,25 +230,29 @@
setInterval(function () {
if ($state.current.name == 'inside.group-chat') {
if ($scope.deviceOrientation.beta >= 40 && $scope.deviceOrientation.beta <= 66)
pos = "Don't Understand!";
pos = $scope.groupInterjections[1];
//pos = "Don't Understand!";
if ($scope.deviceOrientation.beta >= 150 && $scope.deviceOrientation.beta <= 170)
pos = "Slow Down!";
pos = $scope.groupInterjections[2];
//pos = "Slow Down!";
if ($scope.deviceOrientation.gamma >= 30 && $scope.deviceOrientation.gamma <= 80)
pos = "Question!";
pos = $scope.groupInterjections[3];
//pos = "Question!";
if ($scope.deviceOrientation.gamma >= 115 && $scope.deviceOrientation.gamma <= 150)
pos = "Repeat!";
pos = $scope.groupInterjections[4];
//pos = "Repeat!";

if (pos != '') {
if (pos != $scope.prevAction) {
if (pos !== '') {
if (pos !== $scope.prevAction) {
$scope.prevAction = pos;
var action = {
body: pos,
user: $scope.contactAuthor,
userAvatar: $scope.contactAuthorAvatar,
groupID: $scope.groupID
};
;
appendChat(action)

appendChat(action);
emitAction(action);
}
}
Expand All @@ -271,6 +279,8 @@
if (message.user != $scope.contactAuthor){
$window.navigator.vibrate([150,150])
}


}


Expand Down
2 changes: 2 additions & 0 deletions client/templates/group-chat.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ <h2>CollablAll
<small> >></small>

<span ng-if="message.body.includes() !== undefined && message.body.includes('Discussing:')">
<!--<span ngfx-speed="fast" ngfx-infinite ngfx-zoom-in-left="x > 2" ng-if="message.body.includes() !== undefined && message.body.includes('Discussing:')">-->
<i style="opacity: 1;width: 40px;margin: 2px;"
class='fa fa-window-maximize fa-lg btn btn-default'
aria-hidden='true' disabled></i>
{{message.body}}
</span>

<span ng-if="message.body != 'Discussing:'">
<!-- <span ngfx-speed="fast" ngfx-flip-in-x="x > 2" ng-if="message.body != 'Discussing:'"> -->
<i style="opacity: 1;width: 40px;margin: 2px; background: {{message.body.BackgroundColor}}; color: {{message.body.TextColor}}"
class='{{message.body.Icon}} fa-lg btn' aria-hidden='true' disabled></i>
{{message.body.Title}}
Expand Down

0 comments on commit 825743c

Please sign in to comment.