diff --git a/README.md b/README.md index 21205ccc6..cd61d5e1a 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.5.8 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **124593** ++ *Line count*: **124646** + *File count*: **742** + *Folder count*: **129** diff --git a/admin/README.txt b/admin/README.txt index 21205ccc6..cd61d5e1a 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -114,7 +114,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.5.8 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **124593** ++ *Line count*: **124646** + *File count*: **742** + *Folder count*: **129** diff --git a/admin/assets/css/admin_view.css b/admin/assets/css/admin_view.css index fb2857b63..4e25e2269 100644 --- a/admin/assets/css/admin_view.css +++ b/admin/assets/css/admin_view.css @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/assets/css/admin_views.css b/admin/assets/css/admin_views.css index 128d3c749..c2c4821f7 100644 --- a/admin/assets/css/admin_views.css +++ b/admin/assets/css/admin_views.css @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/controllers/admin_view.php b/admin/controllers/admin_view.php index 100381a8b..89fc2e0e6 100644 --- a/admin/controllers/admin_view.php +++ b/admin/controllers/admin_view.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/controllers/admin_views.php b/admin/controllers/admin_views.php index 01d80163e..3b8885d15 100644 --- a/admin/controllers/admin_views.php +++ b/admin/controllers/admin_views.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index b140cf7a0..7896e87ed 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -384,9 +384,10 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $typeValue = $jinput->get('type', NULL, 'WORD'); - if($typeValue && $user->id != 0) + $sizeValue = $jinput->get('size', NULL, 'INT'); + if($typeValue && $sizeValue && $user->id != 0) { - $result = $this->getModel('ajax')->getButtonID($typeValue); + $result = $this->getModel('ajax')->getButtonID($typeValue, $sizeValue); } else { diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 3c67fef73..7ae372b1c 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -579,13 +579,15 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION="

The scripts COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL="Advanced notice." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION="

Please do not change this area unless you would like to add special import to this view that goes beyond the default import concept that Component Builder already does automatic if this view is set to have import & export in the component area where this view is linked to the component.

" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL="Beginners notice." -COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION="
" -COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION="

Linked Fields

Display of the fields will load here!

Field Conditions

Display of the fields conditions will load here!
" +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION="Some Shortcut Buttons
" +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION="

Linked Fields

Display of the fields will load here!

Field Conditions

Display of the fields conditions will load here!
" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="Here we can add some description to explain how things now work." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL="Fields & Conditions" -COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION="Only if you add permissions here will this view have permissions." +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION="You can link other views that has relationship with this view. Please watch this tutorial for more info. " +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_LABEL="Linked Views Options" +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION="Only if you add permissions here will this view have permissions. Please watch this tutorial for more info." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_LABEL="Permission Implementation" -COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_DESCRIPTION="If no tabs has been set all fields will be displayed together in one tab." +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_DESCRIPTION="If no tabs has been set all fields will be displayed together in one tab. Please watch this tutorial for more info." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_LABEL="Tab Setup Options" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTIFICATION="Notification" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTIFICATION_CIRCLE="Notification Circle" @@ -876,7 +878,7 @@ COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="%s component details< COM_COMPONENTBUILDER_BSB_HAS_ID_MISMATCH_OF_SELECTED_BFIELDB_SO_THE_IDS_WAS_REMOVED="%s has id mismatch of selected field. So the id:%s was removed!" COM_COMPONENTBUILDER_BSITE_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BSITE_VIEWB_SO_THE_IDS_WAS_REMOVED="Site view in %s has id mismatch of selected site view. So the id:%s was removed!" COM_COMPONENTBUILDER_BSNIPPETB_IDS_MISMATCH_IN_BSB="Snippet id:%s mismatch in %s." -COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED="Button to create %s will show once %s is saved." +COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED_FOR_THE_FIRST_TIME="Button to create %s will show once %s is saved for the first time." COM_COMPONENTBUILDER_BVIEW_TABLE_MAINB_IDS_MISMATCH_IN_BSB="View table main id:%s mismatch in %s." COM_COMPONENTBUILDER_CHAIN="Chain" COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there." @@ -1169,6 +1171,7 @@ COM_COMPONENTBUILDER_CONTRIBUTOR="Contributor" COM_COMPONENTBUILDER_CONTRIBUTORS="Contributors" COM_COMPONENTBUILDER_COPYRIGHT="Copyright" COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" +COM_COMPONENTBUILDER_CREATE="Create" COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s" COM_COMPONENTBUILDER_CREATE_S_FOR_THIS_S="Create %s for this %s" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW="Custom Admin View" @@ -2118,6 +2121,8 @@ 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_S_FOR_THIS_S="Edit %s for this %s" +COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS="Edit the admin fields" +COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS_CONDITIONS="Edit the admin fields conditions" COM_COMPONENTBUILDER_EDIT_VERSIONS="Edit Version" COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions." COM_COMPONENTBUILDER_EMAIL="Email" @@ -4441,6 +4446,8 @@ COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EI COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE="Your data is encrypted with a AES 128 bit encryption using the above 32 character key. Without this key it will take the current technology with a brute force attack method more then 700 000 000 000 000 000 000 000 000 000 000 years to crack theoretically. Unless they have this key above, so do keep it safe." COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL="You can now select the component zip package you would like to import.
Please note that smart component import only works with the following format: (.zip)" COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to import a component, please contact your system administrator for more help." +COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE="You have %s %s. Adding more then 50 %s is considered bad practice." +COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S="You have %s %s. Adding more then 50 %s is considered bad practice. Your %s page load in JCB will slowdown. You should consider decoupling some of these %s." COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT="You must select a component!" COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS="You should add the correct owner details." COM_COMPONENTBUILDER_YOU_SHOULD_ONLY_CONTINUE_THIS_IMPORT_IF_YOU_HAVE_BACKUP_YOUR_COMPONENTS_AND_INSURED_THAT_THE_PACKAGE_OWNER_IS_REPUTABLE="You should only continue this import if you have backup your components, and insured that the package owner is reputable." diff --git a/admin/layouts/admin_view/settings_fullwidth.php b/admin/layouts/admin_view/settings_fullwidth.php index dfc4e8171..918939310 100644 --- a/admin/layouts/admin_view/settings_fullwidth.php +++ b/admin/layouts/admin_view/settings_fullwidth.php @@ -34,6 +34,7 @@ $fields = $displayData->get('fields') ?: array( 'addpermissions', 'note_on_tabs', 'addtabs', + 'note_on_linked_views', 'addlinked_views' ); diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 9c853f0af..8574b2c82 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @@ -250,10 +250,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_display = base64_decode($item->php_import_display); } - if (!empty($item->css_view)) + if (!empty($item->php_getitem)) { - // base64 Decode css_view. - $item->css_view = base64_decode($item->css_view); + // base64 Decode php_getitem. + $item->php_getitem = base64_decode($item->php_getitem); } if (!empty($item->php_import_save)) @@ -262,6 +262,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_save = base64_decode($item->php_import_save); } + if (!empty($item->css_view)) + { + // base64 Decode css_view. + $item->css_view = base64_decode($item->css_view); + } + if (!empty($item->css_views)) { // base64 Decode css_views. @@ -334,12 +340,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_setdata = base64_decode($item->php_import_setdata); } - if (!empty($item->php_getitem)) - { - // base64 Decode php_getitem. - $item->php_getitem = base64_decode($item->php_getitem); - } - if (!empty($item->php_import_ext)) { // base64 Decode php_import_ext. @@ -465,6 +465,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin { $this->_db->updateObject('#__componentbuilder_admin_view', $objectUpdate, 'id'); } + // also update the fields and conditions if (!empty($item->id)) { @@ -1445,10 +1446,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_display'] = base64_encode($data['php_import_display']); } - // Set the css_view string to base64 string. - if (isset($data['css_view'])) + // Set the php_getitem string to base64 string. + if (isset($data['php_getitem'])) { - $data['css_view'] = base64_encode($data['css_view']); + $data['php_getitem'] = base64_encode($data['php_getitem']); } // Set the php_import_save string to base64 string. @@ -1457,6 +1458,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_save'] = base64_encode($data['php_import_save']); } + // Set the css_view string to base64 string. + if (isset($data['css_view'])) + { + $data['css_view'] = base64_encode($data['css_view']); + } + // Set the css_views string to base64 string. if (isset($data['css_views'])) { @@ -1529,12 +1536,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_setdata'] = base64_encode($data['php_import_setdata']); } - // Set the php_getitem string to base64 string. - if (isset($data['php_getitem'])) - { - $data['php_getitem'] = base64_encode($data['php_getitem']); - } - // Set the php_import_ext string to base64 string. if (isset($data['php_import_ext'])) { diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index d48d39a3d..cb5a0580a 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @@ -275,10 +275,12 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->sql = base64_decode($item->sql); // decode php_import_display $item->php_import_display = base64_decode($item->php_import_display); - // decode css_view - $item->css_view = base64_decode($item->css_view); + // decode php_getitem + $item->php_getitem = base64_decode($item->php_getitem); // decode php_import_save $item->php_import_save = base64_decode($item->php_import_save); + // decode css_view + $item->css_view = base64_decode($item->css_view); // decode css_views $item->css_views = base64_decode($item->css_views); // decode javascript_view_file @@ -303,8 +305,6 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->html_import_view = base64_decode($item->html_import_view); // decode php_import_setdata $item->php_import_setdata = base64_decode($item->php_import_setdata); - // decode php_getitem - $item->php_getitem = base64_decode($item->php_getitem); // decode php_import_ext $item->php_import_ext = base64_decode($item->php_import_ext); // unset the values we don't want exported. diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 2fedc95cd..9a06f749d 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -252,7 +252,7 @@ class ComponentbuilderModelAjax extends JModelList return false; } - public function getButtonID($type) + public function getButtonID($type, $size) { if (isset($this->buttonArray[$type])) { @@ -272,31 +272,50 @@ class ComponentbuilderModelAjax extends JModelList if ($id = ComponentbuilderHelper::getVar($type, $values['a_id'], $values['a_view'], 'id')) { $buttonText = JText::sprintf('COM_COMPONENTBUILDER_EDIT_S_FOR_THIS_S', ComponentbuilderHelper::safeString($type, 'w'), ComponentbuilderHelper::safeString($values['a_view'], 'w')); + $buttonTextSmall = JText::_('COM_COMPONENTBUILDER_EDIT'); $editThis = 'index.php?option=com_componentbuilder&view='.$this->buttonArray[$type].'&task='.$type.'.edit&id='.$id; $icon = 'icon-apply'; } else { $buttonText = JText::sprintf('COM_COMPONENTBUILDER_CREATE_S_FOR_THIS_S', ComponentbuilderHelper::safeString($type, 'w'), ComponentbuilderHelper::safeString($values['a_view'], 'w')); + $buttonTextSmall = JText::_('COM_COMPONENTBUILDER_CREATE'); $editThis = 'index.php?option=com_componentbuilder&view='.$type.'&layout=edit'; $icon = 'icon-new'; } // build the button - $button = '
-
- -
- -
'; + $button = array(); + if (1 == $size) + { + $button[] = '
'; + $button[] = '
'; + $button[] = ''; + $button[] = '
'; + $button[] = ''; + $button[] = '
'; + } + elseif (2 == $size) + { + $button[] = ''; + $button[] = $buttonTextSmall; + $button[] = ''; + } // return the button attached to input field - return $button; + return implode("\n", $button); + } + // only return notice if big button + if (1 == $size) + { + return '
' . JText::sprintf('COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED_FOR_THE_FIRST_TIME', ComponentbuilderHelper::safeString($type, 'w'), ComponentbuilderHelper::safeString($values['a_view'], 'w')) . '
'; } - return '
' . JText::sprintf('COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED', ComponentbuilderHelper::safeString($type, 'w'), ComponentbuilderHelper::safeString($values['a_view'], 'w')) . '
'; } } return ''; @@ -366,6 +385,8 @@ class ComponentbuilderModelAjax extends JModelList // build table if (ComponentbuilderHelper::checkArray($rows) && ComponentbuilderHelper::checkArray($head)) { + // set the number of rows + $this->rowNumber = count($rows); // return the table return $this->setSubformTable($head, $rows); } @@ -436,6 +457,8 @@ class ComponentbuilderModelAjax extends JModelList { if (isset($this->fieldsArray[$type])) { + // set type name + $typeName = ComponentbuilderHelper::safeString($type, 'w'); // get the view name & id $values = $this->getViewID(); // check if we are in the correct view. @@ -444,11 +467,23 @@ class ComponentbuilderModelAjax extends JModelList // get the field data if ($fieldsData = ComponentbuilderHelper::getVar($type, (int) $values['a_id'], 'admin_view', $this->fieldsArray[$type])) { - // decode the fields - return $this->getSubformTable($type, $fieldsData); + // get the table + $table = $this->getSubformTable($type, $fieldsData); + // set notice of bad practice + $notice = ''; + if (isset($this->rowNumber) && $this->rowNumber > 50) + { + $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S', $this->rowNumber, $typeName, $typeName, $typeName, $typeName) . '
'; + } + elseif (isset($this->rowNumber)) + { + $notice = '
' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE', $this->rowNumber, $typeName, $typeName) . '
'; + } + // return table + return $notice.$table; } } - return '
' . JText::sprintf('COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE', ComponentbuilderHelper::safeString($type, 'w')) . '
'; + return '
' . JText::sprintf('COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE', $typeName) . '
'; } return '

' . JText::_('COM_COMPONENTBUILDER_TYPE_ERROR') . '

' . JText::_('COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST') . '

'; } diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index 147d54b42..c5975ab03 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @@ -1177,16 +1177,16 @@ function isSet(val) } jQuery(document).ready(function() -{ +{ // set button - addButtonID('admin_fields','create_edit_buttons'); // <-- first + addButtonID('admin_fields','create_edit_buttons', 1); // <-- first var valueSwitch = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); getImportScripts(valueSwitch); - addButtonID('admin_fields_conditions','create_edit_buttons'); // <-- second - // now load the fields getFieldsDisplay('admin_fields'); getFieldsDisplay('admin_fields_conditions'); + // set button + addButtonID('admin_fields_conditions','create_edit_buttons', 1); // <-- second }); function getFieldsDisplay(type){ @@ -1194,6 +1194,8 @@ function getFieldsDisplay(type){ if(result){ jQuery('#display_'+type).html(result); } + // set button + addButtonID(type,'header_'+type+'_buttons', 2); // <-- little edit button }); } @@ -1215,10 +1217,10 @@ function addData(result,where){ jQuery(where).closest('.control-group').parent().append(result); } -function addButtonID_server(type){ +function addButtonID_server(type, size){ var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod); - if(token.length > 0 && type.length > 0){ - var request = 'token='+token+'&type='+type; + if(token.length > 0 && type.length > 0 && size > 0){ + var request = 'token='+token+'&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', @@ -1228,10 +1230,14 @@ function addButtonID_server(type){ jsonp: 'callback' }); } -function addButtonID(type,where){ - addButtonID_server(type).done(function(result) { +function addButtonID(type, where, size){ + addButtonID_server(type, size).done(function(result) { if(result){ - addData(result,'#jform_'+where); + if (1 == size) { + addData(result, '#jform_'+where); + } else if (2 == size) { + jQuery('#'+where).html(result); + } } }); } diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index 92b12974c..e8690252d 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -489,6 +489,21 @@ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_HINT" required="true" /> + + + + - - - - - - + + - - + + + + + + + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - - - + + type="radio" + name="add_php_getitems" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + @@ -720,11 +749,11 @@ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_HINT" required="true" /> - + @@ -748,11 +777,11 @@ - + @@ -775,11 +804,11 @@ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_HINT" required="true" /> - + @@ -803,11 +832,11 @@ - + @@ -830,11 +859,11 @@ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_HINT" required="true" /> - + @@ -858,11 +887,11 @@ - + @@ -885,11 +914,11 @@ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_HINT" required="true" /> - + @@ -913,11 +942,11 @@ - + @@ -940,11 +969,11 @@ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_HINT" required="true" /> - + @@ -968,11 +997,11 @@ - + @@ -1491,11 +1520,11 @@ - + @@ -1518,11 +1547,11 @@ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_HINT" required="false" /> - + @@ -1545,11 +1574,11 @@ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_HINT" required="false" /> - + @@ -1572,33 +1601,6 @@ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_HINT" required="false" /> - - - - - - - - + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - - - - COM_COMPONENTBUILDER_ADMIN_VIEW_NO + + + + - + @@ -1838,32 +1866,6 @@ - - - - escape($item->system_name); ?> + +
+ get('admin_view.edit') && $admin_field_id = ComponentbuilderHelper::getVar('admin_fields', $item->id, 'admin_view', 'id')): ?> + + + get('admin_view.edit') && $admin_condition_id = ComponentbuilderHelper::getVar('admin_fields_conditions', $item->id, 'admin_view', 'id')): ?> + + +
+ escape($item->name_single); ?> diff --git a/admin/views/admin_views/tmpl/default_foot.php b/admin/views/admin_views/tmpl/default_foot.php index dd7daf81b..4c4825635 100644 --- a/admin/views/admin_views/tmpl/default_foot.php +++ b/admin/views/admin_views/tmpl/default_foot.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_views/tmpl/default_head.php b/admin/views/admin_views/tmpl/default_head.php index 77d1311ad..8ff9c1289 100644 --- a/admin/views/admin_views/tmpl/default_head.php +++ b/admin/views/admin_views/tmpl/default_head.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_views/tmpl/default_toolbar.php b/admin/views/admin_views/tmpl/default_toolbar.php index 7294b10ad..14dda9851 100644 --- a/admin/views/admin_views/tmpl/default_toolbar.php +++ b/admin/views/admin_views/tmpl/default_toolbar.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index f5a4d357d..f7a14180c 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 166 of this MVC + @version @update number 178 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/script.php b/script.php index 3f8e8fe54..23f4d5d2d 100644 --- a/script.php +++ b/script.php @@ -1929,9 +1929,9 @@ class com_componentbuilderInstallerScript if (count($version) == 3 && $version[0] <= 2 && $version[1] <= 5 && (($version[1] == 5 && $version[2] <= 4) || ($version[1] < 5))) { // do some conversions in the translations table - $convertRepeatable($db, 'language_translation', array('id', 'translation'), array('translation' => array('check' => array('translation','language'), 'key' => 'translation'))); + $convertRepeatable($db, 'language_translation', array('id', 'translation'), array('translation' => array('check' => array('translation'), 'key' => 'translation'))); // do some conversions in the fieldtype table - $convertRepeatable($db, 'fieldtype', array('id', 'properties'), array('properties' => array('check' => array('name','mandatory'), 'key' => 'properties'))); + $convertRepeatable($db, 'fieldtype', array('id', 'properties'), array('properties' => array('check' => array('name'), 'key' => 'properties'))); } // target version less then 2.5.6 if (count($version) == 3 && $version[0] <= 2 && $version[1] <= 5 && (($version[1] == 5 && $version[2] <= 5) || ($version[1] < 5))) @@ -1939,12 +1939,12 @@ class com_componentbuilderInstallerScript // do some conversions in the dynamic get table $convertRepeatable($db, 'dynamic_get', array('id', 'join_view_table', 'join_db_table', 'filter', 'where', 'order', 'global'), array( - 'join_view_table' => array('check' => array('view_table','row_type','as','type'), 'key' => 'join_view_table'), - 'join_db_table' => array('check' => array('db_table','row_type','as','type'), 'key' => 'join_db_table'), - 'filter' => array('check' => array('filter_type', 'state_key', 'operator'), 'key' => 'filter'), - 'where' => array('check' => array('table_key', 'operator', 'value_key'), 'key' => 'where'), - 'order' => array('check' => array('table_key', 'direction'), 'key' => 'order'), - 'global' => array('check' => array('name', 'key', 'as', 'type'), 'key' => 'global') + 'join_view_table' => array('check' => array('view_table'), 'key' => 'join_view_table'), + 'join_db_table' => array('check' => array('db_table'), 'key' => 'join_db_table'), + 'filter' => array('check' => array('filter_type'), 'key' => 'filter'), + 'where' => array('check' => array('table_key'), 'key' => 'where'), + 'order' => array('check' => array('table_key'), 'key' => 'order'), + 'global' => array('check' => array('name'), 'key' => 'global') ) ); } @@ -1954,29 +1954,29 @@ class com_componentbuilderInstallerScript // do some conversions in the admin_view table $convertRepeatable($db, 'admin_view', array('id', 'ajax_input', 'custom_button', 'addtables', 'addlinked_views', 'addconditions', 'addfields', 'addtabs', 'addpermissions'), array( - 'ajax_input' => array('check' => array('value_name','task_name','input_default','input_filter','method_name', 'user_check'), 'key' => 'ajax_input'), - 'custom_button' => array('check' => array('icomoon', 'name', 'method', 'target', 'type'), 'key' => 'custom_button'), - 'addtables' => array('check' => array('dbtables', 'sourcemap'), 'key' => 'addtables'), - 'addlinked_views' => array('check' => array('adminview', 'tab', 'key', 'parentkey', 'addnew'), 'key' => 'addlinked_views'), - 'addconditions' => array('check' => array('target_field', 'target_behavior', 'target_relation', 'match_field', 'match_behavior', 'match_options'), 'key' => 'addconditions'), - 'addfields' => array('check' => array('field', 'list', 'order_list', 'title', 'alias', 'sort', 'search', 'filter', 'link', 'tab', 'alignment', 'order_edit', 'permission'), 'key' => 'addfields'), + 'ajax_input' => array('check' => array('value_name'), 'key' => 'ajax_input'), + 'custom_button' => array('check' => array('name'), 'key' => 'custom_button'), + 'addtables' => array('check' => array('table'), 'key' => 'addtables'), + 'addlinked_views' => array('check' => array('adminview'), 'key' => 'addlinked_views'), + 'addconditions' => array('check' => array('target_field'), 'key' => 'addconditions'), + 'addfields' => array('check' => array('field'), 'key' => 'addfields'), 'addtabs' => array('check' => array('name'), 'key' => 'addtabs'), - 'addpermissions' => array('check' => array('action', 'implementation'), 'key' => 'addpermissions') + 'addpermissions' => array('check' => array('action'), 'key' => 'addpermissions') ) ); // do some conversions in the site_view table $convertRepeatable($db, 'site_view', array('id', 'ajax_input', 'custom_button'), array( - 'ajax_input' => array('check' => array('value_name','task_name','input_default','input_filter','method_name', 'user_check'), 'key' => 'ajax_input'), - 'custom_button' => array('check' => array('icomoon', 'name', 'method', 'target', 'type'), 'key' => 'custom_button') + 'ajax_input' => array('check' => array('value_name'), 'key' => 'ajax_input'), + 'custom_button' => array('check' => array('name'), 'key' => 'custom_button') ) ); // do some conversions in the custom_admin_view table $convertRepeatable($db, 'custom_admin_view', array('id', 'custom_button'), array( - 'custom_button' => array('check' => array('icomoon', 'name', 'method', 'target', 'type'), 'key' => 'custom_button') + 'custom_button' => array('check' => array('name'), 'key' => 'custom_button') ) ); } @@ -2045,9 +2045,9 @@ class com_componentbuilderInstallerScript $admin_view->type_title = 'Componentbuilder Admin_view'; $admin_view->type_alias = 'com_componentbuilder.admin_view'; $admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","php_getitems":"php_getitems","php_batchmove":"php_batchmove","icon_add":"icon_add","php_save":"php_save","icon_category":"icon_category","icon":"icon","php_after_delete":"php_after_delete","php_getlistquery":"php_getlistquery","php_allowedit":"php_allowedit","type":"type","php_after_publish":"php_after_publish","description":"description","source":"source","add_fadein":"add_fadein","php_import":"php_import","not_required":"not_required","php_getitems_after_all":"php_getitems_after_all","php_before_save":"php_before_save","php_postsavehook":"php_postsavehook","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","php_before_delete":"php_before_delete","php_document":"php_document","sql":"sql","add_css_view":"add_css_view","php_import_display":"php_import_display","css_view":"css_view","php_import_save":"php_import_save","add_css_views":"add_css_views","add_php_getitems":"add_php_getitems","css_views":"css_views","add_php_getitems_after_all":"add_php_getitems_after_all","add_javascript_view_file":"add_javascript_view_file","add_php_getlistquery":"add_php_getlistquery","javascript_view_file":"javascript_view_file","add_php_before_save":"add_php_before_save","add_javascript_view_footer":"add_javascript_view_footer","add_php_save":"add_php_save","javascript_view_footer":"javascript_view_footer","add_php_postsavehook":"add_php_postsavehook","add_javascript_views_file":"add_javascript_views_file","add_php_allowedit":"add_php_allowedit","javascript_views_file":"javascript_views_file","add_php_batchcopy":"add_php_batchcopy","add_javascript_views_footer":"add_javascript_views_footer","add_php_batchmove":"add_php_batchmove","javascript_views_footer":"javascript_views_footer","add_php_before_publish":"add_php_before_publish","add_custom_button":"add_custom_button","add_php_after_publish":"add_php_after_publish","add_php_before_delete":"add_php_before_delete","php_controller":"php_controller","add_php_after_delete":"add_php_after_delete","php_model":"php_model","add_php_document":"add_php_document","php_controller_list":"php_controller_list","add_sql":"add_sql","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","php_ajaxmethod":"php_ajaxmethod","add_custom_import":"add_custom_import","html_import_view":"html_import_view","add_php_getitem":"add_php_getitem","php_import_setdata":"php_import_setdata","php_getitem":"php_getitem","php_import_ext":"php_import_ext"}}'; + $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","php_getitems":"php_getitems","php_batchmove":"php_batchmove","icon_add":"icon_add","php_save":"php_save","icon_category":"icon_category","icon":"icon","php_after_delete":"php_after_delete","php_getlistquery":"php_getlistquery","php_allowedit":"php_allowedit","type":"type","php_after_publish":"php_after_publish","description":"description","source":"source","add_fadein":"add_fadein","php_import":"php_import","not_required":"not_required","php_getitems_after_all":"php_getitems_after_all","php_before_save":"php_before_save","php_postsavehook":"php_postsavehook","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","php_before_delete":"php_before_delete","php_document":"php_document","sql":"sql","php_import_display":"php_import_display","php_getitem":"php_getitem","php_import_save":"php_import_save","add_css_view":"add_css_view","css_view":"css_view","add_php_getitems":"add_php_getitems","add_css_views":"add_css_views","add_php_getitems_after_all":"add_php_getitems_after_all","css_views":"css_views","add_php_getlistquery":"add_php_getlistquery","add_javascript_view_file":"add_javascript_view_file","add_php_before_save":"add_php_before_save","javascript_view_file":"javascript_view_file","add_php_save":"add_php_save","add_javascript_view_footer":"add_javascript_view_footer","add_php_postsavehook":"add_php_postsavehook","javascript_view_footer":"javascript_view_footer","add_php_allowedit":"add_php_allowedit","add_javascript_views_file":"add_javascript_views_file","add_php_batchcopy":"add_php_batchcopy","javascript_views_file":"javascript_views_file","add_php_batchmove":"add_php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","add_php_before_publish":"add_php_before_publish","javascript_views_footer":"javascript_views_footer","add_php_after_publish":"add_php_after_publish","add_custom_button":"add_custom_button","add_php_before_delete":"add_php_before_delete","add_php_after_delete":"add_php_after_delete","php_controller":"php_controller","add_php_document":"add_php_document","php_model":"php_model","add_sql":"add_sql","php_controller_list":"php_controller_list","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","add_custom_import":"add_custom_import","php_ajaxmethod":"php_ajaxmethod","html_import_view":"html_import_view","php_import_setdata":"php_import_setdata","add_php_getitem":"add_php_getitem","php_import_ext":"php_import_ext"}}'; $admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute'; - $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.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","source","add_fadein","not_required","add_css_view","add_css_views","add_php_getitems","add_php_getitems_after_all","add_javascript_view_file","add_php_getlistquery","add_php_before_save","add_javascript_view_footer","add_php_save","add_php_postsavehook","add_javascript_views_file","add_php_allowedit","add_php_batchcopy","add_javascript_views_footer","add_php_batchmove","add_php_before_publish","add_custom_button","add_php_after_publish","add_php_before_delete","add_php_after_delete","add_php_document","add_sql","add_php_ajax","add_custom_import","add_php_getitem"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; + $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.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","source","add_fadein","not_required","add_css_view","add_php_getitems","add_css_views","add_php_getitems_after_all","add_php_getlistquery","add_javascript_view_file","add_php_before_save","add_php_save","add_javascript_view_footer","add_php_postsavehook","add_php_allowedit","add_javascript_views_file","add_php_batchcopy","add_php_batchmove","add_javascript_views_footer","add_php_before_publish","add_php_after_publish","add_custom_button","add_php_before_delete","add_php_after_delete","add_php_document","add_sql","add_php_ajax","add_custom_import","add_php_getitem"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $admin_view_Inserted = $db->insertObject('#__content_types', $admin_view); @@ -2316,9 +2316,9 @@ class com_componentbuilderInstallerScript $admin_view->type_title = 'Componentbuilder Admin_view'; $admin_view->type_alias = 'com_componentbuilder.admin_view'; $admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","php_getitems":"php_getitems","php_batchmove":"php_batchmove","icon_add":"icon_add","php_save":"php_save","icon_category":"icon_category","icon":"icon","php_after_delete":"php_after_delete","php_getlistquery":"php_getlistquery","php_allowedit":"php_allowedit","type":"type","php_after_publish":"php_after_publish","description":"description","source":"source","add_fadein":"add_fadein","php_import":"php_import","not_required":"not_required","php_getitems_after_all":"php_getitems_after_all","php_before_save":"php_before_save","php_postsavehook":"php_postsavehook","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","php_before_delete":"php_before_delete","php_document":"php_document","sql":"sql","add_css_view":"add_css_view","php_import_display":"php_import_display","css_view":"css_view","php_import_save":"php_import_save","add_css_views":"add_css_views","add_php_getitems":"add_php_getitems","css_views":"css_views","add_php_getitems_after_all":"add_php_getitems_after_all","add_javascript_view_file":"add_javascript_view_file","add_php_getlistquery":"add_php_getlistquery","javascript_view_file":"javascript_view_file","add_php_before_save":"add_php_before_save","add_javascript_view_footer":"add_javascript_view_footer","add_php_save":"add_php_save","javascript_view_footer":"javascript_view_footer","add_php_postsavehook":"add_php_postsavehook","add_javascript_views_file":"add_javascript_views_file","add_php_allowedit":"add_php_allowedit","javascript_views_file":"javascript_views_file","add_php_batchcopy":"add_php_batchcopy","add_javascript_views_footer":"add_javascript_views_footer","add_php_batchmove":"add_php_batchmove","javascript_views_footer":"javascript_views_footer","add_php_before_publish":"add_php_before_publish","add_custom_button":"add_custom_button","add_php_after_publish":"add_php_after_publish","add_php_before_delete":"add_php_before_delete","php_controller":"php_controller","add_php_after_delete":"add_php_after_delete","php_model":"php_model","add_php_document":"add_php_document","php_controller_list":"php_controller_list","add_sql":"add_sql","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","php_ajaxmethod":"php_ajaxmethod","add_custom_import":"add_custom_import","html_import_view":"html_import_view","add_php_getitem":"add_php_getitem","php_import_setdata":"php_import_setdata","php_getitem":"php_getitem","php_import_ext":"php_import_ext"}}'; + $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "null","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","php_getitems":"php_getitems","php_batchmove":"php_batchmove","icon_add":"icon_add","php_save":"php_save","icon_category":"icon_category","icon":"icon","php_after_delete":"php_after_delete","php_getlistquery":"php_getlistquery","php_allowedit":"php_allowedit","type":"type","php_after_publish":"php_after_publish","description":"description","source":"source","add_fadein":"add_fadein","php_import":"php_import","not_required":"not_required","php_getitems_after_all":"php_getitems_after_all","php_before_save":"php_before_save","php_postsavehook":"php_postsavehook","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","php_before_delete":"php_before_delete","php_document":"php_document","sql":"sql","php_import_display":"php_import_display","php_getitem":"php_getitem","php_import_save":"php_import_save","add_css_view":"add_css_view","css_view":"css_view","add_php_getitems":"add_php_getitems","add_css_views":"add_css_views","add_php_getitems_after_all":"add_php_getitems_after_all","css_views":"css_views","add_php_getlistquery":"add_php_getlistquery","add_javascript_view_file":"add_javascript_view_file","add_php_before_save":"add_php_before_save","javascript_view_file":"javascript_view_file","add_php_save":"add_php_save","add_javascript_view_footer":"add_javascript_view_footer","add_php_postsavehook":"add_php_postsavehook","javascript_view_footer":"javascript_view_footer","add_php_allowedit":"add_php_allowedit","add_javascript_views_file":"add_javascript_views_file","add_php_batchcopy":"add_php_batchcopy","javascript_views_file":"javascript_views_file","add_php_batchmove":"add_php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","add_php_before_publish":"add_php_before_publish","javascript_views_footer":"javascript_views_footer","add_php_after_publish":"add_php_after_publish","add_custom_button":"add_custom_button","add_php_before_delete":"add_php_before_delete","add_php_after_delete":"add_php_after_delete","php_controller":"php_controller","add_php_document":"add_php_document","php_model":"php_model","add_sql":"add_sql","php_controller_list":"php_controller_list","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","add_custom_import":"add_custom_import","php_ajaxmethod":"php_ajaxmethod","html_import_view":"html_import_view","php_import_setdata":"php_import_setdata","add_php_getitem":"add_php_getitem","php_import_ext":"php_import_ext"}}'; $admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute'; - $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.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","source","add_fadein","not_required","add_css_view","add_css_views","add_php_getitems","add_php_getitems_after_all","add_javascript_view_file","add_php_getlistquery","add_php_before_save","add_javascript_view_footer","add_php_save","add_php_postsavehook","add_javascript_views_file","add_php_allowedit","add_php_batchcopy","add_javascript_views_footer","add_php_batchmove","add_php_before_publish","add_custom_button","add_php_after_publish","add_php_before_delete","add_php_after_delete","add_php_document","add_sql","add_php_ajax","add_custom_import","add_php_getitem"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; + $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.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","source","add_fadein","not_required","add_css_view","add_php_getitems","add_css_views","add_php_getitems_after_all","add_php_getlistquery","add_javascript_view_file","add_php_before_save","add_php_save","add_javascript_view_footer","add_php_postsavehook","add_php_allowedit","add_javascript_views_file","add_php_batchcopy","add_php_batchmove","add_javascript_views_footer","add_php_before_publish","add_php_after_publish","add_custom_button","add_php_before_delete","add_php_after_delete","add_php_document","add_sql","add_php_ajax","add_custom_import","add_php_getitem"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; // Check if admin_view type is already in content_type DB. $admin_view_id = null;