Added editing feature to custom list fields and improved the buttons to great and edit the list values.

This commit is contained in:
Llewellyn van der Merwe 2016-05-07 00:41:41 +01:00
parent 32e3f6b86e
commit e21980bbea
366 changed files with 1428 additions and 659 deletions

View File

@ -32,38 +32,38 @@ Would you require more help VDM.io has a number of support plans available [visi
+ *Author*: [Llewellyn van der Merwe] (mailto:info@vdm.io)
+ *Name*: [Component Builder] (https://www.vdm.io/joomla-component-builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 4th May, 2016
+ *Last Build*: 6th May, 2016
+ *Version*: 2.1.7
+ *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
**228 Hours** or **29 Eight Hour Days** (actual time the author saved -
**230 Hours** or **29 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*: **81816**
+ *Line count*: **82522**
+ *File count*: **500**
+ *Folder count*: **98**
**151 Hours** or **18 Eight Hour Days** (the actual time the author spent)
**152 Hours** or **19 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @57hours** = codingtime / 4;
> **debugging @58hours** = codingtime / 4;
> **planning @33hours** = codingtime / 7;
> **mapping @23hours** = codingtime / 10;
> **office @38hours** = codingtime / 6;)
**379 Hours** or **47 Eight Hour Days**
**382 Hours** or **48 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: **9.4 weeks** or **2 months**
Project duration: **9.6 weeks** or **2 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

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage component.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage components.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_view.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_views.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dashboard.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_get.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_gets.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage field.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtype.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtypes.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_document.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_documents.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layout.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layouts.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_view.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_views.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippet.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippets.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage template.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage templates.css

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage controller.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage ajax.json.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage compiler.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage component.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage components.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_view.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_views.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_get.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_gets.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage field.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtype.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtypes.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_document.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_documents.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layout.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layouts.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_view.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_views.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippet.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippets.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage template.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage templates.php

View File

@ -1709,7 +1709,7 @@ class Fields extends Structure
// ###type### <<<DYNAMIC>>>
$this->fileContentDynamic['customfield_'.$data['type']]['###type###'] = $data['custom']['type'];
// ###type### <<<DYNAMIC>>>
$this->fileContentDynamic['customfield_'.$data['type']]['###ADD_BUTTON###'] = $this->setAddButttonToListField($data['custom']['view']);
$this->fileContentDynamic['customfield_'.$data['type']]['###ADD_BUTTON###'] = $this->setAddButttonToListField($data['custom']['view'],$data['custom']['views']);
}
}

View File

@ -4753,6 +4753,8 @@ class Interpretation extends Fields
$this->langContent['admin'][$this->langPrefix.'_SAVE_WARNING'] = "The value already existed so please select another.";
$this->langContent['admin'][$this->langPrefix.'_HELP_MANAGER'] = "Help";
$this->langContent['admin'][$this->langPrefix.'_NEW'] = "New";
$this->langContent['admin'][$this->langPrefix.'_CREATE_NEW_S'] = "Create New %s";
$this->langContent['admin'][$this->langPrefix.'_EDIT_S'] = "Edit %s";
$this->langContent['admin'][$this->langPrefix.'_KEEP_ORIGINAL_STATE'] = "- Keep Original State -";
$this->langContent['admin'][$this->langPrefix.'_KEEP_ORIGINAL_ACCESS'] = "- Keep Original Access -";
$this->langContent['admin'][$this->langPrefix.'_KEEP_ORIGINAL_CATEGORY'] = "- Keep Original Category -";
@ -4845,6 +4847,9 @@ class Interpretation extends Fields
$this->langContent['site']['COM_CONTENT_FIELD_MODIFIED_DESC'] = "The last date this item was modified.";
$this->langContent['site']['JGLOBAL_FIELD_MODIFIED_BY_LABEL'] = "Modified By";
$this->langContent['site']['JGLOBAL_FIELD_MODIFIED_BY_DESC'] = "The user who did the last modification.";
$this->langContent['site'][$this->langPrefix.'_NEW'] = "New";
$this->langContent['site'][$this->langPrefix.'_CREATE_NEW_S'] = "Create New %s";
$this->langContent['site'][$this->langPrefix.'_EDIT_S'] = "Edit %s";
// check if the both array is set
if (isset($this->langContent['both']) && ComponentbuilderHelper::checkArray($this->langContent['both']))
@ -7112,7 +7117,7 @@ class Interpretation extends Fields
}
}
public function setAddButttonToListField($targetView)
public function setAddButttonToListField($targetView,$targetViews)
{
$addButton = array();
$addButton[] = "\n\t/**";
@ -7131,6 +7136,25 @@ class Interpretation extends Fields
$addButton[] = "\t\t//".$this->setLine(__LINE__)." if true set button";
$addButton[] = "\t\tif (\$setButton === 'true')";
$addButton[] = "\t\t{";
$addButton[] = "\t\t\t\$button = array();";
$addButton[] = "\t\t\t\$script = array();";
$addButton[] = "\t\t\t\$buttonName = \$this->getAttribute('name');";
$addButton[] = "\t\t\t//".$this->setLine(__LINE__)." get the input from url";
$addButton[] = "\t\t\t\$jinput = JFactory::getApplication()->input;";
$addButton[] = "\t\t\t//".$this->setLine(__LINE__)." get the view name & id";
$addButton[] = "\t\t\t\$values = \$jinput->getArray(array(";
$addButton[] = "\t\t\t\t'id' => 'int',";
$addButton[] = "\t\t\t\t'view' => 'word'";
$addButton[] = "\t\t\t));";
$addButton[] = "\t\t\t//".$this->setLine(__LINE__)." check if new item";
$addButton[] = "\t\t\t\$ref = '';";
$addButton[] = "\t\t\t\$refJ = '';";
$addButton[] = "\t\t\tif (!is_null(\$values['id']) && strlen(\$values['view']))";
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." only load referal if not new item.";
$addButton[] = "\t\t\t\t\$ref = '&amp;ref=' . \$values['view'] . '&amp;refid=' . \$values['id'];";
$addButton[] = "\t\t\t\t\$refJ = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t\t\$user = JFactory::getUser();";
$addButton[] = "\t\t\t//".$this->setLine(__LINE__)." only add if user allowed to create " . $targetView;
// get core permissions
@ -7150,26 +7174,65 @@ class Interpretation extends Fields
$addButton[] = "\t\t\tif (\$user->authorise('core.create', 'com_".$this->fileContentStatic['###component###']."'))";
}
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." get the input from url";
$addButton[] = "\t\t\t\t\$jinput = JFactory::getApplication()->input;";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." get the view name & id";
$addButton[] = "\t\t\t\t\$values = \$jinput->getArray(array(";
$addButton[] = "\t\t\t\t\t'id' => 'int',";
$addButton[] = "\t\t\t\t\t'view' => 'word'";
$addButton[] = "\t\t\t\t));";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." check if new item";
$addButton[] = "\t\t\t\t\$ref = '';";
$addButton[] = "\t\t\t\tif (!is_null(\$values['id']) && strlen(\$values['view']))";
$addButton[] = "\t\t\t\t{";
$addButton[] = "\t\t\t\t\t//".$this->setLine(__LINE__)." only load referal if not new item.";
$addButton[] = "\t\t\t\t\t\$ref = '&amp;ref=' . \$values['view'] . '&amp;refid=' . \$values['id'];";
$addButton[] = "\t\t\t\t}";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." build the button";
$addButton[] = "\t\t\t\t\$button = '<a class=\"btn btn-small btn-success\"";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." build Create button";
$addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText::sprintf('".$this->langPrefix."_CREATE_NEW_S', ".$this->fileContentStatic['###Component###']."Helper::safeString(\$buttonName, 'W')).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
$addButton[] = "\t\t\t\t\thref=\"index.php?option=com_" . $this->fileContentStatic['###component###'] . "&amp;view=" . $targetView . "&amp;layout=edit'.\$ref.'\" >";
$addButton[] = "\t\t\t\t\t<span class=\"icon-new icon-white\"></span>' . JText::_('COM_".$this->fileContentStatic['###COMPONENT###']."_NEW') . '</a>';";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." return the button attached to input field";
$addButton[] = "\t\t\t\treturn \$html . \$button;";
$addButton[] = "\t\t\t\t\t<span class=\"icon-new icon-white\"></span></a>';";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t\t//".$this->setLine(__LINE__)." only add if user allowed to edit " . $targetView;
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($targetView,$this->permissionBuilder['global'][$core['core.edit']]))
{
$addButton[] = "\t\t\tif ((\$buttonName == '".$targetView."' || \$buttonName == '".$targetViews."') && \$user->authorise('".$core['core.edit']."', 'com_".$this->fileContentStatic['###component###']."'))";
}
else
{
$addButton[] = "\t\t\tif ((\$buttonName == '".$targetView."' || \$buttonName == '".$targetViews."') && \$user->authorise('core.edit', 'com_".$this->fileContentStatic['###component###']."'))";
}
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." build edit button";
$addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText::sprintf('".$this->langPrefix."_EDIT_S', ".$this->fileContentStatic['###Component###']."Helper::safeString(\$buttonName, 'W')).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
$addButton[] = "\t\t\t\t\t<span class=\"icon-edit\"></span></a>';";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." build script";
$addButton[] = "\t\t\t\t\$script[] = \"";
$addButton[] = "\t\t\t\t\tjQuery(document).ready(function() {";
$addButton[] = "\t\t\t\t\t\tjQuery('#adminForm').on('change', '#jform_\".\$buttonName.\"',function (e) {";
$addButton[] = "\t\t\t\t\t\t\te.preventDefault();";
$addButton[] = "\t\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
$addButton[] = "\t\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
$addButton[] = "\t\t\t\t\t\t});";
$addButton[] = "\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
$addButton[] = "\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
$addButton[] = "\t\t\t\t\t});";
$addButton[] = "\t\t\t\t\tfunction \".\$buttonName.\"Button(value) {";
$addButton[] = "\t\t\t\t\t\tif (value > 0) {"; // TODO not ideal since value may not be an (int)
$addButton[] = "\t\t\t\t\t\t\t// hide the create button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').hide();";
$addButton[] = "\t\t\t\t\t\t\t// show edit button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').show();";
$addButton[] = "\t\t\t\t\t\t\tvar url = 'index.php?option=com_" . $this->fileContentStatic['###component###'] . "&view=".$targetViews."&task=" . $targetView . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').attr('href', url);";
$addButton[] = "\t\t\t\t\t\t} else {";
$addButton[] = "\t\t\t\t\t\t\t// show the create button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').show();";
$addButton[] = "\t\t\t\t\t\t\t// hide edit button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').hide();";
$addButton[] = "\t\t\t\t\t\t}";
$addButton[] = "\t\t\t\t\t}\";";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t\t//".$this->setLine(__LINE__)." check if button was created for " . $targetView ." field.";
$addButton[] = "\t\t\tif (".$this->fileContentStatic['###Component###']."Helper::checkArray(\$button))";
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." Add some final script";
$addButton[] = "\t\t\t\t\$script[] = \"";
$addButton[] = "\t\t\t\t\tjQuery(document).ready(function() {";
$addButton[] = "\t\t\t\t\t\tjQuery('#jform_\".\$buttonName.\"').closest('.control-group').addClass('input-append');";
$addButton[] = "\t\t\t\t\t});\";";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." Load the needed script.";
$addButton[] = "\t\t\t\t\$document = JFactory::getDocument();";
$addButton[] = "\t\t\t\t\$document->addScriptDeclaration(implode(' ',\$script));";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." return the button attached to input field.";
$addButton[] = "\t\t\t\treturn \$html . implode('',\$button);";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t}";
$addButton[] = "\t\treturn \$html;";

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage batch_.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage indenter.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage js.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage minify.php

View File

@ -1094,6 +1094,7 @@ COM_COMPONENTBUILDER_CONFIG_UIKIT_STYLE_LABEL="css Style"
COM_COMPONENTBUILDER_CONFIG_YES="Yes"
COM_COMPONENTBUILDER_CONTRIBUTOR="Contributor"
COM_COMPONENTBUILDER_CONTRIBUTORS="Contributors"
COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW="Custom Admin View"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS="Custom Admin Views"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_ACCESS="Custom Admin Views Access"
@ -1790,6 +1791,7 @@ COM_COMPONENTBUILDER_EDIT_CREATED_BY="Edit Created By"
COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC=" Allows users in this group to edit created by."
COM_COMPONENTBUILDER_EDIT_CREATED_DATE="Edit Created Date"
COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC=" Allows users in this group to edit created date."
COM_COMPONENTBUILDER_EDIT_S="Edit %s"
COM_COMPONENTBUILDER_EDIT_VERSIONS="Edit Version"
COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions."
COM_COMPONENTBUILDER_EXPORT_DATA="Export Data"
@ -2131,6 +2133,7 @@ COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN_VIEW_DESCRIPTION="Select the view being
COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN_VIEW_LABEL="Admin Views"
COM_COMPONENTBUILDER_HELP_DOCUMENT_ALIAS="Alias"
COM_COMPONENTBUILDER_HELP_DOCUMENT_ALIAS_HINT="Auto-generated from name"
COM_COMPONENTBUILDER_HELP_DOCUMENT_ALIAS_LABEL="Alias"
COM_COMPONENTBUILDER_HELP_DOCUMENT_ALL="All"
COM_COMPONENTBUILDER_HELP_DOCUMENT_ARTICLE="Article"
COM_COMPONENTBUILDER_HELP_DOCUMENT_ARTICLE_LABEL="Article"

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage css_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_import_fullwidth.php
@ -35,9 +35,9 @@ $fields = $displayData->get('fields') ?: array(
'note_advanced_import',
'add_custom_import',
'html_import_view',
'php_import',
'php_import_setdata',
'php_import_save',
'php_import'
'php_import_save'
);
?>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage javascript_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage mysql_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage mysql_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage php_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage publlshing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage batchselection.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_views_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage ftp_servers_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage publlshing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage readme_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage readme_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage scripts_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_views_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_buttons_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_buttons_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_script_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_rightside.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.7
@build 4th May, 2016
@build 6th May, 2016
@created 30th April, 2015
@package Component Builder
@subpackage publishing.php

Some files were not shown because too many files have changed in this diff Show More