Sfoglia il codice sorgente

Merge branch 'develop' into bin2107

bin2107 4 anni fa
parent
commit
b405ff720a

+ 18 - 18
src/main/webapp/WEB-INF/views/mob/app/NoticeFormMob.html

@@ -43,16 +43,16 @@
 
 	var pushListInfo = function (pushList) {
 		alert('pushListInfo1 Call ===> ' + pushList);
-		// let orgPushList;
-		// //IOS는 앱에서 BASE64로 인코딩 한후 전달 한다.
-		// if (_osType === 'I') {
-  		// 	orgPushList = window.atob(pushList);
-		// } else if (_osType === 'A') {
-		// 	orgPushList = pushList;
-		// }
+		let orgPushList;
+		//IOS는 앱에서 BASE64로 인코딩 한후 전달 한다.
+		if (_osType === 'I') {
+  			orgPushList = window.atob(pushList);
+		} else if (_osType === 'A') {
+			orgPushList = pushList;
+		}
 
-		if (!gagajf.isNull(pushList)) {
-			let pushListJosn = JSON.parse(pushList);
+		if (!gagajf.isNull(orgPushList)) {
+			let pushListJosn = JSON.parse(orgPushList);
 			let html = '';
 			$.each(pushListJosn.pushList, function(idx, item) {
 				if (_osType === 'I') {
@@ -109,16 +109,16 @@
 
 	var pushListInfo2 = function (pushList) {
 		alert('pushListInfo2 Call ===> ' + pushList);
-		let orgPushList;
-		//IOS는 앱에서 BASE64로 인코딩 한후 전달 한다.
-		if (_osType === 'I') {
-  			orgPushList = window.atob(pushList);
-		} else if (_osType === 'A') {
-			orgPushList = pushList;
-		}
+		// let orgPushList;
+		// //IOS는 앱에서 BASE64로 인코딩 한후 전달 한다.
+		// if (_osType === 'I') {
+  		// 	orgPushList = window.atob(pushList);
+		// } else if (_osType === 'A') {
+		// 	orgPushList = pushList;
+		// }
 
-		if (!gagajf.isNull(orgPushList)) {
-			let pushListJosn = JSON.parse(orgPushList);
+		if (!gagajf.isNull(pushList)) {
+			let pushListJosn = JSON.parse(pushList);
 			let html = '';
 			$.each(pushListJosn.pushList, function(idx, item) {
 				if (_osType === 'I') {

+ 25 - 0
src/main/webapp/ux/plugins/gaga/gaga.validation.js

@@ -717,6 +717,11 @@ var gagajf = {
 			formData.append("policy", policy);
 		}
 
+		// 파일 사이즈 체크
+		if (!gagajf.checkFileSize(file)) {
+			return;
+		}
+		
 		$.ajax({
 			type : 'POST',
 			url : actionUrl,
@@ -1043,6 +1048,26 @@ var gagajf = {
 		});
 
 		return arrValue;
+	},
+	
+	/**
+	 * 파일의 사이즈를 체크한다.
+	 * 예)
+	 * 		gagajf.checkFileSize(file);
+	 * @param  : file - 선택된 파일
+	 * @author : gagamel
+	 * @since  : 2021. 7. 16
+	 */
+	checkFileSize : function(file) {
+		var fileSize = file.size;
+		var maxSize = 1024 * 1024 * 10; // 10MByte
+		
+		if (fileSize > maxSize) {
+			mcxDialog.alert('파일 용량이 10MB를 초과했습니다.');
+			return false;
+		}
+
+		return true;
 	}
 };