mirror of
https://github.com/sismics/docs.git
synced 2025-12-20 13:11:41 +00:00
Tag colors (client)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<ul class="inline">
|
||||
<li ng-repeat="tag in tags"><span class="label label-info">{{ tag.name }} <span class="icon-remove icon-white" ng-click="deleteTag(tag)"></span></span></li>
|
||||
<li ng-repeat="tag in tags"><span class="label label-info" ng-style="{ 'background': tag.color }">{{ tag.name }} <span class="icon-remove icon-white" ng-click="deleteTag(tag)"></span></span></li>
|
||||
</ul>
|
||||
<input class="span12" type="text" id="{{ ref }}" placeholder="Type a tag" ng-model="input"
|
||||
autocomplete="off" typeahead="tag.name for tag in allTags | filter: $viewValue" typeahead-on-select="addTag()" />
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<td>{{ document.create_date | date: 'yyyy-MM-dd' }}</td>
|
||||
<td class="hidden-phone cell-tags">
|
||||
<div class="tags">
|
||||
<span class="label label-info" ng-repeat="tag in document.tags"><span class="shorten">{{ tag.name | shorten }}</span><span class="full">{{ tag.name }}</span></span>
|
||||
<span class="label label-info" ng-repeat="tag in document.tags" ng-style="{ 'background': tag.color }"><span class="shorten">{{ tag.name | shorten }}</span><span class="full">{{ tag.name }}</span></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="page-header">
|
||||
<h1>{{ document.title }} <small>{{ document.create_date | date: 'yyyy-MM-dd' }}</small></h1>
|
||||
<ul class="inline">
|
||||
<li ng-repeat="tag in document.tags"><span class="label label-info">{{ tag.name }}</span></li>
|
||||
<li ng-repeat="tag in document.tags"><span class="label label-info" ng-style="{ 'background': tag.color }">{{ tag.name }}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span4 well text-center">
|
||||
|
||||
<div class="input-prepend input-append input-block-level">
|
||||
<span class="add-on"><span class="icon-plus"></span></span>
|
||||
<span colorpicker class="btn" data-color="#3a87ad" ng-model="tag.color" ng-style="{ 'background': tag.color }"> </span>
|
||||
<input type="text" placeholder="Tag name" ng-model="tag.name" ui-keyup="{'enter':'addTag()'}">
|
||||
<button type="submit" class="btn btn-primary" ng-click="addTag()">Add</button>
|
||||
</div>
|
||||
@@ -17,7 +16,8 @@
|
||||
<tbody>
|
||||
<tr ng-repeat="tag in tags | filter:search">
|
||||
<td><inline-edit value="tag.name" on-edit="updateTag(tag)" /></td>
|
||||
<td><button class="btn btn-danger pull-right" ng-click="deleteTag(tag)"><span class="icon-trash icon-white"></span></button></td>
|
||||
<td class="span1"><span colorpicker class="btn" on-hide="updateTag(tag)" data-color="" ng-model="tag.color" ng-style="{ 'background': tag.color }"> </span></td>
|
||||
<td class="span1"><button class="btn btn-danger pull-right" ng-click="deleteTag(tag)"><span class="icon-trash icon-white"></span></button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="span8 well">
|
||||
<h1>{{ tags.length }} <small>tag{{ tags.length > 1 ? 's' : '' }}</small></h1>
|
||||
<dl class="dl-horizontal" ng-repeat="stat in stats | orderBy: '-count'">
|
||||
<dt>{{ stat.name }} <span class="badge badge-info">{{ stat.count }}</span></dt>
|
||||
<dt>{{ stat.name }} <span class="badge badge-info" ng-style="{ 'background': stat.color }">{{ stat.count }}</span></dt>
|
||||
<dd><progress percent="stat.count / getStatCount() * 100" class="progress-info"></progress></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user