mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Finished Series Index Table formatting
This commit is contained in:
parent
d706a35ab7
commit
4cc4e8133e
6 changed files with 95 additions and 48 deletions
44
UI/app.js
44
UI/app.js
|
@ -71,49 +71,6 @@ define('app', function () {
|
|||
|
||||
console.log('starting application');
|
||||
|
||||
//TODO: move these out of here
|
||||
Backgrid.SeriesStatusCell = Backgrid.Cell.extend({
|
||||
className: "series-status-cell",
|
||||
|
||||
render: function () {
|
||||
this.$el.empty();
|
||||
var monitored = this.model.get('monitored');
|
||||
var status = this.model.get('status');
|
||||
|
||||
if (!monitored) {
|
||||
this.$el.html('<i class="icon-pause grid-icon" title="Not Monitored"></i>');
|
||||
}
|
||||
else if (status === 0) {
|
||||
this.$el.html('<i class="icon-play grid-icon" title="Continuing"></i>');
|
||||
}
|
||||
|
||||
else {
|
||||
this.$el.html('<i class="icon-stop grid-icon" title="Ended"></i>');
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
var AirDateFormatter = Backgrid.AirDateFormatter = function () {};
|
||||
AirDateFormatter.prototype = new Backgrid.CellFormatter();
|
||||
_.extend(AirDateFormatter.prototype, {
|
||||
/**
|
||||
Converts any value to a string using Ecmascript's implicit type
|
||||
conversion. If the given value is `null` or `undefined`, an empty string is
|
||||
returned instead.
|
||||
|
||||
@member Backgrid.StringFormatter
|
||||
@param {*} rawValue
|
||||
@return {string}
|
||||
*/
|
||||
fromRaw: function (rawValue) {
|
||||
return 'Hello World';
|
||||
|
||||
if (_.isUndefined(rawValue) || _.isNull(rawValue)) return '';
|
||||
return rawValue + '';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
NzbDrone.addRegions({
|
||||
|
@ -122,7 +79,6 @@ define('app', function () {
|
|||
notificationRegion: '#notification-region'
|
||||
});
|
||||
|
||||
|
||||
window.NzbDrone.start();
|
||||
|
||||
return NzbDrone;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue