-/*\r
- * Ext JS Library 2.2.1\r
- * Copyright(c) 2006-2009, Ext JS, LLC.\r
- * licensing@extjs.com\r
- * \r
- * http://extjs.com/license\r
- */\r
-\r
+/*!
+ * Ext JS Library 3.1.1
+ * Copyright(c) 2006-2010 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
Ext.onReady(function() {\r
\r
var patients = [{\r
insuranceCode: '22222',\r
name: 'Fred West',\r
address: 'Cromwell Street',\r
- telephone: '616 555 222'\r
+ telephone: '666 666 666'\r
}, {\r
insuranceCode: '33333',\r
name: 'Fred Mercury',\r
'</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
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
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
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