From dac30447a6fd1b08eb7723a575c6f3272c23743e Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Wed, 21 Sep 2011 12:10:48 +0000 Subject: [PATCH] drag and drop integriert --- content/projekt/ressource.xml.php | 147 +++++++++++++++++++++++++++++- 1 file changed, 144 insertions(+), 3 deletions(-) diff --git a/content/projekt/ressource.xml.php b/content/projekt/ressource.xml.php index 61dec159b..a7d28982a 100644 --- a/content/projekt/ressource.xml.php +++ b/content/projekt/ressource.xml.php @@ -49,6 +49,91 @@ echo ''; seltype="single" hidecolumnpicker="false" flex="1" datasources="rdf:null" ref="http://www.technikum-wien.at/ressource/liste" ondblclick="document.getBindingParent(this).openNotiz(document.getBindingParent(this).value);" + ondragdrop="nsDragAndDrop.drop(event, + { + getSupportedFlavours : function () + { + var flavours = new FlavourSet(); + flavours.appendFlavour('application/fhc-ressource'); + return flavours; + }, + onDrop: function (evt,dropdata,session) + { + document.getBindingParent(event.target).AddRessource(dropdata.data); + }, + onDragStart: function (evt,transferData,action){} + })" + ondragover="nsDragAndDrop.dragOver(event,{ + getSupportedFlavours : function () + { + var flavours = new FlavourSet(); + flavours.appendFlavour('application/fhc-ressource'); + return flavours; + }, + onDragEnter: function (evt,flavour,session) + { + }, + onDragExit: function (evt,flavour,session) + { + }, + onDragOver: function(evt,flavour,session) + { + }, + onDrop: function (evt,dropdata,session) + { + debug('Ressource onDrop'+dropdata); + }, + onDragStart: function (evt,transferData,action) + { + } + })" + ondragenter="nsDragAndDrop.dragEnter(event,{ + getSupportedFlavours : function () + { + var flavours = new FlavourSet(); + flavours.appendFlavour('application/fhc-ressource'); + return flavours; + }, + onDragEnter: function (evt,flavour,session) + { + }, + onDragExit: function (evt,flavour,session) + { + }, + onDragOver: function(evt,flavour,session) + { + }, + onDrop: function (evt,dropdata,session) + { + }, + onDragStart: function (evt,transferData,action) + { + } + })" + ondragexit="nsDragAndDrop.dragExit(event,{ + getSupportedFlavours : function () + { + var flavours = new FlavourSet(); + flavours.appendFlavour('application/fhc-ressource'); + return flavours; + }, + onDragEnter: function (evt,flavour,session) + { + }, + onDragExit: function (evt,flavour,session) + { + }, + onDragOver: function(evt,flavour,session) + { + }, + onDrop: function (evt,dropdata,session) + { + debug('Ressource onDrop'+dropdata); + }, + onDragStart: function (evt,transferData,action) + { + } + })" > '; @@ -150,7 +235,6 @@ echo ''; '; ]]> + + + + soap/ressource_projekt.soap.php?"+gettimestamp(); + SOAPClient.SendRequest(sr, + function(respObj) + { + try + { + var id = respObj.Body[0].saveProjektRessourceResponse[0].message[0].Text; + } + catch(e) + { + var fehler = respObj.Body[0].Fault[0].faultstring[0].Text; + alert('Fehler: '+fehler); + return; + } + } + ); + + window.setTimeout(function(){this.RefreshRessource},2000); + } + catch(e) + { + debug("Notiz load failed with exception: "+e); + } + + + ]]> + + - var projekt_kurzbz = this.getAttribute('projekt_kurzbz'); var projektphase_id = this.getAttribute('projektphase_id');