mirror of https://github.com/Radarr/Radarr
fixed FileSizeCell, template helper.
This commit is contained in:
parent
7961e83338
commit
72cfde1303
|
@ -3,22 +3,22 @@
|
||||||
<JSRemoteDebuggerConfigurationSettings>
|
<JSRemoteDebuggerConfigurationSettings>
|
||||||
<option name="engineId" value="chrome" />
|
<option name="engineId" value="chrome" />
|
||||||
<option name="fileUrl" value="http://localhost:8989" />
|
<option name="fileUrl" value="http://localhost:8989" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Calendar" url="http://localhost:8989/Calendar" />
|
<mapping url="http://localhost:8989/Calendar" local-file="$PROJECT_DIR$/Calendar" />
|
||||||
<mapping local-file="$PROJECT_DIR$/MainMenuView.js" url="http://localhost:8989/MainMenuView.js" />
|
<mapping url="http://localhost:8989/MainMenuView.js" local-file="$PROJECT_DIR$/MainMenuView.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Settings" url="http://localhost:8989/Settings" />
|
<mapping url="http://localhost:8989/Settings" local-file="$PROJECT_DIR$/Settings" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Upcoming" url="http://localhost:8989/Upcoming" />
|
<mapping url="http://localhost:8989/Upcoming" local-file="$PROJECT_DIR$/Upcoming" />
|
||||||
<mapping local-file="$PROJECT_DIR$/app.js" url="http://localhost:8989/app.js" />
|
<mapping url="http://localhost:8989/app.js" local-file="$PROJECT_DIR$/app.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Mixins" url="http://localhost:8989/Mixins" />
|
<mapping url="http://localhost:8989/Mixins" local-file="$PROJECT_DIR$/Mixins" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Missing" url="http://localhost:8989/Missing" />
|
<mapping url="http://localhost:8989/Missing" local-file="$PROJECT_DIR$/Missing" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Quality" url="http://localhost:8989/Quality" />
|
<mapping url="http://localhost:8989/Quality" local-file="$PROJECT_DIR$/Quality" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Config.js" url="http://localhost:8989/Config.js" />
|
<mapping url="http://localhost:8989/Config.js" local-file="$PROJECT_DIR$/Config.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Shared" url="http://localhost:8989/Shared" />
|
<mapping url="http://localhost:8989/Shared" local-file="$PROJECT_DIR$/Shared" />
|
||||||
<mapping local-file="$PROJECT_DIR$/AddSeries" url="http://localhost:8989/AddSeries" />
|
<mapping url="http://localhost:8989/AddSeries" local-file="$PROJECT_DIR$/AddSeries" />
|
||||||
<mapping local-file="$PROJECT_DIR$/HeaderView.js" url="http://localhost:8989/HeaderView.js" />
|
<mapping url="http://localhost:8989/HeaderView.js" local-file="$PROJECT_DIR$/HeaderView.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$" url="http://localhost:8989" />
|
<mapping url="http://localhost:8989" local-file="$PROJECT_DIR$" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Routing.js" url="http://localhost:8989/Routing.js" />
|
<mapping url="http://localhost:8989/Routing.js" local-file="$PROJECT_DIR$/Routing.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Controller.js" url="http://localhost:8989/Controller.js" />
|
<mapping url="http://localhost:8989/Controller.js" local-file="$PROJECT_DIR$/Controller.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Series" url="http://localhost:8989/Series" />
|
<mapping url="http://localhost:8989/Series" local-file="$PROJECT_DIR$/Series" />
|
||||||
</JSRemoteDebuggerConfigurationSettings>
|
</JSRemoteDebuggerConfigurationSettings>
|
||||||
<RunnerSettings RunnerId="JavascriptDebugRunner" />
|
<RunnerSettings RunnerId="JavascriptDebugRunner" />
|
||||||
<ConfigurationWrapper RunnerId="JavascriptDebugRunner" />
|
<ConfigurationWrapper RunnerId="JavascriptDebugRunner" />
|
||||||
|
|
|
@ -3,22 +3,22 @@
|
||||||
<JSRemoteDebuggerConfigurationSettings>
|
<JSRemoteDebuggerConfigurationSettings>
|
||||||
<option name="engineId" value="firefox" />
|
<option name="engineId" value="firefox" />
|
||||||
<option name="fileUrl" value="http://localhost:8989" />
|
<option name="fileUrl" value="http://localhost:8989" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Calendar" url="http://localhost:8989/Calendar" />
|
<mapping url="http://localhost:8989/Calendar" local-file="$PROJECT_DIR$/Calendar" />
|
||||||
<mapping local-file="$PROJECT_DIR$/MainMenuView.js" url="http://localhost:8989/MainMenuView.js" />
|
<mapping url="http://localhost:8989/MainMenuView.js" local-file="$PROJECT_DIR$/MainMenuView.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Settings" url="http://localhost:8989/Settings" />
|
<mapping url="http://localhost:8989/Settings" local-file="$PROJECT_DIR$/Settings" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Upcoming" url="http://localhost:8989/Upcoming" />
|
<mapping url="http://localhost:8989/Upcoming" local-file="$PROJECT_DIR$/Upcoming" />
|
||||||
<mapping local-file="$PROJECT_DIR$/app.js" url="http://localhost:8989/app.js" />
|
<mapping url="http://localhost:8989/app.js" local-file="$PROJECT_DIR$/app.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Mixins" url="http://localhost:8989/Mixins" />
|
<mapping url="http://localhost:8989/Mixins" local-file="$PROJECT_DIR$/Mixins" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Missing" url="http://localhost:8989/Missing" />
|
<mapping url="http://localhost:8989/Missing" local-file="$PROJECT_DIR$/Missing" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Config.js" url="http://localhost:8989/Config.js" />
|
<mapping url="http://localhost:8989/Config.js" local-file="$PROJECT_DIR$/Config.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Quality" url="http://localhost:8989/Quality" />
|
<mapping url="http://localhost:8989/Quality" local-file="$PROJECT_DIR$/Quality" />
|
||||||
<mapping local-file="$PROJECT_DIR$/AddSeries" url="http://localhost:8989/AddSeries" />
|
<mapping url="http://localhost:8989/AddSeries" local-file="$PROJECT_DIR$/AddSeries" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Shared" url="http://localhost:8989/Shared" />
|
<mapping url="http://localhost:8989/Shared" local-file="$PROJECT_DIR$/Shared" />
|
||||||
<mapping local-file="$PROJECT_DIR$/HeaderView.js" url="http://localhost:8989/HeaderView.js" />
|
<mapping url="http://localhost:8989/HeaderView.js" local-file="$PROJECT_DIR$/HeaderView.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$" url="http://localhost:8989" />
|
<mapping url="http://localhost:8989" local-file="$PROJECT_DIR$" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Routing.js" url="http://localhost:8989/Routing.js" />
|
<mapping url="http://localhost:8989/Routing.js" local-file="$PROJECT_DIR$/Routing.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Controller.js" url="http://localhost:8989/Controller.js" />
|
<mapping url="http://localhost:8989/Controller.js" local-file="$PROJECT_DIR$/Controller.js" />
|
||||||
<mapping local-file="$PROJECT_DIR$/Series" url="http://localhost:8989/Series" />
|
<mapping url="http://localhost:8989/Series" local-file="$PROJECT_DIR$/Series" />
|
||||||
</JSRemoteDebuggerConfigurationSettings>
|
</JSRemoteDebuggerConfigurationSettings>
|
||||||
<RunnerSettings RunnerId="JavascriptDebugRunner" />
|
<RunnerSettings RunnerId="JavascriptDebugRunner" />
|
||||||
<ConfigurationWrapper RunnerId="JavascriptDebugRunner" />
|
<ConfigurationWrapper RunnerId="JavascriptDebugRunner" />
|
||||||
|
|
|
@ -67,7 +67,9 @@ define(['app', 'Shared/SpinnerView', 'Episode/Summary/View', 'Episode/Search/Lay
|
||||||
var promise = releases.fetchEpisodeReleases(this.model.id);
|
var promise = releases.fetchEpisodeReleases(this.model.id);
|
||||||
|
|
||||||
promise.done(function () {
|
promise.done(function () {
|
||||||
|
if (!self.isClosed) {
|
||||||
self.search.show(new NzbDrone.Episode.Search.Layout({collection: releases}));
|
self.search.show(new NzbDrone.Episode.Search.Layout({collection: releases}));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@ NzbDrone.Shared.Cells.FileSizeCell = Backgrid.Cell.extend({
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
var size = this.model.get(this.column.get("name"));
|
var size = this.model.get(this.column.get("name"));
|
||||||
|
this.$el.html(NzbDrone.Shared.FormatHelpers.FileSizeHelper(size));
|
||||||
this.delegateEvents();
|
this.delegateEvents();
|
||||||
return NzbDrone.Shared.FormatHelpers.FileSizeHelper(size);
|
return this;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
NzbDrone.Shared.FormatHelpers.FileSizeHelper = function (sourceSize) {
|
NzbDrone.Shared.FormatHelpers.FileSizeHelper = function (sourceSize) {
|
||||||
var size = Number(sourceSize);
|
var size = Number(sourceSize);
|
||||||
this.$el.html(size.bytes(1));
|
return size.bytes(1);
|
||||||
return this;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NzbDrone.Shared.FormatHelpers.DateHelper = function (sourceDate) {
|
NzbDrone.Shared.FormatHelpers.DateHelper = function (sourceDate) {
|
||||||
|
|
|
@ -21,7 +21,10 @@ define(function () {
|
||||||
//need tab index so close on escape works
|
//need tab index so close on escape works
|
||||||
//https://github.com/twitter/bootstrap/issues/4663
|
//https://github.com/twitter/bootstrap/issues/4663
|
||||||
this.$el.attr('tabindex', '-1');
|
this.$el.attr('tabindex', '-1');
|
||||||
this.$el.modal({'show': true, 'keyboard': true});
|
this.$el.modal({
|
||||||
|
'show' : true,
|
||||||
|
'keyboard': true,
|
||||||
|
'backdrop': 'static'});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ define(['app'], function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper("fileSize", function (size) {
|
Handlebars.registerHelper("fileSize", function (size) {
|
||||||
return NzbDrone.Shared.FormatHelpers.FileSizeHelper(size);
|
return new Handlebars.SafeString(NzbDrone.Shared.FormatHelpers.FileSizeHelper(size));
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper("date", function (date) {
|
Handlebars.registerHelper("date", function (date) {
|
||||||
|
|
Loading…
Reference in New Issue