Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
vietnogi committed Jun 23, 2015
1 parent 7891b51 commit c982aba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dist/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 13 additions & 7 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

angular.module("appirio-tech-messaging").run(["$templateCache", function($templateCache) {$templateCache.put("views/messaging.html","<messaging thread-id=\"123\"></messaging>");
$templateCache.put("views/messaging.directive.html","<ul class=\"messages\"><li ng-repeat=\"message in vm.messaging.messages track by $index\"><img ng-src=\"{{ vm.messaging.avatars[message.publisherId] }}\" class=\"avatar\"/><div class=\"message\"><p>{{ message.body }}</p><ul class=\"attachments\"><li ng-repeat=\"attachment in message.attachments track by $index\"><a href=\"#\">{{ message.attachments.originalUrl }}</a></li></ul><time>{{ message.createdAt | timeLapse }}</time></div></li><a id=\"messaging-bottom-{{ vm.threadId }}\"></a></ul><form ng-submit=\"vm.sendMessage()\"><textarea placeholder=\"Send a message&hellip;\" ng-model=\"vm.newMessage\"></textarea><button type=\"submit\" class=\"enter\">Enter</button><button type=\"button\" class=\"attach\"><div class=\"icon\"></div><span>Add Attachment</span></button></form>");
$templateCache.put("views/threads.directive.html","<ul><li ng-repeat=\"thread in vm.threads track by $index\"><a ui-sref=\"messaging({id: 123})\"><header><h4>{{ thread.subject }}</h4><time>{{ thread.messages[0].createdAt }}</time></header><main><img ng-src=\"{{ vm.avatars[thread.messages[0].publisherId] }}\" class=\"avatar\"/><div class=\"notification\">{{ thread.unreadCount }}</div><div class=\"message\"><div class=\"co-pilot\">{{ thread.messages[0].publisherId }}:</div><p>{{ thread.messages[0].body }}</p></div></main></a></li></ul>");}]);
$templateCache.put("views/threads.directive.html","<ul><li ng-repeat=\"thread in vm.threads track by $index\"><a ui-sref=\"messaging({ id: thread.id })\"><header><h4>{{ thread.subject }}</h4><time>{{ thread.messages[0].createdAt }}</time></header><main><img ng-src=\"{{ vm.avatars[thread.messages[0].publisherId] }}\" class=\"avatar\"/><div class=\"notification\">{{ thread.unreadCount }}</div><div class=\"message\"><div class=\"co-pilot\">{{ thread.messages[0].publisherId }}:</div><p>{{ thread.messages[0].body }}</p></div></main></a></li></ul>");}]);
(function() {
'use strict';
var MessagingController;
Expand All @@ -26,7 +26,9 @@ $templateCache.put("views/threads.directive.html","<ul><li ng-repeat=\"thread in
messages: []
};
vm.newMessage = '';
getUserMessages();
$scope.$watch('threadId', function() {
return getUserMessages();
});
vm.sendMessage = sendMessage;
return vm;
};
Expand Down Expand Up @@ -275,20 +277,24 @@ $templateCache.put("views/threads.directive.html","<ul><li ng-repeat=\"thread in
var ThreadsController;

ThreadsController = function($scope, ThreadsService) {
var activate, onChange, vm;
var activate, getThread, onChange, vm;
vm = this;
onChange = function(threadsVm) {
vm.threads = threadsVm.threads;
vm.totalUnreadCount = threadsVm.totalUnreadCount;
return vm.avatars = threadsVm.avatars;
};
activate = function() {
getThread = function() {
var threadParams;
threadParams = {
subscriber: $scope.subscriber,
threadId: $scope.threadId
subscriber: $scope.subscriber
};
ThreadsService.get(threadParams, onChange);
return ThreadsService.get(threadParams, onChange);
};
activate = function() {
$scope.$watch('subscriber', function() {
return getThread();
});
return vm;
};
return activate();
Expand Down

0 comments on commit c982aba

Please sign in to comment.