Permalink
Browse files

little progress

  • Loading branch information...
1 parent a8b20fc commit 1527a50621465930bb800766f575553035b5e457 @kristianmandrup committed Jul 2, 2012
Showing with 969 additions and 225 deletions.
  1. +18 −0 www/Content.js
  2. +30 −0 www/Flags.js
  3. +8 −4 www/Guardfile
  4. +42 −0 www/Home.js
  5. +10 −0 www/Location.js
  6. +11 −0 www/Logo.js
  7. +20 −0 www/NavBar.js
  8. +39 −0 www/Navigation.js
  9. +19 −0 www/Page.js
  10. +14 −0 www/Radius.js
  11. +21 −0 www/TopBar.js
  12. +36 −39 www/app.js
  13. +9 −1 www/app.json
  14. +42 −0 www/app/controller/Home.js
  15. +20 −7 www/app/view/home/Flags.js
  16. +4 −3 www/app/view/home/Logo.js
  17. +25 −3 www/app/view/home/Navigation.js
  18. +7 −1 www/app/view/home/Page.js
  19. +2 −23 www/app/view/search/Content.js
  20. +7 −14 www/app/view/search/NavBar.js
  21. +15 −13 www/app/view/search/Page.js
  22. +9 −2 www/app/view/search/TopBar.js
  23. +1 −1 www/app/view/search/criteria/Location.js
  24. +6 −3 www/app/view/search/criteria/Radius.js
  25. +166 −0 www/lib/plugins/SliderFieldInput.js
  26. +138 −0 www/lib/plugins/SliderFieldText.js
  27. +1 −1 www/resources/css/app.css
  28. BIN www/resources/images/DanishFlag.png
  29. BIN www/resources/images/EnglishFlag.png
  30. BIN www/resources/images/FriendlyRent.png
  31. BIN www/resources/images/FriendlyRent_big.png
  32. BIN www/resources/images/{friendly_rent_trans_48.png → FriendlyRent_icon.png}
  33. BIN www/resources/images/{FriendlyRentTrans.png → FriendlyRent_small.png}
  34. BIN www/resources/images/button_icons/search_white.png
  35. BIN www/resources/images/login.png
  36. +53 −17 www/resources/sass/app.scss
  37. BIN www/sdk/resources/themes/images/default/pictos/search_white.png
  38. +8 −5 www/src/app.coffee
  39. +28 −0 www/src/app/controller/Home.coffee
  40. +20 −9 www/src/app/view/home/Flags.coffee
  41. +7 −6 www/src/app/view/home/Logo.coffee
  42. +28 −5 www/src/app/view/home/Navigation.coffee
  43. +12 −1 www/src/app/view/home/Page.coffee
  44. +5 −30 www/src/app/view/search/Content.coffee
  45. +5 −15 www/src/app/view/search/NavBar.coffee
  46. +18 −12 www/src/app/view/search/Page.coffee
  47. +11 −3 www/src/app/view/search/TopBar.coffee
  48. +1 −1 www/src/app/view/search/criteria/Location.coffee
  49. +6 −6 www/src/app/view/search/criteria/Radius.coffee
  50. +47 −0 www/src/app/view/search/sandbox.txt
View
@@ -0,0 +1,18 @@
+
+Ext.define('FriendlyRent.view.search.Content', {
+ extend: 'Ext.Panel',
+ alias: 'widget.search_content',
+ requires: ['FriendlyRent.view.search.criteria.Location', 'FriendlyRent.view.search.criteria.Radius'],
+ config: {
+ layout: 'vbox',
+ items: [
+ {
+ xtype: 'search_criteria_location',
+ name: 'location'
+ }, {
+ xtype: 'search_criteria_radius',
+ name: 'radius'
+ }
+ ]
+ }
+});
View
@@ -0,0 +1,30 @@
+
+Ext.define('FriendlyRent.view.home.Flags', {
+ extend: 'Ext.Panel',
+ alias: 'widget.home_flags',
+ config: {
+ layout: {
+ type: 'hbox',
+ pack: 'center',
+ align: 'middle'
+ },
+ items: [
+ {
+ xtype: 'image',
+ src: 'resources/images/EnglishFlag.png',
+ id: 'english_flag',
+ height: 32,
+ width: 32
+ }, {
+ xtype: 'spacer',
+ width: 12
+ }, {
+ xtype: 'image',
+ id: 'danish_flag',
+ src: 'resources/images/DanishFlag.png',
+ height: 32,
+ width: 32
+ }
+ ]
+ }
+});
View
@@ -5,6 +5,11 @@ guard 'coffeescript', :output => 'app', :bare => true do
watch %r{^src/app/(.+\.coffee)$}
end
+# app
+guard 'coffeescript', :output => '.', :bare => true do
+ watch %r{^src/.+\.coffee$}
+end
+
# lib
guard 'coffeescript', :output => 'lib', :bare => true do
watch %r{^src/lib/(.+\.coffee)$}
@@ -19,10 +24,9 @@ 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
+config = File.expand_path "resources/sass/config.rb", __FILE__
+path = File.dirname(__FILE__) # File.expand_path "../..", config
guard 'compass', :project_path => path, :configuration_file => config do
- watch %r{resources/.+\.scss}
+ watch %r{^resources/(.+\.scss)$}
end
View
@@ -0,0 +1,42 @@
+
+Ext.define('FriendlyRent.controller.Home', {
+ extend: 'Ext.app.Controller',
+ config: {
+ refs: {
+ searchButton: 'button[action=search]',
+ newPropertyButton: 'button[action=newProperty]',
+ danishButton: '#danish_flag',
+ englishButton: '#english_flag'
+ },
+ control: {
+ searchButton: {
+ tap: 'onTapSearch'
+ },
+ newPropertyButton: {
+ tap: 'onTapNewProperty'
+ },
+ danishButton: {
+ tap: 'onSelectDanishLang'
+ },
+ englishButton: {
+ tap: 'onSelectEnglishLang'
+ }
+ }
+ },
+ onTapSearch: function() {
+ var search_page;
+ console.log('Go to Search');
+ search_page = Ext.create('FriendlyRent.view.search.Page');
+ Ext.Viewport.removeAt(0);
+ return Ext.Viewport.add(search_page);
+ },
+ onTapNewProperty: function() {
+ return console.log('Go to New Property');
+ },
+ onSelectDanishLang: function() {
+ return console.log('Select Danish lang');
+ },
+ onSelectEnglishLang: function() {
+ return console.log('Select English lang');
+ }
+});
View
@@ -0,0 +1,10 @@
+
+Ext.define('FriendlyRent.view.search.criteria.Location', {
+ extend: 'Ext.field.Search',
+ alias: 'widget.search_criteria_location',
+ config: {
+ name: 'location',
+ label: 'Location',
+ required: true
+ }
+});
View
@@ -0,0 +1,11 @@
+
+Ext.define('FriendlyRent.view.home.Logo', {
+ extend: 'Ext.Img',
+ alias: 'widget.home_logo',
+ requires: 'Ext.Img',
+ config: {
+ src: 'resources/images/FriendlyRent_big.png',
+ height: 240,
+ width: 240
+ }
+});
View
@@ -0,0 +1,20 @@
+
+Ext.define('FriendlyRent.view.search.NavBar', {
+ extend: 'FriendlyRent.NavBar',
+ alias: 'widget.search_navbar',
+ config: {
+ items: [
+ {
+ html: 'menu'
+ }, {
+ text: 'search',
+ iconCls: 'search',
+ iconMask: true
+ }, {
+ text: 'property',
+ iconCls: 'home',
+ iconMask: true
+ }
+ ]
+ }
+});
View
@@ -0,0 +1,39 @@
+
+Ext.define('FriendlyRent.view.home.Navigation', {
+ extend: 'Ext.Panel',
+ alias: 'widget.home_navigation',
+ config: {
+ layout: {
+ type: 'vbox',
+ align: 'center'
+ },
+ items: [
+ {
+ xtype: 'home_logo'
+ }, {
+ xtype: 'spacer',
+ height: 20
+ }, {
+ xtype: 'button',
+ ui: 'orange',
+ iconCls: 'search',
+ itemId: 'searchBtn',
+ id: 'searchBtn',
+ action: 'search',
+ iconMask: true,
+ text: 'Search home',
+ cls: 'main-button'
+ }, {
+ xtype: 'button',
+ ui: 'purple',
+ iconCls: 'home',
+ itemId: 'newBtn',
+ id: 'newBtn',
+ action: 'newProperty',
+ iconMask: true,
+ text: 'New property',
+ cls: 'main-button black'
+ }
+ ]
+ }
+});
View
@@ -0,0 +1,19 @@
+
+Ext.define('FriendlyRent.view.search.Page', {
+ extend: 'Ext.Panel',
+ alias: 'widget.search_page',
+ requires: ['FriendlyRent.view.search.TopBar', 'FriendlyRent.view.search.Content', 'FriendlyRent.view.search.NavBar'],
+ config: {
+ items: [
+ {
+ xtype: 'search_topbar',
+ cls: 'nav-bar'
+ }, {
+ xtype: 'search_content'
+ }, {
+ xtype: 'search_navbar',
+ cls: 'nav-bar'
+ }
+ ]
+ }
+});
View
@@ -0,0 +1,14 @@
+
+Ext.define('FriendlyRent.view.search.criteria.Radius', {
+ extend: 'Ext.field.SliderInput',
+ alias: 'widget.search_criteria_radius'
+});
+
+({
+ config: {
+ value: 5,
+ minValue: 1,
+ maxValue: 50,
+ label: 'Radius'
+ }
+});
View
@@ -0,0 +1,21 @@
+
+Ext.define('FriendlyRent.view.search.TopBar', {
+ extend: 'FriendlyRent.NavBar',
+ alias: 'widget.search_topbar',
+ config: {
+ docked: 'top',
+ items: [
+ {
+ xtype: 'spacer'
+ }, {
+ iconCls: 'list',
+ iconMask: true,
+ text: 'list'
+ }, {
+ iconCls: 'globe2',
+ iconMask: true,
+ text: 'map'
+ }
+ ]
+ }
+});
View
@@ -1,40 +1,37 @@
-//(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'
- },
- 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'
- },
- launch: function() {
- var page;
- console.log("launch");
- page = Ext.create("FriendlyRent.view.registration.landlord.why_us.Page");
- return Ext.Viewport.add(page);
- },
- onUpdated: function() {
- 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);
+Ext.application({
+ name: 'FriendlyRent',
+ requires: ["Ext.MessageBox"],
+ models: [],
+ stores: [],
+ controllers: ["FriendlyRent.controller.Home"],
+ views: ["FriendlyRent.view.home.Page", "FriendlyRent.view.search.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'
+ },
+ 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'
+ },
+ launch: function() {
+ var home_page;
+ console.log('launch');
+ home_page = Ext.create('FriendlyRent.view.home.Page');
+ return Ext.Viewport.add(home_page);
+ },
+ onUpdated: function() {
+ 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();
+ }
+ });
+ }
+});
View
@@ -48,7 +48,15 @@
{
"path": "lib/plugins/NavBar.js"
},
-
+ {
+ "path": "lib/plugins/TopBar.js"
+ },
+ {
+ "path": "lib/plugins/SliderFieldInput.js"
+ },
+ {
+ "path": "lib/plugins/SliderFieldText.js"
+ },
// {
// "path": "lib/deftjs/deft.js" // or deft-debug.js
// },
View
@@ -0,0 +1,42 @@
+
+Ext.define('FriendlyRent.controller.Home', {
+ extend: 'Ext.app.Controller',
+ config: {
+ refs: {
+ searchButton: 'button[action=search]',
+ newPropertyButton: 'button[action=newProperty]',
+ danishButton: '#danish_flag',
+ englishButton: '#english_flag'
+ },
+ control: {
+ searchButton: {
+ tap: 'onTapSearch'
+ },
+ newPropertyButton: {
+ tap: 'onTapNewProperty'
+ },
+ danishButton: {
+ tap: 'onSelectDanishLang'
+ },
+ englishButton: {
+ tap: 'onSelectEnglishLang'
+ }
+ }
+ },
+ onTapSearch: function() {
+ var search_page;
+ console.log('Go to Search');
+ search_page = Ext.create('FriendlyRent.view.search.Page');
+ Ext.Viewport.removeAt(0);
+ return Ext.Viewport.add(search_page);
+ },
+ onTapNewProperty: function() {
+ return console.log('Go to New Property');
+ },
+ onSelectDanishLang: function() {
+ return console.log('Select Danish lang');
+ },
+ onSelectEnglishLang: function() {
+ return console.log('Select English lang');
+ }
+});
Oops, something went wrong.

0 comments on commit 1527a50

Please sign in to comment.