Commit d30b5eb9 by Masaru Abe

タッチでクリックイベント対応

console.logファンクションに置き換え
parent 0fc70047
...@@ -383,8 +383,8 @@ function avwCheckLogin(option) { ...@@ -383,8 +383,8 @@ function avwCheckLogin(option) {
} }
/* ログイン画面に戻る */ /* ログイン画面に戻る */
$('#avw-unauth-ok').click(function() { $('#avw-unauth-ok').click(function() {
window.location = returnPage; window.location = returnPage;
}); });
return false; return false;
} }
return true; return true;
...@@ -641,7 +641,7 @@ function avwGrabContentPageImage(accountPath, params, success, error) { ...@@ -641,7 +641,7 @@ function avwGrabContentPageImage(accountPath, params, success, error) {
if (error) { if (error) {
error(xmlHttp, xmlHttp.status, xmlHttp.statusText); error(xmlHttp, xmlHttp.status, xmlHttp.statusText);
} else { } else {
console.log(xmlHttp.status + ' ' + xmlHttp.statusText); AVWEB.avwLog(xmlHttp.status + ' ' + xmlHttp.statusText);
} }
} }
} }
......
...@@ -295,7 +295,19 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -295,7 +295,19 @@ function handleAPIWebContentPage(dataJson, pos) {
$('#bookmarkBoxHdBM').children().remove(); $('#bookmarkBoxHdBM').children().remove();
$('#bookmarkBoxHdBM').html('<a id="bookmarkClosing" class="delete" > </a>'); $('#bookmarkBoxHdBM').html('<a id="bookmarkClosing" class="delete" > </a>');
$("#bookmarkClosing").click(closeBookmarkBox);
//$("#bookmarkClosing").click(closeBookmarkBox);
$("#bookmarkClosing").on({
'click touchend': function(ev){
closeBookmarkBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#bookmarkBoxHdBM').append(i18nText('txtShioriCtnLs')); $('#bookmarkBoxHdBM').append(i18nText('txtShioriCtnLs'));
$('#boxBookMark').css('z-index', '101'); $('#boxBookMark').css('z-index', '101');
...@@ -629,7 +641,19 @@ function handleCopyTextData(data, pos) { ...@@ -629,7 +641,19 @@ function handleCopyTextData(data, pos) {
//title start //title start
$('#bookmarkBoxHdCT').children().remove(); $('#bookmarkBoxHdCT').children().remove();
$('#bookmarkBoxHdCT').html('<a id="copyTextClosing" class="delete" style="padding-top:0px;"> </a>'); $('#bookmarkBoxHdCT').html('<a id="copyTextClosing" class="delete" style="padding-top:0px;"> </a>');
$("#copyTextClosing").click(closeCopyTextBox);
//$("#copyTextClosing").click(closeCopyTextBox);
$("#copyTextClosing").on({
'click touchend': function(ev){
closeCopyTextBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#bookmarkBoxHdCT').append(i18nText('txtTextCopy')); $('#bookmarkBoxHdCT').append(i18nText('txtTextCopy'));
//title end //title end
...@@ -667,7 +691,19 @@ function handleCopyTextData(data, pos) { ...@@ -667,7 +691,19 @@ function handleCopyTextData(data, pos) {
//title start //title start
$('#bookmarkBoxHdCT').children().remove(); $('#bookmarkBoxHdCT').children().remove();
$('#bookmarkBoxHdCT').html('<a id="copyTextClosing" class="delete" style="padding-top:0px;"> </a>'); $('#bookmarkBoxHdCT').html('<a id="copyTextClosing" class="delete" style="padding-top:0px;"> </a>');
$("#copyTextClosing").click(closeCopyTextBox);
//$("#copyTextClosing").click(closeCopyTextBox);
$("#copyTextClosing").on({
'click touchend': function(ev){
closeCopyTextBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#bookmarkBoxHdCT').append(i18nText('txtTextCopy')); $('#bookmarkBoxHdCT').append(i18nText('txtTextCopy'));
//title end //title end
...@@ -1108,7 +1144,7 @@ function changePage(page_index) { ...@@ -1108,7 +1144,7 @@ function changePage(page_index) {
function(file){ function(file){
var reader = new FileReader(); var reader = new FileReader();
reader.onloadend = function(e) { reader.onloadend = function(e) {
console.log("read FileSystem"); AVWEB.avwLog("read FileSystem");
pageImages = e.target.result; pageImages = e.target.result;
/* get page Objects */ /* get page Objects */
...@@ -1125,7 +1161,7 @@ function changePage(page_index) { ...@@ -1125,7 +1161,7 @@ function changePage(page_index) {
); );
}, },
function(err){ // 失敗時のコールバック関数 function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem"); AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage( avwGrabContentPageImage(
ClientData.userInfo_accountPath(), ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: page_index + 1 }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: page_index + 1 },
...@@ -2120,7 +2156,7 @@ function changePageWithoutSlide(pageMove) { ...@@ -2120,7 +2156,7 @@ function changePageWithoutSlide(pageMove) {
function(file){ function(file){
var reader = new FileReader(); var reader = new FileReader();
reader.onloadend = function(e) { reader.onloadend = function(e) {
console.log("read FileSystem"); AVWEB.avwLog("read FileSystem");
pageImages = e.target.result; pageImages = e.target.result;
/* get page Objects */ /* get page Objects */
...@@ -2163,7 +2199,7 @@ function changePageWithoutSlide(pageMove) { ...@@ -2163,7 +2199,7 @@ function changePageWithoutSlide(pageMove) {
); );
}, },
function(err){ // 失敗時のコールバック関数 function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem"); AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage( avwGrabContentPageImage(
ClientData.userInfo_accountPath(), ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageMove + 1 }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageMove + 1 },
...@@ -2852,7 +2888,7 @@ CONTENTVIEW.ready = function(){ ...@@ -2852,7 +2888,7 @@ CONTENTVIEW.ready = function(){
{ contentId: contentID, sid: ClientData.userInfo_sid(), getType: 1 }, { contentId: contentID, sid: ClientData.userInfo_sid(), getType: 1 },
function (data) { function (data) {
//console.log("json.txt:" + window.JSON.stringify(data) ); //AVWEB.avwLog("json.txt:" + window.JSON.stringify(data) );
CONTENTVIEW_FILESYSTEM.checkUpdate(contentID, data, CONTENTVIEW.webGetContentApi_funcOk); CONTENTVIEW_FILESYSTEM.checkUpdate(contentID, data, CONTENTVIEW.webGetContentApi_funcOk);
}, },
...@@ -2879,7 +2915,7 @@ CONTENTVIEW.ready = function(){ ...@@ -2879,7 +2915,7 @@ CONTENTVIEW.ready = function(){
CONTENTVIEW.webGetContentApi_funcOk = function(data){ CONTENTVIEW.webGetContentApi_funcOk = function(data){
//console.log("CONTENTVIEW.webGetContentApi_funcOk:" + data.contentData.contentType); //AVWEB.avwLog("CONTENTVIEW.webGetContentApi_funcOk:" + data.contentData.contentType);
contentType = data.contentData.contentType; contentType = data.contentData.contentType;
...@@ -2917,7 +2953,7 @@ CONTENTVIEW.webGetContentApi_funcOk = function(data){ ...@@ -2917,7 +2953,7 @@ CONTENTVIEW.webGetContentApi_funcOk = function(data){
//END TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type //END TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type
} }
else{ else{
//console.log("CONTENTVIEW.webGetContentApi_funcOk:initPage"); //AVWEB.avwLog("CONTENTVIEW.webGetContentApi_funcOk:initPage");
initPage(); initPage();
} }
} }
...@@ -4260,7 +4296,7 @@ function screenToImage(x, y) { ...@@ -4260,7 +4296,7 @@ function screenToImage(x, y) {
pt.x = Math.floor(nx + srcRect.left); pt.x = Math.floor(nx + srcRect.left);
pt.y = Math.floor(ny + srcRect.top); pt.y = Math.floor(ny + srcRect.top);
//console.log('screenToImage ' + srcRect.right + ' ' + srcRect.left + ' ' + destRect.right + ' ' + destRect.left + ' ' + x + ' ' + sx + ' ' + nx + ' ' + pt.x + ' ' + srcRect.bottom + ' ' + srcRect.top + ' ' + destRect.bottom + ' ' + destRect.top + ' ' + y + ' ' + sy + ' ' + ny + ' ' + pt.y); //AVWEB.avwLog('screenToImage ' + srcRect.right + ' ' + srcRect.left + ' ' + destRect.right + ' ' + destRect.left + ' ' + x + ' ' + sx + ' ' + nx + ' ' + pt.x + ' ' + srcRect.bottom + ' ' + srcRect.top + ' ' + destRect.bottom + ' ' + destRect.top + ' ' + y + ' ' + sy + ' ' + ny + ' ' + pt.y);
return pt; return pt;
}; };
......
...@@ -27,6 +27,8 @@ function showAnket(url, fullscreen, objectId) { ...@@ -27,6 +27,8 @@ function showAnket(url, fullscreen, objectId) {
+ '</iframe></div>' + '</iframe></div>'
+ '<div class="anket-commands" id="anket-commands"><input type="button" value="' + i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>' + '<div class="anket-commands" id="anket-commands"><input type="button" value="' + i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>'
); );
/*
$('#dialog h1 img').click(function(){ $('#dialog h1 img').click(function(){
//時間記録 //時間記録
...@@ -38,7 +40,26 @@ function showAnket(url, fullscreen, objectId) { ...@@ -38,7 +40,26 @@ function showAnket(url, fullscreen, objectId) {
$container.removeAttr('style'); $container.removeAttr('style');
hideDialog(); hideDialog();
}); });
*/
$("#dialog h1 img").on({
'click touchend': function(ev){
//時間記録
var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime);
SetObjectLogActionTime( contentID, objectId, actionTime );
$container.removeAttr('style');
hideDialog();
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//時間記録 //時間記録
var dateStart = new Date(); var dateStart = new Date();
......
...@@ -41,7 +41,7 @@ function getJsonContentInfo() { ...@@ -41,7 +41,7 @@ function getJsonContentInfo() {
fileEntry.file(function(file){ fileEntry.file(function(file){
var reader = new FileReader(); var reader = new FileReader();
reader.onloadend = function(e) { reader.onloadend = function(e) {
console.log("read FileSystem"); AVWEB.avwLog("read FileSystem");
pageImages = e.target.result; pageImages = e.target.result;
webGetContentData(); webGetContentData();
getSearchDataFromJson(); getSearchDataFromJson();
...@@ -58,7 +58,7 @@ function getJsonContentInfo() { ...@@ -58,7 +58,7 @@ function getJsonContentInfo() {
}, },
function(err){ function(err){
// 失敗時のコールバック関数 // 失敗時のコールバック関数
console.log("NotRead FileSystem"); AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage( avwGrabContentPageImage(
ClientData.userInfo_accountPath(), ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
......
...@@ -408,7 +408,7 @@ function firstPage_click() { ...@@ -408,7 +408,7 @@ function firstPage_click() {
function(file){ function(file){
var reader = new FileReader(); var reader = new FileReader();
reader.onloadend = function(e) { reader.onloadend = function(e) {
console.log("read FileSystem"); AVWEB.avwLog("read FileSystem");
pageImages = e.target.result; pageImages = e.target.result;
/* get page Objects */ /* get page Objects */
...@@ -429,7 +429,7 @@ function firstPage_click() { ...@@ -429,7 +429,7 @@ function firstPage_click() {
); );
}, },
function(err){ // 失敗時のコールバック関数 function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem"); AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage( avwGrabContentPageImage(
ClientData.userInfo_accountPath(), ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
...@@ -537,7 +537,7 @@ function lastPage_click() { ...@@ -537,7 +537,7 @@ function lastPage_click() {
function(file){ function(file){
var reader = new FileReader(); var reader = new FileReader();
reader.onloadend = function(e) { reader.onloadend = function(e) {
console.log("read FileSystem"); AVWEB.avwLog("read FileSystem");
pageImages = e.target.result; pageImages = e.target.result;
/* get page Objects */ /* get page Objects */
...@@ -556,7 +556,7 @@ function lastPage_click() { ...@@ -556,7 +556,7 @@ function lastPage_click() {
); );
}, },
function(err){ // 失敗時のコールバック関数 function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem"); AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage( avwGrabContentPageImage(
ClientData.userInfo_accountPath(), ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage },
...@@ -868,8 +868,7 @@ function onUnlock() { ...@@ -868,8 +868,7 @@ function onUnlock() {
function onClick_CanvasMain(event) { function onClick_CanvasMain(event) {
console.log("onClick_CanvasMain"); //AVWEB.avwLog("onClick_CanvasMain");
event.preventDefault(); event.preventDefault();
if(isLoadingObject){ if(isLoadingObject){
...@@ -957,7 +956,7 @@ function onClick_CanvasMain(event) { ...@@ -957,7 +956,7 @@ function onClick_CanvasMain(event) {
for (var nIndex = 0; nIndex < memoObjects.length; nIndex++) { for (var nIndex = 0; nIndex < memoObjects.length; nIndex++) {
var hitPageObjMemo = memoObjects[nIndex]; var hitPageObjMemo = memoObjects[nIndex];
if (hitPageObjMemo.hitTest(imagePt.x, imagePt.y)) { if (hitPageObjMemo.hitTest(imagePt.x, imagePt.y)) {
//console.log("PageObject Hit!! Id: " + hitPageObjMemo.id); //AVWEB.avwLog("PageObject Hit!! Id: " + hitPageObjMemo.id);
//hitPageObjMemo.action(); //hitPageObjMemo.action();
/* save object memo */ /* save object memo */
...@@ -1008,7 +1007,7 @@ function onClick_CanvasMain(event) { ...@@ -1008,7 +1007,7 @@ function onClick_CanvasMain(event) {
for (var nIndex = 0; nIndex < webGetContentType4Objects.length; nIndex++) { for (var nIndex = 0; nIndex < webGetContentType4Objects.length; nIndex++) {
var hitPageObjLinkList = webGetContentType4Objects[nIndex]; var hitPageObjLinkList = webGetContentType4Objects[nIndex];
if (hitPageObjLinkList.hitTest(imagePt.x, imagePt.y)) { if (hitPageObjLinkList.hitTest(imagePt.x, imagePt.y)) {
//console.log("PageObject Hit!! Id: " + hitPageObjLinkList.id); //AVWEB.avwLog("PageObject Hit!! Id: " + hitPageObjLinkList.id);
if(hitPageObjLinkList.pageNo == changePageIndex(getPageIndex())){ if(hitPageObjLinkList.pageNo == changePageIndex(getPageIndex())){
hitPageObjLinkList.action(); hitPageObjLinkList.action();
...@@ -1488,15 +1487,14 @@ function resetNaviAction(){ ...@@ -1488,15 +1487,14 @@ function resetNaviAction(){
$('#mainNext').css("display",'none'); $('#mainNext').css("display",'none');
_touchFirstPos = null; _touchFirstPos = null;
_touchLastPos=null; _touchLastPos=null;
//console.log("================correctCanvasPosition==============="); //AVWEB.avwLog("================correctCanvasPosition===============");
correctCanvasPosition(); correctCanvasPosition();
}; };
function onTouchstart(evt){ function onTouchstart(evt){
console.log("onTouchstart _isClick:" + _isClick); AVWEB.avwLog("onTouchstart _isClick:" + _isClick);
//evt.preventDefault(); //evt.preventDefault();
if(ClientData.IsAddingMarking() == true){ if(ClientData.IsAddingMarking() == true){
...@@ -1731,8 +1729,7 @@ var isPreventClick = false; ...@@ -1731,8 +1729,7 @@ var isPreventClick = false;
function onTouchmove(evt){ function onTouchmove(evt){
console.log("onTouchmove isClick:" + _isClick); AVWEB.avwLog("onTouchmove isClick:" + _isClick);
//evt.preventDefault(); //evt.preventDefault();
if(ClientData.IsAddingMarking() == true){ if(ClientData.IsAddingMarking() == true){
...@@ -1882,7 +1879,7 @@ function onTouchmove(evt){ ...@@ -1882,7 +1879,7 @@ function onTouchmove(evt){
resetNaviAction(); resetNaviAction();
} }
//console.log("zoom page case"); //AVWEB.avwLog("zoom page case");
if(_bufferPoints.length == 0) { if(_bufferPoints.length == 0) {
//first point so that wait to next point //first point so that wait to next point
touch1 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId}; touch1 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId};
...@@ -1903,7 +1900,7 @@ function onTouchmove(evt){ ...@@ -1903,7 +1900,7 @@ function onTouchmove(evt){
} }
touch2 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId}; touch2 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId};
//console.log("_bufferPoints.length:" + _bufferPoints.length); //AVWEB.avwLog("_bufferPoints.length:" + _bufferPoints.length);
_bufferPoints = []; _bufferPoints = [];
} }
} }
...@@ -2015,7 +2012,7 @@ function onTouchmove(evt){ ...@@ -2015,7 +2012,7 @@ function onTouchmove(evt){
function onTouchend(evt){ function onTouchend(evt){
console.log("onTouchend isClick:" + _isClick); AVWEB.avwLog("onTouchend isClick:" + _isClick);
//evt.preventDefault(); //evt.preventDefault();
...@@ -2187,7 +2184,7 @@ function onTouchend(evt){ ...@@ -2187,7 +2184,7 @@ function onTouchend(evt){
for (var nIndex = 0; nIndex < memoObjects.length; nIndex++) { for (var nIndex = 0; nIndex < memoObjects.length; nIndex++) {
var hitPageObjMemo = memoObjects[nIndex]; var hitPageObjMemo = memoObjects[nIndex];
if (hitPageObjMemo.hitTest(imagePt.x, imagePt.y)) { if (hitPageObjMemo.hitTest(imagePt.x, imagePt.y)) {
//console.log("PageObject Hit!! Id: " + hitPageObjMemo.id); //AVWEB.avwLog("PageObject Hit!! Id: " + hitPageObjMemo.id);
//hitPageObjMemo.action(); //hitPageObjMemo.action();
/* save object memo */ /* save object memo */
...@@ -2407,7 +2404,7 @@ function processNaviPage(currPos){ ...@@ -2407,7 +2404,7 @@ function processNaviPage(currPos){
if(_moveNum==0 && lMoveX > 0){ if(_moveNum==0 && lMoveX > 0){
_moveNum = -2; // go from left to right + back to left + go to right=> priveous page _moveNum = -2; // go from left to right + back to left + go to right=> priveous page
} }
//console.log("_moveNum:" +_moveNum); //AVWEB.avwLog("_moveNum:" +_moveNum);
if(animateType == animateTypeKeys.Type_Slide){ if(animateType == animateTypeKeys.Type_Slide){
var left = $('#canvasWrapper').css('left').replace("px",""); var left = $('#canvasWrapper').css('left').replace("px","");
...@@ -2471,7 +2468,7 @@ TransitionObject.prototype.processNaviPage = function (currPos) { ...@@ -2471,7 +2468,7 @@ TransitionObject.prototype.processNaviPage = function (currPos) {
if(_moveNum==0 && lMoveX > 0){ if(_moveNum==0 && lMoveX > 0){
_moveNum = -2; // go from left to right + back to left + go to right=> priveous page _moveNum = -2; // go from left to right + back to left + go to right=> priveous page
} }
//console.log("_moveNum:" +_moveNum); //AVWEB.avwLog("_moveNum:" +_moveNum);
if(animateType == animateTypeKeys.Type_Slide){ if(animateType == animateTypeKeys.Type_Slide){
var left = $('#canvasWrapper').css('left').replace("px",""); var left = $('#canvasWrapper').css('left').replace("px","");
......
...@@ -15,7 +15,7 @@ CONTENTVIEW_FILESYSTEM.initFS = function( func ) { ...@@ -15,7 +15,7 @@ CONTENTVIEW_FILESYSTEM.initFS = function( func ) {
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
// Initiate filesystem on page load. // Initiate filesystem on page load.
if (!window.requestFileSystem) { if (!window.requestFileSystem) {
//console.log("window.requestFileSystem is null"); //AVWEB.avwLog("window.requestFileSystem is null");
if( func != null ){ if( func != null ){
func(); func();
} }
...@@ -26,7 +26,7 @@ CONTENTVIEW_FILESYSTEM.initFS = function( func ) { ...@@ -26,7 +26,7 @@ CONTENTVIEW_FILESYSTEM.initFS = function( func ) {
window.TEMPORARY, window.TEMPORARY,
1024*1024, 1024*1024,
function(filesystem) { function(filesystem) {
//console.log("initFS window.requestFileSystem"); //AVWEB.avwLog("initFS window.requestFileSystem");
CONTENTVIEW_FILESYSTEM.fs = filesystem; CONTENTVIEW_FILESYSTEM.fs = filesystem;
CONTENTVIEW_FILESYSTEM.fs.root.getDirectory( CONTENTVIEW_FILESYSTEM.fs.root.getDirectory(
'abook', 'abook',
...@@ -53,7 +53,7 @@ CONTENTVIEW_FILESYSTEM.initFS = function( func ) { ...@@ -53,7 +53,7 @@ CONTENTVIEW_FILESYSTEM.initFS = function( func ) {
CONTENTVIEW_FILESYSTEM.savePageFile = function(contentId, fileName, data) { CONTENTVIEW_FILESYSTEM.savePageFile = function(contentId, fileName, data) {
if (!CONTENTVIEW_FILESYSTEM.fs) { if (!CONTENTVIEW_FILESYSTEM.fs) {
//console.log('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId); //AVWEB.avwLog('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId);
return; return;
} }
...@@ -71,10 +71,10 @@ CONTENTVIEW_FILESYSTEM.savePageFile = function(contentId, fileName, data) { ...@@ -71,10 +71,10 @@ CONTENTVIEW_FILESYSTEM.savePageFile = function(contentId, fileName, data) {
fileEntry.createWriter( fileEntry.createWriter(
function(fileWriter) { function(fileWriter) {
fileWriter.onwriteend = function(e) { fileWriter.onwriteend = function(e) {
console.log('書き込み完了'); AVWEB.avwLog('書き込み完了');
}; };
fileWriter.onerror = function(e) { fileWriter.onerror = function(e) {
console.log('書き込みエラー: ' + e.toString()); AVWEB.avwLog('書き込みエラー: ' + e.toString());
}; };
var blobData = new Blob([data], {type:"text/plain"}); var blobData = new Blob([data], {type:"text/plain"});
fileWriter.write(blobData); fileWriter.write(blobData);
...@@ -93,7 +93,7 @@ CONTENTVIEW_FILESYSTEM.savePageFile = function(contentId, fileName, data) { ...@@ -93,7 +93,7 @@ CONTENTVIEW_FILESYSTEM.savePageFile = function(contentId, fileName, data) {
CONTENTVIEW_FILESYSTEM.deleteContentDir = function(contentId) { CONTENTVIEW_FILESYSTEM.deleteContentDir = function(contentId) {
if (!CONTENTVIEW_FILESYSTEM.fs) { if (!CONTENTVIEW_FILESYSTEM.fs) {
//console.log('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId); //AVWEB.avwLog('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId);
return; return;
} }
...@@ -103,7 +103,7 @@ CONTENTVIEW_FILESYSTEM.deleteContentDir = function(contentId) { ...@@ -103,7 +103,7 @@ CONTENTVIEW_FILESYSTEM.deleteContentDir = function(contentId) {
function(dirEntry) { function(dirEntry) {
dirEntry.removeRecursively( dirEntry.removeRecursively(
function() { function() {
console.log('Directory removed. id=' + contentId); AVWEB.avwLog('Directory removed. id=' + contentId);
}, },
CONTENTVIEW_FILESYSTEM.errorHandler CONTENTVIEW_FILESYSTEM.errorHandler
); );
...@@ -116,7 +116,7 @@ CONTENTVIEW_FILESYSTEM.deleteContentDir = function(contentId) { ...@@ -116,7 +116,7 @@ CONTENTVIEW_FILESYSTEM.deleteContentDir = function(contentId) {
CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
if (!CONTENTVIEW_FILESYSTEM.fs) { if (!CONTENTVIEW_FILESYSTEM.fs) {
//console.log('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId); //AVWEB.avwLog('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId);
//おまじない ajaxカウントをインクリする必要有り //おまじない ajaxカウントをインクリする必要有り
//nAjaxLoad++; //nAjaxLoad++;
//ファンクションがあれば実行 //ファンクションがあれば実行
...@@ -136,15 +136,15 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { ...@@ -136,15 +136,15 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
function(file){ function(file){
var reader = new FileReader(); var reader = new FileReader();
reader.onloadend = function(e) { reader.onloadend = function(e) {
console.log("read Json.txt"); AVWEB.avwLog("read Json.txt");
//JSONに戻す //JSONに戻す
var jsonObjOld = JSON.parse(e.target.result); var jsonObjOld = JSON.parse(e.target.result);
//配信日時比較 //配信日時比較
console.log("OLD:" + jsonObjOld.contentData.lastDeliveryDate); AVWEB.avwLog("OLD:" + jsonObjOld.contentData.lastDeliveryDate);
console.log("NEW:" + data.contentData.lastDeliveryDate); AVWEB.avwLog("NEW:" + data.contentData.lastDeliveryDate);
if( jsonObjOld.contentData.lastDeliveryDate != data.contentData.lastDeliveryDate ){ if( jsonObjOld.contentData.lastDeliveryDate != data.contentData.lastDeliveryDate ){
console.log("Update Content."); AVWEB.avwLog("Update Content.");
//ディレクトリ消し //ディレクトリ消し
CONTENTVIEW_FILESYSTEM.fs.root.getDirectory( CONTENTVIEW_FILESYSTEM.fs.root.getDirectory(
...@@ -153,7 +153,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { ...@@ -153,7 +153,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
function(dirEntry) { function(dirEntry) {
dirEntry.removeRecursively( dirEntry.removeRecursively(
function() { function() {
console.log('Directory removed. id=' + contentId); AVWEB.avwLog('Directory removed. id=' + contentId);
//再度書き込み //再度書き込み
CONTENTVIEW_FILESYSTEM.fs.root.getDirectory( CONTENTVIEW_FILESYSTEM.fs.root.getDirectory(
...@@ -168,7 +168,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { ...@@ -168,7 +168,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
fileEntry.createWriter( fileEntry.createWriter(
function(fileWriter) { function(fileWriter) {
fileWriter.onwriteend = function(e) { fileWriter.onwriteend = function(e) {
console.log('JSON書き込み完了'); AVWEB.avwLog('JSON書き込み完了');
//おまじない ajaxカウントをインクリする必要有り //おまじない ajaxカウントをインクリする必要有り
nAjaxLoad++; nAjaxLoad++;
...@@ -179,7 +179,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { ...@@ -179,7 +179,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
}; };
fileWriter.onerror = function(e) { fileWriter.onerror = function(e) {
console.log('JSON書き込みエラー: ' + e.toString()); AVWEB.avwLog('JSON書き込みエラー: ' + e.toString());
}; };
var blobData = new Blob([window.JSON.stringify(data)], {type:"text/plain"}); var blobData = new Blob([window.JSON.stringify(data)], {type:"text/plain"});
fileWriter.write(blobData); fileWriter.write(blobData);
...@@ -217,7 +217,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { ...@@ -217,7 +217,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
); );
}, },
function(err){ // 失敗時のコールバック関数 function(err){ // 失敗時のコールバック関数
console.log("NotRead json.txt"); AVWEB.avwLog("NotRead json.txt");
//書き込む パス作成 //書き込む パス作成
//var path = "/abook/" + contentId + "/" + fileName; //var path = "/abook/" + contentId + "/" + fileName;
...@@ -233,7 +233,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { ...@@ -233,7 +233,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
fileEntry.createWriter( fileEntry.createWriter(
function(fileWriter) { function(fileWriter) {
fileWriter.onwriteend = function(e) { fileWriter.onwriteend = function(e) {
console.log('JSON書き込み完了'); AVWEB.avwLog('JSON書き込み完了');
//おまじない ajaxカウントをインクリする必要有り //おまじない ajaxカウントをインクリする必要有り
nAjaxLoad++; nAjaxLoad++;
...@@ -244,7 +244,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { ...@@ -244,7 +244,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
}; };
fileWriter.onerror = function(e) { fileWriter.onerror = function(e) {
console.log('JSON書き込みエラー: ' + e.toString()); AVWEB.avwLog('JSON書き込みエラー: ' + e.toString());
}; };
var blobData = new Blob([window.JSON.stringify(data)], {type:"text/plain"}); var blobData = new Blob([window.JSON.stringify(data)], {type:"text/plain"});
fileWriter.write(blobData); fileWriter.write(blobData);
...@@ -266,10 +266,10 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { ...@@ -266,10 +266,10 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, isFullscreen, contentId, resourceId ){ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, isFullscreen, contentId, resourceId ){
console.log('CONTENTVIEW_FILESYSTEM.showVideoObjectCache'); AVWEB.avwLog('CONTENTVIEW_FILESYSTEM.showVideoObjectCache');
if (!CONTENTVIEW_FILESYSTEM.fs) { if (!CONTENTVIEW_FILESYSTEM.fs) {
//console.log('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId); //AVWEB.avwLog('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId);
showVideoObject(x, y, width, height, src, isFullscreen, true); showVideoObject(x, y, width, height, src, isFullscreen, true);
return; return;
} }
...@@ -280,7 +280,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, ...@@ -280,7 +280,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
function(fileEntry){ function(fileEntry){
fileEntry.file( fileEntry.file(
function(file){ function(file){
console.log("read cache"); AVWEB.avwLog("read cache");
var url = window.URL || window.webkitURL; var url = window.URL || window.webkitURL;
var resSrc = url.createObjectURL(file); var resSrc = url.createObjectURL(file);
showVideoObject(x, y, width, height, resSrc, isFullscreen, false); showVideoObject(x, y, width, height, resSrc, isFullscreen, false);
...@@ -288,7 +288,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, ...@@ -288,7 +288,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
); );
}, },
function(err){ // 失敗時のコールバック関数 function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem"); AVWEB.avwLog("NotRead FileSystem");
//キャッシュ化 //キャッシュ化
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
...@@ -299,7 +299,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, ...@@ -299,7 +299,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
//this.response is what you're looking for //this.response is what you're looking for
console.log(this.response, typeof this.response); AVWEB.avwLog(this.response, typeof this.response);
CONTENTVIEW_FILESYSTEM.fs.root.getFile( CONTENTVIEW_FILESYSTEM.fs.root.getFile(
'/abook/' + fileName, '/abook/' + fileName,
...@@ -308,10 +308,10 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, ...@@ -308,10 +308,10 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
fileEntry.createWriter( fileEntry.createWriter(
function(fileWriter) { function(fileWriter) {
fileWriter.onwriteend = function(e) { fileWriter.onwriteend = function(e) {
console.log('RES書き込み完了'); AVWEB.avwLog('RES書き込み完了');
}; };
fileWriter.onerror = function(e) { fileWriter.onerror = function(e) {
console.log('RES書き込みエラー: ' + e.toString()); AVWEB.avwLog('RES書き込みエラー: ' + e.toString());
}; };
var blobData = new Blob([xhr.response], {type:"application/octet-stream"}); var blobData = new Blob([xhr.response], {type:"application/octet-stream"});
...@@ -326,7 +326,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, ...@@ -326,7 +326,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
} else { } else {
if( this.readyState == 2 ){ if( this.readyState == 2 ){
console.log("onreadystatechange:" + this.readyState + " " + this.status); AVWEB.avwLog("onreadystatechange:" + this.readyState + " " + this.status);
$('#divImageLoading').css('display', 'block'); $('#divImageLoading').css('display', 'block');
CONTENTVIEW_FILESYSTEM.isXhrBusy = true; CONTENTVIEW_FILESYSTEM.isXhrBusy = true;
} }
...@@ -338,7 +338,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, ...@@ -338,7 +338,7 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
xhr.responseType = 'blob'; xhr.responseType = 'blob';
xhr.send(); xhr.send();
} else { } else {
console.log("xhr is busy."); AVWEB.avwLog("xhr is busy.");
} }
//タグは書き出し //タグは書き出し
...@@ -373,7 +373,7 @@ CONTENTVIEW_FILESYSTEM.errorHandler = function(e) { ...@@ -373,7 +373,7 @@ CONTENTVIEW_FILESYSTEM.errorHandler = function(e) {
break; break;
}; };
//CONTENTVIEW_FILESYSTEM.fs = null; //CONTENTVIEW_FILESYSTEM.fs = null;
console.log('FileSystemAPI Error: ' + msg); AVWEB.avwLog('FileSystemAPI Error: ' + msg);
alert('FileSystemAPI Error: ' + msg); alert('FileSystemAPI Error: ' + msg);
}; };
...@@ -927,7 +927,19 @@ function getBookmarklist(pos) { ...@@ -927,7 +927,19 @@ function getBookmarklist(pos) {
//title start //title start
$('#bookmarkBoxHdBM').children().remove(); $('#bookmarkBoxHdBM').children().remove();
$('#bookmarkBoxHdBM').html('<a id="bookmarkClosing" class="delete" > </a>'); $('#bookmarkBoxHdBM').html('<a id="bookmarkClosing" class="delete" > </a>');
$("#bookmarkClosing").click(closeBookmarkBox);
//$("#bookmarkClosing").click(closeBookmarkBox);
$("#bookmarkClosing").on({
'click touchend': function(ev){
closeBookmarkBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#bookmarkBoxHdBM').append(i18nText('txtShioriCtnLs')); $('#bookmarkBoxHdBM').append(i18nText('txtShioriCtnLs'));
//title end //title end
//lockLayout(); //lockLayout();
...@@ -961,7 +973,19 @@ function getPageIndexJson(pos) { ...@@ -961,7 +973,19 @@ function getPageIndexJson(pos) {
//title start //title start
$('#indexBoxHdIndex').children().remove(); $('#indexBoxHdIndex').children().remove();
$('#indexBoxHdIndex').html('<a id="indexClosing" class="delete" > </a>'); $('#indexBoxHdIndex').html('<a id="indexClosing" class="delete" > </a>');
$("#indexClosing").click(closeIndexBox);
//$("#indexClosing").click(closeIndexBox);
$("#indexClosing").on({
'click touchend': function(ev){
closeIndexBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#indexBoxHdIndex').append(i18nText('txtIndex')); $('#indexBoxHdIndex').append(i18nText('txtIndex'));
//title end //title end
//lockLayout(); //lockLayout();
...@@ -1017,7 +1041,19 @@ function getPageIndexJson(pos) { ...@@ -1017,7 +1041,19 @@ function getPageIndexJson(pos) {
//title start //title start
$('#indexBoxHdIndex').children().remove(); $('#indexBoxHdIndex').children().remove();
$('#indexBoxHdIndex').html('<a id="indexClosing" class="delete" > </a>'); $('#indexBoxHdIndex').html('<a id="indexClosing" class="delete" > </a>');
$("#indexClosing").click(closeIndexBox);
//$("#indexClosing").click(closeIndexBox);
$("#indexClosing").on({
'click touchend': function(ev){
closeIndexBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#indexBoxHdIndex').append(i18nText('txtIndex')); $('#indexBoxHdIndex').append(i18nText('txtIndex'));
//title end //title end
//lockLayout(); //lockLayout();
...@@ -1264,7 +1300,7 @@ function renderNextPage(){ ...@@ -1264,7 +1300,7 @@ function renderNextPage(){
function(file){ function(file){
var reader = new FileReader(); var reader = new FileReader();
reader.onloadend = function(e) { reader.onloadend = function(e) {
console.log("read FileSystem"); AVWEB.avwLog("read FileSystem");
nextPageImage = e.target.result; nextPageImage = e.target.result;
nextContent.setPageImages(totalPage, nextPageImage) nextContent.setPageImages(totalPage, nextPageImage)
...@@ -1277,7 +1313,7 @@ function renderNextPage(){ ...@@ -1277,7 +1313,7 @@ function renderNextPage(){
); );
}, },
function(err){ // 失敗時のコールバック関数 function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem"); AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage( avwGrabContentPageImage(
ClientData.userInfo_accountPath(), ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
...@@ -1343,7 +1379,7 @@ function renderPrevPage(){ ...@@ -1343,7 +1379,7 @@ function renderPrevPage(){
function(file){ function(file){
var reader = new FileReader(); var reader = new FileReader();
reader.onloadend = function(e) { reader.onloadend = function(e) {
console.log("read FileSystem"); AVWEB.avwLog("read FileSystem");
prevPageImage = e.target.result; prevPageImage = e.target.result;
prevContent.setPageImages(totalPage, prevPageImage) prevContent.setPageImages(totalPage, prevPageImage)
...@@ -1356,7 +1392,7 @@ function renderPrevPage(){ ...@@ -1356,7 +1392,7 @@ function renderPrevPage(){
); );
}, },
function(err){ // 失敗時のコールバック関数 function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem"); AVWEB.avwLog("NotRead FileSystem");
avwGrabContentPageImage(ClientData.userInfo_accountPath(), avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) { function (data) {
...@@ -1528,8 +1564,8 @@ function getPrevPageObjectsByPageIndex(contentData, nIndexPage) { ...@@ -1528,8 +1564,8 @@ function getPrevPageObjectsByPageIndex(contentData, nIndexPage) {
function switchCanvas(nav){ function switchCanvas(nav){
// change div id // change div id
//console.log("bf widthEachPage:" + widthEachPage + " widthEachNextPage:" + widthEachNextPage + " widthEachPrevPage:" + widthEachPrevPage); //AVWEB.avwLog("bf widthEachPage:" + widthEachPage + " widthEachNextPage:" + widthEachNextPage + " widthEachPrevPage:" + widthEachPrevPage);
//console.log("bf widthEachPageApi:" + widthEachPageApi + " widthEachNextPageApi:" + widthEachNextPageApi + " widthEachPrevPageApi:" + widthEachPrevPageApi); //AVWEB.avwLog("bf widthEachPageApi:" + widthEachPageApi + " widthEachNextPageApi:" + widthEachNextPageApi + " widthEachPrevPageApi:" + widthEachPrevPageApi);
if(nav == 1){ if(nav == 1){
$('#mainPre').attr("id","mainPreBK"); $('#mainPre').attr("id","mainPreBK");
...@@ -1604,8 +1640,8 @@ function switchCanvas(nav){ ...@@ -1604,8 +1640,8 @@ function switchCanvas(nav){
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content //END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
} }
//console.log("af widthEachPage:" + widthEachPage + " widthEachNextPage:" + widthEachNextPage + " widthEachPrevPage:" + widthEachPrevPage); //AVWEB.avwLog("af widthEachPage:" + widthEachPage + " widthEachNextPage:" + widthEachNextPage + " widthEachPrevPage:" + widthEachPrevPage);
//console.log("af widthEachPageApi:" + widthEachPageApi + " widthEachNextPageApi:" + widthEachNextPageApi + " widthEachPrevPageApi:" + widthEachPrevPageApi); //AVWEB.avwLog("af widthEachPageApi:" + widthEachPageApi + " widthEachNextPageApi:" + widthEachNextPageApi + " widthEachPrevPageApi:" + widthEachPrevPageApi);
}; };
......
...@@ -227,13 +227,77 @@ $(function () { ...@@ -227,13 +227,77 @@ $(function () {
document.getElementById('dlgGomu_dspCancel').addEventListener('touchstart',touchStart_BtnCancel_Gomu,false); document.getElementById('dlgGomu_dspCancel').addEventListener('touchstart',touchStart_BtnCancel_Gomu,false);
} }
$("#dlgGomu_dspOK").click(dlgGomu_dspOK_click); //$("#dlgGomu_dspOK").click(dlgGomu_dspOK_click);
$("#dlgGomu_dspCancel").click(dlgGomu_dspCancel_click); $("#dlgGomu_dspOK").on({
'click touchend': function(ev){
dlgGomu_dspOK_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$("#text_dlgGomu_rdo1").click(dlgGomu_rdo1_text_click); //$("#dlgGomu_dspCancel").click(dlgGomu_dspCancel_click);
$("#text_dlgGomu_rdo2").click(dlgGomu_rdo2_text_click); $("#dlgGomu_dspCancel").on({
$("#text_dlgGomu_rdo3").click(dlgGomu_rdo3_text_click); 'click touchend': function(ev){
$("#text_dlgGomu_rdo4").click(dlgGomu_rdo4_text_click); dlgGomu_dspCancel_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#text_dlgGomu_rdo1").click(dlgGomu_rdo1_text_click);
$("#text_dlgGomu_rdo1").on({
'click touchend': function(ev){
dlgGomu_rdo1_text_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#text_dlgGomu_rdo2").click(dlgGomu_rdo2_text_click);
$("#text_dlgGomu_rdo2").on({
'click touchend': function(ev){
dlgGomu_rdo2_text_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#text_dlgGomu_rdo3").click(dlgGomu_rdo3_text_click);
$("#text_dlgGomu_rdo3").on({
'click touchend': function(ev){
dlgGomu_rdo3_text_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#text_dlgGomu_rdo4").click(dlgGomu_rdo4_text_click);
$("#text_dlgGomu_rdo4").on({
'click touchend': function(ev){
dlgGomu_rdo4_text_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
}); });
......
...@@ -126,7 +126,7 @@ function initPage() { ...@@ -126,7 +126,7 @@ function initPage() {
//abe //abe
//alert("initPage"); //alert("initPage");
//console.log("initPage"); //AVWEB.avwLog("initPage");
//START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image //START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
setLoadingSize(); setLoadingSize();
...@@ -200,7 +200,18 @@ function initPage() { ...@@ -200,7 +200,18 @@ function initPage() {
/* copy text */ /* copy text */
$('#copytext').click(showCopyText); $('#copytext').click(showCopyText);
/* close copy text dialog */ /* close copy text dialog */
$("#copyTextClosing").click(closeCopyTextBox); //$("#copyTextClosing").click(closeCopyTextBox);
$("#copyTextClosing").on({
'click touchend': function(ev){
closeCopyTextBox(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
} }
...@@ -219,7 +230,19 @@ function initPage() { ...@@ -219,7 +230,19 @@ function initPage() {
$("#imgHome").click(imgHome_click); $("#imgHome").click(imgHome_click);
$("#btn_show_memo").click(showEditMemo); $("#btn_show_memo").click(showEditMemo);
$("#btn_copy_memo").click(copyMemo); $("#btn_copy_memo").click(copyMemo);
$('#memoClosing').click(closePopUpCopyMemo);
//$('#memoClosing').click(closePopUpCopyMemo);
$("#memoClosing").on({
'click touchend': function(ev){
closePopUpCopyMemo(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#liAddMemo').click(click_liAddMemo); $('#liAddMemo').click(click_liAddMemo);
$('#liCopyMemo').click(click_liCopyMemo); $('#liCopyMemo').click(click_liCopyMemo);
$('#liDeleteMemo').click(click_liDeleteMemo); $('#liDeleteMemo').click(click_liDeleteMemo);
...@@ -278,7 +301,7 @@ function initPage() { ...@@ -278,7 +301,7 @@ function initPage() {
/*Init Page */ /*Init Page */
nAjaxLoad++; nAjaxLoad++;
//console.log("nAjaxLoad:" + nAjaxLoad); //AVWEB.avwLog("nAjaxLoad:" + nAjaxLoad);
if (nAjaxLoad == 8) { if (nAjaxLoad == 8) {
/* handle from bookmark page */ /* handle from bookmark page */
...@@ -622,7 +645,7 @@ function initPageMediaAndHtmlType(){ ...@@ -622,7 +645,7 @@ function initPageMediaAndHtmlType(){
function(file){ function(file){
var url = window.URL || window.webkitURL; var url = window.URL || window.webkitURL;
var resSrc = url.createObjectURL(file); var resSrc = url.createObjectURL(file);
console.log("read cache: createObjectURL " + resSrc); AVWEB.avwLog("read cache: createObjectURL " + resSrc);
displayOverlayForSpecifyContentType(resSrc); displayOverlayForSpecifyContentType(resSrc);
...@@ -630,7 +653,7 @@ function initPageMediaAndHtmlType(){ ...@@ -630,7 +653,7 @@ function initPageMediaAndHtmlType(){
); );
}, },
function(err){ // 失敗時のコールバック関数 function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem"); AVWEB.avwLog("NotRead FileSystem");
//キャッシュ化 //キャッシュ化
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
...@@ -641,7 +664,7 @@ function initPageMediaAndHtmlType(){ ...@@ -641,7 +664,7 @@ function initPageMediaAndHtmlType(){
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
//this.response is what you're looking for //this.response is what you're looking for
console.log(this.response, typeof this.response); AVWEB.avwLog(this.response, typeof this.response);
CONTENTVIEW_FILESYSTEM.fs.root.getFile( CONTENTVIEW_FILESYSTEM.fs.root.getFile(
'/abook/' + fileName, '/abook/' + fileName,
{create: true}, {create: true},
...@@ -649,10 +672,10 @@ function initPageMediaAndHtmlType(){ ...@@ -649,10 +672,10 @@ function initPageMediaAndHtmlType(){
fileEntry.createWriter( fileEntry.createWriter(
function(fileWriter) { function(fileWriter) {
fileWriter.onwriteend = function(e) { fileWriter.onwriteend = function(e) {
console.log('RES書き込み完了'); AVWEB.avwLog('RES書き込み完了');
}; };
fileWriter.onerror = function(e) { fileWriter.onerror = function(e) {
console.log('RES書き込みエラー: ' + e.toString()); AVWEB.avwLog('RES書き込みエラー: ' + e.toString());
}; };
var blobData = new Blob([xhr.response], {type:"application/octet-stream"}); var blobData = new Blob([xhr.response], {type:"application/octet-stream"});
...@@ -666,12 +689,12 @@ function initPageMediaAndHtmlType(){ ...@@ -666,12 +689,12 @@ function initPageMediaAndHtmlType(){
} else { } else {
if( this.readyState == 2 ){ if( this.readyState == 2 ){
console.log("onreadystatechange:" + this.readyState + " " + this.status); AVWEB.avwLog("onreadystatechange:" + this.readyState + " " + this.status);
CONTENTVIEW_FILESYSTEM.isXhrBusy = true; CONTENTVIEW_FILESYSTEM.isXhrBusy = true;
$('#divImageLoading').css('z-index', '99999'); $('#divImageLoading').css('z-index', '99999');
$('#divImageLoading').css('display', 'block'); $('#divImageLoading').css('display', 'block');
} }
//console.log("onreadystatechange:" + this.readyState + " " + this.status); //AVWEB.avwLog("onreadystatechange:" + this.readyState + " " + this.status);
} }
}; };
...@@ -681,7 +704,7 @@ function initPageMediaAndHtmlType(){ ...@@ -681,7 +704,7 @@ function initPageMediaAndHtmlType(){
xhr.responseType = 'blob'; xhr.responseType = 'blob';
xhr.send(); xhr.send();
} else { } else {
console.log("xhr is busy."); AVWEB.avwLog("xhr is busy.");
} }
//タグは書き出し //タグは書き出し
......
...@@ -46,17 +46,93 @@ function Maker_handleColorPickerEvent(){ ...@@ -46,17 +46,93 @@ function Maker_handleColorPickerEvent(){
$('#makerColorwrapper').bind('mouseleave', Maker_colorWrapperMouseLeaveFunction); $('#makerColorwrapper').bind('mouseleave', Maker_colorWrapperMouseLeaveFunction);
} }
$('#Maker_btnOk').live('click', Maker_dspOK_click); //$('#Maker_btnOk').live('click', Maker_dspOK_click);
$('#Maker_btnCancel').live('click', Maker_dspCancel_click); $("#Maker_btnOk").on({
'click touchend': function(ev){
Maker_dspOK_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$('#Maker_btnCancel').live('click', Maker_dspCancel_click);
$("#Maker_btnCancel").on({
'click touchend': function(ev){
Maker_dspCancel_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
Maker_SetDefaultValue(); Maker_SetDefaultValue();
$('#marker-small-text').live('click', markerSmallTextClick); //$('#marker-small-text').live('click', markerSmallTextClick);
$('#marker-medium-text').live('click', markerMediumTextClick); $("#marker-small-text").on({
$('#marker-large-text').live('click', markerLargeTextClick); 'click touchend': function(ev){
$('#marker-oversize-text').live('click', markerOversizeTextClick); markerSmallTextClick(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$('#marker-medium-text').live('click', markerMediumTextClick);
$("#marker-medium-text").on({
'click touchend': function(ev){
markerMediumTextClick(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$('#marker-large-text').live('click', markerLargeTextClick);
$("#marker-large-text").on({
'click touchend': function(ev){
markerLargeTextClick(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$('#marker-oversize-text').live('click', markerOversizeTextClick);
$("#marker-oversize-text").on({
'click touchend': function(ev){
markerOversizeTextClick(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$('#dlgMaker .colorpicker').live('click', Maker_colorPickerClickFunction);
$("#dlgMaker .colorpicker").on({
'click touchend': function(ev){
Maker_colorPickerClickFunction(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#dlgMaker .colorpicker').live('click', Maker_colorPickerClickFunction);
}; };
function markerSmallTextClick(){ function markerSmallTextClick(){
......
...@@ -465,20 +465,151 @@ function ShowMarking() { ...@@ -465,20 +465,151 @@ function ShowMarking() {
// Setting dialog // Setting dialog
$(function () { $(function () {
$("#dlgMarking_dspSave").click(dlgMarking_dspSave_click); //$("#dlgMarking_dspSave").click(dlgMarking_dspSave_click);
$("#dlgMarking_dspCancel").click(dlgMarking_dspCancel_click); $("#dlgMarking_dspSave").on({
$("#dlgMarking_dspPgClear").click(dlgMarking_dspPgClear_click); 'click touchend': function(ev){
dlgMarking_dspSave_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#dlgMarking_dspCancel").click(dlgMarking_dspCancel_click);
$("#dlgMarking_dspCancel").on({
'click touchend': function(ev){
dlgMarking_dspCancel_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#dlgMarking_dspPgClear").click(dlgMarking_dspPgClear_click);
$("#dlgMarking_dspPgClear").on({
'click touchend': function(ev){
dlgMarking_dspPgClear_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
// Icons // Icons
$("#dlgMarking_imgMin").click(dlgMarking_imgMin_click); //$("#dlgMarking_imgMin").click(dlgMarking_imgMin_click);
$("#dlgMarking_imgMax").click(dlgMarking_imgMax_click); $("#dlgMarking_imgMin").on({
$("#dlgMarking_imgClose").click(dlgMarking_imgClose_click); 'click touchend': function(ev){
$("#dlgMarking_imgPen").click(dlgMarking_imgPen_click); dlgMarking_imgMin_click(ev);
$("#dlgMarking_imgPenOption").click(dlgMarking_imgPenOption_click); return false;
$("#dlgMarking_imgMaker").click(dlgMarking_imgMaker_click); },
$("#dlgMarking_imgMakerOption").click(dlgMarking_imgMakerOption_click); 'touchstart touchmove': function(){
$("#dlgMarking_imgEraser").click(dlgMarking_imgEraser_click); //これを入れないと次にダイアログを開くと表示位置が大きくズレる
$("#dlgMarking_imgEraserOption").click(dlgMarking_imgEraserOption_click); return false;
}
});
//$("#dlgMarking_imgMax").click(dlgMarking_imgMax_click);
$("#dlgMarking_imgMax").on({
'click touchend': function(ev){
dlgMarking_imgMax_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#dlgMarking_imgClose").click(dlgMarking_imgClose_click);
$("#dlgMarking_imgClose").on({
'click touchend': function(ev){
dlgMarking_imgClose_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#dlgMarking_imgPen").click(dlgMarking_imgPen_click);
$("#dlgMarking_imgPen").on({
'click touchend': function(ev){
dlgMarking_imgPen_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#dlgMarking_imgPenOption").click(dlgMarking_imgPenOption_click);
$("#dlgMarking_imgPenOption").on({
'click touchend': function(ev){
dlgMarking_imgPenOption_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#dlgMarking_imgMaker").click(dlgMarking_imgMaker_click);
$("#dlgMarking_imgMaker").on({
'click touchend': function(ev){
dlgMarking_imgMaker_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#dlgMarking_imgMakerOption").click(dlgMarking_imgMakerOption_click);
$("#dlgMarking_imgMakerOption").on({
'click touchend': function(ev){
dlgMarking_imgMakerOption_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#dlgMarking_imgEraser").click(dlgMarking_imgEraser_click);
$("#dlgMarking_imgEraser").on({
'click touchend': function(ev){
dlgMarking_imgEraser_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$("#dlgMarking_imgEraserOption").click(dlgMarking_imgEraserOption_click);
$("#dlgMarking_imgEraserOption").on({
'click touchend': function(ev){
dlgMarking_imgEraserOption_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
/* /*
$('#dlgMarking').dialog({ $('#dlgMarking').dialog({
autoOpen: false, autoOpen: false,
......
...@@ -14,7 +14,7 @@ function createMemoDialog(){ ...@@ -14,7 +14,7 @@ function createMemoDialog(){
targetDiv.append( targetDiv.append(
'<aside id="memoWrapper" class="MemoIndexBox">' '<aside id="memoWrapper" class="MemoIndexBox">'
+ ' <h1 class="indexBoxHd">' + i18nText('txtMemo') + ' <h1 class="indexBoxHd">' + i18nText('txtMemo')
+' <a class="delete"></a>' +' <a id="memoClosing2" class="delete"></a>'
+' </h1>' +' </h1>'
+' <div id="memoArea" class="indexBoxBody_on">' +' <div id="memoArea" class="indexBoxBody_on">'
+' <textarea id="txaMemoContent" style="resize: none; height: 302px; width: 452px; margin-bottom: 10px"></textarea>' +' <textarea id="txaMemoContent" style="resize: none; height: 302px; width: 452px; margin-bottom: 10px"></textarea>'
...@@ -35,7 +35,19 @@ function handleMemoEventFunction(){ ...@@ -35,7 +35,19 @@ function handleMemoEventFunction(){
$('#Memo_btnSave').click(buttonSaveFunction); $('#Memo_btnSave').click(buttonSaveFunction);
$('#Memo_btnDel').click(MemoDelFunction); $('#Memo_btnDel').click(MemoDelFunction);
$('#Memo_btnCancel').click(MemoCancelFunction); $('#Memo_btnCancel').click(MemoCancelFunction);
$('.delete').click(MemoCancelFunction);
//$('.delete').click(MemoCancelFunction);
$("#memoClosing2").on({
'click touchend': function(ev){
MemoCancelFunction(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
}; };
function memoSaveFunction(){ function memoSaveFunction(){
......
/// コンテンツ閲覧画面_消しゴム書式オーバーレイ /// コンテンツ閲覧画面_消しゴム書式オーバーレイ
/// <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" />
// works out the X, Y position of the click inside the canvas from the X, Y position on the page // works out the X, Y position of the click inside the canvas from the X, Y position on the page
function getPosition(mouseEvent, sigCanvas) { function getPosition(mouseEvent, sigCanvas) {
......
...@@ -51,17 +51,95 @@ function Pen_handleColorPickerEvent() { ...@@ -51,17 +51,95 @@ function Pen_handleColorPickerEvent() {
$('#penColorwrapper').bind('mouseleave', Pen_colorWrapperMouseLeaveFunction); $('#penColorwrapper').bind('mouseleave', Pen_colorWrapperMouseLeaveFunction);
} }
$('#Pen_btnOk').live('click', Pen_dspOK_click); //$('#Pen_btnOk').live('click', Pen_dspOK_click);
$('#Pen_btnCancel').live('click', Pen_dspCancel_click); $("#Pen_btnOk").on({
'click touchend': function(ev){
Pen_dspOK_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$('#Pen_btnCancel').live('click', Pen_dspCancel_click);
$("#Pen_btnCancel").on({
'click touchend': function(ev){
Pen_dspCancel_click(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
Pen_SetDefaultValue(); Pen_SetDefaultValue();
$('#pen-small-text').live('click', penSmallTextClick); //$('#pen-small-text').live('click', penSmallTextClick);
$('#pen-medium-text').live('click', penMediumTextClick); $("#pen-small-text").on({
$('#pen-large-text').live('click', penLargeTextClick); 'click touchend': function(ev){
$('#pen-oversize-text').live('click', penOversizeTextClick); penSmallTextClick(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$('#pen-medium-text').live('click', penMediumTextClick);
$("#pen-medium-text").on({
'click touchend': function(ev){
penMediumTextClick(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$('#pen-large-text').live('click', penLargeTextClick);
$("#pen-large-text").on({
'click touchend': function(ev){
penLargeTextClick(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
//$('#pen-oversize-text').live('click', penOversizeTextClick);
$("#pen-oversize-text").on({
'click touchend': function(ev){
penOversizeTextClick(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
$('#dlgPen .colorpicker').live('click', Pen_colorPickerClickFunction); //$('#dlgPen .colorpicker').live('click', Pen_colorPickerClickFunction);
$("#dlgPen .colorpicker").on({
'click touchend': function(ev){
Pen_colorPickerClickFunction(ev);
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
});
}; };
function penSmallTextClick(){ function penSmallTextClick(){
......
...@@ -56,7 +56,7 @@ $(document).ready(function () { ...@@ -56,7 +56,7 @@ $(document).ready(function () {
//$(document).ready(function () { //$(document).ready(function () {
HOME.ready = function(){ HOME.ready = function(){
//console.log("HOME.ready!"); //AVWEB.avwLog("HOME.ready!");
if (!avwCheckLogin(ScreenIds.Login)) { if (!avwCheckLogin(ScreenIds.Login)) {
return; return;
...@@ -1215,7 +1215,7 @@ function getDataJsonFileGroup() { ...@@ -1215,7 +1215,7 @@ function getDataJsonFileGroup() {
for (var nIndex = 0; nIndex < tree2.ExpandNodes.length; nIndex++) { for (var nIndex = 0; nIndex < tree2.ExpandNodes.length; nIndex++) {
if ($("#" + tree2.ExpandNodes[nIndex]).parent()) { if ($("#" + tree2.ExpandNodes[nIndex]).parent()) {
//console.log("tree2.ExpandNodes"); //AVWEB.avwLog("tree2.ExpandNodes");
var objParent = $("#" + tree2.ExpandNodes[nIndex]).parent(); var objParent = $("#" + tree2.ExpandNodes[nIndex]).parent();
var objChild = objParent.children()[0]; var objChild = objParent.children()[0];
if (objChild) { if (objChild) {
......
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