API16

API16:JHtmlJGrid/orderDown

From Joomla! Documentation

Revision as of 22:51, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Create a move-down action icon. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</no...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Create a move-down action icon.

[Edit Descripton]

Template:Description:JHtmlJGrid/orderDown

Syntax

static orderDown($i, $task, $enabled=true, $alt= 'JGrid_Move_Up')
Parameter Name Default Value Description
$i The row index.
$task The task to fire.
$enabled true True to show the icon.
$alt 'JGrid_Move_Up' The image alternate text string.

Returns

string The HTML for the IMG tag.

Defined in

libraries/joomla/html/html/jgrid.php

Importing

jimport( 'joomla.html.html.jgrid' );

Source Body

public static function orderDown($i, $task, $enabled = true, $alt = 'JGrid_Move_Up')
{
        $alt = JText::_($alt);

        // TODO: Deal with hardcoded links.
        if ($enabled)
        {
                $html   = '<a href="#reorder" onclick="return listItemTask(\'cb'.$i.'\',\''.$task.'\')" title="'.$alt.'">';
                $html   .= JHTML::_('image','admin/downarrow.png', $alt, array( 'width' => 16, 'height' => 16, 'border' => 0), true);
                $html   .= '</a>';
        }
        else {
                $html   = JHTML::_('image','admin/downarrow0.png', $alt, array( 'width' => 16, 'height' => 16, 'border' => 0), true);
        }
        return $html;
}

[Edit See Also] Template:SeeAlso:JHtmlJGrid/orderDown

Examples

<CodeExamplesForm />