Thanks for the reply, just had time to look at this today and it
turned out that my problem was with my css path ;P. I tried your
method posted below, but it looks like $this->addScript has either
changed syntax or is no longer working in the version of cakephp that
I'm using (version 1.2.0.5875) so if anyone else is trying to get this
to work, and is having this problem try replacing $this-
>addScript($javascript->* with print $javascript->* That did the
trick for me. Using $this->addScript, it didn't error out, it just
didn't display anything.
On Dec 19, 3:47 am, grigri <[EMAIL PROTECTED]> wrote:
> I'd never heard of the prototype window class before [thanks for the
> link] and got it working with cake in a few minutes. Here's my step-by-
> step process:
>
> (1) Copied prototype.js and window.js to /app/webroot/js
> (2) Copied default.css and default (folder) to /app/webroot/themes
> (3) Put the following code in my view (it was just for a test)
>
> <?php
> $this->addScript($javascript->link('prototype'));
> $this->addScript($javascript->link('window'));
> $this->addScript($html->css('../themes/default'));
> $this->addScript($javascript->codeBlock( <<<JSBLOCK
> function showDatWindow() {
> win = new Window({title: "Sample", width:200, height:150,
> destroyOnClose: true, recenterAuto:false});
> win.getContent().update("<h1>Hello world !!</h1>");
> win.showCenter();}
>
> JSBLOCK
> , true, true));
> ?>
>
> <p><button onclick="showDatWindow()">Show Dat Window</button></p>
>
> At this point it worked fine, but the table was styled a bit weirdly.
> So I edited "default.css", just under the '/* DO NOT CHANGE THESE
> VALUES*/' bit to this:
>
> .dialog table.table_window {
> border-collapse: collapse;
> border-spacing: 0;
> width: 100%;
> margin: 0px;
> padding:0px;
> background: transparent; /* added */
> border: none; /* added */
>
> }
>
> .dialog table.table_window td , .dialog table.table_window th {
> border: none; /* added */
> padding: 0;
>
> }
>
> And it works smashingly. I tried it with another theme, worked fine
> too.
>
> On Dec 18, 10:53 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > I'm looking for any documentation or "How tos" for using the prototype
> > window class (http://prototype-window.xilinus.com/) from inside
> > cakePHP. I've been trying to get it to work and I'm having some
> > problems. I can get the windows to render, but the css themes don't
> > fit, they aren't draggable, they are resizeable but they won't overlap
> > anything on the page and the maximize/minimize/close controls are all
> > at the top corner of the page instead of in the top corner of the
> > window. Not sure what I'm doing wrong. If anyone has gotten this to
> > work, let me know how.
>
> > Thanks,
> > Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---