backend-plus 2.5.2-betha.18 → 2.5.2-betha.20

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.
@@ -903,7 +903,7 @@ myOwn.ActionColumnGrid.prototype.td = function td(depot){
903
903
  actionNamesList.forEach(function(actionName){
904
904
  var actionDef = my.tableAction[actionName];
905
905
  if(grid.def.allow[actionName] && depot.allow[actionName] !== false){
906
- var buttonAction=html.button({class:'table-button', "skip-enter":true}, [
906
+ var buttonAction=html.button({class:'table-button', "skip-enter":true, "bp-action":actionDef.alt}, [
907
907
  html.img({src:actionDef.img, alt:actionDef.alt, title:my.messages[actionDef.titleMsg]})
908
908
  ]).create();
909
909
  thActions.appendChild(buttonAction);
@@ -2312,7 +2312,7 @@ myOwn.TableGrid.prototype.displayGrid = function displayGrid(){
2312
2312
  grid.updateRowData = function updateRowData(depot, skipUpdateStatus){
2313
2313
  var grid = this;
2314
2314
  var forInsert = false; // not define how to detect
2315
- var tr = depot;
2315
+ var tr = depot.tr;
2316
2316
  grid.setRowStyle(depot,depot.row, skipUpdateStatus);
2317
2317
  grid.def.fields.filter(function(fieldDef){
2318
2318
  return fieldDef.visible;
@@ -2344,6 +2344,12 @@ myOwn.TableGrid.prototype.displayGrid = function displayGrid(){
2344
2344
  depot.clientSidePrepared=true;
2345
2345
  grid.my.clientSides[grid.def.clientSide].update(depot);
2346
2346
  }
2347
+ if (depot.allow.update) {
2348
+ tr.setAttribute('can-update','yes')
2349
+ }
2350
+ if (depot.allow.delete) {
2351
+ tr.setAttribute('can-delete','yes')
2352
+ }
2347
2353
  };
2348
2354
  var saveRow = function(depot, opts){
2349
2355
  if(!('saving' in depot)){
@@ -2493,7 +2499,7 @@ myOwn.TableGrid.prototype.displayGrid = function displayGrid(){
2493
2499
  }
2494
2500
  }
2495
2501
  }
2496
- }else if(!/^\$allow\./.test(fieldName)){
2502
+ }else if(/^\$allow\./.test(fieldName)){
2497
2503
  depot.allow[fieldName.replace(/^\$allow\./,'')] = retrievedRow[fieldName];
2498
2504
  }
2499
2505
  }
@@ -2711,7 +2717,7 @@ myOwn.TableGrid.prototype.displayGrid = function displayGrid(){
2711
2717
  if(iRow<depotsToDisplay.length){
2712
2718
  var addButtonRest = function addButtonRest(toNextRowNumber){
2713
2719
  var createRestButtonInto = function(domElement){
2714
- var buttonRest=html.button({class:'foot-info', "enter-clicks":true},"+..."+toNextRowNumber).create();
2720
+ var buttonRest=html.button({class:'foot-info', "enter-clicks":true, "all-rows-displayed": "no"},"+..."+toNextRowNumber).create();
2715
2721
  domElement.appendChild(html.span(' ').create());
2716
2722
  domElement.appendChild(buttonRest);
2717
2723
  return buttonRest;
@@ -2741,6 +2747,7 @@ myOwn.TableGrid.prototype.displayGrid = function displayGrid(){
2741
2747
  if(grid.dom.buttonInsert){
2742
2748
  grid.dom.buttonInsert.style.visibility='visible';
2743
2749
  }
2750
+ grid.dom.headInfo.rowCount.setAttribute("all-rows-displayed", "yes")
2744
2751
  }
2745
2752
  };
2746
2753
  var linesToDisplay=(
@@ -322,6 +322,7 @@ myOwn.insertRow = function insertRow(where){
322
322
  where.smooth={};
323
323
  }
324
324
  var trDummy = section.insertRow(iRow);
325
+ trDummy.setAttribute('dummy','inserting')
325
326
  tr.style.display='none';
326
327
  for(var i=0; i<(where.smooth.colCount||1); i++){
327
328
  var cell=trDummy.insertCell(-1);
@@ -2988,7 +2988,7 @@ AppBackend.prototype.dumpDbSchemaPartial = async function dumpDbSchemaPartial(pa
2988
2988
  }
2989
2989
  }
2990
2990
  lines.push(`
2991
- create or replace procedure set_app_user(p_user text)
2991
+ create or replace procedure set_app_user(p_username text)
2992
2992
  security definer language plpgsql
2993
2993
  as
2994
2994
  $body$
@@ -2997,7 +2997,7 @@ declare
2997
2997
  ${db.quoteIdent('v_'+fieldName)} text;`
2998
2998
  ).join('')}
2999
2999
  begin
3000
- if p_user = '!login' then
3000
+ if p_username = '!login' then
3001
3001
  ${be.config.login.infoFieldList.map(fieldName => `
3002
3002
  set backend_plus._${fieldName} = '!';`).join('')}
3003
3003
 
@@ -3009,13 +3009,13 @@ begin
3009
3009
  from ${(be.config.login.from ?? (
3010
3010
  (be.config.login.schema?be.db.quoteIdent(be.config.login.schema)+'.':'')+
3011
3011
  be.db.quoteIdent(be.config.login.table)))}
3012
- where ${db.quoteIdent(be.config.login.userFieldName)} = p_user;
3012
+ where ${db.quoteIdent(be.config.login.userFieldName)} = p_username;
3013
3013
  ${be.config.login.infoFieldList.map(fieldName => `
3014
3014
  perform set_config('backend_plus._${fieldName}', v_${fieldName}, false);`).join('')}
3015
3015
 
3016
3016
  set backend_plus._mode = normal;
3017
3017
  end if;
3018
- perform set_config('backend_plus._user', p_user, false);
3018
+ perform set_config('backend_plus._user', p_username, false);
3019
3019
  end;
3020
3020
  $body$;
3021
3021
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backend-plus",
3
3
  "description": "Backend for the anti Pareto rule",
4
- "version": "2.5.2-betha.18",
4
+ "version": "2.5.2-betha.20",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/backend-plus",
@@ -45,7 +45,7 @@
45
45
  "express": "^5.1.0",
46
46
  "express-session": "^1.18.2",
47
47
  "express-useragent": "^1.0.15",
48
- "fs-extra": "^11.3.0",
48
+ "fs-extra": "^11.3.1",
49
49
  "js-to-html": "^1.3.2",
50
50
  "js-yaml": "^4.1.0",
51
51
  "json4all": "^1.4.0",
@@ -56,7 +56,7 @@
56
56
  "mini-tools": "^1.13.4",
57
57
  "moment": "^2.30.1",
58
58
  "multiparty": "^4.2.3",
59
- "nodemailer": "^7.0.5",
59
+ "nodemailer": "^7.0.6",
60
60
  "numeral": "^2.0.6",
61
61
  "pg-promise-strict": "^1.4.3",
62
62
  "pg-triggers": "0.4.3",
@@ -85,8 +85,8 @@
85
85
  "@types/js-yaml": "^4.0.9",
86
86
  "@types/mocha": "^10.0.10",
87
87
  "@types/multiparty": "~4.2.1",
88
- "@types/node": "^24.1.0",
89
- "@types/nodemailer": "^6.4.17",
88
+ "@types/node": "^24.3.0",
89
+ "@types/nodemailer": "^7.0.1",
90
90
  "@types/numeral": "~2.0.5",
91
91
  "@types/session-file-store": "^1.2.5",
92
92
  "@types/stack-trace": "~0.0.33",
@@ -102,7 +102,7 @@
102
102
  "kill-9": "~0.4.3",
103
103
  "mocha": "^11.7.1",
104
104
  "nyc": "^17.1.0",
105
- "puppeteer": "^24.15.0",
105
+ "puppeteer": "^24.17.1",
106
106
  "sinon": "^21.0.0",
107
107
  "supertest": "^7.1.4",
108
108
  "types.d.ts": "~0.6.22",