1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

made RootFolderCollection, NotificationCollection singleton.

This commit is contained in:
kay.one 2013-02-14 09:18:29 -08:00
parent 52d815b1d4
commit a2496530ca
27 changed files with 639 additions and 14886 deletions

View File

@ -418,6 +418,7 @@
<Content Include="_backboneApp\AddSeries\addSeriesLayoutTemplate.html" />
<Content Include="_backboneApp\Series\EditSeriesTemplate.html" />
<Content Include="_backboneApp\Series\EditSeriesView.js" />
<Content Include="_backboneApp\Shared\NotificationCollection.js" />
<Content Include="_backboneApp\Shared\ModalRegion.js" />
<Content Include="_backboneApp\Series\DeleteSeriesTemplate.html" />
<Content Include="_backboneApp\Series\Index\SeriesCollectionTemplate.html" />

View File

@ -0,0 +1 @@
_backboneApp

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="jQuery" level="application" />
</component>
</module>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value />
</option>
</component>
</project>

View File

@ -0,0 +1,3 @@
<component name="ProjectDictionaryState">
<dictionary name="Keivan" />
</component>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="PROJECT" libraries="{jQuery}" />
<excludedPredefinedLibrary name="AJAX" />
<excludedPredefinedLibrary name="DHTML" />
<excludedPredefinedLibrary name="DOM Core" />
<excludedPredefinedLibrary name="DOM Events" />
<excludedPredefinedLibrary name="DOM Traversal And Range" />
<excludedPredefinedLibrary name="DOM XPath" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<component name="libraryTable">
<library name="sass-stdlib">
<CLASSES />
<SOURCES>
<root url="file://$APPLICATION_HOME_DIR$/plugins/sass/lib/stubs/sass_functions.scss" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectResources">
<default-html-doctype>jar:file:\C:\Program Files (x86)\JetBrains\WebStorm 5.0.4\lib\webide.jar!\resources\html5-schema\html5.rnc</default-html-doctype>
</component>
<component name="ProjectRootManager" version="2" />
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/_backboneApp.iml" filepath="$PROJECT_DIR$/.idea/_backboneApp.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,5 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
</component>
</project>

View File

@ -0,0 +1,412 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="0cbf2b6b-882a-4616-9f96-93499c5aeb89" name="Default" comment="" />
<ignored path="_backboneApp.iws" />
<ignored path=".idea/workspace.xml" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="DaemonCodeAnalyzer">
<disable_hints />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="backbone.debug.js" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/JsLibraries/backbone.debug.js">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="AddSeriesLayout.js" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/AddSeries/AddSeriesLayout.js">
<provider selected="true" editor-type-id="text-editor">
<state line="9" column="8" selection-start="287" selection-end="287" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="app.js" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state line="49" column="37" selection-start="1460" selection-end="1460" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Routing.js" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Routing.js">
<provider selected="true" editor-type-id="text-editor">
<state line="38" column="0" selection-start="1012" selection-end="1012" vertical-scroll-proportion="0.6536697">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="RootFolderCompositeViewTemplate.html" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/AddSeries/Existing/RootFolderCompositeViewTemplate.html">
<provider selected="true" editor-type-id="text-editor">
<state line="4" column="0" selection-start="154" selection-end="154" vertical-scroll-proportion="-2.5">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="IndexLayout.js" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Series/Index/IndexLayout.js">
<provider selected="true" editor-type-id="text-editor">
<state line="6" column="0" selection-start="192" selection-end="192" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="backbone.js" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/JsLibraries/backbone.js">
<provider selected="true" editor-type-id="text-editor">
<state line="975" column="8" selection-start="39777" selection-end="39777" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
<setting name="OPEN_NEW_TAB" value="false" />
</FindUsagesManager>
</component>
<component name="HighlightingSettingsPerFile">
<setting file="mock:///dummy.txt" root0="SKIP_INSPECTION" />
</component>
<component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
<option value="$PROJECT_DIR$/app.js" />
<option value="$PROJECT_DIR$/AddSeries/AddSeriesLayout.js" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="-8" />
<option name="y" value="-8" />
<option name="width" value="1936" />
<option name="height" value="1056" />
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
<State>
<id>JavaScript</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>ActionScript specificJavaScript</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectReloadState">
<option name="STATE" value="0" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents ProjectPane="true" />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="_backboneApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="_backboneApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="_backboneApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="_backboneApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="_backboneApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="JsLibraries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="_backboneApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="_backboneApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="AddSeries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="options.splitter.main.proportions" value="0.3" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="options.lastSelected" value="settings.nodejs" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/JsLibraries/jquery.js" />
<property name="GoToClass.includeJavaFiles" value="false" />
<property name="options.searchVisible" value="true" />
<property name="options.splitter.details.proportions" value="0.2" />
</component>
<component name="RunManager">
<list size="0" />
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
<option name="USER" value="" />
<option name="PASSWORD" value="" />
<option name="mySSHConnectionTimeout" value="30000" />
<option name="mySSHReadTimeout" value="30000" />
<option name="LAST_MERGED_REVISION" />
<option name="MERGE_DRY_RUN" value="false" />
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
<option name="DETECT_NESTED_COPIES" value="true" />
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
<option name="FORCE_UPDATE" value="false" />
<option name="IGNORE_EXTERNALS" value="false" />
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<created>1360855538312</created>
<updated>1360855538312</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="7" />
<editor active="true" />
<layout>
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.67074525" order="0" side_tool="false" content_ui="combo" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Command Line Tools Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32925472" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="CHECK_NEW_TODO" value="true" />
<option name="myTodoPanelSettings">
<value>
<are-packages-shown value="false" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="false" />
</value>
</option>
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
<option name="DEFAULT_PATCH_EXTENSION" value="patch" />
<option name="SHORT_DIFF_HORISONTALLY" value="true" />
<option name="SHORT_DIFF_EXTRA_LINES" value="2" />
<option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
<option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
<option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
<option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
<option name="LAST_COMMIT_MESSAGE" />
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
<option name="ACTIVE_VCS_NAME" />
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="_backboneApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="_backboneApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/JsLibraries/backbone.js">
<provider selected="true" editor-type-id="text-editor">
<state line="975" column="8" selection-start="39777" selection-end="39777" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Quality/qualityProfileCollection.js">
<provider selected="true" editor-type-id="text-editor">
<state line="2" column="31" selection-start="93" selection-end="93" vertical-scroll-proportion="0.03440367">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/JsLibraries/backbone.debug.js">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state line="49" column="37" selection-start="1460" selection-end="1460" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/AddSeries/AddSeriesLayout.js">
<provider selected="true" editor-type-id="text-editor">
<state line="9" column="8" selection-start="287" selection-end="287" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.js">
<provider selected="true" editor-type-id="text-editor">
<state line="749" column="7" selection-start="23191" selection-end="23191" vertical-scroll-proportion="0.1261468">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Series/Index/IndexLayout.js">
<provider selected="true" editor-type-id="text-editor">
<state line="6" column="0" selection-start="192" selection-end="192" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/AddSeries/Existing/RootFolderCompositeViewTemplate.html">
<provider selected="true" editor-type-id="text-editor">
<state line="4" column="0" selection-start="154" selection-end="154" vertical-scroll-proportion="-2.5">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Routing.js">
<provider selected="true" editor-type-id="text-editor">
<state line="38" column="0" selection-start="1012" selection-end="1012" vertical-scroll-proportion="0.6536697">
<folding />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ScopeChooserConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

View File

@ -1,12 +1,12 @@
define([
'app',
'AddSeries/RootFolders/RootFolderView',
'AddSeries/RootFolders/RootFolderCollection',
'AddSeries/RootFolders/RootFolderView',
'AddSeries/New/AddNewSeriesView',
'AddSeries/Existing/ImportSeriesView',
'Quality/QualityProfileCollection'
],
function () {
function (app, rootFolderCollection) {
NzbDrone.AddSeries.AddSeriesLayout = Backbone.Marionette.Layout.extend({
template: 'AddSeries/addSeriesLayoutTemplate',
@ -35,7 +35,6 @@
this.ui.addNewTab.tab('show');
NzbDrone.Router.navigate('series/add/new');
},
showImport: function (e) {
@ -56,7 +55,7 @@
NzbDrone.Router.navigate('series/add/rootfolders');
},
rootFolderCollection: new NzbDrone.AddSeries.RootFolders.RootFolderCollection(),
//rootFolderCollection: new NzbDrone.AddSeries.RootFolders.RootFolderCollection(),
qualityProfileCollection: new NzbDrone.Quality.QualityProfileCollection(),
initialize: function (context, action, query) {
@ -71,16 +70,15 @@
onRender: function () {
this.qualityProfileCollection.fetch();
this.rootFolderCollection.fetch();
rootFolderCollection.fetch();
this.addNew.show(new NzbDrone.AddSeries.New.AddNewSeriesView({ rootFolders: this.rootFolderCollection, qualityProfiles: this.qualityProfileCollection }));
this.importExisting.show(new NzbDrone.AddSeries.Existing.ImportSeriesView({ collection: this.rootFolderCollection, quality: this.qualityProfileCollection }));
this.addNew.show(new NzbDrone.AddSeries.New.AddNewSeriesView({ qualityProfiles: this.qualityProfileCollection }));
this.importExisting.show(new NzbDrone.AddSeries.Existing.ImportSeriesView({ quality: this.qualityProfileCollection }));
this.rootFolders.show(new NzbDrone.AddSeries.RootDirView({ collection: this.rootFolderCollection }));
this.listenTo(this.rootFolderCollection, 'add', this.evaluateActions, this);
this.listenTo(this.rootFolderCollection, 'remove', this.evaluateActions, this);
this.listenTo(this.rootFolderCollection, 'reset', this.evaluateActions, this);
this.listenTo(rootFolderCollection, 'add', this.evaluateActions, this);
this.listenTo(rootFolderCollection, 'remove', this.evaluateActions, this);
this.listenTo(rootFolderCollection, 'reset', this.evaluateActions, this);
},
onShow: function () {
@ -97,7 +95,7 @@
},
evaluateActions: function () {
if (this.rootFolderCollection.length === 0) {
if (rootFolderCollection.length === 0) {
this.ui.addNewTab.hide();
this.ui.importExistingTab.hide();
this.showRootFolders();

View File

@ -1,6 +1,6 @@
'use strict';
define(['app', 'AddSeries/Existing/UnmappedFolderModel', 'AddSeries/SearchResultCollection', 'Series/SeriesModel'], function () {
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'AddSeries/Existing/UnmappedFolderModel', 'AddSeries/SearchResultCollection', 'Series/SeriesModel'], function (app,rootFolders) {
NzbDrone.AddSeries.Existing.FolderMatchResultView = Backbone.Marionette.ItemView.extend({
@ -127,13 +127,9 @@ define(['app', 'AddSeries/Existing/UnmappedFolderModel', 'AddSeries/SearchResult
itemView: NzbDrone.AddSeries.Existing.RootFolderCompositeView,
initialize: function () {
if (!this.collection) {
throw "root folder collection is required.";
}
this.collection = rootFolders;
if (!this.options.quality) {
throw "quality collection is required.";

View File

@ -1,4 +1,4 @@
define(['app', 'AddSeries/New/SearchResultView'], function () {
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'AddSeries/New/SearchResultView', 'Shared/SpinnerView'], function (app, rootFolders) {
NzbDrone.AddSeries.New.AddNewSeriesView = Backbone.Marionette.Layout.extend({
template: 'AddSeries/New/AddNewSeriesTemplate',
@ -15,15 +15,11 @@
collection: new NzbDrone.AddSeries.SearchResultCollection(),
initialize: function (options) {
if (options.rootFolders === undefined) {
throw 'rootFolder arg. is required.';
}
if (options.qualityProfiles === undefined) {
throw 'qualityProfiles arg. is required.';
}
this.rootFoldersCollection = options.rootFolders;
this.qualityProfileCollection = options.qualityProfiles;
},
@ -73,7 +69,7 @@
resultUpdated: function (options, context) {
_.each(options.models, function (model) {
model.set('rootFolders', context.rootFoldersCollection);
model.set('rootFolders', rootFolders);
model.set('qualityProfiles', context.qualityProfileCollection);
});

View File

@ -1,6 +1,6 @@
'use strict';
define(['app', 'AddSeries/SearchResultCollection', 'AddSeries/SearchResultModel', 'Series/SeriesModel'], function () {
define(['app','Shared/NotificationCollection', 'AddSeries/SearchResultCollection', 'AddSeries/SearchResultModel', 'Series/SeriesModel'], function (app,notificationCollection) {
NzbDrone.AddSeries.New.SearchItemView = Backbone.Marionette.ItemView.extend({
@ -49,7 +49,7 @@ define(['app', 'AddSeries/SearchResultCollection', 'AddSeries/SearchResultModel'
level: 'success'
});
NzbDrone.Shared.NotificationCollectionView.Instance.collection.add(notificationModel);
notificationCollection.push(notificationModel);
self.close();
}
});
@ -58,7 +58,7 @@ define(['app', 'AddSeries/SearchResultCollection', 'AddSeries/SearchResultModel'
NzbDrone.AddSeries.SearchResultView = Backbone.Marionette.CollectionView.extend({
itemView: NzbDrone.AddSeries.SearchItemView,
itemView: NzbDrone.AddSeries.New.SearchItemView,
className: 'accordion',

View File

@ -1,10 +1,11 @@
define(['app', 'AddSeries/RootFolders/RootFolderModel'], function () {
NzbDrone.AddSeries.RootFolders.RootFolderCollection = Backbone.Collection.extend({
var rootFolderCollection = Backbone.Collection.extend({
url: NzbDrone.Constants.ApiRoot + '/rootdir',
model: NzbDrone.AddSeries.RootFolders.RootFolderModel,
});
return new rootFolderCollection();
});

View File

@ -1,6 +1,6 @@
'use strict;'
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Shared/AutoComplete'], function () {
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Shared/AutoComplete'], function (app,rootFolders) {
NzbDrone.AddSeries.RootFolderItemView = Backbone.Marionette.ItemView.extend({
@ -47,13 +47,10 @@ define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Shared/AutoComplet
},
collection: new NzbDrone.AddSeries.RootFolders.RootFolderCollection(),
onRender: function () {
this.collection = rootFolders,
this.currentDirs.show(new NzbDrone.AddSeries.RootDirListView({ collection: this.collection }));
this.collection.fetch();
this.ui.pathInput.folderAutoComplete();
},

View File

@ -1,4 +1,4 @@
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Quality/QualityProfileCollection'], function () {
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Quality/QualityProfileCollection'], function (RootFolderCollection) {
NzbDrone.AddSeries.SearchResultModel = Backbone.Model.extend({
@ -17,7 +17,7 @@
defaults: {
qualityProfiles: new NzbDrone.Quality.QualityProfileCollection(),
rootFolders: new NzbDrone.AddSeries.RootFolders.RootFolderModel()
rootFolders: RootFolderCollection
}
});

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
require(['app', 'AddSeries/AddSeriesLayout'], function () {
require(['app','Shared/NotificationView', 'AddSeries/AddSeriesLayout'], function () {
NzbDrone.Controller = Backbone.Marionette.Controller.extend({

View File

@ -0,0 +1,59 @@
define(['app', 'Shared/NotificationModel'], function () {
var collection = Backbone.Collection.extend({
model: NzbDrone.Shared.NotificationModel,
initialize: function () {
var self = this;
window.onerror = function (msg, url, line) {
try {
var model = new NzbDrone.Shared.NotificationModel();
var a = document.createElement('a');
a.href = url;
model.set('title', a.pathname.split('/').pop() + ' : ' + line);
model.set('message', msg);
model.set('level', 'error');
self.add(model);
} catch (error) {
console.log("An error occurred while reporting error. " + error);
console.log(msg);
alert('Couldn\'t report JS error. ' + msg);
}
return false; //don't suppress default alerts and logs.
};
$(document).ajaxError(function (event, xmlHttpRequest, ajaxOptions) {
//don't report 200 error codes
if (xmlHttpRequest.status >= 200 && xmlHttpRequest.status <= 300) {
return undefined;
}
//doesn't report aborted requests
if (xmlHttpRequest.statusText === 'abort') {
return undefined;
}
var model = new NzbDrone.Shared.NotificationModel();
model.set('title', ajaxOptions.type + " " + ajaxOptions.url + " : " + xmlHttpRequest.statusText);
model.set('message', xmlHttpRequest.responseText);
model.set('level', 'error');
self.add(model);
return false;
});
}
});
return new collection();
});

View File

@ -1,44 +1,34 @@

define(['app'], function () {
NzbDrone.Shared.NotificationModel = Backbone.Model.extend({
NzbDrone.Shared.NotificationModel = Backbone.Model.extend({
mutators: {
pre: function () {
if (this.get('message')) {
return this.get('message').lines().lenght > 1;
}
},
iconClass: function () {
mutators: {
pre: function () {
if (this.get('message')) {
return this.get('message').lines().lenght > 1;
if (this.has('icon')) {
return "icon";
}
if (this.get('level') === 'info') {
return "icon-info-sign";
} else if (this.get('level') === 'success') {
return 'icon-ok-sign';
} else if (this.get('level') === 'error') {
return 'icon-warning-sign';
}
return "";
}
},
iconClass: function () {
if (this.has('icon')) {
return "icon";
}
if (this.get('level') === 'info') {
return "icon-info-sign";
}
else if (this.get('level') === 'success') {
return 'icon-ok-sign';
}
else if (this.get('level') === 'error') {
return 'icon-warning-sign';
}
return "";
defaults: {
"level": "info",
"title": "",
"message": "",
}
},
defaults: {
"level": "info",
"title": "",
"message": "",
}
});
NzbDrone.Shared.NotificationCollection = Backbone.Collection.extend({
model: NzbDrone.Shared.NotificationModel,
});
});
});

View File

@ -1,80 +1,39 @@

/// <reference path="NotificationModel.js" />
define(['app', 'Shared/NotificationCollection'], function (app, notificationCollection) {
NzbDrone.Shared.NotificationItemView = Backbone.Marionette.ItemView.extend({
template: 'Shared/NotificationTemplate',
var notificationItemView = Backbone.Marionette.ItemView.extend({
template: 'Shared/NotificationTemplate',
events: {
'click .x-close': 'kill'
},
events: {
'click .x-close': 'kill'
},
kill: function () {
kill: function () {
var self = this;
var self = this;
$.Deferred(function () {
self.$el.slideUp('slow');
}).done(function () {
self.model.destroy();
});
}
});
$.Deferred(function () {
self.$el.slideUp('slow');
}).done(function () {
self.model.destroy();
});
}
});
NzbDrone.Shared.NotificationCollectionView = Backbone.Marionette.CollectionView.extend({
var collectionView = Backbone.Marionette.CollectionView.extend({
itemView: NzbDrone.Shared.NotificationItemView,
itemView: notificationItemView,
initialize: function () {
this.collection = new NzbDrone.Shared.NotificationCollection();
},
});
initialize: function () {
this.collection = notificationCollection;
},
});
NzbDrone.addInitializer(function (options) {
NzbDrone.notificationRegion.show(NzbDrone.Shared.NotificationCollectionView.Instance);
NzbDrone.addInitializer(function (options) {
NzbDrone.notificationRegion.show(new collectionView());
});
});
NzbDrone.Shared.NotificationCollectionView.Instance = new NzbDrone.Shared.NotificationCollectionView();
window.onerror = function (msg, url, line) {
try {
var model = new NzbDrone.Shared.NotificationModel();
var a = document.createElement('a');
a.href = url;
model.set('title', a.pathname.split('/').pop() + ' : ' + line);
model.set('message', msg);
model.set('level', 'error');
NzbDrone.Shared.NotificationCollectionView.Instance.collection.add(model);
} catch (error) {
console.log("An error occurred while reporting error. " + error);
console.log(msg);
alert('Couldn\'t report JS error. ' + msg);
}
return false; //don't suppress default alerts and logs.
};
$(document).ajaxError(function (event, xmlHttpRequest, ajaxOptions) {
//don't report 200 error codes
if (xmlHttpRequest.status >= 200 && xmlHttpRequest.status <= 300) {
return undefined;
}
//doesn't report aborted requests
if (xmlHttpRequest.statusText === 'abort') {
return undefined;
}
var model = new NzbDrone.Shared.NotificationModel();
model.set('title', ajaxOptions.type + " " + ajaxOptions.url + " : " + xmlHttpRequest.statusText);
model.set('message', xmlHttpRequest.responseText);
model.set('level', 'error');
NzbDrone.Shared.NotificationCollectionView.Instance.collection.push(model);
return false;
});

View File

@ -1,6 +1,12 @@
NzbDrone.Shared.SpinnerView = Backbone.Marionette.ItemView.extend({
define(['app'],function () {
NzbDrone.Shared.SpinnerView = Backbone.Marionette.ItemView.extend({
template: 'Shared/SpinnerTemplate',
className: 'nz-spinner row',
});
template: 'Shared/SpinnerTemplate',
className: 'nz-spinner row',
});

View File

@ -77,6 +77,8 @@ define('app', ['jquery', 'JsLibraries/backbone.modelbinder', 'marionette', 'hand
});
window.NzbDrone.start();
return NzbDrone;
});