Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit

  • Loading branch information...
commit 69d8e3b26da2d59208a8a094a9775874c6606027 1 parent 44d1bae
@brian428 authored
Showing with 2,177 additions and 0 deletions.
  1. +1 −0  .idea/.name
  2. +21 −0 .idea/compiler.xml
  3. +5 −0 .idea/copyright/profiles_settings.xml
  4. +16 −0 .idea/dictionaries/Administrator.xml
  5. +5 −0 .idea/encodings.xml
  6. +7 −0 .idea/jsLibraryMappings.xml
  7. +8 −0 .idea/jsLinters/jslint.xml
  8. +12 −0 .idea/misc.xml
  9. +9 −0 .idea/modules.xml
  10. +5 −0 .idea/scopes/scope_settings.xml
  11. +125 −0 .idea/uiDesigner.xml
  12. +7 −0 .idea/vcs.xml
  13. +698 −0 .idea/workspace.xml
  14. +12 −0 Carstore_deft.iml
  15. +15 −0 app.js
  16. +27 −0 app/controller/MyViewController.js
  17. +14 −0 app/model/CarChartModel.js
  18. +29 −0 app/model/CarDataModel.js
  19. +18 −0 app/store/CarChartJson.js
  20. +26 −0 app/store/CarDataJson.js
  21. +133 −0 app/view/CarListings.js
  22. +5 −0 app/view/Viewport.js
  23. BIN  data/2004_Porsche_911_Carrera_type_997.jpg
  24. BIN  data/250px-2007_Audi_TT_Coupe.jpg
  25. BIN  data/250px-Audi_S5.jpg
  26. BIN  data/250px-BMW_M3_E92.jpg
  27. BIN  data/250px-Nissan_GT-R.jpg
  28. +38 −0 data/cars.json
  29. +928 −0 deft/deft-debug.js
  30. +13 −0 index.html
View
1  .idea/.name
@@ -0,0 +1 @@
+carstore_idea
View
21 .idea/compiler.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <option name="DEFAULT_COMPILER" value="Javac" />
+ <resourceExtensions />
+ <wildcardResourcePatterns>
+ <entry name="?*.properties" />
+ <entry name="?*.xml" />
+ <entry name="?*.gif" />
+ <entry name="?*.png" />
+ <entry name="?*.jpeg" />
+ <entry name="?*.jpg" />
+ <entry name="?*.html" />
+ <entry name="?*.dtd" />
+ <entry name="?*.tld" />
+ <entry name="?*.ftl" />
+ </wildcardResourcePatterns>
+ <annotationProcessing enabled="false" useClasspath="true" />
+ </component>
+</project>
+
View
5 .idea/copyright/profiles_settings.xml
@@ -0,0 +1,5 @@
+<component name="CopyrightManager">
+ <settings default="">
+ <module2copyright />
+ </settings>
+</component>
View
16 .idea/dictionaries/Administrator.xml
@@ -0,0 +1,16 @@
+<component name="ProjectDictionaryState">
+ <dictionary name="Administrator">
+ <words>
+ <w>gridcolumn</w>
+ <w>gridpanel</w>
+ <w>injectable</w>
+ <w>mixins</w>
+ <w>numbercolumn</w>
+ <w>selectionchange</w>
+ <w>sencha</w>
+ <w>vbox</w>
+ <w>viewport</w>
+ <w>xtype</w>
+ </words>
+ </dictionary>
+</component>
View
5 .idea/encodings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
+</project>
+
View
7 .idea/jsLibraryMappings.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="JavaScriptLibraryMappings">
+ <file url="PROJECT" libraries="{DeftJS, ExtJS 4.1}" />
+ </component>
+</project>
+
View
8 .idea/jsLinters/jslint.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="JSLintConfiguration">
+ <option indent="4" />
+ <option maxerr="50" />
+ </component>
+</project>
+
View
12 .idea/misc.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="IdProvider" IDEtalkID="94C3603AE335499A51FE82787FDD00E8" />
+ <component name="ProjectResources">
+ <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
+ </component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/out" />
+ </component>
+ <component name="WebServicesPlugin" addRequiredLibraries="true" />
+</project>
+
View
9 .idea/modules.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/Carstore_deft.iml" filepath="$PROJECT_DIR$/Carstore_deft.iml" />
+ </modules>
+ </component>
+</project>
+
View
5 .idea/scopes/scope_settings.xml
@@ -0,0 +1,5 @@
+<component name="DependencyValidationManager">
+ <state>
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </state>
+</component>
View
125 .idea/uiDesigner.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Palette2">
+ <group name="Swing">
+ <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+ </item>
+ <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+ <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+ <initial-values>
+ <property name="text" value="Button" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="RadioButton" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="CheckBox" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="Label" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+ <preferred-size width="-1" height="20" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+ </item>
+ </group>
+ </component>
+</project>
+
View
7 .idea/vcs.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="" />
+ </component>
+</project>
+
View
698 .idea/workspace.xml
@@ -0,0 +1,698 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ChangeListManager">
+ <list default="true" id="94bba320-bec0-498f-9e14-30bcb57664ab" name="Default" comment="" />
+ <ignored path="carstore_idea.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="DebuggerManager">
+ <breakpoint_any>
+ <breakpoint>
+ <option name="NOTIFY_CAUGHT" value="true" />
+ <option name="NOTIFY_UNCAUGHT" value="true" />
+ <option name="ENABLED" value="false" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+ <option name="CONDITION" value="&#13;&#13;JAVA" />
+ <option name="LOG_MESSAGE" value="&#13;&#13;JAVA" />
+ </breakpoint>
+ <breakpoint>
+ <option name="NOTIFY_CAUGHT" value="true" />
+ <option name="NOTIFY_UNCAUGHT" value="true" />
+ <option name="ENABLED" value="false" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+ <option name="CONDITION" value="&#13;&#13;JAVA" />
+ <option name="LOG_MESSAGE" value="&#13;&#13;JAVA" />
+ </breakpoint>
+ </breakpoint_any>
+ <breakpoint_rules />
+ <ui_properties>
+ <property name="line_breakpoints_groupByMethods" value="false" />
+ <property name="line_breakpoints_viewId" value="TABLE" />
+ <property name="exception_breakpoints_flattenPackages" value="true" />
+ <property name="method_breakpoints_flattenPackages" value="true" />
+ <property name="field_breakpoints_flattenPackages" value="true" />
+ <property name="exception_breakpoints_groupByMethods" value="false" />
+ <property name="line_breakpoints_groupByClasses" value="true" />
+ <property name="method_breakpoints_viewId" value="TABLE" />
+ <property name="field_breakpoints_groupByMethods" value="false" />
+ <property name="line_breakpoints_flattenPackages" value="true" />
+ <property name="field_breakpoints_groupByClasses" value="true" />
+ <property name="method_breakpoints_groupByClasses" value="true" />
+ <property name="exception_breakpoints_viewId" value="TABLE" />
+ <property name="field_breakpoints_viewId" value="TABLE" />
+ <property name="exception_breakpoints_groupByClasses" value="true" />
+ <property name="method_breakpoints_groupByMethods" value="false" />
+ </ui_properties>
+ </component>
+ <component name="FavoritesManager">
+ <favorites_list name="carstore_idea" />
+ </component>
+ <component name="FileEditorManager">
+ <leaf>
+ <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="6" column="20" selection-start="114" selection-end="114" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="CarListings.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/view/CarListings.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="44" selection-start="42" selection-end="42" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="MyViewController.js" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/app/controller/MyViewController.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="26" column="41" selection-start="706" selection-end="706" vertical-scroll-proportion="0.51372117">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="index.html" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/index.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="12" column="7" selection-start="524" selection-end="524" vertical-scroll-proportion="-8.307693">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FindManager">
+ <FindUsagesManager>
+ <setting name="OPEN_NEW_TAB" value="false" />
+ </FindUsagesManager>
+ </component>
+ <component name="Git.Settings">
+ <option name="LINE_SEPARATORS_CONVERSION" value="ASK" />
+ </component>
+ <component name="IdeDocumentHistory">
+ <option name="changedFiles">
+ <list>
+ <option value="extjs.cachefly.net/ext-4.0.7-commercial/ext-all-debug.js" />
+ <option value="$PROJECT_DIR$/app/controller/MyController.js" />
+ <option value="$PROJECT_DIR$/app.js" />
+ <option value="$PROJECT_DIR$/app.html" />
+ <option value="$PROJECT_DIR$/app/model/CarChartModel.js" />
+ <option value="$PROJECT_DIR$/app/model/CarDataModel.js" />
+ <option value="$PROJECT_DIR$/app/view/Viewport.js" />
+ <option value="$PROJECT_DIR$/app/store/CarChartJson.js" />
+ <option value="$PROJECT_DIR$/app/store/CarDataJson.js" />
+ <option value="$PROJECT_DIR$/index.html" />
+ <option value="$PROJECT_DIR$/app/view/CarListings.js" />
+ <option value="$PROJECT_DIR$/app/controller/MyViewController.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="1096" />
+ </component>
+ <component name="ProjectInspectionProfilesVisibleTreeState">
+ <entry key="Project Default">
+ <profile-state>
+ <expanded-state>
+ <State>
+ <id />
+ </State>
+ <State>
+ <id>GeneralJavaScript</id>
+ </State>
+ <State>
+ <id>Java EE issues</id>
+ </State>
+ <State>
+ <id>JavaScript</id>
+ </State>
+ </expanded-state>
+ <selected-state>
+ <State>
+ <id>JSUnresolvedFunction</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 />
+ <hideEmptyPackages />
+ <abbreviatePackageNames />
+ <autoscrollToSource />
+ <autoscrollFromSource />
+ <sortByType />
+ </navigator>
+ <panes>
+ <pane id="ProjectPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="carstore_idea" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="carstore_idea" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="carstore_deft" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="carstore_idea" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="carstore_deft" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="app" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="carstore_idea" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="carstore_deft" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="app" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="controller" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </pane>
+ <pane id="Scope">
+ <subPane subId="Project Files">
+ <PATH>
+ <PATH_ELEMENT USER_OBJECT="Root">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </pane>
+ <pane id="PackagesPane">
+ <subPane />
+ </pane>
+ </panes>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="GoToFile.includeJavaFiles" value="false" />
+ <property name="project.structure.last.edited" value="Modules" />
+ <property name="project.structure.proportion" value="0.15" />
+ <property name="options.splitter.main.proportions" value="0.3" />
+ <property name="recentsLimit" value="5" />
+ <property name="options.lastSelected" value="Settings.JavaScript.Linters.JSLint" />
+ <property name="MemberChooser.sorted" value="false" />
+ <property name="project.structure.side.proportion" value="0.2" />
+ <property name="MemberChooser.copyJavadoc" value="false" />
+ <property name="GoToClass.toSaveIncludeLibraries" value="false" />
+ <property name="WebServerToolWindowFactoryState" value="false" />
+ <property name="MemberChooser.showClasses" value="true" />
+ <property name="GoToClass.includeLibraries" value="false" />
+ <property name="options.splitter.details.proportions" value="0.2" />
+ <property name="options.searchVisible" value="true" />
+ </component>
+ <component name="RunManager" selected="JavaScript Debug.Debug CarstoreIdea">
+ <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
+ <module name="" />
+ <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m" />
+ <option name="PROGRAM_PARAMETERS" />
+ <method>
+ <option name="AntTarget" enabled="false" />
+ <option name="BuildArtifacts" enabled="false" />
+ <option name="Make" enabled="true" />
+ <option name="Maven.BeforeRunTask" enabled="false" />
+ </method>
+ </configuration>
+ <configuration default="true" type="Remote" factoryName="Remote">
+ <option name="USE_SOCKET_TRANSPORT" value="true" />
+ <option name="SERVER_MODE" value="false" />
+ <option name="SHMEM_ADDRESS" value="javadebug" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="5005" />
+ <method>
+ <option name="AntTarget" enabled="false" />
+ <option name="BuildArtifacts" enabled="false" />
+ <option name="Maven.BeforeRunTask" enabled="false" />
+ </method>
+ </configuration>
+ <configuration default="true" type="TestNG" factoryName="TestNG">
+ <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+ <module name="" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="SUITE_NAME" />
+ <option name="PACKAGE_NAME" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="METHOD_NAME" />
+ <option name="GROUP_NAME" />
+ <option name="TEST_OBJECT" value="CLASS" />
+ <option name="VM_PARAMETERS" value="-ea" />
+ <option name="PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="OUTPUT_DIRECTORY" />
+ <option name="ANNOTATION_TYPE" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <option name="TEST_SEARCH_SCOPE">
+ <value defaultName="moduleWithDependencies" />
+ </option>
+ <option name="USE_DEFAULT_REPORTERS" value="false" />
+ <option name="PROPERTIES_FILE" />
+ <envs />
+ <properties />
+ <listeners />
+ <method>
+ <option name="AntTarget" enabled="false" />
+ <option name="BuildArtifacts" enabled="false" />
+ <option name="Make" enabled="true" />
+ <option name="Maven.BeforeRunTask" enabled="false" />
+ </method>
+ </configuration>
+ <configuration default="true" type="Applet" factoryName="Applet">
+ <module name="" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="HTML_FILE_NAME" />
+ <option name="HTML_USED" value="false" />
+ <option name="WIDTH" value="400" />
+ <option name="HEIGHT" value="300" />
+ <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+ <option name="VM_PARAMETERS" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <method>
+ <option name="AntTarget" enabled="false" />
+ <option name="BuildArtifacts" enabled="false" />
+ <option name="Make" enabled="true" />
+ <option name="Maven.BeforeRunTask" enabled="false" />
+ </method>
+ </configuration>
+ <configuration default="true" type="Application" factoryName="Application">
+ <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="VM_PARAMETERS" />
+ <option name="PROGRAM_PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <module name="" />
+ <envs />
+ <method>
+ <option name="AntTarget" enabled="false" />
+ <option name="BuildArtifacts" enabled="false" />
+ <option name="Make" enabled="true" />
+ <option name="Maven.BeforeRunTask" enabled="false" />
+ </method>
+ </configuration>
+ <configuration default="true" type="JavascriptDebugSession" factoryName="Remote">
+ <JSRemoteDebuggerConfigurationSettings>
+ <option name="engineId" value="chrome" />
+ <option name="fileUrl" value="" />
+ </JSRemoteDebuggerConfigurationSettings>
+ <method>
+ <option name="AntTarget" enabled="false" />
+ <option name="BuildArtifacts" enabled="false" />
+ <option name="Maven.BeforeRunTask" enabled="false" />
+ </method>
+ </configuration>
+ <configuration default="true" type="JUnit" factoryName="JUnit">
+ <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+ <module name="" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="PACKAGE_NAME" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="METHOD_NAME" />
+ <option name="TEST_OBJECT" value="class" />
+ <option name="VM_PARAMETERS" value="-ea" />
+ <option name="PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <option name="TEST_SEARCH_SCOPE">
+ <value defaultName="moduleWithDependencies" />
+ </option>
+ <envs />
+ <patterns />
+ <method>
+ <option name="AntTarget" enabled="false" />
+ <option name="BuildArtifacts" enabled="false" />
+ <option name="Make" enabled="true" />
+ <option name="Maven.BeforeRunTask" enabled="false" />
+ </method>
+ </configuration>
+ <configuration default="true" type="JavascriptDebugSession" factoryName="Local">
+ <JSDebuggerConfigurationSettings>
+ <option name="engineId" value="embedded" />
+ <option name="fileUrl" />
+ </JSDebuggerConfigurationSettings>
+ <method>
+ <option name="AntTarget" enabled="false" />
+ <option name="BuildArtifacts" enabled="false" />
+ <option name="Maven.BeforeRunTask" enabled="false" />
+ </method>
+ </configuration>
+ <configuration default="false" name="Debug CarstoreIdea" type="JavascriptDebugSession" factoryName="Remote">
+ <JSRemoteDebuggerConfigurationSettings>
+ <option name="engineId" value="chrome" />
+ <option name="fileUrl" value="http://localhost:8080/architect/carstore_idea/app.html" />
+ <mapping local-file="$PROJECT_DIR$" url="http://localhost:8080/architect/carstore_idea" />
+ </JSRemoteDebuggerConfigurationSettings>
+ <RunnerSettings RunnerId="JavascriptDebugRunner" />
+ <ConfigurationWrapper RunnerId="JavascriptDebugRunner" />
+ <method />
+ </configuration>
+ <list size="1">
+ <item index="0" class="java.lang.String" itemvalue="JavaScript Debug.Debug CarstoreIdea" />
+ </list>
+ <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
+ <Host>localhost</Host>
+ <Port>5050</Port>
+ </configuration>
+ </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" />
+ <configuration useDefault="true">C:\Users\Administrator\AppData\Roaming\Subversion</configuration>
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
+ </component>
+ <component name="TaskManager">
+ <task active="true" id="Default" summary="Default task">
+ <changelist id="94bba320-bec0-498f-9e14-30bcb57664ab" name="Default" comment="" />
+ <created>1336098519200</created>
+ <updated>1336098519200</updated>
+ </task>
+ <servers />
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="-8" y="-8" width="1936" height="1096" extended-state="6" />
+ <editor active="false" />
+ <layout>
+ <window_info id="Data Sources" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+ <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="3" side_tool="false" content_ui="tabs" />
+ <window_info id="JetGradle" active="false" anchor="right" 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="Palette" active="false" anchor="right" 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="6" side_tool="false" content_ui="tabs" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.44871795" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="IDEtalk Messages" 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="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="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
+ <window_info id="IDEtalk" active="false" anchor="right" 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="Version Control" 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="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" 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="2" side_tool="true" content_ui="tabs" />
+ <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" 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="5" side_tool="false" content_ui="tabs" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2470651" sideWeight="0.67094016" order="1" side_tool="false" content_ui="combo" />
+ <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="6" 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="8" 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="4" 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.32905984" 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="7" side_tool="false" content_ui="combo" />
+ <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="9" side_tool="false" content_ui="tabs" />
+ </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="ENABLE_BACKGROUND_PROCESSES" 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="CREATE_PATCH_EXPAND_DETAILS_DEFAULT" value="true" />
+ <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="true" />
+ <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="editorHistoryManager">
+ <entry file="http://extjs.cachefly.net/ext-4.0.7-commercial/ext-all-debug.js">
+ <provider selected="true" editor-type-id="httpFileEditor">
+ <state />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/model/CarChartModel.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="12" selection-start="12" selection-end="12" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/store/CarChartJson.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="14" column="37" selection-start="436" selection-end="436" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/view/Viewport.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="3" column="44" selection-start="154" selection-end="154" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/store/CarDataJson.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="25" column="12" selection-start="656" selection-end="656" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/model/CarDataModel.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="12" selection-start="12" selection-end="12" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="6" column="20" selection-start="114" selection-end="114" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/view/CarListings.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="44" selection-start="42" selection-end="42" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/index.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="12" column="7" selection-start="524" selection-end="524" vertical-scroll-proportion="-8.307693">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/controller/MyViewController.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="26" column="41" selection-start="706" selection-end="706" vertical-scroll-proportion="0.51372117">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </component>
+ <component name="masterDetails">
+ <states>
+ <state key="ArtifactsStructureConfigurable.UI">
+ <settings>
+ <artifact-editor />
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ <state key="FacetStructureConfigurable.UI">
+ <settings>
+ <last-edited>No facets are configured</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ <state key="GlobalLibrariesConfigurable.UI">
+ <settings>
+ <last-edited>DeftJS</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ <state key="JdkListConfigurable.UI">
+ <settings>
+ <last-edited>1.6</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ <state key="ModuleStructureConfigurable.UI">
+ <settings>
+ <last-edited>Carstore_deft</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ <option value="0.5" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ <state key="ProjectJDKs.UI">
+ <settings>
+ <last-edited>1.6</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ <state key="ProjectLibrariesConfigurable.UI">
+ <settings>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ </states>
+ </component>
+</project>
+
View
12 Carstore_deft.iml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="ExtJS 4.1" level="application" />
+ <orderEntry type="library" name="DeftJS" level="application" />
+ </component>
+</module>
+
View
15 app.js
@@ -0,0 +1,15 @@
+Ext.Loader.setConfig({
+ enabled: true
+});
+
+Ext.application({
+ autoCreateViewport: true,
+ name: 'carStore'
+});
+
+Ext.onReady( function () {
+ Deft.Injector.configure({
+ carChartJson: 'carStore.store.CarChartJson',
+ carDataJson: 'carStore.store.CarDataJson'
+ });
+});
View
27 app/controller/MyViewController.js
@@ -0,0 +1,27 @@
+Ext.define( 'carStore.controller.MyViewController', {
+ extend: 'Deft.mvc.ViewController',
+ mixins: [ 'Deft.mixin.Injectable' ],
+ inject: [ 'carChartJson', 'carDataJson' ],
+
+ control: {
+ carGrid: {
+ selectionchange: 'onCarGridSelectionChange'
+ },
+ carDetail: true,
+ carChartPanel: true
+ },
+
+ config: {
+ carChartJson: null,
+ carDataJson: null
+ },
+
+ init: function() {},
+
+ onCarGridSelectionChange: function( selectionModel, selections ) {
+ var carDataModel = selections[0];
+ this.getCarDetail().update( carDataModel.getData() );
+ this.getCarChartJson().loadData( carDataModel.getData().quality );
+ }
+
+});
View
14 app/model/CarChartModel.js
@@ -0,0 +1,14 @@
+Ext.define( 'carStore.model.CarChartModel', {
+ extend: 'Ext.data.Model',
+
+ fields: [
+ {
+ name: 'name',
+ type: 'string'
+ },
+ {
+ name: 'rating',
+ type: 'auto'
+ }
+ ]
+});
View
29 app/model/CarDataModel.js
@@ -0,0 +1,29 @@
+Ext.define( 'carStore.model.CarDataModel', {
+ extend: 'Ext.data.Model',
+
+ fields: [
+ {
+ name: 'manufacturer',
+ type: 'string'
+ },
+ {
+ name: 'model',
+ type: 'string'
+ },
+ {
+ name: 'price',
+ type: 'int'
+ },
+ {
+ name: 'wiki',
+ type: 'string'
+ },
+ {
+ name: 'img',
+ type: 'string'
+ },
+ {
+ name: 'quality'
+ }
+ ]
+});
View
18 app/store/CarChartJson.js
@@ -0,0 +1,18 @@
+Ext.define( 'carStore.store.CarChartJson', {
+ extend: 'Ext.data.Store',
+ requires: [ 'carStore.model.CarChartModel' ],
+
+ constructor: function( cfg ) {
+ var me = this;
+ cfg = cfg || {};
+ me.callParent([Ext.apply({
+ model: 'carStore.model.CarChartModel',
+ proxy: {
+ type: 'ajax',
+ reader: {
+ type: 'json'
+ }
+ }
+ }, cfg)]);
+ }
+});
View
26 app/store/CarDataJson.js
@@ -0,0 +1,26 @@
+Ext.define( 'carStore.store.CarDataJson', {
+ extend: 'Ext.data.Store',
+ requires: [ 'carStore.model.CarDataModel' ],
+
+ constructor: function( cfg ) {
+ var me = this;
+ cfg = cfg || {};
+
+ me.callParent([
+ Ext.apply(
+ {
+ autoLoad: true,
+ model: 'carStore.model.CarDataModel',
+ proxy: {
+ type: 'ajax',
+ url: 'data/cars.json',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+ },
+ cfg )
+ ]);
+ }
+});
View
133 app/view/CarListings.js
@@ -0,0 +1,133 @@
+Ext.define( 'carStore.view.CarListings', {
+ extend: 'Ext.panel.Panel',
+ mixins: [ 'Deft.mixin.Controllable', 'Deft.mixin.Injectable' ],
+ inject: [ 'carChartJson', 'carDataJson' ],
+ controller: 'carStore.controller.MyViewController',
+
+ frame: true,
+ height: 667,
+ id: 'carListings',
+ width: 500,
+ autoScroll: true,
+ layout: {
+ align: 'stretch',
+ type: 'vbox'
+ },
+ title: 'Car Listings',
+
+ initComponent: function() {
+ var me = this;
+
+ Ext.applyIf(me, {
+ items: [
+ {
+ xtype: 'gridpanel',
+ id: 'carGrid',
+ store: this.carDataJson,
+ flex: 1,
+ viewConfig: {
+
+ },
+ columns: [
+ {
+ xtype: 'gridcolumn',
+ dataIndex: 'manufacturer',
+ text: 'Manufacturer'
+ },
+ {
+ xtype: 'gridcolumn',
+ dataIndex: 'model',
+ text: 'Model'
+ },
+ {
+ xtype: 'numbercolumn',
+ dataIndex: 'price',
+ text: 'Price'
+ },
+ {
+ xtype: 'gridcolumn',
+ dataIndex: 'wiki',
+ text: 'Wiki',
+ flex: 1
+ }
+ ]
+ },
+ {
+ xtype: 'panel',
+ id: 'carDetail',
+ tpl: [
+ '<div style="padding: 10px">' +
+ '<img src="data/{img}" style="float: right" />',
+ 'Manufacturer: {manufacturer}<br />',
+ 'Model: <a href="{wiki}" target="_blank">{model}</a><br />',
+ 'Price: {price:usMoney}<br />' +
+ '</div>'
+ ],
+ flex: 1,
+ margins: '5, 0, 0, 0'
+ },
+ {
+ xtype: 'panel',
+ height: 433,
+ id: 'carChartPanel',
+ width: 398,
+ layout: {
+ type: 'fit'
+ },
+ flex: 1,
+ margins: '5, 0, 0, 0',
+ items: [
+ {
+ xtype: 'chart',
+ height: 250,
+ id: 'carChart',
+ width: 400,
+ animate: true,
+ insetPadding: 20,
+ store: this.carChartJson,
+ axes: [
+ {
+ type: 'Category',
+ fields: [
+ 'name'
+ ],
+ position: 'bottom',
+ title: 'Quality'
+ },
+ {
+ type: 'Numeric',
+ fields: [
+ 'rating'
+ ],
+ majorTickSteps: 5,
+ position: 'left',
+ title: 'Score',
+ maximum: 5,
+ minimum: 0
+ }
+ ],
+ series: [
+ {
+ type: 'column',
+ label: {
+ display: 'insideEnd',
+ field: 'rating',
+ color: '#333',
+ 'text-anchor': 'middle'
+ },
+ xField: 'name',
+ yField: [
+ 'rating'
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ });
+
+ me.callParent( arguments );
+ }
+
+});
View
5 app/view/Viewport.js
@@ -0,0 +1,5 @@
+Ext.define( 'carStore.view.Viewport', {
+ extend: 'carStore.view.CarListings',
+ renderTo: Ext.getBody(),
+ requires: [ 'carStore.view.CarListings' ]
+});
View
BIN  data/2004_Porsche_911_Carrera_type_997.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  data/250px-2007_Audi_TT_Coupe.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  data/250px-Audi_S5.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  data/250px-BMW_M3_E92.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  data/250px-Nissan_GT-R.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
38 data/cars.json
@@ -0,0 +1,38 @@
+{
+ data: [{
+ manufacturer: 'Porsche',
+ model: '911',
+ price: 135000,
+ wiki: 'http://en.wikipedia.org/wiki/Porsche_997',
+ img: '2004_Porsche_911_Carrera_type_997.jpg',
+ quality: [{name: 'overall', rating:1}, {name: 'mechanical', rating: 4}, {name: 'powertrain', rating: 2}, {name: 'body', rating: 4},{name: 'interior', rating: 3},{name: 'accessories', rating: 2}]
+ },{
+ manufacturer: 'Nissan',
+ model: 'GT-R',
+ price: 80000,
+ wiki:'http://en.wikipedia.org/wiki/Nissan_Gt-r',
+ img: '250px-Nissan_GT-R.jpg',
+ quality: [{name: 'overall', rating:2}, {name: 'mechanical', rating: 3}, {name: 'powertrain', rating: 5}, {name: 'body', rating: 4},{name: 'interior', rating: 2},{name: 'accessories', rating: 2}]
+ },{
+ manufacturer: 'BMW',
+ model: 'M3',
+ price: 60500,
+ wiki:'http://en.wikipedia.org/wiki/Bmw_m3',
+ img: '250px-BMW_M3_E92.jpg',
+ quality: [{name: 'overall', rating:3}, {name: 'mechanical', rating: 5}, {name: 'powertrain', rating: 3}, {name: 'body', rating: 4},{name: 'interior', rating: 5},{name: 'accessories', rating: 3}]
+ },{
+ manufacturer: 'Audi',
+ model: 'S5',
+ price: 53000,
+ wiki:'http://en.wikipedia.org/wiki/Audi_S5#Audi_S5',
+ img: '250px-Audi_S5.jpg',
+ quality: [{name: 'overall', rating:4}, {name: 'mechanical', rating: 1}, {name: 'powertrain', rating: 1}, {name: 'body', rating: 4},{name: 'interior', rating: 1},{name: 'accessories', rating: 5}]
+ },{
+ manufacturer: 'Audi',
+ model: 'TT',
+ price: 40000,
+ wiki:'http://en.wikipedia.org/wiki/Audi_TT',
+ img: '250px-2007_Audi_TT_Coupe.jpg',
+ quality: [{name: 'overall', rating:5}, {name: 'mechanical', rating: 2}, {name: 'powertrain', rating: 2}, {name: 'body', rating: 3},{name: 'interior', rating: 4},{name: 'accessories', rating: 1}]
+ }]
+}
View
928 deft/deft-debug.js
@@ -0,0 +1,928 @@
+/*
+DeftJS 0.6.3
+
+Copyright (c) 2012 [DeftJS Framework Contributors](http://deftjs.org)
+Open source under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).
+*/
+Ext.define('Deft.log.Logger', {
+ alternateClassName: ['Deft.Logger'],
+ singleton: true,
+ log: function(message, priority) {},
+ error: function(message) {
+ this.log(message, 'error');
+ },
+ info: function(message) {
+ this.log(message, 'info');
+ },
+ verbose: function(message) {
+ this.log(message, 'verbose');
+ },
+ warn: function(message) {
+ this.log(message, 'warn');
+ },
+ deprecate: function(message) {
+ this.log(message, 'deprecate');
+ }
+}, function() {
+ var _ref;
+ if (Ext.isFunction((_ref = Ext.Logger) != null ? _ref.log : void 0)) {
+ this.log = Ext.Logger.log;
+ } else if (Ext.isFunction(Ext.log)) {
+ this.log = function(message, priority) {
+ if (priority == null) priority = 'info';
+ if (priority === 'deprecate') priority = 'warn';
+ Ext.log({
+ msg: message,
+ level: priority
+ });
+ };
+ }
+});
+
+Ext.define('Deft.util.Function', {
+ alternateClassName: ['Deft.Function'],
+ statics: {
+ /**
+ Creates a new wrapper function that spreads the passed Array over the target function arguments.
+ */
+ spread: function(fn, scope) {
+ return function(array) {
+ if (!Ext.isArray(array)) {
+ Ext.Error.raise({
+ msg: "Error spreading passed Array over target function arguments: passed a non-Array."
+ });
+ }
+ return fn.apply(scope, array);
+ };
+ },
+ /**
+ Returns a new function that wraps the specified function and caches the results for previously processed inputs.
+ */
+ memoize: function(fn, scope, hashFn) {
+ var memo;
+ memo = {};
+ return function(value) {
+ var key;
+ key = Ext.isFunction(hashFn) ? hashFn.apply(scope, arguments) : value;
+ if (!(key in memo)) memo[key] = fn.apply(scope, arguments);
+ return memo[key];
+ };
+ }
+ }
+});
+
+/**
+@private
+
+Used by {@link Deft.ioc.Injector}.
+*/
+Ext.define('Deft.ioc.DependencyProvider', {
+ requires: ['Deft.log.Logger'],
+ config: {
+ identifier: null,
+ /**
+ Class to be instantiated, by either full name, alias or alternate name, to resolve this dependency.
+ */
+ className: null,
+ /**
+ Optional arguments to pass to the class' constructor when instantiating a class to resolve this dependency.
+ */
+ parameters: null,
+ /**
+ Factory function to be executed to obtain the corresponding object instance or value to resolve this dependency.
+
+ NOTE: For lazily instantiated dependencies, this function will be passed the object instance for which the dependency is being resolved.
+ */
+ fn: null,
+ /**
+ Value to use to resolve this dependency.
+ */
+ value: null,
+ /**
+ Indicates whether this dependency should be resolved as a singleton, or as a transient value for each resolution request.
+ */
+ singleton: true,
+ /**
+ Indicates whether this dependency should be 'eagerly' instantiated when this provider is defined, rather than 'lazily' instantiated when later requested.
+
+ NOTE: Only valid when either a factory function or class is specified as a singleton.
+ */
+ eager: false
+ },
+ constructor: function(config) {
+ this.initConfig(config);
+ if ((config.value != null) && config.value.constructor === Object) {
+ this.setValue(config.value);
+ }
+ if (this.getEager()) {
+ if (this.getValue() != null) {
+ Ext.Error.raise({
+ msg: "Error while configuring '" + (this.getIdentifier()) + "': a 'value' cannot be created eagerly."
+ });
+ }
+ if (!this.getSingleton()) {
+ Ext.Error.raise({
+ msg: "Error while configuring '" + (this.getIdentifier()) + "': only singletons can be created eagerly."
+ });
+ }
+ }
+ if (!this.getSingleton()) {
+ if (this.getValue() != null) {
+ Ext.Error.raise({
+ msg: "Error while configuring '" + (this.getIdentifier()) + "': a 'value' can only be configured as a singleton."
+ });
+ }
+ }
+ return this;
+ },
+ /**
+ Resolve a target instance's dependency with an object instance or value generated by this dependency provider.
+ */
+ resolve: function(targetInstance) {
+ var instance, parameters;
+ Deft.Logger.log("Resolving '" + (this.getIdentifier()) + "'.");
+ if (this.getValue() != null) return this.getValue();
+ instance = null;
+ if (this.getFn() != null) {
+ Deft.Logger.log("Executing factory function.");
+ instance = this.getFn().call(null, targetInstance);
+ } else if (this.getClassName() != null) {
+ Deft.Logger.log("Creating instance of '" + (this.getClassName()) + "'.");
+ parameters = this.getParameters() != null ? [this.getClassName()].concat(this.getParameters()) : [this.getClassName()];
+ instance = Ext.create.apply(this, parameters);
+ } else {
+ Ext.Error.raise({
+ msg: "Error while configuring rule for '" + (this.getIdentifier()) + "': no 'value', 'fn', or 'className' was specified."
+ });
+ }
+ if (this.getSingleton()) this.setValue(instance);
+ return instance;
+ }
+});
+
+/**
+A lightweight IoC container for dependency injection.
+
+Used in conjunction with {@link Deft.mixin.Injectable}.
+*/
+Ext.define('Deft.ioc.Injector', {
+ alternateClassName: ['Deft.Injector'],
+ requires: ['Deft.log.Logger', 'Deft.ioc.DependencyProvider'],
+ singleton: true,
+ constructor: function() {
+ this.providers = {};
+ return this;
+ },
+ /**
+ Configure the Injector.
+ */
+ configure: function(configuration) {
+ Deft.Logger.log('Configuring injector.');
+ Ext.Object.each(configuration, function(identifier, config) {
+ var provider;
+ Deft.Logger.log("Configuring dependency provider for '" + identifier + "'.");
+ if (Ext.isString(config)) {
+ provider = Ext.create('Deft.ioc.DependencyProvider', {
+ identifier: identifier,
+ className: config
+ });
+ } else {
+ provider = Ext.create('Deft.ioc.DependencyProvider', Ext.apply({
+ identifier: identifier
+ }, config));
+ }
+ this.providers[identifier] = provider;
+ }, this);
+ Ext.Object.each(this.providers, function(identifier, provider) {
+ if (provider.getEager()) {
+ Deft.Logger.log("Eagerly creating '" + (provider.getIdentifier()) + "'.");
+ provider.resolve();
+ }
+ }, this);
+ },
+ /**
+ Indicates whether the Injector can resolve a dependency by the specified identifier with the corresponding object instance or value.
+ */
+ canResolve: function(identifier) {
+ var provider;
+ provider = this.providers[identifier];
+ return provider != null;
+ },
+ /**
+ Resolve a dependency (by identifier) with the corresponding object instance or value.
+
+ Optionally, the caller may specify the target instance (to be supplied to the dependency provider's factory function, if applicable).
+ */
+ resolve: function(identifier, targetInstance) {
+ var provider;
+ provider = this.providers[identifier];
+ if (provider != null) {
+ return provider.resolve(targetInstance);
+ } else {
+ Ext.Error.raise({
+ msg: "Error while resolving value to inject: no dependency provider found for '" + identifier + "'."
+ });
+ }
+ },
+ /**
+ Inject dependencies (by their identifiers) into the target object instance.
+ */
+ inject: function(identifiers, targetInstance, targetInstanceIsInitialized) {
+ var injectConfig, name, originalInitConfigFunction, setterFunctionName, value;
+ if (targetInstanceIsInitialized == null) targetInstanceIsInitialized = true;
+ injectConfig = {};
+ if (Ext.isString(identifiers)) identifiers = [identifiers];
+ Ext.Object.each(identifiers, function(key, value) {
+ var identifier, resolvedValue, targetProperty;
+ targetProperty = Ext.isArray(identifiers) ? value : key;
+ identifier = value;
+ resolvedValue = this.resolve(identifier, targetInstance);
+ if (targetProperty in targetInstance.config) {
+ Deft.Logger.log("Injecting '" + identifier + "' into '" + targetProperty + "' config.");
+ injectConfig[targetProperty] = resolvedValue;
+ } else {
+ Deft.Logger.log("Injecting '" + identifier + "' into '" + targetProperty + "' property.");
+ targetInstance[targetProperty] = resolvedValue;
+ }
+ }, this);
+ if (targetInstanceIsInitialized) {
+ for (name in injectConfig) {
+ value = injectConfig[name];
+ setterFunctionName = 'set' + Ext.String.capitalize(name);
+ targetInstance[setterFunctionName].call(targetInstance, value);
+ }
+ } else {
+ if (Ext.isFunction(targetInstance.initConfig)) {
+ originalInitConfigFunction = targetInstance.initConfig;
+ targetInstance.initConfig = function(config) {
+ var result;
+ result = originalInitConfigFunction.call(this, Ext.Object.merge({}, config || {}, injectConfig));
+ return result;
+ };
+ }
+ }
+ return targetInstance;
+ }
+});
+
+/**
+A mixin that marks a class as participating in dependency injection.
+
+Used in conjunction with {@link Deft.ioc.Injector}.
+*/
+Ext.define('Deft.mixin.Injectable', {
+ requires: ['Deft.ioc.Injector'],
+ /**
+ @private
+ */
+ onClassMixedIn: function(targetClass) {
+ targetClass.prototype.constructor = Ext.Function.createInterceptor(targetClass.prototype.constructor, function() {
+ return Deft.Injector.inject(this.inject, this, false);
+ });
+ }
+});
+
+/**
+A lightweight MVC view controller.
+
+Used in conjunction with {@link Deft.mixin.Controllable}.
+*/
+Ext.define('Deft.mvc.ViewController', {
+ alternateClassName: ['Deft.ViewController'],
+ requires: ['Deft.log.Logger'],
+ config: {
+ /**
+ View controlled by this ViewController.
+ */
+ view: null
+ },
+ constructor: function(config) {
+ this.initConfig(config);
+ if (this.getView() instanceof Ext.ClassManager.get('Ext.Component')) {
+ this.registeredComponents = {};
+ this.isExtJS = this.getView().events != null;
+ this.isSenchaTouch = !this.isExtJS;
+ if (this.isExtJS) {
+ if (this.getView().rendered) {
+ this.onViewInitialize();
+ } else {
+ this.getView().on('afterrender', this.onViewInitialize, this, {
+ single: true
+ });
+ }
+ } else {
+ if (this.getView().initialized) {
+ this.onViewInitialize();
+ } else {
+ this.getView().on('initialize', this.onViewInitialize, this, {
+ single: true
+ });
+ }
+ }
+ } else {
+ Ext.Error.raise({
+ msg: 'Error constructing ViewController: the configured \'view\' is not an Ext.Component.'
+ });
+ }
+ return this;
+ },
+ /**
+ Initialize the ViewController
+ */
+ init: function() {},
+ /**
+ Destroy the ViewController
+ */
+ destroy: function() {
+ return true;
+ },
+ /**
+ @private
+ */
+ onViewInitialize: function() {
+ var component, config, id, listeners, originalViewDestroyFunction, self, _ref;
+ if (this.isExtJS) {
+ this.getView().on('beforedestroy', this.onViewBeforeDestroy, this);
+ this.getView().on('destroy', this.onViewDestroy, this, {
+ single: true
+ });
+ } else {
+ self = this;
+ originalViewDestroyFunction = this.getView().destroy;
+ this.getView().destroy = function() {
+ if (self.destroy()) originalViewDestroyFunction.call(this);
+ };
+ }
+ _ref = this.control;
+ for (id in _ref) {
+ config = _ref[id];
+ component = this.locateComponent(id, config);
+ listeners = Ext.isObject(config.listeners) ? config.listeners : !(config.selector != null) ? config : void 0;
+ this.registerComponent(id, component, listeners);
+ }
+ this.init();
+ },
+ /**
+ @private
+ */
+ onViewBeforeDestroy: function() {
+ if (this.destroy()) {
+ this.getView().un('beforedestroy', this.onBeforeDestroy, this);
+ return true;
+ }
+ return false;
+ },
+ /**
+ @private
+ */
+ onViewDestroy: function() {
+ var id;
+ for (id in this.registeredComponents) {
+ this.unregisterComponent(id);
+ }
+ },
+ /**
+ @private
+ */
+ getComponent: function(id) {
+ var _ref;
+ return (_ref = this.registeredComponents[id]) != null ? _ref.component : void 0;
+ },
+ /**
+ @private
+ */
+ registerComponent: function(id, component, listeners) {
+ var event, existingComponent, fn, getterName, listener, options, scope;
+ Deft.Logger.log("Registering '" + id + "' component.");
+ existingComponent = this.getComponent(id);
+ if (existingComponent != null) {
+ Ext.Error.raise({
+ msg: "Error registering component: an existing component already registered as '" + id + "'."
+ });
+ }
+ this.registeredComponents[id] = {
+ component: component,
+ listeners: listeners
+ };
+ if (id !== 'view') {
+ getterName = 'get' + Ext.String.capitalize(id);
+ if (!this[getterName]) {
+ this[getterName] = Ext.Function.pass(this.getComponent, [id], this);
+ }
+ }
+ if (Ext.isObject(listeners)) {
+ for (event in listeners) {
+ listener = listeners[event];
+ fn = listener;
+ scope = this;
+ options = null;
+ if (Ext.isObject(listener)) {
+ options = Ext.apply({}, listener);
+ if (options.fn != null) {
+ fn = options.fn;
+ delete options.fn;
+ }
+ if (options.scope != null) {
+ scope = options.scope;
+ delete options.scope;
+ }
+ }
+ Deft.Logger.log("Adding '" + event + "' listener to '" + id + "'.");
+ if (Ext.isFunction(fn)) {
+ component.on(event, fn, scope, options);
+ } else if (Ext.isFunction(this[fn])) {
+ component.on(event, this[fn], scope, options);
+ } else {
+ Ext.Error.raise({
+ msg: "Error adding '" + event + "' listener: the specified handler '" + fn + "' is not a Function or does not exist."
+ });
+ }
+ }
+ }
+ },
+ /**
+ @private
+ */
+ unregisterComponent: function(id) {
+ var component, event, existingComponent, fn, getterName, listener, listeners, options, scope, _ref;
+ Deft.Logger.log("Unregistering '" + id + "' component.");
+ existingComponent = this.getComponent(id);
+ if (!(existingComponent != null)) {
+ Ext.Error.raise({
+ msg: "Error unregistering component: no component is registered as '" + id + "'."
+ });
+ }
+ _ref = this.registeredComponents[id], component = _ref.component, listeners = _ref.listeners;
+ if (Ext.isObject(listeners)) {
+ for (event in listeners) {
+ listener = listeners[event];
+ fn = listener;
+ scope = this;
+ if (Ext.isObject(listener)) {
+ options = listener;
+ if (options.fn != null) fn = options.fn;
+ if (options.scope != null) scope = options.scope;
+ }
+ Deft.Logger.log("Removing '" + event + "' listener from '" + id + "'.");
+ if (Ext.isFunction(fn)) {
+ component.un(event, fn, scope);
+ } else if (Ext.isFunction(this[fn])) {
+ component.un(event, this[fn], scope);
+ } else {
+ Ext.Error.raise({
+ msg: "Error removing '" + event + "' listener: the specified handler '" + fn + "' is not a Function or does not exist."
+ });
+ }
+ }
+ }
+ if (id !== 'view') {
+ getterName = 'get' + Ext.String.capitalize(id);
+ this[getterName] = null;
+ }
+ this.registeredComponents[id] = null;
+ },
+ /**
+ @private
+ */
+ locateComponent: function(id, config) {
+ var matches, view;
+ view = this.getView();
+ if (id === 'view') return view;
+ if (Ext.isString(config)) {
+ matches = view.query(config);
+ if (matches.length === 0) {
+ Ext.Error.raise({
+ msg: "Error locating component: no component found matching '" + config + "'."
+ });
+ }
+ if (matches.length > 1) {
+ Ext.Error.raise({
+ msg: "Error locating component: multiple components found matching '" + config + "'."
+ });
+ }
+ return matches[0];
+ } else if (Ext.isString(config.selector)) {
+ matches = view.query(config.selector);
+ if (matches.length === 0) {
+ Ext.Error.raise({
+ msg: "Error locating component: no component found matching '" + config.selector + "'."
+ });
+ }
+ if (matches.length > 1) {
+ Ext.Error.raise({
+ msg: "Error locating component: multiple components found matching '" + config.selector + "'."
+ });
+ }
+ return matches[0];
+ } else {
+ matches = view.query('#' + id);
+ if (matches.length === 0) {
+ Ext.Error.raise({
+ msg: "Error locating component: no component found with an itemId of '" + id + "'."
+ });
+ }
+ if (matches.length > 1) {
+ Ext.Error.raise({
+ msg: "Error locating component: multiple components found with an itemId of '" + id + "'."
+ });
+ }
+ return matches[0];
+ }
+ }
+});
+
+/**
+A mixin that creates and attaches the specified view controller(s) to the target view.
+
+Used in conjunction with {@link Deft.mvc.ViewController}.
+*/
+Ext.define('Deft.mixin.Controllable', {
+ requires: ['Deft.mvc.ViewController'],
+ /**
+ @private
+ */
+ onClassMixedIn: function(targetClass) {
+ targetClass.prototype.constructor = Ext.Function.createSequence(targetClass.prototype.constructor, function() {
+ var controllerClass, controllers, _i, _len;
+ if (!(this.controller != null)) {
+ Ext.Error.raise({
+ msg: 'Error initializing Controllable instance: \`controller\` was not specified.'
+ });
+ }
+ controllers = Ext.isArray(this.controller) ? this.controller : [this.controller];
+ for (_i = 0, _len = controllers.length; _i < _len; _i++) {
+ controllerClass = controllers[_i];
+ try {
+ Ext.create(controllerClass, {
+ view: this
+ });
+ } catch (error) {
+ Ext.Error.raise({
+ msg: "Error initializing Controllable instance: an error occurred while creating an instance of the specified controller: '" + this.controller + "'."
+ });
+ }
+ }
+ });
+ }
+});
+
+Ext.define('Deft.promise.Deferred', {
+ alternateClassName: ['Deft.Deferred'],
+ constructor: function() {
+ this.state = 'pending';
+ this.progress = void 0;
+ this.value = void 0;
+ this.progressCallbacks = [];
+ this.successCallbacks = [];
+ this.failureCallbacks = [];
+ this.cancelCallbacks = [];
+ this.promise = Ext.create('Deft.Promise', this);
+ return this;
+ },
+ /**
+ Returns a new {@link Deft.promise.Promise} with the specified callbacks registered to be called when this {@link Deft.promise.Deferred} is resolved, rejected, updated or cancelled.
+ */
+ then: function(callbacks) {
+ var callback, cancelCallback, deferred, failureCallback, progressCallback, successCallback, wrapCallback, wrapProgressCallback, _i, _len, _ref;
+ if (Ext.isObject(callbacks)) {
+ successCallback = callbacks.success, failureCallback = callbacks.failure, progressCallback = callbacks.progress, cancelCallback = callbacks.cancel;
+ } else {
+ successCallback = arguments[0], failureCallback = arguments[1], progressCallback = arguments[2], cancelCallback = arguments[3];
+ }
+ _ref = [successCallback, failureCallback, progressCallback, cancelCallback];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ callback = _ref[_i];
+ if (!(Ext.isFunction(callback) || callback === null || callback === void 0)) {
+ Ext.Error.raise({
+ msg: 'Error while configuring callback: a non-function specified.'
+ });
+ }
+ }
+ deferred = Ext.create('Deft.promise.Deferred');
+ wrapCallback = function(callback, action) {
+ return function(value) {
+ var result;
+ if (Ext.isFunction(callback)) {
+ try {
+ result = callback(value);
+ if (result === void 0) {
+ deferred[action](value);
+ } else if (result instanceof Ext.ClassManager.get('Deft.promise.Promise') || result instanceof Ext.ClassManager.get('Deft.promise.Deferred')) {
+ result.then(Ext.bind(deferred.resolve, deferred), Ext.bind(deferred.reject, deferred), Ext.bind(deferred.update, deferred), Ext.bind(deferred.cancel, deferred));
+ } else {
+ deferred.resolve(result);
+ }
+ } catch (error) {
+ deferred.reject(error);
+ }
+ } else {
+ deferred[action](value);
+ }
+ };
+ };
+ this.register(wrapCallback(successCallback, 'resolve'), this.successCallbacks, 'resolved', this.value);
+ this.register(wrapCallback(failureCallback, 'reject'), this.failureCallbacks, 'rejected', this.value);
+ this.register(wrapCallback(cancelCallback, 'cancel'), this.cancelCallbacks, 'cancelled', this.value);
+ wrapProgressCallback = function(callback) {
+ return function(value) {
+ var result;
+ if (Ext.isFunction(callback)) {
+ result = callback(value);
+ if (result === void 0) {
+ deferred.update(value);
+ } else {
+ deferred.update(result);
+ }
+ } else {
+ deferred.update(value);
+ }
+ };
+ };
+ this.register(wrapProgressCallback(progressCallback), this.progressCallbacks, 'pending', this.progress);
+ return deferred.getPromise();
+ },
+ /**
+ Returns a new {@link Deft.promise.Promise} with the specified callbacks registered to be called when this {@link Deft.promise.Deferred} is either resolved, rejected, or cancelled.
+ */
+ always: function(alwaysCallback) {
+ return this.then({
+ success: alwaysCallback,
+ failure: alwaysCallback,
+ cancel: alwaysCallback
+ });
+ },
+ /**
+ Update progress for this {@link Deft.promise.Deferred} and notify relevant callbacks.
+ */
+ update: function(progress) {
+ if (this.state === 'pending') {
+ this.progress = progress;
+ this.notify(this.progressCallbacks, progress);
+ } else {
+ Ext.Error.raise({
+ msg: 'Error: this Deferred has already been completed and cannot be modified.'
+ });
+ }
+ },
+ /**
+ Resolve this {@link Deft.promise.Deferred} and notify relevant callbacks.
+ */
+ resolve: function(value) {
+ this.complete('resolved', value, this.successCallbacks);
+ },
+ /**
+ Reject this {@link Deft.promise.Deferred} and notify relevant callbacks.
+ */
+ reject: function(error) {
+ this.complete('rejected', error, this.failureCallbacks);
+ },
+ /**
+ Cancel this {@link Deft.promise.Deferred} and notify relevant callbacks.
+ */
+ cancel: function(reason) {
+ this.complete('cancelled', reason, this.cancelCallbacks);
+ },
+ /**
+ Get this {@link Deft.promise.Deferred}'s associated {@link Deft.promise.Promise}.
+ */
+ getPromise: function() {
+ return this.promise;
+ },
+ /**
+ Get this {@link Deft.promise.Deferred}'s current state.
+ */
+ getState: function() {
+ return this.state;
+ },
+ /**
+ Register a callback for this {@link Deft.promise.Deferred} for the specified callbacks and state, immediately notifying with the specified value (if applicable).
+ @private
+ */
+ register: function(callback, callbacks, state, value) {
+ if (Ext.isFunction(callback)) {
+ if (this.state === 'pending') callbacks.push(callback);
+ if (this.state === state && value !== void 0) this.notify([callback], value);
+ }
+ },
+ /**
+ Complete this {@link Deft.promise.Deferred} with the specified state and value.
+ @private
+ */
+ complete: function(state, value, callbacks) {
+ if (this.state === 'pending') {
+ this.state = state;
+ this.value = value;
+ this.notify(callbacks, value);
+ this.releaseCallbacks();
+ } else {
+ Ext.Error.raise({
+ msg: 'Error: this Deferred has already been completed and cannot be modified.'
+ });
+ }
+ },
+ /**
+ Notify the specified callbacks with the specified value.
+ @private
+ */
+ notify: function(callbacks, value) {
+ var callback, _i, _len;
+ for (_i = 0, _len = callbacks.length; _i < _len; _i++) {
+ callback = callbacks[_i];
+ callback(value);
+ }
+ },
+ /**
+ Release references to all callbacks registered with this {@link Deft.promise.Deferred}.
+ @private
+ */
+ releaseCallbacks: function() {
+ this.progressCallbacks = null;
+ this.successCallbacks = null;
+ this.failureCallbacks = null;
+ this.cancelCallbacks = null;
+ }
+});
+
+/*
+Promise.when(), all(), any(), map() and reduce() methods adapted from:
+[when.js](https://github.com/cujojs/when)
+Copyright (c) B Cavalier & J Hann
+Open source under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).
+*/
+Ext.define('Deft.promise.Promise', {
+ alternateClassName: ['Deft.Promise'],
+ statics: {
+ /**
+ Returns a new {@link Deft.promise.Promise} with the specified callbacks registered to be called:
+ - immediately for the specified value, or
+ - when the specified {@link Deft.promise.Deferred} or {@link Deft.promise.Promise} is resolved, rejected, updated or cancelled.
+ */
+ when: function(promiseOrValue, callbacks) {
+ var deferred;
+ if (promiseOrValue instanceof Ext.ClassManager.get('Deft.promise.Promise') || promiseOrValue instanceof Ext.ClassManager.get('Deft.promise.Deferred')) {
+ return promiseOrValue.then(callbacks);
+ } else {
+ deferred = Ext.create('Deft.promise.Deferred');
+ deferred.resolve(promiseOrValue);
+ return deferred.then(callbacks);
+ }
+ },
+ /**
+ Returns a new {@link Deft.promise.Promise} that will only resolve once all the specified `promisesOrValues` have resolved.
+ The resolution value will be an Array containing the resolution value of each of the `promisesOrValues`.
+ */
+ all: function(promisesOrValues, callbacks) {
+ var promise, results;
+ results = new Array(promisesOrValues.length);
+ promise = this.reduce(promisesOrValues, this.reduceIntoArray, results);
+ return this.when(promise, callbacks);
+ },
+ /**
+ Returns a new {@link Deft.promise.Promise} that will only resolve once any one of the the specified `promisesOrValues` has resolved.
+ The resolution value will be the resolution value of the triggering `promiseOrValue`.
+ */
+ any: function(promisesOrValues, callbacks) {
+ var complete, deferred, index, progressFunction, promiseOrValue, rejectFunction, rejecter, resolveFunction, resolver, updater, _len;
+ deferred = Ext.create('Deft.promise.Deferred');
+ updater = function(progress) {
+ deferred.update(progress);
+ };
+ resolver = function(value) {
+ complete();
+ deferred.resolve(value);
+ };
+ rejecter = function(error) {
+ complete();
+ deferred.reject(error);
+ };