Commit 9fbacb17e3d4e1a82ee2f51c1643d8ca6a043af4

Authored by Geoffrey PREUD'HOMME
1 parent 7b129225

Affichage du Markdown dans les messages

Fix #3
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 "bootswatch-dist": "3.3.4-cerulean", 10 "bootswatch-dist": "3.3.4-cerulean",
11 "jsencrypt": "~2.1.0", 11 "jsencrypt": "~2.1.0",
12 "remarkable-bootstrap-notify": "~3.0.2", 12 "remarkable-bootstrap-notify": "~3.0.2",
13 - "ng-sortable": "~1.2.0" 13 + "ng-sortable": "~1.2.0",
  14 + "angular-markdown-directive": "~0.3.1"
14 } 15 }
15 } 16 }
public/js/controllers/ForumConvCtrl.js
1 -angular.module('ForumConvCtrl', ['SessionsServ', 'ApiServ']) 1 +angular.module('ForumConvCtrl', ['SessionsServ', 'ApiServ', 'ngSanitize', 'btford.markdown'])
2 .controller('ForumConvCtrl', function ($scope, $routeParams, SessionServ, ApiServ) { 2 .controller('ForumConvCtrl', function ($scope, $routeParams, SessionServ, ApiServ) {
3 $scope.messs = []; 3 $scope.messs = [];
4 $scope.conv = {}; 4 $scope.conv = {};
public/views/forumConv.html
@@ -12,8 +12,7 @@ @@ -12,8 +12,7 @@
12 <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Supprimer 12 <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Supprimer
13 </button> 13 </button>
14 </div> 14 </div>
15 - <div class="panel-body">  
16 - {{ mess.content }} 15 + <div class="panel-body" btf-markdown="mess.content">
17 </div> 16 </div>
18 </div> 17 </div>
19 <div class="form-group" ng-if="session.canAddMess"> 18 <div class="form-group" ng-if="session.canAddMess">
public/views/index.html
@@ -19,6 +19,9 @@ @@ -19,6 +19,9 @@
19 <script src="libs/ladda/js/spin.js"></script> 19 <script src="libs/ladda/js/spin.js"></script>
20 <script src="libs/ladda/js/ladda.js"></script> 20 <script src="libs/ladda/js/ladda.js"></script>
21 <script src="libs/angular-ladda/dist/angular-ladda.min.js"></script> 21 <script src="libs/angular-ladda/dist/angular-ladda.min.js"></script>
  22 + <script src="libs/angular-sanitize/angular-sanitize.min.js"></script>
  23 + <script src="libs/showdown/compressed/Showdown.min.js"></script>
  24 + <script src="libs/angular-markdown-directive/markdown.js"></script>
22 <script src="libs/ng-sortable/dist/ng-sortable.min.js"></script> 25 <script src="libs/ng-sortable/dist/ng-sortable.min.js"></script>
23 <script src="js/services/NotifyServ.js"></script> 26 <script src="js/services/NotifyServ.js"></script>
24 <script src="js/services/ApiServ.js"></script> 27 <script src="js/services/ApiServ.js"></script>