JuiPortlets Class Reference

Public Member Functions

 init ()
 run ()

Static Public Member Functions

static renderPortlet ($item, $uniqueLayoutId, $moduleId, $renderOnClickEvent=true)

Data Fields

 $items = array()
 $uniqueLayoutId
 $moduleId
 $saveUrl
 $layoutType
 $cssFile = null
 $collapsible = true
 $movable = true
 $baseJuiPortletsScriptUrl

Protected Member Functions

 registerJuiPortletsScripts ()

Static Protected Member Functions

static renderOptionsMenu (array $item, $uniqueLayoutId, $moduleId, $renderOnClickEvent=true, $portletParams=array())
static makeEditMenuItem ($portletId, $uniqueLayoutId, $moduleId, $renderOnClickEvent=true, $portletParams=array())
static resolveAjaxOptionsForEditLink ()

Detailed Description

JuiPortlets displays an portlet widget.

JuiPortlets encapsulates the JUI Sortable plugin. Extends functionality found at nettuts.com

To use this widget, you may insert the following code in a view:

        <?php
            $this->widget('application.core.widgets.JuiPortlets', array(
                'uniqueLayoutId' => 'HomeView',
                'items' => array(
                    1 => array(
                        1 => array('title' => 'your title', 'content' => 'your content', editable => true),
                        2 => array('title' => 'your title', 'content' => 'your content', editable => true),
                    ),
                    2 => array(
                        1 => array('title' => 'your title', 'content' => 'your content', editable => true),
                    ),
                    3 => array(
                        1 => array('title' => 'your title', 'content' => 'your content', editable => true),
                        2 => array('title' => 'your title', 'content' => 'your content', editable => true),
                        2 => array('title' => 'your title', 'content' => 'your content', editable => true),
                    ),
                )
            );
        ?>

The above example has 3 columns. In the first column there are 2 portlets. In the second column there is 1 portlet and in the third column there are 3 portlets.

If you are using javascript code anywhere in the code, please add "js:" at the start of the js code definition and Yii will use this string as js code.

Definition at line 76 of file JuiPortlets.php.


Member Function Documentation

static renderPortlet ( item,
uniqueLayoutId,
moduleId,
renderOnClickEvent = true 
) [static]

In the event of a portlet refresh, you do not want to render the onClick event since this will already be rendered in the page. Doing so would add an extra unneeded modal dialog.

Parameters:
$item 
$uniqueLayoutId 
$moduleId 
bool $renderOnClickEvent
Returns:
string

Definition at line 148 of file JuiPortlets.php.

static renderOptionsMenu ( array $  item,
uniqueLayoutId,
moduleId,
renderOnClickEvent = true,
portletParams = array() 
) [static, protected]
Parameters:
array $item
$uniqueLayoutId 
$moduleId 
bool $renderOnClickEvent
array $portletParams - extra params that can be passed to the Get string on page requests
Returns:
mixed

Definition at line 178 of file JuiPortlets.php.

run (  ) 

Run this widget. This method registers necessary javascript and renders the needed HTML code.

Definition at line 246 of file JuiPortlets.php.

registerJuiPortletsScripts (  )  [protected]

Registers extra js file specific to JuiPortlets

Definition at line 331 of file JuiPortlets.php.


Field Documentation

$baseJuiPortletsScriptUrl

Override to include proper paths of CSS file and extra JS file

Definition at line 121 of file JuiPortlets.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Apr 22 07:10:25 2017