Skip to content

Commit

Permalink
refs #1717 : modified - xhtml header to html5 in javascript.
Browse files Browse the repository at this point in the history
 -
  • Loading branch information
inureyes committed Dec 21, 2014
1 parent 8c00ab1 commit f61485c
Showing 1 changed file with 45 additions and 44 deletions.
89 changes: 45 additions & 44 deletions resources/script/common2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n' +
'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n' +
' <head>\n' +
' <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' +
'<!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 {
Expand All @@ -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</title>\
<script type="text/javascript" src="'+root+'/resources/script/common2.js"></script>\
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\
<style>\
body {\
margin:0px; \
Expand Down

0 comments on commit f61485c

Please # to comment.