Skip to content
Browse files

loads of goodies :)

  • Loading branch information...
1 parent 7b47c55 commit a43f5ab1f36b9f3e58835d00d29f72f8103a96df @kristianmandrup committed Jun 29, 2012
Showing with 14,896 additions and 897 deletions.
  1. +146 −0 www/Cakefile
  2. +1 −1 www/Gemfile
  3. +4 −9 www/Gemfile.lock
  4. +18 −3 www/Guardfile
  5. +31 −76 www/app.js
  6. +33 −1 www/app.json
  7. +24 −0 www/app/Home.js
  8. +24 −0 www/app/app/view/Home.js
  9. +52 −0 www/app/controller/Language.js
  10. +95 −0 www/app/controller/Main.js
  11. +5 −0 www/app/store/LanguageStore.js
  12. +27 −0 www/app/view/About.js
  13. +43 −0 www/app/view/Action.js
  14. +10 −0 www/app/view/Bookmarks.js
  15. +24 −0 www/app/view/Home.js
  16. +113 −0 www/app/view/Main.js
  17. +108 −0 www/app/view/More.js
  18. +70 −5 www/app/view/Navigation.js
  19. +11 −0 www/app/view/NewProperty.js
  20. +26 −0 www/app/view/Search.js
  21. +40 −0 www/app/view/Settings.js
  22. +14 −0 www/app/view/buttonbar/Colors.js
  23. +15 −0 www/app/view/buttonbar/IconStyles.js
  24. +16 −0 www/app/view/buttonbar/ShapeColors.js
  25. +15 −0 www/app/view/buttonbar/Shapes.js
  26. +27 −20 www/app/view/home/NavBar.js
  27. +19 −13 www/app/view/home/Page.js
  28. +22 −0 www/app/view/home/Paige.js
  29. +19 −16 www/app/view/home/TopBar.js
  30. +2 −0 www/app/view/home/about/costs/Page.js
  31. +3 −1 www/app/view/home/about/faq/Page.js
  32. +0 −8 www/app/view/home/btn/About.js
  33. +0 −8 www/app/view/home/btn/New.js
  34. +0 −8 www/app/view/home/btn/Settings.js
  35. +12 −0 www/app/view/languages/ComboBox.js
  36. +2 −0 www/app/view/languages/LangComboBox.js
  37. +1 −1 www/{lib → app/view}/plugins/SliderFieldInput.js
  38. +1 −1 www/{lib → app/view}/plugins/SliderFieldText.js
  39. +15 −28 www/app/view/properties/NavBar.js
  40. +12 −15 www/app/view/properties/list/Content.js
  41. +11 −13 www/app/view/properties/list/Item.js
  42. +13 −22 www/app/view/properties/list/TopBar.js
  43. +20 −11 www/app/view/properties/list/item/Content.js
  44. +5 −4 www/app/view/properties/list/item/Image.js
  45. +10 −7 www/app/view/properties/map/Content.js
  46. +8 −8 www/app/view/properties/map/quickview/Overlay.js
  47. +20 −0 www/app/view/property/edit/NavBar.js
  48. +8 −0 www/app/view/property/edit/TopBar.js
  49. +15 −0 www/app/view/property/edit/contact_info/Content.js
  50. +17 −0 www/app/view/property/edit/contact_info/Page.js
  51. +15 −0 www/app/view/property/edit/costs/Content.js
  52. +17 −0 www/app/view/property/edit/costs/Page.js
  53. +15 −0 www/app/view/property/edit/description/Content.js
  54. +17 −0 www/app/view/property/edit/description/Page.js
  55. +0 −35 www/app/view/property/edit/details/NavBar.js
  56. +0 −15 www/app/view/property/edit/details/contact_info/Content.js
  57. +0 −18 www/app/view/property/edit/details/contact_info/Page.js
  58. +0 −15 www/app/view/property/edit/details/description/Content.js
  59. +0 −18 www/app/view/property/edit/details/description/Page.js
  60. +0 −15 www/app/view/property/edit/details/location/Content.js
  61. +0 −18 www/app/view/property/edit/details/location/Page.js
  62. +0 −15 www/app/view/property/edit/details/period/Content.js
  63. +15 −0 www/app/view/property/edit/location/Content.js
  64. +17 −0 www/app/view/property/edit/location/Page.js
  65. +15 −0 www/app/view/property/edit/period/Content.js
  66. +17 −0 www/app/view/property/edit/period/Page.js
  67. 0 www/app/view/property/edit/{details → }/photo_upload/Content.js
  68. 0 www/app/view/property/edit/{details → }/photo_upload/Page.js
  69. +15 −0 www/app/view/property/edit/photos/Content.js
  70. +17 −0 www/app/view/property/edit/photos/Page.js
  71. +5 −3 www/app/view/property/{edit/details/period → new/location}/Page.js
  72. +13 −16 www/app/view/registration/TopBar.js
  73. +10 −11 www/app/view/registration/landlord/register/Content.js
  74. +11 −20 www/app/view/registration/landlord/register/NavBar.js
  75. +8 −9 www/app/view/registration/landlord/register/Page.js
  76. +8 −9 www/app/view/registration/landlord/why_us/Content.js
  77. +9 −17 www/app/view/registration/landlord/why_us/NavBar.js
  78. +13 −13 www/app/view/registration/landlord/why_us/Page.js
  79. +16 −0 www/app/view/registration/landlord/why_us/ReasonsList.js
  80. +10 −11 www/app/view/registration/tenant/register/Content.js
  81. +9 −20 www/app/view/registration/tenant/register/NavBar.js
  82. +12 −13 www/app/view/registration/tenant/register/Page.js
  83. +8 −8 www/app/view/registration/tenant/why_us/Content.js
  84. +7 −13 www/app/view/registration/tenant/why_us/NavBar.js
  85. 0 www/app/view/{ → sandbox}/NoteEditor.js
  86. 0 www/app/view/{ → sandbox}/NotesList.js
  87. +32 −39 www/app/view/search/Content.js
  88. +26 −34 www/app/view/search/NavBar.js
  89. +8 −9 www/app/view/search/Page.js
  90. +9 −17 www/app/view/search/TopBar.js
  91. +4 −3 www/app/view/search/btn/Agents.js
  92. +3 −2 www/app/view/search/btn/Favorites.js
  93. +3 −2 www/app/view/search/btn/History.js
  94. +3 −2 www/app/view/search/btn/Search.js
  95. +13 −0 www/app/view/search/criteria/Content.js
  96. +27 −0 www/app/view/search/criteria/FieldSet.js
  97. +9 −8 www/app/view/search/criteria/Furnishment.js
  98. +9 −8 www/app/view/search/criteria/Location.js
  99. +14 −36 www/app/view/search/criteria/Page.js
  100. +9 −8 www/app/view/search/criteria/PropertyType.js
  101. +9 −8 www/app/view/search/criteria/Radius.js
  102. +12 −11 www/app/view/search/criteria/RentalCost.js
  103. +10 −9 www/app/view/search/criteria/RentalPeriod.js
  104. +10 −9 www/app/view/search/criteria/Rooms.js
  105. +20 −20 www/app/view/search/criteria/Rules.js
  106. +10 −8 www/app/view/search/criteria/Size.js
  107. +6 −5 www/app/view/search/favorites/Content.js
  108. +8 −8 www/app/view/search/history/Content.js
  109. +12 −14 www/app/view/settings/Content.js
  110. +12 −18 www/app/view/settings/Navbar.js
  111. +3 −1 www/app/view/settings/Page.js
  112. +13 −0 www/app/view/settings/account/Content.js
  113. +13 −14 www/app/view/settings/account/mail/Options.js
  114. +7 −7 www/app/view/settings/language/List.js
  115. +16 −0 www/app/view/why_us/NavBar.js
  116. +14 −0 www/app/view/why_us/Page.js
  117. +13 −0 www/app/view/why_us/TopBar.js
  118. +19 −0 www/app/view/why_us/faq/Page.js
  119. +13 −0 www/app/view/why_us/follow/Content.js
  120. +17 −0 www/app/view/why_us/follow/Page.js
  121. +19 −0 www/app_test.js
  122. +5 −1 www/docs/Command line.md
  123. +97 −0 www/docs/Testing tips.md
  124. +21 −0 www/docs/Various tips and hints.md
  125. +11 −5 www/index.html
  126. +36 −0 www/lib/app.js
  127. +18 −0 www/lib/app/view/Home.js
  128. +2 −0 www/lib/deftjs/.gitignore
  129. +526 −0 www/lib/deftjs/README.md
  130. +1,066 −0 www/lib/deftjs/build/deft-debug.js
  131. +38 −0 www/lib/deftjs/build/deft.js
  132. +42 −0 www/lib/deftjs/spec/SpecRunner.html
  133. +1,952 −0 www/lib/deftjs/spec/coffee/Deft/ioc/Injector.coffee
  134. +105 −0 www/lib/deftjs/spec/coffee/Deft/mixin/Controllable.coffee
  135. +27 −0 www/lib/deftjs/spec/coffee/Deft/mixin/Injectable.coffee
  136. +754 −0 www/lib/deftjs/spec/coffee/Deft/mvc/ViewController.coffee
  137. +2,811 −0 www/lib/deftjs/spec/coffee/Deft/promise/Deferred.coffee
  138. +283 −0 www/lib/deftjs/spec/coffee/Deft/promise/Promise.coffee
  139. +106 −0 www/lib/deftjs/spec/coffee/Deft/util/Function.coffee
  140. +1,197 −0 www/lib/deftjs/spec/js/Deft/ioc/Injector.js
  141. +84 −0 www/lib/deftjs/spec/js/Deft/mixin/Controllable.js
  142. +25 −0 www/lib/deftjs/spec/js/Deft/mixin/Injectable.js
  143. +649 −0 www/lib/deftjs/spec/js/Deft/mvc/ViewController.js
  144. +2,076 −0 www/lib/deftjs/spec/js/Deft/promise/Deferred.js
  145. +210 −0 www/lib/deftjs/spec/js/Deft/promise/Promise.js
  146. +87 −0 www/lib/deftjs/spec/js/Deft/util/Function.js
  147. +20 −0 www/lib/deftjs/spec/lib/jasmine-1.2.0/MIT.LICENSE
  148. +616 −0 www/lib/deftjs/spec/lib/jasmine-1.2.0/jasmine-html.js
  149. +81 −0 www/lib/deftjs/spec/lib/jasmine-1.2.0/jasmine.css
Sorry, we could not display the entire diff because too many files (304) changed.
View
146 www/Cakefile
@@ -0,0 +1,146 @@
+# ** Cakefile Template ** is a Template for a common Cakefile that you may use in a coffeescript nodejs project.
+#
+# It comes baked in with 4 tasks:
+#
+# * build - compiles your src directory to your lib directory
+# * watch - watches any changes in your src directory and automatically compiles to the lib directory
+# * test - runs mocha test framework, you can edit this task to use your favorite test framework
+# * docs - generates annotated documentation using docco
+fs = require 'fs'
+{print} = require 'util'
+{spawn, exec} = require 'child_process'
+
+# ANSI Terminal Colors
+bold = "BOLD"
+green = "GREEN"
+reset = "RESET"
+red = "RED"
+
+# Internal Functions
+#
+# ## *walk*
+#
+# **given** string as dir which represents a directory in relation to local directory
+# **and** callback as done in the form of (err, results)
+# **then** recurse through directory returning an array of files
+walk = (dir, done) ->
+ results = []
+ fs.readdir dir, (err, list) ->
+ return done(err, []) if err
+ pending = list.length
+ return done(null, results) unless pending
+ for name in list
+ file = "#{dir}/#{name}"
+ try
+ stat = fs.statSync file
+ catch err
+ stat = null
+ if stat?.isDirectory()
+ walk file, (err, res) ->
+ results.push name for name in res
+ done(null, results) unless --pending
+ else
+ results.push file
+ done(null, results) unless --pending
+
+# ## *log*
+#
+# **given** string as a message
+# **and** string as a color
+# **and** optional string as an explaination
+# **then** builds a statement and logs to console.
+log = (message, color, explanation) -> console.log color + message + reset + ' ' + (explanation or '')
+
+# ## *launch*
+#
+# **given** string as a cmd
+# **and** optional array and option flags
+# **and** optional callback
+# **then** spawn cmd with options
+# **and** pipe to process stdout and stderr respectively
+# **and** on child process exit emit callback if set and status is 0
+launch = (cmd, options=[], callback) ->
+ app = spawn cmd, options
+ app.stdout.pipe(process.stdout)
+ app.stderr.pipe(process.stderr)
+ app.on 'exit', (status) -> callback?() if status is 0
+
+# ## *build*
+#
+# **given** optional boolean as watch
+# **and** optional function as callback
+# **then** invoke launch passing coffee command
+# **and** defaulted options to compile src to lib
+build = (watch, callback) ->
+ if typeof watch is 'function'
+ callback = watch
+ watch = false
+
+ options = ['-c', '-b', '-o', 'lib', 'src']
+ options.unshift '-w' if watch
+ launch 'coffee', options, callback
+
+# ## *mocha*
+#
+# **given** optional array of option flags
+# **and** optional function as callback
+# **then** invoke launch passing mocha command
+mocha = (options, callback) ->
+ if typeof options is 'function'
+ callback = options
+ options = []
+
+ launch 'mocha', options, callback
+
+# ## *docco*
+#
+# **given** optional function as callback
+# **then** invoke launch passing docco command
+docco = (callback) ->
+ walk 'src', (err, files) -> launch 'docco', files, callback
+
+# Cakefile Tasks
+#
+# ## *docs*
+#
+# Generate Annotated Documentation
+#
+# <small>Usage</small>
+#
+# ```
+# cake docs
+# ```
+task 'docs', 'generate documentation', -> docco()
+
+# ## *build*
+#
+# Builds Source
+#
+# <small>Usage</small>
+#
+# ```
+# cake build
+# ```
+task 'build', 'compile source', -> build -> log ":)", green
+
+# ## *watch*
+#
+# Builds your source whenever it changes
+#
+# <small>Usage</small>
+#
+# ```
+# cake watch
+# ```
+task 'watch', 'compile and watch', -> build true, -> log ":-)", green
+
+# ## *test*
+#
+# Runs your test suite.
+#
+# <small>Usage</small>
+#
+# ```
+# cake test
+# ```
+task 'test', 'run tests', -> build -> mocha -> log ":)", green
View
2 www/Gemfile
@@ -7,6 +7,6 @@ group :development do
gem "compass"
gem "guard"
gem "guard-coffeescript"
- gem "guard-compass", :git => 'git@github.com:bradphelan/guard-compass.git'
+ gem "guard-compass"
gem "growl"
end
View
13 www/Gemfile.lock
@@ -1,11 +1,3 @@
-GIT
- remote: git@github.com:bradphelan/guard-compass.git
- revision: f8be06158e3e3713da26a8a99bc250023b1e049f
- specs:
- guard-compass (0.0.6)
- compass (>= 0.10.5)
- guard (>= 0.2.1)
-
GEM
remote: http://rubygems.org/
specs:
@@ -31,6 +23,9 @@ GEM
guard-coffeescript (1.0.0)
coffee-script (>= 2.2.0)
guard (>= 1.1.0)
+ guard-compass (0.0.6)
+ compass (>= 0.10.5)
+ guard (>= 0.2.1)
listen (0.4.5)
rb-fchange (~> 0.0.5)
rb-fsevent (~> 0.9.1)
@@ -71,6 +66,6 @@ DEPENDENCIES
growl
guard
guard-coffeescript
- guard-compass!
+ guard-compass
sinatra
sinatra-reloader
View
21 www/Guardfile
@@ -1,10 +1,25 @@
require 'guard/guard'
-guard 'coffeescript' do
- watch %r{^app/.+\.coffee$}
- watch %r{^app.coffee$}
+# app
+guard 'coffeescript', :output => 'app', :bare => true do
+ watch %r{^src/app/(.+\.coffee)$}
end
+# lib
+guard 'coffeescript', :output => 'lib', :bare => true do
+ watch %r{^src/lib/(.+\.coffee)$}
+end
+
+# test
+guard 'coffeescript', :output => 'test', :bare => true do
+ watch %r{^test/coffee/app/(.+\.coffee)$}
+end
+
+guard 'coffeescript', :output => 'test', :bare => true do
+ watch %r{^test/coffee/config\.coffee$}
+end
+
+
config = File.expand_path "../resources/sass/config.rb", __FILE__
path = File.expand_path "../..", config
View
107 www/app.js
@@ -1,85 +1,40 @@
-Ext.application({
- name: "FriendlyRent",
-
- requires: [
- 'FriendlyRent.view.Navigation'
- ],
-
- // models: ["Note"],
- // stores: ["Notes"],
- // controllers: ["Notes"],
- views: ["Main", "BottomBar", "TopBar", "Map", "Navigation"],
- // "NotesList", "NoteEditor", "Navigation",
-
+//(function() {
+
+ Ext.application({
+ name: 'FriendlyRent',
+ requires: ["Ext.MessageBox"],
+ models: [],
+ stores: [],
+ controllers: [],
+ views: ["registration.landlord.why_us.Page"],
icon: {
- '57': 'resources/icons/Icon.png',
- '72': 'resources/icons/Icon~ipad.png',
- '114': 'resources/icons/Icon@2x.png',
- '144': 'resources/icons/Icon~ipad@2x.png'
+ '57': 'resources/icons/Icon.png',
+ '72': 'resources/icons/Icon~ipad.png',
+ '114': 'resources/icons/Icon@2x.png',
+ '144': 'resources/icons/Icon~ipad@2x.png'
},
-
isIconPrecomposed: true,
-
startupImage: {
- '320x460': 'resources/startup/320x460.jpg',
- '640x920': 'resources/startup/640x920.png',
- '768x1004': 'resources/startup/768x1004.png',
- '748x1024': 'resources/startup/748x1024.png',
- '1536x2008': 'resources/startup/1536x2008.png',
- '1496x2048': 'resources/startup/1496x2048.png'
+ '320x460': 'resources/startup/320x460.jpg',
+ '640x920': 'resources/startup/640x920.png',
+ '768x1004': 'resources/startup/768x1004.png',
+ '748x1024': 'resources/startup/748x1024.png',
+ '1536x2008': 'resources/startup/1536x2008.png',
+ '1496x2048': 'resources/startup/1496x2048.png'
},
-
launch: function() {
- console.log('launch');
- this.launched = true;
- this.mainLaunch();
- // Ext.fly('appLoadingIndicator').destroy();
- // Ext.Viewport.add(Ext.create('FriendlyRent.view.Main'));
-
+ var page;
+ console.log("launch");
+ page = Ext.create("FriendlyRent.view.registration.landlord.why_us.Page");
+ return Ext.Viewport.add(page);
},
-
- mainLaunch: function() {
- console.log('mainLaunch');
- // if (!device || !this.launched) { return; }
-
- I18n.defaultLocale = "da";
- I18n.locale = "da";
-
- console.log('Launched!');
-
- // Destroy the #appLoadingIndicator element
- Ext.fly('appLoadingIndicator').destroy();
-
- // // Initialize the main view
- // var notesListView = {
- // xtype: "noteslistview"
- // };
- // var noteEditorView = {
- // xtype: "noteeditorview"
- // };
-
- var navigation = Ext.create('FriendlyRent.view.Navigation');
-
- // Ext.Viewport.add([notesListView, noteEditorView]);
-
- Ext.Viewport.add(navigation);
-
- navigation.push({
- xtype: 'main'
- });
-
- // Ext.Viewport.add(Ext.create('FriendlyRent.view.Main'));
- },
-
onUpdated: function() {
- Ext.Msg.confirm(
- "Application Update",
- "This application has just successfully been updated to the latest version. Reload now?",
- function(buttonId) {
- if (buttonId === 'yes') {
- window.location.reload();
- }
- }
- );
+ return Ext.Msg.confirm("Application Update", "This application has just successfully been updated to the latest version. Reload now?", function(buttonId) {
+ if (buttonId === 'yes') {
+ return window.location.reload();
+ }
+ });
}
-});
+ });
+
+//}).call(this);
View
34 www/app.json
@@ -36,10 +36,39 @@
"path": "sdk/sencha-touch.js"
},
{
+ "path": "lib/jquery/jquery-1.7.2.js"
+ },
+ {
+ "path": "lib/jquery/jquery.rest.js"
+ },
+ {
+ "path": "lib/i18n/i18n.js"
+ },
+ // Sencha plugins
+ {
+ "path": "lib/plugins/NavBar.js"
+ },
+
+ // {
+ // "path": "lib/deftjs/deft.js" // or deft-debug.js
+ // },
+ // {
+ // "path": "lib/sencha-io/sencha-io.js"
+ // },
+ // {
+ // "path": "lib/jasmine/jasmine.js"
+ // },
+ // {
+ // "path": "lib/jasmine/jasmine-html.js"
+ // },
+ // {
+ // "path": "lib/jasmine/jasmine.console_reporter.js"
+ // },
+ {
"path": "app.js",
"bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */
"update": "delta"
- }
+ }
],
/**
@@ -57,6 +86,9 @@
*/
"css": [
{
+ "path": "lib/jasmine/jasmine.css"
+ },
+ {
"path": "resources/css/app.css",
"update": "delta"
}
View
24 www/app/Home.js
@@ -0,0 +1,24 @@
+(function() {
+
+ Ext.define('App.view.HelloWorld', {
+ extend: 'Ext.Container',
+ config: {
+ fullscreen: true,
+ html: 'Hello Worldazsfz! #7'
+ }
+ });
+
+ Ext.define('App.controller.HelloWorld', {
+ extend: 'Ext.app.Controller',
+ views: ['HelloWorld'],
+ init: function() {
+ return this.getView('HelloWorld').create();
+ }
+ });
+
+ Ext.application({
+ name: 'App',
+ controllers: ['HelloWorld']
+ });
+
+}).call(this);
View
24 www/app/app/view/Home.js
@@ -0,0 +1,24 @@
+(function() {
+
+ Ext.define('App.view.HelloWorld', {
+ extend: 'Ext.Container',
+ config: {
+ fullscreen: true,
+ html: 'Hello Worlda! #7'
+ }
+ });
+
+ Ext.define('App.controller.HelloWorld', {
+ extend: 'Ext.app.Controller',
+ views: ['HelloWorld'],
+ init: function() {
+ return this.getView('HelloWorld').create();
+ }
+ });
+
+ Ext.application({
+ name: 'App',
+ controllers: ['HelloWorld']
+ });
+
+}).call(this);
View
52 www/app/controller/Language.js
@@ -0,0 +1,52 @@
+
+Ext.define('Sencha.controller.Language', {
+ extend: 'Ext.app.Controller',
+ setLanguage: function(cb, records) {
+ var record;
+ record = records[0];
+ return window.location.search = Ext.urlEncode({
+ "lang": record.get("code")
+ });
+ }
+});
+
+({
+ parseLanguage: function() {
+ var params, record, url;
+ params = Ext.urlDecode(window.location.search.substring(1));
+ if (params.lang) {
+ url = Ext.util.Format.format('ext/locale/ext-lang-{0}.js', params.lang);
+ Ext.Ajax.request({
+ url: url,
+ success: this.onSuccess,
+ failure: this.onFailure,
+ scope: this
+ });
+ record = store.findRecord('code', params.lang, null, null, null, true);
+ }
+ return combo.setValue(record.data.language)(record ? this.setup() : void 0);
+ },
+ onFailure: function() {
+ Ext.Msg.alert('Failure', 'Failed to load locale file.');
+ return this.setup();
+ },
+ onSuccess: function(response) {
+ eval(response.responseText);
+ return this.setup();
+ },
+ setup: function() {
+ return Ext.create('Ext.FormPanel', {
+ renderTo: 'datefield',
+ frame: true,
+ title: 'Date picker',
+ width: 380,
+ defaultType: 'datefield',
+ items: [
+ {
+ fieldLabel: 'Date',
+ name: 'date'
+ }
+ ]
+ });
+ }
+});
View
95 www/app/controller/Main.js
@@ -0,0 +1,95 @@
+Ext.define('Sencha.controller.Main', {
+ extend: 'Ext.app.Controller',
+
+ config: {
+ refs: {
+ navBar: 'tabbar',
+ homeTabButton: 'button[title=home]',
+ aboutTabButton: 'button[action=about]',
+ clearButton: 'button[action=clearHomeBadge]',
+ starButton: 'button[action=pingHomeBadge]'
+ },
+ control: {
+ clearButton: {
+ tap: 'clearHomeBadge'
+ },
+ homeTabButton: {
+ tap: 'homeMenu'
+ },
+ aboutTabButton: {
+ tap: 'aboutMenu'
+ },
+ starButton: {
+ tap: 'incrementHomeBadge'
+ }
+ }
+ },
+
+ // @private
+ aboutTabButton: function() { //function(activeItem, oldActiveItem) {
+ var title = 'Hello world'
+ this.getMain().getNavigationBar().pushTitle(title);
+ this.getMain().getNavigationBar().titleComponent.setWidth(100);
+
+ var me = this,
+ navigationBar = me.getNavigationBar(),
+ stack = me.stack,
+ layout = me.getLayout(),
+ animation = layout.getAnimation() && layout.getAnimation().isAnimation && this.isPainted(),
+ pushFn = (animation) ? 'pushAnimated' : 'push',
+ popFn = (animation) ? 'popAnimated' : 'pop',
+ title;
+
+ if (!activeItem) {
+ return;
+ }
+
+ title = activeItem.getInitialConfig().title;
+
+ //if we are not popping a view, then add it to the stack
+ if (!me.popping) {
+ stack.push(activeItem);
+ me.fireEvent('push', this, activeItem);
+ } else {
+ me.fireEvent('pop', this, activeItem);
+ }
+ me.callParent(arguments);
+ },
+
+ homeMenu: function() {
+ console.log('home menu!');
+ Ext.Viewport.add({
+ xtype: 'homecard'
+ });
+ },
+
+ aboutMenu: function() {
+ console.log('About menu!');
+ Ext.Viewport.add({
+ xtype: 'aboutcard'
+ });
+ },
+
+ incrementHomeBadge: function() {
+ var hometab = this.getHomeTabButton(),
+ badgenumber = parseInt(hometab.getBadgeText()),
+ nextnumber = isNaN(badgenumber) ? 1 : badgenumber+1;
+
+ hometab.setBadgeText(nextnumber);
+ },
+
+ clearHomeBadge: function() {
+ this.getHomeTabButton().setBadgeText("");
+ },
+
+ // Base Class functions.
+ launch: function () {
+ this.callParent(arguments);
+ console.log("launch Main controller");
+ },
+ init: function () {
+ this.callParent(arguments);
+ console.log("init Main controller");
+ }
+
+});
View
5 www/app/store/LanguageStore.js
@@ -0,0 +1,5 @@
+
+Ext.define('FriendlyRent.store.LanguageStore', {
+ fields: ['code', 'language'],
+ data: Ext.local.languages
+});
View
27 www/app/view/About.js
@@ -0,0 +1,27 @@
+Ext.define('Sencha.view.About', {
+ extend: 'Ext.Panel',
+ xtype: 'aboutcard',
+
+ config: {
+ iconCls: 'info',
+ title: 'About',
+ action: 'about',
+ html: 'Made from coffee',
+ styleHtmlContent: true,
+ tabBar: {
+ docked: 'bottom',
+ layout: {
+ pack: 'center'
+ }
+ },
+ items: [
+ {
+ //iconCls: 'home',
+ title: 'Why us',
+ },
+ {
+ title: 'FAQ',
+ }
+ ],
+ }
+});
View
43 www/app/view/Action.js
@@ -0,0 +1,43 @@
+Ext.define('Sencha.view.Action', {
+ extend: 'Ext.Panel',
+ xtype: 'actioncard',
+ requires: [
+ 'Sencha.view.buttonbar.Shapes',
+ 'Sencha.view.buttonbar.Colors',
+ 'Sencha.view.buttonbar.ShapeColors',
+ 'Sencha.view.buttonbar.IconStyles'
+ ],
+
+ config: {
+ iconCls: 'action',
+ title: 'Action',
+ items: [{
+ xtype: 'buttonshapes'
+ },{
+ xtype: 'buttoncolors'
+ },{
+ xtype: 'buttonshapecolors'
+ },{
+ xtype: 'buttoniconstyles'
+ },{
+ docked: 'top',
+ xtype: 'titlebar',
+ title: 'Titlebars accomodate buttons and titles',
+ items: [
+ {
+ iconMask:true,
+ iconCls: 'star',
+ ui: 'plain',
+ align: 'right',
+ action: 'pingHomeBadge'
+ },{
+ iconMask:true,
+ iconCls: 'delete',
+ ui: 'plain',
+ align: 'left',
+ action: 'clearHomeBadge'
+ }
+ ]
+ }]
+ }
+});
View
10 www/app/view/Bookmarks.js
@@ -0,0 +1,10 @@
+Ext.define('Sencha.view.Bookmarks', {
+ extend: 'Ext.Panel',
+ xtype: 'bookmarkscard',
+
+ config: {
+ title: 'Bookmarks',
+ html: 'Your bookmarks go here',
+ styleHtmlContent: true
+ }
+});
View
24 www/app/view/Home.js
@@ -0,0 +1,24 @@
+(function() {
+
+ Ext.define('App.view.HelloWorld', {
+ extend: 'Ext.Container',
+ config: {
+ fullscreen: true,
+ html: 'Hello World! #7'
+ }
+ });
+
+ Ext.define('App.controller.HelloWorld', {
+ extend: 'Ext.app.Controller',
+ views: ['HelloWorld'],
+ init: function() {
+ return this.getView('HelloWorld').create();
+ }
+ });
+
+ Ext.application({
+ name: 'App',
+ controllers: ['HelloWorld']
+ });
+
+}).call(this);
View
113 www/app/view/Main.js
@@ -0,0 +1,113 @@
+Ext.define('Sencha.view.Main', {
+ extend: 'Ext.Panel',
+ xtype: 'main',
+
+ requires: [
+ 'Sencha.view.Home',
+ 'Sencha.view.Search',
+ 'Sencha.view.NewProperty',
+ 'Sencha.view.About',
+ 'Sencha.view.Settings',
+ 'Sencha.view.Action',
+ 'Sencha.view.More',
+ ],
+
+ config: {
+ layout: {
+ pack: 'center'
+ },
+ showNavBarItemIds: ['maps', 'refresh'],
+ items: [
+ {
+ html: 'Hello',
+ layout: 'fit'
+ },
+ {
+ docked: 'top',
+ // ui: 'light',
+ items: [
+ {
+ iconCls: 'search',
+ iconMask: true,
+
+ // xtype: 'button',
+ align: 'right'
+ },
+ {
+ iconCls: 'home',
+ iconMask: true,
+ align: 'right'
+ }
+ ]
+ },
+
+ {
+ docked: 'bottom',
+ xtype: 'toolbar',
+ cls: 'nav-bar',
+ layout: {
+ pack: 'center'
+ },
+ items: [
+ {
+ iconCls: 'maps',
+ iconMask: true,
+ text: 'Map',
+ id: 'mymap',
+ handler: function() {
+ console.log('Add more card!');
+ FriendlyRent.navigation.push(
+ // {
+ // title: 'Second',
+ // html: 'Second view!'
+ // }
+ { xtype: 'morecard' }
+ );
+
+
+ // console.log(FriendlyRent.navigation.getNavigationBar().getItems().items[2].iconCls = 'home');
+
+ // FriendlyRent.navigation.pushTitle('Hello World');
+ // this.getMain().getNavigationBar().titleComponent.setWidth(100);
+
+ // FriendlyRent.navigation.setNavigationBar(
+ // {
+ // docked: 'top',
+ // // ui: 'light',
+ // items: [
+ // {
+ // iconCls: 'search',
+ // iconMask: true,
+
+ // // xtype: 'button',
+ // align: 'right'
+ // },
+ // {
+ // iconCls: 'home',
+ // iconMask: true,
+ // align: 'right'
+ // }
+ // ]
+ // }
+ // );
+ }
+ },
+ {
+ iconCls: 'refresh',
+ iconMask: true,
+ text: 'Refresh',
+ id: 'myrefresh'
+ }
+ ]
+ }
+ // { xtype: 'actioncard' },
+ // { xtype: 'morecard' }
+
+ // { xtype: 'homecard' },
+ // { xtype: 'searchcard' },
+ // { xtype: 'actioncard' },
+ // { xtype: 'settingscard' },
+ // { xtype: 'morecard' }
+ ]
+ }
+});
View
108 www/app/view/More.js
@@ -0,0 +1,108 @@
+Ext.define('Sencha.view.More', {
+ extend: 'Ext.Panel',
+ xtype: 'morecard',
+ requires: [
+ 'Sencha.view.Home'
+ ],
+
+ config: {
+ layout: {
+ pack: 'center'
+ },
+ title: 'More',
+
+ navBarItems: [
+ {
+ iconCls: 'maps',
+ iconMask: true,
+ text: 'Map',
+ align: 'right',
+ },
+ {
+ iconCls: 'refresh',
+ iconMask: true,
+ text: 'Refresh',
+ align: 'right',
+ }
+ ],
+
+ navBarItemIds: ['maps', 'refresh'],
+ items: [
+ {
+ docked: 'top',
+ xtype: 'toolbar',
+ cls: 'nav-bar',
+ items: [
+ {xtype: 'spacer'},
+ {
+ iconCls: 'maps',
+ iconMask: true,
+ text: 'Lort'
+ },
+ {
+ iconCls: 'refresh',
+ iconMask: true,
+ text: 'Pis'
+ }
+ ]
+ },
+ {
+ html: 'More',
+ layout: 'fit'
+ },
+ {
+ docked: 'bottom',
+ xtype: 'toolbar',
+ cls: 'nav-bar',
+ layout: {
+ pack: 'center'
+ },
+ items: [
+ {
+ iconCls: 'home',
+ iconMask: true,
+ text: 'Home',
+ handler: function() {
+ Ext.Viewport.add({
+ xtype: 'homecard'
+ });
+ // FriendlyRent.navigation.setNavigationBar(
+ // {
+ // docked: 'top',
+ // // ui: 'light',
+ // items: [
+ // {
+ // iconCls: 'search',
+ // iconMask: true,
+
+ // // xtype: 'button',
+ // align: 'right'
+ // },
+ // {
+ // iconCls: 'info',
+ // iconMask: true,
+ // align: 'right'
+ // }
+ // ]
+ // }
+ // );
+ }
+ },
+ {
+ iconCls: 'info',
+ iconMask: true,
+ text: 'Info'
+ }
+ ]
+ }
+ // { xtype: 'actioncard' },
+ // { xtype: 'morecard' }
+
+ // { xtype: 'homecard' },
+ // { xtype: 'searchcard' },
+ // { xtype: 'actioncard' },
+ // { xtype: 'settingscard' },
+ // { xtype: 'morecard' }
+ ]
+ }
+});
View
75 www/app/view/Navigation.js
@@ -1,13 +1,78 @@
-Ext.define('FriendlyRent.view.Navigation', {
+Ext.define('Sencha.view.Navigation', {
extend: 'Ext.navigation.View',
-
xtype: 'navigation',
+ // Set Navigation title dynamically
+ // http://davehiren.blogspot.dk/2012/03/sencha-touch-2-dynamically-set-title-of.html
config: {
fullscreen: true,
+ // showNavBarItemIds: ['maps', 'refresh'],
+// @private
+ // doSetActiveItem: function(activeItem, oldActiveItem) {
+ // var me = this,
+ // navigationBar = me.getNavigationBar();
+
+ // if (!activeItem) {
+ // return;
+ // }
+
+ // if (navigationBar) {
+ // navigationBar.rightBox.removeAll();
+ // if ( activeItem.getRightButton ){
+ // console.log('Adding Right Button: ', activeItem.getRightButton());
+ // navigationBar.add(activeItem.getRightButton());
+ // }
+ // }
+ // me.callParent(arguments);
+ // },
+
+
+ // navigationBar: {
+ // ui: 'dark',
+ // docked: 'top',
+ // items: [
+ // {
+ // docked: 'top',
+ // xtype: 'toolbar',
+ // cls: 'nav-bar',
+ // items: [
+ // // {xtype: 'spacer'},
+ // {
+ // iconCls: 'maps',
+ // iconMask: true,
+ // text: 'Map',
+ // align: 'right'
+ // },
+ // {
+ // iconCls: 'refresh',
+ // iconMask: true,
+ // text: 'Refresh',
+ // align: 'right'
+ // }
+ // ]
+ // }
+ // ]
+ // }
+
navigationBar: {
- ui: 'dark',
- docked: 'top'
- }
+ // docked: 'top',
+ // ui: 'light',
+ // items: [
+ // {
+ // iconCls: 'maps',
+ // iconMask: true,
+
+ // // xtype: 'button',
+ // align: 'right',
+ // id: 'maps'
+ // },
+ // {
+ // iconCls: 'refresh',
+ // iconMask: true,
+ // align: 'right',
+ // id: 'refresh'
+ // }
+ // ]
+ }
}
});
View
11 www/app/view/NewProperty.js
@@ -0,0 +1,11 @@
+Ext.define('Sencha.view.NewProperty', {
+ extend: 'Ext.Panel',
+ xtype: 'newpropertycard',
+
+ config: {
+ iconCls: 'home',
+ title: 'New Property',
+ html: 'Create your property',
+ styleHtmlContent: true
+ }
+});
View
26 www/app/view/Search.js
@@ -0,0 +1,26 @@
+Ext.define('Sencha.view.Search', {
+ extend: 'Ext.Panel',
+ xtype: 'searchcard',
+
+ config: {
+ iconCls: 'search',
+ title: 'Search',
+ html: 'placeholder text',
+ styleHtmlContent: true,
+ items: [{
+ docked: 'top',
+ xtype: 'toolbar',
+ items: [
+ {xtype: 'spacer'},
+ {
+ iconCls: 'maps',
+ iconMask: true,
+ },
+ {
+ iconCls: 'refresh',
+ iconMask: true
+ }
+ ]
+ }]
+ }
+});
View
40 www/app/view/Settings.js
@@ -0,0 +1,40 @@
+Ext.define('Sencha.view.Settings', {
+ extend: 'Ext.form.FormPanel',
+ xtype: 'settingscard',
+ requires: [
+ 'Ext.form.FieldSet',
+ 'Ext.field.Password'
+ ],
+
+ config: {
+ iconCls: 'settings',
+ title: 'Settings',
+ action: 'pingHomeBadge',
+ items: [
+ {
+ docked: 'top',
+ xtype: 'toolbar',
+ title: 'Settings'
+ },
+ {
+ xtype: 'fieldset',
+ title: 'Details',
+ items: [
+ {
+ xtype: 'textfield',
+ name : 'name',
+ label: 'Username'
+ },{
+ xtype: 'passwordfield',
+ name : 'password',
+ label: 'Password'
+ }
+ ],
+ },{
+ xtype: 'button',
+ text: 'save',
+ ui: 'confirm'
+ }
+ ]
+ }
+});
View
14 www/app/view/buttonbar/Colors.js
@@ -0,0 +1,14 @@
+Ext.define('Sencha.view.buttonbar.Colors', {
+ extend: 'Ext.Toolbar',
+ xtype: 'buttoncolors',
+
+ config: {
+ docked: 'bottom',
+ items: [
+ { text: 'normal' },
+ { text: 'action', ui: 'action' },
+ { text: 'confirm', ui: 'confirm' },
+ { text: 'decline', ui: 'decline' }
+ ]
+ }
+});
View
15 www/app/view/buttonbar/IconStyles.js
@@ -0,0 +1,15 @@
+Ext.define('Sencha.view.buttonbar.IconStyles', {
+ extend: 'Ext.Toolbar',
+ xtype: 'buttoniconstyles',
+
+ config: {
+ docked: 'bottom',
+ items: [
+ { iconCls: 'star', iconMask: true, text: 'favorite' },
+ { iconCls: 'star', iconMask: true, ui: 'action' },
+ { iconCls: 'star', iconMask: true, ui: 'confirm' },
+ { iconCls: 'star', iconMask: true, ui: 'decline' },
+ { iconCls: 'star', iconMask: true, ui: 'plain' },
+ ]
+ }
+});
View
16 www/app/view/buttonbar/ShapeColors.js
@@ -0,0 +1,16 @@
+Ext.define('Sencha.view.buttonbar.ShapeColors', {
+ extend: 'Ext.Toolbar',
+ xtype: 'buttonshapecolors',
+
+ config: {
+ docked: 'bottom',
+ items: [
+ { text: 'action', ui: 'action-round' },
+ { text: 'action', ui: 'action-small' },
+ { text: 'confirm', ui: 'confirm-round' },
+ { text: 'confirm', ui: 'confirm-small' },
+ { text: 'decline', ui: 'decline-round' },
+ { text: 'decline', ui: 'decline-small' },
+ ]
+ }
+});
View
15 www/app/view/buttonbar/Shapes.js
@@ -0,0 +1,15 @@
+Ext.define('Sencha.view.buttonbar.Shapes', {
+ extend: 'Ext.Toolbar',
+ xtype: 'buttonshapes',
+
+ config: {
+ docked: 'bottom',
+ items: [
+ { text: 'back', ui: 'back' },
+ { text: 'normal', ui: 'normal' },
+ { text: 'small', ui: 'small' },
+ { text: 'round', ui: 'round' },
+ { text: 'forward', ui: 'forward' },
+ ]
+ }
+});
View
47 www/app/view/home/NavBar.js
@@ -3,29 +3,36 @@ Ext.define("FriendlyRent.view.home.NavBar", {
alias: "widget.home.navbar",
config: {
tabBarPosition: 'bottom',
- defaults: {
- html: 'text',
- styleHtmlContent: true
- },
+
layout: {
- pack: 'center',
+ pack: 'center'
},
+
items: [
- {
- xtype: 'homeMenuBtn'
- },
- {
- xtype: 'searchBtn'
- },
- {
- xtype: 'newBtn'
- },
- {
- xtype: 'aboutBtn'
- },
- {
- xtype: 'settingsBtn'
- }
+ {
+ iconCls: 'home',
+ title: 'Home'
+ },
+ {
+ iconCls: 'search',
+ title: 'Search'
+ // badgeText: '20'
+ }
+ // {
+ // xtype: 'homecard'
+ // },
+ // {
+ // xtype: 'searchcard'
+ // },
+ // {
+ // xtype: 'newpropertycard'
+ // },
+ // {
+ // xtype: 'aboutcard'
+ // },
+ // {
+ // xtype: 'settingscard'
+ // }
]
}
});
View
32 www/app/view/home/Page.js
@@ -1,19 +1,25 @@
Ext.define('FriendlyRent.view.home.Page', {
extend: 'Ext.Panel',
- alias: 'widget.home.page',
- requires: ['FriendlyRent.view.home.TopBar', 'FriendlyRent.view.home.NavBar']
+ alias: 'widget.home_page',
+ xtype: 'homepage',
+
+ // requires: [
+ // 'FriendlyRent.view.home.Topbar'
+ // ],
+
config: {
- layout: 'vbox'
- },
- items: [
- {
- xtype 'home.topbar'
+ defaults: {
+ styleHtmlContent: true,
},
- {
- xtype 'properties.map.content'
- },
- {
- xtype 'home.navbar'
- }
+
+ iconCls: 'search',
+ html: 'placeholder text',
+ styleHtmlContent: true,
+ items: [{
+ docked: 'top',
+ xtype: 'toolbar',
+ title: 'Search'
+ }]
}
});
+
View
22 www/app/view/home/Paige.js
@@ -0,0 +1,22 @@
+Ext.define('Sencha.view.home.Paige', {
+ extend: 'Ext.TabPanel',
+ alias: 'widget.homecard',
+ //xtype: 'homecard',
+
+ config: {
+ iconCls: 'home',
+ title: 'home',
+ defaults: {
+ styleHtmlContent: true
+ },
+ items: [{
+ title: 'TabPanels',
+ scrollable: 'vertical',
+ html: '<p>The TabPanel provides a familiar tabbed interface that enables you to switch between different panels. It comes in two distinct flavours. When the tab bar is top-docked, each tab takes on the appearance of a button with a text label. But if you dock the tab bar to the bottom, then each tab button can be assigned an icon, as well as a text label. The icons are styled with an active and inactive state, which has a native look and feel.</p>'
+ },{
+ title: 'Toolbars',
+ scrollable: 'vertical',
+ html: '<p>Toolbars can be used as a title bar or as a container for buttons, or you can mix and match both of these functions.</p>'
+ }]
+ }
+});
View
35 www/app/view/home/TopBar.js
@@ -1,25 +1,28 @@
Ext.define("FriendlyRent.view.home.TopBar", {
extend: 'Ext.tab.Panel',
- alias: "widget.home.topbar",
+ alias: "widget.home_topbar",
+ xtype: 'hometopbar',
config: {
tabBarPosition: 'top',
- defaults: {
- html: 'text',
- styleHtmlContent: true
- },
layout: {
- pack: 'center',
- },
+ pack: 'center'
+ },
items: [
- {
- xtype: 'logo.image'
- },
- {
- xtype: 'loginBtn'
- },
- {
- xtype: 'listBtn'
- }
+ {
+ iconCls: 'search',
+ title: 'Search'
+ // badgeText: '20'
+ }
+
+ // {
+ // xtype: 'logo.image'
+ // },
+ // {
+ // xtype: 'loginBtn'
+ // },
+ // {
+ // xtype: 'listBtn'
+ // }
]
}
});
View
2 www/app/view/home/about/costs/Page.js
@@ -3,6 +3,8 @@ Ext.define('FriendlyRent.view.home.about.costs.Page', {
alias: 'widget.home.about.costs.page',
config: {
layout: 'vbox'
+ }
+
},
items: [
{
View
4 www/app/view/home/about/faq/Page.js
@@ -2,7 +2,9 @@ Ext.define('FriendlyRent.view.home.about.faq.Page', {
extend: 'Ext.Panel',
alias: 'widget.home.about.faq.page',
config: {
- layout: 'vbox'
+ layout: 'vbox',
+ iconCls: 'info_plain2',
+ iconMask: true
},
items: [
{
View
8 www/app/view/home/btn/About.js
@@ -1,8 +0,0 @@
-Ext.define("FriendlyRent.view.home.btn.About", {
- extend: 'Ext.Button',
- alias: "widget.home.btn.about",
- config: {
- iconCls: 'info_plain2',
- iconMask: true
- }
-});
View
8 www/app/view/home/btn/New.js
@@ -1,8 +0,0 @@
-Ext.define("FriendlyRent.view.home.btn.New", {
- extend: 'Ext.Button',
- alias: "widget.home.btn.new",
- config: {
- iconCls: 'home',
- iconMask: true
- }
-});
View
8 www/app/view/home/btn/Settings.js
@@ -1,8 +0,0 @@
-Ext.define("FriendlyRent.view.home.btn.Settings", {
- extend: 'Ext.Button',
- alias: "widget.home.btn.settings",
- config: {
- iconCls: 'settings',
- iconMask: true
- }
-});
View
12 www/app/view/languages/ComboBox.js
@@ -0,0 +1,12 @@
+
+Ext.define('FriendlyRent.view.languages.ComboBox', {
+ "extends": 'Ext.form.field.ComboBox',
+ config: {
+ renderTo: 'languages',
+ store: 'FriendlyRent.store.Languages',
+ displayField: 'language',
+ queryMode: 'local',
+ emptyText: 'Select a language...',
+ hideLabel: true
+ }
+});
View
2 www/app/view/languages/LangComboBox.js
@@ -0,0 +1,2 @@
+
+
View
2 www/lib/plugins/SliderFieldInput.js → www/app/view/plugins/SliderFieldInput.js
@@ -5,7 +5,7 @@
Ext.define('Ext.field.SliderInput', {
extend : 'Ext.field.Field',
- xtype : 'sliderfieldinput',
+ xtype : 'slider.input',
requires: [
'Ext.slider.Slider'
],
View
2 www/lib/plugins/SliderFieldText.js → www/app/view/plugins/SliderFieldText.js
@@ -1,6 +1,6 @@
Ext.define('Ext.field.SliderText', {
extend : 'Ext.field.Field',
- xtype : 'sliderfieldtext',
+ xtype : 'slider.text',
requires: [
'Ext.slider.Slider'
],
View
43 www/app/view/properties/NavBar.js
@@ -1,31 +1,18 @@
-Ext.define("FriendlyRent.view.properties.list.NavBar", {
- extend: 'Ext.tab.Panel',
- alias: "widget.properties.list.navbar",
+
+Ext.define('FriendlyRent.view.properties.NavBar', {
+ extend: 'FriendlyRent.NavBar',
+ alias: 'widget.properties_navbar',
config: {
- tabBarPosition: 'bottom',
- defaults: {
- html: 'text',
- styleHtmlContent: true
- },
- layout: {
- pack: 'center',
- },
items: [
- {
- xtype: 'homeMenuBtn'
- },
- {
- xtype: 'searchBtn'
- },
- {
- xtype: 'newBtn'
- },
- {
- xtype: 'aboutBtn'
- },
- {
- xtype: 'settingsBtn'
- }
- ]
+ {
+ xtype: 'btn_search_properties'
+ }, {
+ xtype: 'btn_new_property'
+ }, {
+ xtype: 'btn_about'
+ }, {
+ xtype: 'btn_settings'
+ }
+ ]
}
-});
+});
View
27 www/app/view/properties/list/Content.js
@@ -1,20 +1,17 @@
+
Ext.define('FriendlyRent.view.properties.list.Content', {
extend: 'Ext.Panel',
- alias: 'widget.properties.list.content',
+ alias: 'widget.properties.list.content',
config: {
layout: 'vbar',
- items: [{
- [
- {
- xtype: 'properties.list.item'
- },
- {
- xtype: 'properties.list.item'
- }
- {
- xtype: 'properties.list.item'
- }
- ]
- }]
+ items: [
+ {
+ xtype: 'properties_list_item'
+ }, {
+ xtype: 'properties_list_item'
+ }, {
+ xtype: 'properties_list_item'
+ }
+ ]
}
-});
+});
View
24 www/app/view/properties/list/Item.js
@@ -1,17 +1,15 @@
+
Ext.define('FriendlyRent.view.properties.list.Item', {
extend: 'Ext.Panel',
- alias: 'widget.properties.list.item',
+ alias: 'widget.properties_list_item',
config: {
- layout: 'hbox',
- items: [{
- [
- {
- xtype: 'properties.list.item.image'
- },
- {
- xtype: 'properties.list.item.content'
- }
- ]
- }]
+ layout: 'hbox',
+ items: [
+ {
+ xtype: 'properties_list_item_image'
+ }, {
+ xtype: 'properties_list_item_content'
+ }
+ ]
}
-});
+});
View
35 www/app/view/properties/list/TopBar.js
@@ -1,25 +1,16 @@
-Ext.define("FriendlyRent.view.home.TopBar", {
- extend: 'Ext.Panel',
- alias: "widget.home.topbar",
+
+Ext.define('FriendlyRent.view.properties.list.TopBar', {
+ extend: 'FriendlyRent.TopBar',
+ alias: 'widget.properties_list_topbar',
config: {
- tabBarPosition: 'top',
- defaults: {
- html: 'text',
- styleHtmlContent: true
- },
- layout: {
- pack: 'center',
- },
items: [
- {
- xtype: 'logo'
- },
- {
- xtype: 'loginBtn'
- },
- {
- xtype: 'mapBtn'
- }
- ]
+ {
+ xtype: 'logo'
+ }, {
+ xtype: 'btn_login'
+ }, {
+ xtype: 'btn_map'
+ }
+ ]
}
-});
+});
View
31 www/app/view/properties/list/item/Content.js
@@ -1,17 +1,26 @@
+
Ext.define('FriendlyRent.view.properties.list.item.Content', {
extend: 'Ext.List',
- alias: 'widget.properties.list.item.content',
+ alias: 'widget.properties_list_item_content',
config: {
- xtype: 'list',
- itemTpl: '{title}',
- data: [
- { title: 'Beautiful title' },
- { title: '6500 DKK/month' },
- { title: '2 rooms apartment' },
- { title: 'Furnished' },
- { title: '55 m2' },
- { title: 'Valby, Copenhagen, DK' },
- { title: '12/5/2012 - 12/5/2013' }
+ xtype: 'list',
+ itemTpl: '{title}',
+ data: [
+ {
+ title: 'Beautiful title'
+ }, {
+ title: '6500 DKK/month'
+ }, {
+ title: '2 rooms apartment'
+ }, {
+ title: 'Furnished'
+ }, {
+ title: '55 m2'
+ }, {
+ title: 'Valby, Copenhagen, DK'
+ }, {
+ title: '12/5/2012 - 12/5/2013'
+ }
]
}
});
View
9 www/app/view/properties/list/item/Image.js
@@ -1,9 +1,10 @@
+
Ext.define('FriendlyRent.view.properties.list.item.Image', {
extend: 'Ext.Image',
- alias: 'widget.properties.list.item.image',
+ alias: 'widget.properties_list_item_image',
config: {
- xtype: 'image',
- src: 'http://www.dummyimage.com/240x200/000/fff',
- flex: 1
+ xtype: 'image',
+ src: 'http://www.dummyimage.com/240x200/000/fff',
+ flex: 1
}
});
View
17 www/app/view/properties/map/Content.js
@@ -1,11 +1,14 @@
+
Ext.define('FriendlyRent.view.properties.map.Content', {
extend: 'Ext.Map',
- alias: 'widget.properties.map.content',
- layout: 'fit',
+ alias: 'widget.properties_map_content',
config: {
- items: [{
- xtype: 'map',
- useCurrentLocation: true
- }]
+ layout: 'fit',
+ items: [
+ {
+ xtype: 'map',
+ useCurrentLocation: true
+ }
+ ]
}
-});
+});
View
16 www/app/view/properties/map/quickview/Overlay.js
@@ -1,15 +1,15 @@
+
Ext.define('FriendlyRent.view.properties.map.quickview.Overlay', {
extend: 'Ext.Panel',
- alias: 'widget.properties.map.quickview.overlay',
+ alias: 'widget.properties_map_quickview_overlay',
config: {
layout: 'vbar',
items: [
- {
- xtype: 'property.image'
- },
- {
- xtype: 'property.info'
- }
+ {
+ xtype: 'property.image'
+ }, {
+ xtype: 'property.info'
+ }
]
}
-});
+});
View
20 www/app/view/property/edit/NavBar.js
@@ -0,0 +1,20 @@
+
+Ext.define('FriendlyRent.view.property.edit.NavBar', {
+ extend: 'FriendlyRent.NavBar',
+ alias: 'property_edit_navbar',
+ config: {
+ items: [
+ {
+ xtype: 'btn_location'
+ }, {
+ xtype: 'btn_details'
+ }, {
+ xtype: 'btn_period'
+ }, {
+ xtype: 'btn_photos'
+ }, {
+ xtype: 'btn_more'
+ }
+ ]
+ }
+});
View
8 www/app/view/property/edit/TopBar.js
@@ -0,0 +1,8 @@
+
+Ext.define('FriendlyRent.view.property.edit.TopBar', {
+ extend: 'FriendlyRent.TopBar',
+ alias: 'widget.property_edit_topbar',
+ config: {
+ items: [{}]
+ }
+});
View
15 www/app/view/property/edit/contact_info/Content.js
@@ -0,0 +1,15 @@
+
+Ext.define('FriendlyRent.view.property.edit.contact_info.Content', {
+ extend: 'Ext.Panel',
+ alias: 'widget.property.edit.contact_info.content',
+ config: {
+ layout: 'vbar',
+ items: [
+ {
+ html: 'Contact info'
+ }, {
+ html: 'Telephone'
+ }
+ ]
+ }
+});
View
17 www/app/view/property/edit/contact_info/Page.js
@@ -0,0 +1,17 @@
+
+Ext.define('FriendlyRent.view.property.edit.contact_info.Page', {
+ extend: 'Ext.Panel',
+ alias: 'widget.property_edit_contact_info_page',
+ config: {
+ layout: 'vbox',
+ items: [
+ {
+ xtype: 'property_edit_topbar'
+ }, {
+ xtype: 'property_edit_contact_info_content'
+ }, {
+ xtype: 'property_edit_navbar'
+ }
+ ]
+ }
+});
View
15 www/app/view/property/edit/costs/Content.js
@@ -0,0 +1,15 @@
+
+Ext.define('FriendlyRent.view.property.edit.costs.Content', {
+ extend: 'Ext.Panel',
+ alias: 'widget.property_edit_costs_content',
+ config: {
+ layout: 'vbar',
+ items: [
+ {
+ html: 'Contact info'
+ }, {
+ html: 'Telephone'
+ }
+ ]
+ }
+});
View
17 www/app/view/property/edit/costs/Page.js
@@ -0,0 +1,17 @@
+
+Ext.define('FriendlyRent.view.property.edit.costs.Page', {
+ extend: 'Ext.Panel',
+ alias: 'widget.property_edit_costs_page',
+ config: {
+ layout: 'vbox',
+ items: [
+ {
+ xtype: 'property_edit_topbar'
+ }, {
+ xtype: 'property_edit_costs_content'
+ }, {
+ xtype: 'property_edit_navbar'
+ }
+ ]
+ }
+});
View
15 www/app/view/property/edit/description/Content.js
@@ -0,0 +1,15 @@
+
+Ext.define('FriendlyRent.view.property.description.Content', {
+ extend: 'Ext.Panel',
+ alias: 'widget.property_edit_description_content',
+ config: {
+ layout: 'vbar',
+ items: [
+ {
+ html: 'Description'
+ }, {
+ html: 'Auto-gen Description'
+ }
+ ]
+ }
+});
View
17 www/app/view/property/edit/description/Page.js
@@ -0,0 +1,17 @@
+
+Ext.define('FriendlyRent.view.property.edit.description.Page', {
+ extend: 'Ext.Panel',
+ alias: 'widget.property_edit_description_page',
+ config: {
+ layout: 'vbox',
+ items: [
+ {
+ xtype: 'property_edit_topbar'
+ }, {
+ xtype: 'property_edit_description_content'
+ }, {
+ xtype: 'property_edit_navbar'
+ }
+ ]
+ }
+});
View
35 www/app/view/property/edit/details/NavBar.js
@@ -1,35 +0,0 @@
-// Shared by all Property Details pages: Simply set the current Item
-Ext.define("FriendlyRent.view.property.details.NavBar", {
- extend: 'Ext.tab.Panel',
- alias: "registration.property.details.navbar",
- config: {
- tabBarPosition: 'bottom',
- defaults: {
- html: 'text',
- styleHtmlContent: true
- },
- layout: {
- pack: 'center',
- },
- items: [
- {
- xtype: 'editMenuBtn'
- },
- {
- xtype: 'locationBtn'
- },
- {
- xtype: 'detailsBtn'
- },
- {
- xtype: 'periodBtn'
- },
- {
- xtype: 'photoBtn'
- },
- {
- xtype: 'moreBtn'
- }
- ]
- }
-});
View
0 www/app/view/property/edit/details/TopBar.js
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
15 www/app/view/property/edit/details/contact_info/Content.js
@@ -1,15 +0,0 @@
-Ext.define('FriendlyRent.view.property.details.contact_info.Content', {
- extend: 'Ext.Panel',
- alias: 'widget.property.details.contact_info.content',
- config: {
- layout: 'vbar',
- items: [
- {
- html: 'Contact info'
- },
- {
- html: 'Telephone'
- }
- ]
- }
-});
View
18 www/app/view/property/edit/details/contact_info/Page.js
@@ -1,18 +0,0 @@
-Ext.define('FriendlyRent.view.property.edit.details.contact_info.Page', {
- extend: 'Ext.Panel',
- alias: 'widget.property.edit.details.contact_info.page',
- config: {
- layout: 'vbox'
- },
- items: [
- {
- xtype 'property.edit.details.topbar'
- },
- {
- xtype 'property.edit.details.contact_info.content'
- },
- {
- xtype 'property.edit.details.navbar'
- }
- }
-});
View
15 www/app/view/property/edit/details/description/Content.js
@@ -1,15 +0,0 @@
-Ext.define('FriendlyRent.view.property.details.description.Content', {
- extend: 'Ext.Panel',
- alias: 'widget.property.details.description.content',
- config: {
- layout: 'vbar',
- items: [
- {
- html: 'Description'
- },
- {
- html: 'Auto-gen Description'
- }
- ]
- }
-});