Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / examples / dd / dragdropzones.js
index 7bc210f..4f256d4 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * Ext JS Library 3.0.3
+ * Ext JS Library 3.1.0
  * Copyright(c) 2006-2009 Ext JS, LLC
  * licensing@extjs.com
  * http://www.extjs.com/license
@@ -95,6 +95,9 @@ Ext.onReady(function() {
                 '</tbody></table></div>' +\r
              '</tpl>',\r
         itemSelector: 'div.patient-source',\r
+        overClass: 'patient-over',\r
+        selectedClass: 'patient-selected',\r
+        singleSelect: true,\r
         store: patientStore,\r
         listeners: {\r
             render: initializePatientDragZone\r
@@ -148,7 +151,7 @@ Ext.onReady(function() {
             width: 100\r
         }],\r
         viewConfig: {\r
-            tpl: new Ext.XTemplate('<div class="hospital-target"></div>'),\r
+            tpl: new Ext.XTemplate('<div class="hospital-target">Drop Patient Here</div>'),\r
             enableRowBody: true,\r
             getRowClass: function(rec, idx, p, store) {\r
                 p.body = this.tpl.apply(rec.data);\r
@@ -165,7 +168,7 @@ Ext.onReady(function() {
         items: [{\r
             cls: 'app-header',\r
             region: 'north',\r
-            height: 100,\r
+            height: 30,\r
             html: '<h1>Patient Hospital Assignment</h1>',\r
             margins: '5 5 5 5'\r
         }, {\r
@@ -272,6 +275,8 @@ function initializeHospitalDropZone(g) {
         onNodeDrop : function(target, dd, e, data){\r
             var rowIndex = g.getView().findRowIndex(target);\r
             var h = g.getStore().getAt(rowIndex);\r
+            var targetEl = Ext.get(target);\r
+            targetEl.update(data.patientData.name+', '+targetEl.dom.innerHTML);\r
             Ext.Msg.alert('Drop gesture', 'Dropped patient ' + data.patientData.name +\r
                 ' on hospital ' + h.data.name);\r
             return true;\r