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'});
......
......@@ -24,7 +24,7 @@ $(function() {
var tabUnitHeight = document.getElementsByClassName("tabUnitList")[listNum].clientHeight + 60;
$(".tabUnit").css("height", tabUnitHeight +"px");
ResizeTab();
return false;
});
......@@ -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);
}
};
......@@ -2194,7 +2194,9 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipNextPage = function () {
}
/* init image had draw */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
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 */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
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 */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
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 */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
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 */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
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 */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* change title of page */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
} /* 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 */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* change title of page */
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
} /* 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 */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
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 */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
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 */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
if($('#rotatebtnR').attr('angle') == '0'){
CONTENTVIEW_INITOBJECT.initDisplayMarking();
}
/* check status */
CONTENTVIEW.checkStatusImageMarking();
......
......@@ -264,104 +264,137 @@ HEADER.searchHeaderButtonFunction = function(){
var searchDivision;
var searchText = $('#searchbox-key').val();
var count = 0;
if(searchText.length > 200){
alert('200字以下のテキストを入力してください');
return;
}
if ($('#txtSearch').val() != '') {
try{
//seperate string
var myRegexp = /[^\s"]+|"([^"]*)"/gi;
var myArray = [];
var myQuery;
var myRegExpArr = [];
var count = 0;
do {
var match = myRegexp.exec($('#searchbox-key').val());
if (match != null)
{
myArray.push(match[1] ? match[1] : match[0]);
}
} while (match != null);
if(myArray[0].charAt(0) == "("){
if(myArray[0] == "("){
myRegExpArr[1] = new RegExp(myArray[1]);
myQuery = '( true';
}else{
myRegExpArr[0] = new RegExp(myArray[0].slice(1));
myQuery = '( true';
count++;
}
}else{
myRegExpArr[0] = new RegExp(myArray[0]);
if ($('#searchbox-key').val() != ' ') {
try{
//seperate string
var myRegexp = /[^\s"]+|"([^"]*)"/gi;
var myArray = [];
var myQuery;
//var myRegExpArr = [];
var textReg = $('#searchbox-key').val().replace(/\(/g," ( ").replace(/\)/g," ) ");
do {
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 = '(';
}else{
//myRegExpArr[0] = new RegExp(myArray[0].slice(1));
myQuery = '(';
}
}else{
//myRegExpArr[0] = new RegExp(myArray[0]);
myQuery = 'true';
count++;
}
for (var i = 1; i < myArray.length; i++){
if(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"){
myQuery += ' || (';
}else{
myQuery += ' && (';
}
}else{
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' || ( true';
count++;
}else{
myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' && ( true';
count++;
}
}
}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));
myQuery += ' || true )';
count++;
}else{
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' && true )';
count++;
}
}
}else{
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' || true';
count++;
}else{
if(myArray[i - 1] == "("){
myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' true';
count++;
}else{
myRegExpArr[i] = new RegExp(myArray[i]);
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" || 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" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myQuery += ' || (';
}else if(myArray[i - 1] != "("){
myQuery += ' && (';
}else{
myQuery += ' (';
}
}else{
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';
}else if(myArray[i - 1] != "("){
//myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' && ( true';
}else{
myQuery += ' ( true';
}
}
}else if(myArray[i].charAt(myArray[i].length - 1) == ")" || myArray[i] == ")"){
if(myArray[i] == ")"){
myQuery += ' )';
}else{
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 )';
}else{
//myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' && true )';
}
}
}else{
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';
}else{
if(myArray[i - 1] == "("){
//myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' true';
}else{
//myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' && true';
}
}
}
}
if(searchText == ")"){
myQuery += ' &&';
}
if (eval(myQuery)) {
//is not correct query
}
//is not correct query
}
}catch(error){
alert('正しくない検索です');
return;
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;
}
}
......@@ -369,7 +402,7 @@ HEADER.searchHeaderButtonFunction = function(){
alert('語句数は最大5つです');
return;
}
if(HEADER.overClick()){
return;
}
......@@ -385,9 +418,10 @@ HEADER.searchHeaderButtonFunction = function(){
if(body == 'checked')
{
searchDivision = $('#searchbox-body').val();
}
}
ClientData.searchCond_searchText(searchText);
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);
......@@ -510,13 +506,13 @@ HOME.ResizeTab = function() {
$(".cnt_section_list .text").css("margin", "0 0 0 0");
$(".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 .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");
$(".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