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:
22
admin/ajaxdemo.php
Normal file
22
admin/ajaxdemo.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax demonstration component
|
||||
*
|
||||
* PHP version 5.3
|
||||
*
|
||||
* @category Joomla_Component
|
||||
* @package Com_Ajaxdemo
|
||||
* @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.controller');
|
||||
|
||||
$controller = JController::getInstance('Ajaxdemo');
|
||||
$controller->execute(JRequest::getCmd('task'));
|
||||
$controller->redirect();
|
||||
32
admin/controller.php
Normal file
32
admin/controller.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax demonstration component
|
||||
*
|
||||
* PHP version 5.3
|
||||
*
|
||||
* @category Joomla_Component
|
||||
* @package Com_Ajaxdemo
|
||||
* @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.controller');
|
||||
|
||||
/**
|
||||
* Ajax demonstration component
|
||||
*
|
||||
* @category Joomla_Component
|
||||
* @package Com_Ajaxdemo
|
||||
* @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/
|
||||
*/
|
||||
class AjaxdemoController extends JController
|
||||
{
|
||||
}
|
||||
35
admin/controllers/ajaxdemo.php
Normal file
35
admin/controllers/ajaxdemo.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax demonstration component
|
||||
*
|
||||
* PHP version 5.3
|
||||
*
|
||||
* @category Joomla_Component
|
||||
* @package Com_Ajaxdemo
|
||||
* @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.controller');
|
||||
|
||||
/**
|
||||
* Check controller
|
||||
*
|
||||
* PHP version 5.3
|
||||
*
|
||||
* @category Joomla_Component
|
||||
* @package Com_Ajaxdemo
|
||||
* @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/
|
||||
*/
|
||||
class AjaxdemoControllerAjaxdemo extends JController
|
||||
{
|
||||
}
|
||||
1
admin/controllers/index.html
Normal file
1
admin/controllers/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
1
admin/index.html
Normal file
1
admin/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
1
admin/sql/index.html
Normal file
1
admin/sql/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
66
admin/sql/install.mysql.utf8.sql
Normal file
66
admin/sql/install.mysql.utf8.sql
Normal file
@ -0,0 +1,66 @@
|
||||
CREATE TABLE IF NOT EXISTS `#__ajaxdemo_colours` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`ordering` int(11) NOT NULL default 0,
|
||||
`published` int(1) NOT NULL default 0,
|
||||
`featured` int(1) NOT NULL default 0,
|
||||
`title` varchar(100) NOT NULL,
|
||||
`alias` varchar(100) NOT NULL,
|
||||
`notes` varchar(500) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `#__ajaxdemo_colour` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`colour_id` int(11) NOT NULL,
|
||||
`ordering` int(11) NOT NULL,
|
||||
`published` int(1) NOT NULL,
|
||||
`dflt` int(1) NOT NULL,
|
||||
`title` varchar(100) NOT NULL,
|
||||
`alias` varchar(100) NOT NULL,
|
||||
`main_image` varchar(100) NOT NULL,
|
||||
`thumbnail_image` varchar(100) NOT NULL,
|
||||
`notes` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `#__ajaxdemo_colours` (id, ordering, published, featured, title, alias, notes)
|
||||
VALUES (1, 1, 1, 1, 'Red', 'red', 'Red is a colour with a wavelength of about 700–635 nm');
|
||||
INSERT INTO `#__ajaxdemo_colours` (id, ordering, published, featured, title, alias, notes)
|
||||
VALUES (2, 2, 1, 1, 'Orange', 'orange', 'Orange is a colour with a wavelength of about 635–590 nm');
|
||||
INSERT INTO `#__ajaxdemo_colours` (id, ordering, published, featured, title, alias, notes)
|
||||
VALUES (3, 3, 1, 1, 'Yellow', 'yellow', 'Yellow is a colour with a wavelength of about 590–560 nm');
|
||||
INSERT INTO `#__ajaxdemo_colours` (id, ordering, published, featured, title, alias, notes)
|
||||
VALUES (4, 4, 1, 1, 'Green', 'green', 'Green is a colour with a wavelength of about 560–490 nm');
|
||||
INSERT INTO `#__ajaxdemo_colours` (id, ordering, published, featured, title, alias, notes)
|
||||
VALUES (5, 5, 1, 1, 'Blue', 'Blue', 'Blue is a colour with a wavelength of about 490–450 nm');
|
||||
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (1, 1, 0, 1, 1, 'Red1', 'red1', 'red1.png', 'red1_t.png', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eleifend egestas nulla at lobortis. Integer placerat, nunc pharetra varius sagittis.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (2, 1, 1, 1, 0, 'Red2', 'red2', 'red2.png', 'red2_t.png', 'Velit eros congue risus, sit amet volutpat ipsum tortor imperdiet justo. Cras faucibus, urna non cursus porttitor, nunc nibh ornare lacus, sit amet posuere nisi lectus in metus. Cras pulvinar sodales mauris porta semper. Proin magna odio, egestas in euismod sed.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (3, 1, 2, 1, 0, 'Red3', 'red2', 'red3.png', 'red3_t.png', 'Consequat vel orci. Donec lacinia ligula justo, sed venenatis neque. Curabitur tempor, nulla vel gravida elementum, justo nulla posuere libero, eget convallis augue massa ac purus. Praesent tempor nibh sit amet diam gravida vitae rhoncus est placerat. Sed porttitor vehicula mauris.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (4, 2, 0, 1, 1, 'Orange1', 'orange1', 'orange1.png', 'orange1_t.png', 'Eget feugiat augue aliquam ut. Nam odio mi, consectetur sit amet accumsan eget, pretium porta mauris. Maecenas mollis.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (5, 2, 1, 1, 0, 'Orange2', 'orange2', 'orange2.png', 'orange2_t.png', 'Elit vel vulputate suscipit, ligula dui euismod dolor, condimentum accumsan diam urna nec mauris. Donec condimentum consequat dui.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (6, 2, 2, 1, 0, 'Orange3', 'orange3', 'orange3.png', 'orange3_t.png', 'Vitae aliquet libero congue eu. Vestibulum tristique lobortis ipsum, a varius neque lobortis nec. Morbi ac ullamcorper est.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (7, 3, 0, 1, 1, 'Yellow1', 'yellow1', 'yellow1.png', 'yellow1_t.png', 'Nunc dictum tempor diam in porttitor.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (8, 3, 1, 1, 0, 'Yellow2', 'yellow2', 'yellow2.png', 'yellow2_t.png', 'Praesent ultricies nisl non elit eleifend eu tincidunt mauris sodales. Phasellus at ligula magna. Praesent et libero nec nulla consequat scelerisque.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (9, 3, 2, 1, 0, 'Yellow3', 'yellow3', 'yellow3.png', 'yellow3_t.png', 'Sed eget massa commodo mauris scelerisque ullamcorper. Quisque id gravida ante. Etiam vulputate metus odio. Curabitur egestas sapien in erat tempor accumsan.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (10, 4, 0, 1, 1, 'Green1', 'green1', 'green1.png', 'green1_t.png', 'Nunc justo augue, dapibus vitae ullamcorper non, malesuada vitae quam. Pellentesque adipiscing iaculis nibh sit amet pretium.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (11, 4, 1, 1, 0, 'Green2', 'green2', 'green2.png', 'green2_t.png', 'Vestibulum vel consectetur augue. Nunc non velit vitae lorem elementum rhoncus eu id dolor. Sed pretium sagittis purus sed ultricies.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (12, 4, 2, 1, 0, 'Green3', 'green3', 'green3.png', 'green3_t.png', 'Sed adipiscing, lectus placerat hendrerit pulvinar, massa ipsum posuere nunc, et aliquam magna erat eu turpis.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (13, 5, 0, 1, 1, 'Blue1', 'blue1', 'blue1.png', 'blue1_t.png', 'Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (14, 5, 1, 1, 0, 'Blue2', 'blue2', 'blue2.png', 'blue2_t.png', 'Vivamus cursus malesuada sem, quis fringilla nulla lacinia et.');
|
||||
INSERT INTO `#__ajaxdemo_colour` (id, colour_id, ordering, published, dflt, title, alias, main_image, thumbnail_image, notes)
|
||||
VALUES (15, 5, 2, 1, 0, 'Blue3', 'blue3', 'blue3.png', 'blue3_t.png', 'Cras id turpis quis nisl hendrerit condimentum ut nec mi. Proin dictum sem nec lorem viverra id tempus orci tincidunt.');
|
||||
2
admin/sql/uninstall.mysql.utf8.sql
Normal file
2
admin/sql/uninstall.mysql.utf8.sql
Normal file
@ -0,0 +1,2 @@
|
||||
DROP TABLE `#__ajaxdemo_colours`;
|
||||
DROP TABLE `#__ajaxdemo_colour`;
|
||||
1
admin/sql/updates/index.html
Normal file
1
admin/sql/updates/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
1
admin/sql/updates/mysql/1.0.0.sql
Normal file
1
admin/sql/updates/mysql/1.0.0.sql
Normal file
@ -0,0 +1 @@
|
||||
|
||||
1
admin/sql/updates/mysql/index.html
Normal file
1
admin/sql/updates/mysql/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
42
admin/tables/colour.php
Normal file
42
admin/tables/colour.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax demonstration component
|
||||
*
|
||||
* PHP version 5.3
|
||||
*
|
||||
* @category Joomla_Component
|
||||
* @package Com_Ajaxdemo
|
||||
* @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');
|
||||
|
||||
/**
|
||||
* 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 TableColour extends JTable
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object &$db Database connector object
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function TableColour( &$db )
|
||||
{
|
||||
parent::__construct('#__ajaxdemo_colour', 'id', $db);
|
||||
}
|
||||
|
||||
}
|
||||
42
admin/tables/colours.php
Normal file
42
admin/tables/colours.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax demonstration component
|
||||
*
|
||||
* PHP version 5.3
|
||||
*
|
||||
* @category Joomla_Component
|
||||
* @package Com_Ajaxdemo
|
||||
* @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');
|
||||
|
||||
/**
|
||||
* 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 TableColours extends JTable
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object &$db Database connector object
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function TableColours( &$db )
|
||||
{
|
||||
parent::__construct('#__ajaxdemo_colours', 'id', $db);
|
||||
}
|
||||
|
||||
}
|
||||
1
admin/tables/index.html
Normal file
1
admin/tables/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
1
admin/views/ajaxdemo/index.html
Normal file
1
admin/views/ajaxdemo/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
41
admin/views/ajaxdemo/tmpl/default.php
Normal file
41
admin/views/ajaxdemo/tmpl/default.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?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');
|
||||
|
||||
?>
|
||||
<h2>Ajaxdemo</h2>
|
||||
<p>Welcome to the com_ajaxdemo component to demonstrate one of the many uses of
|
||||
Ajax</p>
|
||||
<p>After installing this component, just add a menu item of type 'Ajaxdemo/Colour
|
||||
List Layout' to a menu, then you will be able to see a list of colours that can be
|
||||
clicked to open in a popup box.</p>
|
||||
<p>Search engines and browsers without javascript see the content through normal
|
||||
html pages.</p>
|
||||
<p>If you are not getting a popup box, then media/system/js/modal.js and
|
||||
media/system/js/modal-uncompressed.js may not have been fixed, if not, then
|
||||
simply append the contents of modal.js.txt that came with the zip installation to
|
||||
both files.</p>
|
||||
<h2>Copyright</h2>
|
||||
<p>Persistent Objects Ltd 2010-2012</p>
|
||||
<p><a href="http://p-o.co.uk/">http://p-o.co.uk</a></p>
|
||||
<h2>License</h2>
|
||||
<p>GNU General Public License version 2 or later; see LICENSE.txt</p>
|
||||
<h2>Thanks</h2>
|
||||
<p>The graphics were created using the Gnu image manipulation program
|
||||
http://www.gimp.org/</p>
|
||||
<p>Thanks to Wikipedia for the colour wavelengths.</p>
|
||||
<p>Thanks to http://www.lipsum.com/ for additional text.</p>
|
||||
1
admin/views/ajaxdemo/tmpl/index.html
Normal file
1
admin/views/ajaxdemo/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
61
admin/views/ajaxdemo/view.html.php
Normal file
61
admin/views/ajaxdemo/view.html.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?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/
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
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
|
||||
* @subpackage Components
|
||||
* @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 AjaxdemoViewAjaxdemo extends JView
|
||||
{
|
||||
/**
|
||||
* Display method for Check
|
||||
*
|
||||
* @param string $tpl Template to display
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function display($tpl = null)
|
||||
{
|
||||
// Set the toolbar
|
||||
JToolBarHelper::title('Ajax demo');
|
||||
|
||||
//JSubMenuHelper::addEntry(
|
||||
// 'Ajaxdemo',
|
||||
// 'index.php?option=com_ajaxdemo&view=ajaxdemo',
|
||||
// true
|
||||
//);
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$document = JFactory::getDocument();
|
||||
$document->setTitle('Ajaxdemo');
|
||||
}
|
||||
|
||||
}
|
||||
1
admin/views/index.html
Normal file
1
admin/views/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#fff"></body></html>
|
||||
Reference in New Issue
Block a user