Next update.

This commit is contained in:
Llewellyn van der Merwe 2016-06-02 08:45:56 +01:00
parent 9905ffa027
commit a2e4972feb
89 changed files with 429 additions and 260 deletions

View File

@ -10,7 +10,7 @@ Just a basic demo of the most basic implementations of the [Joomla] (http://www.
+ *Author*: [Llewellyn van der Merwe] (mailto:info@vdm.io)
+ *Name*: [Demo] (https://www.vdm.io/)
+ *First Build*: 5th August, 2015
+ *Last Build*: 2nd May, 2016
+ *Last Build*: 2nd June, 2016
+ *Version*: 1.0.5
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *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-builde
> (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*: **16713**
+ *Line count*: **16832**
+ *File count*: **152**
+ *Folder count*: **50**

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage admin.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage dashboard.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage help_documents.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage looks.css

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage help.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage help_documents.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -0,0 +1,49 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@author Llewellyn van der Merwe <http://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
/-----------------------------------------------------------------------------------------------------------------------------*/
/** PHPExcel root directory */
if (!defined('PHPEXCEL_ROOT')) {
/**
* @ignore
*/
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
}
class PHPExcel_Reader_chunkReadFilter implements PHPExcel_Reader_IReadFilter
{
private $_startRow = 0;
private $_endRow = 0;
/** Set the list of rows that we want to read */
public function setRows($startRow, $chunkSize)
{
$this->_startRow = $startRow;
$this->_endRow = $startRow + $chunkSize;
}
public function readCell($column, $row, $worksheetName = '')
{
// Only read the heading row, and the rows that are configured in $this->_startRow and $this->_endRow
if (($row == 1) || ($row >= $this->_startRow && $row < $this->_endRow)) {
return true;
}
return false;
}
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php
@ -296,18 +296,27 @@ abstract class DemoHelper
*/
public static function getFileHeaders($dataType)
{
// make sure the file is loaded
// make sure these files are loaded
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
JLoader::import('ChunkReadFilter', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/PHPExcel/Reader');
// get session object
$session = JFactory::getSession();
$session = JFactory::getSession();
$package = $session->get('package', null);
$package = json_decode($package, true);
// set the headers
if(isset($package['dir']))
{
$chunkFilter = new PHPExcel_Reader_chunkReadFilter();
// only load first three rows
$chunkFilter->setRows(2,1);
// identify the file type
$inputFileType = PHPExcel_IOFactory::identify($package['dir']);
// create the reader for this file type
$excelReader = PHPExcel_IOFactory::createReader($inputFileType);
// load the limiting filter
$excelReader->setReadFilter($chunkFilter);
$excelReader->setReadDataOnly(true);
// load the rows (only first three)
$excelObj = $excelReader->load($package['dir']);
$headers = array();
foreach ($excelObj->getActiveSheet()->getRowIterator() as $row)
@ -403,31 +412,33 @@ abstract class DemoHelper
return false;
}
public static function jsonToString($value, $sperator = ", ")
public static function jsonToString($value, $sperator = ", ", $table = null)
{
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE) {
// is JSON
if (json_last_error() === JSON_ERROR_NONE)
{
// is JSON
if (self::checkArray($result))
{
$value = '';
$counter = 0;
foreach ($result as $string)
if (self::checkString($table))
{
if ($counter)
$names = array();
foreach ($result as $val)
{
$value .= $sperator.$string;
if ($name = self::getVar($table, $val, 'id', 'name'))
{
$names[] = $name;
}
}
else
if (self::checkArray($names))
{
$value .= $string;
}
$counter++;
return (string) implode($sperator,$names);
}
}
return $value;
return (string) implode($sperator,$result);
}
return json_decode($value);
return (string) json_decode($value);
}
return $value;
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage batch_.php

View File

@ -18,6 +18,7 @@ COM_DEMO_CONFIG_GLOBAL_DESC="The Global Parameters"
COM_DEMO_CONFIG_GLOBAL_LABEL="Global"
COM_DEMO_CONTRIBUTOR="Contributor"
COM_DEMO_CONTRIBUTORS="Contributors"
COM_DEMO_CREATE_NEW_S="Create New %s"
COM_DEMO_DASH="Dashboard"
COM_DEMO_DASHBOARD="Demo Dashboard"
COM_DEMO_DASHBOARD_HELP_DOCUMENTS="Help Documents<br /><br />"
@ -28,6 +29,7 @@ COM_DEMO_EDIT_CREATED_BY="Edit Created By"
COM_DEMO_EDIT_CREATED_BY_DESC=" Allows users in this group to edit created by."
COM_DEMO_EDIT_CREATED_DATE="Edit Created Date"
COM_DEMO_EDIT_CREATED_DATE_DESC=" Allows users in this group to edit created date."
COM_DEMO_EDIT_S="Edit %s"
COM_DEMO_EDIT_VERSIONS="Edit Version"
COM_DEMO_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions."
COM_DEMO_EXPORT_DATA="Export Data"
@ -84,6 +86,7 @@ COM_DEMO_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION="Select the view being targeted"
COM_DEMO_HELP_DOCUMENT_ADMIN_VIEW_LABEL="Admin Views"
COM_DEMO_HELP_DOCUMENT_ALIAS="Alias"
COM_DEMO_HELP_DOCUMENT_ALIAS_HINT="Auto-generated from name"
COM_DEMO_HELP_DOCUMENT_ALIAS_LABEL="Alias"
COM_DEMO_HELP_DOCUMENT_ALL="All"
COM_DEMO_HELP_DOCUMENT_ARTICLE="Article"
COM_DEMO_HELP_DOCUMENT_ARTICLE_LABEL="Article"
@ -242,6 +245,7 @@ COM_DEMO_LOOK_ADD_LABEL="Add Custom Stuff"
COM_DEMO_LOOK_AGE_LABEL="Age Group"
COM_DEMO_LOOK_ALIAS="Alias"
COM_DEMO_LOOK_ALIAS_HINT="Auto-generated from name"
COM_DEMO_LOOK_ALIAS_LABEL="Alias"
COM_DEMO_LOOK_CREATED_BY_DESC="The user that created the Look."
COM_DEMO_LOOK_CREATED_BY_LABEL="Created by"
COM_DEMO_LOOK_CREATED_DATE_DESC="The date Look was created."

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage batchselection.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage repetable_numbers_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage repetable_numbers_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage articles.php
@ -52,30 +52,90 @@ class JFormFieldArticles extends JFormFieldList
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create article
if ($user->authorise('core.create', 'com_demo'))
{
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
}
// build the button
$button = '<a class="btn btn-small btn-success"
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_DEMO_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_demo&amp;view=article&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span>' . JText::_('COM_DEMO_NEW') . '</a>';
// return the button attached to input field
return $html . $button;
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit article
if (($buttonName == 'article' || $buttonName == 'articles') && $user->authorise('core.edit', 'com_demo'))
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_DEMO_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_demo&view=articles&task=article.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for article field.
if (is_array($button) && count($button) > 0)
{
// Add some final script
$script[] = "
jQuery(document).ready(function() {
jQuery('#jform_".$buttonName."').closest('.control-group').addClass('input-append');
});";
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return $html . implode('',$button);
}
}
return $html;

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.js

View File

@ -19,6 +19,7 @@
label="COM_DEMO_HELP_DOCUMENT_CREATED_DATE_LABEL"
description="COM_DEMO_HELP_DOCUMENT_CREATED_DATE_DESC"
size="22"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
@ -27,11 +28,13 @@
name="created_by"
type="user"
label="COM_DEMO_HELP_DOCUMENT_CREATED_BY_LABEL"
description="COM_DEMO_HELP_DOCUMENT_CREATED_BY_DESC"
/>
<!-- Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
<option value="1">
JPUBLISHED</option>
@ -59,6 +62,7 @@
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
default="1"
required="false"
/>
<!-- Ordering Field. Type: Numbers (joomla) -->
@ -70,6 +74,7 @@
description=""
default="0"
size="6"
required="false"
/>
<!-- Version Field. Type: Text (joomla) -->
@ -209,7 +214,7 @@
<field
type="text"
name="alias"
label="JFIELD_ALIAS_LABEL"
label="COM_DEMO_HELP_DOCUMENT_ALIAS_LABEL"
description="JFIELD_ALIAS_DESC"
filter="STRING"
hint="COM_DEMO_HELP_DOCUMENT_ALIAS_HINT"

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage look.js

View File

@ -19,6 +19,7 @@
label="COM_DEMO_LOOK_CREATED_DATE_LABEL"
description="COM_DEMO_LOOK_CREATED_DATE_DESC"
size="22"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
@ -27,11 +28,13 @@
name="created_by"
type="user"
label="COM_DEMO_LOOK_CREATED_BY_LABEL"
description="COM_DEMO_LOOK_CREATED_BY_DESC"
/>
<!-- Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
<option value="1">
JPUBLISHED</option>
@ -59,6 +62,7 @@
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
default="1"
required="false"
/>
<!-- Ordering Field. Type: Numbers (joomla) -->
@ -70,6 +74,7 @@
description=""
default="0"
size="6"
required="false"
/>
<!-- Version Field. Type: Text (joomla) -->
@ -276,7 +281,7 @@
<field
type="text"
name="alias"
label="JFIELD_ALIAS_LABEL"
label="COM_DEMO_LOOK_ALIAS_LABEL"
description="JFIELD_ALIAS_DESC"
filter="STRING"
hint="COM_DEMO_LOOK_ALIAS_HINT"

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage help_documents.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage import.php
@ -47,7 +47,7 @@ class DemoModelImport extends JModelLegacy
* Import Settings
*/
protected $getType = NULL;
protected $dataType = NULL;
protected $dataType = NULL;
/**
* Method to auto-populate the model state.

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage looks.php

View File

@ -81,3 +81,9 @@ CREATE TABLE IF NOT EXISTS `#__demo_help_document` (
KEY `idx_article` (`article`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
--
-- Always insure this column is large enough for all the access control values.
--
ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.';

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_main.php
@ -22,16 +22,18 @@
defined('_JEXEC') or die('Restricted access');
?>
<?php if(is_array($this->icons['main'])) :?>
<?php if(isset($this->icons['main']) && is_array($this->icons['main'])) :?>
<?php foreach($this->icons['main'] as $icon): ?>
<div class="dashboard-wraper">
<div class="dashboard-content">
<a class="icon" href="<?php echo $icon->url; ?>">
<img alt="<?php echo $icon->alt; ?>" src="components/com_demo/assets/images/icons/<?php echo $icon->image; ?>">
<span class="dashboard-title"><?php echo JText::_($icon->name); ?></span>
</a>
</div>
</div>
<?php endforeach; ?>
<div class="clearfix"></div>
<div class="dashboard-wraper">
<div class="dashboard-content">
<a class="icon" href="<?php echo $icon->url; ?>">
<img alt="<?php echo $icon->alt; ?>" src="components/com_demo/assets/images/icons/<?php echo $icon->image; ?>">
<span class="dashboard-title"><?php echo JText::_($icon->name); ?></span>
</a>
</div>
</div>
<?php endforeach; ?>
<div class="clearfix"></div>
<?php else: ?>
<div class="alert alert-error"><h4 class="alert-heading"><?php echo JText::_("Permission denied, or not correctly set"); ?></h4><div class="alert-message"><?php echo JText::_("Please notify your System Administrator if result is unexpected."); ?></div></div>
<?php endif; ?>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_vdm.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage edit.php
@ -28,7 +28,29 @@ JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_demo');
?>
<script type="text/javascript">
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_demo/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
jQuery('#loading').show();
// when page is ready remove and show
jQuery(window).load(function() {
jQuery('#demo_loader').fadeIn('fast');
jQuery('#loading').hide();
});
</script>
<div id="demo_loader" style="display: none;">
<form action="<?php echo JRoute::_('index.php?option=com_demo&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<?php echo JLayoutHelper::render('help_document.details_above', $this); ?><div class="form-horizontal">
@ -93,7 +115,8 @@ $componentParams = JComponentHelper::getParams('com_demo');
<div class="clearfix"></div>
<?php echo JLayoutHelper::render('help_document.details_under', $this); ?>
</form>
</form>
</div>
<script type="text/javascript">

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php
@ -26,8 +26,7 @@ JHtml::_('bootstrap.tooltip');
JHtml::_('script', 'system/core.js', false, true);
?>
<script type="text/javascript">
<?php if ($this->hasPackage && DemoHelper::checkArray($this->headerList)) : ?>
<?php if ($this->hasPackage && DemoHelper::checkArray($this->headerList)) : ?>
Joomla.continueImport = function()
{
var form = document.getElementById('adminForm');
@ -54,7 +53,7 @@ JHtml::_('script', 'system/core.js', false, true);
form.submit();
}
};
<?php else: ?>
<?php else: ?>
Joomla.submitbutton = function()
{
var form = document.getElementById('adminForm');
@ -107,25 +106,25 @@ JHtml::_('script', 'system/core.js', false, true);
form.submit();
}
};
<?php endif; ?>
<?php endif; ?>
// Add spindle-wheel for importations:
jQuery(document).ready(function($) {
var outerDiv = $('body');
// Add spindle-wheel for importations:
jQuery(document).ready(function($) {
var outerDiv = $('body');
$('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_demo/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - $(window).scrollTop())
.css("left", outerDiv.position().left - $(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
});
$('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_demo/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - $(window).scrollTop())
.css("left", outerDiv.position().left - $(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
});
</script>
@ -140,89 +139,87 @@ JHtml::_('script', 'system/core.js', false, true);
<?php else : ?>
<div id="j-main-container">
<?php endif;?>
<?php if ($this->hasPackage && DemoHelper::checkArray($this->headerList) && DemoHelper::checkArray($this->headers)) : ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_DEMO_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
<div class="control-group">
<label class="control-label" ><h4><?php echo JText::_('COM_DEMO_IMPORT_TABLE_COLUMNS'); ?></h4></label>
<div class="controls">
<label class="control-label" ><h4><?php echo JText::_('COM_DEMO_IMPORT_FILE_COLUMNS'); ?></h4></label>
</div>
</div>
<?php foreach($this->headerList as $name => $title): ?>
<div class="control-group">
<label for="<?php echo $name; ?>" class="control-label" ><?php echo $title; ?></label>
<div class="controls">
<select name="<?php echo $name; ?>" id="vdm_<?php echo $name; ?>" required class="required input_box" >
<option value=""><?php echo JText::_('COM_DEMO_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
<option value="IGNORE"><?php echo JText::_('COM_DEMO_IMPORT_IGNORE_COLUMN'); ?></option>
<?php foreach($this->headers as $value => $option): ?>
<?php $selected = (strtolower($option) == strtolower ($title) || strtolower($option) == strtolower($name))? 'selected="selected"':''; ?>
<option value="<?php echo DemoHelper::htmlEscape($value); ?>" class="required" <?php echo $selected ?>><?php echo DemoHelper::htmlEscape($option); ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<?php endforeach; ?>
<div class="form-actions">
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_DEMO_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueImport()" />
</div>
</fieldset>
<input type="hidden" name="gettype" value="continue" />
<?php else: ?>
<?php if ($this->hasPackage && DemoHelper::checkArray($this->headerList) && DemoHelper::checkArray($this->headers)) : ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_DEMO_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
<div class="control-group">
<label class="control-label" ><h4><?php echo JText::_('COM_DEMO_IMPORT_TABLE_COLUMNS'); ?></h4></label>
<div class="controls">
<label class="control-label" ><h4><?php echo JText::_('COM_DEMO_IMPORT_FILE_COLUMNS'); ?></h4></label>
</div>
</div>
<?php foreach($this->headerList as $name => $title): ?>
<div class="control-group">
<label for="<?php echo $name; ?>" class="control-label" ><?php echo $title; ?></label>
<div class="controls">
<select name="<?php echo $name; ?>" id="vdm_<?php echo $name; ?>" required class="required input_box" >
<option value=""><?php echo JText::_('COM_DEMO_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
<option value="IGNORE"><?php echo JText::_('COM_DEMO_IMPORT_IGNORE_COLUMN'); ?></option>
<?php foreach($this->headers as $value => $option): ?>
<?php $selected = (strtolower($option) == strtolower ($title) || strtolower($option) == strtolower($name))? 'selected="selected"':''; ?>
<option value="<?php echo DemoHelper::htmlEscape($value); ?>" class="required" <?php echo $selected ?>><?php echo DemoHelper::htmlEscape($option); ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<?php endforeach; ?>
<div class="form-actions">
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_DEMO_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueImport()" />
</div>
</fieldset>
<input type="hidden" name="gettype" value="continue" />
<?php else: ?>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'upload')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'upload', JText::_('COM_DEMO_IMPORT_FROM_UPLOAD', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_DEMO_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_package" class="control-label"><?php echo JText::_('COM_DEMO_IMPORT_SELECT_FILE'); ?></label>
<div class="controls">
<input class="input_box" id="import_package" name="import_package" type="file" size="57" />
</div>
</div>
<div class="form-actions">
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_DEMO_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" />&nbsp;&nbsp;&nbsp;<small><?php echo JText::_('COM_DEMO_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'directory', JText::_('COM_DEMO_IMPORT_FROM_DIRECTORY', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_DEMO_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_directory" class="control-label"><?php echo JText::_('COM_DEMO_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
<div class="controls">
<input type="text" id="import_directory" name="import_directory" class="span5 input_box" size="70" value="<?php echo $this->state->get('import.directory'); ?>" />
</div>
</div>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_DEMO_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" />&nbsp;&nbsp;&nbsp;<small><?php echo JText::_('COM_DEMO_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'url', JText::_('COM_DEMO_IMPORT_FROM_URL', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_DEMO_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_url" class="control-label"><?php echo JText::_('COM_DEMO_IMPORT_SELECT_FILE_URL'); ?></label>
<div class="controls">
<input type="text" id="import_url" name="import_url" class="span5 input_box" size="70" value="http://" />
</div>
</div>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_DEMO_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" />&nbsp;&nbsp;&nbsp;<small><?php echo JText::_('COM_DEMO_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'upload', JText::_('COM_DEMO_IMPORT_FROM_UPLOAD', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_DEMO_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_package" class="control-label"><?php echo JText::_('COM_DEMO_IMPORT_SELECT_FILE'); ?></label>
<div class="controls">
<input class="input_box" id="import_package" name="import_package" type="file" size="57" />
</div>
</div>
<div class="form-actions">
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_DEMO_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" />&nbsp;&nbsp;&nbsp;<small><?php echo JText::_('COM_DEMO_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'directory', JText::_('COM_DEMO_IMPORT_FROM_DIRECTORY', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_DEMO_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_directory" class="control-label"><?php echo JText::_('COM_DEMO_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
<div class="controls">
<input type="text" id="import_directory" name="import_directory" class="span5 input_box" size="70" value="<?php echo $this->state->get('import.directory'); ?>" />
</div>
</div>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_DEMO_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" />&nbsp;&nbsp;&nbsp;<small><?php echo JText::_('COM_DEMO_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'url', JText::_('COM_DEMO_IMPORT_FROM_URL', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_DEMO_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_url" class="control-label"><?php echo JText::_('COM_DEMO_IMPORT_SELECT_FILE_URL'); ?></label>
<div class="controls">
<input type="text" id="import_url" name="import_url" class="span5 input_box" size="70" value="http://" />
</div>
</div>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_DEMO_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" />&nbsp;&nbsp;&nbsp;<small><?php echo JText::_('COM_DEMO_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<input type="hidden" name="gettype" value="upload" />
<?php endif; ?>
<input type="hidden" name="task" value="import.import" />
<?php echo JHtml::_('form.token'); ?>
<?php endif; ?>
<input type="hidden" name="task" value="import.import" />
<?php echo JHtml::_('form.token'); ?>
</form>
</div>
</div>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage edit.php
@ -28,7 +28,7 @@ JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_demo');
?>
<div id="demo_loader">
<form action="<?php echo JRoute::_('index.php?option=com_demo&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<?php echo JLayoutHelper::render('look.details_above', $this); ?><div class="form-horizontal">
@ -99,7 +99,8 @@ $componentParams = JComponentHelper::getParams('com_demo');
<div class="clearfix"></div>
<?php echo JLayoutHelper::render('look.details_under', $this); ?>
</form>
</form>
</div>
<script type="text/javascript">

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_DEMO</name>
<creationDate>2nd May, 2016</creationDate>
<creationDate>2nd June, 2016</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>info@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage script.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage site.css

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage help.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php
@ -26,34 +26,37 @@ defined('_JEXEC') or die('Restricted access');
*/
abstract class DemoHelper
{###SITE_GLOBAL_EVENT_HELPER### ###SITE_CUSTOM_HELPER_SCRIPT###
public static function jsonToString($value)
public static function jsonToString($value, $sperator = ", ", $table = null)
{
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE) {
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE)
{
// is JSON
if (self::checkArray($result))
if (self::checkArray($result))
{
if (self::checkString($table))
{
$value = '';
$counter = 0;
foreach ($result as $string)
$names = array();
foreach ($result as $val)
{
if ($counter)
if ($name = self::getVar($table, $val, 'id', 'name'))
{
$value .= ", ".$string;
$names[] = $name;
}
else
{
$value .= $string;
}
$counter++;
}
if (self::checkArray($names))
{
return (string) implode($sperator,$names);
}
}
return json_decode($value);
}
return $value;
}
return (string) implode($sperator,$result);
}
return (string) json_decode($value);
}
return $value;
}
/**
* Load the Component xml manifest.

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage route.php

View File

@ -1,5 +1,8 @@
COM_CONTENT_FIELD_MODIFIED_DESC="The last date this item was modified."
COM_DEMO="Demo"
COM_DEMO_CREATE_NEW_S="Create New %s"
COM_DEMO_EDIT_S="Edit %s"
COM_DEMO_NEW="New"
JGLOBAL_FIELD_ID_DESC="Record number in the database."
JGLOBAL_FIELD_ID_LABEL="ID"
JGLOBAL_FIELD_MODIFIED_BY_DESC="The user who did the last modification."

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 2nd May, 2016
@build 2nd June, 2016
@created 5th August, 2015
@package Demo
@subpackage router.php