X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..6e39d509471fe9b4e2660e0d1631b350d0c66f40:/examples/dd/dragdropzones.js diff --git a/examples/dd/dragdropzones.js b/examples/dd/dragdropzones.js index e724b186..4f256d42 100644 --- a/examples/dd/dragdropzones.js +++ b/examples/dd/dragdropzones.js @@ -1,11 +1,9 @@ -/* - * Ext JS Library 2.2.1 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - +/*! + * Ext JS Library 3.1.0 + * Copyright(c) 2006-2009 Ext JS, LLC + * licensing@extjs.com + * http://www.extjs.com/license + */ Ext.onReady(function() { var patients = [{ @@ -17,7 +15,7 @@ Ext.onReady(function() { insuranceCode: '22222', name: 'Fred West', address: 'Cromwell Street', - telephone: '616 555 222' + telephone: '666 666 666' }, { insuranceCode: '33333', name: 'Fred Mercury', @@ -97,6 +95,9 @@ Ext.onReady(function() { '' + '', itemSelector: 'div.patient-source', + overClass: 'patient-over', + selectedClass: 'patient-selected', + singleSelect: true, store: patientStore, listeners: { render: initializePatientDragZone @@ -150,7 +151,7 @@ Ext.onReady(function() { width: 100 }], viewConfig: { - tpl: new Ext.XTemplate('
'), + tpl: new Ext.XTemplate('
Drop Patient Here
'), enableRowBody: true, getRowClass: function(rec, idx, p, store) { p.body = this.tpl.apply(rec.data); @@ -167,7 +168,7 @@ Ext.onReady(function() { items: [{ cls: 'app-header', region: 'north', - height: 100, + height: 30, html: '

Patient Hospital Assignment

', margins: '5 5 5 5' }, { @@ -274,6 +275,8 @@ function initializeHospitalDropZone(g) { onNodeDrop : function(target, dd, e, data){ var rowIndex = g.getView().findRowIndex(target); var h = g.getStore().getAt(rowIndex); + var targetEl = Ext.get(target); + targetEl.update(data.patientData.name+', '+targetEl.dom.innerHTML); Ext.Msg.alert('Drop gesture', 'Dropped patient ' + data.patientData.name + ' on hospital ' + h.data.name); return true;