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 this
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
>
Sounds plausible, I would like to have more information on that
please.
On 5 Okt., 08:14, "Alex McAuley"
wrote:
> Why not give your list a class name thats specific to the list and select
> with $$
> Alex Mcauleyhttp://www.thevacancymarket.com
>
>
>
> - Orig
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 in
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 lon
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
> index.php, that's where they're 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:
> > (x)clone3 > li>
>
> > When it should out
Right, also line number 34.
Now here is how its outputting in html:
(x)clone3
When it should output it like:
clone3(x)
Why does it give it a class of clone? And switching the places of
remove class and the id (line:117+).
--~--~-~--~~~---~--~~
You received this m
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 prototype
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 t
Well it is something wrong with index.php but strangely it's saying
that it occurs on this line:
... 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 create_clone one is
allready:
--~--~-~--~--
x27;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
t a BOM at the top of the file, it could 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'];
>
tent and
> expressing its own headers...
>
> If you remove the lines i asked u to add it will be fine
>
> Alex
>
> - Original Message -
> From: "WLQ"
> To: "Prototype & script.aculo.us"
> Sent: Friday, July 03, 2009 1:53 PM
> Subject: [Proto-Sc
urn id/int/string (not an array or
> object)
>
> - Original Message -
> From: "WLQ"
> To: "Prototype & script.aculo.us"
> Sent: Friday, July 03, 2009 12:51 PM
> Subject: [Proto-Scripty] Re: MySQL - order ID
orde
ID
>
d it then be:
> $data
are being set.) 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
&
; . $new->id;
}else{
header('HTTP/1.0 500 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
&g
ou to find it, because otherwise you will never stand on your
> > own here.
>
> > Walter
>
> > 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 arra
ou to find it, because otherwise you will never stand on your
> > own here.
>
> > Walter
>
> > 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 arra
> PHP 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 sorta
> PHP 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 sorta
> PHP 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 sorta
> PHP 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 sorta
t; if($master = MyActiveRecord::FindById('originals',$original)){
>
> ...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:
>
&
tials, also known as a DSN).
> * Have you got a MySQL table called clones?
> * Have you enabled error reporting on your server for your test pages,
> so you can see the PHP errors as they whiz by?
> * Have you ordered that fat book I recommended?
>
> Debugging PHP is like playing Whac
t doesn't do
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'
{
> header('Content-type: text/html; charset=utf-8');
> //this is the part you need:
> print 'item_' . $new->id;
> }else{
> header('HTTP/1.0 500 Server Error',true,500);
>
re 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
ust 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" should give you some feedback l
all there is to that. Anything else, I really recommend this
> book: ISBN:0-672-31784-2 (may be -3 now, don't know what the current
> version is). PHP and MySQL Web Development, by Luke Welling and Laura
> Thomson. (SAMS)
>
> Walter
>
> *Where by "best" I simp
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
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
/this replaces the call 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
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:
>
> >
. I mean no drag and
drop is working now. 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 c
; written off the top of my head (untested), 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 con
ssful drop, I would generate a new
> > element, insert it into the sortable, re-initialize the sortable, and
> > then the user would need to drag the new element into position within
> > the list.
>
> > What WLQ would like (what I would like, too) is something more direc
> // do the ajax request and send jsonarray to php to decode as normal ... on
> the php end you will have parent_id-element_id-element_contents
> ([0],[1],[2]).. after exploding on "-" .. so you foreach the json array on
> the php end and explode each itteration
>
> //
vley... or if you dropped on the end of the list the new item would
> > 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
> > Ale
ld be ID#1 & ID#3
> respectivley... or if you dropped on the end of the list the new item would
> 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
>
&g
I think Walter has given a very nice explanation on what I want.
"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 their place in the second list while the first
hat. That's the only 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 wrote:
> Seems like it's too complicated to be done. lol
>
> On May 28, 6:
re-initialize the sortable, and
> then the user would 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
> bac
Sent: Thursday, 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 lis
re it was dropped.
On May 28, 4:03 pm, WLQ wrote:
> Ok this onDrop function does the following:
>
> $result = $this->mMysqli->query('INSERT INTO #1sortable SELECT * FROM
> #2sortable WHERE id="' .
> $content . '"');
> $updatedLi
ew ID after your insert
> -- just get the value from your $result:
>
> $row = mysql_fetch_object($result);
> $id = $row->id;
>
> Build up your element as HTML, and insert it into the outer list with
> Element.insert('theElementYouDroppedAfter',{after:yourHTML});
&
f the latter, you can mock up the Ajax.Request part and see it
> running, but changing the POST to GET and requesting another jsbin
> page that just returns text).
>
> I need to see what you're trying before I can suggest another route
> for you to take.
>
> Walter
e foo table
> with the new order by setting the position column to match the key of
> that array.
>
> All three 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:
>
&g
Walter
>
> On May 24, 2009, 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 wrote:
> >> You have to ask the database for the next ID by creating a new record
> >> an
Walter
>
> On May 24, 2009, 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 wrote:
> >> You have to ask the database for the next ID by creating a new record
> >> an
s 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:
>
>
as seen in the Sortable.serialize Wiki
> 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
items id to 3, and all others after original 2
plus 1.
On May 5, 7:10 pm, Walter Lee Davis 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 on
> that it would involve making the clone on the initiation of the drag
> out of the donor list, place it (or not, cleaning up as needed) in the
> recipient list, and then restoring the original list.
>
> Walter
>
> On May 4, 2009, at 9:58 AM, WLQ wrote:
>
>
>
&g
ct they represent, and all elements within 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
> > o
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
--~--~
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
--~--~-~--~-
Element("li", { id: $(dragName).id
+added }))
$($(dragName).id+added).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 wr
g your
> favorite search engine.
> And look on the bright side, you'll learn something new by doing it
> yourself :-)
>
> Alex
>
> Am 02.05.2009 um 16:03 schrieb WLQ:
>
>
>
>
>
> > I don't really understand the syntax. Can you help me with cre
//wiki.github.com/madrobby/scriptaculous/sortable-serialize
> ) and send an Ajax call to your server.
>
> Alex
>
> Am 02.05.2009 um 15:32 schrieb WLQ:
>
>
>
>
>
> > But how can I make so it ads information to a database on drop?
>
> > On May 2, 1:55 pm, A
But how can I make so it ads information to a database on drop?
On May 2, 1:55 pm, Alexander Bock wrote:
> Take a look at this:http://www.ruby-forum.com/topic/158430("Can you
> make a Sortable also Droppable?")
>
> Alex
>
> Am 02.05.2009 um 12:44 schrieb WLQ:
&g
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 g
Me too. I'm kind of confused too, now that I've dig into it.
On Apr 30, 9:24 pm, Ananth Raghuraman wrote:
> I thought we were discussing the Prototype and Scriptaculous framework..what
> is Mochikit and how is it related to Proto-Scripty?
--~--~-~--~~~---~--~~
You
Thanks man! You've saved a lot of headache trouble!
Thanks, Bruno
+1 from Yan :)
--~--~-~--~~~---~--~~
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 prototype-scr
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
--~--~-~--
65 matches
Mail list logo