PDA

View Full Version : Drag'n'Drop Planner



njcsolutions
27-02-11, 22:07
Hi guys, pretty good with PHP, Jquery and Mysql but one thing I just can't seem to master is drag'n'drop ajax type elements.

I have a planner for an online app I am making but just can't seem to get the right solution to enable the ability I want.

I need the ability for the user to drag blocks from one block to another each block represents a day and if a customer changed a day the user could move them easily.

http://www.njcsolutions.co.uk/ademo.jpg

The software/app is called Obi - Online Booking Interface, the person who helps me with this, can either be paid via a pre-arranged amount or have a cut of future sales of this app.

The app is already in use for over 2yrs in a Hotel, but this version is much more lightweight and will have loads of features.

Smifis
27-02-11, 22:52
So it's a simple matter of moving a pre-defined sized block (div/span) and placing it else where?

Pm me, ;)

njcsolutions
02-03-11, 23:18
Yes div block, but it would also need to check if that day/room is availiable before allowing to drop. I've got it working without the drap-drop already. Thanks for reply.

Smifis
02-03-11, 23:34
You would have to use some ajax to check against the db

andyn
04-03-11, 14:13
You would have to use some ajax to check against the db

I think he knows that, he's asking about implementing drag-and-drop functionality using jquery I think, as seen here:

http://ui-dev.jquery.com/demos/draggable/#constrain-movement

OP: not something I've done yet with jquery (though it does look interesting and I think i'll have a play with it soon). I can only suggest the link above, which seems to cover the basics.

Smifis
04-03-11, 14:23
Sorry, I miss read.

I though he said he already got the drag drop working.

There are a fair number of scripts out there which implaments drage + drop.

njcsolutions
05-03-11, 00:36
Hi guys, here's an old demo for you to look at, so you get a better understanding of what I'd like to do....many parts don't work is this demo but you'll see what I am on about, only works in IE with Compatibility Mode.

The new version I've developed is a much improved version of this, more light weight more AJAX type stuff also it works in all browsers with fixed column effect, you'll notice when you refresh the page the position stays the same this was all done about 4yrs ago when I first got into PHP/Jquery, I only had like two to three months experience before doing this, I sort of promised a client who paid upfront so I had to do it, otherwise pay him back amazing how fast I picked it all up really, it was all weird stuff I needed it to do like remember postions, fixed columns etc...

www.onlinebookinginterface.co.uk/citystop (http://www.onlinebookinginterface.co.uk/citystop)

username: staff / password: staff

when in click Room Plan at top you'll see the main planner, make sure compatibility mode is on and you'll get the fixed columns I did this about 4yrs ago,

I've added two bookings, so lets say for example I needed to move it to another hotel room, the old method would be click on it and open and select new room, I want to replace this with drag/drop.

thanks

The new version will have the following features

AJAX ROOM PLANNER
STAFF USER LEVELS / RECORDS ALL STAFF ACTIONS
PAYMENT SYSTEM / INVOICING
CRM / NEWSLETTER
INTERNET API FOR HOTEL'S WEBSITES
FACEBOOK TYPE TASKBAR WITH NOTES, MESSENGER DIFFERENT STAFF LOGGED IN ETC.. WARNINGS ETC.
REPORTING
I'VE ALSO IMPROVED THE SMARTY TEMPLATING I USED LAST TIME