Yii 1.1: jpopup

Takes a link and will create a popup window
11 followers

This widget encapsulates the popupWindow JQuery Plugin.
Takes a link (or other HTML element) and will create a popup window

Requirements

Yii 1.1.6 or above...

Usage

  • extract the file under .../protected/extensions
  • put in a view a code blocks like the following...
<h1>popup window</h1>
<p>
Open yahoo.com in a popup window (800x500) positioned 50 pixels from the
top and left side of the screen.
</p>
<p>
    <?php $this->widget('ext.popup.JPopupWindow', array(
        'content'=>'open popup',
        'url'=>"http://www.yahoo.com",        
        'htmlOptions'=>array('title'=>"yahoo.com"),
        'options'=>array(
            'height'=>500,
            'width'=>800,
            'top'=>50,
            'left'=>50,
        ),
    )); ?><!-- popup -->
</p>
<p>
Open contact form of a Yii skeleton app
</p>
<p>
    <?php $this->widget('ext.popup.JPopupWindow', array(
        'tagName'=>'button',
        'content'=>'open contact form',
        'url'=>array('/site/contact'),        
        'options'=>array(
            'height'=>500,
            'width'=>800,
            'centerScreen'=>1,
        ),
    )); ?><!-- popup -->
</p>

Change log

Version 1.0

  • initial release

Version 1.1

  • more documentation and bugfix

Version 1.2

  • unnecessary javascript files deleted

Version 1.2.1

  • published demo application

Version 1.3

  • little bugfix

Resources

Total 3 comments

#12992 report it
rajesh chaurasia at 2013/04/26 03:16am
hi

this extension is working fine. thanks.

#12000 report it
shreyas d at 2013/02/20 01:47am
sBaseUrl is not defined

I have integrated the extension, when i click on the link for popup it gives me error in console as "sBaseUrl is not defined" i have used EDataTables extension to display the data using ajax. not sure if its conflicting with it.

Thanks and advance. Shreyas

#8348 report it
nktsitas at 2012/05/28 07:46am
"Hello, New user" message

I don't know if anyone else had this problem..

Only when debug mode of Yii was off and whenever a popup button was in a view page a "Hello, new User" alert would popup.

It's located in jquery.popupWindow.min.js in the end of the file.

I suppose it should be removed??

Leave a comment

Please to leave your comment.

Create extension