2013-06-11 01:55:05 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
define(['app', 'Cells/NzbDroneCell' ], function () {
|
|
|
|
NzbDrone.History.EventTypeCell = NzbDrone.Cells.NzbDroneCell.extend({
|
|
|
|
|
|
|
|
className: 'history-event-type-cell',
|
|
|
|
|
|
|
|
render: function () {
|
|
|
|
this.$el.empty();
|
|
|
|
|
|
|
|
if (this.cellValue) {
|
|
|
|
|
2013-06-19 01:02:23 +00:00
|
|
|
var icon;
|
|
|
|
var toolTip;
|
2013-06-11 01:55:05 +00:00
|
|
|
|
|
|
|
switch (this.cellValue) {
|
|
|
|
case 'grabbed':
|
|
|
|
icon = 'icon-cloud-download';
|
|
|
|
toolTip = 'Episode grabbed from indexer and sent to download client';
|
|
|
|
break;
|
|
|
|
case 'seriesFolderImported':
|
|
|
|
icon = 'icon-hdd';
|
|
|
|
toolTip = 'Existing episode file added to library';
|
|
|
|
break;
|
2013-06-19 01:02:23 +00:00
|
|
|
case 'downloadFolderImported':
|
2013-06-11 01:55:05 +00:00
|
|
|
icon = 'icon-download-alt';
|
2013-06-19 01:02:23 +00:00
|
|
|
toolTip = 'Episode downloaded successfully and picked up from download client';
|
2013-06-11 01:55:05 +00:00
|
|
|
break;
|
2013-06-19 01:02:23 +00:00
|
|
|
default :
|
|
|
|
icon = 'icon-question';
|
|
|
|
toolTip = 'unknown event';
|
|
|
|
|
2013-06-11 01:55:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
this.$el.html('<i class="{0}" title="{1}"/>'.format(icon, toolTip));
|
|
|
|
}
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|