Przeglądaj źródła

Merge remote-tracking branch 'TSIT/ST24PRJ-702' into develop

card007 4 lat temu
rodzic
commit
725eabb6d8
1 zmienionych plików z 26 dodań i 1 usunięć
  1. 26 1
      src/main/webapp/ux/style24_link.js

+ 26 - 1
src/main/webapp/ux/style24_link.js

@@ -473,7 +473,8 @@ var cfnLoginNaver = function (requestGb, chkRememberMe) {
 	let popupWidth = 600;
 	let popupX = (window.screen.width / 2) - (popupWidth / 2);
 	let popupY = (window.screen.height / 3) - (popupHeight / 3);
-	if ('P' === _frontGb) {
+	var frontGb = cfnCheckMobileDevice();
+	if ('P' === frontGb) {
 		window.open(actionUrl, 'naverLogin', 'top=' + popupY + ',left=' + popupX + ',height=' + popupHeight + ',width=' + popupWidth + ', fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbars=yes', '');
 	} else {
 		document.location.href = actionUrl + '&requestGb=' + requestGb;
@@ -1880,3 +1881,27 @@ function noneImg(noneSrc) {
 	$(noneSrc).css({'opacity':'0'});
 	//$(noneSrc).attr("src", no_src);
 }
+
+/**
+ * @type   : function
+ * @access : public
+ * @desc   : 디바이스 종류 조회
+ * <pre>
+ *        cfnCheckMobileDevice();
+ * </pre>
+ * @since  : 2022/01/12
+ * @author : sshong
+ */
+function cfnCheckMobileDevice() {
+    var mobileKeyWords = new Array('Android', 'iPhone', 'iPod', 'BlackBerry', 'Windows CE', 'SAMSUNG', 'LG', 'MOT', 'SonyEricsson');
+    var device = "";
+    for (var info in mobileKeyWords) {
+        if (navigator.userAgent.match(mobileKeyWords[info]) != null) {
+        	device = "M";
+        	return device;
+        } else{
+        	device = "P";
+        	return device;
+        }
+    }
+}