X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/examples/dd/dragdropzones.js
diff --git a/examples/dd/dragdropzones.js b/examples/dd/dragdropzones.js
index 80f1769e..7d481cec 100644
--- a/examples/dd/dragdropzones.js
+++ b/examples/dd/dragdropzones.js
@@ -1,280 +1,292 @@
-/*!
- * Ext JS Library 3.0.0
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
+Ext.require(['*']);
+
+Ext.onReady(function() {
+
+ var patients = [{
+ insuranceCode: '11111',
+ name: 'Fred Bloggs',
+ address: 'Main Street',
+ telephone: '555 1234 123'
+ }, {
+ insuranceCode: '22222',
+ name: 'Fred West',
+ address: 'Cromwell Street',
+ telephone: '666 666 666'
+ }, {
+ insuranceCode: '33333',
+ name: 'Fred Mercury',
+ address: 'Over The Rainbow',
+ telephone: '555 321 0987'
+ }, {
+ insuranceCode: '44444',
+ name: 'Fred Forsyth',
+ address: 'Blimp Street',
+ telephone: '555 111 2222'
+ }, {
+ insuranceCode: '55555',
+ name: 'Fred Douglass',
+ address: 'Talbot County, Maryland',
+ telephone: 'N/A'
+ }];
+
+ Ext.define('Patient', {
+ extend: 'Ext.data.Model',
+ idProperty: 'insuranceCode',
+ fields: [{
+ name: 'name'
+ }, {
+ name: 'address'
+ }, {
+ name: 'telephone'
+ }]
+ });
+
+ var patientStore = Ext.create('Ext.data.Store', {
+ model: 'Patient',
+ data: patients
+ });
+
+ var hospitals = [{
+ code: 'AAAAA',
+ name: 'Saint Thomas',
+ address: 'Westminster Bridge Road, SE1 7EH',
+ telephone: '020 7188 7188'
+ }, {
+ code: 'BBBBB',
+ name: 'Queen\'s Medical Centre',
+ address: 'Derby Road, NG7 2UH',
+ telephone: '0115 924 9924'
+ }, {
+ code: 'CCCCC',
+ name: 'Saint Bartholomew',
+ address: 'West Smithfield, EC1A 7BE',
+ telephone: '020 7377 7000'
+ }, {
+ code: 'DDDDD',
+ name: 'Royal London',
+ address: 'Whitechapel, E1 1BB',
+ telephone: '020 7377 7000'
+ }];
+
+ Ext.define('Hospital', {
+ extend: 'Ext.data.Model',
+ idProperty: 'code',
+ fields: [{
+ name: 'name'
+ }, {
+ name: 'address'
+ }, {
+ name: 'telephone'
+ }]
+ });
+
+ var hospitalStore = Ext.create('Ext.data.Store', {
+ model: 'Hospital',
+ data: hospitals
+ });
+
+ var patientView = Ext.create('Ext.view.View', {
+ cls: 'patient-view',
+ tpl: '' +
+ '' +
+ 'Name | {name} |
' +
+ 'Address | {address} |
' +
+ 'Telephone | {telephone} |
' +
+ '
' +
+ '',
+ itemSelector: 'div.patient-source',
+ overItemCls: 'patient-over',
+ selectedItemClass: 'patient-selected',
+ singleSelect: true,
+ store: patientStore,
+ listeners: {
+ render: initializePatientDragZone
+ }
+ });
+
+ var helpWindow = Ext.create('Ext.Window', {
+ title: 'Source code',
+ width: 920,
+ height: 500,
+ closeAction: 'hide',
+ renderTpl: [
+ '