update - v2.0.3

This commit is contained in:
Llewellyn van der Merwe 2022-03-03 05:59:15 +02:00
parent 664e59972f
commit e5af40542c
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
81 changed files with 282 additions and 117 deletions

View File

@ -10,7 +10,7 @@ Just a basic demo of the most basic implementations of the [Joomla](http://www.j
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Demo](https://www.vdm.io/) + *Name*: [Demo](https://www.vdm.io/)
+ *First Build*: 18th October, 2016 + *First Build*: 18th October, 2016
+ *Last Build*: 18th October, 2021 + *Last Build*: 3rd March, 2022
+ *Version*: 2.0.3 + *Version*: 2.0.3
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -23,7 +23,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.) > never making one mistake or taking any coffee break.)
+ *Line count*: **16813** + *Line count*: **16821**
+ *File count*: **156** + *File count*: **156**
+ *Folder count*: **57** + *Folder count*: **57**

View File

@ -10,7 +10,7 @@ Just a basic demo of the most basic implementations of the [Joomla](http://www.j
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Demo](https://www.vdm.io/) + *Name*: [Demo](https://www.vdm.io/)
+ *First Build*: 18th October, 2016 + *First Build*: 18th October, 2016
+ *Last Build*: 18th October, 2021 + *Last Build*: 3rd March, 2022
+ *Version*: 2.0.3 + *Version*: 2.0.3
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -23,7 +23,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.) > never making one mistake or taking any coffee break.)
+ *Line count*: **16813** + *Line count*: **16821**
+ *File count*: **156** + *File count*: **156**
+ *Folder count*: **57** + *Folder count*: **57**

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage admin.css @subpackage admin.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage dashboard.css @subpackage dashboard.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.css @subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looks.css @subpackage looks.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage admin.js @subpackage admin.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage controller.php @subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php
@ -21,6 +21,8 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
/** /**
* Demo Controller * Demo Controller
*/ */

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage import.php @subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.php @subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looks.php @subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php
@ -21,7 +21,7 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate');
// Access check. // Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_demo')) if (!JFactory::getUser()->authorise('core.manage', 'com_demo'))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage headercheck.php @subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage batch_.php @subpackage batch_.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage batchselection.php @subpackage batchselection.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_above.php @subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_fullwidth.php @subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_under.php @subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage metadata.php @subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage more_left.php @subpackage more_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage more_right.php @subpackage more_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage publishing.php @subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage trashhelper.php @subpackage trashhelper.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php
@ -21,6 +21,8 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
/** /**
* Demo Model * Demo Model
*/ */

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage import.php @subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.php @subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looks.php @subpackage looks.php
@ -118,7 +118,7 @@ class DemoModelLooks extends JModelList
*/ */
public function getItems() public function getItems()
{ {
// check in items // Check in items
$this->checkInNow(); $this->checkInNow();
// load parent items // load parent items
@ -491,17 +491,19 @@ class DemoModelLooks extends JModelList
// Get a db connection. // Get a db connection.
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// reset query // Reset query.
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select('*'); $query->select('*');
$query->from($db->quoteName('#__demo_look')); $query->from($db->quoteName('#__demo_look'));
$db->setQuery($query); // Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute(); $db->execute();
if ($db->getNumRows()) if ($db->getNumRows())
{ {
// Get Yesterdays date // Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql(); $date = JFactory::getDate()->modify($time)->toSql();
// reset query // Reset query.
$query = $db->getQuery(true); $query = $db->getQuery(true);
// Fields to update. // Fields to update.
@ -516,7 +518,7 @@ class DemoModelLooks extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\'' $db->quoteName('checked_out_time') . '<\''.$date.'\''
); );
// Check table // Check table.
$query->update($db->quoteName('#__demo_look'))->set($fields)->where($conditions); $query->update($db->quoteName('#__demo_look'))->set($fields)->where($conditions);
$db->setQuery($query); $db->setQuery($query);

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.php @subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default.php @subpackage default.php
@ -21,7 +21,7 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
?> ?>
<div id="j-main-container"> <div id="j-main-container">

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_main.php @subpackage default_main.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_vdm.php @subpackage default_vdm.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php
@ -21,6 +21,8 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
/** /**
* Demo View class * Demo View class
*/ */
@ -64,10 +66,10 @@ class DemoViewDemo extends JViewLegacy
JToolBarHelper::title(JText::_('COM_DEMO_DASHBOARD'), 'grid-2'); JToolBarHelper::title(JText::_('COM_DEMO_DASHBOARD'), 'grid-2');
// set help url for this view if found // set help url for this view if found
$help_url = DemoHelper::getHelpUrl('demo'); $this->help_url = DemoHelper::getHelpUrl('demo');
if (DemoHelper::checkString($help_url)) if (DemoHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $this->help_url);
} }
if ($canDo->get('core.admin') || $canDo->get('core.options')) if ($canDo->get('core.admin') || $canDo->get('core.options'))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php
@ -93,10 +93,10 @@ class DemoViewImport extends JViewLegacy
} }
// set help url for this view if found // set help url for this view if found
$help_url = DemoHelper::getHelpUrl('import'); $this->help_url = DemoHelper::getHelpUrl('import');
if (DemoHelper::checkString($help_url)) if (DemoHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $this->help_url);
} }
} }
} }

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage submitbutton.js @subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage edit.php @subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php
@ -158,10 +158,10 @@ class DemoViewLook extends JViewLegacy
} }
JToolbarHelper::divider(); JToolbarHelper::divider();
// set help url for this view if found // set help url for this view if found
$help_url = DemoHelper::getHelpUrl('look'); $this->help_url = DemoHelper::getHelpUrl('look');
if (DemoHelper::checkString($help_url)) if (DemoHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $this->help_url);
} }
} }

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_batch_body.php @subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_batch_footer.php @subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_body.php @subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_foot.php @subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_head.php @subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_toolbar.php @subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php
@ -155,10 +155,10 @@ class DemoViewLooks extends JViewLegacy
} }
// set help url for this view if found // set help url for this view if found
$help_url = DemoHelper::getHelpUrl('looks'); $this->help_url = DemoHelper::getHelpUrl('looks');
if (DemoHelper::checkString($help_url)) if (DemoHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $this->help_url);
} }
// add the options comp button // add the options comp button

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="4" method="upgrade">
<name>COM_DEMO</name> <name>COM_DEMO</name>
<creationDate>18th October, 2021</creationDate> <creationDate>3rd March, 2022</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail> <authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl> <authorUrl>https://www.vdm.io/</authorUrl>

157
media/js/look.js Normal file
View File

@ -0,0 +1,157 @@
/*----------------------------------------------------------------------------------| www.vdm.io |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 3rd March, 2022
@created 18th October, 2016
@package Demo
@subpackage look.js
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_vvvvvvvvvv_required = false;
jform_vvvvvvvvvw_required = false;
jform_vvvvvvvvvx_required = false;
// Initial Script
jQuery(document).ready(function()
{
var add_vvvvvvv = jQuery("#jform_add input[type='radio']:checked").val();
vvvvvvv(add_vvvvvvv);
});
// the vvvvvvv function
function vvvvvvv(add_vvvvvvv)
{
// set the function logic
if (add_vvvvvvv == 1)
{
jQuery('#jform_dateofbirth').closest('.control-group').show();
// add required attribute to dateofbirth field
if (jform_vvvvvvvvvv_required)
{
updateFieldRequired('dateofbirth',0);
jQuery('#jform_dateofbirth').prop('required','required');
jQuery('#jform_dateofbirth').attr('aria-required',true);
jQuery('#jform_dateofbirth').addClass('required');
jform_vvvvvvvvvv_required = false;
}
jQuery('#jform_email').closest('.control-group').show();
// add required attribute to email field
if (jform_vvvvvvvvvw_required)
{
updateFieldRequired('email',0);
jQuery('#jform_email').prop('required','required');
jQuery('#jform_email').attr('aria-required',true);
jQuery('#jform_email').addClass('required');
jform_vvvvvvvvvw_required = false;
}
jQuery('#jform_image').closest('.control-group').show();
jQuery('#jform_mobile_phone').closest('.control-group').show();
// add required attribute to mobile_phone field
if (jform_vvvvvvvvvx_required)
{
updateFieldRequired('mobile_phone',0);
jQuery('#jform_mobile_phone').prop('required','required');
jQuery('#jform_mobile_phone').attr('aria-required',true);
jQuery('#jform_mobile_phone').addClass('required');
jform_vvvvvvvvvx_required = false;
}
jQuery('#jform_website').closest('.control-group').show();
}
else
{
jQuery('#jform_dateofbirth').closest('.control-group').hide();
// remove required attribute from dateofbirth field
if (!jform_vvvvvvvvvv_required)
{
updateFieldRequired('dateofbirth',1);
jQuery('#jform_dateofbirth').removeAttr('required');
jQuery('#jform_dateofbirth').removeAttr('aria-required');
jQuery('#jform_dateofbirth').removeClass('required');
jform_vvvvvvvvvv_required = true;
}
jQuery('#jform_email').closest('.control-group').hide();
// remove required attribute from email field
if (!jform_vvvvvvvvvw_required)
{
updateFieldRequired('email',1);
jQuery('#jform_email').removeAttr('required');
jQuery('#jform_email').removeAttr('aria-required');
jQuery('#jform_email').removeClass('required');
jform_vvvvvvvvvw_required = true;
}
jQuery('#jform_image').closest('.control-group').hide();
jQuery('#jform_mobile_phone').closest('.control-group').hide();
// remove required attribute from mobile_phone field
if (!jform_vvvvvvvvvx_required)
{
updateFieldRequired('mobile_phone',1);
jQuery('#jform_mobile_phone').removeAttr('required');
jQuery('#jform_mobile_phone').removeAttr('aria-required');
jQuery('#jform_mobile_phone').removeClass('required');
jform_vvvvvvvvvx_required = true;
}
jQuery('#jform_website').closest('.control-group').hide();
}
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (jQuery('#jform_not_required').length > 0) {
var not_required = jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !== val.length){
return true;
}
return false;
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage script.php @subpackage script.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.css @subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looking.css @subpackage looking.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looks.css @subpackage looks.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage site.css @subpackage site.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage site.js @subpackage site.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage controller.php @subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.php @subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php
@ -21,7 +21,7 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate');
// Set the component css/js // Set the component css/js
$document = JFactory::getDocument(); $document = JFactory::getDocument();

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage category.php @subpackage category.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage headercheck.php @subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage route.php @subpackage route.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_above.php @subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_fullwidth.php @subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_under.php @subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage metadata.php @subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage more_left.php @subpackage more_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage more_right.php @subpackage more_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage publishing.php @subpackage publishing.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.js @subpackage look.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.php @subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looking.php @subpackage looking.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looks.php @subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage router.php @subpackage router.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage submitbutton.js @subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage edit.php @subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php
@ -157,10 +157,10 @@ class DemoViewLook extends JViewLegacy
} }
JToolbarHelper::divider(); JToolbarHelper::divider();
// set help url for this view if found // set help url for this view if found
$help_url = DemoHelper::getHelpUrl('look'); $this->help_url = DemoHelper::getHelpUrl('look');
if (DemoHelper::checkString($help_url)) if (DemoHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = JToolbar::getInstance(); $this->toolbar = JToolbar::getInstance();

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php
@ -200,10 +200,10 @@ class DemoViewLooking extends JViewLegacy
{ {
// set help url for this view if found // set help url for this view if found
$help_url = DemoHelper::getHelpUrl('looking'); $this->help_url = DemoHelper::getHelpUrl('looking');
if (DemoHelper::checkString($help_url)) if (DemoHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = JToolbar::getInstance(); $this->toolbar = JToolbar::getInstance();

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.3 @version 2.0.3
@build 18th October, 2021 @build 3rd March, 2022
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php
@ -135,10 +135,10 @@ class DemoViewLooks extends JViewLegacy
{ {
// set help url for this view if found // set help url for this view if found
$help_url = DemoHelper::getHelpUrl('looks'); $this->help_url = DemoHelper::getHelpUrl('looks');
if (DemoHelper::checkString($help_url)) if (DemoHelper::checkString($this->help_url))
{ {
JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $help_url); JToolbarHelper::help('COM_DEMO_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = JToolbar::getInstance(); $this->toolbar = JToolbar::getInstance();