Add markdown support for comments and repo descriptions
This commit is contained in:
parent
e4653cd7cf
commit
461f324e09
12 changed files with 3816 additions and 14 deletions
|
@ -41,8 +41,10 @@
|
|||
|
||||
|
||||
<!-- Description -->
|
||||
<p ng-class="'description lead ' + (repo.can_write ? 'editable' : 'noteditable')" ng-click="editDescription()"><span class="content">{{repo.description}}</span><i class="icon-edit"></i></p>
|
||||
|
||||
<p ng-class="'description lead ' + (repo.can_write ? 'editable' : 'noteditable')" ng-click="editDescription()">
|
||||
<span class="content" ng-bind-html-unsafe="getMarkedDown(repo.description)"></span>
|
||||
<i class="icon-edit"></i>
|
||||
</p>
|
||||
|
||||
<!-- Tab bar -->
|
||||
<ul class="nav nav-tabs">
|
||||
|
@ -72,8 +74,7 @@
|
|||
|
||||
<div ng-show="currentTag.image.comment">
|
||||
<strong>Description:</strong>
|
||||
<blockquote style="margin-top: 10px;">
|
||||
{{ currentTag.image.comment || '' }}
|
||||
<blockquote style="margin-top: 10px;" ng-bind-html-unsafe="getMarkedDown(currentTag.image.comment)">
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -87,17 +88,17 @@
|
|||
<table class="images">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>Created</td>
|
||||
<td>Comment</td>
|
||||
<td>ID</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr ng-repeat="image in imageHistory">
|
||||
<td class="image-id" title="{{ image.id }}">{{ image.id }}</td>
|
||||
<td><span am-time-ago="parseDate(image.created)"></span></td>
|
||||
<td>{{ image.comment }}</td>
|
||||
<td>{{ image.id }}</td>
|
||||
</tr>
|
||||
<td ng-bind-html-unsafe="getCommentFirstLine(image.comment)"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -111,7 +112,12 @@
|
|||
<h4 class="modal-title">Edit Repository Description</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea id="descriptionEdit" placeholder="Enter description">{{ repo.description }}</textarea>
|
||||
<div class="wmd-panel">
|
||||
<div id="wmd-button-bar-description"></div>
|
||||
<textarea class="wmd-input" id="wmd-input-description" placeholder="Enter description">{{ repo.description }}</textarea>
|
||||
</div>
|
||||
|
||||
<div id="wmd-preview-description" class="wmd-panel wmd-preview"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
|
|
Reference in a new issue