mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-20 21:55:03 -04:00
rjs -> webpack
This commit is contained in:
@@ -1,29 +1,18 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'Cells/NzbDroneCell',
|
||||
'moment'
|
||||
], function (NzbDroneCell, moment) {
|
||||
return NzbDroneCell.extend({
|
||||
var NzbDroneCell = require('../../Cells/NzbDroneCell');
|
||||
var moment = require('moment');
|
||||
|
||||
className: 'task-interval-cell',
|
||||
|
||||
render: function () {
|
||||
|
||||
this.$el.empty();
|
||||
|
||||
var interval = this.model.get('interval');
|
||||
var duration = moment.duration(interval, 'minutes').humanize().replace(/an?(?=\s)/, '1');
|
||||
|
||||
if (interval === 0 ) {
|
||||
this.$el.html('disabled');
|
||||
}
|
||||
|
||||
else {
|
||||
this.$el.html(duration);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
||||
module.exports = NzbDroneCell.extend({
|
||||
className : 'task-interval-cell',
|
||||
render : function(){
|
||||
this.$el.empty();
|
||||
var interval = this.model.get('interval');
|
||||
var duration = moment.duration(interval, 'minutes').humanize().replace(/an?(?=\s)/, '1');
|
||||
if(interval === 0) {
|
||||
this.$el.html('disabled');
|
||||
}
|
||||
else {
|
||||
this.$el.html(duration);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user