mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-07 15:36:25 +02:00
feat(forums): load forum desc with markdown support
This commit is contained in:
@@ -69,5 +69,17 @@
|
||||
NotifycationService.showErrorNotify(res.data.message, 'FORUMS.ADD_FAILED');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* getForumDesc
|
||||
* @param f
|
||||
* @returns {*}
|
||||
*/
|
||||
vm.getForumDesc = function (f) {
|
||||
if (f) {
|
||||
return marked(f.desc, {sanitize: true});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -23,3 +23,9 @@
|
||||
max-height: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
.forum-list {
|
||||
.forum-desc {
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<section class="container padding-top-10" ng-controller="ForumsController as vm" ng-init="vm.init();">
|
||||
<div class="row margin-top-20">
|
||||
<div class="row margin-top-20 forum-list">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<button class="btn btn-success" ng-click="vm.openSideOverlay($event)"> {{ 'FORUMS.BTN_ADD_FORUM' | translate }} </button>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
<td scope="row">
|
||||
<h4>{{f.name}} <span class="badge badge_mt" ng-show="f.readOnly">R</span></h4>
|
||||
|
||||
<p>{{f.desc}}</p>
|
||||
<p class="forum-desc" ng-bind-html="vm.getForumDesc(f);"></p>
|
||||
</td>
|
||||
<td class="text-center">{{f.order}}</td>
|
||||
<td class="text-center"></td>
|
||||
|
||||
Reference in New Issue
Block a user