From 185dad42738c119d4c7d5614386e58a468b23b50 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 3 Jan 2020 05:36:47 +0200 Subject: [PATCH] Started adding the Assistant GUI ;) --- README.md | 6 +- admin/README.txt | 6 +- admin/access.xml | 3 + admin/assets/css/assistant.css | 15 + admin/assets/images/icons/assistant.png | Bin 0 -> 17060 bytes admin/assets/js/assistant.js | 593 ++++++++++++++++++ admin/controllers/assistant.php | 30 + admin/helpers/componentbuilder.php | 5 + .../en-GB/en-GB.com_componentbuilder.ini | 63 ++ .../en-GB/en-GB.com_componentbuilder.sys.ini | 7 + admin/layouts/assistantsubformrepeatable.php | 98 +++ admin/layouts/assistantsubformsection.php | 93 +++ admin/layouts/jcbplansgui.php | 196 ++++++ admin/models/assistant.php | 162 +++++ admin/models/componentbuilder.php | 4 +- admin/models/joomla_component.php | 3 +- admin/views/assistant/index.html | 1 + admin/views/assistant/tmpl/default.php | 133 ++++ .../tmpl/default_jcbcomponentplan.php | 34 + .../tmpl/default_jcbplanoverview.php | 21 + .../assistant/tmpl/default_jcbviewsplan.php | 131 ++++ admin/views/assistant/tmpl/index.html | 1 + admin/views/assistant/view.html.php | 283 +++++++++ componentbuilder.xml | 1 + 24 files changed, 1881 insertions(+), 8 deletions(-) create mode 100644 admin/assets/css/assistant.css create mode 100644 admin/assets/images/icons/assistant.png create mode 100644 admin/assets/js/assistant.js create mode 100644 admin/controllers/assistant.php create mode 100644 admin/layouts/assistantsubformrepeatable.php create mode 100644 admin/layouts/assistantsubformsection.php create mode 100644 admin/layouts/jcbplansgui.php create mode 100644 admin/models/assistant.php create mode 100644 admin/views/assistant/index.html create mode 100644 admin/views/assistant/tmpl/default.php create mode 100644 admin/views/assistant/tmpl/default_jcbcomponentplan.php create mode 100644 admin/views/assistant/tmpl/default_jcbplanoverview.php create mode 100644 admin/views/assistant/tmpl/default_jcbviewsplan.php create mode 100644 admin/views/assistant/tmpl/index.html create mode 100644 admin/views/assistant/view.html.php diff --git a/README.md b/README.md index 25bc1a267..053490eb9 100644 --- a/README.md +++ b/README.md @@ -148,10 +148,10 @@ TODO + *Version*: 2.10.10 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **278234** ++ *Line count*: **280105** + *Field count*: **1503** -+ *File count*: **1755** -+ *Folder count*: **278** ++ *File count*: **1769** ++ *Folder count*: **280** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index 25bc1a267..053490eb9 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -148,10 +148,10 @@ TODO + *Version*: 2.10.10 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **278234** ++ *Line count*: **280105** + *Field count*: **1503** -+ *File count*: **1755** -+ *Folder count*: **278** ++ *File count*: **1769** ++ *Folder count*: **280** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/access.xml b/admin/access.xml index e5398db15..5f9297b07 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -71,6 +71,9 @@ + + + diff --git a/admin/assets/css/assistant.css b/admin/assets/css/assistant.css new file mode 100644 index 000000000..f073948a4 --- /dev/null +++ b/admin/assets/css/assistant.css @@ -0,0 +1,15 @@ +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +/* CSS Document */ + +.j-sidebar-container { +margin: -37px 0 0 -1px !important; +} diff --git a/admin/assets/images/icons/assistant.png b/admin/assets/images/icons/assistant.png new file mode 100644 index 0000000000000000000000000000000000000000..27294fa3fad76de4fdc94d20a3462e445136b42e GIT binary patch literal 17060 zcmV*zKs>*RP)@j1!mxhkNh2XZ_B{5klZ0^62QzqrOU|QZ(yxRN=k^+^r6t^m;vUI2?jfsf68b z2YS8!yGEnA#J}0S9aO7TvE6Qi)oO*Cn;TH8)zD}(ocQ(rADx~ipp|7Z8EiHiR$VTa z1JCo+eudwM{~3XbCKiibkH=$(L?RqD*lac;kx0PlbV9e=g={uUi;}xQ9EZc<%TA}m z9ww8C=yWy@RA4fh&?KMFZGp;9tyT+(M1oi>77#@dmdhoCLLu<`{dA;{$z+n; zUfZ#Z91aH*i$w;eR4Qdy3LOdRadcFRVj?YG+7~G|qOoq5zF5-5(Nx57mwOWnc z>0dsde?w31923*&G%*^D3f#Wz>uh-!9dTG~BPk4Z*1e1J1 z5`Dm64wVsVI-LTd4ra3%0)fC*5QKN={*|u$Zy?h@9X!LpAGkI$8jT22nc)73-EJoy zkB78cEoR3KuQBE^D}IbTCK9mnYjpaxSS-kFHY2%Qj+9CzLf>ewq0bBS6{!Dj0a&YI zmIT5u{GA0s5iWK}E=3*=Dzu!^)O=IYe4Bw#OGH1RRS2THA0Xk>y8pjb0 zZXrSiy*$;@1y@>@|vbB;Jjr_)#TMS25imCI#?oPxDmZT`kq@`Fq!qirpbND#V0Gv9zDMRd(( z(^%>Ugp9e@R!Rk>1n(r!oFMomNu_gBU@fIEg83pfh3QK?k4ky0aJ7-~tQ&}F2+ zq(}^lDIoE|_j@!N3CvVlt(Lw8ZjaNt?mRf7mRc2)2m- zt(5EeJ@O=$Bu%OpKJLrQeeZqm-0wT*yiWL_2Rs{&x7%rDx1-fAh7>2(*4A!IjE)5Y z0hihJMo7b!boP$^FDafYKL1MsI}xBo5>kOjlngQgtq^Du%D{U5Q-RmCS2bzY4PEn8 z@#B9a&?jE|P_0%?Fc>t^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saYpcUd=(*A$7=FL)_YM T$X#R#00000NkvXXu0mjfn&fwr literal 0 HcmV?d00001 diff --git a/admin/assets/js/assistant.js b/admin/assets/js/assistant.js new file mode 100644 index 000000000..6254ec7a4 --- /dev/null +++ b/admin/assets/js/assistant.js @@ -0,0 +1,593 @@ +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +/* JS Document */ + +var noticeboard = "https://vdm.bz/componentbuilder-noticeboard-md"; +var proboard = "https://vdm.bz/componentbuilder-pro-noticeboard-md"; +jQuery(document).ready(function () { + jQuery.get(noticeboard) + .success(function(board) { + if (board.length > 5) { + jQuery("#noticeboard-md").html(marked(board)); + getIS(1,board).done(function(result) { + if (result){ + jQuery("#vdm-new-notice").show(); + getIS(2,board); + } + }); + } else { + jQuery("#noticeboard-md").html(all_is_good); + } + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery("#noticeboard-md").html(all_is_good); + }); + jQuery.get(proboard) + .success(function(board) { + if (board.length > 5) { + jQuery("#proboard-md").html(marked(board)); + } else { + jQuery("#proboard-md").html(all_is_good); + } + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery("#proboard-md").html(all_is_good); + }); +}); +// to check is READ/NEW +function getIS(type,notice){ + if (type == 1) { + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isNew&format=json&raw=true"); + } else if (type == 2) { + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isRead&format=json&raw=true"); + } + if(token.length > 0 && notice.length){ + var request = token+"=1¬ice="+notice; + } + return jQuery.ajax({ + type: "POST", + url: getUrl, + dataType: 'json', + data: request, + jsonp: false + }); +} + + +// start the moment the document is ready +jQuery(document).ready(function () { + // just get the available categories + getCategories(plansPath); +}); + +// add an ajax call tracker +var ajaxcall = null; +var fromLocal = false; + +jQuery(document).ready(function(){ + jQuery('body').on('click','.getreaction',function(){ + // Ajax request + var btn = jQuery(this); + btn.prop('disabled', true); + setTimeout(function(){ + btn.prop('disabled', false); + }, 3000); + var type = btn.data('type'); + if ('getCategories' === type) { + getCategories(plansPath); + } else if ('getPlans' === type) { + var name = btn.data('name'); + getPlans(plansPath, name); + } else if ('all' === type) { + var status = btn.data('status'); + bulkPlanGithub(status); + } else if ('bulk' === type) { + checkBulkPlanGithub(); + } else if ('get' === type) { + var path = btn.data('path'); + var status = btn.data('status'); + setPlanGithub(path, status); + } else { + var path = btn.data('path'); + getPlanModal(path, type); + } + }); +}); + +// load every thing once ready +jQuery(document).ajaxStop(function () { + if (0 === jQuery.active) { + //do something special + if ('plans' === ajaxcall) { + setTimeout( function() { + jQuery('#plans-github').html('

'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_PLANS')+'

'); + jQuery('#plans-display').show(); + jQuery('#plans-grid').trigger('display.uk.check'); + jQuery('#loading').hide(); + }, 1000); + } + } +}); + +// get the categories +function getCategories(path) { + var _paths = jQuery.jStorage.get('JCB-Plans-Paths', null); + // always hide the plans display + jQuery('#plans-display').hide(); + // always reset the grid + jQuery('#categories-grid').html(''); + // set the ajax scope + ajaxcall = 'categories'; + if (_paths) { + buildCategories(_paths); + } else { + jQuery.get(path) + .success(function(paths) { + // load only this category paths + jQuery.jStorage.set('JCB-Plans-Paths', paths, {TTL: expire}); + buildCategories(paths); + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery('#plans-github').html(returnError); + }); + } +} + +// build the ibraries object +function buildCategories(paths) { + var _temp = jQuery.jStorage.get('JCB-Categories', null); + if (_temp) { + setCategories(_temp); + } else { + var temp = {}; + jQuery.each(paths.tree, function(key,value) { + if (value.path.match(".json$")) { + var categoryName = value.path.split(/ -(.+)/)[0]; + categoryName = categoryName.trim() + temp[categoryName] = categoryName; + } + }); + // load only this category paths + jQuery.jStorage.set('JCB-Categories', temp, {TTL: expire}); + setCategories(temp); + } +} + +// set the categories +function setCategories(names) { + // now load the category buttons + jQuery.each(names, function(value) { + setCategory(value); + }); + setTimeout( function() { + jQuery('#plans-github').html('

'+Joomla.JText._('COM_COMPONENTBUILDER_AVAILABLE_CATEGORIES')+'

'); + jQuery('#categories-display').show(); + jQuery('#categories-grid').trigger('display.uk.check'); + }, 1000); +} + +// set the plans +function setCategory(name) { + // get useful ID + var keyID = getKeyID(name); + // build the category display + var html = '
'; + html += '
'; + html += '

' + name + '

'; + html += '
'; + // set the data buttons + html += setCategoryButtons(name); + // close the box panel + html += '
'; + html += '
'; + // now we have the category + jQuery('#categories-grid').append(html); +} + +function setCategoryButtons(name) { + return ''; +} + +// get the plans +function getPlans(path, categoryName) { + jQuery('#loading').show(); + // get local values if set + var _paths = jQuery.jStorage.get('JCB-Plans-Paths', null); + // always reset the grid + jQuery('#plans-grid').html(''); + // always hide categories + jQuery('#categories-display').hide(); + // set the ajax scope + ajaxcall = 'plans'; + fromLocal = false; + if (_paths) { + setPlans(_paths, categoryName); + jQuery('#plans-github').html('

'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_PLANS')+'

'); + } else { + jQuery.get(path) + .success(function(paths) { + // load only this category paths + jQuery.jStorage.set('JCB-Plans-Paths', paths, {TTL: expire}); + setPlans(paths, categoryName); + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery('#plans-github').html(returnError); + }); + } + // only use if loading localy + if (fromLocal) { + jQuery('#plans-display').show(); + jQuery('#plans-grid').trigger('display.uk.check'); + jQuery('#loading').hide(); + } +} + +// set the plans +function setPlans(paths, categoryName) { + // set the ajax scope + ajaxcall = 'plans'; + jQuery.each(paths.tree, function(key,value) { + if (value.path.match(".json$") && value.path.match("^"+categoryName)) { + var _plan = jQuery.jStorage.get(value.path, null); + if (_plan) { + setPlan(_plan, value.path); + fromLocal = true; + } else { + jQuery.get(planPath+value.path) + .success(function(plan) { + // convert the string to json.object + plan = jQuery.parseJSON(plan); + jQuery.jStorage.set(value.path, plan, {TTL: expire}); + setPlan(plan, value.path); + }) + .error(function(jqXHR, textStatus, errorThrown) { + // we could do more + }); + } + } + }); +} + +// set the plans +function setPlan(plan, key) { + // get useful ID + var keyID = getKeyID(key); + // get the status + var status = getPlanStatus(plan, key); + // add to bulk updater + if ('equal' !== status) { + bulkItems[status].push(key); + } + // build the plan display + var html = '
'; + html += '
'; + html += '
'; + html += '

' + plan.category+ ' - (' + plan.type + ') ' + plan.name + '

'; + html += plan.heading + '
'; + // set the data buttons + html += setDataButtons(plan, key, status); + // set the plan ref button + html += setRefButtons(plan, key, status, keyID); + // set the contributor buttons + html += setContributorButtons(plan, key); + // close the box panel + html += '
'; + html += '
'; + // now we have the plan + jQuery('#plans-grid').append(html); +} + +// set the plan status +function getPlanStatus(plan, key) { + // check if JCB already has this plan + if(local_plans.hasOwnProperty(key)){ + // first get local time stamp + var local_created = strtotime(local_plans[key].created); + var local_modified = strtotime(local_plans[key].modified); + // now get github time stamps + var created = strtotime(plan.created); + var modified = strtotime(plan.modified); + // work out the status + if (local_created == created) { + if (local_modified == modified) { + return 'equal'; + } else if (local_modified > modified) { + return 'ahead'; + } else if (local_modified < modified) { + return 'behind'; + } + } + return 'diverged'; + } + return 'new'; +} + +function setDataButtons(plan, key, status) { + var html = '
'; + html += ''; + html += ''; + html += ''; + html += '
'; + // return data buttons + return html; +} + +function setRefButtons(plan, key, status, keyID) { + var html = ''; + // set the update button + html += '
'; + if ('equal' !== status) { + if ('new' === status) { + var tooltip = Joomla.JText._('COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_INSTALL_IT_LOCALLY'); + } else { + var tooltip = Joomla.JText._('COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION'); + } + html += ''; + } else { + html += ''; + } + html += '
'; + // return data buttons + return html; +} + +function setContributorButtons(plan, key) { + // set the contributor name + if (plan.contributor_company) { + var contributor_name = plan.contributor_company; + } else if (plan.contributor_name) { + var contributor_name = plan.contributor_name; + } else { + var contributor_name = Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY'); + } + // set the contributor url + if (plan.contributor_website) { + var contributor_url = plan.contributor_website; + } else if (plan.contributor_email) { + var contributor_url = 'mailto:'+plan.contributor_email; + } else { + var contributor_url = 'https://github.com/vdm-io/Joomla-Component-Builder-Plans'; + } + var html = '
'; + html += ''; + html += ' ' + contributor_name + ''; + html += ' '+Joomla.JText._('COM_COMPONENTBUILDER_VIEW_BLAME')+''; + html += '
'; + // return contributor buttons + return html; +} + +// do a bulk update +function checkBulkPlanGithub() { + // check if there is new items + if (bulkItems.new.length === 0) { + jQuery('#bulk-button-new').prop('disabled', true); + jQuery('#bulk-button-new').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_PLANS_AT_THIS_TIME')); + jQuery('#bulk-notice-new').show(); + } + // check if there is diverged items + if (bulkItems.diverged.length === 0) { + jQuery('#bulk-button-diverged').prop('disabled', true); + jQuery('#bulk-button-diverged').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_DIVERGED_PLANS_AT_THIS_TIME')); + jQuery('#bulk-notice-diverged').show(); + } + // check if there is ahead items + if (bulkItems.ahead.length === 0) { + jQuery('#bulk-button-ahead').prop('disabled', true); + jQuery('#bulk-button-ahead').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_AHEAD_PLANS_AT_THIS_TIME')); + jQuery('#bulk-notice-ahead').show(); + } + // check if there is behind items + if (bulkItems.behind.length === 0) { + jQuery('#bulk-button-behind').prop('disabled', true); + jQuery('#bulk-button-behind').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_PLANS_AT_THIS_TIME')); + jQuery('#bulk-notice-behind').show(); + } + // check if all we should close the all button + if (bulkItems.behind.length === 0 && bulkItems.new.length === 0 && bulkItems.ahead.length === 0 && bulkItems.diverged.length === 0) { + jQuery('#bulk-button-all').prop('disabled', true); + jQuery('#bulk-button-all').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_PLANS_TO_UPDATE_AT_THIS_TIME')); + jQuery('#bulk-notice-all').show(); + } +} + +// do a bulk update +function bulkPlanGithub(status) { + // if all then trigger those with values + if ('all' === status) { + bulkPlanGithub('behind'); + bulkPlanGithub('new'); + bulkPlanGithub('ahead'); + bulkPlanGithub('diverged'); + } else if (bulkItems[status].length > 0) { + jQuery.each(bulkItems[status], function(i, key){ + setTimeout(function(){ + doBulkUpdate_server(key, status).done(function(result) { + if (result.message) { + // only show errors + if ('error' === result.status || 'warning' === result.status) { + UIkit.notify(result.message, {status: result.status}); + } + // update local items + if ('success' === result.status) { + // get key ID + var keyID = getKeyID(key); + // update plan if we can + updatePlanDisplay(keyID, 'equal'); + } + } else { + UIkit.notify(Joomla.JText._('COM_COMPONENTBUILDER_PLAN_COULD_NOT_BE_UPDATEDSAVED'), {status:'danger'}); + } + }); + }, 200); + }); + // reset array + bulkItems[status].length = 0; + // update the buttons (since we only do the bulk update once) + checkBulkPlanGithub(); + } +} + +function doBulkUpdate_server(path, status) { + // set the ajax scope + ajaxcall = null; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.setPlanGithub&format=json&raw=true"); + if (token.length > 0 && path.length > 0 && status.length > 0) { + var request = token+'=1&path='+path+'&status='+status; + } + return jQuery.ajax({ + type: 'POST', + url: getUrl, + dataType: 'json', + data: request, + jsonp: false + }); +} + +// set the plan from gitHub +function setPlanGithub(key, status) { + var message = getConfirmUpdate(status); + UIkit.modal.confirm(message, function(){ + // will be executed on confirm. + setPlanGithub_server(key, status).done(function(result) { + if (result.message) { + UIkit.notify(result.message, {status: result.status}); + if ('success' === result.status) { + // get key ID + var keyID = getKeyID(key); + // update plan if we can + updatePlanDisplay(keyID, 'equal'); + } + } else { + UIkit.notify(Joomla.JText._('COM_COMPONENTBUILDER_PLAN_COULD_NOT_BE_UPDATEDSAVED'), {status:'danger'}); + } + }); + }); +} + +function setPlanGithub_server(path, status) { + // set the ajax scope + ajaxcall = null; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.setPlanGithub&format=json&raw=true"); + if (token.length > 0 && path.length > 0 && status.length > 0) { + var request = token+'=1&path='+path+'&status='+status; + } + return jQuery.ajax({ + type: 'POST', + url: getUrl, + dataType: 'json', + data: request, + jsonp: false + }); +} + +// update the plan display +function updatePlanDisplay(keyID, status) { + // update badge + jQuery('#'+keyID+'-badge').html(' ' +status); + jQuery('#'+keyID+'-badge').attr('href' , '#'+status+'-meaning'); + // update button + if ('equal' === status) { + // update notice + jQuery('#'+keyID+'-getbutton').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION')); + jQuery('#'+keyID+'-getbutton').prop('disabled', true); + jQuery('#'+keyID+'-getbutton').html(' ' + Joomla.JText._('COM_COMPONENTBUILDER_LOCAL_PLAN')); + // counter delay just incase + setTimeout(function(){ + jQuery('#'+keyID+'-getbutton').prop('disabled', true); + }, 2000); + } + // update the data filter + jQuery('#'+keyID+'-panel').attr('data-uk-filter', status); + // tell the grid to update + jQuery('#plans-grid').trigger('display.uk.check'); +} + +// set the modal +function getPlanModal(key, type) { + // set the ajax scope + ajaxcall = 'plans'; + var _plan = jQuery.jStorage.get(key, null); + if (_plan) { + // show modal + showPlanModal(_plan, type); + } else { + jQuery.get('https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Plans/master/'+key) + .success(function(plan) { + // convert the string to json.object + plan = jQuery.parseJSON(plan); + jQuery.jStorage.set(key, plan, {TTL: expire}); + // show modal + showPlanModal(plan, type); + }) + .error(function(jqXHR, textStatus, errorThrown) { + // we could do more + }); + } +} + +// show the modal +function showPlanModal(plan, type) { + var html = '
'; + html += ''; + html += '

' + plan.category + ' - (' + plan.type + ') ' + plan.name + '

'; + if ('contributor' === type) { + html += '
'; + html += '
'+Joomla.JText._('COM_COMPONENTBUILDER_COMPANY_NAME')+'
'; + html += '
'+plan.contributor_company+'
'; + html += '
'+Joomla.JText._('COM_COMPONENTBUILDER_AUTHOR_NAME')+'
'; + html += '
'+plan.contributor_name+'
'; + html += '
'+Joomla.JText._('COM_COMPONENTBUILDER_AUTHOR_EMAIL')+'
'; + html += '
'+plan.contributor_email+'
'; + html += '
'+Joomla.JText._('COM_COMPONENTBUILDER_AUTHOR_WEBSITE')+'
'; + html += '
'+plan.contributor_website+'
'; + html += '
'; + } else { + html += '
'; + } + html += '
C: ' + plan.created + ' | M: ' + plan.modified + ''; + html += '
'; + // get current page position + var scroll = jQuery(window).scrollTop(); + // add html to modal + var modal = UIkit.modal.blockUI(html, {center:true, bgclose:true}).on({ + 'hide.uk.modal': function(){ + // scroll fix since the modal pops to the top of the page + jQuery(window).scrollTop(scroll); + } + }); + // show modal + modal.show(); +} + +// get key ID +function getKeyID(key) { + // get useful ID + var keyID = key.replace('-', ''); + keyID = keyID.replace('.json', ''); + keyID = keyID.replace(/\s+/ig, '-'); + keyID = keyID.replace(/\(/g, ''); + keyID = keyID.replace(/\)/g, ''); + // return the id build + return keyID; +} + +// get key ID +function getKeyID(key) { + // get useful ID + var keyID = key.replace('-', ''); + keyID = keyID.replace('.json', ''); + keyID = keyID.replace(/\s+/ig, '-'); + keyID = keyID.replace(/\(/g, ''); + keyID = keyID.replace(/\)/g, ''); + // return the id build + return keyID; +} diff --git a/admin/controllers/assistant.php b/admin/controllers/assistant.php new file mode 100644 index 000000000..01f208b39 --- /dev/null +++ b/admin/controllers/assistant.php @@ -0,0 +1,30 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder Assistant Controller + */ +class ComponentbuilderControllerAssistant extends JControllerLegacy +{ + public function __construct($config) + { + parent::__construct($config); + } + + public function dashboard() + { + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder', false)); + return; + } +} diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 48d4122f8..828a7c244 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -5707,6 +5707,11 @@ abstract class ComponentbuilderHelper $user = JFactory::getUser(); // load the submenus to sidebar JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_DASHBOARD'), 'index.php?option=com_componentbuilder&view=componentbuilder', $submenu === 'componentbuilder'); + // Access control (assistant.submenu). + if ($user->authorise('assistant.submenu', 'com_componentbuilder')) + { + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_ASSISTANT'), 'index.php?option=com_componentbuilder&view=assistant', $submenu === 'assistant'); + } // Access control (compiler.submenu). if ($user->authorise('compiler.submenu', 'com_componentbuilder')) { diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index d3cd3e44e..b653b2a72 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -7,6 +7,7 @@ COM_COMPONENTBUILDER_ACCESS="Access" COM_COMPONENTBUILDER_ACCESS_BULK_TOOLS="Access Bulk Tools" COM_COMPONENTBUILDER_ACCESS_DENIED="Access denied!" COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)" +COM_COMPONENTBUILDER_ADD="Add" COM_COMPONENTBUILDER_ADD_ACCESS="Add Access" COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING="Add corresponding line numbers to the dynamic comments, so to see where in the compiler the lines of code was build. This will help if you need to get more technical with an issue on github, or even for your own debugging." COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders" @@ -1364,6 +1365,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_YOUTUBE="Youtube" COM_COMPONENTBUILDER_ADMIN_VIEW_ZOOM_IN="Zoom In" COM_COMPONENTBUILDER_ADMIN_VIEW_ZOOM_OUT="Zoom Out" COM_COMPONENTBUILDER_AHEAD="Ahead" +COM_COMPONENTBUILDER_AHEAD_MEANS_YOUR_BLOCAL_PLANB_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_HAS_A_BNEWER_MODIFIED_DATEB_THEN_THE_COMMUNITY_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE="Ahead means your local plan (with the same name, category and type) has a newer modified date then the community plan (with the same name, category and type)." COM_COMPONENTBUILDER_AHEAD_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BNEWER_MODIFIED_DATEB_THEN_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE="Ahead means your local snippet (with the same name, library and type) has a newer modified date then the community snippet (with the same name, library and type)." COM_COMPONENTBUILDER_AJAX="Ajax" COM_COMPONENTBUILDER_ALIAS="Alias" @@ -1385,11 +1387,20 @@ COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_CONTINUE="Are you sure you w COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_REPLACE_YOUR_LOCAL_SNIPPET_WITH_THIS_JCB_COMMUNITY_SNIPPET="Are you sure you would like to replace your local snippet with this JCB community snippet?" COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_UPDATE_YOUR_LOCAL_SNIPPET_WITH_THIS_NEWER_JCB_COMMUNITY_SNIPPET="Are you sure you would like to update your local snippet with this newer JCB community snippet?" COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_UPDATE_YOUR_LOCAL_SNIPPET_WITH_THIS_OLDER_JCB_COMMUNITY_SNIPPET="Are you sure you would like to update your local snippet with this older JCB community snippet?" +COM_COMPONENTBUILDER_ASSISTANT="Assistant" +COM_COMPONENTBUILDER_ASSISTANT_ACCESS="Assistant Access" +COM_COMPONENTBUILDER_ASSISTANT_ACCESS_DESC="Allows the users in this group to access assistant." +COM_COMPONENTBUILDER_ASSISTANT_DASHBOARD_LIST="Assistant Dashboard List" +COM_COMPONENTBUILDER_ASSISTANT_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Assistant" +COM_COMPONENTBUILDER_ASSISTANT_DESC="The Assistant" +COM_COMPONENTBUILDER_ASSISTANT_SUBMENU="Assistant Submenu" +COM_COMPONENTBUILDER_ASSISTANT_SUBMENU_DESC="Allows the users in this group to submenu of Assistant" COM_COMPONENTBUILDER_AUTHOR="Author" COM_COMPONENTBUILDER_AUTHOR_EMAIL="Author Email" COM_COMPONENTBUILDER_AUTHOR_NAME="Author Name" COM_COMPONENTBUILDER_AUTHOR_WEBSITE="Author Website" COM_COMPONENTBUILDER_AUTO_CHECKIN="Auto Check-in" +COM_COMPONENTBUILDER_AVAILABLE_CATEGORIES="Available Categories" COM_COMPONENTBUILDER_AVAILABLE_LIBRARIES="Available Libraries" COM_COMPONENTBUILDER_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading" COM_COMPONENTBUILDER_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading" @@ -1399,6 +1410,7 @@ COM_COMPONENTBUILDER_BACKUP="Backup" COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="Backup failed, please try again. If the error continue, please contact your system administrator." COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST="Backup Local Data First" COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully" +COM_COMPONENTBUILDER_BACK_TO_CATEGORIES="Back to Categories" COM_COMPONENTBUILDER_BACK_TO_LIBRARIES="Back to Libraries" COM_COMPONENTBUILDER_BADMIN_FIELDS_RELATIONSB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_NOT_UPDATED_IN_THE_CUSTOM_CODE="Admin fields relations id:%s mismatch in field:%s, and was not updated in the custom code." COM_COMPONENTBUILDER_BASIC_TUTORIAL_ON_GIT_BSB="Basic Tutorial on git: %s" @@ -1406,6 +1418,7 @@ COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_WE_COULD_NOT_LOAD_THE_CHECKSUM_FOR COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_YOU_CAN_REFRESH_AND_TRY_AGAINBR_BUT_NOTE_THAT_THIS_PACKAGE_BFAILEDB_CHECKSUM_VALIDATION_THIS_COULD_BE_A_SERIOUS_SECURITY_BREACH_DO_NOT_CONTINUE="Best to not continue!
You can Refresh and try again.
But note that this package FAILED checksum validation, this could be a serious security breach! DO NOT CONTINUE!!!" COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVED_TO_CORRECT_LOCATION="Custom files not moved to correct location!" COM_COMPONENTBUILDER_BEHIND="Behind" +COM_COMPONENTBUILDER_BEHIND_MEANS_YOUR_BLOCAL_PLANB_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_HAS_A_BOLDER_MODIFIED_DATEB_THEN_THE_COMMUNITY_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE="Behind means your local plan (with the same name, category and type) has a older modified date then the community plan (with the same name, category and type)." COM_COMPONENTBUILDER_BEHIND_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BOLDER_MODIFIED_DATEB_THEN_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE="Behind means your local snippet (with the same name, library and type) has a older modified date then the community snippet (with the same name, library and type)." COM_COMPONENTBUILDER_BETA_RELEASE="Beta Release" COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE="Be cautious! Do not continue unless you trust the origin of this package!" @@ -1424,16 +1437,23 @@ COM_COMPONENTBUILDER_BSB_WAS_FOUND="%s was found!" COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB="The expansion was successfully! to see more information change the Return Options for Build to Display Message in the global options of JCB under the Development Method tab." COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEAR_SUCCESSFULLYB="The tmp folder has been clear successfully!" COM_COMPONENTBUILDER_BUILD="Build" +COM_COMPONENTBUILDER_BUILDER="Builder" COM_COMPONENTBUILDER_BUILDIN="Build-in" COM_COMPONENTBUILDER_BULK="Bulk" +COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_PLANS="Bulk Get All New Plans" COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_SNIPPETS="Bulk Get All New Snippets" COM_COMPONENTBUILDER_BULK_TOOLS="Bulk Tools" +COM_COMPONENTBUILDER_BULK_UPDATE_ALL_AHEAD_PLANS="Bulk Update All Ahead Plans" COM_COMPONENTBUILDER_BULK_UPDATE_ALL_AHEAD_SNIPPETS="Bulk Update All Ahead Snippets" +COM_COMPONENTBUILDER_BULK_UPDATE_ALL_AVAILABLE_PLANS="Bulk Update All Available Plans" COM_COMPONENTBUILDER_BULK_UPDATE_ALL_AVAILABLE_SNIPPETS="Bulk Update All Available Snippets" +COM_COMPONENTBUILDER_BULK_UPDATE_ALL_DIVERGED_PLANS="Bulk Update All Diverged Plans" COM_COMPONENTBUILDER_BULK_UPDATE_ALL_DIVERGED_SNIPPETS="Bulk Update All Diverged Snippets" +COM_COMPONENTBUILDER_BULK_UPDATE_ALL_OUT_DATED_PLANS="Bulk Update All Out Dated Plans" COM_COMPONENTBUILDER_BULK_UPDATE_ALL_OUT_DATED_SNIPPETS="Bulk Update All Out Dated Snippets" 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_CANCEL="Cancel" +COM_COMPONENTBUILDER_CATEGORIES="Categories" 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." COM_COMPONENTBUILDER_CLASS_EXTENDINGS="Class Extendings" @@ -1752,6 +1772,7 @@ COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to su COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS="Compiler Translate Button Access" COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_DESC="Allows the users in this group to access the translate button." COM_COMPONENTBUILDER_COMPILE_COMPONENT="Compile Component" +COM_COMPONENTBUILDER_COMPONENT="Component" COM_COMPONENTBUILDER_COMPONENTS="Components" COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS="Components Admin Views" COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS="Components Admin Views Access" @@ -2894,6 +2915,7 @@ COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_SAVE_WARNING="Alias already existed so COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_STATUS="Status" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_VERSION_DESC="A count of the number of times this Component Dashboard has been revised." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_VERSION_LABEL="Version" +COM_COMPONENTBUILDER_COMPONENT_DETAILS="Component Details" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS="Component Files & Folders" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILES="Addfiles" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILESFULLPATH="Addfilesfullpath" @@ -4345,6 +4367,7 @@ COM_COMPONENTBUILDER_DASHBOARD="Component Builder Dashboard" COM_COMPONENTBUILDER_DASHBOARD_ADD_RECORD="Dashboard (add record)" COM_COMPONENTBUILDER_DASHBOARD_ADMIN_VIEWS="Admin Views

" COM_COMPONENTBUILDER_DASHBOARD_ADMIN_VIEW_ADD="Add Admin View

" +COM_COMPONENTBUILDER_DASHBOARD_ASSISTANT="Assistant

" COM_COMPONENTBUILDER_DASHBOARD_COMPILER="Compiler

" COM_COMPONENTBUILDER_DASHBOARD_CUSTOM_ADMIN_VIEWS="Custom Admin Views

" COM_COMPONENTBUILDER_DASHBOARD_CUSTOM_ADMIN_VIEW_ADD="Add Custom Admin View

" @@ -4382,7 +4405,9 @@ COM_COMPONENTBUILDER_DEFAULT_VIEW="Default View" COM_COMPONENTBUILDER_DESCRIPTION="Description" COM_COMPONENTBUILDER_DETAILS="Details" COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE_OF_THE_FIELD_IN_MENU_AND_GLOBAL_CONFIGURATION_OPTIONS_SO_THE_CONFIG_OPTION_WILL_ONLY_ADD_THE_FIELD_TO_THE_GLOBAL_CONFIGURATION_AREA_MENU_WILL_ADD_THE_FIELD_ONLY_TO_THE_MENU_AREA="Display switch for dynamic placement in relation to the use of the field in menu and global configuration options. So the (config) option will only add the field to the global configuration area, (menu) will add the field only to the menu area." +COM_COMPONENTBUILDER_DISPLAY_VIEW="Display View" COM_COMPONENTBUILDER_DIVERGED="Diverged" +COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_PLANB_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your local plan (with the same name, category and type) has a diverged from the community plan (with the same name, category and type) in that it does not have the same creation or modified date." COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your local snippet (with the same name, library and type) has a diverged from the community snippet (with the same name, library and type) in that it does not have the same creation or modified date." COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install." COM_COMPONENTBUILDER_DOWNLOAD="download" @@ -4737,6 +4762,7 @@ COM_COMPONENTBUILDER_EMLICENSEEM_BSB="License: %s" COM_COMPONENTBUILDER_EMOWNEREM_BSB="Owner: %s" COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="Website: %s" COM_COMPONENTBUILDER_EQUAL="Equal" +COM_COMPONENTBUILDER_EQUAL_MEANS_THAT_THE_COMMUNITY_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_AND_YOUR_LOCAL_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_HAS_THE_SAME_BCREATIONB_AND_BMODIFIED_DATEB="Equal means that the community plan (with the same name, category and type) and your local plan (with the same name, category and type) has the same creation and modified date." COM_COMPONENTBUILDER_EQUAL_MEANS_THAT_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_AND_YOUR_LOCAL_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_THE_SAME_BCREATIONB_AND_BMODIFIED_DATEB="Equal means that the community snippet (with the same name, library and type) and your local snippet (with the same name, library and type) has the same creation and modified date." COM_COMPONENTBUILDER_ERROR="Error" COM_COMPONENTBUILDER_ERROR_THE_PATH_HAS_A_MISMATCH_AND_COULD_THEREFORE_NOT_RETRIEVE_THE_SNIPPET_FROM_GITHUB="Error! The path has a mismatch and could therefore not retrieve the snippet from gitHub!" @@ -5263,13 +5289,16 @@ COM_COMPONENTBUILDER_FREEOPEN="Free/Open" COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab" COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Function name already taken, please try again." COM_COMPONENTBUILDER_GENERAL_OVERVIEW_OF_HOW_THINGS_WORK_BSB="General overview of how things work: %s" +COM_COMPONENTBUILDER_GETTING_AVAILABLE_CATEGORIES="Getting available categories" COM_COMPONENTBUILDER_GETTING_AVAILABLE_LIBRARIES="Getting available libraries" COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_FAILED_IF_THE_ISSUE_CONTINUES_INFORM_YOUR_SYSTEM_ADMINISTRATOR="Getting joomla_plugin boilerplate failed, if the issue continues, inform your system administrator!" COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_WAS_SUCCESSFULLY="Getting joomla_plugin boilerplate was successfully!" +COM_COMPONENTBUILDER_GET_ALL_NEW_PLANS="Get All New Plans" COM_COMPONENTBUILDER_GET_ALL_NEW_SNIPPETS="Get All New Snippets" COM_COMPONENTBUILDER_GET_AN_ACCOUNT_WITH_GITHUB_BSB="Get an Account with gitHub: %s" COM_COMPONENTBUILDER_GET_BOILERPLATE="Get Boilerplate" COM_COMPONENTBUILDER_GET_PACKAGE="Get Package" +COM_COMPONENTBUILDER_GET_PLAN="Get plan" COM_COMPONENTBUILDER_GET_SNIPPET="Get snippet" COM_COMPONENTBUILDER_GET_SNIPPETS="Get Snippets" COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access" @@ -5291,6 +5320,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU="Get Snippets Submenu" COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC="Allows the users in this group to submenu of Get Snippets" COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS="Get Snippets Templates Button Access" COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC="Allows the users in this group to access the templates button." +COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_INSTALL_IT_LOCALLY="Get the plan from gitHub and install it locally" +COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION="Get the plan from gitHub and update the local version" COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_INSTALL_IT_LOCALLY="Get the snippet from gitHub and install it locally" COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION="Get the snippet from gitHub and update the local version" COM_COMPONENTBUILDER_GLOBAL="Global" @@ -5489,6 +5520,7 @@ COM_COMPONENTBUILDER_IS_ONLY_FOUR_LISTRADIOCHECKBOXES="Is (only 4 list/radio/che COM_COMPONENTBUILDER_IWEBSITEI_BSB="Website: %s" COM_COMPONENTBUILDER_JCB_COMMUNITY="JCB Community" COM_COMPONENTBUILDER_JCB_COMMUNITY_PACKAGES="JCB Community Packages" +COM_COMPONENTBUILDER_JCB_COMMUNITY_PLANS="JCB Community Plans" COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS="JCB Community Snippets" COM_COMPONENTBUILDER_JCB_PACKAGE_IMPORT="JCB Package Import" COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_CONTINUEB_WITH_THE_IMPORT_OF_THE_SELECTED_PACKAGE="JCB Package info path does not work, we advice you not to continue with the import of the selected package!" @@ -7010,6 +7042,7 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_VERSION_DESC="A count of the number of times COM_COMPONENTBUILDER_JOOMLA_PLUGIN_VERSION_LABEL="Version" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_YES="Yes" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ZIP="ZIP" +COM_COMPONENTBUILDER_JUST_GET_ALL_PLANS="Just Get All Plans" COM_COMPONENTBUILDER_JUST_GET_ALL_SNIPPETS="Just Get All Snippets" COM_COMPONENTBUILDER_KEEP_HISTORY="Keep History" COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS="- Keep Original Access -" @@ -7688,9 +7721,11 @@ COM_COMPONENTBUILDER_LINK_LOCAL_DYNAMIC="Link & Local (dynamic)" COM_COMPONENTBUILDER_LINK_TO_THE_CONTRIBUTOR="Link to the contributor" COM_COMPONENTBUILDER_LIST_FIELD="List Field" COM_COMPONENTBUILDER_LIST_VIEW="List View" +COM_COMPONENTBUILDER_LIST_VIEW_NAME="List View Name" COM_COMPONENTBUILDER_LOADING="loading" COM_COMPONENTBUILDER_LOCAL="Local" COM_COMPONENTBUILDER_LOCAL_GET="Local (get)" +COM_COMPONENTBUILDER_LOCAL_PLAN="Local plan" COM_COMPONENTBUILDER_LOCAL_SNIPPET="Local snippet" COM_COMPONENTBUILDER_MAIN_MENU="Main Menu" COM_COMPONENTBUILDER_MATCH_BEHAVIOUR="Match Behaviour" @@ -7703,6 +7738,7 @@ COM_COMPONENTBUILDER_MINIFY_JAVASCRIPT="Minify JavaScript" COM_COMPONENTBUILDER_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_field)" COM_COMPONENTBUILDER_MODEL_AFTER_MODELLING="Model (after modelling)" COM_COMPONENTBUILDER_MODEL_BEFORE_MODELLING="Model (before modelling)" +COM_COMPONENTBUILDER_MOVE="Move" COM_COMPONENTBUILDER_NAME="Name" COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)" COM_COMPONENTBUILDER_NAME_DESC="Name (Desc)" @@ -7710,6 +7746,7 @@ COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET="Name of dynamicGet" COM_COMPONENTBUILDER_NEED_HELP="Need help?" COM_COMPONENTBUILDER_NEW="New" COM_COMPONENTBUILDER_NEW_ISSUE="New Issue" +COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_AND_SO_HAVE_MARKED_THIS_PLAN_AS_NEW="New means that we could not find a local plan with the same name, category and type, and so have marked this plan as new." COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_AND_SO_HAVE_MARKED_THIS_SNIPPET_AS_NEW="New means that we could not find a local snippet with the same name, library and type, and so have marked this snippet as new." COM_COMPONENTBUILDER_NEW_NOTICE="New Notice" COM_COMPONENTBUILDER_NO="No" @@ -7750,6 +7787,7 @@ COM_COMPONENTBUILDER_ON_GITHUB="on Github" COM_COMPONENTBUILDER_OPEN="Open" COM_COMPONENTBUILDER_OPENED="opened" COM_COMPONENTBUILDER_OPENED_THIS="opened this" +COM_COMPONENTBUILDER_OPEN_CATEGORY_PLANS="Open Category Plans" COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS="Open Library Snippets" COM_COMPONENTBUILDER_OPEN_ON_GITHUB="Open on Github" COM_COMPONENTBUILDER_OPTIONS="Options" @@ -7757,6 +7795,7 @@ COM_COMPONENTBUILDER_ORDER_BEFORE="Order Before" COM_COMPONENTBUILDER_ORDER_IN_EDIT="Order in Edit" COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views" COM_COMPONENTBUILDER_OUT_OF_DATE="Out of Date" +COM_COMPONENTBUILDER_OVERVIEW="Overview" COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set" COM_COMPONENTBUILDER_OWNER_S="Owner: %s" COM_COMPONENTBUILDER_PACKAGE="Package" @@ -7877,6 +7916,10 @@ COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_MESSAGE="Error! Please add some set targe COM_COMPONENTBUILDER_PLACEHOLDER_VERSION_DESC="A count of the number of times this Placeholder has been revised." COM_COMPONENTBUILDER_PLACEHOLDER_VERSION_LABEL="Version" COM_COMPONENTBUILDER_PLACES_ACROSS_JCB_WHERE_THIS_S_IS_LINKED="Places across JCB where this %s is linked." +COM_COMPONENTBUILDER_PLAN="Plan" +COM_COMPONENTBUILDER_PLANS="Plans" +COM_COMPONENTBUILDER_PLANS_COULD_NOT_BE_UPDATEDSAVED="Plans could not be updated/saved" +COM_COMPONENTBUILDER_PLAN_COULD_NOT_BE_UPDATEDSAVED="Plan could not be updated/saved" COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S="Please add files to (%s)" COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S="Please add folders to (%s)" COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER="Please check again latter." @@ -7897,12 +7940,14 @@ COM_COMPONENTBUILDER_PUBLISHING="Publishing" COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component" COM_COMPONENTBUILDER_REFRESH="Refresh" COM_COMPONENTBUILDER_RELEASED_THIS="released this" +COM_COMPONENTBUILDER_REMOVE="Remove" COM_COMPONENTBUILDER_RENAME="Rename" COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: %s" COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST="Requires the value entered be one of the options in an element of type="list": that is, that the element is a select list." COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_A_TELEPHONE_NUMBER_COMPLYING_WITH_THE_STANDARDS_OF_NANPA_ITUT_TRECEONE_HUNDRED_AND_SIXTY_FOUR_OR_IETF_RFCFOUR_THOUSAND_NINE_HUNDRED_AND_THIRTY_THREE="Requires the value to be a Telephone number complying with the standards of nanpa, ITU-T T-REC-E.164 or ietf rfc4933." COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_THE_SAME_AS_THAT_HELD_IN_THE_FIELD_NAMED_QUOTFIELDQUOT_EGS="Requires the value to be the same as that held in the field named "field", eg:%s" COM_COMPONENTBUILDER_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github" +COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_PLANS="Revert All Ahead Plans" COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_SNIPPETS="Revert All Ahead Snippets" COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github" COM_COMPONENTBUILDER_RIGHT_IN_TAB="Right in Tab" @@ -8744,6 +8789,7 @@ COM_COMPONENTBUILDER_SNIPPET_VERSION_DESC="A count of the number of times this S COM_COMPONENTBUILDER_SNIPPET_VERSION_LABEL="Version" COM_COMPONENTBUILDER_SOME_BCUSTOM_FILESB_WERE_MOVED_TO_BSB="Some Custom files were moved to %s" COM_COMPONENTBUILDER_SOME_BIMAGESB_WERE_MOVED_TO_BSB="Some Images were moved to %s" +COM_COMPONENTBUILDER_SOON_AS_YOU_HAVE_SITE_VIEWS_SET_THIS_AREA_WILL_UPDATE_TO_SHOW_AN_OVERVIEW="Soon as you have site views set, this area will update to show an overview." COM_COMPONENTBUILDER_SORRY_THIS_FUNCTION_NAME_IS_ALREADY_IN_USE="Sorry this function name is already in use!" COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE="Sorry this placeholder is already in use!" COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE_IN_THE_COMPILER="Sorry this placeholder is already in use in the compiler!" @@ -8752,6 +8798,7 @@ COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_IN_YOUR_SYS COM_COMPONENTBUILDER_SORTABLE="Sortable" COM_COMPONENTBUILDER_SUBMENU="Submenu" COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS="Admin Views" +COM_COMPONENTBUILDER_SUBMENU_ASSISTANT="Assistant" COM_COMPONENTBUILDER_SUBMENU_COMPILER="Compiler" COM_COMPONENTBUILDER_SUBMENU_CUSTOM_ADMIN_VIEWS="Custom Admin Views" COM_COMPONENTBUILDER_SUBMENU_CUSTOM_CODES="Custom Codes" @@ -8906,10 +8953,15 @@ COM_COMPONENTBUILDER_TEMPLATE_VERSION_LABEL="Version" COM_COMPONENTBUILDER_TEMPLATE_YES="Yes" COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." +COM_COMPONENTBUILDER_THERE_ARE_NO_AHEAD_PLANS_AT_THIS_TIME="There are no ahead plans at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_AHEAD_SNIPPETS_AT_THIS_TIME="There are no ahead snippets at this time" +COM_COMPONENTBUILDER_THERE_ARE_NO_DIVERGED_PLANS_AT_THIS_TIME="There are no diverged plans at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_DIVERGED_SNIPPETS_AT_THIS_TIME="There are no diverged snippets at this time" +COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_PLANS_AT_THIS_TIME="There are no new plans at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_SNIPPETS_AT_THIS_TIME="There are no new snippets at this time" +COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_PLANS_AT_THIS_TIME="There are no out of date plans at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_SNIPPETS_AT_THIS_TIME="There are no out of date snippets at this time" +COM_COMPONENTBUILDER_THERE_ARE_NO_PLANS_TO_UPDATE_AT_THIS_TIME="There are no plans to update at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME="There are no snippets to update at this time" COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!" COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info." @@ -8963,6 +9015,7 @@ COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="T COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for %s server!" COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING="The pro board is loading" COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading" +COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_PLANS_ARE_CASE_SENSITIVE_SO_IF_YOU_CHANGED_THE_LOCAL_BNAMESB_OF_EITHER_OR_THE_BPLAN_CATEGORY_OR_PLAN_TYPESB_IN_ANY_SMALL_WAY_THE_SYSTEM_WILL_NOT_BE_ABLE_TO_CONNECT_YOUR_LOCAL_PLANS_WITH_THOSE_IN_THE_COMMUNITY_REPOSITORY_SO_WE_STRONGLY_ADVICE_TO_BKEEP_TO_THE_COMMUNITY_NAMINGB_TO_AVOID_MISMATCHING_THAT_WILL_IN_TURN_CAUSE_DUPLICATION_SO_IF_YOU_CHANGED_ANY_NAMES_JUST_CHANGE_THEM_BACK_AND_ALL_WILL_AGAIN_WORK_AS_EXPECTED="The search for the plans are case sensitive so if you changed the local names of either or the plan, category or plan types in any small way, the system will not be able to connect your local plans with those in the community repository. So we strongly advice to keep to the community naming to avoid mismatching, that will in turn cause duplication. So if you changed any names, just change them back and all will again work as expected." COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_SNIPPETS_ARE_CASE_SENSITIVE_SO_IF_YOU_CHANGED_THE_LOCAL_BNAMESB_OF_EITHER_OR_THE_BSNIPPET_LIBRARY_OR_SNIPPET_TYPESB_IN_ANY_SMALL_WAY_THE_SYSTEM_WILL_NOT_BE_ABLE_TO_CONNECT_YOUR_LOCAL_SNIPPETS_WITH_THOSE_IN_THE_COMMUNITY_REPOSITORY_SO_WE_STRONGLY_ADVICE_TO_BKEEP_TO_THE_COMMUNITY_NAMINGB_TO_AVOID_MISMATCHING_THAT_WILL_IN_TURN_CAUSE_DUPLICATION_SO_IF_YOU_CHANGED_ANY_NAMES_JUST_CHANGE_THEM_BACK_AND_ALL_WILL_AGAIN_WORK_AS_EXPECTED="The search for the snippets are case sensitive so if you changed the local names of either or the snippet, library or snippet types in any small way, the system will not be able to connect your local snippets with those in the community repository. So we strongly advice to keep to the community naming to avoid mismatching, that will in turn cause duplication. So if you changed any names, just change them back and all will again work as expected." COM_COMPONENTBUILDER_THE_SERVER_DETAILS_FOR_BID_SB_COULD_NOT_BE_RETRIEVED="The server details for (ID: %s) could not be retrieved!" COM_COMPONENTBUILDER_THE_SNIPPETS_WERE_SUCCESSFULLY_EXPORTED="The Snippets Were Successfully Exported!" @@ -9043,8 +9096,11 @@ COM_COMPONENTBUILDER_TYPE_TEMPLATE="Template" COM_COMPONENTBUILDER_TYPE_VALIDATION_RULE="Validation Rule" COM_COMPONENTBUILDER_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)" COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs" +COM_COMPONENTBUILDER_UNDER_DEVELOPMENT_TO_PROVIDE_PLAN_SHARING_OPTIONS_SIMILAR_TO_THE_JCB_SNIPPETS="Under development, to provide plan sharing options similar to the JCB snippets." COM_COMPONENTBUILDER_UPDATE="Update" +COM_COMPONENTBUILDER_UPDATE_ALL_DIVERGED_PLANS="Update All Diverged Plans" COM_COMPONENTBUILDER_UPDATE_ALL_DIVERGED_SNIPPETS="Update All Diverged Snippets" +COM_COMPONENTBUILDER_UPDATE_ALL_OUT_DATED_PLANS="Update All Out Dated Plans" COM_COMPONENTBUILDER_UPDATE_ALL_OUT_DATED_SNIPPETS="Update All Out Dated Snippets" COM_COMPONENTBUILDER_UP_TO_DATE="Up to date" COM_COMPONENTBUILDER_USAGE="Usage" @@ -9146,19 +9202,26 @@ COM_COMPONENTBUILDER_VERSION="Version" COM_COMPONENTBUILDER_VIEW="View" COM_COMPONENTBUILDER_VIEWS="Views" COM_COMPONENTBUILDER_VIEW_BLAME="View Blame" +COM_COMPONENTBUILDER_VIEW_BUILDER="View Builder" COM_COMPONENTBUILDER_VIEW_DESCRIPTION_OF_COMMUNITY_VERSION="View Description of community version" COM_COMPONENTBUILDER_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github" COM_COMPONENTBUILDER_VIEW_MORE_RELEASES_ON_GITHUB="View more releases on Github" +COM_COMPONENTBUILDER_VIEW_NAME="View Name" +COM_COMPONENTBUILDER_VIEW_PLAN_OF_COMMUNITY_VERSION="View Plan of community version" +COM_COMPONENTBUILDER_VIEW_PLAN_REFERENCE_URL="View Plan Reference URL" COM_COMPONENTBUILDER_VIEW_SNIPPET_OF_COMMUNITY_VERSION="View Snippet of community version" COM_COMPONENTBUILDER_VIEW_SNIPPET_REFERENCE_URL="View Snippet Reference URL" COM_COMPONENTBUILDER_VIEW_THE_CONTRIBUTOR_DETAILS="View the contributor details" COM_COMPONENTBUILDER_VIEW_USAGE_OF_COMMUNITY_VERSION="View Usage of community version" +COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_PLAN="View who contributed to this plan" COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_SNIPPET="View who contributed to this snippet" COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAENINEKQFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE9kQFlvVXJTM3J2IXM=" COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAESFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE%sFlvVXJTM3J2IXM=" +COM_COMPONENTBUILDER_WATCH_THIS_SPACE="Watch this space!!!!" COM_COMPONENTBUILDER_WEBSITE="Website" COM_COMPONENTBUILDER_WEBSITE_OF_S="Website of %s" COM_COMPONENTBUILDER_WEBSITE_S="Website: %s" +COM_COMPONENTBUILDER_WE_DID_NOT_CHECK_THE_PLAN_IT_SELF_TO_SEE_IF_IT_CHANGED_WE_ONLY_WORK_ON_DATES="We did not check the plan it self, to see if it changed. We only work on dates." COM_COMPONENTBUILDER_WE_DID_NOT_CHECK_THE_SNIPPET_IT_SELF_TO_SEE_IF_IT_CHANGED_WE_ONLY_WORK_ON_DATES="We did not check the snippet it self, to see if it changed. We only work on dates." COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB="We failed to move %s!" COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB="We successfully moved %s!" diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini index e978432da..ce3e0a0d2 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -111,6 +111,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU="Admin Views Submenu" COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU_DESC="Allows the users in this group to submenu of admin view" COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS="Admin View Run Expansion Button Access" COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_ASSISTANT_ACCESS="Assistant Access" +COM_COMPONENTBUILDER_ASSISTANT_ACCESS_DESC="Allows the users in this group to access assistant." +COM_COMPONENTBUILDER_ASSISTANT_DASHBOARD_LIST="Assistant Dashboard List" +COM_COMPONENTBUILDER_ASSISTANT_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Assistant" +COM_COMPONENTBUILDER_ASSISTANT_SUBMENU="Assistant Submenu" +COM_COMPONENTBUILDER_ASSISTANT_SUBMENU_DESC="Allows the users in this group to submenu of Assistant" COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS="Class Extendings Access" COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS_DESC="Allows the users in this group to access access class extendings" COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_USE="Class Extendings Batch Use" @@ -942,6 +948,7 @@ COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS="Library Get Snippets Bu COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_MENU="✓ Component Builder" COM_COMPONENTBUILDER_MENU_ADMIN_VIEWS="Admin Views" +COM_COMPONENTBUILDER_MENU_ASSISTANT="Assistant" COM_COMPONENTBUILDER_MENU_COMPILER="Compiler" COM_COMPONENTBUILDER_MENU_CUSTOM_ADMIN_VIEWS="Custom Admin Views" COM_COMPONENTBUILDER_MENU_CUSTOM_CODES="Custom Codes" diff --git a/admin/layouts/assistantsubformrepeatable.php b/admin/layouts/assistantsubformrepeatable.php new file mode 100644 index 000000000..7012ac43e --- /dev/null +++ b/admin/layouts/assistantsubformrepeatable.php @@ -0,0 +1,98 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + +/** + * Make thing clear + * + * @var JForm $tmpl The Empty form for template + * @var array $forms Array of JForm instances for render the rows + * @var bool $multiple The multiple state for the form field + * @var int $min Count of minimum repeating in multiple mode + * @var int $max Count of maximum repeating in multiple mode + * @var string $fieldname The field name + * @var string $control The forms control + * @var string $label The field label + * @var string $description The field description + * @var array $buttons Array of the buttons that will be rendered + * @var bool $groupByFieldset Whether group the subform fields by it`s fieldset + */ +extract($displayData); + +// Add script +if ($multiple) +{ + JHtml::_('jquery.ui', array('core', 'sortable')); + JHtml::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true)); +} + +// the subform field layout +$subform_fields = array( + 'left' => array('name'), + 'right' => array('list_name'), + 'bottom' => array('builder') +); + +?> +
+
+
+ + +
+
+ + + +
+
+ + $form) : ?> + $form, + 'fields' => $subform_fields, + 'basegroup' => $fieldname, + 'group' => $fieldname . $k, + 'buttons' => $buttons, + 'unique_subform_id' => $unique_subform_id, + )); + ?> + + + + +
+
+
diff --git a/admin/layouts/assistantsubformsection.php b/admin/layouts/assistantsubformsection.php new file mode 100644 index 000000000..f68167c1f --- /dev/null +++ b/admin/layouts/assistantsubformsection.php @@ -0,0 +1,93 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + +/** + * Make thing clear + * + * @var JForm $form The form instance for render the section + * @var JForm $fields The fields in layout + * @var string $basegroup The base group name + * @var string $group Current group name + * @var array $buttons Array of the buttons that will be rendered + */ +extract($displayData); + +?> +
+ +
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + renderField($field); ?> + +
+
+
+ + + +
+ $_fields): ?> + +
+
+ + renderField($field); ?> + +
+
+ + +
+ + + +
+
+
+ + renderField($field); ?> + +
+
+
+ +
diff --git a/admin/layouts/jcbplansgui.php b/admin/layouts/jcbplansgui.php new file mode 100644 index 000000000..8706c79c1 --- /dev/null +++ b/admin/layouts/jcbplansgui.php @@ -0,0 +1,196 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + + + +?> + +
+


+


..

+
+ +
+

+
+ +
+



+

+

+

+
+
+
+



+

+

+

+
+
+
+



+

+

+

+
+
+
+



+

+

+

+
+
+
+



+

+

+

+
+
+ diff --git a/admin/models/assistant.php b/admin/models/assistant.php new file mode 100644 index 000000000..f2668540e --- /dev/null +++ b/admin/models/assistant.php @@ -0,0 +1,162 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder Assistant Model + */ +class ComponentbuilderModelAssistant extends JModelItem +{ + /** + * Model context string. + * + * @var string + */ + protected $_context = 'com_componentbuilder.assistant'; + + /** + * Model user data. + * + * @var strings + */ + protected $user; + protected $userId; + protected $guest; + protected $groups; + protected $levels; + protected $app; + protected $input; + protected $uikitComp; + + /** + * @var object item + */ + protected $item; + + /** + * Method to auto-populate the model state. + * + * Note. Calling getState in this method will result in recursion. + * + * @since 1.6 + * + * @return void + */ + protected function populateState() + { + $this->app = JFactory::getApplication(); + $this->input = $this->app->input; + // Get the item main id + $id = $this->input->getInt('id', null); + $this->setState('assistant.id', $id); + + // Load the parameters. + parent::populateState(); + } + + /** + * Method to get article data. + * + * @param integer $pk The id of the article. + * + * @return mixed Menu item data object on success, false on failure. + */ + public function getItem($pk = null) + { + $this->user = JFactory::getUser(); + // check if this user has permission to access item + if (!$this->user->authorise('assistant.access', 'com_componentbuilder')) + { + $app = JFactory::getApplication(); + $app->enqueueMessage(JText::_('Not authorised!'), 'error'); + // redirect away if not a correct to cPanel/default view + $app->redirect('index.php?option=com_componentbuilder'); + return false; + } + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; + + $pk = (!empty($pk)) ? $pk : (int) $this->getState('assistant.id'); + + if ($this->_item === null) + { + $this->_item = array(); + } + + if (!isset($this->_item[$pk])) + { + try + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Get data +return true; + + // Reset the query using our newly populated query object. + $db->setQuery($query); + // Load the results as a stdClass object. + $data = $db->loadObject(); + + if (empty($data)) + { + $app = JFactory::getApplication(); + // If no data is found redirect to default page and show warning. + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED'), 'warning'); + $app->redirect('index.php?option=com_componentbuilder'); + return false; + } + + // set data object to item. + $this->_item[$pk] = $data; + } + catch (Exception $e) + { + if ($e->getCode() == 404) + { + // Need to go thru the error handler to allow Redirect to work. + JError::raiseWaring(404, $e->getMessage()); + } + else + { + $this->setError($e); + $this->_item[$pk] = false; + } + } + } + + return $this->_item[$pk]; + } + + /** + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ + public function getUikitComp() + { + if (isset($this->uikitComp) && ComponentbuilderHelper::checkArray($this->uikitComp)) + { + return $this->uikitComp; + } + return false; + } +} diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index ebb896add..3bb8e981b 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -25,10 +25,12 @@ class ComponentbuilderModelComponentbuilder extends JModelList $icons = array(); // view groups array $viewGroups = array( - 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_documents') + 'main' => array('png.assistant', 'png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_documents') ); // view access array $viewAccess = array( + 'assistant.submenu' => 'assistant.submenu', + 'assistant.dashboard_list' => 'assistant.dashboard_list', 'compiler.submenu' => 'compiler.submenu', 'compiler.dashboard_list' => 'compiler.dashboard_list', 'get_snippets.submenu' => 'get_snippets.submenu', diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index dd1c43052..64ff03bbf 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -293,12 +293,13 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin */ public $assistantForm = array( 'left' => array( - 'guid', 'name', 'short_description', + 'guid', 'copyright' ), 'right' => array( + 'name_code', 'license', 'bom', 'image' diff --git a/admin/views/assistant/index.html b/admin/views/assistant/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/assistant/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/assistant/tmpl/default.php b/admin/views/assistant/tmpl/default.php new file mode 100644 index 000000000..819b13cfc --- /dev/null +++ b/admin/views/assistant/tmpl/default.php @@ -0,0 +1,133 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +$this->app->input->set('hidemainmenu', false); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +?> +canDo->get('assistant.access')): ?> + +item->id)) ? '&id='. (int) $this->item->id : ''; ?> +
+ + +
+ +sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +
+ 'jcb-assistant')); ?> + +
+
    +
  • loadTemplate('jcbcomponentplan'); ?>
  • +
  • loadTemplate('jcbviewsplan'); ?>
  • +
  • loadTemplate('jcbplanoverview'); ?>
  • +
+
    +
  • +
  • +
  • +
+
+
+
+ +
+ + +

+

+ + + +
+
+ + +

+ + diff --git a/admin/views/assistant/tmpl/default_jcbcomponentplan.php b/admin/views/assistant/tmpl/default_jcbcomponentplan.php new file mode 100644 index 000000000..a2fc8bce0 --- /dev/null +++ b/admin/views/assistant/tmpl/default_jcbcomponentplan.php @@ -0,0 +1,34 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the model +$model = ComponentbuilderHelper::getModel('joomla_component', JPATH_ADMINISTRATOR . '/components/com_componentbuilder'); +// get the form +$form = $model->getForm(array(), true, array('control' => 'jcbform')); +// get the form +$fields = $model->assistantForm; + +?> +

+
+ $fields): ?> +
+
+ + renderField($field); ?> + +
+
+ +
diff --git a/admin/views/assistant/tmpl/default_jcbplanoverview.php b/admin/views/assistant/tmpl/default_jcbplanoverview.php new file mode 100644 index 000000000..8ab55e417 --- /dev/null +++ b/admin/views/assistant/tmpl/default_jcbplanoverview.php @@ -0,0 +1,21 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> +

+
+ +
diff --git a/admin/views/assistant/tmpl/default_jcbviewsplan.php b/admin/views/assistant/tmpl/default_jcbviewsplan.php new file mode 100644 index 000000000..02f008e03 --- /dev/null +++ b/admin/views/assistant/tmpl/default_jcbviewsplan.php @@ -0,0 +1,131 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +function buildSubform() +{ + // get the subform + $subform = JFormHelper::loadFieldType('subform', true); + // make sure the layout is created + // JLayoutHelper::render('assistantsubformrepeatable', null); + // start building the subform field XML + $subformXML = new SimpleXMLElement(''); + // subform attributes + $subformAttribute = array( + 'type' => 'subform', + 'name' => 'views', + 'label' => 'COM_COMPONENTBUILDER_VIEW_BUILDER', + 'layout' => 'assistantsubformrepeatable', + 'multiple' => 'true', + 'icon' => 'list', + 'max' => 5, + 'min' => 1 + ); + // load the subform attributes + ComponentbuilderHelper::xmlAddAttributes($subformXML, $subformAttribute); + // now add the subform child form + $childForm = $subformXML->addChild('form'); + // child form attributes + $childFormAttribute = array( + 'hidden' => 'true', + 'name' => 'list_properties', + 'repeat' => 'true'); + // load the child form attributes + ComponentbuilderHelper::xmlAddAttributes($childForm, $childFormAttribute); + + // view building the name field XML + $nameXML = new SimpleXMLElement(''); + // subform attributes + $nameAttribute = array( + 'type' => 'text', + 'name' => 'name', + 'label' => 'COM_COMPONENTBUILDER_VIEW_NAME', + 'size' => '40', + 'maxlength' => '150', + 'class' => 'text_area', + 'hint' => 'COM_COMPONENTBUILDER_VIEW_NAME', + 'filter' => 'STRING' + ); + // load the subform attributes + ComponentbuilderHelper::xmlAddAttributes($nameXML, $nameAttribute); + // now add the fields to the child form + ComponentbuilderHelper::xmlAppend($childForm, $nameXML); + + // view building the list name field XML + $listnameXML = new SimpleXMLElement(''); + // subform attributes + $listnameAttribute = array( + 'type' => 'text', + 'name' => 'list_name', + 'label' => 'COM_COMPONENTBUILDER_LIST_VIEW_NAME', + 'size' => '40', + 'maxlength' => '150', + 'class' => 'text_area', + 'hint' => 'COM_COMPONENTBUILDER_LIST_VIEW_NAME', + 'filter' => 'STRING' + ); + // load the subform attributes + ComponentbuilderHelper::xmlAddAttributes($listnameXML, $listnameAttribute); + // now add the fields to the child form + ComponentbuilderHelper::xmlAppend($childForm, $listnameXML); + + // start building the builder area XML + $noteXML = new SimpleXMLElement(''); + // subform attributes + $noteAttribute = array( + 'type' => 'note', + 'name' => 'builder', + 'label' => 'COM_COMPONENTBUILDER_BUILDER', + 'description' => ' +

', + 'heading' => 'h5' + ); + // load the subform attributes + ComponentbuilderHelper::xmlAddAttributes($noteXML, $noteAttribute); + // now add the fields to the child form + ComponentbuilderHelper::xmlAppend($childForm, $noteXML); + + // setup subform with values + $subform->setup($subformXML, null, 'jcbform'); + + // return subfrom object + return $subform; +} +// get the subform +$subform = buildSubform(); + +?> +
+ label; ?> +
+
+ input; ?> +
+
+
+ +
loading..
+
+
+
+
+ diff --git a/admin/views/assistant/tmpl/index.html b/admin/views/assistant/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/assistant/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/assistant/view.html.php b/admin/views/assistant/view.html.php new file mode 100644 index 000000000..39dad28c3 --- /dev/null +++ b/admin/views/assistant/view.html.php @@ -0,0 +1,283 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder View class for the Assistant + */ +class ComponentbuilderViewAssistant extends JViewLegacy +{ + // Overwriting JView display method + function display($tpl = null) + { + // get component params + $this->params = JComponentHelper::getParams('com_componentbuilder'); + // get the application + $this->app = JFactory::getApplication(); + // get the user object + $this->user = JFactory::getUser(); + // get global action permissions + $this->canDo = ComponentbuilderHelper::getActions('assistant'); + // Initialise variables. + $this->item = $this->get('Item'); + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('builder'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=assistant'); + $this->sidebar = JHtmlSidebar::render(); + } + // get the forms + $this->forms = $this->setForms(); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + // add the tool bar + $this->addToolBar(); + } + + // set the document + $this->setDocument(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode(PHP_EOL, $errors), 500); + } + + parent::display($tpl); + } + + protected function setForms() + { + // get component form (just required fields) + + // get admin form (just required fields) + + // get field form (just required fields) + + } + + /** + * Prepares the document + */ + protected function setDocument() + { + + // always make sure jquery is loaded. + JHtml::_('jquery.framework'); + // Load the header checker class. + require_once( JPATH_COMPONENT_ADMINISTRATOR.'/helpers/headercheck.php' ); + // Initialize the header checker. + $HeaderCheck = new componentbuilderHeaderCheck; + + // Add View JavaScript File + $this->document->addScript(JURI::root(true) . "/administrator/components/com_componentbuilder/assets/js/assistant.js", (ComponentbuilderHelper::jVersion()->isCompatible("3.8.0")) ? array("version" => "auto") : "text/javascript"); + + // Load uikit options. + $uikit = $this->params->get('uikit_load'); + // Set script size. + $size = $this->params->get('uikit_min'); + // Set css style. + $style = $this->params->get('uikit_style'); + + // The uikit css. + if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) + { + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + } + // The uikit js. + if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) + { + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + } + + // Load the script to find all uikit components needed. + if ($uikit != 2) + { + // Set the default uikit components in this view. + $uikitComp = array(); + $uikitComp[] = 'UIkit.notify'; + $uikitComp[] = 'data-uk-grid'; + } + + // Load the needed uikit components in this view. + if ($uikit != 2 && isset($uikitComp) && ComponentbuilderHelper::checkArray($uikitComp)) + { + // load just in case. + jimport('joomla.filesystem.file'); + // loading... + foreach ($uikitComp as $class) + { + foreach (ComponentbuilderHelper::$uk_components[$class] as $name) + { + // check if the CSS file exists. + if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) + { + // load the css. + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + } + // check if the JavaScript file exists. + if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) + { + // load the js. + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + } + } + } + } + // add marked library + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/custom/marked.js"); + + // Add the JavaScript for JStore + $this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jquery.json.min.js'); + $this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jstorage.min.js'); + $this->document->addScript(JURI::root() .'media/com_componentbuilder/js/strtotime.js'); + // check if we should use browser storage + $setBrowserStorage = $this->params->get('set_browser_storage', null); + if ($setBrowserStorage) + { + // check what (Time To Live) show we use + $storageTimeToLive = $this->params->get('storage_time_to_live', 'global'); + if ('global' == $storageTimeToLive) + { + // use the global session time + $session = JFactory::getSession(); + // must have itin milliseconds + $expire = ($session->getExpire()*60)* 1000; + } + else + { + // use the Componentbuilder Global setting + if (0 != $storageTimeToLive) + { + // this will convert the time into milliseconds + $storageTimeToLive = $storageTimeToLive * 1000; + } + $expire = $storageTimeToLive; + } + } + else + { + // set to use no storage + $expire = 30000; // only 30 seconds + } + // Set the Time To Live To JavaScript + $this->document->addScriptDeclaration("var expire = ". (int) $expire.";"); + // set snippet path + $this->document->addScriptDeclaration("var planPath = '';"); + $this->document->addScriptDeclaration("var plansPath = '';"); + // $this->document->addScriptDeclaration("var planPath = '". ComponentbuilderHelper::$planPath ."';"); + // $this->document->addScriptDeclaration("var plansPath = '". ComponentbuilderHelper::$plansPath ."';"); + // token + $this->document->addScriptDeclaration("var token = '". JSession::getFormToken() ."';"); + // add some global items buckets for bulk updating + $this->document->addScriptDeclaration("var bulkItems = {};"); + $this->document->addScriptDeclaration("bulkItems.new = [];"); + $this->document->addScriptDeclaration("bulkItems.diverged = [];"); + $this->document->addScriptDeclaration("bulkItems.ahead = [];"); + $this->document->addScriptDeclaration("bulkItems.behind = [];"); + // set an error message if needed + $this->document->addScriptDeclaration("var returnError = '

".JText::_('COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED')."!

".JText::_('COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER').".

';"); + // need to add some language strings + JText::script('COM_COMPONENTBUILDER_JCB_COMMUNITY_PLANS'); + JText::script('COM_COMPONENTBUILDER_PLANS'); + JText::script('COM_COMPONENTBUILDER_PLAN'); + JText::script('COM_COMPONENTBUILDER_VIEW_PLAN_OF_COMMUNITY_VERSION'); + JText::script('COM_COMPONENTBUILDER_GET_PLAN'); + JText::script('COM_COMPONENTBUILDER_LOCAL_PLAN'); + JText::script('COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION'); + JText::script('COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_INSTALL_IT_LOCALLY'); + JText::script('COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION'); + JText::script('COM_COMPONENTBUILDER_USAGE'); + JText::script('COM_COMPONENTBUILDER_VIEW_USAGE_OF_COMMUNITY_VERSION'); + JText::script('COM_COMPONENTBUILDER_DESCRIPTION'); + JText::script('COM_COMPONENTBUILDER_VIEW_DESCRIPTION_OF_COMMUNITY_VERSION'); + JText::script('COM_COMPONENTBUILDER_VIEW_BLAME'); + JText::script('COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_PLAN'); + JText::script('COM_COMPONENTBUILDER_VIEW_PLAN_REFERENCE_URL'); + JText::script('COM_COMPONENTBUILDER_PLAN_COULD_NOT_BE_UPDATEDSAVED'); + JText::script('COM_COMPONENTBUILDER_PLANS_COULD_NOT_BE_UPDATEDSAVED'); + JText::script('COM_COMPONENTBUILDER_LINK_TO_THE_CONTRIBUTOR'); + JText::script('COM_COMPONENTBUILDER_VIEW_THE_CONTRIBUTOR_DETAILS'); + JText::script('COM_COMPONENTBUILDER_JCB_COMMUNITY'); + JText::script('COM_COMPONENTBUILDER_COMPANY_NAME'); + JText::script('COM_COMPONENTBUILDER_AUTHOR_NAME'); + JText::script('COM_COMPONENTBUILDER_AUTHOR_EMAIL'); + JText::script('COM_COMPONENTBUILDER_AUTHOR_WEBSITE'); + JText::script('COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_PLANS_AT_THIS_TIME'); + JText::script('COM_COMPONENTBUILDER_THERE_ARE_NO_DIVERGED_PLANS_AT_THIS_TIME'); + JText::script('COM_COMPONENTBUILDER_THERE_ARE_NO_AHEAD_PLANS_AT_THIS_TIME'); + JText::script('COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_PLANS_AT_THIS_TIME'); + JText::script('COM_COMPONENTBUILDER_THERE_ARE_NO_PLANS_TO_UPDATE_AT_THIS_TIME'); + JText::script('COM_COMPONENTBUILDER_AVAILABLE_CATEGORIES'); + JText::script('COM_COMPONENTBUILDER_OPEN_CATEGORY_PLANS'); + // Set the local plans array + $this->document->addScriptDeclaration("var local_plans = '';"); + // add the document default css file + $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/assistant.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + // hide the main menu + $this->app->input->set('hidemainmenu', true); + // set the title + if (isset($this->item->name) && $this->item->name) + { + $title = $this->item->name; + } + // Check for empty title and add view name if param is set + if (empty($title)) + { + $title = JText::_('COM_COMPONENTBUILDER_ASSISTANT'); + } + // add title to the page + JToolbarHelper::title($title,'heart'); + // add the back button + // JToolBarHelper::custom('assistant.back', 'undo-2', '', 'COM_COMPONENTBUILDER_BACK', false); + // add cpanel button + JToolBarHelper::custom('assistant.dashboard', 'grid-2', '', 'COM_COMPONENTBUILDER_DASH', false); + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('assistant'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_componentbuilder'); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } +} +?> diff --git a/componentbuilder.xml b/componentbuilder.xml index 7d168c7d2..0c441a36d 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -73,6 +73,7 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo COM_COMPONENTBUILDER_MENU + COM_COMPONENTBUILDER_MENU_ASSISTANT COM_COMPONENTBUILDER_MENU_COMPILER COM_COMPONENTBUILDER_MENU_JOOMLA_COMPONENTS COM_COMPONENTBUILDER_MENU_JOOMLA_MODULES