show rejection reasons in a tool tip instead of plaint text in the grid.

This commit is contained in:
Keivan Beigi 2013-07-02 17:44:22 -07:00
commit ef4ad53277
8 changed files with 76 additions and 40 deletions

View file

@ -0,0 +1,40 @@
'use strict';
define(
[
'backgrid',
'marionette',
'bootstrap'
], function (Backgrid, Marionette) {
return Backgrid.Cell.extend({
className: 'approval-status-cell',
template : 'Cells/ApprovalStatusCellTemplate',
render: function () {
var rejections = this.model.get(this.column.get('name'));
if (rejections.length === 0) {
return this;
}
this.templateFunction = Marionette.TemplateCache.get(this.template);
var html = this.templateFunction(rejections);
this.$el.html('<i class="icon-exclamation-sign"/>');
this.$el.popover({
content : html,
html : true,
trigger : 'hover',
title : 'Release Rejected',
placement: 'left',
container: this.$el
});
return this;
}
});
});

View file

@ -0,0 +1,6 @@
<ul>
{{#each this}}
<li>{{this}}</li>
{{debug}}
{{/each}}
</ul>

View file

@ -1,23 +1,39 @@
@import "../content/Bootstrap/mixins";
@import "../content/Bootstrap/variables";
@import "../content/Bootstrap/buttons";
@import "../shared/styles/clickable";
.episode-title-cell {
.btn-link;
}
.air-date-cell {
width: 100px;
width : 100px;
}
.relative-date-cell {
width: 150px;
width : 150px;
}
.quality-cell{
width: 130px;
.quality-cell {
width : 130px;
}
.history-event-type-cell{
.history-event-type-cell {
width : 10px;
}
.download-report-cell {
.clickable();
}
.approval-status-cell {
widows : 10px;
.popover {
max-width : 400px;
}
i {
color : @red;
}
}