Hi *, is there a callback or something else to get noticed, if the user starts (stops) to drag an element of a sortable? I only found the onUpdate and onChange callbacks, but they don''t give the information I need. Thanks in advance, Tim
Tim, What kind of info are you looking for? onChange gives you the draggable element, which you can save locally to pass onto onUpdate. see http://www.ruby-forum.com/topic/73354#new george On 8/11/06, Tim Bellinghausen <tim-YhifRh7pDeDL13VPICy1DA@public.gmane.org> wrote:> Hi *, > > is there a callback or something else to get noticed, if the user starts > (stops) to drag an element of a sortable? I only found the onUpdate and > onChange callbacks, but they don''t give the information I need. > > Thanks in advance, > > Tim > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- "The wheel''s spinning, but the hamster''s dead" _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi, Am Freitag, den 11.08.2006, 08:42 -0700 schrieb glui2001:> What kind of info are you looking for?I need to know, when the dragging starts and stops, because I have an onMouseover event bind to the elements of my sortable and having the onMouseover constantly updating while the item is dragged is an massive performance drawback, so I want to disable the onMousover action, when the dragging starts, and to re-enable it, when the dragging has stopped. So my Problem is that the onChange handler reacts to late (if the order of the items changed) and the onUpdate is also not the right thing to get the Information, when the dragging stops, because maybe the order did not change, so onUpdate will not be called. I hope this made my problem a little bit clearer and thanks for an ideas, Tim
Vasilis Dourdounis
2006-Aug-14 11:47 UTC
Re: Sortable callback, when dragging starts/stops
I had a similar issue. I''m not sure though the following is the best way to solve it, but does exactly what you describe. -------------------------------------------------------------------- var MyStartEndObserver = Class.create(); MyStartEndObserver.prototype = { initialize: function(element) { this.element = $(element); }, onStart: function() { alert(''Let\''s go!''); }, onEnd: function() { alert(''I\''m done...''); } } Sortable.create("MySortable", {dropOnEmpty:true,tag:''div'',containment:["MySortable"],constraint:false, ghosting: true}); Draggables.addObserver(new MyStartEndObserver($(''MySortable_element_1''))) Draggables.addObserver(new MyStartEndObserver($(''MySortable_element_2''))) Draggables.addObserver(new MyStartEndObserver($(''MySortable_element_3''))) -------------------------------------------------------------------- Hope it helps. Cheers, Vassilis On 8/14/06, Tim Bellinghausen <tim-YhifRh7pDeDL13VPICy1DA@public.gmane.org> wrote:> > Hi, > > Am Freitag, den 11.08.2006, 08:42 -0700 schrieb glui2001: > > What kind of info are you looking for? > > I need to know, when the dragging starts and stops, because I have an > onMouseover event bind to the elements of my sortable and having the > onMouseover constantly updating while the item is dragged is an massive > performance drawback, so I want to disable the onMousover action, when > the dragging starts, and to re-enable it, when the dragging has stopped. > So my Problem is that the onChange handler reacts to late (if the order > of the items changed) and the onUpdate is also not the right thing to > get the Information, when the dragging stops, because maybe the order > did not change, so onUpdate will not be called. > > I hope this made my problem a little bit clearer and thanks for an > ideas, > > Tim > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi, On 08/14/2006, Vasilis Dourdounis wrote:> I''m not sure though the following is the best way to solve it, but > does exactly what you describe.yes, your solution gives me the information I need, but now I am wondering why the onStart and onStop handlers get called for every item of the sortable and not just the one being dragged. That is no big problem for me, but since this Observer seems to have a small, but visible, performance drawback, I would be happy, if anyone can explain why this happen or better give me a hint how to change this behaviour. I will do some more testing on Wednesday since tomorrow is a public holiday in Luxembourg. Thanks for your help, Tim
Hi Tim... I''m sorry that I''m not replying to the actual topic, but could you please use "reply-to" in your email program so you don''t break the threading... When I joined the list I had my own etiquette issues which others politely corrected for me (right Jeremy?)... so don''t feel like I''m singling you out or anything. It''s just that from this message I can''t see the previous messages (I''d have to go dig through my deleted items at this point to find the example code you''re referring to), which makes it hard for me to help out (IF I knew the answer...) On 8/14/06, Tim Bellinghausen <tim-YhifRh7pDeDL13VPICy1DA@public.gmane.org> wrote:> > Hi, > > On 08/14/2006, Vasilis Dourdounis wrote: > > I''m not sure though the following is the best way to solve it, but > > does exactly what you describe. > > yes, your solution gives me the information I need, but now I am > wondering why the onStart and onStop handlers get called for every item > of the sortable and not just the one being dragged. That is no big > problem for me, but since this Observer seems to have a small, but > visible, performance drawback, I would be happy, if anyone can explain > why this happen or better give me a hint how to change this behaviour. > > I will do some more testing on Wednesday since tomorrow is a public > holiday in Luxembourg. > > Thanks for your help, > > Tim > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ryan Gahl wrote:> When I joined the list I had my own etiquette issues which others politely > corrected for me (right Jeremy?)... so don''t feel like I''m singling you out > or anything. It''s just that from this message I can''t see the previous > messages (I''d have to go dig through my deleted items at this point to find > the example code you''re referring to), which makes it hard for me to help > out (IF I knew the answer...)Yet you''re still top-posting. Apparently, we haven''t managed to break you of all your old habits. :) Todd
Huh? I use gmail now... it''s supposed to handle this... When you hit reply, you''re supposed to type at the top of the message, that''s what is natural (I would never expect to have to scroll to the bottom to see someone''s reply). When you click in the reply box in gmail (or any other mail program I''ve used) it puts your cursor right up at the top. I swear you use some weird email replying style... I''ve always always done it this way, and have never personally witnessed another person who did not... I really don''t think I email wrong my man. I mean gmail always shows me quoted text correctly, is your mail program not? You''re making me feel like an insane person, lol... On 8/15/06, Todd Ross <rails-spinoffs-25kFIyuv2iRiLUuM0BA3LQ@public.gmane.org> wrote:> > Ryan Gahl wrote: > > When I joined the list I had my own etiquette issues which others > politely > > corrected for me (right Jeremy?)... so don''t feel like I''m singling you > out > > or anything. It''s just that from this message I can''t see the previous > > messages (I''d have to go dig through my deleted items at this point to > find > > the example code you''re referring to), which makes it hard for me to > help > > out (IF I knew the answer...) > > Yet you''re still top-posting. Apparently, we haven''t managed to break > you of all your old habits. :) > > Todd > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Gmail is great for mailing lists. Gotta love it. On 8/15/06, Ryan Gahl <ryan.gahl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Huh? I use gmail now... it''s supposed to handle this... > > When you hit reply, you''re supposed to type at the top of the message, > that''s what is natural (I would never expect to have to scroll to the bottom > to see someone''s reply). When you click in the reply box in gmail (or any > other mail program I''ve used) it puts your cursor right up at the top. I > swear you use some weird email replying style... I''ve always always done it > this way, and have never personally witnessed another person who did not... > I really don''t think I email wrong my man. > > I mean gmail always shows me quoted text correctly, is your mail program > not? You''re making me feel like an insane person, lol... > > > On 8/15/06, Todd Ross <rails-spinoffs-25kFIyuv2iRiLUuM0BA3LQ@public.gmane.org> wrote: > > Ryan Gahl wrote: > > > When I joined the list I had my own etiquette issues which others > politely > > > corrected for me (right Jeremy?)... so don''t feel like I''m singling you > out > > > or anything. It''s just that from this message I can''t see the previous > > > messages (I''d have to go dig through my deleted items at this point to > find > > > the example code you''re referring to), which makes it hard for me to > help > > > out (IF I knew the answer...) > > > > Yet you''re still top-posting. Apparently, we haven''t managed to break > > you of all your old habits. :) > > > > Todd > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >
Vasilis Dourdounis
2006-Aug-15 15:10 UTC
Re: Sortable callback, when dragging starts/stops
Hello again, On some further research I noticed that, instead of adding the observer to every element, you could simply do the following: Draggables.addObserver(new MyStartEndObserver($(''MySortable''))) Handlers will be called only once, but this gives you no information on which element is dragged. If you need that information you could change the handlers in the following way: -------------------------------------------------------------------------------------- .... onStart: function() { if (Draggables.activeDraggable.element == this.element) { alert(''Let\''s go! ('' + this.element.id + '')''); } }, .... ---------------------------------------------------------------------------------- Vassilis On 8/14/06, Tim Bellinghausen <tim-YhifRh7pDeDL13VPICy1DA@public.gmane.org> wrote:> > Hi, > > On 08/14/2006, Vasilis Dourdounis wrote: > > I''m not sure though the following is the best way to solve it, but > > does exactly what you describe. > > yes, your solution gives me the information I need, but now I am > wondering why the onStart and onStop handlers get called for every item > of the sortable and not just the one being dragged. That is no big > problem for me, but since this Observer seems to have a small, but > visible, performance drawback, I would be happy, if anyone can explain > why this happen or better give me a hint how to change this behaviour. > > I will do some more testing on Wednesday since tomorrow is a public > holiday in Luxembourg. > > Thanks for your help, > > Tim > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hello Vasilis, Am Dienstag, den 15.08.2006, 18:10 +0300 schrieb Vasilis Dourdounis:> On some further research I noticed that, instead of adding the > observer to every element, you could simply do the following:thanks that looks like the perfect solution to me. I''ll try it later, but I think this will work perfectly for me. Greets, Tim P.S.: I was quite confused, why I broke the threading, because I always use the reply to function to send my replies. If there is really a problem and this was not an single event, I must check my mail client, to investigate, what goes wrong. But since this client does not support threading, I don''t see it here. By the way: Are there any suggestions for an Linux mail client with threading support?
Ryan Gahl wrote:> Huh? I use gmail now... it''s supposed to handle this... > > When you hit reply, you''re supposed to type at the top of the message, > that''s what is natural (I would never expect to have to scroll to the > bottom > to see someone''s reply). When you click in the reply box in gmail (or any > other mail program I''ve used) it puts your cursor right up at the top. I > swear you use some weird email replying style... I''ve always always done it > this way, and have never personally witnessed another person who did not... > I really don''t think I email wrong my man. > > I mean gmail always shows me quoted text correctly, is your mail program > not? You''re making me feel like an insane person, lol...I don''t think that because you use a product that does things one way means that it''s the right way. I''m definitely not of the opinion that Gmail is the pinnacle of user interface design. The other half (it''s natural, you wouldn''t expect to have to scroll, etc.) are preferences / training. We could have a whole debate about that, but it''s already been done here: http://en.wikipedia.org/wiki/Posting_styles I was (mostly) teasing anyway. At work, I use Lotus Notes and it''s a *real* pain to do anything but top post. I like intermixing my comments with other peoples text as it''s easier to get the contextual meaning. Again, it''s just a preference. Todd
Todd Ross wrote:> Ryan Gahl wrote: >> Huh? I use gmail now... it''s supposed to handle this... >> >> When you hit reply, you''re supposed to type at the top of the message, >> that''s what is natural (I would never expect to have to scroll to the >> bottom >> to see someone''s reply).I don''t necessarily like scrolling to the bottom to get to the response. I prefer inline responses. It''s usually a very rare case that you can answer every point in someone''s email coherently in one spot. What I really hate is reading someone''s reply and then having to scroll farther down to read what questions were being answered. It''s like reading a conversation backwards. Now that is unnatural.>>When you click in the reply box in gmail (or any >> other mail program I''ve used) it puts your cursor right up at the top.Actually most mail clients make this configurable. But it makes sense to put the cursor at the top if you respond inline, since the top is a good a place to start as any.>> I >> swear you use some weird email replying style... I''ve always always done it >> this way, and have never personally witnessed another person who did not...Wow, then you''re pretty new to email aren''t you.>> I really don''t think I email wrong my man. >> >> I mean gmail always shows me quoted text correctly, is your mail program >> not? You''re making me feel like an insane person, lol...Just because Gmail shows the quotes a certain way doesn''t mean that it''s the right way. It does a decent job of removing the quoted text when someone sends you a top-posted email (I think it''s trying to compensate for people who never learned to in-line post :)> I don''t think that because you use a product that does things one way > means that it''s the right way. I''m definitely not of the opinion that > Gmail is the pinnacle of user interface design.[snip]> I like intermixing my comments with other peoples text as it''s easier to > get the contextual meaning. Again, it''s just a preference.++ -- Michael Peters Developer Plus Three, LP
Lol, I am a noob to email... too funny. Yes, let''s debate this :-0 Oh, and btw, Tim... I could have been wrong about the threading thing. What I think actually happened was I had previously deleted the conversation from my inbox, so when you sent the next message it looked like there was no past thread... but now I see that at the bottom gmail is telling me I have X deleted message in this conversation and gives me the option to recover them from the trash... So my apologies :-) On 8/16/06, Michael Peters <mpeters-aUYv5hkjw45l57MIdRCFDg@public.gmane.org> wrote:> > > > Todd Ross wrote: > > Ryan Gahl wrote: > >> Huh? I use gmail now... it''s supposed to handle this... > >> > >> When you hit reply, you''re supposed to type at the top of the message, > >> that''s what is natural (I would never expect to have to scroll to the > >> bottom > >> to see someone''s reply). > > I don''t necessarily like scrolling to the bottom to get to the response. I > prefer inline responses. It''s usually a very rare case that you can answer > every > point in someone''s email coherently in one spot. What I really hate is > reading > someone''s reply and then having to scroll farther down to read what > questions > were being answered. It''s like reading a conversation backwards. Now that > is > unnatural. > > >>When you click in the reply box in gmail (or any > >> other mail program I''ve used) it puts your cursor right up at the top. > > Actually most mail clients make this configurable. But it makes sense to > put the > cursor at the top if you respond inline, since the top is a good a place > to > start as any. > > >> I > >> swear you use some weird email replying style... I''ve always always > done it > >> this way, and have never personally witnessed another person who did > not... > > Wow, then you''re pretty new to email aren''t you. > > >> I really don''t think I email wrong my man. > >> > >> I mean gmail always shows me quoted text correctly, is your mail > program > >> not? You''re making me feel like an insane person, lol... > > Just because Gmail shows the quotes a certain way doesn''t mean that it''s > the > right way. It does a decent job of removing the quoted text when someone > sends > you a top-posted email (I think it''s trying to compensate for people who > never > learned to in-line post :) > > > I don''t think that because you use a product that does things one way > > means that it''s the right way. I''m definitely not of the opinion that > > Gmail is the pinnacle of user interface design. > > [snip] > > > I like intermixing my comments with other peoples text as it''s easier to > > get the contextual meaning. Again, it''s just a preference. > > ++ > > -- > Michael Peters > Developer > Plus Three, LP > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi Ryan, Am Mittwoch, den 16.08.2006, 09:51 -0500 schrieb Ryan Gahl:> Oh, and btw, Tim... I could have been wrong about the threading > thing.I am glad to read this, but everything else would have me really irritated, because both the "In-Reply-To" and the "References" header are present in my mails. Greets, Tim P.S.: And I am also no fan of TOFU quotings, back from the good old usenet times :-)