Popup

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

Popup

Alexandre BP
Hi,

I'm trying to do the following:  self request:'Folder Name: '   in a new window.
I have tried this:

canvas popupAnchor
                extent: 300@300;
                position:200@200;
                resizable: false;
                menubar:false;
                toolbar: false;
                dependent: true;
                name:'New Friend Group';
                callback: [ self renderWindowOn: canvas.];
                with: 'Popup'.

renderWindowOn: canvas
  | folderName |
        self session presenter
                show: PopupComponent new
                onAnswer: [ :answer | self requestContext closeThisPopup. folderName
:= answer. ].

First, the options resizable, menubar,toolbar and dependent don't work.
Second, I don't really know what to do in the PopupComponent, I
created a form with a button but how do I get the text from the field
back?

Is there an easier way to do that?--> it should just be a self
request: ... in a new window.

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

Popup

Alexandre BP
Hi,

I'm trying to do the following:  self request:'Folder Name: '   in a new window.
I have tried this:

canvas popupAnchor
               extent: 300@300;
               position:200@200;
               resizable: false;
               menubar:false;
               toolbar: false;
               dependent: true;
               name:'New Friend Group';
               callback: [ self renderWindowOn: canvas.];
               with: 'Popup'.

renderWindowOn: canvas
 | folderName |
       self session presenter
               show: PopupComponent new
               onAnswer: [ :answer | self requestContext
closeThisPopup. folderName
:= answer. ].

First, the options resizable, menubar,toolbar and dependent don't work.
Second, I don't really know what to do in the PopupComponent, I
created a form with a button but how do I get the text from the field
back?

Is there an easier way to do that?--> it should just be a self
request: ... in a new window.

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

Re: Popup

Philippe Marschall
In reply to this post by Alexandre BP
2010/11/27 alexandre bp <[hidden email]>:

> Hi,
>
> I'm trying to do the following:  self request:'Folder Name: '   in a new window.
> I have tried this:
>
> canvas popupAnchor
>                extent: 300@300;
>                position:200@200;
>                resizable: false;
>                menubar:false;
>                toolbar: false;
>                dependent: true;
>                name:'New Friend Group';
>                callback: [ self renderWindowOn: canvas.];
>                with: 'Popup'.
>
> renderWindowOn: canvas
>  | folderName |
>        self session presenter
>                show: PopupComponent new
>                onAnswer: [ :answer | self requestContext closeThisPopup. folderName
> := answer. ].
>
> First, the options resizable, menubar,toolbar and dependent don't work.
> Second, I don't really know what to do in the PopupComponent, I
> created a form with a button but how do I get the text from the field
> back?
>
> Is there an easier way to do that?--> it should just be a self
> request: ... in a new window.

See WAPopupFunctionalTest, different browsers behave differently.

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

Re : [Seaside] File to URL

Nicolas Vanni
hello.

I have a file in the same folder than the seaside image (test.pdf) and i want to link the file to an URL.

first i create a new class like this:

WAFileLibrary subclass: #MyFileLibrary
"blabla"

and next, i'm trying the fallowing code on a renderContentOn

renderContentOn: html
MyFileLibrary addAllFilesIn: './'.
MyFileLibrary addFileAt: 'test.pdf'.
html image url: (MyFileLibrary urlOf: #testPdf).

the result is i can't link the file and all seems to be frozen and slower than before a ran the code.

what do i wrong ? do i need to download a library to do this ?

thanks before


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

Re: Re : [Seaside] File to URL

Nick
Hi,

The render methods are meant to generate html. 

renderContentOn: html
MyFileLibrary addAllFilesIn: './'.
MyFileLibrary addFileAt: 'test.pdf'.

These lines add the files all files in the local directory to the file library and specifically test.pdf *each* time the browser requests a page. Instead you only need to a file to the file library once. You can do this programmatically say via the workspace in the your image:

MyFileLibrary addFileAt: '<path to file>/test.pdf'.

or via the web ui, by browsing to /config then selecting files, MyFileLibrary
 
html image url: (MyFileLibrary urlOf: #testPdf).


You can then render a link to the file by:

renderContentOn: html
    html anchor url: (MyFileLibrary / #testPdf); with: 'click here to download my pdf'


WAExternalFileLibrary is another option....

Nick

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

Re : Re : [Seaside] File to URL

Nicolas Vanni
thanks

works perfectly :) :D :)


De : Nick Ager <[hidden email]>
À : Seaside - general discussion <[hidden email]>
Envoyé le : Lun 29 novembre 2010, 17h 33min 23s
Objet : Re: Re : [Seaside] File to URL

Hi,

The render methods are meant to generate html. 

renderContentOn: html
MyFileLibrary addAllFilesIn: './'.
MyFileLibrary addFileAt: 'test.pdf'.

These lines add the files all files in the local directory to the file library and specifically test.pdf *each* time the browser requests a page. Instead you only need to a file to the file library once. You can do this programmatically say via the workspace in the your image:

MyFileLibrary addFileAt: '<path to file>/test.pdf'.

or via the web ui, by browsing to /config then selecting files, MyFileLibrary
 
html image url: (MyFileLibrary urlOf: #testPdf).


You can then render a link to the file by:

renderContentOn: html
    html anchor url: (MyFileLibrary / #testPdf); with: 'click here to download my pdf'


WAExternalFileLibrary is another option....

Nick


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