json-object-editor 0.10.425 → 0.10.431
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 +2 -0
- package/capp/capp.css +8 -1
- package/capp/capp.js +12 -5
- package/css/joe-ai.css +174 -0
- package/css/joe-styles.css +25 -1
- package/css/joe.css +25 -7
- package/js/JsonObjectEditor.jquery.craydent.js +28 -9
- package/js/joe-ai copy.js +517 -0
- package/js/joe-ai.js +287 -159
- package/js/joe-full.js +28 -9
- package/js/joe.js +28 -15
- package/package.json +1 -1
- package/pages/template.html +2 -1
- package/readme.md +2 -0
- package/server/app-config.js +2 -2
- package/server/fields/core.js +15 -7
- package/server/init.js +1 -1
- package/server/modules/Apps.js +49 -8
- package/server/modules/Server.js +29 -5
- package/server/modules/Storage.js +3 -0
- package/server/modules/UniversalShorthand.js +1 -2
- package/server/modules/Utils.js +62 -0
- package/server/plugins/chatgpt-assistants.js +359 -0
- package/server/plugins/chatgpt-tools.js +79 -0
- package/server/plugins/plugin-utils.js +46 -0
- package/server/schemas/ai_conversation.js +45 -14
- package/server/schemas/ai_tool.js +94 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
## CHANGELOG
|
|
2
2
|
|
|
3
3
|
### 0.10.400
|
|
4
|
+
431 - - reloadable, plugin-utils, ai chat beta
|
|
5
|
+
430 - JOE Ai chat functional for alpha experiences.
|
|
4
6
|
424 - fixed formbuilder to explicitly call out jQuery
|
|
5
7
|
423 - added contextual items to chat and flattened them.
|
|
6
8
|
- Initial work with ai partner
|
package/capp/capp.css
CHANGED
|
@@ -462,12 +462,19 @@ html.no-touch .capp-retro capp-menu-option:hover{
|
|
|
462
462
|
|
|
463
463
|
|
|
464
464
|
capp-menu-option-bonus{
|
|
465
|
-
display:block;
|
|
465
|
+
/* display:block;
|
|
466
466
|
float:right;
|
|
467
467
|
cursor:pointer;
|
|
468
468
|
margin-right: -5px;
|
|
469
469
|
line-height: 1;
|
|
470
|
+
box-sizing: border-box; */
|
|
471
|
+
display:block;
|
|
472
|
+
float:right;
|
|
473
|
+
cursor:pointer;
|
|
474
|
+
margin-right: -15px;
|
|
475
|
+
line-height: 1;
|
|
470
476
|
box-sizing: border-box;
|
|
477
|
+
margin-left: -5px;
|
|
471
478
|
}
|
|
472
479
|
|
|
473
480
|
.capp-retro capp-menu-option.selected {
|
package/capp/capp.js
CHANGED
|
@@ -213,7 +213,7 @@ function CraydentApp(specs,render){
|
|
|
213
213
|
}
|
|
214
214
|
this.Button.addFromSchema = function(schema,specs){
|
|
215
215
|
var specs = $.extend({container:'capp-panel'},specs);
|
|
216
|
-
var icon = schema.name;
|
|
216
|
+
var icon = schema.display||schema.name;
|
|
217
217
|
if(schema.menuicon||schema.icon){
|
|
218
218
|
icon = (schema.menuicon||schema.icon)+'<svg-label>'+(schema.display || schema.name)+'</svg-label>';
|
|
219
219
|
}
|
|
@@ -243,7 +243,7 @@ function CraydentApp(specs,render){
|
|
|
243
243
|
specs = label.specs;
|
|
244
244
|
cssclass = label.cssclass;
|
|
245
245
|
}
|
|
246
|
-
var temp = '<capp-menu-option class="${cssclass}" onclick="${action}">${name}</capp-menu-option>';
|
|
246
|
+
var temp = '<capp-menu-option class="${cssclass}" title="${title}" onclick="${action}">${name}</capp-menu-option>';
|
|
247
247
|
|
|
248
248
|
function renderBonus(side,content){
|
|
249
249
|
|
|
@@ -270,17 +270,24 @@ function CraydentApp(specs,render){
|
|
|
270
270
|
};
|
|
271
271
|
this.Menu.addFromApps = function(apps,label,cssclass){
|
|
272
272
|
var app_items=[],link,appname;
|
|
273
|
-
apps.map(function(
|
|
273
|
+
apps.map(function(aa){
|
|
274
|
+
let a = aa,title='',description='';
|
|
275
|
+
if(aa.name){
|
|
276
|
+
a = aa.name;
|
|
277
|
+
title= aa.title;
|
|
278
|
+
description=aa.description||'';
|
|
279
|
+
}
|
|
274
280
|
var cssclass= (location.pathname.indexOf(a)!= -1)?"selected":'';
|
|
275
281
|
var link = a+location.search;
|
|
276
|
-
appname = a;
|
|
282
|
+
appname = title||a;
|
|
277
283
|
//TODO allow appname to use app title or display
|
|
278
284
|
app_items.push({
|
|
279
285
|
name:appname+'<capp-menu-option-bonus title="open in new window" onclick="window.open(\''+link+'\'); window.event.stopPropagation();">'
|
|
280
286
|
+self.svgs.newwindow
|
|
281
287
|
+'</capp-menu-option-bonus>',
|
|
282
288
|
action:'window.location=\'/JOE/'+link+'\'',
|
|
283
|
-
cssclass:cssclass
|
|
289
|
+
cssclass:cssclass,
|
|
290
|
+
title:description
|
|
284
291
|
});
|
|
285
292
|
});
|
|
286
293
|
|
package/css/joe-ai.css
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
joe-ai-chatbox{
|
|
2
|
+
top:50px;
|
|
3
|
+
}
|
|
4
|
+
chatbox-wrapper {
|
|
5
|
+
padding: 5px;
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
chat-footer,
|
|
14
|
+
chat-header,
|
|
15
|
+
chat-content{
|
|
16
|
+
position: absolute;
|
|
17
|
+
left: 0;
|
|
18
|
+
right: 0;
|
|
19
|
+
display: block;
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
chat-header {
|
|
24
|
+
top: 0;
|
|
25
|
+
margin:5px;
|
|
26
|
+
}
|
|
27
|
+
chat-content {
|
|
28
|
+
display: block;;
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 80px;
|
|
31
|
+
bottom: 70px;
|
|
32
|
+
left: 0;
|
|
33
|
+
right: 0;
|
|
34
|
+
overflow: auto;
|
|
35
|
+
/* margin-bottom: 10px; */
|
|
36
|
+
background: #fff;
|
|
37
|
+
border: 1px solid #ccc;
|
|
38
|
+
margin: 5px;
|
|
39
|
+
overflow-x: clip;
|
|
40
|
+
}
|
|
41
|
+
chat-footer {
|
|
42
|
+
bottom: 0;
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
.close-btn {
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 8px;
|
|
50
|
+
right: 8px;
|
|
51
|
+
width: 24px;
|
|
52
|
+
height: 24px;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
z-index:5px;
|
|
55
|
+
}
|
|
56
|
+
.close-btn svg {
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 100%;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
chat-title{
|
|
62
|
+
margin: 0;
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
display:block;
|
|
65
|
+
font-weight: bold;
|
|
66
|
+
}
|
|
67
|
+
chat-header p {
|
|
68
|
+
margin: 4px 0 0 0;
|
|
69
|
+
font-size: 12px;
|
|
70
|
+
color: #666;
|
|
71
|
+
}
|
|
72
|
+
chat-header svg {
|
|
73
|
+
width: 36px;
|
|
74
|
+
height: 36px;
|
|
75
|
+
}
|
|
76
|
+
label-select-wrapper {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 8px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.thinking-message {
|
|
83
|
+
font-size: 13px;
|
|
84
|
+
color: #888;
|
|
85
|
+
font-style: italic;
|
|
86
|
+
margin: 10px 0;
|
|
87
|
+
text-align: center;
|
|
88
|
+
}
|
|
89
|
+
.meta {
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
font-weight: bold;
|
|
92
|
+
margin-bottom: 2px;
|
|
93
|
+
/* display: flex
|
|
94
|
+
; */
|
|
95
|
+
align-items: center;
|
|
96
|
+
gap: 8px;
|
|
97
|
+
color: #99999999;
|
|
98
|
+
}
|
|
99
|
+
.content {
|
|
100
|
+
font-size: 14px;
|
|
101
|
+
white-space: pre-wrap;
|
|
102
|
+
line-height: 1.4em;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
input[type="text"] {
|
|
106
|
+
flex: 1;
|
|
107
|
+
padding: 8px;
|
|
108
|
+
border-radius: 4px;
|
|
109
|
+
border: 1px solid #ccc;
|
|
110
|
+
}
|
|
111
|
+
button {
|
|
112
|
+
padding: 8px 12px;
|
|
113
|
+
background: #007bff;
|
|
114
|
+
color: white;
|
|
115
|
+
border: none;
|
|
116
|
+
border-radius: 4px;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
position: absolute;
|
|
119
|
+
bottom: 20px;
|
|
120
|
+
right: 10px;
|
|
121
|
+
}
|
|
122
|
+
button:disabled {
|
|
123
|
+
opacity: 0.5;
|
|
124
|
+
cursor: default;
|
|
125
|
+
}
|
|
126
|
+
participant-name{
|
|
127
|
+
color:#20202099
|
|
128
|
+
}
|
|
129
|
+
.message {
|
|
130
|
+
margin-bottom: 10px;
|
|
131
|
+
padding: 8px;
|
|
132
|
+
background: #f5f5f5;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.message.user{
|
|
136
|
+
text-align:right;
|
|
137
|
+
margin-left: 30px;
|
|
138
|
+
border-radius: 10px 0 0 10px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.message.system {
|
|
142
|
+
background: #fee;
|
|
143
|
+
}
|
|
144
|
+
.message.assistant{
|
|
145
|
+
background: #00666633;
|
|
146
|
+
margin-right: 30px;
|
|
147
|
+
border-radius: 0px 10px 10px 0px;
|
|
148
|
+
}
|
|
149
|
+
#chat-input {
|
|
150
|
+
width: calc(100% - 100px);
|
|
151
|
+
margin: 5px;
|
|
152
|
+
min-height: 50px;
|
|
153
|
+
/* border-radius: 0px 0px 0px 8px; */
|
|
154
|
+
bottom: 0;
|
|
155
|
+
position: absolute;
|
|
156
|
+
/* overflow: visible; */
|
|
157
|
+
padding: 5px;
|
|
158
|
+
resize: vertical;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
joe-object {
|
|
162
|
+
display: block;
|
|
163
|
+
margin: 0 auto;
|
|
164
|
+
/* width: 100%; */
|
|
165
|
+
/* height: 100%; */
|
|
166
|
+
padding:5px;
|
|
167
|
+
background: #fff;
|
|
168
|
+
margin: 10px;
|
|
169
|
+
padding: 10px;
|
|
170
|
+
text-align: center;
|
|
171
|
+
box-shadow: 1px 1px 10px #20202020;
|
|
172
|
+
border: 1px solid #00666699;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
}
|
package/css/joe-styles.css
CHANGED
|
@@ -1927,9 +1927,17 @@ joe-card{
|
|
|
1927
1927
|
|
|
1928
1928
|
.joe-content-sidebar .joe-field-item-content {
|
|
1929
1929
|
padding:5px;
|
|
1930
|
-
font-size:
|
|
1930
|
+
font-size:16px;
|
|
1931
1931
|
line-height: 1.1em;
|
|
1932
1932
|
}
|
|
1933
|
+
/* .joe-content-sidebar .joe-field-item-content {
|
|
1934
|
+
padding:6px;
|
|
1935
|
+
font-size: 16px;
|
|
1936
|
+
line-height: 1.1em;
|
|
1937
|
+
border: 1px solid #00666644;
|
|
1938
|
+
box-shadow:0 1px 4px #0002;
|
|
1939
|
+
margin:5px;
|
|
1940
|
+
} */
|
|
1933
1941
|
/*-------------------------
|
|
1934
1942
|
List Option Buttons
|
|
1935
1943
|
-------------------------*/
|
|
@@ -2020,6 +2028,12 @@ joe-list-item.deletable {
|
|
|
2020
2028
|
padding: 10px;
|
|
2021
2029
|
margin: 10px 0;
|
|
2022
2030
|
}
|
|
2031
|
+
.joe-content-sidebar joe-list-item {
|
|
2032
|
+
padding: 5px;
|
|
2033
|
+
margin: 5px 0;
|
|
2034
|
+
border: 1px solid #00666633;
|
|
2035
|
+
box-shadow: 0 1px 4px #0002;
|
|
2036
|
+
}
|
|
2023
2037
|
swipe-option{
|
|
2024
2038
|
position:absolute;
|
|
2025
2039
|
top:0;
|
|
@@ -2142,6 +2156,12 @@ joe-field{
|
|
|
2142
2156
|
.hide-label > .joe-field-label {
|
|
2143
2157
|
display: none;
|
|
2144
2158
|
}
|
|
2159
|
+
.joe-field-label .joe-reload-icon {
|
|
2160
|
+
font-size: 16px;
|
|
2161
|
+
margin: 0 10px;
|
|
2162
|
+
cursor: pointer;
|
|
2163
|
+
line-height: 14px;
|
|
2164
|
+
}
|
|
2145
2165
|
/*----------------------------- End joe-field-label -----------------------------*/
|
|
2146
2166
|
|
|
2147
2167
|
/*----------------------------- Begin joe-field-comment -----------------------------*/
|
|
@@ -3241,6 +3261,10 @@ html.no-touch .joe-group-item.disabled:hover{
|
|
|
3241
3261
|
padding-left: 10px;
|
|
3242
3262
|
cursor:pointer;
|
|
3243
3263
|
}
|
|
3264
|
+
.joe-content-sidebar .joe-group-item {
|
|
3265
|
+
width: 100%;
|
|
3266
|
+
float: none;
|
|
3267
|
+
}
|
|
3244
3268
|
/*-------------------------
|
|
3245
3269
|
Object List
|
|
3246
3270
|
-------------------------*/
|
package/css/joe.css
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/* --------------------------------------------------------
|
|
2
|
-
*
|
|
3
|
-
* JOE - v1.5.0
|
|
4
|
-
* Created by: Corey Hadden
|
|
5
|
-
*
|
|
6
|
-
* -------------------------------------------------------- */
|
|
7
1
|
/* --------------------------------------------------------
|
|
8
2
|
*
|
|
9
3
|
* JOE - v1.5.0
|
|
@@ -2419,9 +2413,17 @@ joe-card{
|
|
|
2419
2413
|
|
|
2420
2414
|
.joe-content-sidebar .joe-field-item-content {
|
|
2421
2415
|
padding:5px;
|
|
2422
|
-
font-size:
|
|
2416
|
+
font-size:16px;
|
|
2423
2417
|
line-height: 1.1em;
|
|
2424
2418
|
}
|
|
2419
|
+
/* .joe-content-sidebar .joe-field-item-content {
|
|
2420
|
+
padding:6px;
|
|
2421
|
+
font-size: 16px;
|
|
2422
|
+
line-height: 1.1em;
|
|
2423
|
+
border: 1px solid #00666644;
|
|
2424
|
+
box-shadow:0 1px 4px #0002;
|
|
2425
|
+
margin:5px;
|
|
2426
|
+
} */
|
|
2425
2427
|
/*-------------------------
|
|
2426
2428
|
List Option Buttons
|
|
2427
2429
|
-------------------------*/
|
|
@@ -2512,6 +2514,12 @@ joe-list-item.deletable {
|
|
|
2512
2514
|
padding: 10px;
|
|
2513
2515
|
margin: 10px 0;
|
|
2514
2516
|
}
|
|
2517
|
+
.joe-content-sidebar joe-list-item {
|
|
2518
|
+
padding: 5px;
|
|
2519
|
+
margin: 5px 0;
|
|
2520
|
+
border: 1px solid #00666633;
|
|
2521
|
+
box-shadow: 0 1px 4px #0002;
|
|
2522
|
+
}
|
|
2515
2523
|
swipe-option{
|
|
2516
2524
|
position:absolute;
|
|
2517
2525
|
top:0;
|
|
@@ -2634,6 +2642,12 @@ joe-field{
|
|
|
2634
2642
|
.hide-label > .joe-field-label {
|
|
2635
2643
|
display: none;
|
|
2636
2644
|
}
|
|
2645
|
+
.joe-field-label .joe-reload-icon {
|
|
2646
|
+
font-size: 16px;
|
|
2647
|
+
margin: 0 10px;
|
|
2648
|
+
cursor: pointer;
|
|
2649
|
+
line-height: 14px;
|
|
2650
|
+
}
|
|
2637
2651
|
/*----------------------------- End joe-field-label -----------------------------*/
|
|
2638
2652
|
|
|
2639
2653
|
/*----------------------------- Begin joe-field-comment -----------------------------*/
|
|
@@ -3733,6 +3747,10 @@ html.no-touch .joe-group-item.disabled:hover{
|
|
|
3733
3747
|
padding-left: 10px;
|
|
3734
3748
|
cursor:pointer;
|
|
3735
3749
|
}
|
|
3750
|
+
.joe-content-sidebar .joe-group-item {
|
|
3751
|
+
width: 100%;
|
|
3752
|
+
float: none;
|
|
3753
|
+
}
|
|
3736
3754
|
/*-------------------------
|
|
3737
3755
|
Object List
|
|
3738
3756
|
-------------------------*/
|
|
@@ -1064,6 +1064,8 @@ Column Count
|
|
|
1064
1064
|
this.Header = {}
|
|
1065
1065
|
this.toggleHelpMenu = function(show,target){
|
|
1066
1066
|
|
|
1067
|
+
}
|
|
1068
|
+
this.listUnsavedChanges = function(){
|
|
1067
1069
|
}
|
|
1068
1070
|
this.Header.Render = this.renderEditorHeader = function(specs){
|
|
1069
1071
|
var BM = new Benchmarker();
|
|
@@ -3226,6 +3228,7 @@ this.renderHTMLContent = function(specs){
|
|
|
3226
3228
|
+fillTemplate(fieldlabel,self.current.object)
|
|
3227
3229
|
+(required && '*' ||'')
|
|
3228
3230
|
+self.renderFieldTooltip(prop)
|
|
3231
|
+
+self.renderFieldReloadIcon(prop)
|
|
3229
3232
|
+'</label>';
|
|
3230
3233
|
|
|
3231
3234
|
//render comment
|
|
@@ -3318,7 +3321,15 @@ this.renderHTMLContent = function(specs){
|
|
|
3318
3321
|
|
|
3319
3322
|
return tooltip_html;
|
|
3320
3323
|
};
|
|
3324
|
+
this.renderFieldReloadIcon = function(prop){
|
|
3325
|
+
var reloadable = self.propAsFuncOrValue(prop.reloadable);
|
|
3326
|
+
if(!reloadable){return '';}
|
|
3327
|
+
//var comment = ($.type(prop.comment) == "function")?prop.comment():prop.comment;
|
|
3328
|
+
var comment_html = ` <joe-icon class="joe-reload-icon fright" title="Reload Field" onclick="_joe.Fields.rerender('${prop.name}')">⟳</joe-icon>`;
|
|
3321
3329
|
|
|
3330
|
+
return comment_html;
|
|
3331
|
+
};
|
|
3332
|
+
|
|
3322
3333
|
this.selectAndRenderFieldType = function(prop){
|
|
3323
3334
|
//var joeFieldBenchmarker = new Benchmarker();
|
|
3324
3335
|
|
|
@@ -4551,7 +4562,8 @@ this.renderHTMLContent = function(specs){
|
|
|
4551
4562
|
stripecolor:false,
|
|
4552
4563
|
bgcolor:false,
|
|
4553
4564
|
checkbox:false,
|
|
4554
|
-
value:''
|
|
4565
|
+
value:'',
|
|
4566
|
+
link:false
|
|
4555
4567
|
},specs);
|
|
4556
4568
|
var schemaprop = specs.schemaprop && self.propAsFuncOrValue(specs.schemaprop,item);
|
|
4557
4569
|
var schema = ((schemaprop && item[schemaprop])||schema||item.itemtype||item.type);
|
|
@@ -4562,7 +4574,7 @@ this.renderHTMLContent = function(specs){
|
|
|
4562
4574
|
|
|
4563
4575
|
var idprop = specs.idprop || (schemaobj && schemaobj.idprop) ||'_id';
|
|
4564
4576
|
var hasMenu = specs.itemMenu && specs.itemMenu.length;
|
|
4565
|
-
var action = specs.action || ' onclick="goJoe(_joe.search(\'${'+idprop+'}\')[0],{schema:\''+schema+'\'})" ';
|
|
4577
|
+
var action = self.propAsFuncOrValue(specs.action,item) || ' onclick="goJoe(_joe.search(\'${'+idprop+'}\')[0],{schema:\''+schema+'\'})" ';
|
|
4566
4578
|
var nonclickable = self.propAsFuncOrValue(specs.nonclickable,item);
|
|
4567
4579
|
var clickablelistitem = (!specs.gotoButton && !nonclickable/* && !hasMenu*/);
|
|
4568
4580
|
//var clickablelistitem = !!clickable && (!specs.gotoButton && !hasMenu);
|
|
@@ -4577,6 +4589,7 @@ this.renderHTMLContent = function(specs){
|
|
|
4577
4589
|
'data-value="' +encodeURI(JSON.stringify(specs.value))+ '" data-isObject=true'
|
|
4578
4590
|
:'data-value="' + specs.value + '"';
|
|
4579
4591
|
|
|
4592
|
+
var link = specs.link && self.propAsFuncOrValue(specs.link,item);
|
|
4580
4593
|
var html = fillTemplate(`<joe-list-item schema="${schema}"
|
|
4581
4594
|
itemId="${item[idprop]}"
|
|
4582
4595
|
idprop="${idprop}"
|
|
@@ -4599,13 +4612,13 @@ this.renderHTMLContent = function(specs){
|
|
|
4599
4612
|
|
|
4600
4613
|
+ self.Render.itemCheckbox(item,schemaobj)
|
|
4601
4614
|
|
|
4602
|
-
+((
|
|
4615
|
+
+((link && '<a class="non-link" onclick="__cancelClick();" href="'+link+'">')||'')
|
|
4603
4616
|
|
|
4604
4617
|
+ '<div class="joe-field-item-content '+(nonclickable && 'nonclickable' || '')+'" ' + click + ' >'
|
|
4605
4618
|
+ self.propAsFuncOrValue(contentTemplate+__clearDiv__, item)
|
|
4606
4619
|
+ __clearDiv__+'</div>'
|
|
4607
4620
|
|
|
4608
|
-
+((
|
|
4621
|
+
+((link && '</a>')||'')
|
|
4609
4622
|
+self.Render.stripeColor(item,specs.stripecolor)
|
|
4610
4623
|
+ self._renderExpanderButton(expanderContent, item)
|
|
4611
4624
|
+ (specs.deleteButton && deleteButton || '')
|
|
@@ -7380,6 +7393,7 @@ Field Rendering Helpers
|
|
|
7380
7393
|
var sortable_index;
|
|
7381
7394
|
this.Autosave = {
|
|
7382
7395
|
possibleChanges:true,
|
|
7396
|
+
unsavedChanges:false,
|
|
7383
7397
|
activate:function(){
|
|
7384
7398
|
if(!self.specs.autosave){
|
|
7385
7399
|
return;
|
|
@@ -7409,7 +7423,8 @@ Field Rendering Helpers
|
|
|
7409
7423
|
var showUnsaved = (hasChanged && self.getMode() == "details");
|
|
7410
7424
|
document.title =( showUnsaved && '*' ||'')
|
|
7411
7425
|
+document.title.replace('*','');
|
|
7412
|
-
self.overlay.toggleClass('unsaved-changes',showUnsaved)
|
|
7426
|
+
self.overlay.toggleClass('unsaved-changes',showUnsaved);
|
|
7427
|
+
self.Autosave.unsavedChanges = hasChanged;
|
|
7413
7428
|
},intercnt)
|
|
7414
7429
|
},
|
|
7415
7430
|
deactivate:function(){
|
|
@@ -7641,7 +7656,7 @@ Field Rendering Helpers
|
|
|
7641
7656
|
tocheck.map(field=>{
|
|
7642
7657
|
|
|
7643
7658
|
})
|
|
7644
|
-
return (tocheck.length > 0);
|
|
7659
|
+
return (tocheck.length > 0)?tocheck:false;
|
|
7645
7660
|
}
|
|
7646
7661
|
if(self.overlay.hasClass('active') && !listMode && !self.current.changesConfirmed && tocheck.length){
|
|
7647
7662
|
|
|
@@ -7649,7 +7664,7 @@ Field Rendering Helpers
|
|
|
7649
7664
|
self.current.changesConfirmed = confirmed;
|
|
7650
7665
|
return confirmed;
|
|
7651
7666
|
}
|
|
7652
|
-
return
|
|
7667
|
+
return tocheck;
|
|
7653
7668
|
}
|
|
7654
7669
|
/*-------------------------------------------------------------------->
|
|
7655
7670
|
J | MESSAGING
|
|
@@ -8280,7 +8295,10 @@ Field Rendering Helpers
|
|
|
8280
8295
|
|
|
8281
8296
|
for (const [field, val] of Object.entries(object)) {
|
|
8282
8297
|
if (val === undefined || val === null) continue;
|
|
8283
|
-
if (field == '_id')
|
|
8298
|
+
if (field == '_id'){
|
|
8299
|
+
flattened[field] = val;
|
|
8300
|
+
continue;
|
|
8301
|
+
}
|
|
8284
8302
|
|
|
8285
8303
|
if (typeof val === 'string' && $c.isCuid(val) && recursive && depth > 0) {
|
|
8286
8304
|
if (!visited.has(val)) {
|
|
@@ -9857,7 +9875,7 @@ logit(intent)
|
|
|
9857
9875
|
var users = _joe.Data[(user_dataset || 'user')].where({_id:{$in:ids}});
|
|
9858
9876
|
var html = '';
|
|
9859
9877
|
users.map(function(user){
|
|
9860
|
-
html += self.SERVER.User.Render.cube(user);
|
|
9878
|
+
html += self.SERVER.User.Render.cube(user,cssclass);
|
|
9861
9879
|
})
|
|
9862
9880
|
return html;
|
|
9863
9881
|
},
|
|
@@ -10378,6 +10396,7 @@ logit(intent)
|
|
|
10378
10396
|
var e = e || window.event;
|
|
10379
10397
|
if (e.stopPropagation) e.stopPropagation();
|
|
10380
10398
|
if (e.preventDefault) e.preventDefault();
|
|
10399
|
+
return false;
|
|
10381
10400
|
},
|
|
10382
10401
|
getPossibleValues:function(propertyName,schema,specs){
|
|
10383
10402
|
//TODO:
|