SimpleModal widget
Позволяет использовать SimpleModal jQuery plugin.
Использование
$this->widget('ext.yiiext.widgets.simplemodal.ESimpleModalWidget', array( // selector для элемента клик по которому будет открывать модальное окно 'selector'=>'#open_modal_link', // HTML который будет отображаться в модальном окне 'content'=>'<div class="mywindow">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</div>', // свойство плагина, подробнее на [оф. сайте](http://www.ericmmartin.com/projects/simplemodal/) 'options'=>array( 'close'=>true, ), ));
Другой вариант использования с помощью beginWidget() и endWidget()
$this->beginWidget('ext.yiiext.widgets.simplemodal.ESimpleModalWidget', array( 'selector'=>'#open_modal_link', 'options'=>array( 'close'=>true, ), )); <div class="mywindow">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</div> $this->endWidget();
Changelog
1.3
- Update js to version 1.4.1. (Veaceslav Medvedev)
- Added e.preventDefault() to prevent screen scrolling (Sam Dark)
1.2
Warning: this version is not backwards compatible to 1.1.
- You can use beginWidget() end endWidget() to write a dialog content. (Veaceslav Medvedev)
- $triggerElementSelector var changed in shortly $selector. (Veaceslav Medvedev)
- Update js to version 1.3.5. (Veaceslav Medvedev)
1.1
- Initial public release.