SUSortable - how to show "waitbox" on drop event

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

SUSortable - how to show "waitbox" on drop event

Petr Fischer-3
Hi, is posible to show "lighboxed wait dialog" on drop event in  
sortable?
More generally - can I call my own javascript function on drop event  
in sortable?

Thanks for suggestion, pf
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUSortable - how to show "waitbox" on drop event

Gerhard Obermann
Hi!
 
You could use onStart: and onEnd: if you are using SUDraggable and SUDroppable!
For SUSortable you could only try:
onUpdate: anObject
 "Called when the drag ends and the Sortable's order is changed in any way. When dragging from one Sortable to another, the callback is called once on each Sortable."
 
br
Gerhard


 
On Mon, Apr 7, 2008 at 5:27 PM, Petr Fischer <[hidden email]> wrote:
Hi, is posible to show "lighboxed wait dialog" on drop event in sortable?
More generally - can I call my own javascript function on drop event in sortable?

Thanks for suggestion, pf
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUSortable - how to show "waitbox" on drop event

Petr Fischer-3
onUpdate is ocupied by:

html updater
        id: 'someId';
        triggerSortable: aComponentIdString callback: [ :values | "resorting  
code" ]
        callback: [ :renderer | "sub-component rendering code" ]

I am little messed now - where is the place for my little javascript  
function call eg.: showWaitDIVBox();

Thanks, pf

On 7.4.2008, at 20:09, Gerhard Obermann wrote:

> Hi!
>
> You could use onStart: and onEnd: if you are using SUDraggable and  
> SUDroppable!
> For SUSortable you could only try:
> onUpdate: anObject
>  "Called when the drag ends and the Sortable's order is changed in  
> any way. When dragging from one Sortable to another, the callback is  
> called once on each Sortable."
>
> br
> Gerhard
>
>
>
> On Mon, Apr 7, 2008 at 5:27 PM, Petr Fischer <[hidden email]
> > wrote:
> Hi, is posible to show "lighboxed wait dialog" on drop event in  
> sortable?
> More generally - can I call my own javascript function on drop event  
> in sortable?
>
> Thanks for suggestion, pf
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUSortable - how to show "waitbox" on drop event

Gerhard Obermann
In that case i think you need your own method!
Something like this!
 
triggerWithUpdateSortable: aString callback: aBlock
 self
  callback: [ :value |
   aBlock value: ((value findTokens: $,) collect: [ :each |
    canvas context callbacks at: each ifAbsent: [ nil ] ]) ]
  value: (SUSortable new id: aString; sequence; onUpdate: (SUStream on: 'showWaitDIVBox();'))
 


 
On Mon, Apr 7, 2008 at 8:50 PM, Petr Fischer <[hidden email]> wrote:
onUpdate is ocupied by:

html updater
       id: 'someId';
       triggerSortable: aComponentIdString callback: [ :values | "resorting code" ]
       callback: [ :renderer | "sub-component rendering code" ]

I am little messed now - where is the place for my little javascript function call eg.: showWaitDIVBox();

Thanks, pf


On 7.4.2008, at 20:09, Gerhard Obermann wrote:
Hi!

You could use onStart: and onEnd: if you are using SUDraggable and SUDroppable!
For SUSortable you could only try:
onUpdate: anObject
 "Called when the drag ends and the Sortable's order is changed in any way. When dragging from one Sortable to another, the callback is called once on each Sortable."

br
Gerhard



On Mon, Apr 7, 2008 at 5:27 PM, Petr Fischer <[hidden email]> wrote:
Hi, is posible to show "lighboxed wait dialog" on drop event in sortable?
More generally - can I call my own javascript function on drop event in sortable?

Thanks for suggestion, pf
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUSortable - how to show "waitbox" on drop event

Lukas Renggli
In reply to this post by Petr Fischer-3
> onUpdate is ocupied by:

You can concatenate scripts.

Furthermore you probably don't want to connect your script to the
sortable, but to the begin and end of the updater operation.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUSortable - how to show "waitbox" on drop event

Petr Fischer-3
In reply to this post by Gerhard Obermann
Tried with no luck. Function showWaitDIVBox(); was not called. pf

On 7.4.2008, at 21:03, Gerhard Obermann wrote:

> In that case i think you need your own method!
> Something like this!
>
> triggerWithUpdateSortable: aString callback: aBlock
>  self
>   callback: [ :value |
>    aBlock value: ((value findTokens: $,) collect: [ :each |
>     canvas context callbacks at: each ifAbsent: [ nil ] ]) ]
>   value: (SUSortable new id: aString; sequence; onUpdate: (SUStream  
> on: 'showWaitDIVBox();'))
>
>
>
>
> On Mon, Apr 7, 2008 at 8:50 PM, Petr Fischer <[hidden email]
> > wrote:
> onUpdate is ocupied by:
>
> html updater
>        id: 'someId';
>        triggerSortable: aComponentIdString callback: [ :values |  
> "resorting code" ]
>        callback: [ :renderer | "sub-component rendering code" ]
>
> I am little messed now - where is the place for my little javascript  
> function call eg.: showWaitDIVBox();
>
> Thanks, pf
>
>
> On 7.4.2008, at 20:09, Gerhard Obermann wrote:
> Hi!
>
> You could use onStart: and onEnd: if you are using SUDraggable and  
> SUDroppable!
> For SUSortable you could only try:
> onUpdate: anObject
>  "Called when the drag ends and the Sortable's order is changed in  
> any way. When dragging from one Sortable to another, the callback is  
> called once on each Sortable."
>
> br
> Gerhard
>
>
>
> On Mon, Apr 7, 2008 at 5:27 PM, Petr Fischer <[hidden email]
> > wrote:
> Hi, is posible to show "lighboxed wait dialog" on drop event in  
> sortable?
> More generally - can I call my own javascript function on drop event  
> in sortable?
>
> Thanks for suggestion, pf
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUSortable - how to show "waitbox" on drop event

Petr Fischer-3
In reply to this post by Lukas Renggli
On 7.4.2008, at 21:37, Lukas Renggli wrote:
>> onUpdate is ocupied by:
>
> You can concatenate scripts.
>
> Furthermore you probably don't want to connect your script to the
> sortable, but to the begin and end of the updater operation.
>
> Lukas

(sigh) how? Can I call simple JavaScript function (show wait dialog)  
before all ajax logic starts and request is sent to server? pf
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUSortable - how to show "waitbox" on drop event

Lukas Renggli
>  (sigh) how?

#,

> Can I call simple JavaScript function (show wait dialog) before
> all ajax logic starts and request is sent to server? pf

(html updater ...) before: (SUStream on: 'showWhatever()')

Note that there a lot of comments in methods like #,, #before:, #after:, etc.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside