Fixed changelog direction so newest changes is listed at top of the file. Finished the init function of super powers. Adds rest function inside super power. Adds super powers to all templates. Updates many helper class methods to now use the utility classes. Adds the method to the component entry file (as-well). Moved most methods from the compiler fields class to powers. #955 Refactored many new builder classes from the registry class. Converted the Content class to two builder classes. Adds option to add additional templates to a module. Resolves #1002 by adding STRING instead of WORD. Ported the FOF encryption class into Powers. https://git.vdm.dev/joomla/fof Changed all CSS and JS to use instead of in compiler code. Adds option to turn jQuery off if UIKIT 3 is added. Adds option to auto write injection boilerplate code in Powers area. Adds option to auto write service provider boilerplate code in the Powers area. Improved the method and all banner locations to fetch from https://git.vdm.dev/joomla/jcb-external/ instead. Major stability improvements all over the new powers complier classes. New [base Registry class](https://git.vdm.dev/joomla/super-powers/src/branch/master/src/7e822c03-1b20-41d1-9427-f5b8d5836af7) has been created specially for JCB. Remember to update all plug-ins with this version update (use the package).

This commit is contained in:
2023-10-18 09:26:30 +02:00
parent a77eac9adf
commit e99899f6f1
632 changed files with 30604 additions and 16888 deletions

View File

@ -541,7 +541,7 @@ function setModuleCode() {
var libraries = jQuery("#jform_libraries").val();
var values = {'class': selected_get, 'get': custom_gets, 'lib': libraries};
var editor_id = 'jform_mod_code';
getCodeFrom_server(1, JSON.stringify(values), 'data', 'getModuleCode').done(function(result) {
getCodeFrom_server(1, JSON.stringify(values), 'data', 'getModuleCode').then(function(result) {
if(result.tmpl){
addCodeToEditor(result.tmpl.code, editor_id, result.tmpl.merge, result.tmpl.merge_target);
}
@ -561,27 +561,36 @@ function setModuleCode() {
}
function getLinked(){
getCodeFrom_server(1, 'type', 'type', 'getLinked').done(function(result) {
getCodeFrom_server(1, 'type', 'type', 'getLinked').then(function(result) {
if(result){
jQuery('#display_linked_to').html(result);
}
});
}
function getCodeFrom_server(id, type, type_name, callingName){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax." + callingName + "&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && id > 0 && type.length > 0) {
var request = token + '=1&' + type_name + '=' + type + '&id=' + id;
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax." + callingName + "&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length > 0) {
url += '&' + token + '=1&' + type_name + '=' + type + '&id=' + id;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:', error);
});
}
function addCodeToEditor(code_string, editor_id, merge, merge_target){
if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
@ -703,7 +712,7 @@ function isObject(obj) {
}
function getSnippetDetails(id){
getCodeFrom_server(id, '_type', '_type', 'snippetDetails').done(function(result) {
getCodeFrom_server(id, '_type', '_type', 'snippetDetails').then(function(result) {
if(result.snippet){
var description = '';
if (result.description.length > 0) {
@ -762,7 +771,7 @@ function getSnippets(){
// get libraries value if set
var libraries = jQuery("#jform_libraries").val();
if (libraries) {
getCodeFrom_server(1, JSON.stringify(libraries), 'libraries', 'getSnippets').done(function(result) {
getCodeFrom_server(1, JSON.stringify(libraries), 'libraries', 'getSnippets').then(function(result) {
setSnippets(result);
jQuery("#loading").hide();
if (typeof snippetButton !== 'undefined') {