mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 07:22:35 +01:00
updated _ templating pattern to be {{ }} instead of <%%>
This commit is contained in:
parent
9969f66201
commit
2229f8f2fa
@ -388,8 +388,10 @@
|
||||
<None Include="_backboneApp\JsLibraries\jquery-1.8.2.intellisense.js" />
|
||||
<Content Include="_backboneApp\JsLibraries\backbone.collectionbinder.js" />
|
||||
<Content Include="_backboneApp\JsLibraries\backbone.debug.js" />
|
||||
<Content Include="_backboneApp\JsLibraries\handlebars.js" />
|
||||
<Content Include="_backboneApp\JsLibraries\jquery.js" />
|
||||
<Content Include="_backboneApp\JsLibraries\jquery-ui-1.9.0.js" />
|
||||
<Content Include="_backboneApp\JsLibraries\marionette.viewswapper.js" />
|
||||
<Content Include="_backboneApp\JsLibraries\sugar.js" />
|
||||
<Content Include="_backboneApp\JsLibraries\underscore.js" />
|
||||
<Content Include="Views\System\Index.cshtml" />
|
||||
|
@ -3,6 +3,6 @@
|
||||
<i class="add-on icon-search"></i>
|
||||
<input type="text" class="span10" placeholder="Start typing the name of series you want to add ...">
|
||||
</div>
|
||||
<div id="search-result">
|
||||
<div id="search-result" class="span10">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,8 +5,7 @@
|
||||
NzbDrone.AddSeries.SearchItemView = Backbone.Marionette.ItemView.extend({
|
||||
|
||||
template: "AddSeries/AddNewSeries/SearchResultTemplate",
|
||||
className: 'row',
|
||||
|
||||
className: 'well',
|
||||
onRender: function () {
|
||||
NzbDrone.ModelBinder.bind(this.model, this.el);
|
||||
}
|
||||
@ -15,7 +14,6 @@ NzbDrone.AddSeries.SearchItemView = Backbone.Marionette.ItemView.extend({
|
||||
|
||||
NzbDrone.AddSeries.SearchResultView = Backbone.Marionette.CollectionView.extend({
|
||||
|
||||
className: 'result',
|
||||
itemView: NzbDrone.AddSeries.SearchItemView,
|
||||
|
||||
initialize: function () {
|
||||
|
@ -1,4 +1 @@
|
||||
<div>
|
||||
<div name="SeriesName"/>
|
||||
<div name="FirstAired"/>
|
||||
</div>
|
||||
{{seriesName}} {{seriesYear}}
|
@ -1,6 +1,6 @@
|
||||
<td name="Path" class="span10" />
|
||||
<td name="path" class="span10" />
|
||||
<td class="span3">
|
||||
<span name="FreeSpaceString"></span>
|
||||
<span name="freeSpaceString"></span>
|
||||
</td>
|
||||
<td class="span1 nz-row-action">
|
||||
<div id="remove-dir" class="btn btn-danger icon-minus">
|
||||
|
@ -1,14 +1,13 @@
|
||||
/// <reference path="../../app.js" />
|
||||
NzbDrone.AddSeries.RootDirModel = Backbone.Model.extend({
|
||||
idAttribute: 'Id',
|
||||
|
||||
mutators: {
|
||||
FreeSpaceString: function () {
|
||||
return this.get('FreeSpace').bytes(2) + " Free";
|
||||
freeSpaceString: function () {
|
||||
return this.get('freeSpace').bytes(2) + " Free";
|
||||
}
|
||||
},
|
||||
|
||||
defaults: {
|
||||
FreeSpace: 0,
|
||||
freeSpace: 0,
|
||||
}
|
||||
});
|
||||
|
@ -1,4 +1,9 @@
|
||||
/// <reference path="../app.js" />
|
||||
NzbDrone.AddSeries.SearchResultModel = Backbone.Model.extend({
|
||||
|
||||
mutators: {
|
||||
seriesYear: function () {
|
||||
var date = Date.utc.create(this.get('firstAired'));
|
||||
return date.format('{yyyy}');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
1992
NzbDrone.Web/_backboneApp/JsLibraries/handlebars.js
Normal file
1992
NzbDrone.Web/_backboneApp/JsLibraries/handlebars.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,7 @@
|
||||
/// <reference path="JsLibraries/underscore.js" />
|
||||
/// <reference path="JsLibraries/sugar.js" />
|
||||
/// <reference path="JsLibraries/backbone.js" />
|
||||
/// <reference path="JsLibraries/handlebars.js" />
|
||||
/// <reference path="JsLibraries/backbone.modelbinder.js" />
|
||||
/// <reference path="JsLibraries/backbone.mutators.js" />
|
||||
/// <reference path="JsLibraries/backbone.shortcuts.js" />
|
||||
@ -18,6 +19,10 @@ if (typeof console == "undefined") {
|
||||
NzbDrone = new Backbone.Marionette.Application();
|
||||
NzbDrone.AddSeries = NzbDrone.module("AddSeries");
|
||||
|
||||
_.templateSettings = {
|
||||
interpolate: /\{\{([\s\S]+?)\}\}/g
|
||||
};
|
||||
|
||||
NzbDrone.ModelBinder = new Backbone.ModelBinder();
|
||||
|
||||
|
||||
@ -36,8 +41,8 @@ NzbDrone.Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
NzbDrone.Controller = Backbone.Marionette.Controller.extend({
|
||||
http://localhost:65079/_backboneApp/Content
|
||||
NzbDrone.Controller = Backbone.Marionette.Controller.extend({
|
||||
|
||||
addSeries: function () {
|
||||
NzbDrone.mainRegion.show(new NzbDrone.AddSeries.AddSeriesLayout());
|
||||
@ -47,7 +52,7 @@ NzbDrone.Controller = Backbone.Marionette.Controller.extend({
|
||||
notFound: function () {
|
||||
alert('route not found');
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
NzbDrone.Router = Backbone.Marionette.AppRouter.extend({
|
||||
|
Loading…
Reference in New Issue
Block a user