Permalink
Browse files

Add examples from interactivity guide

  • Loading branch information...
lojjic committed Aug 7, 2012
1 parent de6013a commit d9d425c83cda77e12bb83938d906b49db8315d1f
View
@@ -1,2 +1,4 @@
ExtSimpleExamples
-=================
+=================
+
+This repository contains a collection of simple Architect projects demonstrating individual features.
Binary file not shown.
@@ -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>
@@ -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'
+ ]
+});
@@ -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
+ }
+ });
+ }
+
+});
@@ -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);
+ }
+
+});
@@ -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'
+ ]
+});
@@ -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"
+ ]
+ }
+}
@@ -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"
+}
@@ -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"
+ }
+ ]
+}
@@ -0,0 +1,10 @@
+{
+ "type": "libraryresource",
+ "reference": {
+ "name": "items",
+ "type": "array"
+ },
+ "codeClass": null,
+ "id": "ExtBox1-ext-gen3489",
+ "designerId": "277a9ec0-8581-4700-9df3-6ed168a4713f"
+}
@@ -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"
+ }
+ ]
+}
Binary file not shown.
@@ -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>
@@ -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'
+});
Oops, something went wrong.

0 comments on commit d9d425c

Please sign in to comment.