cronapp-framework-js 2.9.6-SP.40 → 2.9.6-SP.41

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/js/directives.js CHANGED
@@ -2989,7 +2989,11 @@
2989
2989
  var cronappDatasource = this.dataSource.transport.options.cronappDatasource;
2990
2990
  if (!(cronappDatasource.inserting || cronappDatasource.editing)) {
2991
2991
  if (this.selectable) {
2992
+ setToActiveInCronappDataSource.bind(this)(e.data);
2992
2993
  this.select(e.masterRow);
2994
+ if (options.columns.find(c => c.dataType == 'Selectable') !== undefined) {
2995
+ collapseAllExcecptCurrent(this, e.detailRow, e.masterRow);
2996
+ }
2993
2997
  }
2994
2998
  else {
2995
2999
  setToActiveInCronappDataSource.bind(this)(e.data);
@@ -3217,14 +3221,19 @@
3217
3221
  },
3218
3222
  change: function(e) {
3219
3223
  var item = this.dataItem(this.select());
3220
- setToActiveInCronappDataSource.bind(this)(item);
3221
3224
  var cronappDatasource = this.dataSource.transport.options.cronappDatasource;
3222
3225
  if(options.fieldType && options.fieldType === 'key'){
3223
3226
  cronappDatasource.active = helperDirective.changeObjectField(cronappDatasource, cronappDatasource.active);
3224
3227
  }
3228
+
3229
+ let trDetails = this.select().next();
3230
+ let trMasters = this.select();
3231
+
3225
3232
  if (ngModelCtrl) {
3226
3233
  if ("multiple" === options.allowSelectionRowType) {
3227
3234
  let selecteds = [];
3235
+ trDetails = [];
3236
+ trMasters = [];
3228
3237
  this.select().each((i, row)=> {
3229
3238
  let item = this.dataItem(row);
3230
3239
  let objInDs = cronappDatasource.findObjInDs(item, false);
@@ -3234,6 +3243,10 @@
3234
3243
  if (objInDs !== null){
3235
3244
  selecteds.push(objInDs);
3236
3245
  }
3246
+ if (item["_objectKey"] === cronappDatasource.active["_objectKey"]) {
3247
+ trMasters.push(this.select()[i]);
3248
+ trDetails.push(this.select().next()[i]);
3249
+ }
3237
3250
  });
3238
3251
  ngModelCtrl.$setViewValue(selecteds);
3239
3252
  }
@@ -3246,7 +3259,7 @@
3246
3259
  }
3247
3260
  }
3248
3261
  }
3249
- collapseAllExcecptCurrent(this, this.select().next(), this.select());
3262
+ collapseAllExcecptCurrent(this, trDetails, trMasters);
3250
3263
 
3251
3264
  if (attrs && attrs.ngChange) {
3252
3265
  scope.$eval(attrs.ngChange);
@@ -3269,8 +3282,8 @@
3269
3282
  command = 'edit';
3270
3283
  }
3271
3284
 
3272
- let modelName = helperDirective.getModelName(attrs);
3273
- if (item && item["_objectKey"]) {
3285
+ let modelName = helperDirective.getModelName(attrs);
3286
+ if (item && item["_objectKey"]) {
3274
3287
  let key = item["_objectKey"];
3275
3288
  let id = `${modelName}-${command}-${key}`;
3276
3289
  $elem.attr('id', id);
@@ -14,7 +14,7 @@
14
14
  // data
15
15
  this.getReport = function(reportName) {
16
16
  var req = {
17
- url : 'api/rest/report',
17
+ url : window.hostApp + 'api/rest/report',
18
18
  method : 'POST',
19
19
  data : angular.toJson({
20
20
  'reportName' : reportName
@@ -26,7 +26,7 @@
26
26
  // bytes[]
27
27
  this.getPDF = function(report) {
28
28
  var req = {
29
- url : 'api/rest/report/pdf',
29
+ url : window.hostApp + 'api/rest/report/pdf',
30
30
  method : 'POST',
31
31
  responseType : 'arraybuffer',
32
32
  data : angular.toJson(report)
@@ -37,7 +37,7 @@
37
37
  // file
38
38
  this.getPDFAsFile = function(report) {
39
39
  var req = {
40
- url : 'api/rest/report/pdfasfile',
40
+ url : window.hostApp + 'api/rest/report/pdfasfile',
41
41
  method : 'POST',
42
42
  data : angular.toJson(report)
43
43
  };
@@ -46,7 +46,7 @@
46
46
 
47
47
  this.getContentAsString = function(report) {
48
48
  var req = {
49
- url : 'api/rest/report/contentasstring',
49
+ url : window.hostApp + 'api/rest/report/contentasstring',
50
50
  method : 'POST',
51
51
  data : angular.toJson(report)
52
52
  };
@@ -55,7 +55,7 @@
55
55
 
56
56
  this.getDataSourcesParams = function(datasourcesInBand) {
57
57
  var req = {
58
- url : 'api/rest/report/getdatasourcesparams',
58
+ url : window.hostApp + 'api/rest/report/getdatasourcesparams',
59
59
  method : 'POST',
60
60
  data : angular.toJson(datasourcesInBand)
61
61
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cronapp-framework-js",
3
- "version": "2.9.6-SP.40",
3
+ "version": "2.9.6-SP.41",
4
4
  "description": "Javascript library for CronApp's projects",
5
5
  "main": "cronapp.framework.js",
6
6
  "scripts": {