Skip to content
Browse files

Add examples from interactivity guide

  • Loading branch information...
1 parent de6013a commit d9d425c83cda77e12bb83938d906b49db8315d1f @lojjic lojjic committed
View
4 README.md
@@ -1,2 +1,4 @@
ExtSimpleExamples
-=================
+=================
+
+This repository contains a collection of simple Architect projects demonstrating individual features.
View
BIN interactivity/controlleraction.xda
Binary file not shown.
View
14 interactivity/controlleraction/app.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+
+<!-- Auto Generated with Sencha Architect -->
+<!-- Modifications to this file will be overwritten. -->
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>controlleraction</title>
+ <script src="http://extjs.cachefly.net/ext-4.0.7-commercial/ext-all.js"></script>
+ <link rel="stylesheet" href="http://extjs.cachefly.net/ext-4.0.7-commercial/resources/css/ext-all.css">
+ <script type="text/javascript" src="app.js"></script>
+</head>
+<body></body>
+</html>
View
29 interactivity/controlleraction/app.js
@@ -0,0 +1,29 @@
+/*
+ * File: app.js
+ *
+ * This file was generated by Sencha Architect version 2.0.0.
+ * http://www.sencha.com/products/architect/
+ *
+ * This file requires use of the Ext JS 4.0.x library, under independent license.
+ * License of Sencha Architect does not include license for Ext JS 4.0.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.Loader.setConfig({
+ enabled: true
+});
+
+Ext.application({
+ views: [
+ 'MyPanel'
+ ],
+ autoCreateViewport: true,
+ name: 'MyApp',
+ controllers: [
+ 'MyController'
+ ]
+});
View
36 interactivity/controlleraction/app/controller/MyController.js
@@ -0,0 +1,36 @@
+/*
+ * File: app/controller/MyController.js
+ *
+ * This file was generated by Sencha Architect version 2.0.0.
+ * http://www.sencha.com/products/architect/
+ *
+ * This file requires use of the Ext JS 4.0.x library, under independent license.
+ * License of Sencha Architect does not include license for Ext JS 4.0.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.controller.MyController', {
+ extend: 'Ext.app.Controller',
+
+ onButtonToggle: function(button, pressed, options) {
+ var panel = button.up('panel');
+ if (pressed) {
+ panel.setSize(100, 200);
+ } else {
+ panel.setSize(400, 250);
+ }
+ },
+
+ init: function(application) {
+ this.control({
+ "button#sizeToggle": {
+ toggle: this.onButtonToggle
+ }
+ });
+ }
+
+});
View
40 interactivity/controlleraction/app/view/MyPanel.js
@@ -0,0 +1,40 @@
+/*
+ * File: app/view/MyPanel.js
+ *
+ * This file was generated by Sencha Architect version 2.0.0.
+ * http://www.sencha.com/products/architect/
+ *
+ * This file requires use of the Ext JS 4.0.x library, under independent license.
+ * License of Sencha Architect does not include license for Ext JS 4.0.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.MyPanel', {
+ extend: 'Ext.panel.Panel',
+
+ height: 250,
+ width: 400,
+ title: 'My Panel',
+
+ initComponent: function() {
+ var me = this;
+
+ Ext.applyIf(me, {
+ items: [
+ {
+ xtype: 'button',
+ itemId: 'sizeToggle',
+ enableToggle: true,
+ text: 'MyButton'
+ }
+ ]
+ });
+
+ me.callParent(arguments);
+ }
+
+});
View
22 interactivity/controlleraction/app/view/Viewport.js
@@ -0,0 +1,22 @@
+/*
+ * File: app/view/Viewport.js
+ *
+ * This file was generated by Sencha Architect version 2.0.0.
+ * http://www.sencha.com/products/architect/
+ *
+ * This file requires use of the Ext JS 4.0.x library, under independent license.
+ * License of Sencha Architect does not include license for Ext JS 4.0.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.MyPanel',
+ renderTo: Ext.getBody(),
+ requires: [
+ 'MyApp.view.MyPanel'
+ ]
+});
View
57 interactivity/controlleraction/controlleraction.xds
@@ -0,0 +1,57 @@
+{
+ "name": "controlleraction",
+ "settings": {
+ "urlPrefix": "",
+ "spacesToIndent": 4,
+ "exportPath": "",
+ "lineEnding": "LF",
+ "genTimestamps": false,
+ "cacheBust": false
+ },
+ "xdsVersion": "2.0.0",
+ "xdsBuild": 557,
+ "schemaVersion": 1,
+ "upgradeVersion": 210000000495,
+ "framework": "ext40",
+ "topInstanceFileMap": {
+ "33b2450a-19f8-4163-a35b-61f62655a5fe": {
+ "paths": [
+ "metadata/view/MyPanel",
+ "app/view/override/MyPanel.js",
+ "app/view/MyPanel.js",
+ "app/view/Viewport.js"
+ ],
+ "className": "MyPanel"
+ },
+ "17ff1122-eedf-4ac0-93f0-5936ff74afd6": {
+ "paths": [
+ "metadata/controller/MyController",
+ "app/controller/override/MyController.js",
+ "app/controller/MyController.js"
+ ],
+ "className": "MyController"
+ },
+ "277a9ec0-8581-4700-9df3-6ed168a4713f": {
+ "paths": [
+ "metadata/resource/Library"
+ ],
+ "className": "Library"
+ }
+ },
+ "viewOrderMap": {
+ "view": [
+ "33b2450a-19f8-4163-a35b-61f62655a5fe"
+ ],
+ "store": [],
+ "controller": [
+ "17ff1122-eedf-4ac0-93f0-5936ff74afd6"
+ ],
+ "model": [],
+ "resource": [
+ "277a9ec0-8581-4700-9df3-6ed168a4713f"
+ ],
+ "app": [
+ "application"
+ ]
+ }
+}
View
20 interactivity/controlleraction/metadata/Application
@@ -0,0 +1,20 @@
+{
+ "type": "application",
+ "reference": {
+ "name": "items",
+ "type": "array"
+ },
+ "codeClass": null,
+ "userConfig": {
+ "views": [
+ "MyPanel"
+ ],
+ "autoCreateViewport": true,
+ "name": "MyApp",
+ "controllers": [
+ "MyController"
+ ]
+ },
+ "id": "ExtBox1-ext-gen3481",
+ "designerId": "application"
+}
View
40 interactivity/controlleraction/metadata/controller/MyController
@@ -0,0 +1,40 @@
+{
+ "type": "controller",
+ "reference": {
+ "name": "items",
+ "type": "array"
+ },
+ "codeClass": null,
+ "userConfig": {
+ "designer|userClassName": "MyController"
+ },
+ "id": "ExtBox1-ext-gen4289",
+ "designerId": "17ff1122-eedf-4ac0-93f0-5936ff74afd6",
+ "cn": [
+ {
+ "type": "controlleraction",
+ "reference": {
+ "name": "listeners",
+ "type": "array"
+ },
+ "codeClass": null,
+ "userConfig": {
+ "designer|userClassName": "onButtonToggle",
+ "fn": "onButtonToggle",
+ "implHandler": [
+ "var panel = button.up('panel');",
+ "if (pressed) {",
+ " panel.setSize(100, 200);",
+ "} else {",
+ " panel.setSize(400, 250);",
+ "}"
+ ],
+ "name": "toggle",
+ "scope": "me",
+ "designer|targetType": "Ext.button.Button",
+ "designer|controlQuery": "button#sizeToggle"
+ },
+ "designerId": "1f42d730-655c-4afc-b3f3-e4f4af6b43dc"
+ }
+ ]
+}
View
10 interactivity/controlleraction/metadata/resource/Library
@@ -0,0 +1,10 @@
+{
+ "type": "libraryresource",
+ "reference": {
+ "name": "items",
+ "type": "array"
+ },
+ "codeClass": null,
+ "id": "ExtBox1-ext-gen3489",
+ "designerId": "277a9ec0-8581-4700-9df3-6ed168a4713f"
+}
View
34 interactivity/controlleraction/metadata/view/MyPanel
@@ -0,0 +1,34 @@
+{
+ "type": "panel",
+ "reference": {
+ "name": "items",
+ "type": "array"
+ },
+ "codeClass": null,
+ "userConfig": {
+ "designer|userClassName": "MyPanel",
+ "designer|initialView": true,
+ "height": 250,
+ "width": 400,
+ "title": "My Panel"
+ },
+ "id": "ExtBox1-ext-gen3703",
+ "designerId": "33b2450a-19f8-4163-a35b-61f62655a5fe",
+ "cn": [
+ {
+ "type": "button",
+ "reference": {
+ "name": "items",
+ "type": "array"
+ },
+ "codeClass": null,
+ "userConfig": {
+ "designer|userClassName": "MyButton",
+ "itemId": "sizeToggle",
+ "enableToggle": true,
+ "text": "MyButton"
+ },
+ "designerId": "b815b33e-56fe-4504-9c98-16ff612a3ada"
+ }
+ ]
+}
View
BIN interactivity/eventbinding.xda
Binary file not shown.
View
14 interactivity/eventbinding/app.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+
+<!-- Auto Generated with Sencha Architect -->
+<!-- Modifications to this file will be overwritten. -->
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>eventbinding</title>
+ <script src="http://extjs.cachefly.net/ext-4.0.7-commercial/ext-all.js"></script>
+ <link rel="stylesheet" href="http://extjs.cachefly.net/ext-4.0.7-commercial/resources/css/ext-all.css">
+ <script type="text/javascript" src="app.js"></script>
+</head>
+<body></body>
+</html>
View
26 interactivity/eventbinding/app.js
@@ -0,0 +1,26 @@
+/*
+ * File: app.js
+ *
+ * This file was generated by Sencha Architect version 2.0.0.
+ * http://www.sencha.com/products/architect/
+ *
+ * This file requires use of the Ext JS 4.0.x library, under independent license.
+ * License of Sencha Architect does not include license for Ext JS 4.0.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.Loader.setConfig({
+ enabled: true
+});
+
+Ext.application({
+ views: [
+ 'MyPanel'
+ ],
+ autoCreateViewport: true,
+ name: 'MyApp'
+});
View
53 interactivity/eventbinding/app/view/MyPanel.js
@@ -0,0 +1,53 @@
+/*
+ * File: app/view/MyPanel.js
+ *
+ * This file was generated by Sencha Architect version 2.0.0.
+ * http://www.sencha.com/products/architect/
+ *
+ * This file requires use of the Ext JS 4.0.x library, under independent license.
+ * License of Sencha Architect does not include license for Ext JS 4.0.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.MyPanel', {
+ extend: 'Ext.panel.Panel',
+
+ height: 250,
+ width: 400,
+ title: 'My Panel',
+
+ initComponent: function() {
+ var me = this;
+
+ Ext.applyIf(me, {
+ items: [
+ {
+ xtype: 'button',
+ enableToggle: true,
+ text: 'MyButton',
+ listeners: {
+ toggle: {
+ fn: me.onButtonToggle,
+ scope: me
+ }
+ }
+ }
+ ]
+ });
+
+ me.callParent(arguments);
+ },
+
+ onButtonToggle: function(button, pressed, options) {
+ if (pressed) {
+ this.setSize(100, 200);
+ } else {
+ this.setSize(400, 250);
+ }
+ }
+
+});
View
22 interactivity/eventbinding/app/view/Viewport.js
@@ -0,0 +1,22 @@
+/*
+ * File: app/view/Viewport.js
+ *
+ * This file was generated by Sencha Architect version 2.0.0.
+ * http://www.sencha.com/products/architect/
+ *
+ * This file requires use of the Ext JS 4.0.x library, under independent license.
+ * License of Sencha Architect does not include license for Ext JS 4.0.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.MyPanel',
+ renderTo: Ext.getBody(),
+ requires: [
+ 'MyApp.view.MyPanel'
+ ]
+});
View
47 interactivity/eventbinding/eventbinding.xds
@@ -0,0 +1,47 @@
+{
+ "name": "eventbinding",
+ "settings": {
+ "urlPrefix": "",
+ "spacesToIndent": 4,
+ "exportPath": "",
+ "lineEnding": "LF",
+ "genTimestamps": false,
+ "cacheBust": false
+ },
+ "xdsVersion": "2.0.0",
+ "xdsBuild": 557,
+ "schemaVersion": 1,
+ "upgradeVersion": 210000000495,
+ "framework": "ext40",
+ "topInstanceFileMap": {
+ "ba462971-dcd9-4050-adb0-f261eb42500a": {
+ "paths": [
+ "metadata/view/MyPanel",
+ "app/view/override/MyPanel.js",
+ "app/view/MyPanel.js",
+ "app/view/Viewport.js"
+ ],
+ "className": "MyPanel"
+ },
+ "3cdeed92-0433-4b0a-8fc2-9503c9963190": {
+ "paths": [
+ "metadata/resource/Library"
+ ],
+ "className": "Library"
+ }
+ },
+ "viewOrderMap": {
+ "view": [
+ "ba462971-dcd9-4050-adb0-f261eb42500a"
+ ],
+ "store": [],
+ "controller": [],
+ "model": [],
+ "resource": [
+ "3cdeed92-0433-4b0a-8fc2-9503c9963190"
+ ],
+ "app": [
+ "application"
+ ]
+ }
+}
View
17 interactivity/eventbinding/metadata/Application
@@ -0,0 +1,17 @@
+{
+ "type": "application",
+ "reference": {
+ "name": "items",
+ "type": "array"
+ },
+ "codeClass": null,
+ "userConfig": {
+ "views": [
+ "MyPanel"
+ ],
+ "autoCreateViewport": true,
+ "name": "MyApp"
+ },
+ "id": "ExtBox1-ext-gen1553",
+ "designerId": "application"
+}
View
10 interactivity/eventbinding/metadata/resource/Library
@@ -0,0 +1,10 @@
+{
+ "type": "libraryresource",
+ "reference": {
+ "name": "items",
+ "type": "array"
+ },
+ "codeClass": null,
+ "id": "ExtBox1-ext-gen1561",
+ "designerId": "3cdeed92-0433-4b0a-8fc2-9503c9963190"
+}
View
57 interactivity/eventbinding/metadata/view/MyPanel
@@ -0,0 +1,57 @@
+{
+ "type": "panel",
+ "reference": {
+ "name": "items",
+ "type": "array"
+ },
+ "codeClass": null,
+ "userConfig": {
+ "designer|userClassName": "MyPanel",
+ "designer|initialView": true,
+ "height": 250,
+ "width": 400,
+ "title": "My Panel"
+ },
+ "id": "ExtBox1-ext-gen1848",
+ "designerId": "ba462971-dcd9-4050-adb0-f261eb42500a",
+ "cn": [
+ {
+ "type": "button",
+ "reference": {
+ "name": "items",
+ "type": "array"
+ },
+ "codeClass": null,
+ "userConfig": {
+ "designer|userClassName": "MyButton",
+ "enableToggle": true,
+ "text": "MyButton"
+ },
+ "designerId": "c1bc739a-e9ed-4597-bbd6-bcf85a92d670",
+ "cn": [
+ {
+ "type": "basiceventbinding",
+ "reference": {
+ "name": "listeners",
+ "type": "array"
+ },
+ "codeClass": null,
+ "userConfig": {
+ "designer|userClassName": "onButtonToggle",
+ "fn": "onButtonToggle",
+ "implHandler": [
+ "if (pressed) {",
+ " this.setSize(100, 200);",
+ "} else {",
+ " this.setSize(400, 250);",
+ "}"
+ ],
+ "name": "toggle",
+ "scope": "me"
+ },
+ "designerId": "22777bc9-2fe0-4982-8412-64c6210e7263"
+ }
+ ]
+ }
+ ]
+}

0 comments on commit d9d425c

Please sign in to comment.
Something went wrong with that request. Please try again.