backend-plus 1.14.5 → 1.14.6
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/for-client/my-menu.js +0 -46
- package/for-client/my-tables.js +2 -2
- package/package.json +1 -1
- package/unlogged/my-ajax.js +46 -0
package/for-client/my-menu.js
CHANGED
|
@@ -209,52 +209,6 @@ myOwn.wScreens.path = function(addrParams){
|
|
|
209
209
|
window.location.href='.'+addrParams.path;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
myOwn.UriSearchToObject = function UriSearchToObject(locationSearch){
|
|
213
|
-
var parts=locationSearch.split('&');
|
|
214
|
-
var addrParams={}
|
|
215
|
-
parts.forEach(function(pair,i){
|
|
216
|
-
if(pair[0]==='#'){
|
|
217
|
-
pair=pair.substr(1);
|
|
218
|
-
}
|
|
219
|
-
if(pair[0]==='?'){
|
|
220
|
-
pair=pair.substr(1);
|
|
221
|
-
}
|
|
222
|
-
var eq = pair.indexOf('=');
|
|
223
|
-
if(eq !== -1){
|
|
224
|
-
var varName=pair.substr(0, eq);
|
|
225
|
-
var value = decodeURIComponent(pair.substr(eq+1));
|
|
226
|
-
var paramDef=myOwn.UriSearchToObjectParams[varName];
|
|
227
|
-
if(paramDef && paramDef.decode){
|
|
228
|
-
value = paramDef.decode(value);
|
|
229
|
-
}
|
|
230
|
-
addrParams[varName] = value;
|
|
231
|
-
if(!i){
|
|
232
|
-
Object.defineProperty(addrParams,'_firstParameterName',{value:varName, writable:false, enumerable:false});
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
return addrParams;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
function noChange(x){ return x; }
|
|
240
|
-
|
|
241
|
-
myOwn.UriSearchToObjectParams={
|
|
242
|
-
i :{ showInMenu:true , encode:function(value,menu){ return menu.name?(menu.parents||[]).concat(menu.name).join(','):value }},
|
|
243
|
-
fc :{ encode:function(x){ return JSON.stringify(x); }, decode:function(x){ return JSON.parse(x)} },
|
|
244
|
-
ff :{ encode:function(x){ return JSON.stringify(x); }, decode:function(x){ return JSON.parse(x)} },
|
|
245
|
-
up :{ encode:function(x){ return json4all.stringify(x); }, decode:function(x){ return json4all.parse(x)} },
|
|
246
|
-
pf :{ encode:function(x){ return JSON.stringify(x); }, decode:function(x){ return JSON.parse(x)} },
|
|
247
|
-
today :{ encode:function(x){ return JSON.stringify(x); }, decode:function(x){ return bestGlobals.date.iso((x+'').substr(0,10))} },
|
|
248
|
-
section :{ showInMenu:true , encode:noChange , decode:noChange },
|
|
249
|
-
directUrl :{ hide:true },
|
|
250
|
-
selectedByDefault:{ hide:true },
|
|
251
|
-
showParams :{ hide:true },
|
|
252
|
-
parents :{ hide:true },
|
|
253
|
-
button :{ hide:true },
|
|
254
|
-
fixedFields :{ varName:'ff' , encode:function(pairs){ return JSON.stringify(likeAr.toPlainObject(pairs, 'fieldName')); }},
|
|
255
|
-
detailing :{ encode:function(x){ return JSON.stringify(x); }, decode:function(x){ return JSON.parse(x)} },
|
|
256
|
-
}
|
|
257
|
-
|
|
258
212
|
myOwn.preDisplayPage = function preDisplayPage(addrParams, wScreen, w){
|
|
259
213
|
var my = this;
|
|
260
214
|
var pageTitle = wScreen.pageTitle || addrParams.pageTitle || addrParams.title || addrParams.name || my.config.config.title;
|
package/for-client/my-tables.js
CHANGED
|
@@ -1056,7 +1056,7 @@ myOwn.DetailColumnGrid.prototype.td = function td(depot, iColumn, tr){
|
|
|
1056
1056
|
detailControl.img = html.img({
|
|
1057
1057
|
src:my.path.img+'detail-unknown.png',
|
|
1058
1058
|
alt:'DETAIL',
|
|
1059
|
-
title:my.messages.details
|
|
1059
|
+
title:detailTableDef.label||my.messages.details
|
|
1060
1060
|
}).create();
|
|
1061
1061
|
var menuRef={w:'table', table:detailTableDef.table};
|
|
1062
1062
|
var calculateFixedFields = function(){
|
|
@@ -1162,7 +1162,7 @@ myOwn.DetailColumnGrid.prototype.td = function td(depot, iColumn, tr){
|
|
|
1162
1162
|
}else{
|
|
1163
1163
|
detailControl.img.src=my.path.img+'detail-expand.png';
|
|
1164
1164
|
detailControl.img.alt="[+]";
|
|
1165
|
-
detailControl.img.title=my.messages.details;
|
|
1165
|
+
detailControl.img.title=detailTableDef.label||my.messages.details;
|
|
1166
1166
|
if(detailControl.tr){
|
|
1167
1167
|
grid.my.fade(detailControl.tr, {smooth:{spans:spansForSmooth, content:detailControl.divDetail}});
|
|
1168
1168
|
depot.detailRows = depot.detailRows.filter(function(tr){ return tr!==detailControl.tr;});
|
package/package.json
CHANGED
package/unlogged/my-ajax.js
CHANGED
|
@@ -563,6 +563,52 @@ myAjax.agregar_json=agregar_json;
|
|
|
563
563
|
// require.paths=require.paths||{}
|
|
564
564
|
// require.paths.vs = '../node_modules/monaco-editor/min/vs';
|
|
565
565
|
|
|
566
|
+
function noChange(x){ return x; }
|
|
567
|
+
|
|
568
|
+
myAjax.UriSearchToObjectParams={
|
|
569
|
+
i :{ showInMenu:true , encode:function(value,menu){ return menu.name?(menu.parents||[]).concat(menu.name).join(','):value }},
|
|
570
|
+
fc :{ encode:function(x){ return JSON.stringify(x); }, U:function(x){ return JSON.parse(x)} },
|
|
571
|
+
ff :{ encode:function(x){ return JSON.stringify(x); }, decode:function(x){ return JSON.parse(x)} },
|
|
572
|
+
up :{ encode:function(x){ return json4all.stringify(x); }, decode:function(x){ return json4all.parse(x)} },
|
|
573
|
+
pf :{ encode:function(x){ return JSON.stringify(x); }, decode:function(x){ return JSON.parse(x)} },
|
|
574
|
+
today :{ encode:function(x){ return JSON.stringify(x); }, decode:function(x){ return bestGlobals.date.iso((x+'').substr(0,10))} },
|
|
575
|
+
section :{ showInMenu:true , encode:noChange , decode:noChange },
|
|
576
|
+
directUrl :{ hide:true },
|
|
577
|
+
selectedByDefault:{ hide:true },
|
|
578
|
+
showParams :{ hide:true },
|
|
579
|
+
parents :{ hide:true },
|
|
580
|
+
button :{ hide:true },
|
|
581
|
+
fixedFields :{ varName:'ff' , encode:function(pairs){ return JSON.stringify(likeAr.toPlainObject(pairs, 'fieldName')); }},
|
|
582
|
+
detailing :{ encode:function(x){ return JSON.stringify(x); }, decode:function(x){ return JSON.parse(x)} },
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
myAjax.UriSearchToObject = function UriSearchToObject(locationSearch){
|
|
586
|
+
var parts=locationSearch.split('&');
|
|
587
|
+
var addrParams={}
|
|
588
|
+
parts.forEach(function(pair,i){
|
|
589
|
+
if(pair[0]==='#'){
|
|
590
|
+
pair=pair.substr(1);
|
|
591
|
+
}
|
|
592
|
+
if(pair[0]==='?'){
|
|
593
|
+
pair=pair.substr(1);
|
|
594
|
+
}
|
|
595
|
+
var eq = pair.indexOf('=');
|
|
596
|
+
if(eq !== -1){
|
|
597
|
+
var varName=pair.substr(0, eq);
|
|
598
|
+
var value = decodeURIComponent(pair.substr(eq+1));
|
|
599
|
+
var paramDef=myOwn.UriSearchToObjectParams[varName];
|
|
600
|
+
if(paramDef && paramDef.decode){
|
|
601
|
+
value = paramDef.decode(value);
|
|
602
|
+
}
|
|
603
|
+
addrParams[varName] = value;
|
|
604
|
+
if(!i){
|
|
605
|
+
Object.defineProperty(addrParams,'_firstParameterName',{value:varName, writable:false, enumerable:false});
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
return addrParams;
|
|
610
|
+
}
|
|
611
|
+
|
|
566
612
|
return myAjax;
|
|
567
613
|
|
|
568
614
|
});
|