Commit b26493a6 by Kim Eunchul

Merge branch 'contract/ttss/1.0.0_kim-ec' into 'contract/ttss/1.1.0'

Contract/ttss/1.0.0 kim ec

See merge request abook_web/web-viewer!48
parents a89781e1 a8ca3a66
......@@ -296,6 +296,8 @@ COMMON.Keys = {
contentInfo_contentType : 'contentInfo_contentType',
// Session :検索条件(searchCond)_検索テキスト:String
searchCond_searchText : 'searchText',
// Session :検索条件(searchCond)_検索テキスト:String
searchCond_searchText_dummy : 'searchText_dummy',
// Session :検索条件(searchCond)_検索区分:Interger(1:コンテンツ検索, 2:タグ検索, 3:全文検索)
searchCond_searchDivision : 'searchCond_searchDivision',
// Session :検索条件(searchCond)_ソート基準:Interger(1:タイトル名, 2:タイトル名(かな), 3:公開順)
......@@ -1568,7 +1570,14 @@ var ClientData = {
return SessionStorageUtils.get(COMMON.Keys.searchCond_searchText);
}
},
// Session :検索条件(searchCond)_検索テキスト:String
searchCond_searchText_Dummy : function(data) {
if (arguments.length > 0) {
SessionStorageUtils.set(COMMON.Keys.searchCond_searchText_Dummy, data);
} else {
return SessionStorageUtils.get(COMMON.Keys.searchCond_searchText_Dummy);
}
},
// Session :検索条件(searchCond)_検索区分:Interger(1:コンテンツ検索, 2:タグ検索, 3:全文検索)
searchCond_searchDivision : function(data) {
if (arguments.length > 0) {
......
......@@ -15,7 +15,8 @@ $(function() {
$('.memoAdd').powerTip({placement: 's'});
$('.marking').powerTip({placement: 's'});
$('.markingToolbar').powerTip({placement: 's'});
$('.rotate').powerTip({placement: 's'});
$('.rotateR').powerTip({placement: 's'});
$('.rotateL').powerTip({placement: 's'});
$('.begin').powerTip({placement: 'n'});
$('.prev').powerTip({placement: 'n'});
......
......@@ -45,7 +45,7 @@ function ResizeTab() {
var width = 930 - tabUnitBody;
var margin = tabUnitBody - 280;
articleBody[0].setAttribute("style","width:" + width + "px");
articleBody[0].style.cssText = 'width: '+ width + 'px;';
$(".cnt_section_list .text .info .pic li .iconList").css("margin-right", margin);
$(".sankaku_left").css("margin-left", 54 + margin*0.5);
$(".sankaku_right").css("margin-left", 179 + margin*0.5);
......@@ -62,6 +62,7 @@ function ResizeTab() {
$(".cnt_section_list .text .info .pic li .iconList").css("margin-right", 0);
$(".cnt_section_list .text .info .pic li .iconList").css("right", 0);
$(".cnt_section_list .text .info .pic li .iconList").css("position", "relative");
$(".cnt_section_list .text ul.pic li").css("height", 21);
}else{
$(".cnt_section_list .text").css("width", "300px");
$(".cnt_section_list .text").css("margin", "0 0 0 25px");
......
......@@ -83,6 +83,7 @@
"txtTextCopy":"Copy Body Text",
"txtNoTextCopy":"No Text",
"txtNoSearchResult":"No Result",
"txtErrorSearchResult":"No Result",
"msgShioriNotExists":"no Bookmark",
"msgPwdChangeOK":"Success.",
"msgPwdChangeNG":"Failed.<br/>Password requires at least both of character and numeric.",
......@@ -93,6 +94,8 @@
"txtTooltipAddMemo":"Add memo",
"txtTooltipShowMarking":"Show/Hide Marking",
"txtTooltipShowMarkingTool":"Show/Hide Marking Panel",
"txtTooltipRotateContentR":"content right rotation",
"txtTooltipRotateContentL":"content left rotation",
"msgShioriDeleted":"Page was deleted.",
"dspViewHistory":"History",
"msgLoginEmpty":"Please fill empty field.",
......
......@@ -83,6 +83,7 @@
"txtTextCopy":"テキストコピー",
"txtNoTextCopy":"テキストがありません。",
"txtNoSearchResult":"検索結果がありません。",
"txtErrorSearchResult":"検索構文に誤りがあります。",
"msgShioriNotExists":"しおりがありません",
"msgPwdChangeOK":"パスワードを変更しました。",
"msgPwdChangeNG":"パスワード変更に失敗しました。再入力してください。※注意:新規パスワードには英字および数字両方を含める必要があります。",
......@@ -90,6 +91,8 @@
"txtTooltipBack":"戻る",
"txtTooltipBookmark":"しおり追加・削除",
"txtTooltipShowMemo":"メモ表示・非表示",
"txtTooltipRotateContentR":"コンテンツ右回転",
"txtTooltipRotateContentL":"コンテンツ左回転",
"txtTooltipAddMemo":"メモ追加",
"txtTooltipShowMarking":"マーキング表示・非表示",
"txtTooltipShowMarkingTool":"マーキングツールバーを表示・非表示",
......
......@@ -132,8 +132,8 @@
<a id="imgmarkingtoolbar" class="markingToolbar" title="マーキングツールバー表示" lang="txtTooltipShowMarkingTool"> </a>
</span>
<span class="gloupe">
<a id="rotatebtnL" class="rotateL" title="コンテンツ逆回転" lang="txtTooltipRotateContent"> </a>
<a id="rotatebtnR" class="rotateR" title="コンテンツ回転" lang="txtTooltipRotateContent" angle = '0'> </a>
<a id="rotatebtnL" class="rotateL" title="コンテンツ左回転" lang="txtTooltipRotateContentL"> </a>
<a id="rotatebtnR" class="rotateR" title="コンテンツ右回転" lang="txtTooltipRotateContentR" angle = '0'> </a>
</span>
</div>
<div class="hdRcolumn">
......
......@@ -3207,4 +3207,5 @@ span.no-item{
position: absolute;
top: 65px;
left: -1000px;
opacity: 0;
}
\ No newline at end of file
......@@ -121,7 +121,7 @@
<div id="ws-body" class="wrapper_ws" >
<div id="inc_backup"></div>
<div id="main-ws" class="hoge">
<div class="tabUnit" style="display:none;" onresize="ResizeTab()">
<div class="tabUnit" style="display:none;">
<ul class="switchingTab">
<li class="colleft" ><a href="#list_0" class="current" id="lnkbtnGenre"> </a></li>
<li class="colright" style="display:none;"><a href="#list_1" id="lnkbtnGroup"> </a></li>
......
......@@ -51,8 +51,8 @@
<a id="imgmarkingtoolbar" class="markingToolbar" title="マーキングツールバー表示" lang="txtTooltipShowMarkingTool"> </a>
</span>
<span class="gloupe">
<a id="rotatebtnL" class="rotateL" title="コンテンツ逆回転" lang="txtTooltipRotateContent"> </a>
<a id="rotatebtnR" class="rotateR" title="コンテンツ回転" lang="txtTooltipRotateContent" angle = '0'> </a>
<a id="rotatebtnL" class="rotateL" title="コンテンツ左回転" lang="txtTooltipRotateContentL"> </a>
<a id="rotatebtnR" class="rotateR" title="コンテンツ右回転" lang="txtTooltipRotateContentR" angle = '0'> </a>
</span>
</div>
<div id="search_toolbar" class="hdRcolumn">
......
......@@ -186,7 +186,7 @@ CONTENTSEARCH.abapi = function(name, param, method, callback) {
// Initial screen
CONTENTSEARCH.initialScreen = function() {
var searchText = ClientData.searchCond_searchText();
var searchText = ClientData.searchCond_searchText_Dummy();
var searchDivision = ClientData.searchCond_searchDivision();
$('#txtSearchWs').val(searchText);
......@@ -347,7 +347,7 @@ CONTENTSEARCH.renderContent = function(id, text, division, type, order, offset,
}
// Toggle scroll to top Control
CONTENTSEARCH.handleBackToTop();
CONTENTSEARCH.handleBackToTop(params.searchText);
// I18N.changeLanguage(ClientData.userInfo_language());
I18N.i18nReplaceText();
......@@ -355,7 +355,7 @@ CONTENTSEARCH.renderContent = function(id, text, division, type, order, offset,
};
// Handle Back To Top Button
CONTENTSEARCH.handleBackToTop = function() {
CONTENTSEARCH.handleBackToTop = function(searchText) {
if (ClientData.searchCond_recordTo() >= CONTENTSEARCH.totalPage) {
$('#control-nextrecord').css('visibility', 'hidden');
} else {
......@@ -364,7 +364,7 @@ CONTENTSEARCH.handleBackToTop = function() {
if (CONTENTSEARCH.totalPage == 0) {
$('#control-nextrecord').css('visibility', 'hidden');
CONTENTSEARCH.displayResultNoRecord();
CONTENTSEARCH.displayResultNoRecord(searchText);
CONTENTSEARCH.noRecordFlg = true;
} else {
$('#msgSearchNotExist').hide();
......@@ -1033,6 +1033,7 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
var content = $('#main-content').attr('checked');
var tag = $('#main-tag').attr('checked');
var body = $('#main-body').attr('checked');
var count = 0;
var offset = 0;
var limit = CONTENTSEARCH.returnNumberDispRecordForList();
......@@ -1041,102 +1042,111 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
alert('200字以下のテキストを入力してください');
return;
}
if ($('#txtSearch').val() != '') {
if ($('#txtSearchWs').val() != ' ') {
try{
//seperate string
var myRegexp = /[^\s"]+|"([^"]*)"/gi;
var myArray = [];
var myQuery;
var myRegExpArr = [];
var count = 0;
//var myRegExpArr = [];
var textReg = $('#txtSearchWs').val().replace(/\(/g," ( ").replace(/\)/g," ) ");
do {
var match = myRegexp.exec($('#txtSearchWs').val());
var match = myRegexp.exec(textReg);
if (match != null)
{
myArray.push(match[1] ? match[1] : match[0]);
}
} while (match != null);
for(var i = 0; i < myArray.length; i++){
if(myArray[i] != "OR" && myArray[i] != "or" && myArray[i] != "Or" && myArray[i] != "oR" && myArray[i] != "(" && myArray[i] != ")"){
count++;
}
}
if(count > 5){
alert('語句数は最大5つです');
return;
}
if(myArray[0].charAt(0) == "("){
if(myArray[0] == "("){
myRegExpArr[1] = new RegExp(myArray[1]);
myQuery = '( true';
//myRegExpArr[1] = new RegExp(myArray[1]);
myQuery = '(';
}else{
myRegExpArr[0] = new RegExp(myArray[0].slice(1));
myQuery = '( true';
count++;
//myRegExpArr[0] = new RegExp(myArray[0].slice(1));
myQuery = '(';
}
}else{
myRegExpArr[0] = new RegExp(myArray[0]);
//myRegExpArr[0] = new RegExp(myArray[0]);
myQuery = 'true';
count++;
if(myArray[0] == "OR" || myArray[0] == "or" || myArray[0] == "Or" || myArray[0] == "oR"){
myQuery = ' || ';
}
}
for (var i = 1; i < myArray.length; i++){
if(myArray[i] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
if(myArray[i] == "OR" || myArray[i] == "or" || myArray[i] == "Or" || myArray[i] == "oR"){
//myRegExpArr[i] = new RegExp(myArray[i]);
}else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){
if(myArray[i] == "("){
if(myArray[i - 1] == "OR"){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myQuery += ' || (';
}else{
}else if(myArray[i - 1] != "("){
myQuery += ' && (';
}else{
myQuery += ' (';
}
}else{
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(1));
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
//myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' || ( true';
count++;
}else{
myRegExpArr[i] = new RegExp(myArray[i].slice(1));
}else if(myArray[i - 1] != "("){
//myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' && ( true';
count++;
}else{
myQuery += ' ( true';
}
}
}else if(myArray[i].charAt(myArray[i].length - 1) == ")" || myArray[i] == ")"){
if(myArray[i] == ")"){
myQuery += ' )';
}else{
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
//myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' || true )';
count++;
}else{
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
//myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' && true )';
count++;
}
}
}else{
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
//myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' || true';
count++;
}else{
if(myArray[i - 1] == "("){
myRegExpArr[i] = new RegExp(myArray[i]);
//myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' true';
count++;
}else{
myRegExpArr[i] = new RegExp(myArray[i]);
//myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' && true';
count++;
}
}
}
}
if(searchText == ")"){
myQuery += ' &&';
}
if (eval(myQuery)) {
//is not correct query
}
}catch(error){
alert('正しくない検索です');
return;
searchText = "invaildsearchtextzeroresultfound";
}
}
if(count > 5){
alert('語句数は最大5つです');
return;
......@@ -1155,7 +1165,6 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
if (body == 'checked') {
searchDivision = $('#searchbox-body').val();
}
var genreId = ClientData.searchCond_genreId();
var groupId = ClientData.searchCond_groupId();
var sid = ClientData.userInfo_sid();
......@@ -1323,11 +1332,16 @@ CONTENTSEARCH.formatDisplayMoreRecord = function() {
};
CONTENTSEARCH.displayResultNoRecord = function() {
CONTENTSEARCH.displayResultNoRecord = function(searchText) {
I18N.i18nReplaceText();
// $('#content-grid').html(I18N.i18nText('msgSearchNotExist'));
// $('#content-grid').css({ 'text-align': 'left', 'margin-top': '20px',
// 'clear': 'both' });
if(searchText == "invaildsearchtextzeroresultfound"){
$('#msgSearchNotExist').attr("lang", "txtErrorSearchResult");
}else{
$('#msgSearchNotExist').attr("lang", "msgSearchNotExist");
}
$('#content-grid').html('');
$('#msgSearchNotExist').show();
$('#msgSearchNotExist').css({
......@@ -1481,4 +1495,4 @@ CONTENTSEARCH.downloadPdfFunction = function(e){
// Download content
HEADER.downloadResourceById(contentId);
}
};
......@@ -727,7 +727,7 @@ CONTENTVIEW.eventEnd_CopyText = function(e) {
/* search content */
CONTENTVIEW.searchHandle = function() {
var w = $("#main").width() - $(".hdRcolumn").width();
var searchText;
var pos = [w, CONTENTVIEW.marginY];
if($('#txtSearch').val().length > 200){
......@@ -735,7 +735,7 @@ CONTENTVIEW.searchHandle = function() {
return;
}
if ($('#txtSearch').val() != '') {
if ($('#txtSearch').val() != '' && $('#txtSearch').val() != '\"\"') {
var dataStored = CONTENTVIEW_GENERAL.arrThumbnailsLoaded;
var contentPage = CONTENTVIEW_GENERAL.dataWebContentPage.pages;
var sPageNo = [];
......@@ -747,10 +747,11 @@ CONTENTVIEW.searchHandle = function() {
var myQuery;
var myRegExpArr = [];
var count = 0;
var textReg = $('#txtSearch').val().replace(/[.*+?^${}|[\]\\]/g, "\\$&").replace("%", "\\%").replace(' ', '" "').replace("("," ( ").replace(")"," ) ");;
try{
do {
var match = myRegexp.exec($('#txtSearch').val());
var match = myRegexp.exec(textReg);
if (match != null)
{
myArray.push(match[1] ? match[1] : match[0]);
......@@ -773,17 +774,17 @@ CONTENTVIEW.searchHandle = function() {
}
for (var i = 1; i < myArray.length; i++){
if(myArray[i] == "OR"){
if(myArray[i] == "OR" || myArray[i] == "or" || myArray[i] == "Or" || myArray[i] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i]);
}else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){
if(myArray[i] == "("){
if(myArray[i - 1] == "OR"){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myQuery += ' || (';
}else{
myQuery += ' && (';
}
}else{
if(myArray[i - 1] == "OR"){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' || ( myRegExpArr[' + i + '].test(contentPage[nIndex].pageText)';
count++;
......@@ -797,7 +798,7 @@ CONTENTVIEW.searchHandle = function() {
if(myArray[i] == ")"){
myQuery += ' )';
}else{
if(myArray[i - 1] == "OR"){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' || myRegExpArr[' + i + '].test(contentPage[nIndex].pageText) )';
count++;
......@@ -808,7 +809,7 @@ CONTENTVIEW.searchHandle = function() {
}
}
}else{
if(myArray[i - 1] == "OR"){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' || myRegExpArr[' + i + '].test(contentPage[nIndex].pageText)';
count++;
......@@ -826,6 +827,10 @@ CONTENTVIEW.searchHandle = function() {
}
}
if($('#txtSearch').val() == "or" || $('#txtSearch').val() == "Or" || $('#txtSearch').val() == "oR" || $('#txtSearch').val() == "OR"){
myQuery = ' ||';
}
for (var nIndex = 0; nIndex < contentPage.length; nIndex++) {
if (eval(myQuery)) {
//searchResult.push(contentPage[nIndex]);
......@@ -834,8 +839,7 @@ CONTENTVIEW.searchHandle = function() {
}
}catch(error){
alert('正しくない検索です');
return;
searchText = "invaildsearchtextzeroresultfound";
}
if(count > 5){
......@@ -930,7 +934,11 @@ CONTENTVIEW.searchHandle = function() {
}
} else {
$('#divSearchResult').children().remove();
if(searchText == "invaildsearchtextzeroresultfound"){
$('#divSearchResult').append('<span class="last">' + I18N.i18nText('txtErrorSearchResult') + '</span>');
}else{
$('#divSearchResult').append('<span class="last">' + I18N.i18nText('txtNoSearchResult') + '</span>');
}
//title start
$('#bookmarkBoxHdSearching').children().remove();
......@@ -951,7 +959,7 @@ CONTENTVIEW.searchHandle = function() {
};
CONTENTVIEW.playBGMOfPage = function(page_index_bg) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() && $('#rotatebtnR').attr('angle') == '0') {
if ($('#playaudiopage').children().length > 0) {
$('#playaudiopage').children().remove();
}
......@@ -985,7 +993,7 @@ CONTENTVIEW.playBGMOfPage = function(page_index_bg) {
};
CONTENTVIEW.playBGMOfContent = function() {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() && CONTENTVIEW_GENERAL.isJumpNotFromFirstPage == true) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() && CONTENTVIEW_GENERAL.isJumpNotFromFirstPage == true && $('#rotatebtnR').attr('angle') == '0') {
CONTENTVIEW_GENERAL.isJumpNotFromFirstPage = false;
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, 0);
for (var nIndex = 0; nIndex < CONTENTVIEW_GENERAL.pageObjects.length; nIndex++) {
......@@ -5342,7 +5350,7 @@ CONTENTVIEW.playAllAudio = function() {
} else if (CONTENTVIEW.TypeAudio1 != '') {
CONTENTVIEW_CREATEOBJECT.createAudio(CONTENTVIEW.srcAudioType1, CONTENTVIEW.TypeAudio1);
}
} else {
} else if ($('#rotatebtnR').attr('angle') == '0'){
if (document.getElementById("play_audio_0") != undefined) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) {
//document.getElementById("play_audio_0").load();
......@@ -5811,6 +5819,30 @@ CONTENTVIEW.rotateR = function() {
//CONTENTVIEW.srcRect.width = 0;
if($('#rotatebtnR').attr('angle') != '0'){
if(document.getElementById('videoOnPage')){
var videoObj = document.getElementById('videoOnPage');
if(videoObj.parentNode)
videoObj.parentNode.removeChild(videoObj);
}
if(document.getElementById("play_audio_0")){
document.getElementById("play_audio_0").pause();
}
if(document.getElementById("play_audio_1")){
document.getElementById("play_audio_1").pause();
}
if(document.getElementById("play_audio_2")){
document.getElementById("play_audio_2").pause();
}
}else{
if(document.getElementById("play_audio_2")){
document.getElementById("play_audio_2").play();
}else if(document.getElementById("play_audio_1")){
document.getElementById("play_audio_1").play();
}
}
CONTENTVIEW.changePageWithoutSlide($("#txtSlider").val() - 1);
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
......@@ -5835,6 +5867,30 @@ CONTENTVIEW.rotateL = function() {
//CONTENTVIEW.srcRect.width = 0;
if($('#rotatebtnR').attr('angle') != '0'){
if(document.getElementById('videoOnPage')){
var videoObj = document.getElementById('videoOnPage');
if(videoObj.parentNode)
videoObj.parentNode.removeChild(videoObj);
}
if(document.getElementById("play_audio_0")){
document.getElementById("play_audio_0").pause();
}
if(document.getElementById("play_audio_1")){
document.getElementById("play_audio_1").pause();
}
if(document.getElementById("play_audio_2")){
document.getElementById("play_audio_2").pause();
}
}else{
if(document.getElementById("play_audio_2")){
document.getElementById("play_audio_2").play();
}else if(document.getElementById("play_audio_1")){
document.getElementById("play_audio_1").play();
}
}
CONTENTVIEW.changePageWithoutSlide($("#txtSlider").val() - 1);
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
......@@ -5847,49 +5903,7 @@ CONTENTVIEW.rotateL = function() {
CONTENTVIEW.checkDisableButtonRotate = function() {
if($('#rotatebtnR').attr('angle') == '0'){
if (ClientData.IsDisplayMemo() == true) {
$('#imgmemo').removeClass();
$('#imgmemo').addClass('memoDisplay_hover');
$('#imgmemo').bind('click', CONTENTVIEW.handleMemo);
} else {
$('#imgmemo').removeClass();
$('#imgmemo').addClass('memoDisplay_device');
$('#imgmemo').bind('click', CONTENTVIEW.handleMemo);
}
if (ClientData.IsAddingMemo() == true) {
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd_hover');
$('#imgaddmemo').bind('click', CONTENTVIEW_EVENTS.handleAddMemo);
} else {
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd_device');
$('#imgaddmemo').bind('click', CONTENTVIEW_EVENTS.handleAddMemo);
}
if (ClientData.IsDisplayMarking() == true) {
$('#imgmarking').removeClass();
$('#imgmarking').addClass('marking_hover');
$('#imgmarking').bind('click', CONTENTVIEW_EVENTS.imgmarking_click);
} else {
$('#imgmarking').removeClass();
$('#imgmarking').addClass('marking_device');
$('#imgmarking').bind('click', CONTENTVIEW_EVENTS.imgmarking_click);
}
if (ClientData.serviceOpt_marking() == 'Y') {
if (ClientData.IsAddingMarking() == true) {
$('#imgmarkingtoolbar').removeClass();
$('#imgmarkingtoolbar').addClass('markingToolbar_hover');
$('#imgmarkingtoolbar').bind('click', CONTENTVIEW.handleDrawCanvas);
} else {
$('#imgmarkingtoolbar').removeClass();
$('#imgmarkingtoolbar').addClass('markingToolbar_device');
$('#imgmarkingtoolbar').bind('click', CONTENTVIEW.handleDrawCanvas);
}
}
}else{
/* imgage display memo */
if($('#rotatebtnR').attr('angle') != '0'){
$('#imgmemo').unbind('click');
$('#imgmemo').removeClass();
$('#imgmemo').addClass('memoDisplay_off');
......@@ -5998,11 +6012,11 @@ CONTENTVIEW.changeScale = function(scale) {
}
if (height < canvas.width) {
aspect = offscreen.height / offscreen.width
aspect = offscreen.height / offscreen.width;
if(offScreen.width < offScreen.height){
height = height * scale * aspect;
}else{
height = height * scale
height = height * scale;
}
//height = height * scale;
if (height > canvas.width) {
......
......@@ -2194,7 +2194,9 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipNextPage = function () {
}
/* init image had draw */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
}
/* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex]) {
......@@ -2268,8 +2270,9 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipNextPage = function () {
}
/* init image had draw */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
}
/* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex] != '') {
......@@ -2357,8 +2360,9 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
}
/* init image had draw */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
}
/* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex] != '') {
......@@ -2429,8 +2433,9 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
}
/* init image had draw */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
}
/* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex] != '') {
......@@ -2463,7 +2468,9 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
if (index == CONTENTVIEW_GETDATA.getContent().pageIndex) {
/* init image had draw */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
}
} else if (index < CONTENTVIEW_GETDATA.getContent().pageIndex) {
CONTENTVIEW_GENERAL.context_main.clearRect(0, 0, CONTENTVIEW_GENERAL.canvas_main.width, CONTENTVIEW_GENERAL.canvas_main.height);
CONTENTVIEW.removeObject();
......@@ -2515,8 +2522,9 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
CONTENTVIEW.checkExistNextPrePage();
CONTENTVIEW.changeSlider(index);
/* init image had draw */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* change title of page */
} /* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[index]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[index] != '') {
document.title = CONTENTVIEW_GENERAL.contentName + '_' + CONTENTVIEW_GENERAL.dataPageTitle[index] + ' | ' + I18N.i18nText('sysAppTitle');
......@@ -2594,8 +2602,9 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
CONTENTVIEW.checkExistNextPrePage();
CONTENTVIEW.changeSlider(index);
/* init image had draw */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* change title of page */
} /* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[index]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[index] != '') {
document.title = CONTENTVIEW_GENERAL.contentName + '_' + CONTENTVIEW_GENERAL.dataPageTitle[index] + ' | ' + I18N.i18nText('sysAppTitle');
......@@ -2706,7 +2715,7 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
// audio = audio.replace("webResourceDownload/", "webResourceDownload");
// }
if (audio != '') {
if (audio != '' && $('#rotatebtnR').attr('angle') == '0') {
if (type == "0") { /* play when click */
CONTENTVIEW.stopAllAudio();
......@@ -2839,7 +2848,7 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
CONTENTVIEW.TypeAudio1 = type;
CONTENTVIEW.srcAudioType1 = audio;
if (ClientData.userOpt_musicMode() == "1") {
if (ClientData.userOpt_musicMode() == "1" && $('#rotatebtnR').attr('angle') == '0') {
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.browser == 'firefox') {
// $('#playaudioallpage').html(
// ' <embed id="play_audio_1" src="' + audio + '&key=' + (new Date()).toIdString() + '" autostart="true" loop="true" hidden="true"> </embed>'
......
......@@ -1055,7 +1055,7 @@ CONTENTVIEW_GETDATA.getBookmarklist = function(pos) {
$("#divListBookmark").offset({ left: pos[0], top: (pos[1] + $('#bookmarkBoxHdBM').height()) });
}
else {
CONTENTVIEW.handleAPIWebContentPage(CONTENTVIEW_GENERAL.dataWebContentPage, pos)
CONTENTVIEW.handleAPIWebContentPage(CONTENTVIEW_GENERAL.dataWebContentPage, pos);
}
};
......@@ -1280,8 +1280,9 @@ CONTENTVIEW_GETDATA.getContentInfoTypeImage = function(){
CONTENTVIEW_INITOBJECT.initImageBookmark();
/* init image had draw */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
}
/* check status */
CONTENTVIEW.checkStatusImageMarking();
......
......@@ -391,8 +391,9 @@ CONTENTVIEW_INITOBJECT.ajaxComplete8 = function(){
CONTENTVIEW_INITOBJECT.initImageAddMemo();
/* init image had draw */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
}
/* check status */
CONTENTVIEW.checkStatusImageMarking();
......@@ -517,8 +518,9 @@ CONTENTVIEW_INITOBJECT.ajaxComplete4 = function(){
CONTENTVIEW_INITOBJECT.initImageAddMemo();
/* init image had draw */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
}
/* check status */
CONTENTVIEW.checkStatusImageMarking();
......
......@@ -264,103 +264,136 @@ HEADER.searchHeaderButtonFunction = function(){
var searchDivision;
var searchText = $('#searchbox-key').val();
var count = 0;
if(searchText.length > 200){
alert('200字以下のテキストを入力してください');
return;
}
if ($('#txtSearch').val() != '') {
if ($('#searchbox-key').val() != ' ') {
try{
//seperate string
var myRegexp = /[^\s"]+|"([^"]*)"/gi;
var myArray = [];
var myQuery;
var myRegExpArr = [];
var count = 0;
//var myRegExpArr = [];
var textReg = $('#searchbox-key').val().replace(/\(/g," ( ").replace(/\)/g," ) ");
do {
var match = myRegexp.exec($('#searchbox-key').val());
var match = myRegexp.exec(textReg);
if (match != null)
{
myArray.push(match[1] ? match[1] : match[0]);
}
} while (match != null);
for(var i = 0; i < myArray.length; i++){
if(myArray[i] != "OR" && myArray[i] != "or" && myArray[i] != "Or" && myArray[i] != "oR" && myArray[i] != "(" && myArray[i] != ")"){
count++;
}
}
if(count > 5){
alert('語句数は最大5つです');
return;
}
if(myArray[0].charAt(0) == "("){
if(myArray[0] == "("){
myRegExpArr[1] = new RegExp(myArray[1]);
myQuery = '( true';
//myRegExpArr[1] = new RegExp(myArray[1]);
myQuery = '(';
}else{
myRegExpArr[0] = new RegExp(myArray[0].slice(1));
myQuery = '( true';
count++;
//myRegExpArr[0] = new RegExp(myArray[0].slice(1));
myQuery = '(';
}
}else{
myRegExpArr[0] = new RegExp(myArray[0]);
//myRegExpArr[0] = new RegExp(myArray[0]);
myQuery = 'true';
count++;
if(myArray[0] == "OR" || myArray[0] == "or" || myArray[0] == "Or" || myArray[0] == "oR"){
myQuery = ' || ';
}
}
for (var i = 1; i < myArray.length; i++){
if(myArray[i] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
if(myArray[i] == "OR" || myArray[i] == "or" || myArray[i] == "Or" || myArray[i] == "oR"){
//myRegExpArr[i] = new RegExp(myArray[i]);
}else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){
if(myArray[i] == "("){
if(myArray[i - 1] == "OR"){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myQuery += ' || (';
}else{
}else if(myArray[i - 1] != "("){
myQuery += ' && (';
}else{
myQuery += ' (';
}
}else{
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(1));
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
//myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' || ( true';
count++;
}else{
myRegExpArr[i] = new RegExp(myArray[i].slice(1));
}else if(myArray[i - 1] != "("){
//myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' && ( true';
count++;
}else{
myQuery += ' ( true';
}
}
}else if(myArray[i].charAt(myArray[i].length - 1) == ")" || myArray[i] == ")"){
if(myArray[i] == ")"){
myQuery += ' )';
}else{
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
//myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' || true )';
count++;
}else{
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
//myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' && true )';
count++;
}
}
}else{
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
//myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' || true';
count++;
}else{
if(myArray[i - 1] == "("){
myRegExpArr[i] = new RegExp(myArray[i]);
//myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' true';
count++;
}else{
myRegExpArr[i] = new RegExp(myArray[i]);
//myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' && true';
count++;
}
}
}
}
if(searchText == ")"){
myQuery += ' &&';
}
if (eval(myQuery)) {
//is not correct query
}
}catch(error){
alert('正しくない検索です');
if(content == 'checked')
{
searchDivision = $('#searchbox-content').val();
}
if(tag == 'checked')
{
searchDivision = $('#searchbox-tag').val();
}
if(body == 'checked')
{
searchDivision = $('#searchbox-body').val();
}
if(count > 5){
alert('語句数は最大5つです');
return;
}
ClientData.searchCond_searchText("invaildsearchtextzeroresultfound");
ClientData.searchCond_searchDivision(searchDivision);
ClientData.searchCond_searchText_Dummy(searchText);
//window.location = COMMON.ScreenIds.ContentSearch;
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentSearch);
return;
}
}
......@@ -388,6 +421,7 @@ HEADER.searchHeaderButtonFunction = function(){
}
ClientData.searchCond_searchText(searchText);
ClientData.searchCond_searchText_Dummy(searchText);
ClientData.searchCond_searchDivision(searchDivision);
//window.location = COMMON.ScreenIds.ContentSearch;
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentSearch);
......@@ -780,7 +814,7 @@ HEADER.DoBackup = function(isBackupMarking, isBackupMemo, isBackupBookmark,isLog
$('#divResultMessage .toast-item-loading').hide();
// active close toast button
$('.toast-item-close').click(function () { $().toastmessage('removeToast', $('#divResultMessage'), null) });
$('.toast-item-close').click(function () { $().toastmessage('removeToast', $('#divResultMessage'), null); });
if (isLogout) {
$('.toast-position-middle-center').css('width', '500px');
......@@ -1254,7 +1288,7 @@ HEADER.downloadResourceById = function(contentId){
if (HEADER.isSafariNotOnIpad()) {
window.onbeforeunload = null;
window.open(resourceUrl, "_self"); // open url to download file on safari not for ipad
var toogleTime = setTimeout(function () { COMMON.ToogleLogoutNortice() }, 200);
var toogleTime = setTimeout(function () { COMMON.ToogleLogoutNortice(); }, 200);
}
else {
window.open(resourceUrl); //open url to download file on orther browser
......
......@@ -201,6 +201,7 @@ $(document).ready(function() {
$("#contentDetail").css('top', '0');
}
}
HOME.ResizeTab();
});
} else {
HEADER.checkForceChangePassword();
......@@ -431,10 +432,7 @@ HOME.changeDispBookShelfFunction = function() {
// Get next record will be displayed
HOME.getNextRecordNumForBookShelf();
//resize tab
HOME.ResizeTab();
};
// Change Display List Function
......@@ -482,19 +480,17 @@ HOME.changeDispListFunction = function() {
// Get next record will be displayed
HOME.getNextRecordNumForList();
//resize tab
HOME.ResizeTab();
};
HOME.ResizeTab = function() {
var articleBody = document.getElementsByClassName("articlehome");
var tabUnitBody = document.getElementsByClassName("tabUnit")[0].clientWidth;
var width = 930 - tabUnitBody;
var margin = tabUnitBody - 280;
articleBody[0].setAttribute("style","width:" + width + "px");
articleBody[0].style.cssText = 'width: '+ width + 'px;';
$(".cnt_section_list .text .info .pic li .iconList").css("margin-right", margin);
$(".sankaku_left").css("margin-left", 54 + margin*0.5);
$(".sankaku_right").css("margin-left", 179 + margin*0.5);
......@@ -511,12 +507,12 @@ HOME.ResizeTab = function() {
$(".cnt_section_list .text .info .pic li .iconList").css("margin-right", 0);
$(".cnt_section_list .text .info .pic li .iconList").css("right", 0);
$(".cnt_section_list .text .info .pic li .iconList").css("position", "relative");
$(".cnt_section_list .text ul.pic li").css("height", 21);
}else{
$(".cnt_section_list .text").css("width", "300px");
$(".cnt_section_list .text").css("margin", "0 0 0 25px");
$(".cnt_section_list .text .info .pic li .iconList").css("right", -145);
$(".cnt_section_list .text .info .pic li .iconList").css("position", "absolute");
}
if(193 + document.getElementsByClassName("sort_area")[0].clientWidth > articleBody[0].clientWidth){
......@@ -813,6 +809,7 @@ HOME.genreSelectFunction = function() {
HOME.handleSortDisp();
HOME.renderContent(id, searchText, searchDivision, sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
HOME.ResizeTab();
};
// Group Click Function
......@@ -853,6 +850,7 @@ HOME.groupSelectFunction = function() {
HOME.handleSortDisp();
HOME.renderContent(id, searchText, searchDivision, sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
HOME.ResizeTab();
};
// Get Data from Category Json
......@@ -1015,9 +1013,6 @@ HOME.AddGenre_Callback = function(selectedNode) {
HOME.renderContent(id, searchText, searchDivision, sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
HOME.handleSortDisp();
//resize tab
HOME.ResizeTab();
};
// Get Data from Group Json
......@@ -1178,9 +1173,6 @@ HOME.AddGroup_Callback = function(selectedNode) {
HOME.renderContent(id, searchText, searchDivision, sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
HOME.handleSortDisp();
//resize tab
HOME.ResizeTab();
};
// Re-render page from and total record
......@@ -1453,7 +1445,6 @@ HOME.showNextRecordFunction = function() {
if (offsetPage <= totalrecord) {
HOME.renderContent(sid, searchText, searchDivision, sortType, sortOrder, offsetPage, limitPage, genreId, groupId);
}
//resize tab
HOME.ResizeTab();
};
......@@ -1494,8 +1485,6 @@ HOME.sortByTitleFunction = function() {
HOME.refreshGrid();
HOME.renderContent(sid, ClientData.searchCond_searchText(), ClientData.searchCond_searchDivision(), sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
//resize tab
HOME.ResizeTab();
};
......@@ -1535,8 +1524,6 @@ HOME.sortByTitleKanaFunction = function() {
ClientData.searchCond_sortType(sortType);
HOME.renderContent(sid, ClientData.searchCond_searchText(), ClientData.searchCond_searchDivision(), sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
//resize tab
HOME.ResizeTab();
};
......@@ -1576,8 +1563,6 @@ HOME.sortByReleaseDateFunction = function() {
ClientData.searchCond_sortType(sortType);
HOME.renderContent(sid, ClientData.searchCond_searchText(), ClientData.searchCond_searchDivision(), sortType, sortOrder, recordOffset, recordLimit, genreId, groupId);
//resize tab
HOME.ResizeTab();
};
......
......@@ -88,6 +88,8 @@
"txtTooltipBack":"戻る",
"txtTooltipBookmark":"しおり追加・削除",
"txtTooltipShowMemo":"メモ表示・非表示",
"txtTooltipRotateContentR":"コンテンツ右回転",
"txtTooltipRotateContentL":"コンテンツ左回転",
"txtTooltipAddMemo":"メモ追加",
"txtTooltipShowMarking":"マーキング表示・非表示",
"txtTooltipShowMarkingTool":"マーキングツールバーを表示・非表示",
......
......@@ -123,8 +123,8 @@
<a id="imgmarkingtoolbar" class="markingToolbar" title="マーキングツールバー表示" lang="txtTooltipShowMarkingTool"> </a>
</span>
<span class="gloupe">
<a id="rotatebtnL" class="rotateL" title="コンテンツ逆回転" lang="txtTooltipRotateContent"> </a>
<a id="rotatebtnR" class="rotateR" title="コンテンツ回転" lang="txtTooltipRotateContent" angle = '0'> </a>
<a id="rotatebtnL" class="rotateL" title="コンテンツ左回転" lang="txtTooltipRotateContentL"> </a>
<a id="rotatebtnR" class="rotateR" title="コンテンツ右回転" lang="txtTooltipRotateContentR" angle = '0'> </a>
</span>
</div>
<div class="hdRcolumn">
......
......@@ -89,6 +89,8 @@
"txtTooltipBookmark":"しおり追加・削除",
"txtTooltipShowMemo":"メモ表示・非表示",
"txtTooltipAddMemo":"メモ追加",
"txtTooltipRotateContentR":"コンテンツ右回転",
"txtTooltipRotateContentL":"コンテンツ左回転",
"txtTooltipShowMarking":"マーキング表示・非表示",
"txtTooltipShowMarkingTool":"マーキングツールバーを表示・非表示",
"msgShioriDeleted":"ページが削除しました。",
......
......@@ -82,6 +82,7 @@
"txtTextCopy":"テキストコピー",
"txtNoTextCopy":"テキストがありません。",
"txtNoSearchResult":"検索結果がありません。",
"txtErrorSearchResult":"検索構文に誤りがあります。",
"msgShioriNotExists":"しおりがありません",
"msgPwdChangeOK":"パスワードを変更しました。",
"msgPwdChangeNG":"パスワード変更に失敗しました。再入力してください。※注意:新規パスワードには英字および数字両方を含める必要があります。",
......@@ -90,6 +91,8 @@
"txtTooltipBookmark":"しおり追加・削除",
"txtTooltipShowMemo":"メモ表示・非表示",
"txtTooltipAddMemo":"メモ追加",
"txtTooltipRotateContentR":"コンテンツ右回転",
"txtTooltipRotateContentL":"コンテンツ左回転",
"txtTooltipShowMarking":"マーキング表示・非表示",
"txtTooltipShowMarkingTool":"マーキングツールバーを表示・非表示",
"msgShioriDeleted":"ページが削除されました。",
......
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