Commit 3c754480 by Motohisa Nakano

20121205

parent 8e46bb9c
......@@ -68,6 +68,7 @@ var ScreenIds = {
};
var Keys = {
IsRefresh: 'IsRefresh',
// Local
BookmarkScreen: 'BookmarkScreen',
// Local
......@@ -470,6 +471,20 @@ var ClientData = {
return LocalStorageUtils.get(Keys.JumpQueue);
}
},
IsRefresh: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(Keys.IsRefresh, JSON.stringify(data));
} else {
if (SessionStorageUtils.get(Keys.IsRefresh) != 'undefined'
&& SessionStorageUtils.get(Keys.IsRefresh) != undefined
&& SessionStorageUtils.get(Keys.IsRefresh) != ''
&& SessionStorageUtils.get(Keys.IsRefresh) != null
&& SessionStorageUtils.get(Keys.IsRefresh) != 'null') {
return JSON.parse(SessionStorageUtils.get(Keys.IsRefresh));
}
return false;
}
},
// Session
IsLocked: function (data) {
if (arguments.length > 0) {
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"EN:バックアップしないでログアウト",
"txtSearchResult":"Search Result",
"dspHome":"Home",
"txtLoginUser":"(Ver.20121204-1)EN:ログイン中:",
"txtLoginUser":"(Ver.20121205-1)EN:ログイン中:",
"txtAll":"All",
"txtMkgSize":"EN:太さ",
"txtMkgS":"EN:小",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップしないでログアウト",
"txtSearchResult":"検索結果",
"dspHome":"ホーム",
"txtLoginUser":"(Ver.20121204-1)ログイン中:",
"txtLoginUser":"(Ver.20121205-1)ログイン中:",
"txtAll":"すべて",
"txtMkgSize":"太さ",
"txtMkgS":"小",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과",
"dspHome":"홈",
"txtLoginUser":"(Ver.20121204-1)로그인 중:",
"txtLoginUser":"(Ver.20121205-1)로그인 중:",
"txtAll":"전체",
"txtMkgSize":"두께",
"txtMkgS":"소",
......
......@@ -774,9 +774,11 @@
/* change size */
function sizingScreen() {
var w = $("#wrapper").width();
var h = $("#wrapper").height();
var w1 = $("#wrapper").width();
var h1 = $("#wrapper").height();
var w = $(window).width();
var h = $(window).height();
// Adjust the size of the View
if(isFullScreen == true){
sizingFullSize(w,h);
......@@ -1919,8 +1921,8 @@
}else{
/* create data on dialog */
$('#divCopyText').children().remove();
$('#divCopyText').append('<li class="last">' + sPageText + '</li>');
//$('#divCopyText').append('<li class="last">' + sPageText + '</li>');
$('#divCopyText').append('<label class="last" style="word-wrap:break-word">' +sPageText+ '</label>');
/* display dialog */
// $("#divCopyText").dialog({
// show: "blind",
......@@ -1936,6 +1938,7 @@
$('#bookmarkBoxHdCT').html('<a id="copyTextClosing" class="delete" style="padding-top:0px;"> </a>');
$("#copyTextClosing").click(closeCopyTextBox);
$('#bookmarkBoxHdCT').append(i18nText('txtTextCopy'));
//title end
//lockLayout();
......@@ -2011,15 +2014,15 @@
}
/*event click show dialog search*/
function showListSearchResult(){
$('#txtSearch').keydown(function(e){
if (e.keyCode == 13){
searchHandle();
/* display dialog overlay */
$("#overlay").show();
}
});
function showListSearchResult(){
$('#txtSearch').keydown(function (e) {
if (e.keyCode == 13) {
searchHandle();
/* display dialog overlay */
//$("#overlay").show();
}
});
}
/* event close searching result box */
......@@ -2028,7 +2031,7 @@
$('#boxSearching').css('display' , 'none');
/* unlock dialog overlay */
$("#overlay").hide();
//$("#overlay").hide();
}
......@@ -3181,7 +3184,10 @@ function oldContent_Back(){
}
}
function initPage(){
function initPage(){
//$('body,html').animate({ scrollTop: 0 }, 350);
$('#divImageLoading').css('display','block');
/* init footer toolbar */
......@@ -3343,10 +3349,18 @@ function oldContent_Back(){
});
}
$("document").ready(function() {
initPage();
});
$("document").ready(function () {
if (avwUserEnvObj.os == 'ipad') {
if (ClientData.IsRefresh() == true) {
initPage();
}
}
else {
initPage();
}
});
LockScreen();
</script>
......
......@@ -67,6 +67,7 @@ header{
width:100%;
position:absolute;
top:0;
left: 0;
}
.wrapper_header{
......@@ -213,6 +214,7 @@ header{
height:60px;
position:fixed;
bottom:0;
}
.ftRcolumn_2 {
......@@ -227,6 +229,7 @@ header{
height:60px;
position:absolute;
bottom:0;
left: 0;
}
.ftinner{
......@@ -900,6 +903,14 @@ aside.bookmarkBox li{
line-height:15px;
vertical-align:middle;
}
aside.bookmarkBox label{
padding:4px;
border-bottom:solid 1px #444;
overflow:hidden;
font-size:11px;
line-height:15px;
vertical-align:middle;
}
aside.bookmarkBox li .imgbox{
/*
......
......@@ -169,9 +169,11 @@ function contentdetail_dspRead_Click(e) {
//Set MetaVersion for content
setMetaVersionData(outputId);
// Redirect to screen: contentview
//window.location.href = ScreenIds.ContentView;
// Redirect to screen: contentview
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false);
avwScreenMove(ScreenIds.ContentView);
}
......
......@@ -154,7 +154,7 @@ function dspRead_Click() {
ClientData.bookmark_contentNo(data.contentid);
ClientData.bookmark_pageNo(data.pageNo);
//window.location.href = ScreenIds.ContentView;
ClientData.IsRefresh(false);
avwScreenMove(ScreenIds.ContentView);
}
......
......@@ -769,7 +769,7 @@ function readSubmenuFunction(e){
//Set data for readingcontentid
ClientData.ReadingContentIds(contentIdArray);
//window.location = ScreenIds.ContentView;
ClientData.IsRefresh(false);
avwScreenMove(ScreenIds.ContentView);
}
......
......@@ -1728,6 +1728,7 @@ function draw(context) {
var leftCanvas = 0;
var topCanvas = 0;
var count = 0
/* display to screen */
function flip() {
var canvas = document.getElementById('main');
......@@ -1773,6 +1774,13 @@ function flip() {
width = canvas.width;
height = width / aspect;
}
if(height > canvas.height){
var size = canvas.height / height;
height = canvas.height;
width = width * size;
}
var destX = 0, destY = 0;
destX = (canvas.width / 2) - (width / 2);
destY = (canvas.height / 2) - (height / 2);
......@@ -1817,11 +1825,10 @@ function flip() {
// draw canvas
context.clearRect(0, 0, canvas.width, canvas.height);
context.save();
context.drawImage(offscreen,
srcRect.left, srcRect.top, srcRect.right - srcRect.left, srcRect.bottom - srcRect.top,
destRect.left, destRect.top, width, height);
srcRect.left, srcRect.top, srcRect.right - srcRect.left, srcRect.bottom - srcRect.top,
destRect.left, destRect.top, width, height);
context.restore();
};
......@@ -2428,7 +2435,7 @@ function sizingNotFull(width, height) {
if(isTouchDevice() == true){
$("#main") .css('top', marginY);
$("#main").attr('height', height - (marginY * 2))
.attr('width', width - (marginX * 3 + 5));
.attr('width', width - (marginX * 2));
}else{
$("#main").attr('height', height - (marginY * 2))
......@@ -2445,7 +2452,7 @@ function sizingFullSize(width, height) {
if(isTouchDevice() == true){
$("#main") .css('top', '0px');
$("#main").attr('height', height)
.attr('width', width - (marginX * 3 -5));
.attr('width', width - (marginX * 2));
}else{
$("#main").attr('height', height)
.attr('width', width - (marginX * 2))
......@@ -2778,4 +2785,18 @@ $(function () {
$("#imgHome").click(imgHome_click);
$("#btn_show_memo").click(showEditMemo);
$("#btn_copy_memo").click(copyMemo);
if (avwUserEnvObj.os == 'ipad') {
if (ClientData.IsRefresh() != true) {
$('body, html').hide();
ClientData.IsRefresh(true);
location.reload();
}
else {
// Skip
}
//$(document).bind('touchmove', function (e) { e.preventDefault(); });
}
});
\ No newline at end of file
......
......@@ -45,29 +45,38 @@ $(document).ready(function () {
//Display user name
//$('#login-username').html(ClientData.userInfo_loginId());
$('#login-username').text(ClientData.userInfo_userName());
$('#dlgConfirmBackup-backup').click(confirmWithBackupFunction);
$('#dlgConfirmBackup-withoutbackup').click(confirmWithoutBackupFunction);
$('#dlgConfirmBackup1').hide();
$('#searchbox-key').keydown(headerSearchKeyDownEventFunction);
$('#searchbox-content-header').click(headerSearchContentClickFunction);
$('#searchbox-tag-header').click(headerSearchTagClickFunction);
$('#searchbox-body-header').click(headerSearchBodyClickFunction);
$('#searchbox-content-header').click(headerSearchContentClickFunction);
$('#searchbox-tag-header').click(headerSearchTagClickFunction);
$('#searchbox-body-header').click(headerSearchBodyClickFunction);
//$('*').click(handleHeaderSearchBoxEvent);
$('#searchbox-key').hover(searchBoxHoverFunction, searchBoxHoverOffFunction);
$('#header-searchbox').hover(searchBoxHoverFunction, searchBoxHoverOffFunction);
$('body').click(bodyClickFunction);
if (isTouchDevice() == false) {
$('#searchbox-key').hover(searchBoxHoverFunction, searchBoxHoverOffFunction);
$('#header-searchbox').hover(searchBoxHoverFunction, searchBoxHoverOffFunction);
}
if (isTouchDevice() == true) {
var bodyTag = document.getElementsByTagName('body')[0];
bodyTag.addEventListener('touchstart', bodyClickFunction, false);
}
else {
$('body').click(bodyClickFunction);
}
});
function searchBoxHoverFunction(){
......@@ -77,28 +86,55 @@ function searchBoxHoverOffFunction() {
isHoverOn = false;
};
function bodyClickFunction(){
if(!isHoverOn){
$('#header-searchbox').hide();
}
function bodyClickFunction(event) {
if (isTouchDevice()) {
// Check mouse is in rectangle of searching panel
if ($('#header-searchbox').css('display') != "none") {
if (event.targetTouches[0].clientX >= $('#header-searchbox').position().left
&& event.targetTouches[0].clientX <= ($('#header-searchbox').position().left + $('#header-searchbox').width())
&& event.targetTouches[0].clientY >= $('#header-searchbox').position().top
&& event.targetTouches[0].clientY <= ($('#header-searchbox').position().top + $('#header-searchbox').height())) {
isHoverOn = true;
}
else {
isHoverOn = false;
$('#header-searchbox').hide();
}
}
}
else {
if (!isHoverOn) {
$('#header-searchbox').hide();
}
}
}
function headerSearchBodyClickFunction(){
function headerSearchBodyClickFunction() {
$('#searchbox-body').attr('checked','checked');
$('#searchbox-tag').removeAttr('checked');
$('#searchbox-content').removeAttr('checked');
isHoverOn = true;
}
function headerSearchTagClickFunction(){
function headerSearchTagClickFunction() {
$('#searchbox-tag').attr('checked','checked');
$('#searchbox-body').removeAttr('checked');
$('#searchbox-content').removeAttr('checked');
isHoverOn = true;
}
function headerSearchContentClickFunction(){
function headerSearchContentClickFunction() {
$('#searchbox-content').attr('checked','checked');
$('#searchbox-tag').removeAttr('checked');
$('#searchbox-body').removeAttr('checked');
isHoverOn = true;
}
......@@ -107,7 +143,8 @@ function headerSearchKeyDownEventFunction(e){
var code = (e.keyCode ? e.keyCode : e.which);
if(code == 13) { //Enter keycode
$('#searchbox-search').click();
}
}
isHoverOn = true;
}
//Toggle Search Panel Click function
......
......@@ -648,8 +648,8 @@ function readSubmenuFunction(e){
//Set data for readingcontentid
ClientData.ReadingContentIds(contentIdArray);
//window.location = ScreenIds.ContentView;
ClientData.IsRefresh(false);
avwScreenMove(ScreenIds.ContentView);
}
......
......@@ -347,6 +347,9 @@ function canvasClickFunction(e) {
//Set MetaVersion for content
setMetaVersionData(outputId);
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false);
//Go to Conten view page
avwScreenMove(ScreenIds.ContentView);
}
......@@ -957,7 +960,8 @@ function readSubmenuFunction(e){
//Close Submenu
$('#dlgSubMenu').hide();
//window.location = ScreenIds.ContentView;
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false);
avwScreenMove(ScreenIds.ContentView);
}
......@@ -2264,6 +2268,4 @@ function resizeResourceThumbnail(mg, width, height) {
var result = [newWidth, newHeight];
return result;
}
}
\ No newline at end of file
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