Fixed the created_by auto save to current user if none is set at the creation of any new item. Fixed referral field update method when clicking new in referred view. All other changes are only random variable name and date changes (due to automation)

This commit is contained in:
Llewellyn van der Merwe 2016-02-20 22:19:24 +02:00
parent 1e544a95db
commit 9ab56e6636
83 changed files with 395 additions and 291 deletions

View File

@ -10,38 +10,38 @@ 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*: 6th January, 2016
+ *Last Build*: 20th February, 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
## Build Time
**43 Hours** or **5 Eight Hour Days** (actual time the author saved -
**47 Hours** or **6 Eight Hour Days** (actual time the author saved -
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*: **15415**
+ *Line count*: **16658**
+ *File count*: **152**
+ *Folder count*: **50**
**29 Hours** or **4 Eight Hour Days** (the actual time the author spent)
**30 Hours** or **4 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @11hours** = codingtime / 4;
> **planning @6hours** = codingtime / 7;
> **mapping @4hours** = codingtime / 10;
> **office @7hours** = codingtime / 6;)
> **debugging @12hours** = codingtime / 4;
> **planning @7hours** = codingtime / 7;
> **mapping @5hours** = codingtime / 10;
> **office @8hours** = codingtime / 6;)
**72 Hours** or **9 Eight Hour Days**
**77 Hours** or **10 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **1.8 weeks** or **0.4 months**
Project duration: **2 weeks** or **0.4 months**
> This **component** was build with a Joomla [Automated Component Builder] (https://www.vdm.io/joomla-component-builder).
> Developed by [Llewellyn van der Merwe] (mailto:joomla@vdm.io)

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage admin.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage dashboard.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage help_documents.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage looks.css

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage help.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.php
@ -313,7 +313,7 @@ class DemoControllerHelp_document extends JControllerForm
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy &$model, $validData = array())
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage help_documents.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage look.php
@ -313,7 +313,7 @@ class DemoControllerLook extends JControllerForm
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy &$model, $validData = array())
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php
@ -493,7 +493,7 @@ abstract class DemoHelper
foreach ($actions as $action)
{
// set to use component default
$allow = true;
$fallback= true;
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions))
{
// The record has been set. Check the record permissions.
@ -509,13 +509,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback= false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_demo.'.$view.'.' . (int) $record->id))
@ -525,13 +525,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback= false;
}
}
elseif ($user->authorise('core.edit.own', 'com_demo'))
@ -541,13 +541,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback= false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_demo'))
@ -557,13 +557,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback= false;
}
}
}
@ -593,13 +593,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback= false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_demo.'.$views.'.category.' . (int) $record->catid))
@ -609,13 +609,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback= false;
}
}
elseif ($user->authorise('core.edit.own', 'com_demo'))
@ -625,13 +625,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback= false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_demo'))
@ -641,21 +641,21 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback= false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback= false;
}
}
}
}
}
}
// if allowed then fall back on component global settings
if ($allow)
// if allowed then fallback on component global settings
if ($fallback)
{
$result->set($action->name, $user->authorise($action->name, 'com_demo'));
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage batch_.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage batchselection.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage repetable_numbers_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage repetable_numbers_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage articles.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.js
@ -18,38 +18,38 @@
/------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_UwWDUibNSG_required = false;
jform_OhjWnCSlYt_required = false;
jform_TfDWyOuWhA_required = false;
jform_vceyFYEzKq_required = false;
jform_KBdlcVRWwj_required = false;
jform_dweMHUwWAb_required = false;
jform_pnuDTOlQhG_required = false;
jform_dObkcfdSaH_required = false;
// Initial Script
jQuery(document).ready(function()
{
var location_doyJedc = jQuery("#jform_location input[type='radio']:checked").val();
doyJedc(location_doyJedc);
var location_uyLnUzq = jQuery("#jform_location input[type='radio']:checked").val();
uyLnUzq(location_uyLnUzq);
var location_smDxuix = jQuery("#jform_location input[type='radio']:checked").val();
smDxuix(location_smDxuix);
var location_ywPZpnl = jQuery("#jform_location input[type='radio']:checked").val();
ywPZpnl(location_ywPZpnl);
var type_UwWDUib = jQuery("#jform_type").val();
UwWDUib(type_UwWDUib);
var type_KBdlcVR = jQuery("#jform_type").val();
KBdlcVR(type_KBdlcVR);
var type_OhjWnCS = jQuery("#jform_type").val();
OhjWnCS(type_OhjWnCS);
var type_dweMHUw = jQuery("#jform_type").val();
dweMHUw(type_dweMHUw);
var type_TfDWyOu = jQuery("#jform_type").val();
TfDWyOu(type_TfDWyOu);
var type_pnuDTOl = jQuery("#jform_type").val();
pnuDTOl(type_pnuDTOl);
var target_vceyFYE = jQuery("#jform_target input[type='radio']:checked").val();
vceyFYE(target_vceyFYE);
var target_dObkcfd = jQuery("#jform_target input[type='radio']:checked").val();
dObkcfd(target_dObkcfd);
});
// the doyJedc function
function doyJedc(location_doyJedc)
// the uyLnUzq function
function uyLnUzq(location_uyLnUzq)
{
// set the function logic
if (location_doyJedc == 1)
if (location_uyLnUzq == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
}
@ -59,11 +59,11 @@ function doyJedc(location_doyJedc)
}
}
// the smDxuix function
function smDxuix(location_smDxuix)
// the ywPZpnl function
function ywPZpnl(location_ywPZpnl)
{
// set the function logic
if (location_smDxuix == 2)
if (location_ywPZpnl == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
}
@ -73,198 +73,198 @@ function smDxuix(location_smDxuix)
}
}
// the UwWDUib function
function UwWDUib(type_UwWDUib)
// the KBdlcVR function
function KBdlcVR(type_KBdlcVR)
{
if (isSet(type_UwWDUib) && type_UwWDUib.constructor !== Array)
if (isSet(type_KBdlcVR) && type_KBdlcVR.constructor !== Array)
{
var temp_UwWDUib = type_UwWDUib;
var type_UwWDUib = [];
type_UwWDUib.push(temp_UwWDUib);
var temp_KBdlcVR = type_KBdlcVR;
var type_KBdlcVR = [];
type_KBdlcVR.push(temp_KBdlcVR);
}
else if (!isSet(type_UwWDUib))
else if (!isSet(type_KBdlcVR))
{
var type_UwWDUib = [];
var type_KBdlcVR = [];
}
var type = type_UwWDUib.some(type_UwWDUib_SomeFunc);
var type = type_KBdlcVR.some(type_KBdlcVR_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_UwWDUibNSG_required)
if (jform_KBdlcVRWwj_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_UwWDUibNSG_required = false;
jform_KBdlcVRWwj_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_UwWDUibNSG_required)
if (!jform_KBdlcVRWwj_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_UwWDUibNSG_required = true;
jform_KBdlcVRWwj_required = true;
}
}
}
// the UwWDUib Some function
function type_UwWDUib_SomeFunc(type_UwWDUib)
// the KBdlcVR Some function
function type_KBdlcVR_SomeFunc(type_KBdlcVR)
{
// set the function logic
if (type_UwWDUib == 3)
if (type_KBdlcVR == 3)
{
return true;
}
return false;
}
// the OhjWnCS function
function OhjWnCS(type_OhjWnCS)
// the dweMHUw function
function dweMHUw(type_dweMHUw)
{
if (isSet(type_OhjWnCS) && type_OhjWnCS.constructor !== Array)
if (isSet(type_dweMHUw) && type_dweMHUw.constructor !== Array)
{
var temp_OhjWnCS = type_OhjWnCS;
var type_OhjWnCS = [];
type_OhjWnCS.push(temp_OhjWnCS);
var temp_dweMHUw = type_dweMHUw;
var type_dweMHUw = [];
type_dweMHUw.push(temp_dweMHUw);
}
else if (!isSet(type_OhjWnCS))
else if (!isSet(type_dweMHUw))
{
var type_OhjWnCS = [];
var type_dweMHUw = [];
}
var type = type_OhjWnCS.some(type_OhjWnCS_SomeFunc);
var type = type_dweMHUw.some(type_dweMHUw_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
if (jform_OhjWnCSlYt_required)
if (jform_dweMHUwWAb_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_OhjWnCSlYt_required = false;
jform_dweMHUwWAb_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
if (!jform_OhjWnCSlYt_required)
if (!jform_dweMHUwWAb_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_OhjWnCSlYt_required = true;
jform_dweMHUwWAb_required = true;
}
}
}
// the OhjWnCS Some function
function type_OhjWnCS_SomeFunc(type_OhjWnCS)
// the dweMHUw Some function
function type_dweMHUw_SomeFunc(type_dweMHUw)
{
// set the function logic
if (type_OhjWnCS == 1)
if (type_dweMHUw == 1)
{
return true;
}
return false;
}
// the TfDWyOu function
function TfDWyOu(type_TfDWyOu)
// the pnuDTOl function
function pnuDTOl(type_pnuDTOl)
{
if (isSet(type_TfDWyOu) && type_TfDWyOu.constructor !== Array)
if (isSet(type_pnuDTOl) && type_pnuDTOl.constructor !== Array)
{
var temp_TfDWyOu = type_TfDWyOu;
var type_TfDWyOu = [];
type_TfDWyOu.push(temp_TfDWyOu);
var temp_pnuDTOl = type_pnuDTOl;
var type_pnuDTOl = [];
type_pnuDTOl.push(temp_pnuDTOl);
}
else if (!isSet(type_TfDWyOu))
else if (!isSet(type_pnuDTOl))
{
var type_TfDWyOu = [];
var type_pnuDTOl = [];
}
var type = type_TfDWyOu.some(type_TfDWyOu_SomeFunc);
var type = type_pnuDTOl.some(type_pnuDTOl_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
if (jform_TfDWyOuWhA_required)
if (jform_pnuDTOlQhG_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
jform_TfDWyOuWhA_required = false;
jform_pnuDTOlQhG_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
if (!jform_TfDWyOuWhA_required)
if (!jform_pnuDTOlQhG_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
jform_TfDWyOuWhA_required = true;
jform_pnuDTOlQhG_required = true;
}
}
}
// the TfDWyOu Some function
function type_TfDWyOu_SomeFunc(type_TfDWyOu)
// the pnuDTOl Some function
function type_pnuDTOl_SomeFunc(type_pnuDTOl)
{
// set the function logic
if (type_TfDWyOu == 2)
if (type_pnuDTOl == 2)
{
return true;
}
return false;
}
// the vceyFYE function
function vceyFYE(target_vceyFYE)
// the dObkcfd function
function dObkcfd(target_dObkcfd)
{
// set the function logic
if (target_vceyFYE == 1)
if (target_dObkcfd == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
if (jform_vceyFYEzKq_required)
if (jform_dObkcfdSaH_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
jform_vceyFYEzKq_required = false;
jform_dObkcfdSaH_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
if (!jform_vceyFYEzKq_required)
if (!jform_dObkcfdSaH_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
jform_vceyFYEzKq_required = true;
jform_dObkcfdSaH_required = true;
}
}
}

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage look.js
@ -18,23 +18,23 @@
/------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_VLLamwheAX_required = false;
jform_SJxiaTCdRE_required = false;
// Initial Script
jQuery(document).ready(function()
{
var name_AqrIpkD = jQuery("#jform_name").val();
AqrIpkD(name_AqrIpkD);
var name_mgQJHOz = jQuery("#jform_name").val();
mgQJHOz(name_mgQJHOz);
var add_VLLamwh = jQuery("#jform_add input[type='radio']:checked").val();
VLLamwh(add_VLLamwh);
var add_SJxiaTC = jQuery("#jform_add input[type='radio']:checked").val();
SJxiaTC(add_SJxiaTC);
});
// the AqrIpkD function
function AqrIpkD(name_AqrIpkD)
// the mgQJHOz function
function mgQJHOz(name_mgQJHOz)
{
// set the function logic
if (isSet(name_AqrIpkD))
if (isSet(name_mgQJHOz))
{
jQuery('#jform_alias').closest('.control-group').show();
jQuery('#jform_description').closest('.control-group').show();
@ -46,20 +46,20 @@ function AqrIpkD(name_AqrIpkD)
}
}
// the VLLamwh function
function VLLamwh(add_VLLamwh)
// the SJxiaTC function
function SJxiaTC(add_SJxiaTC)
{
// set the function logic
if (add_VLLamwh == 1)
if (add_SJxiaTC == 1)
{
jQuery('#jform_acronym').closest('.control-group').show();
if (jform_VLLamwheAX_required)
if (jform_SJxiaTCdRE_required)
{
updateFieldRequired('acronym',0);
jQuery('#jform_acronym').prop('required','required');
jQuery('#jform_acronym').attr('aria-required',true);
jQuery('#jform_acronym').addClass('required');
jform_VLLamwheAX_required = false;
jform_SJxiaTCdRE_required = false;
}
jQuery('#jform_website').closest('.control-group').show();
@ -67,13 +67,13 @@ function VLLamwh(add_VLLamwh)
else
{
jQuery('#jform_acronym').closest('.control-group').hide();
if (!jform_VLLamwheAX_required)
if (!jform_SJxiaTCdRE_required)
{
updateFieldRequired('acronym',1);
jQuery('#jform_acronym').removeAttr('required');
jQuery('#jform_acronym').removeAttr('aria-required');
jQuery('#jform_acronym').removeClass('required');
jform_VLLamwheAX_required = true;
jform_SJxiaTCdRE_required = true;
}
jQuery('#jform_website').closest('.control-group').hide();
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.php
@ -152,6 +152,12 @@ class DemoModelHelp_document extends JModelAdmin
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// If this is a new item insure the greated by is set.
if (0 == $id)
{
// Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
if (!$user->authorise('core.edit.created_by', 'com_demo'))
{
@ -170,6 +176,19 @@ class DemoModelHelp_document extends JModelAdmin
// Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// Only load these values if no id is found
if (0 == $id)
{
// Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
return $form;
}
@ -281,7 +300,7 @@ class DemoModelHelp_document extends JModelAdmin
{
$table->created = $date->toSql();
// set the user
if ($table->created_by == 0)
if ($table->created_by == 0 || empty($table->created_by))
{
$table->created_by = $user->id;
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage help_documents.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage look.php
@ -146,6 +146,12 @@ class DemoModelLook extends JModelAdmin
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// If this is a new item insure the greated by is set.
if (0 == $id)
{
// Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('look.edit.created_by', 'com_demo.look.' . (int) $id))
|| ($id == 0 && !$user->authorise('look.edit.created_by', 'com_demo')))
@ -217,6 +223,19 @@ class DemoModelLook extends JModelAdmin
$form->setFieldAttribute('male', 'required', 'false');
}
}
// Only load these values if no id is found
if (0 == $id)
{
// Set redirected field name
$redirectedField = $jinput->get('ref', null, 'STRING');
// Set redirected field value
$redirectedValue = $jinput->get('refid', 0, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
return $form;
}
@ -328,7 +347,7 @@ class DemoModelLook extends JModelAdmin
{
$table->created = $date->toSql();
// set the user
if ($table->created_by == 0)
if ($table->created_by == 0 || empty($table->created_by))
{
$table->created_by = $user->id;
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php
@ -21,22 +21,22 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<div id="j-main-container" class="span9">
<?php echo JHtml::_('bootstrap.startAccordion', 'dashboard_left', array('active' => 'main')); ?>
JHtml::_('behavior.tooltip');
<?php echo JHtml::_('bootstrap.addSlide', 'dashboard_left', 'cPanel', 'main'); ?>
<?php echo $this->loadTemplate('main');?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php echo JHtml::_('bootstrap.endAccordion'); ?>
</div>
<div id="j-main-container" class="span3">
<?php echo JHtml::_('bootstrap.startAccordion', 'dashboard_right', array('active' => 'vdm')); ?>
<?php echo JHtml::_('bootstrap.addSlide', 'dashboard_right', 'Vast Development Method', 'vdm'); ?>
<?php echo $this->loadTemplate('vdm');?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php echo JHtml::_('bootstrap.endAccordion'); ?>
?>
<div id="j-main-container">
<div class="span9">
<?php echo JHtml::_('bootstrap.startAccordion', 'dashboard_left', array('active' => 'main')); ?>
<?php echo JHtml::_('bootstrap.addSlide', 'dashboard_left', 'cPanel', 'main'); ?>
<?php echo $this->loadTemplate('main');?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php echo JHtml::_('bootstrap.endAccordion'); ?>
</div>
<div class="span3">
<?php echo JHtml::_('bootstrap.startAccordion', 'dashboard_right', array('active' => 'vdm')); ?>
<?php echo JHtml::_('bootstrap.addSlide', 'dashboard_right', 'Vast Development Method', 'vdm'); ?>
<?php echo $this->loadTemplate('vdm');?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php echo JHtml::_('bootstrap.endAccordion'); ?>
</div>
</div>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_main.php
@ -26,7 +26,7 @@ defined('_JEXEC') or die('Restricted access');
<?php foreach($this->icons['main'] as $icon): ?>
<div class="dashboard-wraper">
<div class="dashboard-content">
<a class="icon hasTip" href="<?php echo $icon->url; ?>">
<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>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_vdm.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage edit.php
@ -51,6 +51,7 @@ $componentParams = JComponentHelper::getParams('com_demo');
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if ($this->canDo->get('help_document.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('help_document.edit.state') || $this->canDo->get('core.edit.created')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'help_documentTab', 'publishing', JText::_('COM_DEMO_HELP_DOCUMENT_PUBLISHING', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
@ -61,6 +62,7 @@ $componentParams = JComponentHelper::getParams('com_demo');
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'help_documentTab', 'permissions', JText::_('COM_DEMO_HELP_DOCUMENT_PERMISSION', true)); ?>
@ -95,93 +97,93 @@ $componentParams = JComponentHelper::getParams('com_demo');
<script type="text/javascript">
// #jform_location listeners for location_doyJedc function
// #jform_location listeners for location_uyLnUzq function
jQuery('#jform_location').on('keyup',function()
{
var location_doyJedc = jQuery("#jform_location input[type='radio']:checked").val();
doyJedc(location_doyJedc);
var location_uyLnUzq = jQuery("#jform_location input[type='radio']:checked").val();
uyLnUzq(location_uyLnUzq);
});
jQuery('#adminForm').on('change', '#jform_location',function (e)
{
e.preventDefault();
var location_doyJedc = jQuery("#jform_location input[type='radio']:checked").val();
doyJedc(location_doyJedc);
var location_uyLnUzq = jQuery("#jform_location input[type='radio']:checked").val();
uyLnUzq(location_uyLnUzq);
});
// #jform_location listeners for location_smDxuix function
// #jform_location listeners for location_ywPZpnl function
jQuery('#jform_location').on('keyup',function()
{
var location_smDxuix = jQuery("#jform_location input[type='radio']:checked").val();
smDxuix(location_smDxuix);
var location_ywPZpnl = jQuery("#jform_location input[type='radio']:checked").val();
ywPZpnl(location_ywPZpnl);
});
jQuery('#adminForm').on('change', '#jform_location',function (e)
{
e.preventDefault();
var location_smDxuix = jQuery("#jform_location input[type='radio']:checked").val();
smDxuix(location_smDxuix);
var location_ywPZpnl = jQuery("#jform_location input[type='radio']:checked").val();
ywPZpnl(location_ywPZpnl);
});
// #jform_type listeners for type_UwWDUib function
// #jform_type listeners for type_KBdlcVR function
jQuery('#jform_type').on('keyup',function()
{
var type_UwWDUib = jQuery("#jform_type").val();
UwWDUib(type_UwWDUib);
var type_KBdlcVR = jQuery("#jform_type").val();
KBdlcVR(type_KBdlcVR);
});
jQuery('#adminForm').on('change', '#jform_type',function (e)
{
e.preventDefault();
var type_UwWDUib = jQuery("#jform_type").val();
UwWDUib(type_UwWDUib);
var type_KBdlcVR = jQuery("#jform_type").val();
KBdlcVR(type_KBdlcVR);
});
// #jform_type listeners for type_OhjWnCS function
// #jform_type listeners for type_dweMHUw function
jQuery('#jform_type').on('keyup',function()
{
var type_OhjWnCS = jQuery("#jform_type").val();
OhjWnCS(type_OhjWnCS);
var type_dweMHUw = jQuery("#jform_type").val();
dweMHUw(type_dweMHUw);
});
jQuery('#adminForm').on('change', '#jform_type',function (e)
{
e.preventDefault();
var type_OhjWnCS = jQuery("#jform_type").val();
OhjWnCS(type_OhjWnCS);
var type_dweMHUw = jQuery("#jform_type").val();
dweMHUw(type_dweMHUw);
});
// #jform_type listeners for type_TfDWyOu function
// #jform_type listeners for type_pnuDTOl function
jQuery('#jform_type').on('keyup',function()
{
var type_TfDWyOu = jQuery("#jform_type").val();
TfDWyOu(type_TfDWyOu);
var type_pnuDTOl = jQuery("#jform_type").val();
pnuDTOl(type_pnuDTOl);
});
jQuery('#adminForm').on('change', '#jform_type',function (e)
{
e.preventDefault();
var type_TfDWyOu = jQuery("#jform_type").val();
TfDWyOu(type_TfDWyOu);
var type_pnuDTOl = jQuery("#jform_type").val();
pnuDTOl(type_pnuDTOl);
});
// #jform_target listeners for target_vceyFYE function
// #jform_target listeners for target_dObkcfd function
jQuery('#jform_target').on('keyup',function()
{
var target_vceyFYE = jQuery("#jform_target input[type='radio']:checked").val();
vceyFYE(target_vceyFYE);
var target_dObkcfd = jQuery("#jform_target input[type='radio']:checked").val();
dObkcfd(target_dObkcfd);
});
jQuery('#adminForm').on('change', '#jform_target',function (e)
{
e.preventDefault();
var target_vceyFYE = jQuery("#jform_target input[type='radio']:checked").val();
vceyFYE(target_vceyFYE);
var target_dObkcfd = jQuery("#jform_target input[type='radio']:checked").val();
dObkcfd(target_dObkcfd);
});

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage edit.php
@ -57,6 +57,7 @@ $componentParams = JComponentHelper::getParams('com_demo');
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if ($this->canDo->get('look.delete') || $this->canDo->get('look.edit.created_by') || $this->canDo->get('look.edit.state') || $this->canDo->get('look.edit.created')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'lookTab', 'publishing', JText::_('COM_DEMO_LOOK_PUBLISHING', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
@ -67,6 +68,7 @@ $componentParams = JComponentHelper::getParams('com_demo');
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'lookTab', 'permissions', JText::_('COM_DEMO_LOOK_PERMISSION', true)); ?>
@ -101,33 +103,33 @@ $componentParams = JComponentHelper::getParams('com_demo');
<script type="text/javascript">
// #jform_name listeners for name_AqrIpkD function
// #jform_name listeners for name_mgQJHOz function
jQuery('#jform_name').on('keyup',function()
{
var name_AqrIpkD = jQuery("#jform_name").val();
AqrIpkD(name_AqrIpkD);
var name_mgQJHOz = jQuery("#jform_name").val();
mgQJHOz(name_mgQJHOz);
});
jQuery('#adminForm').on('change', '#jform_name',function (e)
{
e.preventDefault();
var name_AqrIpkD = jQuery("#jform_name").val();
AqrIpkD(name_AqrIpkD);
var name_mgQJHOz = jQuery("#jform_name").val();
mgQJHOz(name_mgQJHOz);
});
// #jform_add listeners for add_VLLamwh function
// #jform_add listeners for add_SJxiaTC function
jQuery('#jform_add').on('keyup',function()
{
var add_VLLamwh = jQuery("#jform_add input[type='radio']:checked").val();
VLLamwh(add_VLLamwh);
var add_SJxiaTC = jQuery("#jform_add input[type='radio']:checked").val();
SJxiaTC(add_SJxiaTC);
});
jQuery('#adminForm').on('change', '#jform_add',function (e)
{
e.preventDefault();
var add_VLLamwh = jQuery("#jform_add input[type='radio']:checked").val();
VLLamwh(add_VLLamwh);
var add_SJxiaTC = jQuery("#jform_add input[type='radio']:checked").val();
SJxiaTC(add_SJxiaTC);
});

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 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>6th January, 2016</creationDate>
<creationDate>20th February, 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 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage script.php
@ -296,7 +296,6 @@ class com_demoInstallerScript
{
// Get The Database object
$db = JFactory::getDbo();
// Create the look content type object.
@ -308,8 +307,8 @@ class com_demoInstallerScript
$look->router = 'DemoHelperRoute::getLookRoute';
$look->content_history_options = '{"formFile": "administrator/components/com_demo/models/forms/look.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
// Insert the object into the content types table.
$lookInserted = $db->insertObject('#__content_types', $look);
// Set the object into the content types table.
$look_Inserted = $db->insertObject('#__content_types', $look);
// Create the help_document content type object.
$help_document = new stdClass();
@ -320,8 +319,8 @@ class com_demoInstallerScript
$help_document->router = 'DemoHelperRoute::getHelp_documentRoute';
$help_document->content_history_options = '{"formFile": "administrator/components/com_demo/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","target","article","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}';
// Insert the object into the content types table.
$help_documentInserted = $db->insertObject('#__content_types', $help_document);
// Set the object into the content types table.
$help_document_Inserted = $db->insertObject('#__content_types', $help_document);
// Install the global extenstion params.
@ -334,19 +333,82 @@ class com_demoInstallerScript
// Condition.
$conditions = array(
$db->quoteName('element') . ' = ' . $db->quote('com_demo')
$db->quoteName('element') . ' = ' . $db->quote('com_')
);
$query->update($db->quoteName('#__extensions'))->set($fields)->where($conditions);
$db->setQuery($query);
$allDone = $db->execute();
echo '<a target="_blank" href="https://www.vdm.io/" title="Demo">
<img src="components/com_demo/assets/images/component-300.jpg"/>
<img src="components/com_/assets/images/component-300.jpg"/>
</a>';
}
// do any updates needed
if ($type == 'update')
{
// Get The Database object
$db = JFactory::getDbo();
// Create the look content type object.
$look = new stdClass();
$look->type_title = 'Demo Look';
$look->type_alias = 'com_demo.look';
$look->table = '{"special": {"dbtable": "#__demo_look","key": "id","type": "Look","prefix": "demoTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$look->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","add":"add","acronym":"acronym","website":"website","alias":"alias","not_required":"not_required"}}';
$look->router = 'DemoHelperRoute::getLookRoute';
$look->content_history_options = '{"formFile": "administrator/components/com_demo/models/forms/look.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
// Check if look type is already in content_type DB.
$look_id = null;
$query = $db->getQuery(true);
$query->select($db->quoteName(array('type_id')));
$query->from($db->quoteName('#__content_types'));
$query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($look->type_alias));
$db->setQuery($query);
$db->execute();
// Set the object into the content types table.
if ($db->getNumRows())
{
$look->type_id = $db->loadResult();
$look_Updated = $db->updateObject('#__content_types', $look, 'type_id');
}
else
{
$look_Inserted = $db->insertObject('#__content_types', $look);
}
// Create the help_document content type object.
$help_document = new stdClass();
$help_document->type_title = 'Demo Help_document';
$help_document->type_alias = 'com_demo.help_document';
$help_document->table = '{"special": {"dbtable": "#__demo_help_document","key": "id","type": "Help_document","prefix": "demoTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$help_document->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "title","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "content","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"title":"title","type":"type","groups":"groups","location":"location","admin_view":"admin_view","site_view":"site_view","target":"target","content":"content","alias":"alias","article":"article","url":"url","not_required":"not_required"}}';
$help_document->router = 'DemoHelperRoute::getHelp_documentRoute';
$help_document->content_history_options = '{"formFile": "administrator/components/com_demo/models/forms/help_document.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","type","location","target","article","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "article","targetTable": "#__content","targetColumn": "id","displayColumn": "title"}]}';
// Check if help_document type is already in content_type DB.
$help_document_id = null;
$query = $db->getQuery(true);
$query->select($db->quoteName(array('type_id')));
$query->from($db->quoteName('#__content_types'));
$query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($help_document->type_alias));
$db->setQuery($query);
$db->execute();
// Set the object into the content types table.
if ($db->getNumRows())
{
$help_document->type_id = $db->loadResult();
$help_document_Updated = $db->updateObject('#__content_types', $help_document, 'type_id');
}
else
{
$help_document_Inserted = $db->insertObject('#__content_types', $help_document);
}
echo '<a target="_blank" href="https://www.vdm.io/" title="Demo">
<img src="components/com_demo/assets/images/component-300.jpg"/>
</a>

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage site.css

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage help.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php
@ -419,7 +419,7 @@ abstract class DemoHelper
foreach ($actions as $action)
{
// set to use component default
$allow = true;
$fallback = true;
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions))
{
// The record has been set. Check the record permissions.
@ -435,13 +435,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback = false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback = false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_demo.'.$view.'.' . (int) $record->id))
@ -451,13 +451,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback = false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback = false;
}
}
elseif ($user->authorise('core.edit.own', 'com_demo'))
@ -467,13 +467,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback = false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback = false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_demo'))
@ -483,13 +483,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback = false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback = false;
}
}
}
@ -519,13 +519,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback = false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback = false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_demo.'.$views.'.category.' . (int) $record->catid))
@ -535,13 +535,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback = false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback = false;
}
}
elseif ($user->authorise('core.edit.own', 'com_demo'))
@ -551,13 +551,13 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback = false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback = false;
}
}
elseif ($user->authorise($view.'edit.own', 'com_demo'))
@ -567,21 +567,21 @@ abstract class DemoHelper
{
$result->set($action->name, true);
// set not to use component default
$allow = false;
$fallback = false;
}
else
{
$result->set($action->name, false);
// set not to use component default
$allow = false;
$fallback = false;
}
}
}
}
}
}
// if allowed then fall back on component global settings
if ($allow)
// if allowed then fallback on component global settings
if ($fallback)
{
$result->set($action->name, $user->authorise($action->name, 'com_demo'));
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage route.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 6th January, 2016
@build 20th February, 2016
@created 5th August, 2015
@package Demo
@subpackage router.php