Im working since two weekends on how to implement drag-n-drop in
eTemplate. Christian (jaytraxx) give me the recommendation to give it a
try with jQuery (www.jquery.com).
I have now a working drag-n-drop demo running in the eTemplate editor.
Thought it’s just co-existing with eTemplate but not really supported by
eTemplate.
The plan is now to device an event-model, which allows to have
serverside event handlers, written in php, for all sort of events
(onclick, onchange, …), beside the already available (clientside)
event handlers in javascript. Drag-n-drop would then be an event emitted
by widgets marked as dragables or droppabals in eTemplate, were one
could also specify an event-handler, like you already do it eg. for
onchange.
Why using serverside eventhandlers anyway? There are many reasons, just
to name a few:
- no need to implents things twice (once on serverside in PHP and again
in javascript on clientside)
- keeping the logic / control flow together in one file / class
- hiding the implementation details of eTemplate (you dont need to know
how eTemplate renders a certain widget or your code will still run if
these details change)
- To be precise: clientside eventhandlers will still be supported, and
in some cases make more sense, compared to a serverside one. *
To do so I wrote some classes, which demonstrate what serverside
interface an event handler could use. It’s of cause not yet work, it
should only demonstrate the interface.
Anyway let me know what you think …
Ralf
Ralf Becker
Director Software Development
Stylite GmbH
[open style of IT]
Morschheimer Strasse 15
67292 Kirchheimbolanden
fon +49 (0) 6352 70629-0
fax +49 (0) 6352 70629-30
mailto: rb@stylite.de
www.stylite.de
www.egroupware.org
Geschäftsführer Andre Keller, Gudrun Müller,
Nigel Vickers und Ralf Becker
Registergericht Kaiserslautern HRB 30575
Umsatzsteuer-Id / VAT-Id: DE214280951