answer: and jQuery

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

answer: and jQuery

Malte Grunwald
Hello everybody.

My problem:

I  am working with a JQDialog and when the "okay" button is clicked, I want to use a callback: and answer: to get back to the go method in my Task class.

Example:

renderOptionsOn: html id: anIdString width: anInteger
    (html div)
        id: anIdString;
        script: (((html jQuery id: anIdString) dialog)
                    title: 'test';
                    autoOpen: false;
                    modal: true;
                    width: anInteger;
                    height: 'auto';
                    resizable: false;
                    addButton: 'Okay'
                        do: (html jQuery ajax script:
                                    [:s |
                                    s
                                        << (s jQuery id: anIdString , 'form') serialize;
                                        << (s jQuery id: #Settings) dialog close;
                                        << (s jQuery ajax callback: [self answer: self something])]);
                    addButton: (self textAt: #CancelTx) do: html jQuery new dialog close);
                   
        with:
                [self
                    renderInputsOn: html
                    commands: self settings
                    id: anIdString,'test']


I read a comment of Lukas Renggli from 2010, it says it is not possible to answer: from jQuery is this still up to date?
Does anyone have an idea how I can solve the problem?

Thank you!

Regards

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

RE: answer: and jQuery

Robert Sirois
Ajax is asynchronous. In Seaside's case, it is independent of the regular call/answer continuation stack. I can't remember if it works or not, but if you reload the page, has your component answered after firing the ajax call with #answer?

RS


Date: Thu, 15 Mar 2012 08:59:41 +0100
From: [hidden email]
To: [hidden email]
Subject: [Seaside] answer: and jQuery

Hello everybody.

My problem:

I  am working with a JQDialog and when the "okay" button is clicked, I want to use a callback: and answer: to get back to the go method in my Task class.

Example:

renderOptionsOn: html id: anIdString width: anInteger
    (html div)
        id: anIdString;
        script: (((html jQuery id: anIdString) dialog)
                    title: 'test';
                    autoOpen: false;
                    modal: true;
                    width: anInteger;
                    height: 'auto';
                    resizable: false;
                    addButton: 'Okay'
                        do: (html jQuery ajax script:
                                    [:s |
                                    s
                                        << (s jQuery id: anIdString , 'form') serialize;
                                        << (s jQuery id: #Settings) dialog close;
                                        << (s jQuery ajax callback: [self answer: self something])]);
                    addButton: (self textAt: #CancelTx) do: html jQuery new dialog close);
                   
        with:
                [self
                    renderInputsOn: html
                    commands: self settings
                    id: anIdString,'test']


I read a comment of Lukas Renggli from 2010, it says it is not possible to answer: from jQuery is this still up to date?
Does anyone have an idea how I can solve the problem?

Thank you!

Regards

_______________________________________________ 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: answer: and jQuery

Bany, Michel
FWIW, we have been successfully using the JQuery extensions from Nick Ager (JQuery-Extensions-NickAger.2.mcz) in VisualWorks and I believe it would do what you are after. It allows you to "call" a component in a JQuery dialog and get a response object from the component when the dialog closes. Works a bit like the now old-fashioned #lightbox: method.
 
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Robert Sirois
Sent: jeudi, 15. mars 2012 15:14
To: [hidden email]
Subject: RE: [Seaside] answer: and jQuery

Ajax is asynchronous. In Seaside's case, it is independent of the regular call/answer continuation stack. I can't remember if it works or not, but if you reload the page, has your component answered after firing the ajax call with #answer?

RS


Date: Thu, 15 Mar 2012 08:59:41 +0100
From: [hidden email]
To: [hidden email]
Subject: [Seaside] answer: and jQuery

Hello everybody.

My problem:

I  am working with a JQDialog and when the "okay" button is clicked, I want to use a callback: and answer: to get back to the go method in my Task class.

Example:

renderOptionsOn: html id: anIdString width: anInteger
    (html div)
        id: anIdString;
        script: (((html jQuery id: anIdString) dialog)
                    title: 'test';
                    autoOpen: false;
                    modal: true;
                    width: anInteger;
                    height: 'auto';
                    resizable: false;
                    addButton: 'Okay'
                        do: (html jQuery ajax script:
                                    [:s |
                                    s
                                        << (s jQuery id: anIdString , 'form') serialize;
                                        << (s jQuery id: #Settings) dialog close;
                                        << (s jQuery ajax callback: [self answer: self something])]);
                    addButton: (self textAt: #CancelTx) do: html jQuery new dialog close);
                   
        with:
                [self
                    renderInputsOn: html
                    commands: self settings
                    id: anIdString,'test']


I read a comment of Lukas Renggli from 2010, it says it is not possible to answer: from jQuery is this still up to date?
Does anyone have an idea how I can solve the problem?

Thank you!

Regards

_______________________________________________ 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: answer: and jQuery

Malte Grunwald
Thank you so far,

the nick ager extension, sounds good, but I am working on Dolphin, so I first have to implement it in Dolphin.
Another problem with dolphin is, the call: method does not work... so I control my components with
show: something onAnswer: [show: something onAnswer:[...]]. It is the only way it works with dolphin as I know.

What I tried is to change the value of a variable with ajax  in the dialog and then refresh the component with javascript.
I have this code at the beginning of the renderContentOn:
html form:
            [self variable
                ifTrue:
                    [html XXXX callback:
                            [self answer: self soemthing]]].


Do you have maybe an idea, what I can insert for XXXX to create an event, to trigger the callback  without an actual user interaction?

Thank you guys!

Am 15.03.2012 15:25, schrieb Bany, Michel:
FWIW, we have been successfully using the JQuery extensions from Nick Ager (JQuery-Extensions-NickAger.2.mcz) in VisualWorks and I believe it would do what you are after. It allows you to "call" a component in a JQuery dialog and get a response object from the component when the dialog closes. Works a bit like the now old-fashioned #lightbox: method.
 
 


From: [hidden email] [[hidden email]] On Behalf Of Robert Sirois
Sent: jeudi, 15. mars 2012 15:14
To: [hidden email]
Subject: RE: [Seaside] answer: and jQuery

Ajax is asynchronous. In Seaside's case, it is independent of the regular call/answer continuation stack. I can't remember if it works or not, but if you reload the page, has your component answered after firing the ajax call with #answer?

RS


Date: Thu, 15 Mar 2012 08:59:41 +0100
From: [hidden email]
To: [hidden email]
Subject: [Seaside] answer: and jQuery

Hello everybody.

My problem:

I  am working with a JQDialog and when the "okay" button is clicked, I want to use a callback: and answer: to get back to the go method in my Task class.

Example:

renderOptionsOn: html id: anIdString width: anInteger
    (html div)
        id: anIdString;
        script: (((html jQuery id: anIdString) dialog)
                    title: 'test';
                    autoOpen: false;
                    modal: true;
                    width: anInteger;
                    height: 'auto';
                    resizable: false;
                    addButton: 'Okay'
                        do: (html jQuery ajax script:
                                    [:s |
                                    s
                                        << (s jQuery id: anIdString , 'form') serialize;
                                        << (s jQuery id: #Settings) dialog close;
                                        << (s jQuery ajax callback: [self answer: self something])]);
                    addButton: (self textAt: #CancelTx) do: html jQuery new dialog close);
                   
        with:
                [self
                    renderInputsOn: html
                    commands: self settings
                    id: anIdString,'test']


I read a comment of Lukas Renggli from 2010, it says it is not possible to answer: from jQuery is this still up to date?
Does anyone have an idea how I can solve the problem?

Thank you!

Regards

_______________________________________________ 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: answer: and jQuery

Malte Grunwald
In reply to this post by Bany, Michel
Hello,

there is no need any more to think about it... I fixed my problem with a
workaround.

Has anybody a jQAccordion inherited into a jQDialog, if somebody did,
did it work?

Thank your for your help!

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

RE: answer: and jQuery

Robert Sirois
Should be as simple as sticking the accordion into the #with: block or popping in a component containing the accordion. I have some code (at home) I can send you tonight.

(from memory)
html div
    script: (html jQuery dialog new
                                        ...options...
                                        with: [
                                            html div script: (html jQuery accordion new ...options...).
                                            " or alternately:
                                            html render: anAccordionComponent.
                                            "
                                        ]
    ). "end dialog div"

Yea... something like that lol

RS

> Date: Fri, 16 Mar 2012 11:51:27 +0100

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Seaside] answer: and jQuery
>
> Hello,
>
> there is no need any more to think about it... I fixed my problem with a
> workaround.
>
> Has anybody a jQAccordion inherited into a jQDialog, if somebody did,
> did it work?
>
> Thank your for your help!
>
> Regards.
> _______________________________________________
> 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: answer: and jQuery

Malte Grunwald
Thank you Robert,

I tried it the way you described, but still - it does not work.
The Accordion will be shown, but if you click a header, no sub menu slides down.
This is a really strange behaviour and I have no clue what I did wrong.

Regards

Malte


Am 16.03.2012 15:24, schrieb Robert Sirois:
Should be as simple as sticking the accordion into the #with: block or popping in a component containing the accordion. I have some code (at home) I can send you tonight.

(from memory)
html div
    script: (html jQuery dialog new
                                        ...options...
                                        with: [
                                            html div script: (html jQuery accordion new ...options...).
                                            " or alternately:
                                            html render: anAccordionComponent.
                                            "
                                        ]
    ). "end dialog div"

Yea... something like that lol

RS

> Date: Fri, 16 Mar 2012 11:51:27 +0100
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Seaside] answer: and jQuery
>
> Hello,
>
> there is no need any more to think about it... I fixed my problem with a
> workaround.
>
> Has anybody a jQAccordion inherited into a jQDialog, if somebody did,
> did it work?
>
> Thank your for your help!
>
> Regards.
> _______________________________________________
> 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: answer: and jQuery

Robert Sirois
Gah, sorry I was gonna give you some code! I'm putting a reminder in my phone right now for when I get home...

RS


Date: Mon, 19 Mar 2012 11:55:00 +0100
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] answer: and jQuery

Thank you Robert,

I tried it the way you described, but still - it does not work.
The Accordion will be shown, but if you click a header, no sub menu slides down.
This is a really strange behaviour and I have no clue what I did wrong.

Regards

Malte


Am 16.03.2012 15:24, schrieb Robert Sirois:
Should be as simple as sticking the accordion into the #with: block or popping in a component containing the accordion. I have some code (at home) I can send you tonight.

(from memory)
html div
    script: (html jQuery dialog new
                                        ...options...
                                        with: [
                                            html div script: (html jQuery accordion new ...options...).
                                            " or alternately:
                                            html render: anAccordionComponent.
                                            "
                                        ]
    ). "end dialog div"

Yea... something like that lol

RS

> Date: Fri, 16 Mar 2012 11:51:27 +0100
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Seaside] answer: and jQuery
>
> Hello,
>
> there is no need any more to think about it... I fixed my problem with a
> workaround.
>
> Has anybody a jQAccordion inherited into a jQDialog, if somebody did,
> did it work?
>
> Thank your for your help!
>
> Regards.
> _______________________________________________
> 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: answer: and jQuery

Malte Grunwald
That  would too kind... I tried both, in the #with: [] and I created a own component. But the effects are still blocked.
 
Kind Regards
 
Sent: Monday, March 19, 2012 5:47 PM
Subject: RE: [Seaside] answer: and jQuery
 
Gah, sorry I was gonna give you some code! I'm putting a reminder in my phone right now for when I get home...

RS


Date: Mon, 19 Mar 2012 11:55:00 +0100
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] answer: and jQuery

Thank you Robert,

I tried it the way you described, but still - it does not work.
The Accordion will be shown, but if you click a header, no sub menu slides down.
This is a really strange behaviour and I have no clue what I did wrong.

Regards

Malte


Am 16.03.2012 15:24, schrieb Robert Sirois:
Should be as simple as sticking the accordion into the #with: block or popping in a component containing the accordion. I have some code (at home) I can send you tonight.

(from memory)
html div
    script: (html jQuery dialog new
                                        ...options...
                                        with: [
                                            html div script: (html jQuery accordion new ...options...).
                                            " or alternately:
                                            html render: anAccordionComponent.
                                            "
                                        ]
    ). "end dialog div"

Yea... something like that lol

RS

> Date: Fri, 16 Mar 2012 11:51:27 +0100

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Seaside] answer: and jQuery
>
> Hello,
>
> there is no need any more to think about it... I fixed my problem with a
> workaround.
>
> Has anybody a jQAccordion inherited into a jQDialog, if somebody did,
> did it work?
>
> Thank your for your help!
>
> Regards.
> _______________________________________________
> 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: answer: and jQuery

Robert Sirois
Alrighty, here you are (two methods on a WAComponent). Hopefully the email wont mutilate my spacing too bad so it's readable hehe.

updateRoot: html
super updateRoot: html.

html title: 'Testing jQuery UI accordion widget inside a ui dialog'.

html javascript url: 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.js'.
html javascript url: 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.js'.
html stylesheet url: 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/redmond/jquery-ui.css'.

renderContentOn: html

html div
script: (html jQuery new dialog
title: 'Title';
modal: false;
width: 500;
height: 400;
autoOpen: true;
onClose: html jQuery this remove
);
with: [
" this section could be replaced with a component doing the same work via: html render: aComponent "
html div
script: (html jQuery new accordion active: false);
with: [
1 to: 10 do: [:n |
html div: [ html anchor: 'Section ', n asString ].
html div: [ html paragraph: 'Hello! I am in section ', n asString, '! Cool!' ].
].
].
].

I hope this helps. As always, the built in examples are the best place for help, as well as the jQuery website and the Seaside book.

Examples:
    http://www.seaside.st/about/examples
    http://demo.seaside.st/javascript/jquery-ui

jQuery:
    http://jquery.com/
    http://jqueryui.com/

Seaside book:
    http://book.seaside.st/book

RS

From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] answer: and jQuery
Date: Mon, 19 Mar 2012 18:51:08 +0100

That  would too kind... I tried both, in the #with: [] and I created a own component. But the effects are still blocked.
 
Kind Regards
 
Sent: Monday, March 19, 2012 5:47 PM
Subject: RE: [Seaside] answer: and jQuery
 
Gah, sorry I was gonna give you some code! I'm putting a reminder in my phone right now for when I get home...

RS


Date: Mon, 19 Mar 2012 11:55:00 +0100
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] answer: and jQuery

Thank you Robert,

I tried it the way you described, but still - it does not work.
The Accordion will be shown, but if you click a header, no sub menu slides down.
This is a really strange behaviour and I have no clue what I did wrong.

Regards

Malte


Am 16.03.2012 15:24, schrieb Robert Sirois:
Should be as simple as sticking the accordion into the #with: block or popping in a component containing the accordion. I have some code (at home) I can send you tonight.

(from memory)
html div
    script: (html jQuery dialog new
                                        ...options...
                                        with: [
                                            html div script: (html jQuery accordion new ...options...).
                                            " or alternately:
                                            html render: anAccordionComponent.
                                            "
                                        ]
    ). "end dialog div"

Yea... something like that lol

RS

> Date: Fri, 16 Mar 2012 11:51:27 +0100

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Seaside] answer: and jQuery
>
> Hello,
>
> there is no need any more to think about it... I fixed my problem with a
> workaround.
>
> Has anybody a jQAccordion inherited into a jQDialog, if somebody did,
> did it work?
>
> Thank your for your help!
>
> Regards.
> _______________________________________________
> 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

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

Re: answer: and jQuery

Malte Grunwald
Hey,

thank you for the hint, in common it was nothing new, but  your dialog uses #autoOpen: true. I used false.
That is the reason why my accordion did not work correct. 

Kind Regards!

malte

Am 20.03.2012 02:09, schrieb Robert Sirois:
Alrighty, here you are (two methods on a WAComponent). Hopefully the email wont mutilate my spacing too bad so it's readable hehe.

updateRoot: html
super updateRoot: html.

html title: 'Testing jQuery UI accordion widget inside a ui dialog'.


renderContentOn: html

html div
script: (html jQuery new dialog
title: 'Title';
modal: false;
width: 500;
height: 400;
autoOpen: true;
onClose: html jQuery this remove
);
with: [
" this section could be replaced with a component doing the same work via: html render: aComponent "
html div
script: (html jQuery new accordion active: false);
with: [
1 to: 10 do: [:n |
html div: [ html anchor: 'Section ', n asString ].
html div: [ html paragraph: 'Hello! I am in section ', n asString, '! Cool!' ].
].
].
].

I hope this helps. As always, the built in examples are the best place for help, as well as the jQuery website and the Seaside book.

Examples:

jQuery:

Seaside book:

RS

From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] answer: and jQuery
Date: Mon, 19 Mar 2012 18:51:08 +0100

That  would too kind... I tried both, in the #with: [] and I created a own component. But the effects are still blocked.
 
Kind Regards
 
Sent: Monday, March 19, 2012 5:47 PM
Subject: RE: [Seaside] answer: and jQuery
 
Gah, sorry I was gonna give you some code! I'm putting a reminder in my phone right now for when I get home...

RS


Date: Mon, 19 Mar 2012 11:55:00 +0100
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] answer: and jQuery

Thank you Robert,

I tried it the way you described, but still - it does not work.
The Accordion will be shown, but if you click a header, no sub menu slides down.
This is a really strange behaviour and I have no clue what I did wrong.

Regards

Malte


Am 16.03.2012 15:24, schrieb Robert Sirois:
Should be as simple as sticking the accordion into the #with: block or popping in a component containing the accordion. I have some code (at home) I can send you tonight.

(from memory)
html div
    script: (html jQuery dialog new
                                        ...options...
                                        with: [
                                            html div script: (html jQuery accordion new ...options...).
                                            " or alternately:
                                            html render: anAccordionComponent.
                                            "
                                        ]
    ). "end dialog div"

Yea... something like that lol

RS

> Date: Fri, 16 Mar 2012 11:51:27 +0100
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Seaside] answer: and jQuery
>
> Hello,
>
> there is no need any more to think about it... I fixed my problem with a
> workaround.
>
> Has anybody a jQAccordion inherited into a jQDialog, if somebody did,
> did it work?
>
> Thank your for your help!
>
> Regards.
> _______________________________________________
> 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


_______________________________________________
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: answer: and jQuery

Robert Sirois
Yea, gotta love programming for the little frustrations ;)

I think you can just do $('dialogID').dialog('open'); or in the Seaside jQuery API (html jQuery: #dialogID) dialog open.

Glad I could help!

RS

Oh, #autoOpen: should default to "true", I just put it in there to show it can be configured.


Date: Tue, 20 Mar 2012 11:47:31 +0100
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] answer: and jQuery

Hey,

thank you for the hint, in common it was nothing new, but  your dialog uses #autoOpen: true. I used false.
That is the reason why my accordion did not work correct. 

Kind Regards!

malte

Am 20.03.2012 02:09, schrieb Robert Sirois:
Alrighty, here you are (two methods on a WAComponent). Hopefully the email wont mutilate my spacing too bad so it's readable hehe.

updateRoot: html
super updateRoot: html.

html title: 'Testing jQuery UI accordion widget inside a ui dialog'.


renderContentOn: html

html div
script: (html jQuery new dialog
title: 'Title';
modal: false;
width: 500;
height: 400;
autoOpen: true;
onClose: html jQuery this remove
);
with: [
" this section could be replaced with a component doing the same work via: html render: aComponent "
html div
script: (html jQuery new accordion active: false);
with: [
1 to: 10 do: [:n |
html div: [ html anchor: 'Section ', n asString ].
html div: [ html paragraph: 'Hello! I am in section ', n asString, '! Cool!' ].
].
].
].

I hope this helps. As always, the built in examples are the best place for help, as well as the jQuery website and the Seaside book.

Examples:

jQuery:

Seaside book:

RS

From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] answer: and jQuery
Date: Mon, 19 Mar 2012 18:51:08 +0100

That  would too kind... I tried both, in the #with: [] and I created a own component. But the effects are still blocked.
 
Kind Regards
 
Sent: Monday, March 19, 2012 5:47 PM
Subject: RE: [Seaside] answer: and jQuery
 
Gah, sorry I was gonna give you some code! I'm putting a reminder in my phone right now for when I get home...

RS


Date: Mon, 19 Mar 2012 11:55:00 +0100
From: [hidden email]
To: [hidden email]
Subject: Re: [Seaside] answer: and jQuery

Thank you Robert,

I tried it the way you described, but still - it does not work.
The Accordion will be shown, but if you click a header, no sub menu slides down.
This is a really strange behaviour and I have no clue what I did wrong.

Regards

Malte


Am 16.03.2012 15:24, schrieb Robert Sirois:
Should be as simple as sticking the accordion into the #with: block or popping in a component containing the accordion. I have some code (at home) I can send you tonight.

(from memory)
html div
    script: (html jQuery dialog new
                                        ...options...
                                        with: [
                                            html div script: (html jQuery accordion new ...options...).
                                            " or alternately:
                                            html render: anAccordionComponent.
                                            "
                                        ]
    ). "end dialog div"

Yea... something like that lol

RS

> Date: Fri, 16 Mar 2012 11:51:27 +0100
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Seaside] answer: and jQuery
>
> Hello,
>
> there is no need any more to think about it... I fixed my problem with a
> workaround.
>
> Has anybody a jQAccordion inherited into a jQDialog, if somebody did,
> did it work?
>
> Thank your for your help!
>
> Regards.
> _______________________________________________
> 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


_______________________________________________
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: answer: and jQuery

dtrussardi@tiscali.it
In reply to this post by Bany, Michel
Ciao,

i porting some code from Scriptaculous  to JQ framework.

I found some problem to port some code based on  lightbox implementation to JQDialog widget.

With lightbox i rendering some Magritte description container in it and all work fine.

FWIW, we have been successfully using the JQuery extensions from Nick Ager (JQuery-Extensions-NickAger.2.mcz) in VisualWorks and I believe it would do what you are after. It allows you to "call" a component in a JQuery dialog and get a response object from the component when the dialog closes. Works a bit like the now old-fashioned #lightbox: method.

I read this message on Seaside mail-list.

Question:   where i found the JQuery-Extensions-NickAger.2.mcz 

I work with Pharo and Seaside 3.0.1


Thank for any consideration about it and JQDialog widget integrations.


Dario

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