So I've got a sortable list. Now what I want to do is to have ability
to drop items on it.
Like: being able to drop other items from other lists.
Here's to create a sortable list: Sortable.create(tasksList,
{tag:li});
So how can I drop other elements into it?
Thanks, Yan
So here's what I need:
I need a sortable list which is driven of MySQL database (with
autoupdate when order of items changes). And then I need a second
sortable list (or anything that can be dropped on the first list).
So if you drag and drop an item from the second list to the first.
This item
).innerHTML = $(dragName).innerHTML
Sortable.destroy(fList);
Sortable.create(fList, {constraint:false});
}
I think there might be a syntax error.
On May 2, 4:25 pm, WLQ maybe...@gmail.com wrote:
Yeah well, I'm working on it for a week now, still can't get what I
want :)
Cheers
So I have to sortable lists, each controlled by MySQL database. Now
what I want to do is when I drop an item from one list to another.
This items row will be added to that table.
So I need a somewhat script that will add a new row based on the
droppable item row.
Thanks, Yan
So I've made all the fancy stuff, now the hardest one. I have made the
order Id change in the sortable and it works. But what about when you
drag an item from other sortable? How to program it so it sees between
which Ids it pasts an item, and change ids for items as necessary?
Thanks, Yan
a list should
(must?) be instances of the same Model.
Walter
On May 3, 2009, at 10:06 AM, WLQ wrote:
So I've made all the fancy stuff, now the hardest one. I have made the
order Id change in the sortable and it works. But what about when you
drag an item from other sortable? How
id to 3, and all others after original 2
plus 1.
On May 5, 7:10 pm, Walter Lee Davis wa...@wdstudio.com wrote:
On May 5, 2009, at 12:54 PM, WLQ wrote:
Well that's what I've done already, but how to clone an item, and at
the same time change it ID to the necessary one. That's what's
page:http://wiki.github.com/madrobby/scriptaculous/sortable-serialize
In my cut-down example, I have an Ajax call to go out to the database
and get a new ID. That's the only place new IDs can come from in my
model.
Walter
On May 5, 2009, at 1:49 PM, WLQ wrote:
Does it have
the database for a new widget, and
returns the numerical ID of that new widget, then creates a cloned
object in the Sortable with that ID and returns the original to its
place (revert: true).
Walter
On May 5, 2009, at 2:11 PM, WLQ wrote:
But how
can it know on drop, what id to give
, at 11:56 AM, WLQ wrote:
I can't get your script to work, don't know why...
On 5 Maj, 20:21, Walter Lee Davis wa...@wdstudio.com wrote:
You have to ask the database for the next ID by creating a new record
and reading its response. That's what the Ajax Request bit was in my
example. When
, at 11:56 AM, WLQ wrote:
I can't get your script to work, don't know why...
On 5 Maj, 20:21, Walter Lee Davis wa...@wdstudio.com wrote:
You have to ask the database for the next ID by creating a new record
and reading its response. That's what the Ajax Request bit was in my
example. When
of these things are done by one script in my application,
your mileage will necessarily vary.
Walter
On May 25, 2009, at 7:23 AM, WLQ wrote:
Seems like I can't connect your script, I made to divs with cart and
timeline. But nothing happens, can you tell me what else to create
apart
text).
I need to see what you're trying before I can suggest another route
for you to take.
Walter
On May 25, 2009, at 12:04 PM, WLQ wrote:
Yeah, but what I don't understand is how your script connects with a
database, I mean what are the cart, timeline, cart-active... are? I've
as previous,
and it will tear down the old Sortable (in memory) and replace it with
a new one that knows what order these things are currently in.
Walter
On May 28, 2009, at 7:13 AM, WLQ wrote:
After it clones a row from one table to another, the list updates. But
I want not only
it was dropped.
On May 28, 4:03 pm, WLQ maybe...@gmail.com wrote:
Ok this onDrop function does the following:
$result = $this-mMysqli-query('INSERT INTO #1sortable SELECT * FROM
#2sortable WHERE id=' .
$content . '');
$updatedList = $this-Build#1();
return $updatedList
, May 28, 2009 5:01 PM
Subject: [Proto-Scripty] Re: MySQL - order ID
Yes, that very limited case is simple. What WLQ is trying to do is
have two lists of things, be able to drag an unlimited number of
copies from the first list into the second list, and have the dropped
elements keep
need to drag the new element into position within
the list.
What WLQ would like (what I would like, too) is something more direct.
A set of draggable options that can be dragged into a sortable, revert
back to their parent, and leave a clone behind in the position within
the list where
workaround I
think can be found. So maybe we should focus to find something like
that, instead of looking inside of scriptaculous, that does not do
such a thing?
On May 28, 7:25 pm, WLQ maybe...@gmail.com wrote:
Seems like it's too complicated to be done. lol
On May 28, 6:58 pm, Walter Lee Davis wa
become ID#3 and so on. am i on the ball so far ?
If i am then i maintain that its not as hard as you think it is
If not please point out where i am missing
Thanks
Alex
- Original Message -
From: WLQ maybe...@gmail.com
To: Prototype script.aculo.us prototype-scriptaculous
Thanks
Alex
- Original Message -
From: WLQ maybe...@gmail.com
To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, May 29, 2009 1:25 PM
Subject: [Proto-Scripty] Re: MySQL - order ID
I think Walter has given a very nice explanation on what I want
.. or i can write an example for you 2morrow and give
you the sourcecode
HTH
ALex
- Original Message -
From: WLQ maybe...@gmail.com
To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, May 29, 2009 1:48 PM
Subject: [Proto-Scripty] Re: MySQL - order ID
the list.
What WLQ would like (what I would like, too) is something more direct.
A set of draggable options that can be dragged into a sortable, revert
back to their parent, and leave a clone behind in the position within
the list where they were dropped. This is not possible as far as I've
), it is a complete example of
how you would insert the database calls into the basic event framework
imposed by Sortable and its callbacks.
Walter
On Jun 5, 2009, at 8:50 AM, WLQ wrote:
I have a hard time connecting your js with a database. Could you give
an example of what I should
. When I've connected it to my local server.
WLQ,
You really have received **GREAT** advice along with ample code to get
this working (with a bit of work on your end). It is not an overly
complicated request where no mere mortal can figure out/implement.
Especially with all the code that has
missing ) after argument list
setupSortable.defer();\n
That's by your
http://jsbin.com/emuya/edit
JS script.
Please post a link and I'll take a look. What does Firebug say when
you run it?
Walter
On Jun 6, 2009, at 6:48 AM, WLQ wrote:
Walter, why ain't the script you've post working
to Prototype's identify() function
clone.id = transport.responseText;
}}); -- right here
//re-build the list to include the new cloned element
setupSortable.defer();
Walter
On Jun 6, 2009, at 2:55 PM, WLQ wrote:
missing ) after argument list
setupSortable.defer();\n
Here's a list of problems. (I use database to drive the second
sortable too).
Now, if you drag an item from originals to clones any item but not the
first, it will be cloned and reverted. But you wont be able to move
it (inside of cloned sortable), when you drag and drop one more item,
that item
I've followed your link and tried to build the list as you suggested
there. But it gives me.
ERRNO: 2 TEXT: Invalid argument supplied for foreach() LOCATION: ...,
line 7
http://jsbin.com/elocu/edit
Here's a list of problems. (I use database to drive the second
sortable too).
Now, if you
on things here) then you won't get anything out of
Sortable.serialize() -- not even an error.
Walter
On Jun 13, 2009, at 12:29 PM, WLQ wrote:
As you've noted the post should give you some feedback like this:
whatever_your_list_ID_is = Array(
0 = 12,
1 = 13,
2 = 24
in it followed by a unique number
(which should be the ID column value from your database, just to tie a
bow on things here) then you won't get anything out of
Sortable.serialize() -- not even an error.
Walter
On Jun 13, 2009, at 12:29 PM, WLQ wrote:
As you've noted the post
;
}else{
header('HTTP/1.0 500 Server Error',true,500);
exit;
}}else{
header('HTTP/1.0 404 Missing',true,404);
}
Walter
On Jun 17, 2009, at 12:57 PM, WLQ wrote:
I'm quite positive that it's something wrong with your script, because
is change the MySQL table itself.
You need a second parenthesis at the end of the second line. Do you
see it?
Walter
On Jun 28, 2009, at 7:19 AM, WLQ wrote:
Parse error between:
$original = $_POST['original'];
if($master = MyActiveRecord::FindById('originals',$original){
We're
recommended?
Debugging PHP is like playing Whack-a-Mole. You fix one thing, and
another pops up. You iterate, in other, more dainty words.
Walter
On Jun 28, 2009, at 12:04 PM, WLQ wrote:
Also I've used that clone.php you gave, the only thing it doesn't do
is change the MySQL table itself
)){
...if it finds a table called 'originals' in your database, will
return the row with the ID matching $original (or false).
Walter
On Jun 29, 2009, at 12:25 PM, WLQ wrote:
It says - Class originals does not exist
Where does the originals class comes from? What is the originals from
the code
is a requirement to use the MAR system, it can't divine everything
for you.
Walter
On Jul 1, 2009, at 5:57 AM, WLQ wrote:
Right, shouldn't then that be 'widgets'? Because the table of our
original sortable list were controlled by the widgets table. So like:
if($master = MyActiveRecord
is a requirement to use the MAR system, it can't divine everything
for you.
Walter
On Jul 1, 2009, at 5:57 AM, WLQ wrote:
Right, shouldn't then that be 'widgets'? Because the table of our
original sortable list were controlled by the widgets table. So like:
if($master = MyActiveRecord
is a requirement to use the MAR system, it can't divine everything
for you.
Walter
On Jul 1, 2009, at 5:57 AM, WLQ wrote:
Right, shouldn't then that be 'widgets'? Because the table of our
original sortable list were controlled by the widgets table. So like:
if($master = MyActiveRecord
is a requirement to use the MAR system, it can't divine everything
for you.
Walter
On Jul 1, 2009, at 5:57 AM, WLQ wrote:
Right, shouldn't then that be 'widgets'? Because the table of our
original sortable list were controlled by the widgets table. So like:
if($master = MyActiveRecord
On Jul 1, 2009, at 10:31 AM, WLQ wrote:
But here's what I get in error:
array_shift() [function.array-shift]: The argument should be an array
On this line:
array_shift($data);
Yes. Like any example that you will ever find on the Web, this one
needs to be adjusted to match your
Server Error',true,500);
exit;
}
}else{
header('HTTP/1.0 404 Missing',true,404);
}
You're solving the wrong problem, then. Keep looking, it's right there
in front of you.
Walter
On Jul 1, 2009, at 1:36 PM, WLQ wrote:
I understand I should put
.) Ask yourself what it's
supposed to be carrying, and see if you can spot what it really is
instead.
Here's a hint: In line two, I assigned a value to a variable, but on
line 3, I forgot to use it and used something else instead.
Walter
On Jul 2, 2009, at 6:09 AM, WLQ wrote
-
From: WLQ maybe...@gmail.com
To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, July 03, 2009 1:53 PM
Subject: [Proto-Scripty] Re: MySQL - order
Well
widgets Object ( [id] = 3 [name] = 3.00 [description] = 3
[position] = 3 [updated_at] = 2009-06
be that.
Walter
On Jul 3, 2009, at 9:54 AM, WLQ wrote:
Unfortunately it's not them who create a problem.
THis is the code I use:
$original = $_POST['original'];
if($master = MyActiveRecord::FindById('widgets',$original)){
$data = get_object_vars($master);
array_shift
an error in
there that isn't being properly trapped, although I'm not seeing it if
that's the case.
Walter
On Jul 3, 2009, at 11:31 AM, WLQ wrote:
Could the require_once do something? Because this is the only
outside content I have. In particularly it's the index.php - so this
way
Well it is something wrong with index.php but strangely it's saying
that it occurs on this line:
script src=itanu_files/prototype.js/script
... but why do you really need to change the header:
header('Content-type: text/html; charset=utf-8');
if in my index.php that's included in the
I haven't really done anything there, it's just the test page. I've
just combined everything:
http://www.pastie.org/533394
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to
index.php
http://www.pastie.org/533394
create_clone.php
http://www.pastie.org/533425
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this group, send email to
Right, also line number 34.
Now here is how its outputting in html:
li class=clone id=item_92span class=remove(x)/spanclone3/
li
When it should output it like:
li id=item_92clone3span class=remove(x)/span
Why does it give it a class of clone? And switching the places of
remove class and the id
coming from.
Walter
On Jul 3, 2009, at 1:43 PM, WLQ wrote:
Right, also line number 34.
Now here is how its outputting in html:
li class=clone id=item_92span class=remove(x)/spanclone3/
li
When it should output it like:
li id=item_92clone3span class=remove(x)/span
Why does
Should you not open another question? As it's not related to the
current question of this post.
Hello,
I'm nearing the end of a decent sized project for a hardware company where
I've been creating a virtual display rack filler. They'd pick what items
they want from the floor, and drag
So many non related posts here, so I've thought of throwing in one
too. It's about the script you gave me.
Now I've tried to manipulate it as far as I could, but still could't
get the results I was waiting for. Because you know it better and
really I have no idea in how to accomplish it, for a
The question is, how can I tell containment to include all lists with
Id's of someid_somenumber.
Somenumber being any number, let's say I've got 20 lists with the Id
of someid_{ID}.
So I don't really know the full ID of the list. I want to be able to
receive items from the lists id of which
I have no idea on how it could be done, looking through the Url
provided, this is as far I've gone.
var setupSortable = function(){
Sortable.create = $$('new Selector(123',{
containment: $$('Selector#findElements(root)'),
http://prototypejs.org
On Oct 6, 7:45 am, WLQ maybe
I have to sortable menus, with drag and drop on one other. When I drag
the element from the list with ghosting=true to another element, you
don't see where you gonna drop the item (between which items). How can
ghosting be true but the menu still work like false.
Thanks, Yan
--
You received
54 matches
Mail list logo