@fluxhub/fluxhub-lib 1.0.209 → 1.0.210
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/bundles/fluxhub-fluxhub-lib.umd.js +44 -7
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/docs/components/FHUploadComponent.html +72 -3
- package/docs/components/FHUploadPanelComponent.html +33 -3
- package/docs/components/win_uploads.html +70 -6
- package/docs/coverage.html +3 -3
- package/docs/js/search/search_index.js +2 -2
- package/esm2015/lib/controls/fhupload.js +19 -4
- package/esm2015/lib/controls/fhuploadpanel.js +19 -3
- package/esm2015/lib/wkf_engine/win_uploads.js +35 -6
- package/esm5/lib/controls/fhupload.js +20 -5
- package/esm5/lib/controls/fhuploadpanel.js +10 -2
- package/esm5/lib/wkf_engine/win_uploads.js +23 -3
- package/fesm2015/fluxhub-fluxhub-lib.js +65 -11
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +45 -8
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhupload.d.ts +3 -2
- package/lib/controls/fhuploadpanel.d.ts +1 -0
- package/lib/wkf_engine/win_uploads.d.ts +3 -2
- package/package.json +1 -1
|
@@ -3031,6 +3031,7 @@
|
|
|
3031
3031
|
this.enabled = true;
|
|
3032
3032
|
this.label = '';
|
|
3033
3033
|
this.sovrascrivi_path = '';
|
|
3034
|
+
this.access_control = false;
|
|
3034
3035
|
this.change = new i0.EventEmitter();
|
|
3035
3036
|
this.App = '';
|
|
3036
3037
|
this.K = '';
|
|
@@ -3107,6 +3108,7 @@
|
|
|
3107
3108
|
* @return {?}
|
|
3108
3109
|
*/
|
|
3109
3110
|
function () {
|
|
3111
|
+
console.log('INIT1');
|
|
3110
3112
|
this.upc.single = false;
|
|
3111
3113
|
this.b_mobile = this._appservice.getState().pageFullscreen;
|
|
3112
3114
|
this
|
|
@@ -3163,13 +3165,16 @@
|
|
|
3163
3165
|
if ('3G2|3GA|3GP|7Z|AA|AAC|AC|ACCDB|ACCDT|ADN|AI|AIF|AIFC|AIFF|AIT|AMR|ANI|APK|APP|APPLESCRIPT|ASAX|ASC|ASCX|ASF|ASH|ASHX|ASMX|ASP|ASPX|ASX|AU|AUP|AVI|AXD|AZE|BAK|BASH|BAT|BIN|BLANK|BMP|BOWERRC|BPG|BROWSER|BZ2|C|CAB|CAD|CAF|CAL|CD|CER|CFG|CFM|CFML|CGI|CLASS|CMD|CODEKIT|COFFEE|COFFEELINTIGNORE|COM|COMPILE|CONF|CONFIG|CPP|CPTX|CR2|CRDOWNLOAD|CRT|CRYPT|CS|CSH|CSON|CSPROJ|CSS|CSV|CUE|DAT|DB|DBF|DEB|DGN|DIST|DIZ|DLL|DMG|DNG|DOC|DOCB|DOCM|DOCX|DOT|DOTM|DOTX|DOWNLOAD|DPJ|DS_STORE|DTD|DWG|DXF|EDITORCONFIG|EL|ENC|EOT|EPS|EPUB|ESLINTIGNORE|EXE|F4V|FAX|FB2|FLA|FLAC|FLV|FOLDER|GADGET|GDP|GEM|GIF|GITATTRIBUTES|GITIGNORE|GO|GPG|GZ|H|HANDLEBARS|HBS|HEIC|HS|HSL|HTM|HTML|IBOOKS|ICNS|ICO|ICS|IDX|IFF|IFO|IMAGE|IMG|IN|INDD|INF|INI|ISO|J2|JAR|JAVA|JPE|JPEG|JPG|JS|JSON|JSP|JSX|KEY|KF8|KMK|KSH|KUP|LESS|LEX|LICX|LISP|LIT|LNK|LOCK|LOG|LUA|M|M2V|M3U|M3U8|M4|M4A|M4R|M4V|MAP|MASTER|MC|MD|MDB|MDF|ME|MI|MID|MIDI|MK|MKV|MM|MO|MOBI|MOD|MOV|MP2|MP3|MP4|MPA|MPD|MPE|MPEG|MPG|MPGA|MPP|MPT|MSI|MSU|NEF|NES|NFO|NIX|NPMIGNORE|ODB|ODS|ODT|OGG|OGV|OST|OTF|OTT|OVA|OVF|P12|P7B|PAGES|PART|PCD|PDB|PDF|PEM|PFX|PGP|PH|PHAR|PHP|PKG|PL|PLIST|PM|PNG|PO|POM|POT|POTX|PPS|PPSX|PPT|PPTM|PPTX|PROP|PS|PS1|PSD|PSP|PST|PUB|PY|PYC|QT|RA|RAM|RAR|RAW|RB|RDF|RESX|RETRY|RM|ROM|RPM|RSA|RSS|RTF|RU|RUB|SASS|SCSS|SDF|SED|SH|SITEMAP|SKIN|SLDM|SLDX|SLN|SOL|SQL|SQLITE|STEP|STL|SVG|SWD|SWF|SWIFT|SYS|TAR|TCSH|TEX|TFIGNORE|TGA|TGZ|TIF|TIFF|TMP|TORRENT|TS|TSV|TTF|TWIG|TXT|UDF|VB|VBPROJ|VBS|VCD|VCS|VDI|VDX|VMDK|VOB|VSCODEIGNORE|VSD|VSS|VST|VSX|VTX|WAR|WAV|WBK|WEBINFO|WEBM|WEBP|WMA|WMF|WMV|WOFF|WOFF2|WPS|WSF|XAML|XCF|XLM|XLS|XLSM|XLSX|XLT|XLTM|XLTX|XML|XPI|XPS|XRB|XSD|XSL|XSPF|XZ|YAML|YML|Z|ZIP|ZSH'.indexOf(arrf[arrf.length - 1].toLocaleUpperCase()) != -1)
|
|
3164
3166
|
iconf = arrf[arrf.length - 1].toLocaleLowerCase();
|
|
3165
3167
|
_this.arr_g[i].icon = iconf + '.svg';
|
|
3168
|
+
_this.arr_g[i].can_delete = !_this.access_control || _this.arr_g[i].idp == _this._appservice.user;
|
|
3166
3169
|
}
|
|
3170
|
+
if (_this.upc == null)
|
|
3171
|
+
_this.upc.lista_allegati = _this.arr_g;
|
|
3167
3172
|
}
|
|
3168
3173
|
});
|
|
3169
3174
|
};
|
|
3170
3175
|
FHUploadPanelComponent.decorators = [
|
|
3171
3176
|
{ type: i0.Component, args: [{
|
|
3172
|
-
selector: 'FHUploadPanel', template: "\n <div fxLayout=\"column\">\n\n <h3>{{label}}</h3>\n\n <div fxLayout=\"column\">\n <div [hidden]=\"!enabled\">\n <FHUpload [single]=\"b_False\" (change)=\"ref_allegato()\" #upc></FHUpload>\n <br></div>\n\n <table width=\"98%\" class=\"fh_table\">\n <thead *ngIf=\"!b_mobile\">\n <tr class=\"header\">\n <th style=\"width:40px\"></th>\n <th style=\"width:50%\">Nome</th>\n <th style=\"width:60px;text-align:center\">Dim.</th>\n <th style=\"width:50%\">Descrizione</th>\n <th style=\"width:240px;text-align:center\">Data</th>\n <th style=\"width:40px\" class=\"actions\"></th>\n <th *ngIf=\"enabled\" style=\"width:40px\" class=\"actions\"></th>\n </tr>\n </thead>\n <tbody>\n\n <tr *ngFor=\"let app of arr_g\" style=\"font-size: 12px;\">\n <td style=\"text-align:center;vertical-align: middle;width:36px;height:36px;\">\n <div style=\"text-align:center;vertical-align: middle;width:28px;height:28px;\">\n <img src=\"assets/icons/square-o/{{app.icon}}\" style=\"width:28px;height:28px;\"></div> </td>\n <td *ngIf=\"b_mobile\" style=\"text-align:center\">{{app.Filename}}<br><br>\n <button (click)=\"download_all(app)\" mat-raised-button>DOWNLOAD</button>\n </td>\n <td *ngIf=\"!b_mobile\">{{app.Filename}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">{{app.Filesize}}</td>\n <td *ngIf=\"!b_mobile\">{{app.descrizione}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">\n <button mat-icon-button matTooltip=\"Download File\" (click)=\"download_all(app)\">\n <mat-icon>save_alt</mat-icon>\n </button>\n </td>\n\n <td *ngIf=\"enabled\" style=\"text-align:center\">\n <a mat-icon-button matTooltip=\"Elimina File\" *ngIf=\"
|
|
3177
|
+
selector: 'FHUploadPanel', template: "\n <div fxLayout=\"column\">\n\n <h3>{{label}}</h3>\n\n <div fxLayout=\"column\">\n <div [hidden]=\"!enabled\">\n <FHUpload [single]=\"b_False\" (change)=\"ref_allegato()\" #upc></FHUpload>\n <br></div>\n\n <table width=\"98%\" class=\"fh_table\">\n <thead *ngIf=\"!b_mobile\">\n <tr class=\"header\">\n <th style=\"width:40px\"></th>\n <th style=\"width:50%\">Nome</th>\n <th style=\"width:60px;text-align:center\">Dim.</th>\n <th style=\"width:50%\">Descrizione</th>\n <th style=\"width:30%\">Utente</th>\n <th style=\"width:240px;text-align:center\">Data</th>\n <th style=\"width:40px\" class=\"actions\"></th>\n <th *ngIf=\"enabled\" style=\"width:40px\" class=\"actions\"></th>\n </tr>\n </thead>\n <tbody>\n\n <tr *ngFor=\"let app of arr_g\" style=\"font-size: 12px;\">\n <td style=\"text-align:center;vertical-align: middle;width:36px;height:36px;\">\n <div style=\"text-align:center;vertical-align: middle;width:28px;height:28px;\">\n <img src=\"assets/icons/square-o/{{app.icon}}\" style=\"width:28px;height:28px;\"></div> </td>\n <td *ngIf=\"b_mobile\" style=\"text-align:center\">{{app.Filename}}<br><br>\n <button (click)=\"download_all(app)\" mat-raised-button>DOWNLOAD</button>\n </td>\n <td *ngIf=\"!b_mobile\">{{app.Filename}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">{{app.Filesize}}</td>\n <td *ngIf=\"!b_mobile\">{{app.descrizione}}</td>\n <td *ngIf=\"!b_mobile\">{{app.nc}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">\n <button mat-icon-button matTooltip=\"Download File\" (click)=\"download_all(app)\">\n <mat-icon>save_alt</mat-icon>\n </button>\n </td>\n\n <td *ngIf=\"enabled\" style=\"text-align:center\">\n <a mat-icon-button matTooltip=\"Elimina File\" *ngIf=\"app.can_delete\" (click)=\"delete(app)\">\n <mat-icon>delete</mat-icon>\n </a>\n\n <a mat-icon-button [matTooltip]=\"'Cancellazione consentita solo a: '+app.nc\" *ngIf=\"!app.can_delete\" [disabled]=\"true\" >\n <mat-icon>delete</mat-icon>\n </a>\n \n </td>\n\n </tr>\n </table>\n\n </div>\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n\n ",
|
|
3173
3178
|
styles: ["\n\n \n\n "]
|
|
3174
3179
|
}] }
|
|
3175
3180
|
];
|
|
@@ -3187,6 +3192,7 @@
|
|
|
3187
3192
|
enabled: [{ type: i0.Input }],
|
|
3188
3193
|
label: [{ type: i0.Input }],
|
|
3189
3194
|
sovrascrivi_path: [{ type: i0.Input }],
|
|
3195
|
+
access_control: [{ type: i0.Input }],
|
|
3190
3196
|
change: [{ type: i0.Output }],
|
|
3191
3197
|
upc: [{ type: i0.ViewChild, args: ['upc',] }]
|
|
3192
3198
|
};
|
|
@@ -3280,6 +3286,7 @@
|
|
|
3280
3286
|
this.b_edit_loaded = false;
|
|
3281
3287
|
this.tipo = '';
|
|
3282
3288
|
this.b_ini = false;
|
|
3289
|
+
this.lista_allegati = [];
|
|
3283
3290
|
this.uploader = new ng2FileUpload.FileUploader({
|
|
3284
3291
|
url: this.app_s.API_ENDPOINT + this.app_s.UPLOAD_ENDPOINT,
|
|
3285
3292
|
'maxFileSize': 500 * 1024 * 1024
|
|
@@ -3308,6 +3315,7 @@
|
|
|
3308
3315
|
*/
|
|
3309
3316
|
function () {
|
|
3310
3317
|
var _this = this;
|
|
3318
|
+
console.log('INIT');
|
|
3311
3319
|
/** @type {?} */
|
|
3312
3320
|
var uo = {};
|
|
3313
3321
|
uo.headers = [{ name: 'Authorization', value: 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token") }];
|
|
@@ -3324,8 +3332,9 @@
|
|
|
3324
3332
|
this.uploader.onErrorItem = function (a, b, c, d) {
|
|
3325
3333
|
_this.toastr.error(b);
|
|
3326
3334
|
};
|
|
3327
|
-
this.uploader.onAfterAddingFile = function () {
|
|
3328
|
-
|
|
3335
|
+
this.uploader.onAfterAddingFile = function (fileItem) {
|
|
3336
|
+
console.log('onAfterAddingFile');
|
|
3337
|
+
_this.ch(fileItem);
|
|
3329
3338
|
};
|
|
3330
3339
|
this.uploader.onProgressItem = function (fileItem, progress) {
|
|
3331
3340
|
// console.log(fileItem);
|
|
@@ -3357,17 +3366,27 @@
|
|
|
3357
3366
|
window.open(this.app_s.COMPANY_SITE_ROOT + '/uploads/' + this.App + '/' + this.K + '/' + this.file_name);
|
|
3358
3367
|
};
|
|
3359
3368
|
/**
|
|
3369
|
+
* @param {?} fileItem
|
|
3360
3370
|
* @return {?}
|
|
3361
3371
|
*/
|
|
3362
3372
|
FHUploadComponent.prototype.ch = /**
|
|
3373
|
+
* @param {?} fileItem
|
|
3363
3374
|
* @return {?}
|
|
3364
3375
|
*/
|
|
3365
|
-
function () {
|
|
3376
|
+
function (fileItem) {
|
|
3366
3377
|
var _this = this;
|
|
3367
3378
|
if (this.descri_obb && this.descrizione == '') {
|
|
3368
3379
|
this.toastr.error(this.inserire_descrizione);
|
|
3369
3380
|
return;
|
|
3370
3381
|
}
|
|
3382
|
+
console.log('this.lista_allegati ', this.lista_allegati);
|
|
3383
|
+
console.log('fileItem ', fileItem);
|
|
3384
|
+
for (var i = 0; i < this.lista_allegati.length; i++) {
|
|
3385
|
+
if (this.lista_allegati[i].Filename.toLowerCase() == fileItem.file.name.toLowerCase()) {
|
|
3386
|
+
this.toastr.error('File già presente (cancellarlo per aggiornarlo)');
|
|
3387
|
+
return;
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3371
3390
|
this.uploader.onBuildItemForm = function (item, form) {
|
|
3372
3391
|
form.append('App', _this.App);
|
|
3373
3392
|
form.append('K', _this.K);
|
|
@@ -3457,7 +3476,7 @@
|
|
|
3457
3476
|
FHUploadComponent.decorators = [
|
|
3458
3477
|
{ type: i0.Component, args: [{
|
|
3459
3478
|
selector: 'FHUpload',
|
|
3460
|
-
template: "\n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div *ngIf=\"enabled && !loading\" fxLayout=\"row\">\n <mat-form-field class=\"field_style\">\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\"\n placeholder=\"{{label}} {{fixed_label}}\">\n </mat-form-field>\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple/>\n <div>\n <button mat-raised-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\">{{label_b}}</button>\n </div>\n </div>\n <div *ngIf=\"!enabled\">\n <label>{{label}}:</label>{{descrizione}}\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n ",
|
|
3479
|
+
template: "\n aaaazzz\n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div *ngIf=\"enabled && !loading\" fxLayout=\"row\">\n <mat-form-field class=\"field_style\">\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\"\n placeholder=\"{{label}} {{fixed_label}}\">\n </mat-form-field>\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple/>\n <div>\n <button mat-raised-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\">{{label_b}}</button>\n </div>\n </div>\n <div *ngIf=\"!enabled\">\n <label>{{label}}:</label>{{descrizione}}\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n ",
|
|
3461
3480
|
styles: ["\n\n "]
|
|
3462
3481
|
}] }
|
|
3463
3482
|
];
|
|
@@ -10004,6 +10023,7 @@
|
|
|
10004
10023
|
this.app_s = app_s;
|
|
10005
10024
|
this.enabled = true;
|
|
10006
10025
|
this.change = new i0.EventEmitter();
|
|
10026
|
+
this.access_control = true;
|
|
10007
10027
|
this.App = '';
|
|
10008
10028
|
this.K = '';
|
|
10009
10029
|
this.b_edit_loaded = false;
|
|
@@ -10095,13 +10115,23 @@
|
|
|
10095
10115
|
});
|
|
10096
10116
|
};
|
|
10097
10117
|
/**
|
|
10118
|
+
* @param {?} fileItem
|
|
10098
10119
|
* @return {?}
|
|
10099
10120
|
*/
|
|
10100
10121
|
win_uploads.prototype.ch = /**
|
|
10122
|
+
* @param {?} fileItem
|
|
10101
10123
|
* @return {?}
|
|
10102
10124
|
*/
|
|
10103
|
-
function () {
|
|
10125
|
+
function (fileItem) {
|
|
10104
10126
|
var _this = this;
|
|
10127
|
+
console.log('this.arr_g ', this.arr_g);
|
|
10128
|
+
console.log('fileItem ', fileItem);
|
|
10129
|
+
for (var i = 0; i < this.arr_g.length; i++) {
|
|
10130
|
+
if (this.arr_g[i].Filename.toLowerCase() == fileItem.file.name.toLowerCase()) {
|
|
10131
|
+
this.toastr.error('File già presente (cancellarlo per aggiornarlo)');
|
|
10132
|
+
return;
|
|
10133
|
+
}
|
|
10134
|
+
}
|
|
10105
10135
|
this.uploader.onBuildItemForm = function (item, form) {
|
|
10106
10136
|
form.append('App', _this.App);
|
|
10107
10137
|
form.append('K', _this.K);
|
|
@@ -10151,6 +10181,7 @@
|
|
|
10151
10181
|
if ('3G2|3GA|3GP|7Z|AA|AAC|AC|ACCDB|ACCDT|ADN|AI|AIF|AIFC|AIFF|AIT|AMR|ANI|APK|APP|APPLESCRIPT|ASAX|ASC|ASCX|ASF|ASH|ASHX|ASMX|ASP|ASPX|ASX|AU|AUP|AVI|AXD|AZE|BAK|BASH|BAT|BIN|BLANK|BMP|BOWERRC|BPG|BROWSER|BZ2|C|CAB|CAD|CAF|CAL|CD|CER|CFG|CFM|CFML|CGI|CLASS|CMD|CODEKIT|COFFEE|COFFEELINTIGNORE|COM|COMPILE|CONF|CONFIG|CPP|CPTX|CR2|CRDOWNLOAD|CRT|CRYPT|CS|CSH|CSON|CSPROJ|CSS|CSV|CUE|DAT|DB|DBF|DEB|DGN|DIST|DIZ|DLL|DMG|DNG|DOC|DOCB|DOCM|DOCX|DOT|DOTM|DOTX|DOWNLOAD|DPJ|DS_STORE|DTD|DWG|DXF|EDITORCONFIG|EL|ENC|EOT|EPS|EPUB|ESLINTIGNORE|EXE|F4V|FAX|FB2|FLA|FLAC|FLV|FOLDER|GADGET|GDP|GEM|GIF|GITATTRIBUTES|GITIGNORE|GO|GPG|GZ|H|HANDLEBARS|HBS|HEIC|HS|HSL|HTM|HTML|IBOOKS|ICNS|ICO|ICS|IDX|IFF|IFO|IMAGE|IMG|IN|INDD|INF|INI|ISO|J2|JAR|JAVA|JPE|JPEG|JPG|JS|JSON|JSP|JSX|KEY|KF8|KMK|KSH|KUP|LESS|LEX|LICX|LISP|LIT|LNK|LOCK|LOG|LUA|M|M2V|M3U|M3U8|M4|M4A|M4R|M4V|MAP|MASTER|MC|MD|MDB|MDF|ME|MI|MID|MIDI|MK|MKV|MM|MO|MOBI|MOD|MOV|MP2|MP3|MP4|MPA|MPD|MPE|MPEG|MPG|MPGA|MPP|MPT|MSI|MSU|NEF|NES|NFO|NIX|NPMIGNORE|ODB|ODS|ODT|OGG|OGV|OST|OTF|OTT|OVA|OVF|P12|P7B|PAGES|PART|PCD|PDB|PDF|PEM|PFX|PGP|PH|PHAR|PHP|PKG|PL|PLIST|PM|PNG|PO|POM|POT|POTX|PPS|PPSX|PPT|PPTM|PPTX|PROP|PS|PS1|PSD|PSP|PST|PUB|PY|PYC|QT|RA|RAM|RAR|RAW|RB|RDF|RESX|RETRY|RM|ROM|RPM|RSA|RSS|RTF|RU|RUB|SASS|SCSS|SDF|SED|SH|SITEMAP|SKIN|SLDM|SLDX|SLN|SOL|SQL|SQLITE|STEP|STL|SVG|SWD|SWF|SWIFT|SYS|TAR|TCSH|TEX|TFIGNORE|TGA|TGZ|TIF|TIFF|TMP|TORRENT|TS|TSV|TTF|TWIG|TXT|UDF|VB|VBPROJ|VBS|VCD|VCS|VDI|VDX|VMDK|VOB|VSCODEIGNORE|VSD|VSS|VST|VSX|VTX|WAR|WAV|WBK|WEBINFO|WEBM|WEBP|WMA|WMF|WMV|WOFF|WOFF2|WPS|WSF|XAML|XCF|XLM|XLS|XLSM|XLSX|XLT|XLTM|XLTX|XML|XPI|XPS|XRB|XSD|XSL|XSPF|XZ|YAML|YML|Z|ZIP|ZSH'.indexOf(arrf[arrf.length - 1].toLocaleUpperCase()) != -1)
|
|
10152
10182
|
iconf = arrf[arrf.length - 1].toLocaleLowerCase();
|
|
10153
10183
|
_this.arr_g[i].icon = iconf + '.svg';
|
|
10184
|
+
_this.arr_g[i].can_delete = !_this.access_control || _this.arr_g[i].idp == _this.app_s.user;
|
|
10154
10185
|
}
|
|
10155
10186
|
}
|
|
10156
10187
|
});
|
|
@@ -10162,9 +10193,14 @@
|
|
|
10162
10193
|
* @return {?}
|
|
10163
10194
|
*/
|
|
10164
10195
|
function () {
|
|
10196
|
+
var _this = this;
|
|
10165
10197
|
this.App = this.app_s.getState().wkf_doc_info.uiid_app;
|
|
10166
10198
|
this.K = this.app_s.getState().wkf_doc_info.uiid_doc;
|
|
10167
10199
|
this.single = false;
|
|
10200
|
+
this.uploader.onAfterAddingFile = function (fileItem) {
|
|
10201
|
+
console.log('onAfterAddingFile');
|
|
10202
|
+
_this.ch(fileItem);
|
|
10203
|
+
};
|
|
10168
10204
|
this.init(this.App, this.K);
|
|
10169
10205
|
this.ref_allegato();
|
|
10170
10206
|
};
|
|
@@ -10189,7 +10225,7 @@
|
|
|
10189
10225
|
win_uploads.decorators = [
|
|
10190
10226
|
{ type: i0.Component, args: [{
|
|
10191
10227
|
selector: 'wkf_win_upload',
|
|
10192
|
-
template: "\n <mat-toolbar color=\"primary\">{{title}}\n <div style=\"width:100%;text-align: right;\">\n </div>\n\n </mat-toolbar>\n <div mat-dialog-content style=\"min-width:800px\">\n <br>\n <div *ngIf=\"enabled\">\n\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\" placeholder=\"{{label}}\">\n\n\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple
|
|
10228
|
+
template: "\n <mat-toolbar color=\"primary\">{{title}}\n <div style=\"width:100%;text-align: right;\">\n </div>\n\n </mat-toolbar>\n <div mat-dialog-content style=\"min-width:800px\">\n <br>\n <div *ngIf=\"enabled\">\n\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\" placeholder=\"{{label}}\">\n\n\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple />\n <!--<button mat-raised-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\">{{label_b}}</button>-->\n </div>\n <br>\n\n\n <br>\n\n <table style=\"width: 100%;\" class=\"fh_table\">\n <thead>\n <tr>\n <th style=\"width:40px\"></th>\n <th style=\"width:50%\">Nome</th>\n <th style=\"width:60px;text-align:center\">Dim.</th>\n <th style=\"width:50%\">Descrizione</th>\n \n <th style=\"width:30%\">Utente</th>\n <th style=\"width:240px;text-align:center\">Data</th>\n <th style=\"width:40px\" class=\"actions\"></th>\n <th *ngIf=\"enabled\" style=\"width:40px\" class=\"actions\"></th>\n </tr>\n </thead>\n <tbody>\n\n <tr *ngFor=\"let app of arr_g;let odd=odd; let even=even;index as i\" [ngClass]=\"{ odd: odd, even: even }\" >\n <td style=\"text-align:center;vertical-align: middle;width:36px;height:36px;\">\n <div style=\"text-align:center;vertical-align: middle;width:28px;height:28px;\">\n <img src=\"assets/icons/square-o/{{app.icon}}\" style=\"width:28px;height:28px;\"></div> </td>\n <td>{{app.Filename}}</td>\n <td style=\"text-align:center\">{{app.Filesize}}</td>\n <td>{{app.descrizione}}</td>\n <td>{{app.nc}}</td>\n <td style=\"text-align:center\">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>\n <td style=\"text-align:center\">\n <button mat-icon-button matTooltip=\"Download File\" (click)=\"download_all(app)\">\n <mat-icon>save_alt</mat-icon>\n </button>\n </td>\n\n\n <td *ngIf=\"enabled\" style=\"text-align:center\">\n <a mat-icon-button matTooltip=\"Elimina File\" *ngIf=\"app.can_delete\" (click)=\"delete(app)\">\n <mat-icon>delete</mat-icon>\n </a>\n\n <a mat-icon-button [matTooltip]=\"'Cancellazione consentita solo a: '+app.nc\" *ngIf=\"!app.can_delete\" [disabled]=\"true\" >\n <mat-icon>delete</mat-icon>\n </a>\n\n </td>\n </tr>\n </table>\n\n\n </div>\n <div style=\"width:100%;text-align:center;\">\n <button mat-raised-button (click)=\"dialogRef.close('Option 1')\">CHIUDI</button>\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n\n ",
|
|
10193
10229
|
styles: ["\n\n \n "]
|
|
10194
10230
|
}] }
|
|
10195
10231
|
];
|
|
@@ -10207,6 +10243,7 @@
|
|
|
10207
10243
|
enabled: [{ type: i0.Input }],
|
|
10208
10244
|
change: [{ type: i0.Output }],
|
|
10209
10245
|
upc: [{ type: i0.ViewChild, args: ['upc',] }],
|
|
10246
|
+
access_control: [{ type: i0.Input }],
|
|
10210
10247
|
single: [{ type: i0.Input }]
|
|
10211
10248
|
};
|
|
10212
10249
|
return win_uploads;
|