From 736c8ca79c0b2a9508c3687625698cea8607fa96 Mon Sep 17 00:00:00 2001 From: Andy Smircich Date: Sat, 23 Apr 2016 02:09:25 +0000 Subject: [PATCH 1/5] initial --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8ee8c35..32b781d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ bower_components .atomignore .idea -node_modules \ No newline at end of file +node_modules +.c9 +.git \ No newline at end of file From 567619983bafce893c4f20154a5923ca01315bec Mon Sep 17 00:00:00 2001 From: Andy Smircich Date: Sat, 23 Apr 2016 02:25:31 +0000 Subject: [PATCH 2/5] re-link controller and scope 'messages' array objects --- src/scripts/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scripts/index.js b/src/scripts/index.js index 0b9895c..f2a1e7f 100644 --- a/src/scripts/index.js +++ b/src/scripts/index.js @@ -96,6 +96,9 @@ }, 250); }); $scope.$watch('messages.length', function() { + //seems unnecessary, but it solved my problem. Link between this.messages and $scope.messages was lost after initialization + vm.messages = $scope.messages; + if (!$scope.historyLoading) scrollToBottom(); // don't scrollToBottom if just loading history if ($scope.expandOnNew && vm.isHidden) { toggle(); From 128614b4e93430fabfeef7d123451b591fc815d3 Mon Sep 17 00:00:00 2001 From: Andy Smircich Date: Sat, 23 Apr 2016 05:30:35 +0000 Subject: [PATCH 3/5] template tweak, bower help --- bower.json | 3 ++- src/scripts/templates.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index cf57510..042de6c 100644 --- a/bower.json +++ b/bower.json @@ -26,7 +26,8 @@ ], "main": [ "src/scripts/index.js", - "src/css/style.css" + "src/css/style.css", + "src/scripts/templates.js" ], "dependencies": { "angular": "~1.3.x", diff --git a/src/scripts/templates.js b/src/scripts/templates.js index b423567..82c0568 100644 --- a/src/scripts/templates.js +++ b/src/scripts/templates.js @@ -1 +1 @@ -angular.module("irontec.simpleChat").run(["$templateCache", function($templateCache) {$templateCache.put("chatTemplate.html","
\r\n
\r\n
\r\n
\r\n
\r\n

{{vm.title}}

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n myUserId:{{vm.myUserId}}\r\n \r\n

{{message.content}}

\r\n
\r\n {{message.username}} \r\n {{message.date|date:hh:mm:a}}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
");}]); \ No newline at end of file +angular.module("irontec.simpleChat").run(["$templateCache", function($templateCache) {$templateCache.put("chatTemplate.html","
\r\n
\r\n
\r\n
\r\n
\r\n

{{vm.title}}

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n myUserId:{{vm.myUserId}}\r\n \r\n

{{message.content}}

\r\n
\r\n {{message.username}} \r\n {{message.date|date:hh:mm:a}}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
");}]); \ No newline at end of file From 3e6d708397f41e1161da190fde2bd14acf0fd361 Mon Sep 17 00:00:00 2001 From: Andy Smircich Date: Sat, 23 Apr 2016 05:32:00 +0000 Subject: [PATCH 4/5] v0.4.1 fork --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2889f59..8e31b27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-bootstrap-simple-chat", - "version": "0.4.0", + "version": "0.4.1", "description": "Simple Chat Directive for AngularJS with Bootstrap with infinite scroll", "main": "gulpfile.js", "dependencies": { From 4cfbe5006d83496ccf41f67c3c7cf0ce04c6b0ee Mon Sep 17 00:00:00 2001 From: Andy Smircich Date: Sat, 23 Apr 2016 05:37:51 +0000 Subject: [PATCH 5/5] v0.4.1 fork --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8e31b27..6916e9d 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ }, "repository": { "type": "git", - "url": "https://github.com/irontec/angular-bootstrap-simple-chat" + "url": "https://github.com/smirciat/angular-bootstrap-simple-chat" }, "license": "MIT", - "homepage": "https://github.com/irontec/angular-bootstrap-simple-chat" + "homepage": "https://github.com/smirciat/angular-bootstrap-simple-chat" }