Compare commits

...

2 Commits

Author SHA1 Message Date
6676e13c8e
Updated with JCB v3.1.0 2022-05-27 07:46:56 +02:00
e5af40542c
update - v2.0.3 2022-03-03 05:59:15 +02:00
83 changed files with 466 additions and 254 deletions

View File

@ -1,4 +1,4 @@
# Demo (2.0.3)
# Demo (2.1.0)
![Demo image](https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/admin/assets/images/vdm-component.jpg "The Demo")
@ -10,8 +10,8 @@ Just a basic demo of the most basic implementations of the [Joomla](http://www.j
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Demo](https://www.vdm.io/)
+ *First Build*: 18th October, 2016
+ *Last Build*: 18th October, 2021
+ *Version*: 2.0.3
+ *Last Build*: 27th May, 2022
+ *Version*: 2.1.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -23,8 +23,8 @@ 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**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **16813**
+ *File count*: **156**
+ *Line count*: **16868**
+ *File count*: **157**
+ *Folder count*: **57**
**31 Hours** or **4 Eight Hour Days** (the actual time the author spent)

View File

@ -1,4 +1,4 @@
# Demo (2.0.3)
# Demo (2.1.0)
![Demo image](https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/admin/assets/images/vdm-component.jpg "The Demo")
@ -10,8 +10,8 @@ Just a basic demo of the most basic implementations of the [Joomla](http://www.j
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Demo](https://www.vdm.io/)
+ *First Build*: 18th October, 2016
+ *Last Build*: 18th October, 2021
+ *Version*: 2.0.3
+ *Last Build*: 27th May, 2022
+ *Version*: 2.1.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -23,8 +23,8 @@ 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**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **16813**
+ *File count*: **156**
+ *Line count*: **16868**
+ *File count*: **157**
+ *Folder count*: **57**
**31 Hours** or **4 Eight Hour Days** (the actual time the author spent)

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage admin.css

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage dashboard.css

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage look.css

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage looks.css

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage admin.js

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage controller.php
@ -21,12 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Utilities\ArrayHelper;
/**
* General Controller of Demo component
*/
class DemoController extends JControllerLegacy
class DemoController extends BaseController
{
/**
* Constructor.

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage demo.php
@ -21,10 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
/**
* Demo Controller
* Demo Admin Controller
*/
class DemoControllerDemo extends JControllerAdmin
class DemoControllerDemo extends AdminController
{
}

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage import.php
@ -21,12 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Utilities\ArrayHelper;
/**
* Demo Import Controller
* Demo Import Base Controller
*/
class DemoControllerImport extends JControllerLegacy
class DemoControllerImport extends BaseController
{
/**
* Import an spreadsheet.

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage look.php
@ -21,12 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\Utilities\ArrayHelper;
/**
* Look Controller
* Look Form Controller
*/
class DemoControllerLook extends JControllerForm
class DemoControllerLook extends FormController
{
/**
* Current or most recently performed task.

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage looks.php
@ -21,12 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
/**
* Looks Controller
* Looks Admin Controller
*/
class DemoControllerLooks extends JControllerAdmin
class DemoControllerLooks extends AdminController
{
/**
* The prefix to use with controller messages.

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage demo.php
@ -21,7 +21,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate');
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_demo'))
@ -35,8 +35,8 @@ $document->addStyleSheet('components/com_demo/assets/css/admin.css');
$document->addScript('components/com_demo/assets/js/admin.js');
// require helper files
JLoader::register('DemoHelper', __DIR__ . '/helpers/demo.php');
JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php');
JLoader::register('DemoHelper', __DIR__ . '/helpers/demo.php');
JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php');
// Get an instance of the controller prefixed by Demo
$controller = JControllerLegacy::getInstance('Demo');

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage demo.php
@ -1893,3 +1893,4 @@ abstract class DemoHelper
return implode($key);
}
}

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage headercheck.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage batch_.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage batchselection.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage details_above.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage details_fullwidth.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage details_under.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage metadata.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage more_left.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage more_right.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage publishing.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage trashhelper.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage demo.php
@ -21,10 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Utilities\ArrayHelper;
/**
* Demo Model
* Demo List Model
*/
class DemoModelDemo extends JModelList
class DemoModelDemo extends ListModel
{
public function getIcons()
{

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage import.php
@ -21,15 +21,16 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
/**
* Demo Import Model
* Demo Import Base Database Model
*/
class DemoModelImport extends JModelLegacy
class DemoModelImport extends BaseDatabaseModel
{
// set uploading values
protected $use_streams = false;

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage look.php
@ -21,14 +21,15 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
* Demo Look Model
* Demo Look Admin Model
*/
class DemoModelLook extends JModelAdmin
class DemoModelLook extends AdminModel
{
/**
* The tab layout fields array.

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage looks.php
@ -21,12 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Utilities\ArrayHelper;
/**
* Looks Model
* Looks List Model
*/
class DemoModelLooks extends JModelList
class DemoModelLooks extends ListModel
{
public function __construct($config = array())
{
@ -118,7 +119,7 @@ class DemoModelLooks extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -491,17 +492,19 @@ class DemoModelLooks extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$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();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -516,7 +519,7 @@ class DemoModelLooks extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__demo_look'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -0,0 +1 @@

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage look.php
@ -21,6 +21,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Table\Table;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
@ -28,7 +29,7 @@ use Joomla\Utilities\ArrayHelper;
/**
* Looks Table class
*/
class DemoTableLook extends JTable
class DemoTableLook extends Table
{
/**
* Ensure the params and metadata in json encoded in the bind method

View File

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

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default_main.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default_vdm.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage view.html.php
@ -21,6 +21,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Demo View class
*/
@ -64,10 +66,10 @@ class DemoViewDemo extends JViewLegacy
JToolBarHelper::title(JText::_('COM_DEMO_DASHBOARD'), 'grid-2');
// set help url for this view if found
$help_url = DemoHelper::getHelpUrl('demo');
if (DemoHelper::checkString($help_url))
$this->help_url = DemoHelper::getHelpUrl('demo');
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'))

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage view.html.php
@ -21,10 +21,12 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\View\HtmlView;
/**
* Demo Import View
* Demo Import Html View
*/
class DemoViewImport extends JViewLegacy
class DemoViewImport extends HtmlView
{
protected $headerList;
protected $hasPackage = false;
@ -93,10 +95,10 @@ class DemoViewImport extends JViewLegacy
}
// set help url for this view if found
$help_url = DemoHelper::getHelpUrl('import');
if (DemoHelper::checkString($help_url))
$this->help_url = DemoHelper::getHelpUrl('import');
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

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage submitbutton.js

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage edit.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage view.html.php
@ -21,10 +21,12 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\View\HtmlView;
/**
* Look View class
* Look Html View class
*/
class DemoViewLook extends JViewLegacy
class DemoViewLook extends HtmlView
{
/**
* display method of View
@ -158,10 +160,10 @@ class DemoViewLook extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = DemoHelper::getHelpUrl('look');
if (DemoHelper::checkString($help_url))
$this->help_url = DemoHelper::getHelpUrl('look');
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,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default_batch_body.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default_batch_footer.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default_body.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default_foot.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default_head.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default_toolbar.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage view.html.php
@ -21,10 +21,12 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\View\HtmlView;
/**
* Demo View class for the Looks
* Demo Html View class for the Looks
*/
class DemoViewLooks extends JViewLegacy
class DemoViewLooks extends HtmlView
{
/**
* Looks view display method
@ -155,10 +157,10 @@ class DemoViewLooks extends JViewLegacy
}
// set help url for this view if found
$help_url = DemoHelper::getHelpUrl('looks');
if (DemoHelper::checkString($help_url))
$this->help_url = DemoHelper::getHelpUrl('looks');
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

View File

@ -1,15 +1,15 @@
<?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>
<creationDate>18th October, 2021</creationDate>
<creationDate>27th May, 2022</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl>
<copyright>Copyright (C) 2015. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>2.0.3</version>
<version>2.1.0</version>
<description><![CDATA[
<h1>Demo (v.2.0.3)</h1>
<h1>Demo (v.2.1.0)</h1>
<div style="clear: both;"></div>
<p>Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder's ability.</p>
<p>Created by <a href="https://www.vdm.io/" target="_blank">Llewellyn van der Merwe</a><br /><small>Development started 18th October, 2016</small></p>

View File

@ -7,7 +7,7 @@
<version>2.0.0</version>
<infourl title="Demo!">https://www.vdm.io/</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/namibia/demo-joomla-3-component/archive/v2.0.0.zip</downloadurl>
<downloadurl type="full" format="zip">https://git.vdm.dev/joomla/Demo-Component/archive/v2.0.0.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
@ -24,7 +24,7 @@
<version>2.0.2</version>
<infourl title="Demo!">https://www.vdm.io/</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/namibia/demo-joomla-3-component/archive/master.zip</downloadurl>
<downloadurl type="full" format="zip">https://git.vdm.dev/joomla/Demo-Component/archive/v2.0.2.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
@ -41,7 +41,24 @@
<version>2.0.3</version>
<infourl title="Demo!">https://www.vdm.io/</infourl>
<downloads>
<downloadurl type="full" format="zip">http://domain.com/demo.zip</downloadurl>
<downloadurl type="full" format="zip">https://git.vdm.dev/joomla/Demo-Component/archive/v2.0.3.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>https://www.vdm.io/</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Demo</name>
<description>Demo Component</description>
<element>com_demo</element>
<type>component</type>
<version>2.1.0</version>
<infourl title="Demo!">https://www.vdm.io/</infourl>
<downloads>
<downloadurl type="full" format="zip">https://git.vdm.dev/joomla/Demo-Component/archive/v2.1.0.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>

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

@ -0,0 +1,157 @@
/*----------------------------------------------------------------------------------| www.vdm.io |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.1.0
@build 27th May, 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

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage script.php
@ -613,7 +613,7 @@ class com_demoInstallerScript
echo '<a target="_blank" href="https://www.vdm.io/" title="Demo">
<img src="components/com_demo/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 2.0.3 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.1.0 Was Successful! Let us know if anything is not working as expected.</h3>';
// Set db if not set already.
if (!isset($db))

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage look.css

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage looking.css

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage looks.css

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage site.css

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage site.js

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage controller.php
@ -21,12 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Utilities\ArrayHelper;
/**
* Demo Component Controller
* Demo Component Base Controller
*/
class DemoController extends JControllerLegacy
class DemoController extends BaseController
{
/**
* Method to display a view.

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage look.php
@ -21,12 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\Utilities\ArrayHelper;
/**
* Look Controller
* Look Form Controller
*/
class DemoControllerLook extends JControllerForm
class DemoControllerLook extends FormController
{
/**
* Current or most recently performed task.

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage demo.php
@ -21,7 +21,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate');
// Set the component css/js
$document = JFactory::getDocument();
@ -30,7 +30,7 @@ $document->addScript('components/com_demo/assets/js/site.js');
// Require helper files
JLoader::register('DemoHelper', __DIR__ . '/helpers/demo.php');
JLoader::register('DemoHelperRoute', __DIR__ . '/helpers/route.php');
JLoader::register('DemoHelperRoute', __DIR__ . '/helpers/route.php');
// Get an instance of the controller prefixed by Demo
$controller = JControllerLegacy::getInstance('Demo');

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage category.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage demo.php
@ -1701,3 +1701,4 @@ abstract class DemoHelper
return implode($key);
}
}

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage headercheck.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage route.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage details_above.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage details_fullwidth.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage details_under.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage metadata.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage more_left.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage more_right.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage publishing.php

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage look.js

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage look.php
@ -21,14 +21,15 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
* Demo Look Model
* Demo Look Admin Model
*/
class DemoModelLook extends JModelAdmin
class DemoModelLook extends AdminModel
{
/**
* The tab layout fields array.

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage looking.php
@ -21,12 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\ItemModel;
use Joomla\Utilities\ArrayHelper;
/**
* Demo Looking Model
* Demo Looking Item Model
*/
class DemoModelLooking extends JModelItem
class DemoModelLooking extends ItemModel
{
/**
* Model context string.

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage looks.php
@ -21,12 +21,13 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Utilities\ArrayHelper;
/**
* Demo Model for Looks
* Demo List Model for Looks
*/
class DemoModelLooks extends JModelList
class DemoModelLooks extends ListModel
{
/**
* Model user data.

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage router.php
@ -123,7 +123,7 @@ class DemoRouter extends JComponentRouterBase
$count = count($segments);
$vars = array();
//Handle View and Identifier
// Handle View and Identifier
switch($segments[0])
{
case 'look':

View File

@ -2,8 +2,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage submitbutton.js

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage edit.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage view.html.php
@ -21,10 +21,12 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\View\HtmlView;
/**
* Look View class
* Look Html View class
*/
class DemoViewLook extends JViewLegacy
class DemoViewLook extends HtmlView
{
/**
* display method of View
@ -157,10 +159,10 @@ class DemoViewLook extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = DemoHelper::getHelpUrl('look');
if (DemoHelper::checkString($help_url))
$this->help_url = DemoHelper::getHelpUrl('look');
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
$this->toolbar = JToolbar::getInstance();

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage view.html.php
@ -21,10 +21,12 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\View\HtmlView;
/**
* Demo View class for the Looking
* Demo Html View class for the Looking
*/
class DemoViewLooking extends JViewLegacy
class DemoViewLooking extends HtmlView
{
// Overwriting JView display method
function display($tpl = null)
@ -113,12 +115,12 @@ class DemoViewLooking extends JViewLegacy
// The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_demo/uikit-v2/css/uikit'.$style.$size.'.css', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
JHtml::_('stylesheet', 'media/com_demo/uikit-v2/css/uikit'.$style.$size.'.css', ['version' => 'auto']);
}
// The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_demo/uikit-v2/js/uikit'.$size.'.js', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
JHtml::_('script', 'media/com_demo/uikit-v2/js/uikit'.$size.'.js', ['version' => 'auto']);
}
// Load the needed uikit components in this view.
@ -134,13 +136,13 @@ class DemoViewLooking extends JViewLegacy
if (File::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css'))
{
// load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
JHtml::_('stylesheet', 'media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']);
}
// check if the JavaScript file exists.
if (File::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/js/components/'.$name.$size.'.js'))
{
// load the js.
$this->document->addScript(JURI::root(true) .'/media/com_demo/uikit-v2/js/components/'.$name.$size.'.js', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
JHtml::_('script', 'media/com_demo/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']);
}
}
}
@ -200,10 +202,10 @@ class DemoViewLooking extends JViewLegacy
{
// set help url for this view if found
$help_url = DemoHelper::getHelpUrl('looking');
if (DemoHelper::checkString($help_url))
$this->help_url = DemoHelper::getHelpUrl('looking');
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
$this->toolbar = JToolbar::getInstance();

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -3,8 +3,8 @@
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 18th October, 2021
@version 2.1.0
@build 27th May, 2022
@created 18th October, 2016
@package Demo
@subpackage view.html.php
@ -21,10 +21,12 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\View\HtmlView;
/**
* Demo View class for the Looks
* Demo Html View class for the Looks
*/
class DemoViewLooks extends JViewLegacy
class DemoViewLooks extends HtmlView
{
// Overwriting JView display method
function display($tpl = null)
@ -77,12 +79,12 @@ class DemoViewLooks extends JViewLegacy
// The uikit css.
if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addStyleSheet(JURI::root(true) .'/media/com_demo/uikit-v2/css/uikit'.$style.$size.'.css', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
JHtml::_('stylesheet', 'media/com_demo/uikit-v2/css/uikit'.$style.$size.'.css', ['version' => 'auto']);
}
// The uikit js.
if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3)
{
$this->document->addScript(JURI::root(true) .'/media/com_demo/uikit-v2/js/uikit'.$size.'.js', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
JHtml::_('script', 'media/com_demo/uikit-v2/js/uikit'.$size.'.js', ['version' => 'auto']);
}
// Load the needed uikit components in this view.
@ -98,13 +100,13 @@ class DemoViewLooks extends JViewLegacy
if (File::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css'))
{
// load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
JHtml::_('stylesheet', 'media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']);
}
// check if the JavaScript file exists.
if (File::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/js/components/'.$name.$size.'.js'))
{
// load the js.
$this->document->addScript(JURI::root(true) .'/media/com_demo/uikit-v2/js/components/'.$name.$size.'.js', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
JHtml::_('script', 'media/com_demo/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']);
}
}
}
@ -135,10 +137,10 @@ class DemoViewLooks extends JViewLegacy
{
// set help url for this view if found
$help_url = DemoHelper::getHelpUrl('looks');
if (DemoHelper::checkString($help_url))
$this->help_url = DemoHelper::getHelpUrl('looks');
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
$this->toolbar = JToolbar::getInstance();