Skip to content

Commit

Permalink
Adjustements and refactoring of the conversation name component
Browse files Browse the repository at this point in the history
  • Loading branch information
supertinou committed Jul 19, 2016
1 parent adc3e2d commit 573154c
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 115 deletions.
4 changes: 2 additions & 2 deletions client/app/components/conversation/conversation.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="conversation">

<online-user-list ng-if="conversationType == 'channel'"></online-user-list>
<conversation-name-channel ng-if="conversationType == 'channel'"></conversation-name-channel>

<conversation-name user="friend" ng-if="conversationType != 'channel'"></conversation-name>
<conversation-name-direct user="friend" ng-if="conversationType != 'channel'"></conversation-name-direct>

<message-list messages="conversation"></message-list>

Expand Down
10 changes: 0 additions & 10 deletions client/app/components/conversation/conversation_name.directive.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
angular.module('app').directive('conversationNameChannel', function($rootScope,ConversationList) {
return {
restrict: "E",
replace: true,
templateUrl: 'components/conversation/conversation_name_channel.html',

controller: function($scope){

ConversationList.all().then(function(conversations){
$scope.currentConversationName = ConversationList.find({channel: $scope.conversationChannel}).name;

});
}
}

});
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
angular.module('app').directive('conversationNameDirect', function($rootScope) {
return {
restrict: "E",
replace: true,
templateUrl: 'components/conversation/conversation_name_direct.html',
scope: {
user: "="
}
};
});

This file was deleted.

7 changes: 2 additions & 5 deletions client/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
<script src="services/notifications.service.js"></script>

<script src="services/friends.service.js"></script>
<script src="services/online_users.service.js"></script>
<script src="services/typing-indicator.service.js"></script>
<script src="services/users-typing.service.js"></script>

Expand All @@ -71,20 +70,18 @@

<script src="components/login/sign-in-with-github-button.directive.js"></script>
<script src="components/conversation/conversation.directive.js"></script>
<script src="components/conversation/conversation_name.directive.js"></script>
<script src="components/conversation/conversation_name_direct.directive.js"></script>
<script src="components/conversation/conversation_name_channel.directive.js"></script>

<script src="components/message-form/message-form.directive.js"></script>
<script src="components/message-form/type-tracking.directive.js"></script>
<script src="components/channels/channels.directive.js"></script>
<script src="components/message-list/message-list.directive.js"></script>
<script src="components/message-item/message-item.directive.js"></script>
<script src="components/online-user-list/online-user-list.directive.js"></script>
<script src="components/typing-indicator-box/typing-indicator-box.directive.js"></script>
<script src="components/friend-list/friend-list.directive.js"></script>
<script src="components/friends-search-box/friends-search-box.directive.js"></script>
<script src="components/user-menu/user-menu.directive.js"></script>

<script src="views/chat.controller.js"></script>


<!-- endbuild -->
Expand Down
75 changes: 0 additions & 75 deletions client/app/services/online_users.service.js

This file was deleted.

File renamed without changes.
6 changes: 0 additions & 6 deletions client/app/views/chat.controller.js

This file was deleted.

0 comments on commit 573154c

Please sign in to comment.