Commit f2a72203 by Motohisa Nakano

20121213

parent fcb38d18
......@@ -121,8 +121,8 @@
<section class="sectionDeleteConfirm" id="delete_shiori">
<h1 class="lang" lang="txtDeleteConfirmTitle">しおり削除確認</h1>
<p class="message " lang="dspShioriDelConf">設定されているしおりを削除しますか?</p>
<p class="deletebtn"><a id="dspConfirmOK" lang="dspOK" class="ok">OK</a><a id="dspCancel" lang="dspCancel" class="cancel">キャンセル</a></p>
<p class="message lang" lang="dspShioriDelConf">設定されているしおりを削除しますか?</p>
<p class="deletebtn"><a id="dspConfirmOK" lang="dspOK" class="ok lang">OK</a><a id="dspCancel" lang="dspCancel" class="cancel lang">キャンセル</a></p>
</section>
<!-- Delete panel [end] -->
......
......@@ -466,18 +466,18 @@ function operateData(args, strKey, returnDefaultData) {
}
}
else {
// if (LocalStorageUtils.existKey(strKey) == true) {
// SessionStorageUtils.set(strKey, JSON.stringify(LocalStorageUtils.get(strKey)));
// return JSON.parse(SessionStorageUtils.get(strKey));
// }
if (LocalStorageUtils.existKey(strKey) == true) {
SessionStorageUtils.set(strKey, JSON.stringify(LocalStorageUtils.get(strKey)));
if (SessionStorageUtils.get(strKey) != 'undefined'
&& SessionStorageUtils.get(strKey) != undefined
&& SessionStorageUtils.get(strKey) != ''
&& SessionStorageUtils.get(strKey) != null
&& SessionStorageUtils.get(strKey) != 'null') {
return JSON.parse(SessionStorageUtils.get(strKey));
}
// SessionStorageUtils.set(strKey, JSON.stringify(LocalStorageUtils.get(strKey)));
// if (SessionStorageUtils.get(strKey) != 'undefined'
// && SessionStorageUtils.get(strKey) != undefined
// && SessionStorageUtils.get(strKey) != ''
// && SessionStorageUtils.get(strKey) != null
// && SessionStorageUtils.get(strKey) != 'null') {
// return JSON.parse(SessionStorageUtils.get(strKey));
// }
return returnDefaultData;
}
}
......
......@@ -24,7 +24,6 @@ function calculateZoomLevel() {
if (zoom_callbackFunction) {
zoom_callbackFunction(zoom_ratioPre, zoom_ratio, zoom_oldW, zoom_oldH, window.innerWidth, window.innerHeight);
}
alert(zoom_oldW);
zoom_ratioPre = zoom_ratio;
zoom_oldW = window.innerWidth;
zoom_oldH = window.innerHeight;
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"Logout",
"txtSearchResult":"Result",
"dspHome":"Home",
"txtLoginUser":"(Ver.20121212-2)User:",
"txtLoginUser":"(Ver.20121213-1)User:",
"txtAll":"All",
"txtMkgSize":"Size",
"txtMkgS":"S",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果",
"dspHome":"ホーム",
"txtLoginUser":"(Ver.20121212-2)ログイン中:",
"txtLoginUser":"(Ver.20121213-1)ログイン中:",
"txtAll":"すべて",
"txtMkgSize":"太さ",
"txtMkgS":"小",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과",
"dspHome":"홈",
"txtLoginUser":"(Ver.20121212-2)로그인 중:",
"txtLoginUser":"(Ver.20121213-1)로그인 중:",
"txtAll":"전체",
"txtMkgSize":"두께",
"txtMkgS":"소",
......
......@@ -465,7 +465,6 @@ div .ui-slider-range, .ui-widget-header, .ui-slider-range-max {
width:390px;
height: 265px;
background:url('../img/viewer/alpha_w70.png') 0 0 repeat;
position:absolute;
/*top:-63px;*/
/*right:-138px;*/
z-index: 101;
......@@ -688,3 +687,112 @@ aside.MemoIndexBox .indexBoxBody_off{
background: linear-gradient(to bottom, rgb(45,123,191) 27%,rgb(16,89,163) 77%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2d7bbf', endColorstr='#1059a3',GradientType=0 ); /* IE6-9 */
}
.pen_selected{
background:url(../img/viewer/1_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.pen_hover{
background:url(../img/viewer/1.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.pen_hover:hover{
background:url(../img/viewer/1_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.maker_selected{
background:url(../img/viewer/3_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.maker_hover{
background:url(../img/viewer/3.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.maker_hover:hover{
background:url(../img/viewer/3_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.eraser_selected{
background:url(../img/viewer/5_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.eraser_hover{
background:url(../img/viewer/5.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.eraser_hover:hover{
background:url(../img/viewer/5_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.pen_option_selected{
background:url(../img/viewer/2_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.pen_option_hover{
background:url(../img/viewer/2.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.pen_option_hover:hover{
background:url(../img/viewer/2_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.maker_option_selected{
background:url(../img/viewer/4_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.maker_option_hover{
background:url(../img/viewer/4.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.maker_option_hover:hover{
background:url(../img/viewer/4_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.eraser_option_selected{
background:url(../img/viewer/6_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.eraser_option_hover{
background:url(../img/viewer/6.png) 0 0 repeat-x;
width:60px;
height:60px;
}
.eraser_option_hover:hover{
background:url(../img/viewer/6_hover.png) 0 0 repeat-x;
width:60px;
height:60px;
}

1.85 KB | W: | H:

3.11 KB | W: | H:

abvw/img/viewer/sizingbtn.png
abvw/img/viewer/sizingbtn.png
abvw/img/viewer/sizingbtn.png
abvw/img/viewer/sizingbtn.png
  • 2-up
  • Swipe
  • Onion skin

2.8 KB | W: | H:

4.77 KB | W: | H:

abvw/img/viewer/transitionbtn.png
abvw/img/viewer/transitionbtn.png
abvw/img/viewer/transitionbtn.png
abvw/img/viewer/transitionbtn.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -1070,6 +1070,7 @@ function initializeViewerComponent(viewId) {
'<canvas id="main"></canvas>' +
'<canvas id="offscreen"></canvas>' +
'<canvas id="draw_canvas"></canvas>' +
'<canvas id="marker_canvas"></canvas>' +
'<div id="playvideo"></div>' +
'<div id="playaudio" style="width:0px; height:0px;"></div>' +
'<div id="playaudiopage" style="width:0px; height:0px;"></div>' +
......@@ -1095,6 +1096,16 @@ function initializeViewerComponent(viewId) {
'display' : 'none'
}
);
$('#marker_canvas').css(
{
'display' : 'none',
'position' : 'absolute',
'cursor': 'default'
}
);
$('#draw_canvas').css(
{
'display' : 'none',
......@@ -1115,6 +1126,8 @@ function initializeViewerComponent(viewId) {
setDefaultEvent();
/*init canvas value */
canvas_marker = document.getElementById('marker_canvas');
context_marker = canvas_marker.getContext('2d');
canvas_draw = document.getElementById('draw_canvas');
context_draw = canvas_draw.getContext('2d');
canvas_main = document.getElementById('main');
......@@ -1161,12 +1174,35 @@ function onClick_CanvasMain(event){
$('#imgaddmemo').addClass('memoAdd');
});
}else{
$("#overlay").show();
$('#boxAddMemo').css('z-index' , '101'); $('#boxAddMemo').css('display' , 'block');
$('#boxAddMemo').draggable({ handle: "h1" });
$("#boxAddMemo").offset({left:event.pageX,top:event.pageY});
$("#divAddMemo").show();
$("#divAddMemo").offset({left:event.pageX,top:(event.pageY + $('#bookmarkBoxHdMemo').height() - 2)});
if(typeSelectMemo == 1){ /* add new */
AddMemo(contentID,changePageIndex(getPageIndex()),$('#divDialogMemo'),posXPopupMemo,posYPopupMemo,function(){
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
drawMemoOnScreen();
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
}else if(typeSelectMemo == 2){ /* copy */
CopyMemo(ClientData.memo_copyText(),contentID,changePageIndex(getPageIndex()),$('#divDialogMemo'),posXPopupMemo,posYPopupMemo,function(){
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
drawMemoOnScreen();
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
}
}
}else{
......@@ -2128,6 +2164,11 @@ function flip() {
.css('top', destRect.top + marginY - 1)
.css('left',destRect.left + marginX - 1);
$("#marker_canvas").attr('height', destRect.bottom - destRect.top)
.attr('width', destRect.right - destRect.left)
.css('top', destRect.top + marginY - 1)
.css('left',destRect.left + marginX - 1);
isFirstLoad = false;
}
......@@ -2240,7 +2281,6 @@ function hideDialog()
$("#overlay").hide();
$("#dialog").fadeOut(300);
$('#dialog').children().remove();
initFlg = true;
}
function createImagePreview(){
......@@ -2512,6 +2552,10 @@ var TypeAudio2;
/* create audio on page */
function createAudio(audio,type){
// if(avwUserEnvObj.browser == 'firefox'){
// audio = audio.replace("webResourceDownload/", "webResourceDownload");
// }
if(audio != ''){
if(type == "0"){ /* play when click */
stopAllAudio();
......@@ -2554,16 +2598,12 @@ function createAudio(audio,type){
TypeAudio1 = type;
srcAudioType1 = audio;
if(document.getElementById("play_audio_1") != undefined){
// document.getElementById("play_audio_1").load();
// document.getElementById("play_audio_1").play();
}else{
if(ClientData.userOpt_musicMode() == "1"){
if(avwUserEnvObj.browser == 'firefox'){
$('#playaudioallpage').html(
' <embed id="play_audio_1" src="' + audio + '&key=' + (new Date()).toIdString() + '" autostart="true" loop="true" hidden="true"> </embed>'
);
}else{
$('#playaudioallpage').html(
' <audio id="play_audio_1" loop="loop" autoplay="autoplay" >' +
......@@ -2584,13 +2624,6 @@ function createAudio(audio,type){
);
}
}
//playAllAudio();
// if(document.getElementById("play_audio_1") != undefined){
// document.getElementById("play_audio_1").pause();
// document.getElementById("play_audio_1").play();
// }
}
}
else if(type == "2"){ /* play on page */
stopAllAudio();
......@@ -2783,6 +2816,7 @@ function sizingNotFull(width, height) {
}
$("#draw_canvas").css('cursor', 'default');
$("#marker_canvas").css('cursor', 'default');
if(userScale !=1){
changeScale(userScale);
......@@ -2810,6 +2844,7 @@ function sizingFullSize(width, height) {
//adjust size of canvas using for draw
$("#draw_canvas").css('cursor', 'default');
$("#marker_canvas").css('cursor', 'default');
if(userScale !=1){
changeScale(userScale);
......@@ -3355,37 +3390,25 @@ function closePopUpCopyMemo(){
}
function click_liAddMemo(event){
AddMemo(contentID,changePageIndex(getPageIndex()),$('#divDialogMemo'),posXPopupMemo,posYPopupMemo,function(){
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
drawMemoOnScreen();
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
typeSelectMemo = 1;
$('#boxAddMemo').hide();
/* unlock dialog overlay */
$("#overlay").hide();
//ClientData.memo_copyText(null);
ClientData.IsAddingMemo(false);
//ClientData.IsAddingMemo(false);
}
function click_liCopyMemo(){
CopyMemo(ClientData.memo_copyText(),contentID,changePageIndex(getPageIndex()),$('#divDialogMemo'),posXPopupMemo,posYPopupMemo,function(){
//set flag change memo
ClientData.isChangedMemo(true);
/* refresh draw memo */
drawMemoOnScreen();
});
typeSelectMemo = 2;
$('#boxAddMemo').hide();
/* unlock dialog overlay */
$("#overlay").hide();
//ClientData.memo_copyText(null);
ClientData.IsAddingMemo(false);
//ClientData.IsAddingMemo(false);
}
function click_liDeleteMemo(){
......
......@@ -31,6 +31,7 @@ function ShowEraser(targetDiv) {
$('#dlgGomu').show();
$('#dlgGomu').draggable();
Eraser_SetDefaultValue();
$('#dlgGomu').center();
}
// Set default value for easer.
function Eraser_SetDefaultValue() {
......@@ -131,6 +132,12 @@ function dlgGomu_dspOK_click() {
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() {
......@@ -146,6 +153,12 @@ function dlgGomu_dspCancel_click() {
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(){
......@@ -199,6 +212,7 @@ function touchStart_BtnOk_Gomu(e){
dlgGomu_dspOK_click();
}
function touchStart_BtnCancel_Gomu(e){
......
......@@ -31,10 +31,10 @@ function ShowMaker(targetId){
'<div id="panel-maker" class="rayermenu1">'
+' <div id="panel-maker-size">'
+' <span lang="txtMkgSize" class="lang" >太いさ</span>'
+' <input type="radio" id="maker-size-small" name="maker-size" /><span id="marker-small-text" class="lang" lang="txtMkgS">S</span>'
+' <input type="radio" id="maker-size-medium" name="maker-size" /><span id="marker-medium-text" class="lang" lang="txtMkgM">M</span>'
+' <input type="radio" id="maker-size-large" name="maker-size" /><span id="marker-large-text" class="lang" lang="txtMkgB">L</span>'
+' <input type="radio" id="maker-size-oversize" name="maker-size" /><span id="marker-oversize-text" class="lang" lang="txtMkgSB">XL</span>'
+ ' <input type="radio" id="maker-size-small" name="maker-size" /><label for="maker-size-small" id="marker-small-text" class="lang" lang="txtMkgS">S</label>'
+ ' <input type="radio" id="maker-size-medium" name="maker-size" /><label for="maker-size-medium" id="marker-medium-text" class="lang" lang="txtMkgM">M</label>'
+ ' <input type="radio" id="maker-size-large" name="maker-size" /><label for="maker-size-large" id="marker-large-text" class="lang" lang="txtMkgB">L</label>'
+ ' <input type="radio" id="maker-size-oversize" name="maker-size" /><label for="maker-size-oversize" id="marker-oversize-text" class="lang" lang="txtMkgSB">XL</label>'
+' </div>'
+' <span class="lang" lang="txtColor" style="float:left;margin-right: 10px;">Color</span>'
+' <div id="makerColorPreview"></div>'
......@@ -58,20 +58,20 @@ function ShowMaker(targetId){
// //lockLayout();
// maker_targetDiv.draggable();
// }); maker_targetDiv.show();
maker_targetDiv.draggable({ revert: false});
maker_targetDiv.draggable();
Maker_handleColorPickerEvent();
$('#dlgMaker').center();
}
function touchStart_BtnOk_Maker(e){
e.preventDefault();
maker_targetDiv.draggable("destroy");
Maker_dspOK_click();
}
function touchStart_BtnCancel_Maker(e){
e.preventDefault();
maker_targetDiv.draggable("destroy");
Maker_dspCancel_click();
}
......@@ -285,6 +285,19 @@ function Maker_dspOK_click() {
typeValue = 50;
}
if(ClientData.maker_color() != maker_chooseColor){
imgMarkerTemp = canvas_marker.toDataURL("image/png;")
var img = new Image();
img.onload = function(){
context_draw.drawImage(img,0,0,canvas_draw.width,canvas_draw.height);
}
img.src = imgMarkerTemp;
context_marker.clearRect(0, 0, canvas_marker.width, canvas_marker.height);
ClientData.maker_color();
}
// Set value to local
ClientData.maker_size(typeValue);
ClientData.maker_color(maker_chooseColor);
......@@ -303,6 +316,12 @@ function Maker_dspOK_click() {
isAddingMarking = ClientData.IsAddingMarking();
makerSize = ClientData.maker_size();
makerColor = ClientData.maker_color();
/* unlock dialog overlay */
$("#overlay").hide();
$('#dlgMarking_imgMakerOption').removeClass();
$('#dlgMarking_imgMakerOption').addClass('maker_option_hover');
}
// Event of button cancel
......@@ -317,6 +336,12 @@ function Maker_dspCancel_click() {
enableButtonMarking();
ClientData.IsAddingMarking(true);
isAddingMarking = ClientData.IsAddingMarking();
/* unlock dialog overlay */
$("#overlay").hide();
$('#dlgMarking_imgMakerOption').removeClass();
$('#dlgMarking_imgMakerOption').addClass('maker_option_hover');
}
function Maker_colorWrapperMouseLeaveFunction() {
......
......@@ -36,6 +36,12 @@ Event groups [start]
----------------------------------------------------------------------------
*/
function dlgMarking_dspSave_click() {
imgMarkerTemp = canvas_marker.toDataURL("image/png;")
var img = new Image();
img.onload = function(){
context_draw.drawImage(img,0,0,canvas_draw.width,canvas_draw.height);
/*create new entity marking */
var marking = new MarkingEntity();
marking.contentid = contentID;
......@@ -99,6 +105,13 @@ function dlgMarking_dspSave_click() {
/* init clear drawing canvas */
isClearDrawing = false;
}
img.src = imgMarkerTemp;
context_marker.clearRect(0, 0, canvas_marker.width, canvas_marker.height);
$('#marker_canvas').css('display','none');
}
function dlgMarking_dspCancel_click() {
......@@ -125,12 +138,14 @@ function dlgMarking_dspCancel_click() {
/* visible button fullscreen */
$('#control_screen_2').show();
$('#marker_canvas').css('display','none');
}
function dlgMarking_dspPgClear_click() {
// Close dialog
context_draw.clearRect(0, 0, canvas_draw.width, canvas_draw.height);
context_marker.clearRect(0, 0, canvas_marker.width, canvas_marker.height);
isClearDrawing = true;
......@@ -138,6 +153,22 @@ function dlgMarking_dspPgClear_click() {
var arr = ClientData.MarkingData();
}
/* draw marker canvas to draw canvas */
function canvasMarkerToCanvasDraw(){
imgMarkerTemp = canvas_marker.toDataURL("image/png;")
var img = new Image();
img.onload = function(){
context_draw.drawImage(img,0,0,canvas_draw.width,canvas_draw.height);
}
img.src = imgMarkerTemp;
context_marker.clearRect(0, 0, canvas_marker.width, canvas_marker.height);
$('#marker_canvas').css('display','none');
}
function dlgMarking_imgPen_click() {
// Choose pen
$("#dlgMarking_imgMaker").removeClass();
......@@ -146,15 +177,35 @@ function dlgMarking_imgPen_click() {
ClientData.MarkingType("pen");
markingType = "pen";
canvasMarkerToCanvasDraw();
setDefaultImageForMarking();
}
function dlgMarking_imgPenOption_click() {
/*disable button */
disableButtonMarking();
ClientData.IsAddingMarking(false);
//ClientData.IsAddingMarking(false);
/* display dialog overlay */
$("#overlay").show();
isAddingMarking = ClientData.IsAddingMarking()
// Show option of pen
ShowPen($('#dlgPen'));
/* draw maker canvas */
if(markingType == "maker"){
canvasMarkerToCanvasDraw();
}
ClientData.MarkingType("pen");
markingType = "pen";
$('#dlgMarking_imgPenOption').removeClass();
$('#dlgMarking_imgPenOption').addClass('pen_option_selected');
setDefaultImageForMarking();
}
function dlgMarking_imgMaker_click() {
// Choose maker
......@@ -164,15 +215,29 @@ function dlgMarking_imgMaker_click() {
ClientData.MarkingType("maker");
markingType = "maker";
$('#marker_canvas').css('display','block');
setDefaultImageForMarking();
}
function dlgMarking_imgMakerOption_click() {
/*disable button */
disableButtonMarking();
ClientData.IsAddingMarking(false);
//ClientData.IsAddingMarking(false);
/* display dialog overlay */
$("#overlay").show();
isAddingMarking = ClientData.IsAddingMarking()
// Show option of maker
ShowMaker($('#dlgMaker'));
ClientData.MarkingType("maker");
markingType = "maker";
$('#marker_canvas').css('display','block');
$('#dlgMarking_imgMakerOption').removeClass();
$('#dlgMarking_imgMakerOption').addClass('maker_option_selected');
setDefaultImageForMarking();
}
function dlgMarking_imgEraser_click() {
// Choose eraser
......@@ -182,15 +247,33 @@ function dlgMarking_imgEraser_click() {
ClientData.MarkingType("eraser");
markingType = "eraser";
canvasMarkerToCanvasDraw();
setDefaultImageForMarking();
}
function dlgMarking_imgEraserOption_click() {
/*disable button */
disableButtonMarking();
ClientData.IsAddingMarking(false);
//ClientData.IsAddingMarking(false);
/* display dialog overlay */
$("#overlay").show();
isAddingMarking = ClientData.IsAddingMarking();
// Show option of maker
ShowEraser();
/* draw maker canvas */
if(markingType == "maker"){
canvasMarkerToCanvasDraw();
}
ClientData.MarkingType("eraser");
markingType = "eraser";
$('#dlgMarking_imgEraserOption').removeClass();
$('#dlgMarking_imgEraserOption').addClass('eraser_option_selected');
setDefaultImageForMarking();
}
function dlgMarking_imgMin_click() {
......@@ -223,6 +306,38 @@ Event groups [ end ]
----------------------------------------------------------------------------
*/
function setDefaultImageForMarking(){
/* pen */
if(markingType == "pen"){
$('#dlgMarking_imgPen').removeClass();
$('#dlgMarking_imgPen').addClass('pen_selected');
}else{
$('#dlgMarking_imgPen').removeClass();
$('#dlgMarking_imgPen').addClass('pen_hover');
}
/* maker */
if(markingType == "maker"){
$('#dlgMarking_imgMaker').removeClass();
$('#dlgMarking_imgMaker').addClass('maker_selected');
}else{
$('#dlgMarking_imgMaker').removeClass();
$('#dlgMarking_imgMaker').addClass('maker_hover');
}
/* maker */
if(markingType == "eraser"){
$('#dlgMarking_imgEraser').removeClass();
$('#dlgMarking_imgEraser').addClass('eraser_selected');
}else{
$('#dlgMarking_imgEraser').removeClass();
$('#dlgMarking_imgEraser').addClass('eraser_hover');
}
}
/* disable all button on dialog marking */
function disableButtonMarking(){
$('#dlgMarking_dspSave').unbind('click');
......@@ -312,14 +427,20 @@ function ShowMarking() {
dlgMarking_imgPen_click();
setDefaultImageForMarking();
$('#dlgMarking_imgPenOption').removeClass();
$('#dlgMarking_imgPenOption').addClass('pen_option_hover');
$('#dlgMarking_imgMakerOption').removeClass();
$('#dlgMarking_imgMakerOption').addClass('maker_option_hover');
$('#dlgMarking_imgEraserOption').removeClass();
$('#dlgMarking_imgEraserOption').addClass('eraser_option_hover');
}
// Setting dialog
$(function () {
// ---------------------------------
// Setup for marking [start]
// ---------------------------------
$("#dlgMarking_dspSave").click(dlgMarking_dspSave_click);
$("#dlgMarking_dspCancel").click(dlgMarking_dspCancel_click);
......@@ -348,9 +469,7 @@ $(function () {
$('#dlgMarking').draggable({
revert: false
});
// ---------------------------------
// Setup for marking [ end ]
// ---------------------------------
});
/// ===============================================================================================
......
......@@ -68,7 +68,7 @@ function MemoDelFunction(){
isCopyMemo = false;
}
else{
resultArr = ClientData.MemoData();
var resultArr = ClientData.MemoData();
resultArr.splice(EditIndex, 1);
ClientData.MemoData(resultArr);
......
......@@ -30,10 +30,10 @@ function ShowPen(targetId) {
'<div id="panel-pen" class="rayermenu1">'
+' <div id="panel-pen-size">'
+' <span lang="txtMkgSize" class="lang" >太いさ</span>'
+' <input type="radio" id="pen-size-small" name="pen-size" /><span id="pen-small-text" class="lang" lang="txtMkgS">S</span>'
+' <input type="radio" id="pen-size-medium" name="pen-size" /><span id="pen-medium-text" class="lang" lang="txtMkgM">M</span>'
+' <input type="radio" id="pen-size-large" name="pen-size" /><span id="pen-large-text" class="lang" lang="txtMkgB">L</span>'
+' <input type="radio" id="pen-size-oversize" name="pen-size" /><span id="pen-oversize-text" class="lang" lang="txtMkgSB">XL</span>'
+ ' <input type="radio" id="pen-size-small" name="pen-size" /><label for="pen-size-small" id="pen-small-text" class="lang" lang="txtMkgS">S</label>'
+ ' <input type="radio" id="pen-size-medium" name="pen-size" /><label for="pen-size-medium" id="pen-medium-text" class="lang" lang="txtMkgM">M</label>'
+ ' <input type="radio" id="pen-size-large" name="pen-size" /><label for="pen-size-large" id="pen-large-text" class="lang" lang="txtMkgB">L</label>'
+ ' <input type="radio" id="pen-size-oversize" name="pen-size" /><label for="pen-size-oversize" id="pen-oversize-text" class="lang" lang="txtMkgSB">XL</label>'
+' </div>'
+' <span class="lang" lang="txtColor" style="float:left;margin-right: 10px;">Color</span>'
+' <div id="penColorPreview"></div>'
......@@ -64,6 +64,8 @@ function ShowPen(targetId) {
//pen_targetDiv.draggable({ containment: "#Pen_btnOk", scroll: false });
pen_targetDiv.draggable({ revert: false});
Pen_handleColorPickerEvent();
$('#dlgPen').center();
}
function touchStart_BtnOk_Pen(e){
......@@ -321,6 +323,11 @@ function Pen_dspOK_click() {
});*/
pen_targetDiv.hide();
/* unlock dialog overlay */
$("#overlay").hide();
$('#dlgMarking_imgPenOption').removeClass();
$('#dlgMarking_imgPenOption').addClass('pen_option_hover');
}
// Event of button cancel
......@@ -337,6 +344,12 @@ function Pen_dspCancel_click() {
pen_targetDiv.hide();
/* unlock dialog overlay */
$("#overlay").hide();
$('#dlgMarking_imgPenOption').removeClass();
$('#dlgMarking_imgPenOption').addClass('pen_option_hover');
}
function Pen_colorWrapperMouseLeaveFunction() {
......
......@@ -273,6 +273,102 @@ function canvasClickFunction(e) {
ClientData.contentInfo_contentId(outputId);
//Check Display mode to handle action
if (isShowBookShelf != null){
if(!isShowBookShelf){
//Store Content id that user has read
if(ClientData.ReadingContentIds().length > 0){
contentIdArray = ClientData.ReadingContentIds();
for(var nIndex = 0; nIndex < contentIdArray.length; nIndex++){
if(contentIdArray[nIndex].contentid == outputId){
checkflag = true;
break;
}
else{
checkflag = false;
}
}
if(!checkflag){
contentIdArray.push({contentid: outputId, viewdate: '', originviewdate: ''});
}
}
else{
contentIdArray.push({contentid: outputId, viewdate: '', originviewdate: ''});
}
//Renew ReadingContentID
var newArray = [];
ClientData.ReadingContentIds(newArray);
//Set data for readingcontentid
ClientData.ReadingContentIds(contentIdArray);
//Set ResouceVersion for content
setResourceVersionData(outputId);
//Set MetaVersion for content
setMetaVersionData(outputId);
//Close Submenu
$('#dlgSubMenu').hide();
//Delete 'new' icon
drawEditImage(outputId);
//Open content Detail
openContentDetail();
}
else{
//Store Content id that user has read
if(ClientData.ReadingContentIds().length > 0){
contentIdArray = ClientData.ReadingContentIds();
for(var nIndex = 0; nIndex < contentIdArray.length; nIndex++){
if(contentIdArray[nIndex].contentid == outputId){
checkflag = true;
if(contentIdArray[nIndex].viewdate == null || contentIdArray[nIndex].viewdate == 'undefined' || contentIdArray[nIndex].viewdate == ''){
contentIdArray[nIndex].viewdate = outputDate;
contentIdArray[nIndex].originviewdate = date;
}
break;
}
else{
checkflag = false;
}
}
if(!checkflag){
contentIdArray.push({contentid: outputId, viewdate: outputDate, originviewdate: date});
}
}
else{
contentIdArray.push({contentid: outputId, viewdate: outputDate, originviewdate: date});
}
//Renew ReadingContentID
var newArray = [];
ClientData.ReadingContentIds(newArray);
//Set data for readingcontentid
ClientData.ReadingContentIds(contentIdArray);
//Set ResouceVersion for content
setResourceVersionData(outputId);
//Set MetaVersion for content
setMetaVersionData(outputId);
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false);
//Go to Conten view page
avwScreenMove(ScreenIds.ContentView);
}
}else{
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List){
//Store Content id that user has read
......@@ -366,6 +462,8 @@ function canvasClickFunction(e) {
//Go to Conten view page
avwScreenMove(ScreenIds.ContentView);
}
}
}
//function Open SubMenu Dialog
......@@ -382,6 +480,81 @@ function openSubMenuDialogFunction(e){
var array = [e.clientX, e.clientY];
var contentid = $(this).attr('contentid');
if (isShowBookShelf != null){
if(!isShowBookShelf){
// Get image of selected image
var base64String = returnThumbnail(contentid);
ClientData.contentInfo_contentThumbnail(base64String);
ClientData.contentInfo_contentId(contentid);
//Store Content id that user has read
if(ClientData.ReadingContentIds().length > 0){
contentIdArray = ClientData.ReadingContentIds();
for(var nIndex = 0; nIndex < contentIdArray.length; nIndex++){
if(contentIdArray[nIndex].contentid == contentid){
checkflag = true;
break;
}
else{
checkflag = false;
}
}
if(!checkflag){
contentIdArray.push({contentid: contentid, viewdate: '', originviewdate: ''});
}
}
else{
contentIdArray.push({contentid: contentid, viewdate: '', originviewdate: ''});
}
//Renew ReadingContentID
var newArray = [];
ClientData.ReadingContentIds(newArray);
//Set data for readingcontentid
ClientData.ReadingContentIds(contentIdArray);
//Set ResouceVersion for content
setResourceVersionData(contentid);
//Set MetaVersion for content
setMetaVersionData(contentid);
//Close Submenu
$('#dlgSubMenu').hide();
//Delete 'new' icon
drawEditImage(contentid);
openContentDetail();
}
else if(isShowBookShelf){
$('#dialog-read').attr('contentid',contentid);
$('#dialog-detail').attr('contentid',contentid);
//$("#dlgSubMenu").dialog({position: array, width: 130, height: 90});
$("#dlgSubMenu").show();
$("#dlgSubMenu").position({ my: "left bottom",
at: "left-10 top",
of: this,
collision: "fit"
});
}
else{
$('#dialog-read').attr('contentid',contentid);
$('#dialog-detail').attr('contentid',contentid);
//$("#dlgSubMenu").dialog({position: array, width: 130, height: 90});
$("#dlgSubMenu").show();
$("#dlgSubMenu").position({ my: "left bottom",
at: "left-10 top",
of: this,
collision: "fit"
});
}
}
else{
if(ClientData.sortOpt_viewMode() == Consts.ConstDisplayMode_List){
// Get image of selected image
var base64String = returnThumbnail(contentid);
......@@ -454,6 +627,7 @@ function openSubMenuDialogFunction(e){
collision: "fit"
});
}
}
}
//Genre Click Function
......
......@@ -79,7 +79,8 @@ function saveLoginInfo() {
ClientData.userInfo_lastLoginTime(date.jpDateTimeString());
ClientData.requirePasswordChange(requirePasswordChange);
ClientData.userInfo_sid(userinfo_sid);
//ClientData.userInfo_sid(userinfo_sid);
ClientData.userInfo_sid_local(userinfo_sid);
saveServiceUserOption();
}
......@@ -230,9 +231,7 @@ function processLogin() {
$('#main-error-message').css('display', 'none');
if (data.requirePasswordChange == 0) {
//saveLoginInfo();
//window.location = "abvw/" + ScreenIds.Home;
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
}
else if (data.requirePasswordChange == 1) {
......@@ -259,8 +258,7 @@ function processLogin() {
var skpPwdDt = new Date(skipPwdDate);
var numDay = date.subtractByDays(skpPwdDt);
if (numDay <= 30) {
//saveLoginInfo();
//window.location = "abvw/" + ScreenIds.Home;
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
}
else if (numDay > 30) {
......@@ -271,8 +269,7 @@ function processLogin() {
}
}
else { // no need to change password
//saveLoginInfo();
//window.location = "abvw/" + ScreenIds.Home;
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
}
}
......@@ -293,8 +290,7 @@ function processLogin() {
var numDay = date.subtractByDays(skpPwdDt);
if (numDay <= 30) {
//saveLoginInfo();
//window.location = "abvw/" + ScreenIds.Home;
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
}
else if (numDay > 30) {
......@@ -309,8 +305,7 @@ function processLogin() {
$("#txtPwdRemind").css('visibility', 'hidden');
}
else { // No need to change password
//saveLoginInfo();
//window.location = "abvw/" + ScreenIds.Home;
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
}
}
......@@ -348,7 +343,8 @@ function processLogin() {
//Change Password Process
function changePasswordProcess(){
var accountPath = $('#txtAccPath').val();
var sid = ClientData.userInfo_sid();
//var sid = ClientData.userInfo_sid();
var sid = ClientData.userInfo_sid_local();
var loginId = $('#txtAccId').val();
var password = $('#txtCurrentPass').val();
var confirmPass = $('#txtConfirmNew').val();
......@@ -366,8 +362,7 @@ function changePasswordProcess(){
if (result == 'success') {
$('#dialog-error-message').css('display', 'none');
CloseChangePasswordDialog();
//saveLoginInfo();
//window.location = "abvw/" + ScreenIds.Home;
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
}
else {
......@@ -415,7 +410,6 @@ function changeLanguageEn(){
//Login click function
function loginFunction(){
if (checkValidation()) {
//saveLoginInfo();
processLogin();
}
}
......@@ -431,10 +425,9 @@ function changePassFunction(){
function skipPassFunction(){
var date = new Date();
//saveLoginInfo();
ClientData.userInfo_pwdSkipDt(date);
//window.location = "abvw/" + ScreenIds.Home;
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
}
......
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