updated external library registrations.
This commit is contained in:
parent
c01f982698
commit
258977f262
|
@ -129,3 +129,4 @@ UpdateLogs/
|
||||||
*//Bootstrap/*.css
|
*//Bootstrap/*.css
|
||||||
NzbDrone.Web/cassette-cache/*
|
NzbDrone.Web/cassette-cache/*
|
||||||
*.eq
|
*.eq
|
||||||
|
NzbDrone.Web/_backboneApp/.idea/workspace.xml
|
||||||
|
|
|
@ -212,6 +212,8 @@
|
||||||
<Content Include="_backboneApp\Content\jquery.dataTables.bootstrap.css" />
|
<Content Include="_backboneApp\Content\jquery.dataTables.bootstrap.css" />
|
||||||
<Content Include="_backboneApp\JsLibraries\jquery.js" />
|
<Content Include="_backboneApp\JsLibraries\jquery.js" />
|
||||||
<Content Include="_backboneApp\JsLibraries\require.js" />
|
<Content Include="_backboneApp\JsLibraries\require.js" />
|
||||||
|
<Content Include="_backboneApp\Mixins\backbone.marionette.templates.js" />
|
||||||
|
<Content Include="_backboneApp\Mixins\backbone.xhr.js" />
|
||||||
<Content Include="_backboneApp\Routing.js" />
|
<Content Include="_backboneApp\Routing.js" />
|
||||||
<Content Include="_backboneApp\JsLibraries\backbone.modelbinder.js" />
|
<Content Include="_backboneApp\JsLibraries\backbone.modelbinder.js" />
|
||||||
<Content Include="_backboneApp\AddSeries\New\AddNewSeriesTemplate.html" />
|
<Content Include="_backboneApp\AddSeries\New\AddNewSeriesTemplate.html" />
|
||||||
|
@ -227,7 +229,6 @@
|
||||||
<Content Include="_backboneApp\Quality\qualityProfileCollection.js" />
|
<Content Include="_backboneApp\Quality\qualityProfileCollection.js" />
|
||||||
<Content Include="_backboneApp\Quality\qualityTypeModel.js" />
|
<Content Include="_backboneApp\Quality\qualityTypeModel.js" />
|
||||||
<Content Include="_backboneApp\Quality\qualityTypeCollection.js" />
|
<Content Include="_backboneApp\Quality\qualityTypeCollection.js" />
|
||||||
<Content Include="_backboneApp\JsLibraries\backbone.marionette.extend.js" />
|
|
||||||
<Compile Include="_backboneApp\CassetteConfiguration.cs" />
|
<Compile Include="_backboneApp\CassetteConfiguration.cs" />
|
||||||
<Compile Include="Controllers\ImageController.cs" />
|
<Compile Include="Controllers\ImageController.cs" />
|
||||||
<Compile Include="Controllers\SearchHistoryController.cs" />
|
<Compile Include="Controllers\SearchHistoryController.cs" />
|
||||||
|
|
|
@ -63,17 +63,22 @@
|
||||||
<div id="footer-region" class="span20"></div>
|
<div id="footer-region" class="span20"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="../../_backboneApp/JsLibraries/jquery.js"></script>
|
<script src="/_backboneApp/JsLibraries/jquery.js"></script>
|
||||||
<script src="../../_backboneApp/JsLibraries/bootstrap.js"></script>
|
<script src="/_backboneApp/JsLibraries/bootstrap.js"></script>
|
||||||
<script src="../../_backboneApp/JsLibraries/underscore.js"></script>
|
<script src="/_backboneApp/JsLibraries/jquery.dataTables.js"></script>
|
||||||
<script src="../../_backboneApp/JsLibraries/handlebars.js"></script>
|
<script src="/_backboneApp/JsLibraries/jquery.dataTables.extensions.js"></script>
|
||||||
<script src="../../_backboneApp/JsLibraries/backbone.js"></script>
|
<script src="/_backboneApp/JsLibraries/jquery.dataTables.bootstrap.pagination.js"></script>
|
||||||
<script src="../../_backboneApp/JsLibraries/backbone.modelbinder.js"></script>
|
<script src="/_backboneApp/JsLibraries/underscore.js"></script>
|
||||||
<script src="../../_backboneApp/JsLibraries/backbone.mutators.js"></script>
|
<script src="/_backboneApp/JsLibraries/handlebars.js"></script>
|
||||||
<script src="../../_backboneApp/JsLibraries/backbone.marionette.js"></script>
|
<script src="/_backboneApp/JsLibraries/backbone.js"></script>
|
||||||
<script src="../../_backboneApp/JsLibraries/jquery.dataTables.js"></script>
|
<script src="/_backboneApp/JsLibraries/backbone.modelbinder.js"></script>
|
||||||
<script src="../../_backboneApp/JsLibraries/jquery.dataTables.extensions.js"></script>
|
<script src="/_backboneApp/JsLibraries/backbone.mutators.js"></script>
|
||||||
<script src="../../_backboneApp/JsLibraries/jquery.dataTables.bootstrap.pagination.js"></script>
|
<script src="/_backboneApp/JsLibraries/backbone.marionette.js"></script>
|
||||||
|
|
||||||
|
<script src="/_backboneApp/JsLibraries/sugar.js"></script>
|
||||||
|
|
||||||
|
<script src="/_backboneApp/Mixins/backbone.marionette.templates.js"></script>
|
||||||
|
<script src="/_backboneApp/Mixins/backbone.xhr.js"></script>
|
||||||
|
|
||||||
<script data-main="/_backboneApp/app" src="/_backboneApp/JsLibraries/require.js"></script>
|
<script data-main="/_backboneApp/app" src="/_backboneApp/JsLibraries/require.js"></script>
|
||||||
<script src="/_backboneApp/Routing.js"></script>
|
<script src="/_backboneApp/Routing.js"></script>
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
|
|
||||||
define(['underscore', 'marionette', 'handlebars', 'jquery'], function (_, Marionette, Handlebars, $) {
|
|
||||||
_.extend(Marionette.TemplateCache.prototype, {
|
|
||||||
|
|
||||||
loadTemplate: function (templateId) {
|
|
||||||
|
|
||||||
|
|
||||||
var template;
|
|
||||||
|
|
||||||
console.log("Loading template '" + templateId + "'");
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: '_backboneApp//' + templateId + '.html',
|
|
||||||
cache: false,
|
|
||||||
async: false
|
|
||||||
|
|
||||||
}).done(function (data) {
|
|
||||||
template = data;
|
|
||||||
|
|
||||||
}).fail(function (data) {
|
|
||||||
console.log("couldn't load template " + this.templateId + " Error: " + data.statusText);
|
|
||||||
template = "<div class='alert alert-error'>Couldn't load template '" + templateId + "'. Status: " + data.statusText + "</div>";
|
|
||||||
});
|
|
||||||
|
|
||||||
return template;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
_.extend(Marionette.TemplateCache.prototype, {
|
|
||||||
|
|
||||||
compileTemplate: function (rawTemplate) {
|
|
||||||
return Handlebars.compile(rawTemplate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
_.extend(Marionette.TemplateCache.prototype, {
|
||||||
|
|
||||||
|
loadTemplate:function (templateId) {
|
||||||
|
|
||||||
|
|
||||||
|
var template;
|
||||||
|
|
||||||
|
console.log("Loading template '" + templateId + "'");
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url:'_backboneApp//' + templateId + '.html',
|
||||||
|
cache:false,
|
||||||
|
async:false
|
||||||
|
|
||||||
|
}).done(function (data) {
|
||||||
|
template = data;
|
||||||
|
|
||||||
|
}).fail(function (data) {
|
||||||
|
console.log("couldn't load template " + this.templateId + " Error: " + data.statusText);
|
||||||
|
template = "<div class='alert alert-error'>Couldn't load template '" + templateId + "'. Status: " + data.statusText + "</div>";
|
||||||
|
});
|
||||||
|
|
||||||
|
return template;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
_.extend(Marionette.TemplateCache.prototype, {
|
||||||
|
|
||||||
|
compileTemplate:function (rawTemplate) {
|
||||||
|
return Handlebars.compile(rawTemplate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
@ -1,16 +1,21 @@
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
|
|
||||||
NzbDrone.Shared.NotificationModel = Backbone.Model.extend({
|
NzbDrone.Shared.NotificationModel = Backbone.Model.extend({
|
||||||
mutators: {
|
mutators:{
|
||||||
pre: function () {
|
pre:function () {
|
||||||
if (this.get('message')) {
|
try {
|
||||||
return this.get('message').lines().lenght > 1;
|
if (this.get('message')) {
|
||||||
|
return this.get('message').lines().lenght > 1;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
iconClass: function () {
|
iconClass:function () {
|
||||||
|
|
||||||
if (this.has('icon')) {
|
if (this.has('icon')) {
|
||||||
return "icon";
|
return 'icon';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.get('level') === 'info') {
|
if (this.get('level') === 'info') {
|
||||||
|
@ -25,10 +30,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
defaults: {
|
defaults:{
|
||||||
"level": "info",
|
"level":'info',
|
||||||
"title": "",
|
"title":'',
|
||||||
"message": "",
|
"message":''
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -4,19 +4,15 @@
|
||||||
'backbone': 'JsLibraries/backbone',
|
'backbone': 'JsLibraries/backbone',
|
||||||
'underscore': 'JsLibraries/underscore',
|
'underscore': 'JsLibraries/underscore',
|
||||||
'marionette': 'JsLibraries/backbone.marionette',
|
'marionette': 'JsLibraries/backbone.marionette',
|
||||||
'handlebars': 'JsLibraries/handlebars',
|
'handlebars': 'JsLibraries/handlebars'
|
||||||
'jquery': 'JsLibraries/jquery'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
shim: {
|
shim: {
|
||||||
jquery:{
|
|
||||||
exports:'$'
|
|
||||||
},
|
|
||||||
underscore: {
|
underscore: {
|
||||||
exports: '_'
|
exports: '_'
|
||||||
},
|
},
|
||||||
backbone: {
|
backbone: {
|
||||||
deps: ['underscore', 'jquery'],
|
deps: ['underscore'],
|
||||||
exports: 'Backbone'
|
exports: 'Backbone'
|
||||||
},
|
},
|
||||||
marionette: {
|
marionette: {
|
||||||
|
@ -25,23 +21,18 @@
|
||||||
},
|
},
|
||||||
handlebars: {
|
handlebars: {
|
||||||
exports: 'Handlebars'
|
exports: 'Handlebars'
|
||||||
},
|
|
||||||
dataTable: {
|
|
||||||
deps: ['jquery']
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
define('app', ['jquery', 'JsLibraries/backbone.modelbinder', 'marionette', 'handlebars', 'JsLibraries/backbone.marionette.extend'],
|
define('app', function () {
|
||||||
function (jquery, modelBinder, marionette, handlebars) {
|
//window.$ = jquery;
|
||||||
|
//window.jquery = jquery;
|
||||||
|
|
||||||
|
//window.Backbone.ModelBinder = modelBinder;
|
||||||
window.$ = jquery;
|
//window.Backbone.Marionette = marionette;
|
||||||
window.jquery = jquery;
|
//window.Handlebars = handlebars;
|
||||||
|
|
||||||
window.Backbone.ModelBinder = modelBinder;
|
|
||||||
window.Backbone.Marionette = marionette;
|
|
||||||
window.Handlebars = handlebars;
|
|
||||||
|
|
||||||
window.NzbDrone = new Backbone.Marionette.Application();
|
window.NzbDrone = new Backbone.Marionette.Application();
|
||||||
window.NzbDrone.Series = {};
|
window.NzbDrone.Series = {};
|
||||||
|
|
Loading…
Reference in New Issue