From 9ab56e6636dc0a01d9b7efb03b298cd8decf2d85 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 20 Feb 2016 22:19:24 +0200 Subject: [PATCH] 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) --- README.md | 20 +-- admin/assets/css/admin.css | 2 +- admin/assets/css/dashboard.css | 2 +- admin/assets/css/help_document.css | 2 +- admin/assets/css/help_documents.css | 2 +- admin/assets/css/look.css | 2 +- admin/assets/css/looks.css | 2 +- admin/controller.php | 2 +- admin/controllers/demo.php | 2 +- admin/controllers/help.php | 2 +- admin/controllers/help_document.php | 4 +- admin/controllers/help_documents.php | 2 +- admin/controllers/import.php | 2 +- admin/controllers/look.php | 4 +- admin/controllers/looks.php | 2 +- admin/demo.php | 2 +- admin/helpers/demo.php | 40 ++--- admin/helpers/html/batch_.php | 2 +- admin/layouts/batchselection.php | 2 +- admin/layouts/help_document/details_above.php | 2 +- .../help_document/details_fullwidth.php | 2 +- admin/layouts/help_document/details_left.php | 2 +- admin/layouts/help_document/details_right.php | 2 +- admin/layouts/help_document/details_under.php | 2 +- admin/layouts/help_document/metadata.php | 2 +- admin/layouts/help_document/publishing.php | 2 +- admin/layouts/look/details_above.php | 2 +- admin/layouts/look/details_left.php | 2 +- admin/layouts/look/details_right.php | 2 +- admin/layouts/look/details_under.php | 2 +- admin/layouts/look/metadata.php | 2 +- admin/layouts/look/publishing.php | 2 +- admin/layouts/look/repetable_numbers_left.php | 2 +- .../layouts/look/repetable_numbers_right.php | 2 +- admin/models/demo.php | 2 +- admin/models/fields/articles.php | 2 +- admin/models/forms/help_document.js | 156 +++++++++--------- admin/models/forms/look.js | 32 ++-- admin/models/help_document.php | 23 ++- admin/models/help_documents.php | 2 +- admin/models/import.php | 2 +- admin/models/look.php | 23 ++- admin/models/looks.php | 2 +- admin/tables/help_document.php | 2 +- admin/tables/look.php | 2 +- admin/views/demo/tmpl/default.php | 36 ++-- admin/views/demo/tmpl/default_main.php | 4 +- admin/views/demo/tmpl/default_vdm.php | 2 +- admin/views/demo/view.html.php | 2 +- admin/views/help_document/submitbutton.js | 2 +- admin/views/help_document/tmpl/edit.php | 64 +++---- admin/views/help_document/view.html.php | 2 +- admin/views/help_documents/tmpl/default.php | 2 +- .../tmpl/default_batch_body.php | 2 +- .../tmpl/default_batch_footer.php | 2 +- .../help_documents/tmpl/default_body.php | 2 +- .../help_documents/tmpl/default_foot.php | 2 +- .../help_documents/tmpl/default_head.php | 2 +- .../help_documents/tmpl/default_toolbar.php | 2 +- admin/views/help_documents/view.html.php | 2 +- admin/views/import/tmpl/default.php | 2 +- admin/views/import/view.html.php | 2 +- admin/views/look/submitbutton.js | 2 +- admin/views/look/tmpl/edit.php | 24 +-- admin/views/look/view.html.php | 2 +- admin/views/looks/tmpl/default.php | 2 +- admin/views/looks/tmpl/default_batch_body.php | 2 +- .../views/looks/tmpl/default_batch_footer.php | 2 +- admin/views/looks/tmpl/default_body.php | 2 +- admin/views/looks/tmpl/default_foot.php | 2 +- admin/views/looks/tmpl/default_head.php | 2 +- admin/views/looks/tmpl/default_toolbar.php | 2 +- admin/views/looks/view.html.php | 2 +- demo.xml | 2 +- script.php | 78 ++++++++- site/assets/css/site.css | 2 +- site/controller.php | 2 +- site/controllers/help.php | 2 +- site/demo.php | 2 +- site/helpers/demo.php | 40 ++--- site/helpers/headercheck.php | 2 +- site/helpers/route.php | 2 +- site/router.php | 2 +- 83 files changed, 395 insertions(+), 291 deletions(-) diff --git a/README.md b/README.md index af74c66..9132852 100644 --- a/README.md +++ b/README.md @@ -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) \ No newline at end of file diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index 91d8b37..423b1a8 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -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 diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 3a05cd5..68b7c8b 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -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 diff --git a/admin/assets/css/help_document.css b/admin/assets/css/help_document.css index c9cb96a..3b971b1 100644 --- a/admin/assets/css/help_document.css +++ b/admin/assets/css/help_document.css @@ -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 diff --git a/admin/assets/css/help_documents.css b/admin/assets/css/help_documents.css index c51c128..14f2093 100644 --- a/admin/assets/css/help_documents.css +++ b/admin/assets/css/help_documents.css @@ -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 diff --git a/admin/assets/css/look.css b/admin/assets/css/look.css index 6122cd7..1bc1a65 100644 --- a/admin/assets/css/look.css +++ b/admin/assets/css/look.css @@ -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 diff --git a/admin/assets/css/looks.css b/admin/assets/css/looks.css index 59ffd43..3422435 100644 --- a/admin/assets/css/looks.css +++ b/admin/assets/css/looks.css @@ -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 diff --git a/admin/controller.php b/admin/controller.php index fac6980..1767676 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -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 diff --git a/admin/controllers/demo.php b/admin/controllers/demo.php index 8447c13..570f17c 100644 --- a/admin/controllers/demo.php +++ b/admin/controllers/demo.php @@ -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 diff --git a/admin/controllers/help.php b/admin/controllers/help.php index 1e9b870..afddf20 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -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 diff --git a/admin/controllers/help_document.php b/admin/controllers/help_document.php index cb7a31d..dc0622f 100644 --- a/admin/controllers/help_document.php +++ b/admin/controllers/help_document.php @@ -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; } diff --git a/admin/controllers/help_documents.php b/admin/controllers/help_documents.php index cc25428..dd57c5d 100644 --- a/admin/controllers/help_documents.php +++ b/admin/controllers/help_documents.php @@ -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 diff --git a/admin/controllers/import.php b/admin/controllers/import.php index f2e479e..0626078 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -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 diff --git a/admin/controllers/look.php b/admin/controllers/look.php index 4e4641e..fd18513 100644 --- a/admin/controllers/look.php +++ b/admin/controllers/look.php @@ -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; } diff --git a/admin/controllers/looks.php b/admin/controllers/looks.php index 8e0f506..5d2d13a 100644 --- a/admin/controllers/looks.php +++ b/admin/controllers/looks.php @@ -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 diff --git a/admin/demo.php b/admin/demo.php index aa6d8f5..862f6a0 100644 --- a/admin/demo.php +++ b/admin/demo.php @@ -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 diff --git a/admin/helpers/demo.php b/admin/helpers/demo.php index f968452..32142d8 100644 --- a/admin/helpers/demo.php +++ b/admin/helpers/demo.php @@ -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')); } diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index 9eed302..2946754 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -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 diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index ff6d137..776e8f0 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -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 diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index d1cc381..ea0aeda 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -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 diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index c11caee..b39687c 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -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 diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index 901ebc2..1445b23 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -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 diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index d3c7d49..495f879 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -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 diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index b3d7fcb..d1201dd 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -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 diff --git a/admin/layouts/help_document/metadata.php b/admin/layouts/help_document/metadata.php index f251339..817515b 100644 --- a/admin/layouts/help_document/metadata.php +++ b/admin/layouts/help_document/metadata.php @@ -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 diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index 5b55fc3..c19e7fb 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -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 diff --git a/admin/layouts/look/details_above.php b/admin/layouts/look/details_above.php index 99e64f8..8b36086 100644 --- a/admin/layouts/look/details_above.php +++ b/admin/layouts/look/details_above.php @@ -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 diff --git a/admin/layouts/look/details_left.php b/admin/layouts/look/details_left.php index 566092a..266e104 100644 --- a/admin/layouts/look/details_left.php +++ b/admin/layouts/look/details_left.php @@ -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 diff --git a/admin/layouts/look/details_right.php b/admin/layouts/look/details_right.php index 132a69f..213fc3f 100644 --- a/admin/layouts/look/details_right.php +++ b/admin/layouts/look/details_right.php @@ -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 diff --git a/admin/layouts/look/details_under.php b/admin/layouts/look/details_under.php index b3d7fcb..d1201dd 100644 --- a/admin/layouts/look/details_under.php +++ b/admin/layouts/look/details_under.php @@ -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 diff --git a/admin/layouts/look/metadata.php b/admin/layouts/look/metadata.php index f251339..817515b 100644 --- a/admin/layouts/look/metadata.php +++ b/admin/layouts/look/metadata.php @@ -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 diff --git a/admin/layouts/look/publishing.php b/admin/layouts/look/publishing.php index 5b55fc3..c19e7fb 100644 --- a/admin/layouts/look/publishing.php +++ b/admin/layouts/look/publishing.php @@ -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 diff --git a/admin/layouts/look/repetable_numbers_left.php b/admin/layouts/look/repetable_numbers_left.php index fddcb6e..cc3cd9d 100644 --- a/admin/layouts/look/repetable_numbers_left.php +++ b/admin/layouts/look/repetable_numbers_left.php @@ -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 diff --git a/admin/layouts/look/repetable_numbers_right.php b/admin/layouts/look/repetable_numbers_right.php index fb2223a..9a7da35 100644 --- a/admin/layouts/look/repetable_numbers_right.php +++ b/admin/layouts/look/repetable_numbers_right.php @@ -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 diff --git a/admin/models/demo.php b/admin/models/demo.php index 410081a..74c8c2f 100644 --- a/admin/models/demo.php +++ b/admin/models/demo.php @@ -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 diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index 6885a75..8c2d636 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -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 diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 9f20f77..29e3fa2 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -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; } } } diff --git a/admin/models/forms/look.js b/admin/models/forms/look.js index eb60a7f..567bdf0 100644 --- a/admin/models/forms/look.js +++ b/admin/models/forms/look.js @@ -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(); } diff --git a/admin/models/help_document.php b/admin/models/help_document.php index 8dadbab..05601ac 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -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; } diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index 541012e..ad617cd 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -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 diff --git a/admin/models/import.php b/admin/models/import.php index 85d9471..bd36c2f 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -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 diff --git a/admin/models/look.php b/admin/models/look.php index c77da84..0ae5b43 100644 --- a/admin/models/look.php +++ b/admin/models/look.php @@ -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; } diff --git a/admin/models/looks.php b/admin/models/looks.php index 340a100..07f3dd6 100644 --- a/admin/models/looks.php +++ b/admin/models/looks.php @@ -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 diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php index 1a27514..ba678ab 100644 --- a/admin/tables/help_document.php +++ b/admin/tables/help_document.php @@ -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 diff --git a/admin/tables/look.php b/admin/tables/look.php index 5348c24..e07a9a4 100644 --- a/admin/tables/look.php +++ b/admin/tables/look.php @@ -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 diff --git a/admin/views/demo/tmpl/default.php b/admin/views/demo/tmpl/default.php index 524317d..826b38a 100644 --- a/admin/views/demo/tmpl/default.php +++ b/admin/views/demo/tmpl/default.php @@ -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'); -?> -
- 'main')); ?> +JHtml::_('behavior.tooltip'); - -loadTemplate('main');?> - - - -
-
- 'vdm')); ?> - - -loadTemplate('vdm');?> - - - +?> +
+
+ 'main')); ?> + + loadTemplate('main');?> + + +
+
+ 'vdm')); ?> + + loadTemplate('vdm');?> + + +
\ No newline at end of file diff --git a/admin/views/demo/tmpl/default_main.php b/admin/views/demo/tmpl/default_main.php index 42adfe1..b04b519 100644 --- a/admin/views/demo/tmpl/default_main.php +++ b/admin/views/demo/tmpl/default_main.php @@ -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'); icons['main'] as $icon): ?>
- + <?php echo $icon->alt; ?> name); ?> diff --git a/admin/views/demo/tmpl/default_vdm.php b/admin/views/demo/tmpl/default_vdm.php index 9118c17..79cb56a 100644 --- a/admin/views/demo/tmpl/default_vdm.php +++ b/admin/views/demo/tmpl/default_vdm.php @@ -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 diff --git a/admin/views/demo/view.html.php b/admin/views/demo/view.html.php index f4da430..2d48cfb 100644 --- a/admin/views/demo/view.html.php +++ b/admin/views/demo/view.html.php @@ -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 diff --git a/admin/views/help_document/submitbutton.js b/admin/views/help_document/submitbutton.js index 502c98e..223a2b8 100644 --- a/admin/views/help_document/submitbutton.js +++ b/admin/views/help_document/submitbutton.js @@ -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 diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php index 5864b26..22daeda 100644 --- a/admin/views/help_document/tmpl/edit.php +++ b/admin/views/help_document/tmpl/edit.php @@ -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');
+ 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')) : ?>
@@ -61,6 +62,7 @@ $componentParams = JComponentHelper::getParams('com_demo');
+ canDo->get('core.admin')) : ?> @@ -95,93 +97,93 @@ $componentParams = JComponentHelper::getParams('com_demo');