From f61485c893d19277c11476a20a5acfc7a30e87c9 Mon Sep 17 00:00:00 2001 From: Jeongkyu Shin Date: Mon, 22 Dec 2014 01:39:34 +0900 Subject: [PATCH] refs #1717 : modified - xhtml header to html5 in javascript. - --- resources/script/common2.js | 89 +++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/resources/script/common2.js b/resources/script/common2.js index 3489a7ffe..6f002f22b 100644 --- a/resources/script/common2.js +++ b/resources/script/common2.js @@ -531,49 +531,50 @@ function isNull(field,message) { function open_img(img_src) { img_view = window.open("", "TatterImagePopup", "width=0, height=0, left=0, top=0, scrollbars=yes, resizable=yes"); img_view.document.write( - '\n' + - '\n' + - ' \n' + - ' :: View :: <\/title>\n' + - ' <meta http-equiv="content-type" content="text/html; charset=utf-8" />\n' + - ' <script type="text/javascript">\n' + - ' //<![CDATA\n' + - ' function getWindowCleintHeight() {\n' + - ' return (window.innerHeight != null) ? window.innerHeight : document.documentElement.clientHeight;\n' + + '<!DOCTYPE html>' + + '<html lang="en">' + + '<head>' + + '<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1.0">' + + ' <title> :: View :: <\/title>\n' + + ' <meta http-equiv="content-type" content="text/html; charset=utf-8" />\n' + + ' <script type="text/javascript">\n' + + ' //<![CDATA\n' + + ' function getWindowCleintHeight() {\n' + + ' return (window.innerHeight != null) ? window.innerHeight : document.documentElement.clientHeight;\n' + + ' }\n' + + ' function getWindowCleintWidth() {\n' + + ' return (window.innerWidth != null) ? window.innerWidth : document.documentElement.clientWidth;\n' + + ' }\n' + + ' function resize(img) {\n' + + ' var imageWidth = img.width+5;\n' + + ' var imageHeight = img.height+5;\n' + + ' var screenWidth = screen.availWidth;\n' + + ' var screenHeight = screen.availHeight;\n' + + ' var windowWidth = imageWidth;\n' + + ' var windowHeight = imageHeight;\n' + + ' var positionX = (screenWidth - imageWidth) / 2;\n' + + ' var positionY = (screenHeight - imageHeight) / 2;\n' + + ' if(imageWidth > screenWidth * 0.8) {\n' + + ' windowWidth = screenWidth * 0.8;\n' + + ' document.body.scroll ="yes";\n' + + ' positionX = 0;\n' + ' }\n' + - ' function getWindowCleintWidth() {\n' + - ' return (window.innerWidth != null) ? window.innerWidth : document.documentElement.clientWidth;\n' + - ' }\n' + - ' function resize(img) {\n' + - ' var imageWidth = img.width+5;\n' + - ' var imageHeight = img.height+5;\n' + - ' var screenWidth = screen.availWidth;\n' + - ' var screenHeight = screen.availHeight;\n' + - ' var windowWidth = imageWidth;\n' + - ' var windowHeight = imageHeight;\n' + - ' var positionX = (screenWidth - imageWidth) / 2;\n' + - ' var positionY = (screenHeight - imageHeight) / 2;\n' + - ' if(imageWidth > screenWidth * 0.8) {\n' + - ' windowWidth = screenWidth * 0.8;\n' + - ' document.body.scroll ="yes";\n' + - ' positionX = 0;\n' + - ' }\n' + - ' if(imageHeight > screenHeight * 0.8 ) {\n' + - ' windowHeight = screenHeight * 0.8;\n' + - ' document.body.scroll ="yes";\n' + - ' positionY = 0;\n' + - ' }\n' + - ' iWidth = windowWidth - getWindowCleintWidth();\n' + - ' iHeight = windowHeight - getWindowCleintHeight();\n' + - ' window.resizeBy(iWidth, iHeight);\n' + - ' window.moveTo(positionX, positionY);\n' + + ' if(imageHeight > screenHeight * 0.8 ) {\n' + + ' windowHeight = screenHeight * 0.8;\n' + + ' document.body.scroll ="yes";\n' + + ' positionY = 0;\n' + ' }\n' + + ' iWidth = windowWidth - getWindowCleintWidth();\n' + + ' iHeight = windowHeight - getWindowCleintHeight();\n' + + ' window.resizeBy(iWidth, iHeight);\n' + + ' window.moveTo(positionX, positionY);\n' + + ' }\n' + ' \/\/]]>\n' + - ' <\/script>\n' + - ' <\/head>\n' + - ' <body style="margin: 0px; padding: 0;">\n' + - ' <a href="javascript:window.close()"><img src="' + img_src + '" style="border: 0px; padding: 0; margin:0;" onload="resize(this)" /><\/a>\n' + - ' <\/body>\n' + + ' <\/script>\n' + + '<\/head>\n' + + '<body style="margin: 0px; padding: 0;">\n' + + ' <a href="javascript:window.close()"><img src="' + img_src + '" style="border: 0px; padding: 0; margin:0;" onload="resize(this)" /><\/a>\n' + + '<\/body>\n' + '<\/html>'); try { @@ -590,12 +591,12 @@ function openFullScreen(content,caption,root) { try { /* var code ='\ - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\ - <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">\ - <head>\ + <!DOCTYPE html>\ + <html lang="en">\ + <head>\ + <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1.0">\ <title>'+caption+' - iMazing\ \ - \