Version 1.1.0 released
git-svn-id: svn://p-o.co.uk/p-o.co.uk/com_ajaxdemo@60 60e5ea7b-c093-dd11-ac13-000423648166
This commit is contained in:
1
site/views/colours/index.html
Normal file
1
site/views/colours/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
55
site/views/colours/tmpl/default.php
Normal file
55
site/views/colours/tmpl/default.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax demonstration component
|
||||
*
|
||||
* PHP version 5.3
|
||||
*
|
||||
* @category Joomla_Component
|
||||
* @package Com_Ajaxdemo
|
||||
* @subpackage View
|
||||
* @author Alan Hicks <ahicks@p-o.co.uk>
|
||||
* @copyright 2010-2012 Persistent Objects Ltd
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* @link http://p-o.co.uk/
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::_('behavior.modal', 'a.lightbox');
|
||||
JHtml::_('behavior.tooltip');
|
||||
|
||||
?>
|
||||
<table>
|
||||
<?php
|
||||
$k = 0;
|
||||
$column = 0;
|
||||
foreach ($this->items as $item) {
|
||||
$link = JRoute::_(
|
||||
'index.php?option=com_ajaxdemo&view=colour&id='.$item->colour_id, false
|
||||
);
|
||||
$handler = "{"
|
||||
. "handler: 'ajax', size: {x: 800, y: 450}, "
|
||||
. "onClose: function() {}, "
|
||||
. "onAjax: function() { "
|
||||
. "SqueezeBox.assign($$('a.lightbox2'), {parse: 'rel'});"
|
||||
. "}, "
|
||||
. "ajaxOptions: {method: 'post'}"
|
||||
. "}";
|
||||
$tooltip = ' title="'.htmlspecialchars(trim($item->title))
|
||||
. '::'
|
||||
. htmlspecialchars(trim($item->notes))
|
||||
. '"';
|
||||
$imagesrc = 'components/com_ajaxdemo/images/' . $item->thumbnail_image;?>
|
||||
<tr>
|
||||
<td><a id='colours-<?php echo $item->id ?>'
|
||||
class="lightbox hasTip"
|
||||
href='<?php echo $link ?>'
|
||||
<?php echo $tooltip ?>
|
||||
rel="<?php echo $handler ?>">
|
||||
<img src='<?php echo $imagesrc; ?>' alt='<?php echo $item->title; ?>' />
|
||||
</a></td>
|
||||
</tr><?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
18
site/views/colours/tmpl/default.xml
Normal file
18
site/views/colours/tmpl/default.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="Colour List Layout">
|
||||
<message>
|
||||
<![CDATA[Colour listing layout, add this to a menu to see a list of colours.]]>
|
||||
</message>
|
||||
</layout>
|
||||
<state>
|
||||
<name>Colour List Layout</name>
|
||||
<description>Colour listing layout</description>
|
||||
<params>
|
||||
<param type="sql" name="Colour" default="10" label="Select a colour" query="SELECT id AS value, name FROM #__ajaxdemo_colours ORDER BY ordering" />
|
||||
</params>
|
||||
<advanced>
|
||||
<param />
|
||||
</advanced>
|
||||
</state>
|
||||
</metadata>
|
||||
1
site/views/colours/tmpl/index.html
Normal file
1
site/views/colours/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
48
site/views/colours/view.html.php
Normal file
48
site/views/colours/view.html.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax demonstration component
|
||||
*
|
||||
* PHP version 5.3
|
||||
*
|
||||
* @category Joomla_Component
|
||||
* @package Com_Ajaxdemo
|
||||
* @subpackage View
|
||||
* @author Alan Hicks <ahicks@p-o.co.uk>
|
||||
* @copyright 2010-2012 Persistent Objects Ltd
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* @link http://p-o.co.uk/
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
/**
|
||||
* HTML View class for the Ajax demonstration component
|
||||
*
|
||||
* @category Joomla_Component
|
||||
* @package Com_Ajaxdemo
|
||||
* @author Alan Hicks <ahicks@p-o.co.uk>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* @link http://p-o.co.uk/
|
||||
*/
|
||||
class AjaxdemoViewColours extends JView
|
||||
{
|
||||
protected $items;
|
||||
|
||||
/**
|
||||
* Display method for Colours
|
||||
*
|
||||
* @param string $tpl Template to display
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function display($tpl = null)
|
||||
{
|
||||
$this->items = & $this->get('Items');
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user