sfModalBoxPlugin
1.2.1stable
for sf 1.2 MIT
This plugin enable you to use the modalbox script in symfony.
It depends on prototype 1.6.0, script.aculo.us 1.8.0 which are bundled in the plugin : sfPrototypePlugin
Developers
License
Copyright (c) 2006-2007 Andrey Okonetchnikov
Copyright (c) 2007-2008 Mickael Kurmann
Copyright (c) 2008 Olivier Kofler
Copyright (c) 2009 Adam Tombleson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
sfModalBoxPlugin symfony plugin
The sfModalBoxPlugin is a symfony plugin that provides integration with [http://www.wildbit.com/labs/modalbox/ ModalBox].
ModalBox is a JavaScript technique for creating modern (Web 2.0-style) modal dialogs or even wizards (sequences of dialogs) without using conventional popups and page reloads.
It's inspired by Mac OS X modal dialogs.
ModalBox is built with pure JavaScript and is based on Sam Stephenson's excellent Prototype JavaScript Framework, script.aculo.us and valid XHTML/CSS.
ModalBox uses AJAX to load content.
Installation
* For symfony 1.0.x
symfony plugin-install http://plugins.symfony-project.com/sfModalBoxPlugin
* For symfony 1.1.x
plugin:install sfModalBoxPlugin --release=1.2.0
Usage
Example 1
<?php use_helper('ModalBox') ?>
<?php echo m_link_to('link name',
'@remote_route_for_action',
array('title' => __('Retrieve Forgotten Password')),
array('width' => 400, 'height' => 180)) ?>
Example 2
<?php use_helper('ModalBox') ?>
<?php echo javascript_tag(m_link_to_function(url_for('mymodule/index'),
array('title' => 'Window Title'))); ?>
// This is equivalent to
`<script type="text/javascript">
//<![CDATA[
Modalbox.show('/frontend_dev.php/mymodule', {title:"Window Title"});
//]]>
</script>`
Example 3
<?php use_helper('ModalBox') ?>
<?php echo javascript_tag(m_link_to_function(url_for('mymodule/index'),
array('title' => 'Window Title'), true)); ?>
// This is equivalent to
`<script type="text/javascript">
//<![CDATA[
Modalbox.show('/frontend_dev.php/mymodule', {title:"Window Title"});
Modalbox.deactivate();
//]]>
</script>`
Example 4 - This template will open in a modal window
<?php use_helper('ModalBox') ?>
<div id="hiddendiv" style="display:none">
<div id="myform">
<form action="<?php echo url_for('mymodule/index') ?>" method="POST">
<table>
<?php echo $form ?>
<tr>
<td colspan="2" >
<input type="submit" />
</td>
</tr>
</table>
</form>
</div>
</div>
<?php echo
javascript_tag(m_link_to_element("$('myform')", array('title' => 'Upload file with targets data',
'width' => 300,
'inactiveFade' => false)));
?>
License
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.