parent
ef62af75df
commit
b0bd3f34f1
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<file url="PROJECT" libraries="{libraries}" />
|
||||
<file url="PROJECT" libraries="{jQuery-1.9.1}" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
|
@ -1,51 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="libraries" type="javaScript">
|
||||
<properties>
|
||||
<sourceFilesUrls>
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/bootstrap.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.debug.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/sugar.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.shortcuts.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.pager.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/handlebars.runtime.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.bootstrap.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.modelbinder.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/fullcalendar.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.collectionbinder.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/underscore.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/bootstrap.slider.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.viewswapper.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/require.js" />
|
||||
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.mutators.js" />
|
||||
</sourceFilesUrls>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/bootstrapSwitch.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/toastr-1.1.5.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/bootstrap.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.debug.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/sugar.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.shortcuts.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.pager.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/handlebars.runtime.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.bootstrap.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.modelbinder.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.collectionbinder.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/fullcalendar.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/underscore.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/bootstrap.slider.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.viewswapper.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.mutators.js" />
|
||||
<root url="file://$PROJECT_DIR$/JsLibraries/require.js" />
|
||||
</CLASSES>
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -1,12 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
define([
|
||||
'app',
|
||||
'Calendar/UpcomingCollection'
|
||||
|
||||
], function () {
|
||||
NzbDrone.Calendar.UpcomingItemView = Backbone.Marionette.ItemView.extend({
|
||||
template : 'Calendar/UpcomingItemTemplate',
|
||||
define(
|
||||
[
|
||||
'marionette'
|
||||
], function (Marionette) {
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'Calendar/UpcomingItemTemplate',
|
||||
tagName : 'div'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,121 +1,121 @@
|
||||
.calendar {
|
||||
th, td {
|
||||
border-color: #eeeeee;
|
||||
border-color : #eeeeee;
|
||||
}
|
||||
|
||||
.primary {
|
||||
border-color: #007ccd;
|
||||
background-color: #007ccd;
|
||||
border-color : #007ccd;
|
||||
background-color : #007ccd;
|
||||
}
|
||||
|
||||
.fc-event-skin {
|
||||
background-color: #007ccd;
|
||||
border: 1px solid #007ccd;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
background-color : #007ccd;
|
||||
border : 1px solid #007ccd;
|
||||
border-radius : 4px;
|
||||
text-align : center;
|
||||
}
|
||||
|
||||
.info {
|
||||
border-color: #14b8d4;
|
||||
background-color: #14b8d4;
|
||||
border-color : #14b8d4;
|
||||
background-color : #14b8d4;
|
||||
}
|
||||
|
||||
.inverse {
|
||||
border-color: #333333;
|
||||
background-color: #333333;
|
||||
border-color : #333333;
|
||||
background-color : #333333;
|
||||
}
|
||||
|
||||
.warning {
|
||||
border-color: #ffa93c;
|
||||
background-color: #ffa93c;
|
||||
border-color : #ffa93c;
|
||||
background-color : #ffa93c;
|
||||
}
|
||||
|
||||
.danger {
|
||||
border-color: #ea494a;
|
||||
background-color: #ea494a;
|
||||
border-color : #ea494a;
|
||||
background-color : #ea494a;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #eeeeee;
|
||||
background-color : #eeeeee;
|
||||
}
|
||||
|
||||
.purple {
|
||||
border-color: #7932ea;
|
||||
background-color: #7932ea;
|
||||
border-color : #7932ea;
|
||||
background-color : #7932ea;
|
||||
}
|
||||
|
||||
.success {
|
||||
border-color: #4cb158;
|
||||
background-color: #4cb158;
|
||||
border-color : #4cb158;
|
||||
background-color : #4cb158;
|
||||
}
|
||||
h2 {
|
||||
font-size: 17.5px;
|
||||
font-size : 17.5px;
|
||||
}
|
||||
}
|
||||
|
||||
.event {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
border-top: 1px solid #eeeeee;
|
||||
padding-top: 10px;
|
||||
display : inline-block;
|
||||
width : 100%;
|
||||
margin-bottom : 10px;
|
||||
border-top : 1px solid #eeeeee;
|
||||
padding-top : 10px;
|
||||
|
||||
.primary {
|
||||
border-color: #007ccd;
|
||||
border-color : #007ccd;
|
||||
}
|
||||
|
||||
.info {
|
||||
border-color: #14b8d4;
|
||||
border-color : #14b8d4;
|
||||
}
|
||||
|
||||
h4 {
|
||||
text-transform: none !important;
|
||||
font-weight: 500;
|
||||
color: #008dcd;
|
||||
margin: 5px 0px;
|
||||
text-transform : none !important;
|
||||
font-weight : 500;
|
||||
color : #008dcd;
|
||||
margin : 5px 0px;
|
||||
}
|
||||
|
||||
.inverse {
|
||||
border-color: #333333;
|
||||
border-color : #333333;
|
||||
}
|
||||
|
||||
.warning {
|
||||
border-color: #ffa93c;
|
||||
border-color : #ffa93c;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #999999;
|
||||
color : #999999;
|
||||
}
|
||||
|
||||
.danger {
|
||||
border-color: #ea494a;
|
||||
border-color : #ea494a;
|
||||
}
|
||||
|
||||
.date {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
border-left: 4px solid #eeeeee;
|
||||
padding-left: 16px;
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
text-align : center;
|
||||
display : inline-block;
|
||||
border-left : 4px solid #eeeeee;
|
||||
padding-left : 16px;
|
||||
float : left;
|
||||
margin-right : 20px;
|
||||
|
||||
h4 {
|
||||
line-height: 1em;
|
||||
color: #555555;
|
||||
font-weight: 300;
|
||||
line-height : 1em;
|
||||
color : #555555;
|
||||
font-weight : 300;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: 500;
|
||||
line-height: 0.8em;
|
||||
font-weight : 500;
|
||||
line-height : 0.8em;
|
||||
}
|
||||
}
|
||||
|
||||
.purple {
|
||||
border-color: #7932ea;
|
||||
border-color : #7932ea;
|
||||
}
|
||||
|
||||
.success {
|
||||
border-color: #4cb158;
|
||||
border-color : #4cb158;
|
||||
}
|
||||
}
|
@ -1,15 +1,19 @@
|
||||
'use strict';
|
||||
define(['app', 'Shared/FormatHelpers', 'Cells/NzbDroneCell'], function () {
|
||||
return NzbDrone.Cells.NzbDroneCell.extend({
|
||||
define(
|
||||
[
|
||||
'backgrid',
|
||||
'Shared/FormatHelpers'
|
||||
], function (Backgrid, FormatHelpers) {
|
||||
return Backgrid.Cell.extend({
|
||||
className: 'air-date-cell',
|
||||
|
||||
render: function () {
|
||||
|
||||
this.$el.empty();
|
||||
var airDate = this.model.get(this.column.get('name'));
|
||||
this.$el.html(NzbDrone.Shared.FormatHelpers.DateHelper(airDate));
|
||||
this.$el.html(FormatHelpers.DateHelper(airDate));
|
||||
return this;
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,15 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
define(['app', 'Shared/FormatHelpers','backgrid'], function () {
|
||||
NzbDrone.Cells.FileSizeCell = Backgrid.Cell.extend({
|
||||
define(
|
||||
[
|
||||
'backgrid',
|
||||
'Shared/FormatHelpers'
|
||||
], function (Backgrid, FormatHelpers) {
|
||||
return Backgrid.Cell.extend({
|
||||
|
||||
className: 'file-size-cell',
|
||||
|
||||
render: function () {
|
||||
var size = this.model.get(this.column.get('name'));
|
||||
this.$el.html(NzbDrone.Shared.FormatHelpers.FileSizeHelper(size));
|
||||
this.$el.html(FormatHelpers.FileSizeHelper(size));
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,9 +1,12 @@
|
||||
'use strict';
|
||||
define(['app', 'Cells/TemplatedCell'], function (App, TemplatedCell) {
|
||||
define(
|
||||
[
|
||||
'Cells/TemplatedCell'
|
||||
], function (TemplatedCell) {
|
||||
return TemplatedCell.extend({
|
||||
|
||||
className: 'quality-cell',
|
||||
template : 'Cells/QualityTemplate'
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,25 +0,0 @@
|
||||
'use strict';
|
||||
define(['app','cells/nzbdronecell'], function () {
|
||||
return NzbDrone.Cells.NzbDroneCell.extend({
|
||||
className: 'series-status-cell',
|
||||
|
||||
render: function () {
|
||||
this.$el.empty();
|
||||
var monitored = this.model.get('monitored');
|
||||
var status = this.model.get('status');
|
||||
|
||||
if (!monitored) {
|
||||
this.$el.html('<i class="icon-pause grid-icon" title="Not Monitored"></i>');
|
||||
}
|
||||
else if (status === 'continuing') {
|
||||
this.$el.html('<i class="icon-play grid-icon" title="Continuing"></i>');
|
||||
}
|
||||
|
||||
else {
|
||||
this.$el.html('<i class="icon-stop grid-icon" title="Ended"></i>');
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
@ -1,9 +1,12 @@
|
||||
'use strict';
|
||||
define(['app', 'Cells/TemplatedCell'], function (App, TemplatedCell) {
|
||||
define(
|
||||
[
|
||||
'Cells/TemplatedCell'
|
||||
], function (TemplatedCell) {
|
||||
return TemplatedCell.extend({
|
||||
|
||||
className: 'series-title',
|
||||
template : 'Cells/SeriesTitleTemplate'
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,8 +1,11 @@
|
||||
'use strict';
|
||||
define(['app'], function () {
|
||||
define(
|
||||
[
|
||||
'marionette'
|
||||
], function (Marionette) {
|
||||
|
||||
NzbDrone.Episode.Summary.View = Backbone.Marionette.ItemView.extend({
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'Episode/Summary/ViewTemplate'
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
@ -1,31 +1,50 @@
|
||||
'use strict';
|
||||
define(['app', 'handlebars'], function (App,Handlebars) {
|
||||
Handlebars.registerHelper('formBuilder', function () {
|
||||
var ret = '';
|
||||
_.each(this.fields, function (field) {
|
||||
ret += NzbDrone.Form.FieldBuilder(field);
|
||||
});
|
||||
define(
|
||||
[
|
||||
'handlebars'
|
||||
], function (Handlebars) {
|
||||
|
||||
return new Handlebars.SafeString(ret);
|
||||
});
|
||||
|
||||
NzbDrone.Form.FieldBuilder = function (field) {
|
||||
var formBuilder = function (field) {
|
||||
if (!field.type) {
|
||||
return Handlebars.helpers.partial.apply(field, ['Form/TextboxTemplate']);
|
||||
return Handlebars.helpers.partial.apply(field,
|
||||
[
|
||||
'Form/TextboxTemplate'
|
||||
]);
|
||||
}
|
||||
|
||||
if (field.type === 'password') {
|
||||
return Handlebars.helpers.partial.apply(field, ['Form/PasswordTemplate']);
|
||||
return Handlebars.helpers.partial.apply(field,
|
||||
[
|
||||
'Form/PasswordTemplate'
|
||||
]);
|
||||
}
|
||||
|
||||
if (field.type === 'checkbox') {
|
||||
return Handlebars.helpers.partial.apply(field, ['Form/CheckboxTemplate']);
|
||||
return Handlebars.helpers.partial.apply(field,
|
||||
[
|
||||
'Form/CheckboxTemplate'
|
||||
]);
|
||||
}
|
||||
|
||||
if (field.type === 'select') {
|
||||
return Handlebars.helpers.partial.apply(field, ['Form/SelectTemplate']);
|
||||
return Handlebars.helpers.partial.apply(field,
|
||||
[
|
||||
'Form/SelectTemplate'
|
||||
]);
|
||||
}
|
||||
|
||||
return Handlebars.helpers.partial.apply(field, ['Form/TextboxTemplate']);
|
||||
return Handlebars.helpers.partial.apply(field,
|
||||
[
|
||||
'Form/TextboxTemplate'
|
||||
]);
|
||||
};
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('formBuilder', function () {
|
||||
var ret = '';
|
||||
_.each(this.fields, function (field) {
|
||||
ret += this.FieldBuilder(field);
|
||||
});
|
||||
|
||||
return new Handlebars.SafeString(ret);
|
||||
});
|
||||
});
|
||||
|
@ -1,22 +1,26 @@
|
||||
'use strict';
|
||||
define(['app','backgrid'], function () {
|
||||
NzbDrone.Series.Index.Table.Row = Backgrid.Row.extend({
|
||||
define(
|
||||
[
|
||||
'app',
|
||||
'backgrid',
|
||||
'Series/Edit/EditSeriesView',
|
||||
'Series/Delete/DeleteSeriesView'
|
||||
], function (App, Backgrid, EditSeriesView, DeleteSeriesView) {
|
||||
return Backgrid.Row.extend({
|
||||
events: {
|
||||
'click .x-edit' : 'editSeries',
|
||||
'click .x-remove': 'removeSeries'
|
||||
},
|
||||
|
||||
editSeries: function () {
|
||||
var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model});
|
||||
NzbDrone.modalRegion.show(view);
|
||||
var view = new EditSeriesView({ model: this.model});
|
||||
App.modalRegion.show(view);
|
||||
},
|
||||
|
||||
removeSeries: function () {
|
||||
var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
|
||||
NzbDrone.modalRegion.show(view);
|
||||
var view = new DeleteSeriesView({ model: this.model });
|
||||
App.modalRegion.show(view);
|
||||
}
|
||||
});
|
||||
|
||||
return NzbDrone.Series.Table.Row;
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backgrid'
|
||||
], function (Backgrid) {
|
||||
return Backgrid.Cell.extend({
|
||||
className: 'series-status-cell',
|
||||
|
||||
render: function () {
|
||||
this.$el.empty();
|
||||
var monitored = this.model.get('monitored');
|
||||
var status = this.model.get('status');
|
||||
|
||||
if (!monitored) {
|
||||
this.$el.html('<i class="icon-pause grid-icon" title="Not Monitored"></i>');
|
||||
}
|
||||
else if (status === 'continuing') {
|
||||
this.$el.html('<i class="icon-play grid-icon" title="Continuing"></i>');
|
||||
}
|
||||
|
||||
else {
|
||||
this.$el.html('<i class="icon-stop grid-icon" title="Ended"></i>');
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'app',
|
||||
'marionette'
|
||||
], function (App, Marionette) {
|
||||
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'Quality/Profile/DeleteTemplate',
|
||||
|
||||
events: {
|
||||
'click .x-confirm-delete': '_removeProfile'
|
||||
},
|
||||
|
||||
_removeProfile: function () {
|
||||
|
||||
this.model.destroy({
|
||||
wait: true
|
||||
}).done(function () {
|
||||
App.modalRegion.close();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue