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
-~----------~----~----~----~------~----~------~--~---