--- /dev/null
+{{> '_coding-rules-facet-header'}}
+
+<div class="search-navigator-facet-list">
+ {{#each values}}
+ <a class="facet search-navigator-facet {{#if parent}}search-navigator-facet-indent{{/if}} js-facet"
+ data-value="{{val}}" title="{{default label val}}">
+ <span class="facet-name">{{default label val}}</span>
+ <span class="facet-stat">{{numberShort count}}</span>
+ </a>
+ {{/each}}
+</div>
App.repositories = r.repositories;
App.repositories.push(App.manualRepository());
App.statuses = r.statuses;
- App.characteristics = r.characteristics;
+ App.characteristics = r.characteristics.map(function (item, index) {
+ return _.extend(item, { index: index });
+ });
});
$.when(window.requestMessages(), appXHR).done(function () {
define([
- 'coding-rules/facets/base-facet'
+ 'coding-rules/facets/base-facet',
+ 'templates/coding-rules'
], function (BaseFacet) {
return BaseFacet.extend({
+ template: Templates['coding-rules-characteristic-facet'],
getValues: function () {
var values = this.model.getValues(),
},
sortValues: function (values) {
- return _.sortBy(values, function (v) {
- return v.val === 'NONE' ? -999999 : -v.count;
- });
+ return _.sortBy(values, 'index');
},
serializeData: function () {
}
}
+.search-navigator-facet-indent {
+ width: ~"calc(100% - 30px)";
+ margin-left: 30px;
+}
+
.search-navigator-facet-half {
width: 45%;