Commit d00b065d by Motohisa Nakano

20121221-2

parent c5d1041c
This source diff could not be displayed because it is too large. You can view the blob instead.
eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--)d[c]=k[c]||c;k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('1 15="/70/10/3";1 40="/71";1 12="69";1 30="67";$(6(){1 26=11.26.68().72();4(26.43(40)<0){15="."+40+15}22{15="."+15}1 3="21";1 5=11.58;4(5){1 3=5.23(12);4(!3){3=31()}}34(3)});6 31(){1 3=(39.77||39.46||39.73);1 35=[\'45\',\'44\',\'21\'];4(3.74(/45|44|21/59)){42(1 9=0;9<35.41;9++){1 38=3.43(35[9]);4(38>=0){3=3.65(38,2);66}}}22{3=\'21\';}14 3};6 34(3){1 19="3-"+3+".10";$.62({63:15+"/"+19,78:48,92:\'10\',94:48,93:6(47){91.96.3=3;1 8=47;33(8);57(3,8)},18:6(51,50,49){1 18=\'101 99 97 98 46 82 \'+19+\'. 83 84 79.\';18+=\'\\80\'+51.88+\' \'+50+\' \'+49+\' : \'+19;85(18)}})};6 33(8){1 29=$(\'.3\').41;4(29>0){42(1 9=0;9<29;9++){1 7=$(\'.3:87(\'+9+\')\');1 28=7.32(\'3\');4(28){1 20=36(8,28);1 52=7.86()[0].90;4(52==\'89\'){4(7.32(\'56\')==\'81\'||7.32(\'56\')==\'100\'){7.95(20)}22{7.16(20)}}22{7.16(20)}}}}};6 60(){1 5=11.25;4(5){1 13=5.23(12);4(13){1 10=37.55(13);33(10)}}};6 64(17){1 5=11.25;4(5){1 13=5.23(12);4(13){1 10=37.55(13);14 36(10,17)}}14"53"};6 36(8,17){4(8){1 16=8[17];14 16}14"53."};6 61(3){1 5=11.58;4(5){5.27(12,3)}34(3)};6 57(3,54){1 24=11.25;4(24){24.27(12,37.75(54));24.27(30,3)}};6 76(){1 3;1 5=11.25;4(5){3=5.23(30)}4(!3){3=31()}14 3};',10,102,'|var||lang|if|storage|function|obj|jsonLangData|i|json|window|avwsys_storagekey|value|return|avwsys_location|text|key|error|langfile|langText|en|else|getItem|ss|sessionStorage|location|setItem|langId|itemCount|avwsys_currLang|getNavigatorLanguage|attr|replaceText|loadLanguage|languages|getLangText|JSON|index|navigator|avwsys_dir|length|for|indexOf|ko|ja|language|data|false|errorThrown|txtStatus|xhr|tn|undefined|langData|parse|type|storeCurrentLanguage|localStorage|g|i18nReplaceText|changeLanguage|ajax|url|i18nText|substring|break|AVW_CurrLang|toString|AVWUS_Lang|common|abvw|toLowerCase|userLanguage|match|stringify|getCurrentLanguage|browserLanguage|async|it|n|button|file|please|check|alert|get|eq|status|input|localName|document|dataType|success|cache|val|documentElement|load|a|not|submit|Could'.split('|'),0,{}))
/**
* ABook Viewer for WEB
* 国際化(言語切替)対応共通処理
*
* 言語リソースファイルは、指定する言語に合わせて以下のファイルを修正する
* - 日本語: lang-ja.json
* - 韓国語: lang-ko.json
* - 英語 : lang-en.json
*
* Copyright (C) Agentec Co, Ltd. All rights reserved.
*/
/**
* 定数:言語ファイル配置場所
*/
var avwsys_location = "/common/json/lang";
var avwsys_dir = "/abvw";
var avwsys_storagekey = "AVWUS_Lang";
var avwsys_currLang = "AVW_CurrLang";
/* 言語の初期化 */
$(function() {
// ログイン画面/直接アクセス対策
var location = window.location.toString().toLowerCase();
if (location.indexOf(avwsys_dir) < 0) {
// avwsys_dirディレクトリ配下ではない場合は、avwsys_dirディレクトリをつける
avwsys_location = "." + avwsys_dir + avwsys_location;
} else {
// avwsys_dirディレクトリ配下の場合は、相対パスに変換
avwsys_location = "." + avwsys_location;
}
var lang = "en";
var storage = window.localStorage;
if(storage) {
var lang = storage.getItem(avwsys_storagekey);
if(!lang) {
lang = getNavigatorLanguage();
}
}
// 言語ファイルを初期化する
loadLanguage(lang);
});
/* ブラウザの言語設定を取得する */
function getNavigatorLanguage() {
var lang = (navigator.browserLanguage || navigator.language || navigator.userLanguage);
/* 対応言語 */
var languages = ['ja','ko','en']; // 対応言語を増やす場合はここを変更する
if(lang.match(/ja|ko|en/g)) {
for(var i = 0; i < languages.length; i++) {
var index = lang.indexOf(languages[i]);
if(index >= 0) {
lang = lang.substring(index, 2);
break;
}
}
} else {
lang = 'en'; // 対応言語が無ければ英語をデフォルトとする
}
return lang;
};
/* 言語リソースファイル読み込み */
function loadLanguage(lang) {
// 引数から言語ファイルを選択
var langfile = "lang-" + lang + ".json";
// 言語ファイルを読み込む
$.ajax({
url: avwsys_location + "/" + langfile,
async: false,
dataType: 'json',
cache: false,
success: function(data) {
// lang属性の書換え
document.documentElement.lang = lang;
// html の言語データを書換える
var jsonLangData = data;
replaceText(jsonLangData);
// 言語設定、言語データをストレージにキャッシュしておく
storeCurrentLanguage(lang, jsonLangData);
},
error: function(xhr, txtStatus, errorThrown) {
var error = 'Could not load a language file ' + langfile + '. please check it.';
error += '\n' + xhr.status + ' ' + txtStatus + ' ' + errorThrown + ' : ' + langfile;
alert(error);
}
});
};
/* ページ内のテキストをすべて言語に合わせて置換する */
function replaceText(jsonLangData) {
var itemCount = $('.lang').length;
if(itemCount > 0) {
for(var i = 0; i < itemCount; i++) {
var obj = $('.lang:eq(' + i + ')');
var langId = obj.attr('lang');
if(langId) {
var langText = getLangText(jsonLangData, langId);
var tn = obj.get()[0].localName;
if(tn == 'input') {
if(obj.attr('type') == 'button' || obj.attr('type') == 'submit') {
obj.val(langText);
} else {
obj.text(langText);
}
} else {
obj.text(langText);
}
}
}
}
};
/* 現在設定されている言語でHTMLテキストを置き換える */
function i18nReplaceText() {
var storage = window.sessionStorage;
if(storage) {
var value = storage.getItem(avwsys_storagekey);
if(value) {
var json = JSON.parse(value);
replaceText(json);
}
}
};
/* キーから文字列を取得 */
function i18nText(key) {
var storage = window.sessionStorage;
if(storage) {
var value = storage.getItem(avwsys_storagekey);
if(value) {
var json = JSON.parse(value);
return getLangText(json, key);
}
}
return "undefined";
};
/* 言語データのキー値から文字列を取得 */
function getLangText(jsonLangData, key) {
if(jsonLangData) {
var text = jsonLangData[key];
return text;
}
return "undefined.";
};
/* 言語データの切り替え */
function changeLanguage(lang) {
// 言語の切替を行った場合のみ選択言語をストアする
var storage = window.localStorage;
if(storage) {
storage.setItem(avwsys_storagekey, lang);
}
// 言語ファイルを読み込み、テキスト文字列を変換する
loadLanguage(lang);
};
/* 設定言語の保存 */
function storeCurrentLanguage(lang, langData) {
var ss = window.sessionStorage;
if(ss) {
// language data
ss.setItem(avwsys_storagekey, JSON.stringify(langData));
// current language
ss.setItem(avwsys_currLang, lang);
}
};
/* 設定言語の取得 */
function getCurrentLanguage() {
var lang;
var storage = window.sessionStorage;
if(storage) {
lang = storage.getItem(avwsys_currLang);
}
if(!lang) {
lang = getNavigatorLanguage();
}
return lang;
};
eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--)d[c]=k[c]||c;k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('33 69(13,38,58){3 19=67.75(\'19\');19.13=13;19.38=38;3 5=19.74(\'77\');3 41=\'\';3 8=0;3 39=0;3 22=0;3 25=13;3 9=0;3 26=55;3 15=\'37\';3 11=2;41=58.10(/\\\\/,\'\');71(41,{70:33(35,12,73){3 18=35.20();4(18==\'72\'){3 16;32(3 7=0;7<12.29;7++){3 23=12[7].62.20();4(23==\'16\'){16=12[7].34;15=16}}4(16==\'37\'){9=0;5.15=\'37\'}30 4(16==\'43\'){9=25/2;5.15=\'43\'}30 4(16==\'46\'){9=25;5.15=\'46\'}}4(18==\'44\'){3 42=\'76 64\';3 31=\'63\';3 48=\'#66\';32(3 7=0;7<12.29;7++){3 23=12[7].62.20();4(23==\'65\'){42=12[7].34}4(23==\'21\'){3 54=12[7].34;3 40=54.51(\';\');32(3 36=0;36<40.29;36++){3 21=40[36].51(\':\');4(21[0].20()==\'44-68\'){31=21[1]}4(21[0].20()==\'78-38\'){39=52(21[1].10(\'53\',\'\'))}}}4(23==\'93\'){48=12[7].34}}5.44=31+" "+"\'"+42+"\'";5.45=48;22=52(31.10(\'53\',\'\'))*(39/91)}4(18==\'89\'){8+=(22+11)}4(18==\'50\'){26=90}},97:33(35){3 18=35.20();4(18==\'50\'){26=55}},98:33(6){6=6.10(/&96;/17,\' \');6=6.10(/&94;/17,\'>\');6=6.10(/&95;/17,\'<\');6=6.10(/&82;/17,\'&\');6=6.10(/&92;/17,\'(81)\');6=6.10(/&79;/17,\'(80)\');6=6.10(/&87;/17,\'\\\\\');4(8==0){8+=22/2}3 88=0;3 86=0;3 14=\'\';32(3 7=0;7<6.29;7++){3 24=5.84(14+6.47(7),9,8);4(24.13<25){14+=6.47(7)}30{5.14(14,9,8+11);4(26){5.57();5.56(0,8+11);5.61(25,8+11);5.60=5.45;5.59()}8+=(22+11);14=6.47(7)}}4(14.29>0){5.14(14,9,8+11);4(26){3 28,27;4(15==\'37\'){28=0;27=24.13}30 4(15==\'43\'){28=9-(24.13/2);27=9+(24.13/2)}30 4(15=-\'46\'){28=9;27=9-24.13}5.57();5.56(28,8+11);5.61(27,8+11);5.60=5.45;5.59()}8+=(22+11)}}});3 49=19.85();83 49};',10,99,'|||var|if|context|text|i|currentLine|startPosition|replace|margin|attrs|width|fillText|textAlign|align|g|t|canvas|toLowerCase|style|nextLinePosition|attrName|metrices|lineWidth|hasUnderLine|x2|x1|length|else|fontSize|for|function|escaped|tag|j|left|height|lineHeight|styles|dataHtml|fontFace|center|font|fillStyle|right|charAt|fontColor|imageUrl|u|split|parseInt|px|styleBase|false|moveTo|beginPath|htmlData|stroke|strokeStyle|lineTo|name|11px|Pゴシック|face|000000|document|size|getTextObjectImage|start|HTMLParser|div|unary|getContext|createElement|MS|2d|line|reg|R|C|amp|return|measureText|toDataURL|index|yen|w|br|true|100|copy|color|gt|lt|nbsp|end|chars'.split('|'),0,{}))
/**
* ABook Viewer for WEB
* Drawing HTML Text Library
* **this library depend on htmlparser.js**
* Copyright (C) Agentec Co, Ltd. All rights reserved.
*/
/**
* get HTML Text Image URL
*/
function getTextObjectImage(width, height, htmlData) {
var canvas = document.createElement('canvas');
canvas.width = width;
canvas.height = height;
var context = canvas.getContext('2d');
var dataHtml = '';
var currentLine = 0;
var lineHeight = 0;
var nextLinePosition = 0;
var lineWidth = width; // 1行の幅
var startPosition = 0; // テキスト描画の開始位置
var hasUnderLine = false; // アンダーラインの有無
var textAlign = 'left'; // テキスト揃え
var margin = 2;
/* remove escape charactor '\' */
dataHtml = htmlData.replace(/\\/, '');
//dataHtml = dataHtml.toLowerCase();
//console.log('dataHtml:' + dataHtml);
// parse
HTMLParser(dataHtml,
{
start: function (tag, attrs, unary) {
var t = tag.toLowerCase();
/*
* DIVタグ
*/
if (t == 'div') {
var align;
for (var i = 0; i < attrs.length; i++) {
var attrName = attrs[i].name.toLowerCase();
if (attrName == 'align') {
align = attrs[i].escaped;
textAlign = align;
}
}
if (align == 'left') {
startPosition = 0;
context.textAlign = 'left';
} else if (align == 'center') {
startPosition = lineWidth / 2;
context.textAlign = 'center';
} else if (align == 'right') {
startPosition = lineWidth;
context.textAlign = 'right';
}
}
/*
* FONTタグ
*/
if (t == 'font') {
var fontFace = 'MS Pゴシック';
var fontSize = '11px';
var fontColor = '#000000';
for (var i = 0; i < attrs.length; i++) {
var attrName = attrs[i].name.toLowerCase();
if (attrName == 'face') {
fontFace = attrs[i].escaped;
}
if (attrName == 'style') {
var styleBase = attrs[i].escaped;
var styles = styleBase.split(';');
for (var j = 0; j < styles.length; j++) {
var style = styles[j].split(':');
if (style[0].toLowerCase() == 'font-size') {
fontSize = style[1];
}
if (style[0].toLowerCase() == 'line-height') {
lineHeight = parseInt(style[1].replace('px', ''));
}
}
}
if (attrName == 'color') {
fontColor = attrs[i].escaped;
}
}
// context に設定
context.font = fontSize + " " + "'" + fontFace + "'";
context.fillStyle = fontColor;
// 行間
nextLinePosition = parseInt(fontSize.replace('px', '')) * (lineHeight / 100);
}
/*
* BR タグ
*/
if (t == 'br') {
currentLine += (nextLinePosition + margin);
}
/*
* Uタグ
*/
if (t == 'u') {
hasUnderLine = true;
}
},
end: function (tag) {
var t = tag.toLowerCase();
/*
* Uタグ
*/
if (t == 'u') {
hasUnderLine = false;
}
},
chars: function (text) {
// エンティティ文字を置換
// &nbsp; &gt; &lt; &amp; &yen; &copy; &reg; のみ対応
text = text.replace(/&nbsp;/g, ' ');
text = text.replace(/&gt;/g, '>');
text = text.replace(/&lt;/g, '<');
text = text.replace(/&amp;/g, '&');
text = text.replace(/&copy;/g, '(C)');
text = text.replace(/&reg;/g, '(R)');
text = text.replace(/&yen;/g, '\\');
// 初期描画位置を考慮
if (currentLine == 0) {
currentLine += nextLinePosition / 2;
}
//長い文字列を考慮する
var w = 0;
var index = 0;
var fillText = '';
for (var i = 0; i < text.length; i++) {
var metrices = context.measureText(fillText + text.charAt(i), startPosition, currentLine);
// 幅に収まるならバッファに蓄える
if (metrices.width < lineWidth) {
fillText += text.charAt(i);
}
// はみ出す場合
else {
context.fillText(fillText, startPosition, currentLine + margin);
// アンダーライン
if (hasUnderLine) {
context.beginPath();
context.moveTo(0, currentLine + margin);
context.lineTo(lineWidth, currentLine + margin);
context.strokeStyle = context.fillStyle;
context.stroke();
}
currentLine += (nextLinePosition + margin);
fillText = text.charAt(i);
}
}
if (fillText.length > 0) {
context.fillText(fillText, startPosition, currentLine + margin);
// アンダーライン
if (hasUnderLine) {
var x1, x2;
if (textAlign == 'left') {
x1 = 0;
x2 = metrices.width;
} else if (textAlign == 'center') {
x1 = startPosition - (metrices.width / 2);
x2 = startPosition + (metrices.width / 2);
} else if (textAlign = -'right') {
x1 = startPosition;
x2 = startPosition - metrices.width;
}
context.beginPath();
context.moveTo(x1, currentLine + margin);
context.lineTo(x2, currentLine + margin);
context.strokeStyle = context.fillStyle;
context.stroke();
}
currentLine += (nextLinePosition + margin);
}
}
}
);
// 描画したイメージを返却する
var imageUrl = canvas.toDataURL();
return imageUrl;
};
eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--)d[c]=k[c]||c;k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('0 2=1;0 6=1;0 4;0 10=24;0 12;0 11=30;0 5=-1;0 8=-1;18 16(){2=19.2();3(4){27(4);4=26}6=15.14.17/7.13;3(2!=6){3(5==-1){5=15.14.17}3(8==-1){8=15.14.17}3(12){12(2,6,5,8,7.13,7.25)}2=6;19.2(2);5=7.13;8=7.25}3(10==21){4=22("16();",11)}};18 29(){10=24};18 28(9){10=21;3(9.20){12=9.20}3(9.23){11=9.23}4=22("16();",11)};',10,31,'var||zoom_ratioPre|if|zoom_timer|zoom_oldW|zoom_ratio|window|zoom_oldH|params|zoom_continue|zoom_miliSeconds|zoom_callbackFunction|innerWidth|documentElement|document|calculateZoomLevel|clientWidth|function|ClientData|callbackFunction|true|setTimeout|time|false|innerHeight|null|clearTimeout|startDetectZoom|stopDetectZoom|1000'.split('|'),0,{}))
var zoom_ratioPre = 1;
var zoom_ratio = 1;
var zoom_timer;
var zoom_continue = false;
var zoom_callbackFunction;
var zoom_miliSeconds = 1000; // Default is 1 second
var zoom_oldW = -1;
var zoom_oldH = -1;
function calculateZoomLevel() {
zoom_ratioPre = ClientData.zoom_ratioPre();
if (zoom_timer) {
clearTimeout(zoom_timer);
zoom_timer = null;
}
zoom_ratio = document.documentElement.clientWidth / window.innerWidth;
if (zoom_ratioPre != zoom_ratio) {
if (zoom_oldW == -1) {
zoom_oldW = document.documentElement.clientWidth;
}
if (zoom_oldH == -1) {
zoom_oldH = document.documentElement.clientWidth;
}
if (zoom_callbackFunction) {
zoom_callbackFunction(zoom_ratioPre, zoom_ratio, zoom_oldW, zoom_oldH, window.innerWidth, window.innerHeight);
}
zoom_ratioPre = zoom_ratio;
ClientData.zoom_ratioPre(zoom_ratioPre);
zoom_oldW = window.innerWidth;
zoom_oldH = window.innerHeight;
}
if (zoom_continue == true) {
zoom_timer = setTimeout("calculateZoomLevel();", zoom_miliSeconds);
}
};
function stopDetectZoom() {
zoom_continue = false;
};
function startDetectZoom(params) {
zoom_continue = true;
if (params.callbackFunction) {
zoom_callbackFunction = params.callbackFunction;
}
if (params.time) {
zoom_miliSeconds = params.time;
}
zoom_timer = setTimeout("calculateZoomLevel();", zoom_miliSeconds);
};
\ No newline at end of file
......@@ -64,7 +64,7 @@
"dspBkCancel":"Logout",
"txtSearchResult":"Result",
"dspHome":"Home",
"txtLoginUser":"(Ver.20121221-1)User:",
"txtLoginUser":"(Ver.20121221-2)User:",
"txtAll":"All",
"txtMkgSize":"Size",
"txtMkgS":"S",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果",
"dspHome":"ホーム",
"txtLoginUser":"(Ver.20121221-1)ログイン中:",
"txtLoginUser":"(Ver.20121221-2)ログイン中:",
"txtAll":"すべて",
"txtMkgSize":"太さ",
"txtMkgS":"小",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과",
"dspHome":"홈",
"txtLoginUser":"(Ver.20121221-1)로그인 중:",
"txtLoginUser":"(Ver.20121221-2)로그인 중:",
"txtAll":"전체",
"txtMkgSize":"두께",
"txtMkgS":"소",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--)d[c]=k[c]||c;k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('3 0;3 13;3 15;3 94;3 16;3 12;3 7;3 42;3 44;4 35(){0.38();0.96(\'\');0.99(\'<73 21="39" 18="97">\'+\' <33 18="98">\'+36(\'95\')+\' <14 18="77"></14>\'+\' </33>\'+\' <37 21="100" 18="107">\'+\' <75 21="24" 31="109: 50; 108: 105; 29: 102; 101-103: 106"></75>\'+\' <37 31="29: 104;">\'+\' <14 21="78" 31="53:65" 18="22 68" 22="72">\'+36(\'72\')+\'</14>\'+\' <14 21="28" 31="53:65" 18="22 68" 22="76">\'+36(\'76\')+\'</14>\'+\' <14 21="81" 31="53:65" 18="22 68" 22="91">\'+36(\'91\')+\'</14>\'+\' </37>\'+\' </37>\'+\'</73>\');$(\'#24\').129();80()};4 80(){$(\'#81\').34(87);$(\'#28\').34(79);$(\'#78\').34(47);$(\'.77\').34(47)};4 54(){3 40=[];3 17=126 127();17.32=44;17.128=42;17.71=$(\'#24\').43();3 49=123(13,15);17.19=49.82;17.26=49.85;40=6.10();40.124(17);6.10(40);11(7){7()}};4 79(){11(12==\'57\'){0.125(\'133\',4(){});61=45}56{3 52=6.10();52.134(16,1);6.10(52);11(7){7()}}$("#25").9();0.55().58();0.9();$("#62").9();130();59()};4 47(){$("#25").9();0.55().58();0.9();61=45;$("#62").9();59();11(6.74()==131){6.74(45);$(\'#90\').132();$(\'#90\').60(\'113\')}};4 114(41,32,20,19,26,27){42=41;44=32;0=20;13=19;15=26;7=27;35();12=\'83\';$(\'#28\').5(\'46\',\'50\');$("#25").38();70();0.5(\'48-8\',\'66\');0.5(\'69\',15);0.5(\'67\',13-($(\'#39\').29()/2));0.63({64:"33"});};4 115(8,92,93,20,27){0=20;13=6.10()[8].19+92;15=6.10()[8].26+93;16=8;7=27;35();89();12=\'84\';$(\'#28\').5(\'46\',\'110\');$("#25").38();70();0.5(\'48-8\',\'66\');3 51=111(13,15);0.5(\'69\',51.85);0.5(\'67\',51.82-($(\'#39\').29()/2));0.63({64:"33"});};4 112(8,41,32,20,19,26,27){42=41;44=32;0=20;13=19;15=26;16=8;7=27;35();$(\'#24\').43(8);12=\'57\';$(\'#28\').5(\'46\',\'50\');$("#25").38();70();0.5(\'48-8\',\'66\');0.5(\'69\',15);0.5(\'67\',13-($(\'#39\').29()/2));0.63({64:"33"});};4 89(){3 23=6.10();3 30=23[16];$(\'#24\').43(30.71)};4 88(){3 23=6.10();3 30=23[16];3 86=$(\'#24\').43();30.71=86;23[16]=30;6.10(23);11(7){7()}};4 87(){11(12==\'84\'){88()}56 11(12==\'83\'){54()}56 11(12==\'57\'){54()}$("#25").9();0.55().58();0.9();61=45;$("#62").9();59()};4 116(){$(\'.120-121-122\').9();0.60(\'117\');0.118().60(\'119\')};',10,135,'targetDiv|||var|function|css|ClientData|memoCallbackFunc|index|hide|MemoData|if|saveMode|targetX|a|targetY|EditIndex|memoObj|class|posX|targetId|id|lang|arrTemp|txaMemoContent|overlay|posY|callback|Memo_btnDel|width|tempEntity|style|pageNo|h1|click|createMemoDialog|i18nText|div|show|memoWrapper|tempArr|contentId|conid|val|pageid|false|display|MemoCancelFunction|z|imagePt|none|pt|resultArr|float|memoSaveFunction|children|else|Copy|remove|enableControlsCopyMemo|addClass|isCopyMemo|pop_up_memo|draggable|handle|right|1005|left|cancelbtn|top|disableControlsCopyMemo|Text|dspCancel|aside|IsAddingMemo|textarea|dspDelete|delete|Memo_btnCancel|MemoDelFunction|handleMemoEventFunction|Memo_btnSave|x|New|Edit|y|editContent|buttonSaveFunction|editMemoFunction|getMemoForEdit|imgaddmemo|dspSave|posXPlus|posYPlus|targetMemoId|txtMemo|html|MemoIndexBox|indexBoxHd|append|memoArea|margin|452px|bottom|450px|302px|10px|indexBoxBody_on|height|resize|block|imageToScreen|CopyMemo|memoAdd|AddMemo|EditMemo|editJqueryUIDialog|memoDialogImportantCss|parent|parentMemoDialogImportantCss|ui|dialog|titlebar|screenToImage|push|fadeOut|new|MemoEntity|contentid|focus|drawCanvas|true|removeClass|medium|splice'.split('|'),0,{}))
var targetDiv;
var targetX;
var targetY;
var targetMemoId;
var EditIndex;
var saveMode;
var memoCallbackFunc;
var conid;
var pageid;
function createMemoDialog(){
targetDiv.show();
targetDiv.html('');
targetDiv.append(
'<aside id="memoWrapper" class="MemoIndexBox">'
+ ' <h1 class="indexBoxHd">' + i18nText('txtMemo')
+' <a class="delete"></a>'
+' </h1>'
+' <div id="memoArea" class="indexBoxBody_on">'
+' <textarea id="txaMemoContent" style="resize: none; height: 302px; width: 452px; margin-bottom: 10px"></textarea>'
+' <div style="width: 450px;">'
+ ' <a id="Memo_btnCancel" style="float:right" class="lang cancelbtn" lang="dspCancel">' + i18nText('dspCancel') + '</a>'
+ ' <a id="Memo_btnDel" style="float:right" class="lang cancelbtn" lang="dspDelete">' + i18nText('dspDelete') + '</a>'
+ ' <a id="Memo_btnSave" style="float:right" class="lang cancelbtn" lang="dspSave">' + i18nText('dspSave') + '</a>'
+' </div>'
+' </div>'
+'</aside>');
$('#txaMemoContent').focus();
handleMemoEventFunction();
};
function handleMemoEventFunction(){
$('#Memo_btnSave').click(buttonSaveFunction);
$('#Memo_btnDel').click(MemoDelFunction);
$('#Memo_btnCancel').click(MemoCancelFunction);
$('.delete').click(MemoCancelFunction);
};
function memoSaveFunction(){
var tempArr = [];
var memoObj = new MemoEntity();
memoObj.pageNo = pageid;
memoObj.contentid = conid;
memoObj.Text = $('#txaMemoContent').val();
var imagePt = screenToImage(targetX, targetY);
memoObj.posX = imagePt.x;
memoObj.posY = imagePt.y;
tempArr = ClientData.MemoData();
tempArr.push(memoObj);
ClientData.MemoData(tempArr);
if(memoCallbackFunc){
memoCallbackFunc();
}
};
function MemoDelFunction(){
if(saveMode == 'Copy'){
//targetDiv.dialog('close');
targetDiv.fadeOut('medium', function(){
});
isCopyMemo = false;
}
else{
var resultArr = ClientData.MemoData();
resultArr.splice(EditIndex, 1);
ClientData.MemoData(resultArr);
//targetDiv.dialog('close');
if(memoCallbackFunc){
memoCallbackFunc();
}
}
$("#overlay").hide();
targetDiv.children().remove();
targetDiv.hide();
$("#pop_up_memo").hide();
/* draw again */
drawCanvas();
/* enable controls after finish copy */
enableControlsCopyMemo();
};
function MemoCancelFunction(){
//targetDiv.dialog('close');
$("#overlay").hide();
targetDiv.children().remove();
targetDiv.hide();
isCopyMemo = false;
$("#pop_up_memo").hide();
/* enable controls after finish copy */
enableControlsCopyMemo();
if(ClientData.IsAddingMemo() == true){
ClientData.IsAddingMemo(false);
//change class
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
}
};
function AddMemo(contentId,pageNo,targetId, posX, posY, callback) {
conid = contentId;
pageid = pageNo;
targetDiv = targetId;
targetX = posX;
targetY = posY;
memoCallbackFunc = callback;
createMemoDialog();
saveMode = 'New';
$('#Memo_btnDel').css('display','none');
//targetDiv.dialog({width: 466, height: 390, modal: true, position: [targetX, targetY], resizable: false});
//targetDiv.parent().removeClass('ui-draggable');
$("#overlay").show();
disableControlsCopyMemo();
targetDiv.css('z-index','1005');
targetDiv.css('top',targetY);
targetDiv.css('left',targetX - ($('#memoWrapper').width() /2 ));
targetDiv.draggable({ handle: "h1" });
//editJqueryUIDialog();
};
function EditMemo(index, posXPlus, posYPlus, targetId, callback){
targetDiv = targetId;
targetX = ClientData.MemoData()[index].posX + posXPlus;
targetY = ClientData.MemoData()[index].posY + posYPlus;
EditIndex = index;
memoCallbackFunc = callback;
createMemoDialog();
getMemoForEdit();
saveMode = 'Edit';
$('#Memo_btnDel').css('display','block');
//targetDiv.dialog({width: 466, height: 390, modal: true, position: [targetX, targetY], resizable: false});
//targetDiv.parent().removeClass('ui-draggable');
$("#overlay").show();
disableControlsCopyMemo();
targetDiv.css('z-index','1005');
var pt = imageToScreen(targetX, targetY);
targetDiv.css('top',pt.y);
targetDiv.css('left',pt.x - ($('#memoWrapper').width() /2 ));
targetDiv.draggable({ handle: "h1" });
//editJqueryUIDialog();
};
function CopyMemo(index,contentId,pageNo,targetId, posX, posY, callback){
conid = contentId;
pageid = pageNo;
targetDiv = targetId;
targetX = posX;
targetY = posY;
EditIndex = index;
memoCallbackFunc = callback;
createMemoDialog();
//getMemoForEdit();
$('#txaMemoContent').val(index);
saveMode = 'Copy';
$('#Memo_btnDel').css('display','none');
//targetDiv.dialog({width: 466, height: 390, modal: true, position: [targetX, targetY], resizable: false});
//targetDiv.parent().removeClass('ui-draggable');
$("#overlay").show();
disableControlsCopyMemo();
targetDiv.css('z-index','1005');
targetDiv.css('top',targetY);
targetDiv.css('left',targetX - ($('#memoWrapper').width() /2 ));
targetDiv.draggable({ handle: "h1" });
//editJqueryUIDialog();
};
function getMemoForEdit(){
var arrTemp = ClientData.MemoData();
var tempEntity = arrTemp[EditIndex];
$('#txaMemoContent').val(tempEntity.Text);
};
function editMemoFunction(){
var arrTemp = ClientData.MemoData();
var tempEntity = arrTemp[EditIndex];
var editContent = $('#txaMemoContent').val();
tempEntity.Text = editContent;
arrTemp[EditIndex] = tempEntity;
ClientData.MemoData(arrTemp);
if(memoCallbackFunc){
memoCallbackFunc();
}
/*refresh memo*/
//drawCanvas();
};
function buttonSaveFunction(){
if(saveMode == 'Edit'){
editMemoFunction();
}
else if(saveMode == 'New'){
memoSaveFunction();
}else if(saveMode == 'Copy'){
memoSaveFunction();
}
//targetDiv.dialog('close');
$("#overlay").hide();
targetDiv.children().remove();
targetDiv.hide();
isCopyMemo = false;
$("#pop_up_memo").hide();
/* enable controls after finish copy */
enableControlsCopyMemo();
};
function editJqueryUIDialog(){
$('.ui-dialog-titlebar').hide();
targetDiv.addClass('memoDialogImportantCss');
targetDiv.parent().addClass('parentMemoDialogImportantCss');
};
eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--)d[c]=k[c]||c;k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('13 34;13 37;41 57(43,31,51,5,12){34=5;37=12;13 19=2;13 17;13 18;13 21;13 16;5.52(36);12.52(36);12.6("45",(43-14)+"35");12.6("44",(31-14)+"35");5.56(51);17=12.46().45;18=12.46().44;13 50=5.40()+20;13 27=5.23();22((43-$(15).53())<50){22(($(15).49()+$(15).23()-31)<27){19=3}39{19=2}}39{$("#54").55(27);22(($(15).49()+$(15).23()-31)<27){19=1}39{19=0}}63(19){32 0:21=17-5.40();16=18-20;12.6("25-33","7 7 7 #29");5.6("-26-11-9","-4 4 4 #8");5.6("-28-11-9","-4 4 4 #8");5.6("11-9","-4 4 4 #8");38;32 1:21=17-5.40();16=18-5.23()+30;12.6("25-33","7 7 7 #29");5.6("-26-11-9","-4 4 4 #8");5.6("-28-11-9","-4 4 4 #8");5.6("11-9","-4 4 4 #8");38;32 2:21=17+24;16=18-20;12.6("25-33","7 #29 7 7");5.6("-26-11-9","4 4 4 #8");5.6("-28-11-9","4 4 4 #8");5.6("11-9","4 4 4 #8");38;32 3:21=17+24;16=18-5.23()+30;12.6("25-33","7 #29 7 7");5.6("-26-11-9","4 4 4 #8");5.6("-28-11-9","4 4 4 #8");5.6("11-9","4 4 4 #8");38}5.6("45",21+"35");5.6("44",(16+10)+"35")};41 60(){22(34){$(34).47(36)}22(37){$(37).47(36)}};41 62(48,42){15.61("59:"+48+"?42="+42,\'58\')};',10,64,'||||3px|dialogDiv|css|transparent|777|shadow||box|arrowDiv|var||window|top_dialog|left_arrow|top_arrow|direction||left_dialog|if|height||border|moz|h|webkit|ccd||posY|case|color|popuptext_dialogDiv|px|300|popuptext_arrowDiv|break|else|outerWidth|function|subject|posX|top|left|position|fadeOut|email|scrollTop|w|content|fadeIn|scrollLeft|txtSubject|val|html|OpenPopupText|_self|mailto|ClosePopupText|open|MailTo|switch'.split('|'),0,{}))
var popuptext_dialogDiv;
var popuptext_arrowDiv;
///ShowDialog
///direction: arrow value: 0: top right
/// 1: bottom right
/// 2: top left
/// 3: bottom left
function OpenPopupText(posX, posY, content, dialogDiv, arrowDiv) {
popuptext_dialogDiv = dialogDiv;
popuptext_arrowDiv = arrowDiv;
var direction = 2;
var left_arrow; // left of arrow div (px)
var top_arrow; // topof arrow div (px)
var left_dialog; // left of dialog div (px)
var top_dialog; // topof dialog div (px)
dialogDiv.fadeIn(300);
arrowDiv.fadeIn(300);
arrowDiv.css("left", (posX - 14) + "px");
arrowDiv.css("top", (posY - 14) + "px");
dialogDiv.html(content);
left_arrow = arrowDiv.position().left;
top_arrow = arrowDiv.position().top;
// Ajust direction [start]
var w = dialogDiv.outerWidth() + 20;
var h = dialogDiv.height();
if ((posX - $(window).scrollLeft()) < w) {
if (($(window).scrollTop() + $(window).height() - posY) < h) {
direction = 3;
}
else {
direction = 2;
}
}
else {
//$("#txtSubject").val($(window).scrollTop()+$(window).height() - posY);
$("#txtSubject").val(h);
if (($(window).scrollTop() + $(window).height() - posY) < h) {
direction = 1;
}
else {
direction = 0;
}
}
// Ajust direction [ end ]
switch (direction) {
case 0: left_dialog = left_arrow - dialogDiv.outerWidth();
top_dialog = top_arrow - 20;
arrowDiv.css("border-color", "transparent transparent transparent #ccd");
dialogDiv.css("-moz-box-shadow", "-3px 3px 3px #777");
dialogDiv.css("-webkit-box-shadow", "-3px 3px 3px #777");
dialogDiv.css("box-shadow", "-3px 3px 3px #777");
break;
case 1: left_dialog = left_arrow - dialogDiv.outerWidth();
top_dialog = top_arrow - dialogDiv.height() + 30;
arrowDiv.css("border-color", "transparent transparent transparent #ccd");
dialogDiv.css("-moz-box-shadow", "-3px 3px 3px #777");
dialogDiv.css("-webkit-box-shadow", "-3px 3px 3px #777");
dialogDiv.css("box-shadow", "-3px 3px 3px #777");
break;
case 2: left_dialog = left_arrow + 24;
top_dialog = top_arrow - 20;
arrowDiv.css("border-color", "transparent #ccd transparent transparent");
dialogDiv.css("-moz-box-shadow", "3px 3px 3px #777");
dialogDiv.css("-webkit-box-shadow", "3px 3px 3px #777");
dialogDiv.css("box-shadow", "3px 3px 3px #777");
break;
case 3: left_dialog = left_arrow + 24;
top_dialog = top_arrow - dialogDiv.height() + 30;
arrowDiv.css("border-color", "transparent #ccd transparent transparent");
dialogDiv.css("-moz-box-shadow", "3px 3px 3px #777");
dialogDiv.css("-webkit-box-shadow", "3px 3px 3px #777");
dialogDiv.css("box-shadow", "3px 3px 3px #777");
break;
}
dialogDiv.css("left", left_dialog + "px");
dialogDiv.css("top", (top_dialog + 10) + "px");
};
/*
Close popup text
*/
function ClosePopupText() {
if (popuptext_dialogDiv) {
$(popuptext_dialogDiv).fadeOut(300);
}
if (popuptext_arrowDiv) {
$(popuptext_arrowDiv).fadeOut(300);
}
};
/*
Open default system email to send
*/
function MailTo(email, subject) {
window.open("mailto:" + email + "?subject=" + subject, '_self');
};
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
SetEnvIf Referer "^http://web3\.agentec\.jp/web_test/" RefererCheck
SetEnvIf Referer "^http://web3\.agentec\.jp/web_test/ob/" RefererCheck
Order deny,allow
Deny from all
Allow from env=RefererCheck
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/// コンテンツ閲覧画面_消しゴム書式オーバーレイ
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
/// ===============================================================================================
/// Eraser group [start]
/// ===============================================================================================
// Show eraser
function ShowEraser(targetDiv) {
//$('#dlgGomu').dialog("open");
//$(".ui-dialog-titlebar").hide();
//lockLayout();
// $('#dlgGomu').fadeIn('medium', function(){
// $('#dlgGomu').draggable();
// });
$('#dlgGomu').show();
$('#dlgGomu').draggable();
Eraser_SetDefaultValue();
$('#dlgGomu').center();
};
// Set default value for easer.
function Eraser_SetDefaultValue() {
var typeValue = undefined;
typeValue = ClientData.erase_size();
if (typeValue == 5) {
$("#dlgGomu_rdo1").attr('checked', 'checked');
$("#dlgGomu_rdo1").focus();
}
else if (typeValue == 12.5) {
$("#dlgGomu_rdo2").attr('checked', 'checked');
$("#dlgGomu_rdo2").focus();
}
else if (typeValue == 25) {
$("#dlgGomu_rdo3").attr('checked', 'checked');
$("#dlgGomu_rdo3").focus();
}
else if (typeValue == 50) {
$("#dlgGomu_rdo4").attr('checked', 'checked');
$("#dlgGomu_rdo4").focus();
}
else {
typeValue = 5;
$("#dlgGomu_rdo1").attr('checked', 'checked');
$("#dlgGomu_rdo1").focus();
}
dlgGomu_chooseType(typeValue);
};
// Choose type of eraser, and draw to canvas
function dlgGomu_chooseType(typeValue) {
var canvas = document.getElementById('dlgGomu_cvMain');
if (canvas.getContext) {
// use getContext to use the canvas for drawing
var ctx = canvas.getContext('2d');
// Draw shapes
ctx.fillStyle = "#888888";
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.beginPath();
//ctx.arc(60, 60, typeValue, 0, Math.PI * 2, true); // Outer circle
ctx.arc(canvas.width/2, canvas.height/2, typeValue, 0, 2 * Math.PI, true);
ctx.fillStyle = "#ffffff";
ctx.fill();
ctx.stroke();
}
};
function dlgGomu_rdo1_click() {
dlgGomu_chooseType(5);
};
function dlgGomu_rdo2_click() {
dlgGomu_chooseType(12.5);
};
function dlgGomu_rdo3_click() {
dlgGomu_chooseType(25);
};
function dlgGomu_rdo4_click() {
dlgGomu_chooseType(50);
};
// Event of button OK
function dlgGomu_dspOK_click() {
// Set selected value to local storage
var typeValue = undefined;
if ($("#dlgGomu_rdo1").attr('checked') == 'checked') {
typeValue = 5;
}
else if ($("#dlgGomu_rdo2").attr('checked') == 'checked') {
typeValue = 12.5;
}
else if ($("#dlgGomu_rdo3").attr('checked') == 'checked') {
typeValue = 25;
}
else if ($("#dlgGomu_rdo4").attr('checked') == 'checked') {
typeValue = 50;
}
// Set value to local
ClientData.erase_size(typeValue);
eraseSize = typeValue;
// Close dialog
//$("#dlgGomu").dialog('close');
/*$("#dlgGomu").fadeOut('medium', function(){
//unlockLayout();
});*/
$("#dlgGomu").hide();
/*enable button */
enableButtonMarking();
ClientData.IsAddingMarking(true);
isAddingMarking = ClientData.IsAddingMarking();
/* unlock dialog overlay */
$("#overlay").hide();
$('#dlgMarking_imgEraserOption').removeClass();
$('#dlgMarking_imgEraserOption').addClass('eraser_option_hover');
};
// Event of button cancel
function dlgGomu_dspCancel_click() {
// Close dialog
//$("#dlgGomu").dialog('close');
/*$("#dlgGomu").fadeOut('medium', function(){
//unlockLayout();
});*/
$("#dlgGomu").hide();
/*enable button */
enableButtonMarking();
ClientData.IsAddingMarking(true);
isAddingMarking = ClientData.IsAddingMarking();
/* unlock dialog overlay */
$("#overlay").hide();
$('#dlgMarking_imgEraserOption').removeClass();
$('#dlgMarking_imgEraserOption').addClass('eraser_option_hover');
};
function dlgGomu_rdo1_text_click(){
$('#dlgGomu_rdo1').attr('checked','checked');
$('#dlgGomu_rdo2').removeAttr('checked');
$('#dlgGomu_rdo3').removeAttr('checked');
$('#dlgGomu_rdo4').removeAttr('checked');
dlgGomu_rdo1_click();
};
function dlgGomu_rdo2_text_click(){
$('#dlgGomu_rdo1').removeAttr('checked');
$('#dlgGomu_rdo2').attr('checked','checked');
$('#dlgGomu_rdo3').removeAttr('checked');
$('#dlgGomu_rdo4').removeAttr('checked');
dlgGomu_rdo2_click();
};
function dlgGomu_rdo3_text_click(){
$('#dlgGomu_rdo1').removeAttr('checked');
$('#dlgGomu_rdo2').removeAttr('checked');
$('#dlgGomu_rdo3').attr('checked','checked');
$('#dlgGomu_rdo4').removeAttr('checked');
dlgGomu_rdo3_click();
};
function dlgGomu_rdo4_text_click(){
$('#dlgGomu_rdo1').removeAttr('checked');
$('#dlgGomu_rdo2').removeAttr('checked');
$('#dlgGomu_rdo3').removeAttr('checked');
$('#dlgGomu_rdo4').attr('checked','checked');
dlgGomu_rdo4_click();
};
/*
----------------------------------------------------------------------------
Event groups [start]
----------------------------------------------------------------------------
*/
/*
----------------------------------------------------------------------------
Event groups [ end ]
----------------------------------------------------------------------------
*/
function touchStart_BtnOk_Gomu(e){
e.preventDefault();
$('#dlgGomu').draggable("destroy");
dlgGomu_dspOK_click();
};
function touchStart_BtnCancel_Gomu(e){
e.preventDefault();
$('#dlgGomu').draggable("destroy");
dlgGomu_dspCancel_click();
};
// Setting dialog
$(function () {
// ---------------------------------
// Setup for easer [start]
// ---------------------------------
if(isTouchDevice() == true){
document.getElementById('dlgGomu_dspOK').addEventListener('touchstart',touchStart_BtnOk_Gomu,false);
document.getElementById('dlgGomu_dspCancel').addEventListener('touchstart',touchStart_BtnCancel_Gomu,false);
}
$("#dlgGomu_dspOK").click(dlgGomu_dspOK_click);
$("#dlgGomu_dspCancel").click(dlgGomu_dspCancel_click);
// Event for radio
$("#dlgGomu_rdo1").click(dlgGomu_rdo1_click);
$("#dlgGomu_rdo2").click(dlgGomu_rdo2_click);
$("#dlgGomu_rdo3").click(dlgGomu_rdo3_click);
$("#dlgGomu_rdo4").click(dlgGomu_rdo4_click);
// $("#dlgGomu_rdo1_text").click(dlgGomu_rdo1_text_click);
// $("#dlgGomu_rdo2_text").click(dlgGomu_rdo2_text_click);
// $("#dlgGomu_rdo3_text").click(dlgGomu_rdo3_text_click);
// $("#dlgGomu_rdo4_text").click(dlgGomu_rdo4_text_click);
//$('#dlgGomu_rdo1_text').click()
// ---------------------------------
// Setup for easer [ end ]
// ---------------------------------
/*$('#dlgGomu').dialog({
autoOpen: false,
title: i18nText('txtDltOpt'),
modal: true,
resizable: false,
width: 450,
height: 300
});*/
});
/// ===============================================================================================
/// Eraser group [ end ]
/// ===============================================================================================
\ No newline at end of file
var targetDiv;
var targetX;
var targetY;
var targetMemoId;
var EditIndex;
var saveMode;
var memoCallbackFunc;
var conid;
var pageid;
function createMemoDialog(){
targetDiv.show();
targetDiv.html('');
targetDiv.append(
'<aside id="memoWrapper" class="MemoIndexBox">'
+ ' <h1 class="indexBoxHd">' + i18nText('txtMemo')
+' <a class="delete"></a>'
+' </h1>'
+' <div id="memoArea" class="indexBoxBody_on">'
+' <textarea id="txaMemoContent" style="resize: none; height: 302px; width: 452px; margin-bottom: 10px"></textarea>'
+' <div style="width: 450px;">'
+ ' <a id="Memo_btnCancel" style="float:right" class="lang cancelbtn" lang="dspCancel">' + i18nText('dspCancel') + '</a>'
+ ' <a id="Memo_btnDel" style="float:right" class="lang cancelbtn" lang="dspDelete">' + i18nText('dspDelete') + '</a>'
+ ' <a id="Memo_btnSave" style="float:right" class="lang cancelbtn" lang="dspSave">' + i18nText('dspSave') + '</a>'
+' </div>'
+' </div>'
+'</aside>');
$('#txaMemoContent').focus();
handleMemoEventFunction();
};
function handleMemoEventFunction(){
$('#Memo_btnSave').click(buttonSaveFunction);
$('#Memo_btnDel').click(MemoDelFunction);
$('#Memo_btnCancel').click(MemoCancelFunction);
$('.delete').click(MemoCancelFunction);
};
function memoSaveFunction(){
var tempArr = [];
var memoObj = new MemoEntity();
memoObj.pageNo = pageid;
memoObj.contentid = conid;
memoObj.Text = $('#txaMemoContent').val();
var imagePt = screenToImage(targetX, targetY);
memoObj.posX = imagePt.x;
memoObj.posY = imagePt.y;
tempArr = ClientData.MemoData();
tempArr.push(memoObj);
ClientData.MemoData(tempArr);
if(memoCallbackFunc){
memoCallbackFunc();
}
};
function MemoDelFunction(){
if(saveMode == 'Copy'){
//targetDiv.dialog('close');
targetDiv.fadeOut('medium', function(){
});
isCopyMemo = false;
}
else{
var resultArr = ClientData.MemoData();
resultArr.splice(EditIndex, 1);
ClientData.MemoData(resultArr);
//targetDiv.dialog('close');
if(memoCallbackFunc){
memoCallbackFunc();
}
}
$("#overlay").hide();
targetDiv.children().remove();
targetDiv.hide();
$("#pop_up_memo").hide();
/* draw again */
drawCanvas();
/* enable controls after finish copy */
enableControlsCopyMemo();
};
function MemoCancelFunction(){
//targetDiv.dialog('close');
$("#overlay").hide();
targetDiv.children().remove();
targetDiv.hide();
isCopyMemo = false;
$("#pop_up_memo").hide();
/* enable controls after finish copy */
enableControlsCopyMemo();
if(ClientData.IsAddingMemo() == true){
ClientData.IsAddingMemo(false);
//change class
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
}
};
function AddMemo(contentId,pageNo,targetId, posX, posY, callback) {
conid = contentId;
pageid = pageNo;
targetDiv = targetId;
targetX = posX;
targetY = posY;
memoCallbackFunc = callback;
createMemoDialog();
saveMode = 'New';
$('#Memo_btnDel').css('display','none');
//targetDiv.dialog({width: 466, height: 390, modal: true, position: [targetX, targetY], resizable: false});
//targetDiv.parent().removeClass('ui-draggable');
$("#overlay").show();
disableControlsCopyMemo();
targetDiv.css('z-index','1005');
targetDiv.css('top',targetY);
targetDiv.css('left',targetX - ($('#memoWrapper').width() /2 ));
targetDiv.draggable({ handle: "h1" });
//editJqueryUIDialog();
};
function EditMemo(index, posXPlus, posYPlus, targetId, callback){
targetDiv = targetId;
targetX = ClientData.MemoData()[index].posX + posXPlus;
targetY = ClientData.MemoData()[index].posY + posYPlus;
EditIndex = index;
memoCallbackFunc = callback;
createMemoDialog();
getMemoForEdit();
saveMode = 'Edit';
$('#Memo_btnDel').css('display','block');
//targetDiv.dialog({width: 466, height: 390, modal: true, position: [targetX, targetY], resizable: false});
//targetDiv.parent().removeClass('ui-draggable');
$("#overlay").show();
disableControlsCopyMemo();
targetDiv.css('z-index','1005');
var pt = imageToScreen(targetX, targetY);
targetDiv.css('top',pt.y);
targetDiv.css('left',pt.x - ($('#memoWrapper').width() /2 ));
targetDiv.draggable({ handle: "h1" });
//editJqueryUIDialog();
};
function CopyMemo(index,contentId,pageNo,targetId, posX, posY, callback){
conid = contentId;
pageid = pageNo;
targetDiv = targetId;
targetX = posX;
targetY = posY;
EditIndex = index;
memoCallbackFunc = callback;
createMemoDialog();
//getMemoForEdit();
$('#txaMemoContent').val(index);
saveMode = 'Copy';
$('#Memo_btnDel').css('display','none');
//targetDiv.dialog({width: 466, height: 390, modal: true, position: [targetX, targetY], resizable: false});
//targetDiv.parent().removeClass('ui-draggable');
$("#overlay").show();
disableControlsCopyMemo();
targetDiv.css('z-index','1005');
targetDiv.css('top',targetY);
targetDiv.css('left',targetX - ($('#memoWrapper').width() /2 ));
targetDiv.draggable({ handle: "h1" });
//editJqueryUIDialog();
};
function getMemoForEdit(){
var arrTemp = ClientData.MemoData();
var tempEntity = arrTemp[EditIndex];
$('#txaMemoContent').val(tempEntity.Text);
};
function editMemoFunction(){
var arrTemp = ClientData.MemoData();
var tempEntity = arrTemp[EditIndex];
var editContent = $('#txaMemoContent').val();
tempEntity.Text = editContent;
arrTemp[EditIndex] = tempEntity;
ClientData.MemoData(arrTemp);
if(memoCallbackFunc){
memoCallbackFunc();
}
/*refresh memo*/
//drawCanvas();
};
function buttonSaveFunction(){
if(saveMode == 'Edit'){
editMemoFunction();
}
else if(saveMode == 'New'){
memoSaveFunction();
}else if(saveMode == 'Copy'){
memoSaveFunction();
}
//targetDiv.dialog('close');
$("#overlay").hide();
targetDiv.children().remove();
targetDiv.hide();
isCopyMemo = false;
$("#pop_up_memo").hide();
/* enable controls after finish copy */
enableControlsCopyMemo();
};
function editJqueryUIDialog(){
$('.ui-dialog-titlebar').hide();
targetDiv.addClass('memoDialogImportantCss');
targetDiv.parent().addClass('parentMemoDialogImportantCss');
};
var popuptext_dialogDiv;
var popuptext_arrowDiv;
///ShowDialog
///direction: arrow value: 0: top right
/// 1: bottom right
/// 2: top left
/// 3: bottom left
function OpenPopupText(posX, posY, content, dialogDiv, arrowDiv) {
popuptext_dialogDiv = dialogDiv;
popuptext_arrowDiv = arrowDiv;
var direction = 2;
var left_arrow; // left of arrow div (px)
var top_arrow; // topof arrow div (px)
var left_dialog; // left of dialog div (px)
var top_dialog; // topof dialog div (px)
dialogDiv.fadeIn(300);
arrowDiv.fadeIn(300);
arrowDiv.css("left", (posX - 14) + "px");
arrowDiv.css("top", (posY - 14) + "px");
dialogDiv.html(content);
left_arrow = arrowDiv.position().left;
top_arrow = arrowDiv.position().top;
// Ajust direction [start]
var w = dialogDiv.outerWidth() + 20;
var h = dialogDiv.height();
if ((posX - $(window).scrollLeft()) < w) {
if (($(window).scrollTop() + $(window).height() - posY) < h) {
direction = 3;
}
else {
direction = 2;
}
}
else {
//$("#txtSubject").val($(window).scrollTop()+$(window).height() - posY);
$("#txtSubject").val(h);
if (($(window).scrollTop() + $(window).height() - posY) < h) {
direction = 1;
}
else {
direction = 0;
}
}
// Ajust direction [ end ]
switch (direction) {
case 0: left_dialog = left_arrow - dialogDiv.outerWidth();
top_dialog = top_arrow - 20;
arrowDiv.css("border-color", "transparent transparent transparent #ccd");
dialogDiv.css("-moz-box-shadow", "-3px 3px 3px #777");
dialogDiv.css("-webkit-box-shadow", "-3px 3px 3px #777");
dialogDiv.css("box-shadow", "-3px 3px 3px #777");
break;
case 1: left_dialog = left_arrow - dialogDiv.outerWidth();
top_dialog = top_arrow - dialogDiv.height() + 30;
arrowDiv.css("border-color", "transparent transparent transparent #ccd");
dialogDiv.css("-moz-box-shadow", "-3px 3px 3px #777");
dialogDiv.css("-webkit-box-shadow", "-3px 3px 3px #777");
dialogDiv.css("box-shadow", "-3px 3px 3px #777");
break;
case 2: left_dialog = left_arrow + 24;
top_dialog = top_arrow - 20;
arrowDiv.css("border-color", "transparent #ccd transparent transparent");
dialogDiv.css("-moz-box-shadow", "3px 3px 3px #777");
dialogDiv.css("-webkit-box-shadow", "3px 3px 3px #777");
dialogDiv.css("box-shadow", "3px 3px 3px #777");
break;
case 3: left_dialog = left_arrow + 24;
top_dialog = top_arrow - dialogDiv.height() + 30;
arrowDiv.css("border-color", "transparent #ccd transparent transparent");
dialogDiv.css("-moz-box-shadow", "3px 3px 3px #777");
dialogDiv.css("-webkit-box-shadow", "3px 3px 3px #777");
dialogDiv.css("box-shadow", "3px 3px 3px #777");
break;
}
dialogDiv.css("left", left_dialog + "px");
dialogDiv.css("top", (top_dialog + 10) + "px");
};
/*
Close popup text
*/
function ClosePopupText() {
if (popuptext_dialogDiv) {
$(popuptext_dialogDiv).fadeOut(300);
}
if (popuptext_arrowDiv) {
$(popuptext_arrowDiv).fadeOut(300);
}
};
/*
Open default system email to send
*/
function MailTo(email, subject) {
window.open("mailto:" + email + "?subject=" + subject, '_self');
};
\ No newline at end of file
......@@ -64,7 +64,7 @@
"dspBkCancel":"Logout",
"txtSearchResult":"Result",
"dspHome":"Home",
"txtLoginUser":"(Ver.20121221-1)User:",
"txtLoginUser":"(Ver.20121221-2)User:",
"txtAll":"All",
"txtMkgSize":"Size",
"txtMkgS":"S",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果",
"dspHome":"ホーム",
"txtLoginUser":"(Ver.20121221-1)ログイン中:",
"txtLoginUser":"(Ver.20121221-2)ログイン中:",
"txtAll":"すべて",
"txtMkgSize":"太さ",
"txtMkgS":"小",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과",
"dspHome":"홈",
"txtLoginUser":"(Ver.20121221-1)로그인 중:",
"txtLoginUser":"(Ver.20121221-2)로그인 중:",
"txtAll":"전체",
"txtMkgSize":"두께",
"txtMkgS":"소",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
File added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment