From 14e03f17765e2a181b611f4446644f7051170f5b Mon Sep 17 00:00:00 2001 From: Louis Ouellet Date: Mon, 25 Aug 2025 11:21:27 -0400 Subject: [PATCH 1/2] General: Version bumped to v0.0.2 --- VERSION | 2 +- info.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 45c7a58..a3dce6c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.0.1 +v0.0.2 diff --git a/info.cfg b/info.cfg index 85d7072..2cfca63 100644 --- a/info.cfg +++ b/info.cfg @@ -5,7 +5,7 @@ "author": "LaswitchTech", "email": "support@laswitchtech.com", "date": "2025-08-25", - "version": "v0.0.1", + "version": "v0.0.2", "tags": "extensions, plugins, modules, themes, management", "description": "Manage installed modules, plugins, and themes in your application.", "repository": "https://github.com/LaswitchTech/core-plugin-components", From 945a7aeebb0caf03074ede6f4b9e662ef57b6956 Mon Sep 17 00:00:00 2001 From: Louis Ouellet Date: Fri, 29 Aug 2025 15:39:19 -0400 Subject: [PATCH 2/2] General: Re-purpose the autoStart property. --- library.js | 82 +++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/library.js b/library.js index d6e5872..1dabd39 100644 --- a/library.js +++ b/library.js @@ -695,7 +695,7 @@ builder.add('layouts','index', class extends builder.ComponentClass { advancedSearch: false, showButtonsLabel: false, interval: 15000, - autoStart: true, + autoStart: false, callback: {}, }; this._data = {}; @@ -782,49 +782,49 @@ builder.add('layouts','index', class extends builder.ComponentClass { // Set _datatable self.datatable(datatable); - // Check if autoStart is enabled - if(self._properties.autoStart){ - - // Retrieve Records - $.ajax({ - url: self._properties.url, - headers: {'X-CSRF-Authorization': CSRF_KEY}, - type: 'POST',dataType: 'json', - data: { - conditions: self._properties.conditions, - }, - error: function(xhr, status, error) { - let color = 'info', icon = 'question-circle', title = builder.Locale.get(xhr.statusText), content = builder.Locale.get(xhr.responseText); - switch(xhr.status){ - case 403: color = 'danger'; icon = 'shield-lock'; break; - case 404: color = 'warning'; icon = 'question-diamond'; break; - case 500: color = 'danger'; icon = 'bug'; break; - } - self._builder.Component( - "alert", - self._component, - { - class: { - component: 'm-3', - }, - dismissible: false, - icon:icon, - color:color, - title:title + // Retrieve Records + $.ajax({ + url: self._properties.url, + headers: {'X-CSRF-Authorization': CSRF_KEY}, + type: 'POST',dataType: 'json', + data: { + conditions: self._properties.conditions, + }, + error: function(xhr, status, error) { + let color = 'info', icon = 'question-circle', title = builder.Locale.get(xhr.statusText), content = builder.Locale.get(xhr.responseText); + switch(xhr.status){ + case 403: color = 'danger'; icon = 'shield-lock'; break; + case 404: color = 'warning'; icon = 'question-diamond'; break; + case 500: color = 'danger'; icon = 'bug'; break; + } + self._builder.Component( + "alert", + self._component, + { + class: { + component: 'm-3', }, - function(alert,component){ - component.content.html('
'+content+'
'); - } - ); - }, - success: function(response) { - - // Add Records - for(const [key, record] of Object.entries(response.records)){ - self.add(record); + dismissible: false, + icon:icon, + color:color, + title:title + }, + function(alert,component){ + component.content.html('
'+content+'
'); } + ); + }, + success: function(response) { + + // Add Records + for(const [key, record] of Object.entries(response.records)){ + self.add(record); } - }); + } + }); + + // Check if autoStart is enabled + if(self._properties.autoStart){ // Start self.start();