Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 12, 2012, 04:32:57 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
149621
Posts in
21098
Topics by
7537
Members
Latest Member:
lotte2
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
drag & drop for other modules
Pages: [
1
]
2
Go Down
Author
Topic: drag & drop for other modules (Read 1581 times)
Olli
Offline
Posts: 288
drag & drop for other modules
«
on:
January 27, 2010, 11:49:34 PM »
hello,
i like the drag & drop feature for sorting pages inside the latest WebsiteBaker very much.
i would like to include this feature into my own modules aswell. i looked though the forum, but i was not able to find any useful information on this.
i looked into the WB code, but for some reason i could not get it to work. i suppose i forgot something...
has anybody included this into their own module already? what is needed to be done for this? can you help me out?
thanks a lot
«
Last Edit: January 29, 2010, 12:49:38 AM by Olli
»
Logged
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: drag & drop for other modules
«
Reply #1 on:
January 28, 2010, 08:34:01 AM »
There are lots of request for this feature.
The module MPForm has Drag&Drop.
I wished, someone writes a "How to", to implement Drag&Drop easy to any module.
Logged
*weg*
Olli
Offline
Posts: 288
Re: drag & drop for other modules
«
Reply #2 on:
January 28, 2010, 04:26:50 PM »
hey chio,
thanks for pointing me to that module. will implement it into my module the next days and tell you how.
thanks
Logged
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4753
Re: drag & drop for other modules
«
Reply #3 on:
January 28, 2010, 07:39:49 PM »
Hello Olli, Hello Chio,
there is another Module which uses this technique.
so see here for another example:
http://www.websitebaker2.org/forum/index.php/topic,14982.0.html
I hope this helps.
I'm also interested in a implementation how to
Kind Regards,
Stefek
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
Waldschwein
Guest
Re: drag & drop for other modules
«
Reply #4 on:
January 28, 2010, 08:17:32 PM »
Hello!
Well, the best would be a module that uses jQuery1.4 for drag&drop and a tutorial that explains how to move from YUI drag&drop to jQuery. That would even help the Core Developer.
I doubt in future releases beyond 2.8.1 YUI would be included by default...
Yours Michael
Logged
Olli
Offline
Posts: 288
Re: drag & drop for other modules
«
Reply #5 on:
January 29, 2010, 12:48:14 AM »
hello waldschwein,
so jQuery is the way to go you say?
i think this is what i need for this then i guess...
http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/
but how to i put the new sorting-order to the database? i have never written any ajax requests on my own yet...
but will look closer to this the next days and will post the final result with turorial steps here.
thanks
Logged
doc
Guest
Re: drag & drop for other modules
«
Reply #6 on:
January 29, 2010, 08:00:23 AM »
Hallo Olli,
mit dem Plugin habe ich vor gut 1.5 Jahren mal ein Kundenmodul gebaut, um Drag & Drop von Einträgen zu im Backend zu ermöglichen. Wenn Du mit jQuery und Ajax ins straucheln geraden solltest, kannst Du ja mal nen Blick ins "Post-Its" Modul werfen. Dort werden einige Ajax basierte Datenbankupdates mit der jQuery Ajax Schnittstelle und PHP/MySQL durchgeführt. Quellcode sollte gut genug kommentiert sein.
Schön zu sehen, dass jQuery langsam auch für UI verwendet wird und nicht nur für reine DOM Manipulation oder grafische Effekte bei Bildergallerien.
Doc
«
Last Edit: January 29, 2010, 08:02:11 AM by doc
»
Logged
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: drag & drop for other modules
«
Reply #7 on:
January 29, 2010, 08:41:39 AM »
Super, auf der Demo-Seite
http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/
steht sehr viel was man wissen muss.
Is there spme help how to integrate jquery into the backend - so that it works also if there are multiple sections?
Logged
*weg*
doc
Guest
Re: drag & drop for other modules
«
Reply #8 on:
January 29, 2010, 12:56:52 PM »
Hi,
witzig. Den gleichen Link habe ich vor 1.5 Jahren gepostet
http://www.websitebaker2.org/forum/index.php/topic,3029.msg67257.html#msg67257
Gruss Doc
Logged
Olli
Offline
Posts: 288
Re: drag & drop for other modules
«
Reply #9 on:
January 29, 2010, 01:06:42 PM »
hey an alle
danke für das feedback und die infos. ich melde mich, wenn ich fertig bin mit dem einbauen.
viele grüße
Logged
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: drag & drop for other modules
«
Reply #10 on:
January 29, 2010, 01:08:57 PM »
Ja, aber wie nutzt man jQuery im Backend? Ich meine so, dass es sich nicht mit anderen Modulen schlägt, die ebenfalls jQuery nutzen.
AJAX ist ja an sich nicht so schwierig, da braucht man gar kein jQuery dazu. Aber man braucht etwas PHP, um die neue Sortierung wieder in die Datenbank zu übertragen.
Ich habe mir gerade die erweiterte order.class in MPForm angeschaut, da steige ich aber nicht recht durch..
Logged
*weg*
doc
Guest
Re: drag & drop for other modules
«
Reply #11 on:
January 29, 2010, 01:16:41 PM »
Hi,
Quote
Ja, aber wie nutzt man jQuery im Backend? Ich meine so, dass es sich nicht mit anderen Modulen schlägt, die ebenfalls jQuery nutzen.
Versteh die Frage nicht ganz. Meinst Du die Einbindung oder von welchen Effekten sprichst Du? Wenn man in seinen Modulen
$(document).ready(...)
verwendet, sollten eigentlich keine Probleme entstehen.
Sind auch mehrere dieser Konstrukte pro Seite möglich, diese werden dann nacheinander abgehandelt. Zum sortieren einer Tabelle muss ja nur das DOM fertig sein, sprich Tabellenstruktur geladen, dann kann man die Drag & Drop Event Handler drauf loslassen. Hatte bisher noch keine Probleme mit den Modulen, welche dies verwendet haben.
Eventuell nochmal näher beschreiben, wenn ich was nicht verstanden haben sollte. Das PHP für das Datenbankupdate beim verschieben von Seiten im Seitenbaum wäre im WB Core bereits enthalten. Für Module müsste eine einheitliche Sortier ID etc. eingeführt werden (am besten wählbar). So könnte man ne API bauen, welche auch andere Module einfach nutzen können.
Doc
«
Last Edit: January 29, 2010, 01:18:34 PM by doc
»
Logged
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: drag & drop for other modules
«
Reply #12 on:
January 29, 2010, 01:33:46 PM »
Gibt es eigentlich Module, die jQuery im Backend nutzen? Da könnte ich ja schauen, wie das geht.
Anders gefragt: Gibt es sowas wie ein: "Tu das, dann das, - nein, das nicht! - aber dann das..."
Logged
*weg*
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: drag & drop for other modules
«
Reply #13 on:
January 29, 2010, 02:28:27 PM »
Hi,
the PM module from my signature use JQ for autosuggestion.. Im trying to keep up
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
doc
Guest
Re: drag & drop for other modules
«
Reply #14 on:
January 29, 2010, 06:21:13 PM »
@Chio: Das "Post-its" Modul verwendet jQuery, wie bereits hier gepostet. Es nimmt aber nicht die jQuery Datei aus dem WB /include Ordner, sondern bringt ein eigenes mit. Wenn ich mich recht entsinne, war das Modul das erste, welches jQuery verwendet hat. Die Grundzüge sollten aber aus dem Modul klar werden.
Doc
Logged
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: drag & drop for other modules
«
Reply #15 on:
January 30, 2010, 01:12:26 PM »
Ich meine: Gibt es einen "Standard", wie ein Modul jQuery im Backend nutzen kann, ohne sich mit anderen Modulen in die Haare zu geraten?
Das "eigene" jQuery mitnehmen; das geht ja in der modify.php eines Modules nicht, wenn andere Module das ebenfalls machen. Außerdem ist das ja nicht Sinn der Sache, dazu ist jQuery ja im Core.
Logged
*weg*
doc
Guest
Re: drag & drop for other modules
«
Reply #16 on:
January 30, 2010, 01:38:50 PM »
Hi,
im Backend wird jQuery per Default eingebunden (WB 2.8.1 SVN) und steht somit auf Seiten in "modify.php" oder "tool.php" (Page/Admin tool) ohne weiteres zutun zur Verfügung. In die Quere kommt sich nichts, wenn alle jQuery Funktionen in document.ready gewrappt werden und es keine "mehrdeutigen" Funktionsnamen gibt.
Hat man weitere "Backend" Seiten wie z.B. ne "config.php", muss man sich um die Einbindung von jQuery selbst kümmern, genauso wie um die Absicherung dieser Seite vor unbefugtem Zugriff. In meinen Modulen erledige ich das mit einer "angepassten" admin Klasse, bzw. Funktion. Siehe z.B. AFE (functions.inc.php --> myAdminHandler). Über die Anpassung können CSS, JS Dateien eingebunden werden.
Im Frontend brauchts die register_frontend_m
odfiles. Weiss nicht ob jQuery dann automatisch geladen wird. Falls nicht halt noch ne frontend.js oder frontend_body.js.
Doc
Logged
Luisehahne
Board Member
Development Team
Offline
Posts: 2949
Re: drag & drop for other modules
«
Reply #17 on:
January 30, 2010, 01:57:59 PM »
Quote
Weiss nicht ob jQuery dann automatisch geladen wird.
Du brauchst nur statt js jquery eingeben, dann werden basis jquery scripte eingebunden, nur für die css musst du selber sorgen oder das modul.
Dietmar
Logged
We are human beings - and nobody is perfect at all.
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: drag & drop for other modules
«
Reply #18 on:
January 30, 2010, 03:34:23 PM »
Euch muss man alles aus der Nase ziehen
Wäre mal schön ein Tutorial, wie das genau geht und was man so machen kann.
Logged
*weg*
doc
Guest
Re: drag & drop for other modules
«
Reply #19 on:
January 30, 2010, 03:54:14 PM »
Hi,
Quote
Euch muss man alles aus der Nase ziehen
Naja Deine Anfragen bzw. "Antworten" auf Posts sind teils auch recht unspezifisch
Wenn ich Olli richtig verstanden habe, musst du nur ein bischen warten bis er mit seinem Modul fertig ist. Dann posted er seine Lösung inkl. nem kleinen Tutorial.
Doc
Logged
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: drag & drop for other modules
«
Reply #20 on:
January 31, 2010, 09:30:34 PM »
Hi,
I hope I will post a tutorial soon how to reorder members from members module via drag n drop
So far it is working with one group..
cheers
«
Last Edit: January 31, 2010, 10:04:16 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Olli
Offline
Posts: 288
Re: drag & drop for other modules
«
Reply #21 on:
February 27, 2010, 08:35:38 PM »
@crnogorac081:
did you make any progess yet? hadn't had time to do this on my own yet. will try to use the function from the WB core this evening.
Logged
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: drag & drop for other modules
«
Reply #22 on:
February 28, 2010, 08:48:01 AM »
crnogorac sent me a working adapted members-module, and I made some more changes. It works on my localhost, but it doesnt work on my website. Dont know why..
You can have this version, but its not finished yet, I dont even know if it can be installed clean.
Logged
*weg*
doc
Guest
Re: drag & drop for other modules
«
Reply #23 on:
February 28, 2010, 08:54:59 AM »
Hi,
Quote
It works on my localhost, but it doesnt work on my website.
Assuming both installations are identical, I would check for wrong absolute URLs in the Ajax or Javascript related parts of the modified files.
Doc
«
Last Edit: February 28, 2010, 08:56:31 AM by doc
»
Logged
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: drag & drop for other modules
«
Reply #24 on:
February 28, 2010, 11:05:35 AM »
it works both on my local host and live server..
@chio
Could it be that you used it on two differnt WB versions: 2.8 and 2.8.1 ? and that it is not working on 2.8.1 ?
edit:
if yes -> there is an issue with wb 2.8.1 admin template... you must enable (uncoment) jquery-ui script in footer.htt in backend themes (or only the one you are using..). And this jquery-ui script is not comented in 2.8 so it works there without touching footer.htt
Ivan
edit2:
Here is css code, for backend.css and 2 files attached with tutorial how to use it.
Code:
#dragTable li {
list-style: none;
margin-top: 3px;
width: 95%;
list-style: none;
padding: 2px;
background-color:#F0F0F0;
border: #CCCCCC solid 1px;
color:#fff;
}
#dragResult {
width: 90%;
padding-left:10px;
}
«
Last Edit: February 28, 2010, 12:33:45 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [
1
]
2
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
-----------------------------
English
-----------------------------
=> Help & Support
-----------------------------
General
-----------------------------
=> WebsiteBaker Website Showcase
-----------------------------
English
-----------------------------
=> Modules
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
-----------------------------
General
-----------------------------
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
-----------------------------
General
-----------------------------
=> Security Announcements
-----------------------------
Deutsch (German)
-----------------------------
=> Hilfe/Support
-----------------------------
General
-----------------------------
=> Documentation
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
=> Module & Snippets
-----------------------------
English
-----------------------------
=> Archive (posts up to 2007)
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Deutsch (German)
-----------------------------
=> jQuery
=> Tutorials
=> Templates & Design
-----------------------------
English
-----------------------------
=> jQuery
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
===> Suggestions
-----------------------------
Deutsch (German)
-----------------------------
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
===> Vorschläge
-----------------------------
English
-----------------------------
===> Software bugs
-----------------------------
Deutsch (German)
-----------------------------
===> Softwarefehler
=====> Module / Extensions
-----------------------------
English
-----------------------------
=====> Modules / Extensions
-----------------------------
Deutsch (German)
-----------------------------
===> Erfahrungs und Testberichte
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...