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,8 +774,10 @@
/* 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){
......@@ -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();
......@@ -2012,12 +2015,12 @@
/*event click show dialog search*/
function showListSearchResult(){
$('#txtSearch').keydown(function(e){
if (e.keyCode == 13){
$('#txtSearch').keydown(function (e) {
if (e.keyCode == 13) {
searchHandle();
/* display dialog overlay */
$("#overlay").show();
//$("#overlay").show();
}
});
}
......@@ -2028,7 +2031,7 @@
$('#boxSearching').css('display' , 'none');
/* unlock dialog overlay */
$("#overlay").hide();
//$("#overlay").hide();
}
......@@ -3182,6 +3185,9 @@ function oldContent_Back(){
}
function initPage(){
//$('body,html').animate({ scrollTop: 0 }, 350);
$('#divImageLoading').css('display','block');
/* init footer toolbar */
......@@ -3344,8 +3350,16 @@ function oldContent_Back(){
});
}
$("document").ready(function() {
$("document").ready(function () {
if (avwUserEnvObj.os == 'ipad') {
if (ClientData.IsRefresh() == true) {
initPage();
}
}
else {
initPage();
}
});
LockScreen();
......
......@@ -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{
/*
......
......@@ -171,7 +171,9 @@ function contentdetail_dspRead_Click(e) {
setMetaVersionData(outputId);
// Redirect to screen: contentview
//window.location.href = ScreenIds.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);
......@@ -1821,7 +1829,6 @@ function flip() {
context.drawImage(offscreen,
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
......
......@@ -63,11 +63,20 @@ $(document).ready(function () {
//$('*').click(handleHeaderSearchBoxEvent);
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){
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;
}
......@@ -108,6 +144,7 @@ function headerSearchKeyDownEventFunction(e){
if(code == 13) { //Enter keycode
$('#searchbox-search').click();
}
isHoverOn = true;
}
//Toggle Search Panel Click function
......
......@@ -649,7 +649,7 @@ 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);
}
......@@ -2265,5 +2269,3 @@ function resizeResourceThumbnail(mg, width, height) {
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