Bladeren bron

Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-view

yhl88 2 jaren geleden
bovenliggende
commit
4d11ddd395

+ 4 - 5
src/main/webapp/bootstrap-fileUpload/dist/bootstrap-FileUpload.js

@@ -271,8 +271,8 @@
271 271
 				var html = '';
272 272
 				html += '<table class="table fileupload-download">';
273 273
 				html += '<tbody>';
274
-				$.each(result, function (key, value) {
275
-					if(instance[el].options.showThumb == true) {
274
+				$.each(result, function (key, value) { 
275
+					if(instance[el].options.showThumb == true && value.fileOrgNm.match(/\.(jpg|jpeg|png|gif|bmp|svg|ico)$/i) ) {
276 276
 						html += '<tr class="fileupload-downloadrow thumb row">';
277 277
 						html += '<td class="col-xs-1"><img src="'+value.filePath+'" alt="'+value.fileOrgNm+'" width="80px" height="80px" class="fileupload-previewimg"></td>';
278 278
 					} else {
@@ -385,7 +385,7 @@
385 385
 		availableFileTypes["files"] = ["doc", "docx", "dotx", "docm", "ods", "odt", "ott", "ods", "pdf", "ppt", "pptm", "pptx", "pub", "rtf", "csv", "log", "txt", "xls", "xlsm", "xlsx"];
386 386
 		availableFileTypes["images"] = ["bmp", "tif", "tiff", "gif", "jpeg", "jpg", "png", "svg", "ico", "raw"];
387 387
 		availableFileTypes["video"] = ["avi", "flv", "swf", "m4v", "mkv", "mov", "mp4", "ogv", "wmv"];
388
-
388
+ 
389 389
 		buildFileTypes(el);
390 390
 
391 391
 		if (instance[el].options.debug !== true && instance[el].options.debug !== false) {
@@ -717,7 +717,7 @@
717 717
 	 */
718 718
 	function genThumb (el, file, fileType, fileExt) {
719 719
 		var thumb;
720
-
720
+		console.log("genThumb fileType == "+fileType)
721 721
 		switch (fileType) {
722 722
 			case 'archives':
723 723
 				if (instance[el].options.useFontAwesome === true && instance[el].options.fontAwesomeVer !== false) {
@@ -801,7 +801,6 @@
801 801
 
802 802
 				break;
803 803
 		}
804
-
805 804
 		return thumb;
806 805
 	}
807 806
 

+ 38 - 1
src/main/webapp/js/app/stinfo/ITP_STINFO05010.js

@@ -431,12 +431,49 @@ let viewObj = {
431 431
 		$('#ITP_FORM_STINFO05010_VIEW .fnRegDt').text(result.sysRegDttm);
432 432
 		$('#ITP_FORM_STINFO05010_VIEW .fnChgId').text(result.sysChgId);
433 433
 		$('#ITP_FORM_STINFO05010_VIEW .fnChgDt').text(result.sysChgDttm);
434
-
434
+		fileUploadInfo5010(result.imageFileNoList);
435
+		/*
435 436
 		itp_fn_attach_file.view('ITP_FORM_STINFO05010_VIEW_FILE', result.imageFileNoList
436 437
 			, 'form-control itp_input', 'border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;');
438
+		*/
437 439
 	}
438 440
 };
439 441
 
442
+
443
+function fileUploadInfo5010(arr) {
444
+	//파일업로드(등록/수정화면)
445
+	var uid='#ITP_FORM_STINFO05010_VIEW_FILE'; 
446
+    $(uid).empty();
447
+	if(Array.isArray(arr) && arr.length ) {
448
+		var sid='ITP_FORM_STINFO05010_VIEW';
449
+		var fileNo=arr[0].fileNo;
450
+		$(uid).bootstrapFileUpload({
451
+			url: DOMAIN + '/api/file/upload',
452
+			inputName: 'uploadFile',
453
+			folderName: 'affl',
454
+			fileNumber:  fileNo,
455
+			fileInput: null,
456
+			fileTypes: ITP_UPLOAD_DEFAULTS.fileTypes,
457
+			viewCode: 'R',
458
+			formMethod: 'post',
459
+			multiFile: true,
460
+			multiUpload: false,
461
+			maxSize: 100,
462
+			maxFiles: 5,
463
+			showThumb: false,
464
+			thumbWidth: 80,
465
+			thumbHeight: 80,
466
+			debug: true, 
467
+			screen_id: sid,
468
+			showYn: true 
469
+		});
470
+		setTimeout(function() {
471
+			$('#'+sid+'_UPLOAD_FORM').hide();
472
+		},20);
473
+	}
474
+}
475
+
476
+
440 477
 /*수정화면 Object*/
441 478
 let modifyObj = {
442 479
 	init: function () {