jsharmony 1.3.0 → 1.5.2

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/AppSrv.Report.js CHANGED
@@ -36,12 +36,22 @@ exports.getReport = function (req, res, fullmodelid, Q, P, callback) {
36
36
  HelperFS.getFileStats(req, res, tmppath, function (err, stat) {
37
37
  if (err != null) return dispose();
38
38
  var fsize = stat.size;
39
- //Get MIME type
40
- res.writeHead(200, {
41
- 'Content-Type': 'application/pdf',
42
- 'Content-Length': stat.size,
43
- 'Content-Disposition': 'filename = ' + encodeURIComponent(fullmodelid + '.pdf')
44
- });
39
+ var model = _this.jsh.getModel(req, fullmodelid);
40
+ //Send MIME type
41
+ if(model.format=='xlsx'){
42
+ res.writeHead(200, {
43
+ 'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
44
+ 'Content-Length': fsize,
45
+ 'Content-Disposition': 'filename = ' + encodeURIComponent(fullmodelid + '.xlsx')
46
+ });
47
+ }
48
+ else {
49
+ res.writeHead(200, {
50
+ 'Content-Type': 'application/pdf',
51
+ 'Content-Length': fsize,
52
+ 'Content-Disposition': 'filename = ' + encodeURIComponent(fullmodelid + '.pdf')
53
+ });
54
+ }
45
55
  var rs = fs.createReadStream(tmppath);
46
56
  rs.pipe(res).on('finish', function () { dispose(); });
47
57
  });
package/AppSrvModel.js CHANGED
@@ -615,7 +615,7 @@ AppSrvModel.prototype.copyModelFields = function (req, res, rslt, srcobj, target
615
615
  copyValues(dstfield, srcfield, [
616
616
  'name', 'key', 'control', 'caption', 'caption_ext', 'captionstyle', 'captionclass', 'captioncolon', 'nl', 'eol', 'type', 'length',
617
617
  'value', 'controlclass', 'target', 'bindings', 'format', 'readonly', 'hints', 'always_editable', 'focus', 'locked_by_querystring', 'ongetvalue', 'onenabled', 'ondisabled', 'unbound', 'onchange', 'onclick', 'hidden',
618
- 'html', 'cellstyle', 'cellclass', 'lovkey', 'controlstyle', 'block', 'blockstyle', 'blockclass', 'disable_sort', 'disable_search'
618
+ 'html', 'cellstyle', 'cellclass', 'lovkey', 'controlstyle', 'block', 'blockstyle', 'blockclass', 'nowrap', 'disable_sort', 'disable_search'
619
619
  ]);
620
620
  if (srcfield.popuplov) dstfield.popuplov = 1;
621
621
  if (srcfield.sqlsearchsound) dstfield.search_sound = 1;