json-object-editor 0.10.423 → 0.10.425
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -1
- package/_joeinclude_nowrite.js +83 -0
- package/package.json +1 -1
- package/server/plugins/formBuilder.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
## CHANGELOG
|
|
2
2
|
|
|
3
3
|
### 0.10.400
|
|
4
|
+
424 - fixed formbuilder to explicitly call out jQuery
|
|
5
|
+
423 - added contextual items to chat and flattened them.
|
|
4
6
|
- Initial work with ai partner
|
|
5
7
|
- button field added
|
|
6
8
|
- getFromServer added to object options
|
|
7
9
|
- best practices doc added
|
|
8
|
-
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
### 0.10.300
|
|
11
13
|
- initial aws fix for bucketname
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* JavaScript include for: Json Object Editor
|
|
2
|
+
last updated: Rewritten by CH + ChatGPT (April 2025)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
(function() {
|
|
6
|
+
var ieNavigator = false;
|
|
7
|
+
var agent = window.navigator.userAgent;
|
|
8
|
+
if (agent.indexOf('Trident') !== -1 || agent.indexOf('MSIE') !== -1 || agent.indexOf('Edge') !== -1) {
|
|
9
|
+
ieNavigator = true;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var projectName = 'JsonObjectEditor';
|
|
13
|
+
var web_dir = window.web_dir || ('//' + location.hostname + ':' + (location.port || ((location.protocol === "https:") ? 443 : 80)) + "/" + projectName + '/');
|
|
14
|
+
|
|
15
|
+
if (location && location.origin === 'file://') {
|
|
16
|
+
web_dir = location.href.slice(0, location.href.lastIndexOf('/') + 1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var joe_web_dir = web_dir;
|
|
20
|
+
var scripts_dir = web_dir + "js/";
|
|
21
|
+
var styles_dir = web_dir + "css/";
|
|
22
|
+
|
|
23
|
+
var scripts = [];
|
|
24
|
+
var styles = ["joe.css"];
|
|
25
|
+
|
|
26
|
+
if (typeof jQuery === 'undefined') {
|
|
27
|
+
scripts.push("libs/jquery-1.11.3.min.js");
|
|
28
|
+
scripts.push("libs/jquery-ui.min.js");
|
|
29
|
+
} else if (typeof jQuery().resizable === 'undefined') {
|
|
30
|
+
scripts.push("libs/jquery-ui.min.js");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
scripts.push("libs/jquery.ui.touch-punch.min.js");
|
|
34
|
+
|
|
35
|
+
if (typeof Craydent === 'undefined' || (!Craydent.VERSION || Craydent.VERSION < '1.7.37')) {
|
|
36
|
+
scripts.push("libs/craydent-1.9.2.min.js");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (ieNavigator) {
|
|
40
|
+
scripts.push(
|
|
41
|
+
"libs/moment.min.js",
|
|
42
|
+
"joe_es5.js",
|
|
43
|
+
"plugins/tinymce.min.js",
|
|
44
|
+
"ace/ace.js"
|
|
45
|
+
);
|
|
46
|
+
} else {
|
|
47
|
+
scripts.push(
|
|
48
|
+
"libs/moment.min.js",
|
|
49
|
+
"joe.js",
|
|
50
|
+
"plugins/tinymce.min.js",
|
|
51
|
+
"ace/ace.js"
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Load styles
|
|
56
|
+
styles.forEach(function(style) {
|
|
57
|
+
var link = document.createElement('link');
|
|
58
|
+
link.href = styles_dir + style;
|
|
59
|
+
link.rel = 'stylesheet';
|
|
60
|
+
link.type = 'text/css';
|
|
61
|
+
document.head.appendChild(link);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// Load scripts in order
|
|
65
|
+
function loadScript(index) {
|
|
66
|
+
if (index >= scripts.length) return;
|
|
67
|
+
|
|
68
|
+
var script = document.createElement('script');
|
|
69
|
+
script.src = scripts_dir + scripts[index];
|
|
70
|
+
script.type = 'text/javascript';
|
|
71
|
+
script.onload = function() {
|
|
72
|
+
loadScript(index + 1);
|
|
73
|
+
};
|
|
74
|
+
script.onerror = function() {
|
|
75
|
+
console.error("Failed to load script:", script.src);
|
|
76
|
+
loadScript(index + 1); // Continue even if one fails
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
document.head.appendChild(script);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
loadScript(0); // start the script loading chain
|
|
83
|
+
})();
|
package/package.json
CHANGED