Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding additional requires. Fixing car listings template. Clean-up.

  • Loading branch information...
commit ffa13b3e1f650bd8e312c8dabed0a9261a27b51f 1 parent 816dbf8
@exsurgo exsurgo authored
Showing with 392 additions and 221 deletions.
  1. +4 −0 ext42/Basic/CascadingSelect/app.js
  2. +3 −0  ext42/Basic/CascadingSelect/metadata/Application
  3. +4 −0 ext42/Basic/CountdownTimer/app.js
  4. +3 −0  ext42/Basic/CountdownTimer/metadata/Application
  5. +4 −0 ext42/Basic/LoginRegister/app.js
  6. +3 −0  ext42/Basic/LoginRegister/metadata/Application
  7. +4 −0 ext42/Basic/RightToLeft/app.js
  8. +4 −0 ext42/StarterApps/CRUD/app.js
  9. +1 −1  ext42/StarterApps/CRUD/app/controller/Records.js
  10. +3 −0  ext42/StarterApps/CRUD/metadata/Application
  11. +1 −1  ext42/StarterApps/CRUD/metadata/controller/Records
  12. +169 −8 ext42/StarterApps/CarListings/app/store/CarDataStore.js
  13. +0 −19 ext42/StarterApps/CarListings/app/view/Viewport.js
  14. +0 −130 ext42/StarterApps/CarListings/data/cars.json
  15. +132 −17 ext42/StarterApps/CarListings/metadata/store/CarDataStore
  16. +4 −0 ext42/StarterApps/TaskList/app.js
  17. +1 −1  ext42/StarterApps/TaskList/app/controller/Tasks.js
  18. +3 −0  ext42/StarterApps/TaskList/metadata/Application
  19. +1 −1  ext42/StarterApps/TaskList/metadata/controller/Tasks
  20. +2 −2 touch22/Basic/LoginRegister/app/controller/Account.js
  21. +2 −2 touch22/Basic/LoginRegister/metadata/controller/Account
  22. +4 −0 touch22/StarterApps/FeedViewer/app.js
  23. +3 −0  touch22/StarterApps/FeedViewer/metadata/Application
  24. +1 −2  touch22/StarterApps/LocationManager/app/controller/Locations.js
  25. +1 −2  touch22/StarterApps/LocationManager/metadata/controller/Locations
  26. +2 −3 touch22/StarterApps/TaskList/app/controller/Tasks.js
  27. +2 −3 touch22/StarterApps/TaskList/metadata/controller/Tasks
  28. +2 −2 touch23/Basic/LoginRegister/app/controller/Account.js
  29. +2 −2 touch23/Basic/LoginRegister/metadata/controller/Account
  30. +3 −0  touch23/StarterApps/FeedViewer/app.js
  31. +3 −0  touch23/StarterApps/FeedViewer/metadata/Application
  32. +1 −2  touch23/StarterApps/LocationManager/app/controller/Locations.js
  33. +1 −2  touch23/StarterApps/LocationManager/metadata/controller/Locations
  34. +2 −3 touch23/StarterApps/TaskList/app/controller/Tasks.js
  35. +17 −18 touch23/StarterApps/TaskList/metadata/controller/Tasks
View
4 ext42/Basic/CascadingSelect/app.js
@@ -20,6 +20,10 @@ Ext.Loader.setConfig({
Ext.application({
+
+ requires: [
+ 'Ext.window.MessageBox'
+ ],
models: [
'Car'
],
View
3  ext42/Basic/CascadingSelect/metadata/Application
@@ -13,6 +13,9 @@
"Car"
],
"name": "CascadingSelect",
+ "requires": [
+ "Ext.window.MessageBox"
+ ],
"stores": [
"Cars"
],
View
4 ext42/Basic/CountdownTimer/app.js
@@ -20,6 +20,10 @@ Ext.Loader.setConfig({
Ext.application({
+
+ requires: [
+ 'Ext.window.MessageBox'
+ ],
views: [
'MainViewport'
],
View
3  ext42/Basic/CountdownTimer/metadata/Application
@@ -10,6 +10,9 @@
"Countdown"
],
"name": "MyApp",
+ "requires": [
+ "Ext.window.MessageBox"
+ ],
"views": [
"MainViewport"
]
View
4 ext42/Basic/LoginRegister/app.js
@@ -20,6 +20,10 @@ Ext.Loader.setConfig({
Ext.application({
+
+ requires: [
+ 'Ext.window.MessageBox'
+ ],
views: [
'MainView',
'LoginForm',
View
3  ext42/Basic/LoginRegister/metadata/Application
@@ -10,6 +10,9 @@
"Account"
],
"name": "MyApp",
+ "requires": [
+ "Ext.window.MessageBox"
+ ],
"views": [
"MainView",
"LoginForm",
View
4 ext42/Basic/RightToLeft/app.js
@@ -20,6 +20,10 @@ Ext.Loader.setConfig({
Ext.application({
+
+ requires: [
+ 'Ext.rtl.*'
+ ],
stores: [
'Records'
],
View
4 ext42/StarterApps/CRUD/app.js
@@ -20,6 +20,10 @@ Ext.Loader.setConfig({
Ext.application({
+
+ requires: [
+ 'Ext.window.MessageBox'
+ ],
models: [
'Record'
],
View
2  ext42/StarterApps/CRUD/app/controller/Records.js
@@ -139,7 +139,7 @@ Ext.define('MyApp.controller.Records', {
var me = this;
// Confirm this delete
- Ext.MessageBox.confirm('Confirm', 'Are you sure you want to delete this record?', function(btn) {
+ Ext.Msg.confirm('Confirm', 'Are you sure you want to delete this record?', function(btn) {
// User confirmed yes
if (btn == 'yes') {
View
3  ext42/StarterApps/CRUD/metadata/Application
@@ -13,6 +13,9 @@
"Record"
],
"name": "MyApp",
+ "requires": [
+ "Ext.window.MessageBox"
+ ],
"stores": [
"Records"
],
View
2  ext42/StarterApps/CRUD/metadata/controller/Records
@@ -220,7 +220,7 @@
"var me = this;\r",
"\r",
"// Confirm this delete\r",
- "Ext.MessageBox.confirm('Confirm', 'Are you sure you want to delete this record?', function(btn) {\r",
+ "Ext.Msg.confirm('Confirm', 'Are you sure you want to delete this record?', function(btn) {\r",
"\r",
" // User confirmed yes\r",
" if (btn == 'yes') {\r",
View
177 ext42/StarterApps/CarListings/app/store/CarDataStore.js
@@ -18,8 +18,7 @@ Ext.define('MyApp.store.CarDataStore', {
requires: [
'MyApp.model.CarData',
- 'Ext.data.proxy.Ajax',
- 'Ext.data.reader.Json'
+ 'Ext.data.proxy.Memory'
],
constructor: function(cfg) {
@@ -30,12 +29,174 @@ Ext.define('MyApp.store.CarDataStore', {
model: 'MyApp.model.CarData',
storeId: 'MyJsonStore',
proxy: {
- type: 'ajax',
- url: 'data/cars.json',
- reader: {
- type: 'json',
- root: 'data'
- }
+ type: 'memory',
+ data: [
+ {
+ img: '2004_Porsche_911_Carrera_type_997.jpg',
+ manufacturer: 'Porsche',
+ model: '911',
+ price: 135000,
+ 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
+ }
+ ],
+ wiki: 'http://en.wikipedia.org/wiki/Porsche_997'
+ },
+ {
+ img: '250px-Nissan_GT-R.jpg',
+ manufacturer: 'Nissan',
+ model: 'GT-R',
+ price: 80000,
+ 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
+ }
+ ],
+ wiki: 'http://en.wikipedia.org/wiki/Nissan_Gt-r'
+ },
+ {
+ img: '250px-BMW_M3_E92.jpg',
+ manufacturer: 'BMW',
+ model: 'M3',
+ price: 60500,
+ 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
+ }
+ ],
+ wiki: 'http://en.wikipedia.org/wiki/Bmw_m3'
+ },
+ {
+ img: '250px-Audi_S5.jpg',
+ manufacturer: 'Audi',
+ model: 'S5',
+ price: 53000,
+ 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
+ }
+ ],
+ wiki: 'http://en.wikipedia.org/wiki/Audi_S5#Audi_S5'
+ },
+ {
+ img: '250px-2007_Audi_TT_Coupe.jpg',
+ manufacturer: 'Audi',
+ model: 'TT',
+ price: 40000,
+ 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
+ }
+ ],
+ wiki: 'http://en.wikipedia.org/wiki/Audi_TT'
+ }
+ ]
}
}, cfg)]);
}
View
19 ext42/StarterApps/CarListings/app/view/Viewport.js
@@ -1,19 +0,0 @@
-/*
- * File: app/view/Viewport.js
- *
- * This file was generated by Sencha Architect version 2.2.0.
- * http://www.sencha.com/products/architect/
- *
- * This file requires use of the Ext JS 4.1.x library, under independent license.
- * License of Sencha Architect does not include license for Ext JS 4.1.x. For more
- * details see http://www.sencha.com/license or contact license@sencha.com.
- *
- * This file will be auto-generated each and everytime you save your project.
- *
- * Do NOT hand edit this file.
- */
-
-Ext.define('MyApp.view.Viewport', {
- extend: 'MyApp.view.CarListings',
- renderTo: Ext.getBody()
-});
View
130 ext42/StarterApps/CarListings/data/cars.json
@@ -1,130 +0,0 @@
-{
- "data" : [{
- "img" : "2004_Porsche_911_Carrera_type_997.jpg",
- "manufacturer" : "Porsche",
- "model" : "911",
- "price" : 135000,
- "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
- }],
- "wiki" : "http://en.wikipedia.org/wiki/Porsche_997"
- },{
- "img" : "250px-Nissan_GT-R.jpg",
- "manufacturer" : "Nissan",
- "model" : "GT-R",
- "price" : 80000,
- "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
- }
- ],
- "wiki" : "http://en.wikipedia.org/wiki/Nissan_Gt-r"
- },{
- "img" : "250px-BMW_M3_E92.jpg",
- "manufacturer" : "BMW",
- "model" : "M3",
- "price" : 60500,
- "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
- }
- ],
- "wiki" : "http://en.wikipedia.org/wiki/Bmw_m3"
- },{
- "img" : "250px-Audi_S5.jpg",
- "manufacturer" : "Audi",
- "model" : "S5",
- "price" : 53000,
- "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
- }
- ],
- "wiki" : "http://en.wikipedia.org/wiki/Audi_S5#Audi_S5"
- },{
- "img" : "250px-2007_Audi_TT_Coupe.jpg",
- "manufacturer" : "Audi",
- "model" : "TT",
- "price" : 40000,
- "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
- }
- ],
- "wiki" : "http://en.wikipedia.org/wiki/Audi_TT"
- }]
-}
View
149 ext42/StarterApps/CarListings/metadata/store/CarDataStore
@@ -14,30 +14,145 @@
"designerId": "0315c038-557a-4e0a-8263-df261c02f018",
"cn": [
{
- "type": "Ext.data.proxy.Ajax",
+ "type": "Ext.data.proxy.Memory",
"reference": {
"name": "proxy",
"type": "object"
},
"codeClass": null,
"userConfig": {
- "url": "data/cars.json"
+ "data": [
+ "[{ \r",
+ " \"img\" : \"2004_Porsche_911_Carrera_type_997.jpg\",\r",
+ " \"manufacturer\" : \"Porsche\",\r",
+ " \"model\" : \"911\",\r",
+ " \"price\" : 135000,\r",
+ " \"quality\" : [{ \r",
+ " \"name\" : \"overall\",\r",
+ " \"rating\" : 1\r",
+ " },{ \r",
+ " \"name\" : \"mechanical\",\r",
+ " \"rating\" : 4\r",
+ " },{ \r",
+ " \"name\" : \"powertrain\",\r",
+ " \"rating\" : 2\r",
+ " },{ \r",
+ " \"name\" : \"body\",\r",
+ " \"rating\" : 4\r",
+ " },{ \r",
+ " \"name\" : \"interior\",\r",
+ " \"rating\" : 3\r",
+ " },{ \r",
+ " \"name\" : \"accessories\",\r",
+ " \"rating\" : 2\r",
+ " }],\r",
+ " \"wiki\" : \"http://en.wikipedia.org/wiki/Porsche_997\"\r",
+ "},{ \r",
+ " \"img\" : \"250px-Nissan_GT-R.jpg\",\r",
+ " \"manufacturer\" : \"Nissan\",\r",
+ " \"model\" : \"GT-R\",\r",
+ " \"price\" : 80000,\r",
+ " \"quality\" : [{ \r",
+ " \"name\" : \"overall\",\r",
+ " \"rating\" : 2\r",
+ " },\r",
+ " { \"name\" : \"mechanical\",\r",
+ " \"rating\" : 3\r",
+ " },\r",
+ " { \"name\" : \"powertrain\",\r",
+ " \"rating\" : 5\r",
+ " },\r",
+ " { \"name\" : \"body\",\r",
+ " \"rating\" : 4\r",
+ " },\r",
+ " { \"name\" : \"interior\",\r",
+ " \"rating\" : 2\r",
+ " },\r",
+ " { \"name\" : \"accessories\",\r",
+ " \"rating\" : 2\r",
+ " }\r",
+ " ],\r",
+ " \"wiki\" : \"http://en.wikipedia.org/wiki/Nissan_Gt-r\"\r",
+ "},{ \r",
+ " \"img\" : \"250px-BMW_M3_E92.jpg\",\r",
+ " \"manufacturer\" : \"BMW\",\r",
+ " \"model\" : \"M3\",\r",
+ " \"price\" : 60500,\r",
+ " \"quality\" : [ { \"name\" : \"overall\",\r",
+ " \"rating\" : 3\r",
+ " },\r",
+ " { \"name\" : \"mechanical\",\r",
+ " \"rating\" : 5\r",
+ " },\r",
+ " { \"name\" : \"powertrain\",\r",
+ " \"rating\" : 3\r",
+ " },\r",
+ " { \"name\" : \"body\",\r",
+ " \"rating\" : 4\r",
+ " },\r",
+ " { \"name\" : \"interior\",\r",
+ " \"rating\" : 5\r",
+ " },\r",
+ " { \"name\" : \"accessories\",\r",
+ " \"rating\" : 3\r",
+ " }\r",
+ " ],\r",
+ " \"wiki\" : \"http://en.wikipedia.org/wiki/Bmw_m3\"\r",
+ "},{ \r",
+ " \"img\" : \"250px-Audi_S5.jpg\",\r",
+ " \"manufacturer\" : \"Audi\",\r",
+ " \"model\" : \"S5\",\r",
+ " \"price\" : 53000,\r",
+ " \"quality\" : [ { \"name\" : \"overall\",\r",
+ " \"rating\" : 4\r",
+ " },\r",
+ " { \"name\" : \"mechanical\",\r",
+ " \"rating\" : 1\r",
+ " },\r",
+ " { \"name\" : \"powertrain\",\r",
+ " \"rating\" : 1\r",
+ " },\r",
+ " { \"name\" : \"body\",\r",
+ " \"rating\" : 4\r",
+ " },\r",
+ " { \"name\" : \"interior\",\r",
+ " \"rating\" : 1\r",
+ " },\r",
+ " { \"name\" : \"accessories\",\r",
+ " \"rating\" : 5\r",
+ " }\r",
+ " ],\r",
+ " \"wiki\" : \"http://en.wikipedia.org/wiki/Audi_S5#Audi_S5\"\r",
+ "},{ \r",
+ " \"img\" : \"250px-2007_Audi_TT_Coupe.jpg\",\r",
+ " \"manufacturer\" : \"Audi\",\r",
+ " \"model\" : \"TT\",\r",
+ " \"price\" : 40000,\r",
+ " \"quality\" : [{ \r",
+ " \"name\" : \"overall\",\r",
+ " \"rating\" : 5\r",
+ " },\r",
+ " { \"name\" : \"mechanical\",\r",
+ " \"rating\" : 2\r",
+ " },\r",
+ " { \"name\" : \"powertrain\",\r",
+ " \"rating\" : 2\r",
+ " },\r",
+ " { \"name\" : \"body\",\r",
+ " \"rating\" : 3\r",
+ " },\r",
+ " { \"name\" : \"interior\",\r",
+ " \"rating\" : 4\r",
+ " },\r",
+ " { \"name\" : \"accessories\",\r",
+ " \"rating\" : 1\r",
+ " }\r",
+ " ],\r",
+ " \"wiki\" : \"http://en.wikipedia.org/wiki/Audi_TT\"\r",
+ "}]"
+ ]
},
- "designerId": "b14e40ae-0e6c-4385-99f1-6f74052c2325",
- "cn": [
- {
- "type": "Ext.data.reader.Json",
- "reference": {
- "name": "reader",
- "type": "object"
- },
- "codeClass": null,
- "userConfig": {
- "root": "data"
- },
- "designerId": "84c9270c-599b-4349-aab1-978aa0607fb3"
- }
- ]
+ "designerId": "b14e40ae-0e6c-4385-99f1-6f74052c2325"
}
]
}
View
4 ext42/StarterApps/TaskList/app.js
@@ -20,6 +20,10 @@ Ext.Loader.setConfig({
Ext.application({
+
+ requires: [
+ 'Ext.window.MessageBox'
+ ],
models: [
'Task'
],
View
2  ext42/StarterApps/TaskList/app/controller/Tasks.js
@@ -139,7 +139,7 @@ Ext.define('MyApp.controller.Tasks', {
var me = this;
// Confirm this delete
- Ext.MessageBox.confirm('Confirm', 'Are you sure you want to delete this task?', function(btn) {
+ Ext.Msg.confirm('Confirm', 'Are you sure you want to delete this task?', function(btn) {
// User confirmed yes
if (btn == 'yes') {
View
3  ext42/StarterApps/TaskList/metadata/Application
@@ -13,6 +13,9 @@
"Task"
],
"name": "MyApp",
+ "requires": [
+ "Ext.window.MessageBox"
+ ],
"stores": [
"Tasks",
"Priorities"
View
2  ext42/StarterApps/TaskList/metadata/controller/Tasks
@@ -220,7 +220,7 @@
"var me = this;\r",
"\r",
"// Confirm this delete\r",
- "Ext.MessageBox.confirm('Confirm', 'Are you sure you want to delete this task?', function(btn) {\r",
+ "Ext.Msg.confirm('Confirm', 'Are you sure you want to delete this task?', function(btn) {\r",
"\r",
" // User confirmed yes\r",
" if (btn == 'yes') {\r",
View
4 touch22/Basic/LoginRegister/app/controller/Account.js
@@ -42,7 +42,7 @@ Ext.define('MyApp.controller.Account', {
showLogin: function(button, e, eOpts) {
var loginForm = Ext.create('widget.loginform'), // Login form
- mainView = this.getMainView(); // Main view
+ mainView = this.getMainView(); // Main view
// Navigate to login
mainView.push({
@@ -55,7 +55,7 @@ Ext.define('MyApp.controller.Account', {
showRegister: function(button, e, eOpts) {
var registerForm = Ext.create('widget.registerform'), // Registration form
- mainView = this.getMainView(); // Main view
+ mainView = this.getMainView(); // Main view
// Navigate to register
mainView.push({
View
4 touch22/Basic/LoginRegister/metadata/controller/Account
@@ -24,7 +24,7 @@
"implHandler": [
"\r",
"var loginForm = Ext.create('widget.loginform'),\t// Login form\r",
- " mainView = this.getMainView();\t\t\t\t\t// Main view\r",
+ " mainView = this.getMainView();\t\t\t\t// Main view\r",
"\r",
"// Navigate to login\r",
"mainView.push({\r",
@@ -51,7 +51,7 @@
"implHandler": [
"\r",
"var registerForm = Ext.create('widget.registerform'),\t// Registration form\r",
- " mainView = this.getMainView();\t\t\t\t\t\t\t// Main view\r",
+ " mainView = this.getMainView();\t\t\t\t\t\t// Main view\r",
"\r",
"// Navigate to register\r",
"mainView.push({\r",
View
4 touch22/StarterApps/FeedViewer/app.js
@@ -20,6 +20,10 @@ Ext.Loader.setConfig({
Ext.application({
+
+ requires: [
+ 'Ext.MessageBox'
+ ],
models: [
'Post',
'Search',
View
3  touch22/StarterApps/FeedViewer/metadata/Application
@@ -16,6 +16,9 @@
"Feed"
],
"name": "Feed",
+ "requires": [
+ "Ext.MessageBox"
+ ],
"stores": [
"Posts",
"Searches",
View
3  touch22/StarterApps/LocationManager/app/controller/Locations.js
@@ -219,9 +219,8 @@ Ext.define('MyApp.controller.Locations', {
message = 'Delete ' + record.get('name') + '?';
// Confirm the deletion, and then...
- var messageBox = new Ext.MessageBox();
var me = this;
- messageBox.confirm(title, message, function(response) {
+ Ext.Msg.confirm(title, message, function(response) {
// If we get a "yes"...
if (response == 'yes') {
View
3  touch22/StarterApps/LocationManager/metadata/controller/Locations
@@ -441,9 +441,8 @@
" message = 'Delete ' + record.get('name') + '?';\r",
"\r",
"// Confirm the deletion, and then...\r",
- "var messageBox = new Ext.MessageBox();\r",
"var me = this;\r",
- "messageBox.confirm(title, message, function(response) {\r",
+ "Ext.Msg.confirm(title, message, function(response) {\r",
"\r",
" // If we get a \"yes\"...\r",
" if (response == 'yes') {\r",
View
5 touch22/StarterApps/TaskList/app/controller/Tasks.js
@@ -112,10 +112,9 @@ Ext.define('TasksList.controller.Tasks', {
remove: function(button, e, eOpts) {
var me = this,
title = 'Delete',
- message = 'Are you sure you want to delete this task?',
- messageBox = new Ext.MessageBox();
+ message = 'Are you sure you want to delete this task?';
- messageBox.confirm(title, message, function(response) {
+ Ext.Msg.confirm(title, message, function(response) {
if (response == 'yes') {
var mainView = me.getMainView(),
View
5 touch22/StarterApps/TaskList/metadata/controller/Tasks
@@ -198,10 +198,9 @@
"implHandler": [
"var me = this,\r",
" title = 'Delete',\r",
- " message = 'Are you sure you want to delete this task?',\r",
- " messageBox = new Ext.MessageBox();\r",
+ " message = 'Are you sure you want to delete this task?';\r",
"\r",
- "messageBox.confirm(title, message, function(response) {\r",
+ "Ext.Msg.confirm(title, message, function(response) {\r",
" if (response == 'yes') {\r",
"\r",
"\t\tvar mainView = me.getMainView(),\r",
View
4 touch23/Basic/LoginRegister/app/controller/Account.js
@@ -42,7 +42,7 @@ Ext.define('MyApp.controller.Account', {
showLogin: function(button, e, eOpts) {
var loginForm = Ext.create('widget.loginform'), // Login form
- mainView = this.getMainView(); // Main view
+ mainView = this.getMainView(); // Main view
// Navigate to login
mainView.push({
@@ -55,7 +55,7 @@ Ext.define('MyApp.controller.Account', {
showRegister: function(button, e, eOpts) {
var registerForm = Ext.create('widget.registerform'), // Registration form
- mainView = this.getMainView(); // Main view
+ mainView = this.getMainView(); // Main view
// Navigate to register
mainView.push({
View
4 touch23/Basic/LoginRegister/metadata/controller/Account
@@ -24,7 +24,7 @@
"implHandler": [
"\r",
"var loginForm = Ext.create('widget.loginform'),\t// Login form\r",
- " mainView = this.getMainView();\t\t\t\t\t// Main view\r",
+ " mainView = this.getMainView();\t\t\t\t// Main view\r",
"\r",
"// Navigate to login\r",
"mainView.push({\r",
@@ -51,7 +51,7 @@
"implHandler": [
"\r",
"var registerForm = Ext.create('widget.registerform'),\t// Registration form\r",
- " mainView = this.getMainView();\t\t\t\t\t\t\t// Main view\r",
+ " mainView = this.getMainView();\t\t\t\t\t\t// Main view\r",
"\r",
"// Navigate to register\r",
"mainView.push({\r",
View
3  touch23/StarterApps/FeedViewer/app.js
@@ -39,6 +39,9 @@ Ext.application({
'AddFeed',
'FeedsList'
],
+ requires: [
+ 'Ext.MessageBox'
+ ],
controllers: [
'Posts',
'Feeds'
View
3  touch23/StarterApps/FeedViewer/metadata/Application
@@ -16,6 +16,9 @@
"Feed"
],
"name": "Feed",
+ "requires": [
+ "Ext.MessageBox"
+ ],
"stores": [
"Posts",
"Searches",
View
3  touch23/StarterApps/LocationManager/app/controller/Locations.js
@@ -219,9 +219,8 @@ Ext.define('MyApp.controller.Locations', {
message = 'Delete ' + record.get('name') + '?';
// Confirm the deletion, and then...
- var messageBox = new Ext.MessageBox();
var me = this;
- messageBox.confirm(title, message, function(response) {
+ Ext.Msg.confirm(title, message, function(response) {
// If we get a "yes"...
if (response == 'yes') {
View
3  touch23/StarterApps/LocationManager/metadata/controller/Locations
@@ -441,9 +441,8 @@
" message = 'Delete ' + record.get('name') + '?';\r",
"\r",
"// Confirm the deletion, and then...\r",
- "var messageBox = new Ext.MessageBox();\r",
"var me = this;\r",
- "messageBox.confirm(title, message, function(response) {\r",
+ "Ext.Msg.confirm(title, message, function(response) {\r",
"\r",
" // If we get a \"yes\"...\r",
" if (response == 'yes') {\r",
View
5 touch23/StarterApps/TaskList/app/controller/Tasks.js
@@ -112,10 +112,9 @@ Ext.define('TasksList.controller.Tasks', {
remove: function(button, e, eOpts) {
var me = this,
title = 'Delete',
- message = 'Are you sure you want to delete this task?',
- messageBox = new Ext.MessageBox();
+ message = 'Are you sure you want to delete this task?';
- messageBox.confirm(title, message, function(response) {
+ Ext.Msg.confirm(title, message, function(response) {
if (response == 'yes') {
var mainView = me.getMainView(),
View
35 touch23/StarterApps/TaskList/metadata/controller/Tasks
@@ -196,24 +196,23 @@
"designer|targetType": "Ext.Button",
"fn": "remove",
"implHandler": [
- "var me = this,",
- " title = 'Delete',",
- " message = 'Are you sure you want to delete this task?',",
- " messageBox = new Ext.MessageBox();",
- "",
- "messageBox.confirm(title, message, function(response) {",
- " if (response == 'yes') {",
- "",
- "\t\tvar mainView = me.getMainView(),",
- "\t\ttasks = Ext.getStore('Tasks'),",
- "\t\ttask = mainView.getRecord();",
- "",
- "\t\ttasks.remove(task);",
- "",
- "\t\t// Navigate back to list",
- "\t\tmainView.pop();",
- "",
- " }",
+ "var me = this,\r",
+ " title = 'Delete',\r",
+ " message = 'Are you sure you want to delete this task?';\r",
+ "\r",
+ "Ext.Msg.confirm(title, message, function(response) {\r",
+ " if (response == 'yes') {\r",
+ "\r",
+ "\t\tvar mainView = me.getMainView(),\r",
+ "\t\ttasks = Ext.getStore('Tasks'),\r",
+ "\t\ttask = mainView.getRecord();\r",
+ "\r",
+ "\t\ttasks.remove(task);\r",
+ "\r",
+ "\t\t// Navigate back to list\r",
+ "\t\tmainView.pop();\r",
+ "\r",
+ " }\r",
"});"
],
"name": "tap"
Please sign in to comment.
Something went wrong with that request. Please try again.