Skip to content

Commit d5cefef

Browse files
authored
Merge pull request #11 from LaswitchTech/dev
General: Version bumped to v0.0.11
2 parents e09c92c + 8742494 commit d5cefef

File tree

4 files changed

+22
-331
lines changed

4 files changed

+22
-331
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.0.10
1+
v0.0.11

info.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"base": "documents",
55
"author": "LaswitchTech",
66
"email": "support@laswitchtech.com",
7-
"date": "2025-08-29",
8-
"version": "v0.0.10",
7+
"date": "2025-09-22",
8+
"version": "v0.0.11",
99
"tags": "documents, pdf",
1010
"description": "This plugin provides a document management system for the LaswitchTech Core Framework, allowing users to upload, manage, and render various document formats.",
1111
"repository": "https://github.com/LaswitchTech/core-plugin-documents",

library.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ builder.add('widgets','documents', class extends builder.ComponentClass {
1111
targetId: null,
1212
interval: 10000,
1313
autoStart: false,
14+
render: true,
1415
docvals: {},
1516
callback: {},
1617
};
@@ -37,6 +38,11 @@ builder.add('widgets','documents', class extends builder.ComponentClass {
3738
// Set Self
3839
const self = this;
3940

41+
// Check if we should render
42+
if(!this._properties.render){
43+
return;
44+
}
45+
4046
// Create Component
4147
this._component = $(document.createElement('div')).attr({
4248
'id': 'documents' + this._id,
@@ -309,6 +315,11 @@ builder.add('widgets','documents', class extends builder.ComponentClass {
309315
// Set Self
310316
const self = this;
311317

318+
// Check if we should render
319+
if(!this._properties.render){
320+
return;
321+
}
322+
312323
let options = {};
313324
let callback = null;
314325

@@ -656,7 +667,7 @@ builder.add('widgets','documents', class extends builder.ComponentClass {
656667
return this;
657668
}
658669

659-
create(doctype = null){
670+
create(doctype = null, callback = null){
660671

661672
// Set Self
662673
const self = this;
@@ -720,6 +731,11 @@ builder.add('widgets','documents', class extends builder.ComponentClass {
720731
// Add the new document to the explorer
721732
self.add(response.record);
722733

734+
// Execute Callback
735+
if(typeof callback === 'function'){
736+
callback(response.record);
737+
}
738+
723739
// Hide the modal
724740
modal.hide();
725741
});

0 commit comments

Comments
 (0)