Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
e1a072f4
Commit
e1a072f4
authored
May 27, 2013
by
Motohisa Nakano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #8388
parent
4f94beaa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1413 additions
and
1411 deletions
+1413
-1411
abvw/css/contentsearch.css
+1
-1
abvw/css/history.css
+1
-1
abvw/css/list_shiori.css
+0
-1
abvw/js/contentsearch.js
+1411
-1408
No files found.
abvw/css/contentsearch.css
View file @
e1a072f4
...
@@ -164,7 +164,7 @@ section{
...
@@ -164,7 +164,7 @@ section{
width
:
161px
;
width
:
161px
;
height
:
120px
;
height
:
120px
;
float
:
left
;
float
:
left
;
background
:
#fff
;
margin-left
:
5px
;
}
}
.cnt_section
a
.img
canvas
{
margin
:
0
auto
;
height
:
105px
;
width
:
150px
;}
.cnt_section
a
.img
canvas
{
margin
:
0
auto
;
height
:
105px
;
width
:
150px
;}
.cnt_section
.text
{
.cnt_section
.text
{
...
...
abvw/css/history.css
View file @
e1a072f4
...
@@ -127,7 +127,7 @@ section{
...
@@ -127,7 +127,7 @@ section{
width
:
161px
;
width
:
161px
;
height
:
120px
;
height
:
120px
;
float
:
left
;
float
:
left
;
background
:
#fff
;
margin-left
:
5px
;
}
}
.cnt_section
a
.img
canvas
{
margin
:
0
auto
;
height
:
105px
;
width
:
160px
;}
.cnt_section
a
.img
canvas
{
margin
:
0
auto
;
height
:
105px
;
width
:
160px
;}
.cnt_section
.text
{
.cnt_section
.text
{
...
...
abvw/css/list_shiori.css
View file @
e1a072f4
...
@@ -218,7 +218,6 @@ a.delete:hover:not(:target) {
...
@@ -218,7 +218,6 @@ a.delete:hover:not(:target) {
width
:
161px
;
width
:
161px
;
height
:
120px
;
height
:
120px
;
float
:
left
;
float
:
left
;
background
:
#fff
;
}
}
.cnt_section
.check
{
.cnt_section
.check
{
...
...
abvw/js/contentsearch.js
View file @
e1a072f4
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
/// <reference path="../common/js/pageViewer.js" />
/// <reference path="header.js" />
/// <reference path="header.js" />
//Start Declare Variables
//Start Declare Variables
//----Constant-----------//
//----Constant-----------//
var
DEFAULT_DISP_NUMBER_RECORD_FROM
=
1
;
var
DEFAULT_DISP_NUMBER_RECORD_FROM
=
1
;
var
DEFAULT_DISP_NUMBER_RECORD_TO
=
15
;
var
DEFAULT_DISP_NUMBER_RECORD_TO
=
15
;
var
DEFAULT_SORT_TYPE
=
'1'
;
var
DEFAULT_SORT_TYPE
=
'1'
;
var
DEFAULT_SORT_ORDER
=
'1'
;
var
DEFAULT_SORT_ORDER
=
'1'
;
var
DEFAULT_SEARCH_DIVISION
=
0
;
var
DEFAULT_SEARCH_DIVISION
=
0
;
var
DEFAULT_IMG_OPTION_MEMO
=
'img/list/pic_1.png'
;
var
DEFAULT_IMG_OPTION_MEMO
=
'img/list/pic_1.png'
;
var
DEFAULT_IMG_OPTION_MARKING
=
'img/list/pic_2.png'
;
var
DEFAULT_IMG_OPTION_MARKING
=
'img/list/pic_2.png'
;
var
DEFAULT_IMG_CONTENT_EDIT
=
'img/list/updatebook.png'
;
var
DEFAULT_IMG_CONTENT_EDIT
=
'img/list/updatebook.png'
;
var
DEFAULT_IMG_CONTENT_NEW
=
'img/list/newbook.png'
;
var
DEFAULT_IMG_CONTENT_NEW
=
'img/list/newbook.png'
;
var
iNumberOfNextRecord
=
15
;
var
iNumberOfNextRecord
=
15
;
var
arrayTemp
=
[];
var
arrayTemp
=
[];
var
contentIdArray
=
[];
var
contentIdArray
=
[];
var
resourceVersionArr
=
[];
var
resourceVersionArr
=
[];
var
metaVersionArr
=
[];
var
metaVersionArr
=
[];
var
totalPage
;
var
totalPage
;
var
chkSearchTextEmpty
=
false
;
var
chkSearchTextEmpty
=
false
;
var
noRecordFlg
=
false
;
var
noRecordFlg
=
false
;
var
home_isMove
=
false
;
var
home_isMove
=
false
;
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
if
(
!
avwCheckLogin
(
ScreenIds
.
Login
)){
if
(
!
avwCheckLogin
(
ScreenIds
.
Login
)){
return
;
return
;
}
}
LockScreen
();
LockScreen
();
document
.
title
=
i18nText
(
'txtSearchResult'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
document
.
title
=
i18nText
(
'txtSearchResult'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
// Set bookmark screen ClientData.BookmarkScreen(ScreenIds.ContentSearch);
// Set bookmark screen
//Check if Force Change password
ClientData
.
BookmarkScreen
(
ScreenIds
.
ContentSearch
);
if
(
ClientData
.
requirePasswordChange
()
!=
1
){
//Format text display more record
//Check if Force Change password
formatDisplayMoreRecord
();
if
(
ClientData
.
requirePasswordChange
()
!=
1
){
//Format text display more record
//remove hover effect when is touch device
formatDisplayMoreRecord
();
removeHoverCss
();
//remove hover effect when is touch device
//InitScreen
removeHoverCss
();
initialScreen
();
//InitScreen
//Render Grid
initialScreen
();
renderGridView
();
//Render Grid
//Go To Details Page
renderGridView
();
$
(
'canvas'
).
live
(
'click'
,
canvasClickFunction
);
//$('canvas').live('touchstart', canvasClickFunction);
//Go To Details Page
$
(
'canvas'
).
live
(
'touchend'
,
canvasClickFunction
);
$
(
'canvas'
).
live
(
'click'
,
canvasClickFunction
);
$
(
'canvas'
).
live
(
'touchmove'
,
function
()
{
home_isMove
=
true
;
});
//$('canvas').live('touchstart', canvasClickFunction);
$
(
'canvas'
).
live
(
'touchend'
,
canvasClickFunction
);
//Open dialog
$
(
'canvas'
).
live
(
'touchmove'
,
function
()
{
home_isMove
=
true
;
});
$
(
'.dialog'
).
live
(
'click'
,
titleClickFunction
);
//$('.dialog').live('touchstart', titleClickFunction);
//Open dialog
$
(
'.dialog'
).
live
(
'touchend'
,
titleClickFunction
);
$
(
'.dialog'
).
live
(
'click'
,
titleClickFunction
);
$
(
'.dialog'
).
live
(
'touchmove'
,
function
()
{
home_isMove
=
true
;
});
//$('.dialog').live('touchstart', titleClickFunction);
$
(
'.dialog'
).
live
(
'touchend'
,
titleClickFunction
);
//Show Next Record
$
(
'.dialog'
).
live
(
'touchmove'
,
function
()
{
home_isMove
=
true
;
});
$
(
'a#control-nextrecord'
).
click
(
showNextRecordFunction
);
//Show Next Record
//Sort Title
$
(
'a#control-nextrecord'
).
click
(
showNextRecordFunction
);
$
(
'#control-sort-title'
).
click
(
sortByTitleFunction
);
//Sort Title
//Sort by title kana
$
(
'#control-sort-title'
).
click
(
sortByTitleFunction
);
$
(
'#control-sort-titlekana'
).
click
(
sortByTitleKanaFunction
);
//Sort by title kana
//sort by release date
$
(
'#control-sort-titlekana'
).
click
(
sortByTitleKanaFunction
);
$
(
'#control-sort-releasedate'
).
click
(
sortByReleaseDateFunction
);
//sort by release date
//Go To Details Page
$
(
'#control-sort-releasedate'
).
click
(
sortByReleaseDateFunction
);
$
(
'.button-details'
).
live
(
'click'
,
readSubmenuFunction
);
//$('.button-details').live('touchstart', readSubmenuFunction);
//Go To Details Page
$
(
'.button-details'
).
live
(
'touchend'
,
readSubmenuFunction
);
$
(
'.button-details'
).
live
(
'click'
,
readSubmenuFunction
);
$
(
'.button-details'
).
live
(
'touchmove'
,
function
()
{
home_isMove
=
true
;
});
//$('.button-details').live('touchstart', readSubmenuFunction);
$
(
'.button-details'
).
live
(
'touchend'
,
readSubmenuFunction
);
$
(
'#main-search'
).
click
(
searchEventButtonFunction
);
$
(
'.button-details'
).
live
(
'touchmove'
,
function
()
{
home_isMove
=
true
;
});
$
(
'#txtSearch'
).
keydown
(
mainSearchKeyDownFunction
);
$
(
'#main-search'
).
click
(
searchEventButtonFunction
);
$
(
'#main-search-content'
).
click
(
mainSearchContentClickFunction
);
$
(
'#txtSearch'
).
keydown
(
mainSearchKeyDownFunction
);
$
(
'#main-search-tag'
).
click
(
mainSearchTagClickFunction
);
$
(
'#main-search-content'
).
click
(
mainSearchContentClickFunction
);
$
(
'#main-search-body'
).
click
(
mainSearchBodyClickFunction
);
$
(
'#main-search-tag'
).
click
(
mainSearchTagClickFunction
);
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
$
(
'#main-search-body'
).
click
(
mainSearchBodyClickFunction
);
$
(
window
).
resize
(
function
()
{
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
if
(
$
(
"#contentDetail"
).
css
(
"display"
)
!=
"none"
)
{
// Refresh panel of detail to center.
$
(
window
).
resize
(
function
()
{
$
(
"#contentDetail"
).
center
();
if
(
$
(
"#contentDetail"
).
css
(
"display"
)
!=
"none"
)
{
if
(
$
(
"#contentDetail"
).
height
()
>
$
(
window
).
height
()){
// Refresh panel of detail to center.
$
(
"#contentDetail"
).
css
(
'top'
,
'0'
);
$
(
"#contentDetail"
).
center
();
}
if
(
$
(
"#contentDetail"
).
height
()
>
$
(
window
).
height
()){
}
$
(
"#contentDetail"
).
css
(
'top'
,
'0'
);
});
}
}
else
{
}
//Check if Force Change password
});
checkForceChangePassword
();
}
else
{
}
//Check if Force Change password
});
checkForceChangePassword
();
}
});
function
mainSearchBodyClickFunction
(){
$
(
'#main-body'
).
attr
(
'checked'
,
'checked'
);
$
(
'#main-tag'
).
removeAttr
(
'checked'
);
function
mainSearchBodyClickFunction
(){
$
(
'#main-content'
).
removeAttr
(
'checked'
);
$
(
'#main-body'
).
attr
(
'checked'
,
'checked'
);
};
$
(
'#main-tag'
).
removeAttr
(
'checked'
);
$
(
'#main-content'
).
removeAttr
(
'checked'
);
function
mainSearchTagClickFunction
(){
};
$
(
'#main-tag'
).
attr
(
'checked'
,
'checked'
);
$
(
'#main-body'
).
removeAttr
(
'checked'
);
function
mainSearchTagClickFunction
(){
$
(
'#main-content'
).
removeAttr
(
'checked'
);
$
(
'#main-tag'
).
attr
(
'checked'
,
'checked'
);
};
$
(
'#main-body'
).
removeAttr
(
'checked'
);
$
(
'#main-content'
).
removeAttr
(
'checked'
);
function
mainSearchContentClickFunction
(){
};
$
(
'#main-content'
).
attr
(
'checked'
,
'checked'
);
$
(
'#main-tag'
).
removeAttr
(
'checked'
);
function
mainSearchContentClickFunction
(){
$
(
'#main-body'
).
removeAttr
(
'checked'
);
$
(
'#main-content'
).
attr
(
'checked'
,
'checked'
);
};
$
(
'#main-tag'
).
removeAttr
(
'checked'
);
$
(
'#main-body'
).
removeAttr
(
'checked'
);
};
function
mainSearchKeyDownFunction
(
e
){
var
code
=
(
e
.
keyCode
?
e
.
keyCode
:
e
.
which
);
if
(
code
==
13
)
{
//Enter keycode
function
mainSearchKeyDownFunction
(
e
){
$
(
'#main-search'
).
click
();
var
code
=
(
e
.
keyCode
?
e
.
keyCode
:
e
.
which
);
}
if
(
code
==
13
)
{
//Enter keycode
};
$
(
'#main-search'
).
click
();
}
//Call API
};
function
abapi
(
name
,
param
,
method
,
callback
){
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
name
,
method
,
param
,
callback
,
null
);
//Call API
};
function
abapi
(
name
,
param
,
method
,
callback
){
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
name
,
method
,
param
,
callback
,
null
);
//Initial screen
};
function
initialScreen
(){
var
searchText
=
ClientData
.
searchCond_searchText
();
//Initial screen
var
searchDivision
=
ClientData
.
searchCond_searchDivision
();
function
initialScreen
(){
var
searchText
=
ClientData
.
searchCond_searchText
();
$
(
'#txtSearch'
).
val
(
searchText
);
var
searchDivision
=
ClientData
.
searchCond_searchDivision
();
//ClientData.searchCond_searchText('');
$
(
'#txtSearch'
).
val
(
searchText
);
if
(
searchDivision
==
1
){
//ClientData.searchCond_searchText('');
$
(
'#main-tag'
).
attr
(
'checked'
,
false
);
$
(
'#main-body'
).
attr
(
'checked'
,
false
);
if
(
searchDivision
==
1
){
$
(
'#main-content'
).
attr
(
'checked'
,
'checked'
);
$
(
'#main-tag'
).
attr
(
'checked'
,
false
);
}
$
(
'#main-body'
).
attr
(
'checked'
,
false
);
else
if
(
searchDivision
==
2
){
$
(
'#main-content'
).
attr
(
'checked'
,
'checked'
);
$
(
'#main-content'
).
attr
(
'checked'
,
false
);
}
$
(
'#main-body'
).
attr
(
'checked'
,
false
);
else
if
(
searchDivision
==
2
){
$
(
'#main-tag'
).
attr
(
'checked'
,
'checked'
);
$
(
'#main-content'
).
attr
(
'checked'
,
false
);
}
$
(
'#main-body'
).
attr
(
'checked'
,
false
);
else
$
(
'#main-tag'
).
attr
(
'checked'
,
'checked'
);
{
}
$
(
'#main-content'
).
attr
(
'checked'
,
false
);
else
$
(
'#main-tag'
).
attr
(
'checked'
,
false
);
{
$
(
'#main-body'
).
attr
(
'checked'
,
'checked'
);
$
(
'#main-content'
).
attr
(
'checked'
,
false
);
}
$
(
'#main-tag'
).
attr
(
'checked'
,
false
);
$
(
'#main-body'
).
attr
(
'checked'
,
'checked'
);
handleLanguage
();
}
};
handleLanguage
();
///Render Content
};
function
renderContent
(
id
,
text
,
division
,
type
,
order
,
from
,
to
,
cateid
,
grpid
){
var
params
=
{
///Render Content
sid
:
id
,
function
renderContent
(
id
,
text
,
division
,
type
,
order
,
from
,
to
,
cateid
,
grpid
){
searchText
:
text
,
var
params
=
{
searchDivision
:
division
,
sid
:
id
,
sortType
:
type
,
searchText
:
text
,
sortOrder
:
order
,
searchDivision
:
division
,
recordFrom
:
from
,
sortType
:
type
,
recordTo
:
to
,
sortOrder
:
order
,
genreId
:
cateid
,
recordFrom
:
from
,
groupId
:
grpid
recordTo
:
to
,
};
genreId
:
cateid
,
groupId
:
grpid
abapi
(
'webContentList'
,
params
,
'POST'
,
function
(
data
)
{
};
$
.
each
(
data
.
contentList
,
function
(
i
,
post
)
{
abapi
(
'webContentList'
,
params
,
'POST'
,
function
(
data
)
{
var
outputDate
=
formatDeliveryDate
(
post
.
contentDeliveryDate
);
$
.
each
(
data
.
contentList
,
function
(
i
,
post
)
{
$
(
'#content-grid'
).
append
(
var
outputDate
=
formatDeliveryDate
(
post
.
contentDeliveryDate
);
'<section>'
+
' <div class="cnt_section">'
$
(
'#content-grid'
).
append
(
+
' <a class="img">'
'<section>'
+
' <canvas height="105px" width="150px" id="content-thumbnail'
+
post
.
contentId
+
'" contentid="'
+
post
.
contentId
+
'" style="display:none;">'
+
' <div class="cnt_section">'
+
' </canvas>'
+
' <a class="img">'
+
' <img id="loadingIcon'
+
post
.
contentId
+
'" src="./img/data_loading.gif" height="25px" width="25px" style="padding-top: 46px; padding-left: 66px"/>'
+
' <canvas height="105px" width="150px" id="content-thumbnail'
+
post
.
contentId
+
'" contentid="'
+
post
.
contentId
+
'" style="display:none; padding-top:12px;">'
+
' </a>'
+
' </canvas>'
+
' <img id="loadingIcon'
+
post
.
contentId
+
'" src="./img/data_loading.gif" height="25px" width="25px" style="padding-top: 46px; padding-left: 66px"/>'
+
' <div class="text">'
+
' </a>'
+
' <a id="title'
+
post
.
contentId
+
'" class="dialog name" contentid="'
+
post
.
contentId
+
'">'
+
truncate
(
htmlEncode
(
post
.
contentTitle
),
25
)
+
'</a>'
+
' <div class="info">'
+
' <div class="text">'
+
' <ul class="date">'
+
' <a id="title'
+
post
.
contentId
+
'" class="dialog name" contentid="'
+
post
.
contentId
+
'">'
+
truncate
(
htmlEncode
(
post
.
contentTitle
),
25
)
+
'</a>'
+
' <li><span class="lang" lang="txtPubDt"> </span> : '
+
outputDate
+
'</li>'
+
' <div class="info">'
+
' <li><span class="lang" lang="txtViewDt"> </span>:<span id="lblVdate'
+
post
.
contentId
+
'"> </span></li>'
+
' <ul class="date">'
+
' </ul>'
+
' <li><span class="lang" lang="txtPubDt"> </span> : '
+
outputDate
+
'</li>'
+
' <ul class="pic">'
+
' <li><span class="lang" lang="txtViewDt"> </span>:<span id="lblVdate'
+
post
.
contentId
+
'"> </span></li>'
+
' <li><img src="'
+
DEFAULT_IMG_OPTION_MEMO
+
'" id="imgMemo'
+
post
.
contentId
+
'" class="sticker" /></li>'
+
' </ul>'
+
' <li><img src="'
+
DEFAULT_IMG_OPTION_MARKING
+
'" id="imgBookMark'
+
post
.
contentId
+
'" class="pen" /></li>'
+
' <ul class="pic">'
+
' <li><a class="read lang button-details" contentid="'
+
post
.
contentId
+
'" lang="txtRead">読む</a></li>'
+
' <li><img src="'
+
DEFAULT_IMG_OPTION_MEMO
+
'" id="imgMemo'
+
post
.
contentId
+
'" class="sticker" /></li>'
+
' </ul>'
+
' <li><img src="'
+
DEFAULT_IMG_OPTION_MARKING
+
'" id="imgBookMark'
+
post
.
contentId
+
'" class="pen" /></li>'
+
' </div>'
+
' <li><a class="read lang button-details" contentid="'
+
post
.
contentId
+
'" lang="txtRead">読む</a></li>'
+
' </div>'
+
' </ul>'
+
' </div>'
+
' </div>'
+
'</section>'
+
' </div>'
);
+
' </div>'
+
'</section>'
//assign thumbnail to array
);
arrayTemp
.
push
({
contentId
:
post
.
contentId
,
thumbnail
:
formatStringBase64
(
post
.
contentThumbnail
)
});
//assign thumbnail to array
//Check if user has read this content or not.
arrayTemp
.
push
({
contentId
:
post
.
contentId
,
thumbnail
:
formatStringBase64
(
post
.
contentThumbnail
)
});
checkUserHasReadContent
(
post
.
contentId
,
post
.
resourceVersion
,
post
.
metaVersion
);
//Check if user has read this content or not.
//assign version to array
checkUserHasReadContent
(
post
.
contentId
,
post
.
resourceVersion
,
post
.
metaVersion
);
resourceVersionArr
.
push
({
contentid
:
post
.
contentId
,
resourceversion
:
post
.
resourceVersion
});
//assign version to array
//assign meta version to array
resourceVersionArr
.
push
({
contentid
:
post
.
contentId
,
resourceversion
:
post
.
resourceVersion
});
metaVersionArr
.
push
({
contentid
:
post
.
contentId
,
metaversion
:
post
.
metaVersion
});
//assign meta version to array
//Check if content has marking or memo
metaVersionArr
.
push
({
contentid
:
post
.
contentId
,
metaversion
:
post
.
metaVersion
});
checkContentMarkingMemoOption
(
post
.
contentId
);
//Check if content has marking or memo
//renderViewDate
checkContentMarkingMemoOption
(
post
.
contentId
);
var
viewdate
=
renderViewDate
(
post
.
contentId
);
if
(
viewdate
!=
null
||
viewdate
!=
'undefined'
)
{
//renderViewDate
$
(
'#lblVdate'
+
post
.
contentId
).
html
(
viewdate
);
var
viewdate
=
renderViewDate
(
post
.
contentId
);
}
if
(
viewdate
!=
null
||
viewdate
!=
'undefined'
)
{
});
$
(
'#lblVdate'
+
post
.
contentId
).
html
(
viewdate
);
}
//Get Next record number for list
});
getNextRecordNumForList
();
//Get Next record number for list
if
(
data
.
totalRecord
<
data
.
recordTo
){
getNextRecordNumForList
();
ClientData
.
searchCond_recordTo
(
data
.
totalRecord
);
}
else
{
if
(
data
.
totalRecord
<
data
.
recordTo
){
ClientData
.
searchCond_recordTo
(
data
.
recordTo
);
ClientData
.
searchCond_recordTo
(
data
.
totalRecord
);
}
}
else
{
ClientData
.
searchCond_recordTo
(
data
.
recordTo
);
ClientData
.
searchCond_recordFrom
(
data
.
recordFrom
);
}
totalPage
=
data
.
totalRecord
;
ClientData
.
searchCond_recordFrom
(
data
.
recordFrom
);
//Render Page number
totalPage
=
data
.
totalRecord
;
if
(
totalPage
==
0
){
reRenderPageNumber
(
totalPage
,
totalPage
);
//Render Page number
}
if
(
totalPage
==
0
){
else
{
reRenderPageNumber
(
totalPage
,
totalPage
);
reRenderPageNumber
(
ClientData
.
searchCond_recordTo
(),
totalPage
);
}
}
else
{
reRenderPageNumber
(
ClientData
.
searchCond_recordTo
(),
totalPage
);
//Toggle scroll to top Control
}
handleBackToTop
();
//Toggle scroll to top Control
//changeLanguage(ClientData.userInfo_language());
handleBackToTop
();
i18nReplaceText
();
});
//changeLanguage(ClientData.userInfo_language());
};
i18nReplaceText
();
});
//Handle Back To Top Button
};
function
handleBackToTop
(){
if
(
ClientData
.
searchCond_recordTo
()
>=
totalPage
){
//Handle Back To Top Button
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
function
handleBackToTop
(){
}
if
(
ClientData
.
searchCond_recordTo
()
>=
totalPage
){
else
{
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'visible'
);
}
}
else
{
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'visible'
);
if
(
totalPage
==
0
){
}
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
displayResultNoRecord
();
if
(
totalPage
==
0
){
noRecordFlg
=
true
;
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
}
displayResultNoRecord
();
else
{
noRecordFlg
=
true
;
$
(
'#msgSearchNotExist'
).
hide
();
}
$
(
'#content-grid'
).
removeClass
(
'lang'
);
else
{
$
(
'#content-grid'
).
removeAttr
(
'lang'
);
$
(
'#msgSearchNotExist'
).
hide
();
enableSort
();
$
(
'#content-grid'
).
removeClass
(
'lang'
);
noRecordFlg
=
false
;
$
(
'#content-grid'
).
removeAttr
(
'lang'
);
}
enableSort
();
};
noRecordFlg
=
false
;
}
//Handle language
};
function
handleLanguage
(){
//Handle language
//if(ClientData.userInfo_language() == Consts.ConstLanguage_En || ClientData.userInfo_language() == Consts.ConstLanguage_Ko)
function
handleLanguage
(){
if
(
getCurrentLanguage
()
==
Consts
.
ConstLanguage_En
||
getCurrentLanguage
()
==
Consts
.
ConstLanguage_Ko
)
{
//if(ClientData.userInfo_language() == Consts.ConstLanguage_En || ClientData.userInfo_language() == Consts.ConstLanguage_Ko)
$
(
'#control-sort-titlekana'
).
css
(
'display'
,
'none'
);
if
(
getCurrentLanguage
()
==
Consts
.
ConstLanguage_En
||
getCurrentLanguage
()
==
Consts
.
ConstLanguage_Ko
)
$
(
'#label-sort-titlekana'
).
css
(
'display'
,
'none'
);
{
$
(
'#separate'
).
css
(
'display'
,
'none'
);
$
(
'#control-sort-titlekana'
).
css
(
'display'
,
'none'
);
$
(
"#titlekana-sorttype"
).
html
(
''
);
$
(
'#label-sort-titlekana'
).
css
(
'display'
,
'none'
);
}
$
(
'#separate'
).
css
(
'display'
,
'none'
);
else
{
$
(
"#titlekana-sorttype"
).
html
(
''
);
if
(
ClientData
.
searchCond_sortOrder
()
!=
null
&&
ClientData
.
searchCond_sortOrder
()
!=
'undefined'
||
ClientData
.
searchCond_sortType
()
!=
''
)
{
}
var
typeSort
=
ClientData
.
searchCond_sortType
();
else
{
var
orderSort
=
ClientData
.
searchCond_sortOrder
();
if
(
ClientData
.
searchCond_sortOrder
()
!=
null
&&
ClientData
.
searchCond_sortOrder
()
!=
'undefined'
||
ClientData
.
searchCond_sortType
()
!=
''
)
{
var
typeSort
=
ClientData
.
searchCond_sortType
();
if
(
typeSort
==
2
)
{
var
orderSort
=
ClientData
.
searchCond_sortOrder
();
if
(
orderSort
==
Consts
.
ConstOrderSetting_Asc
)
{
$
(
'#titlekana-sorttype'
).
html
(
''
);
if
(
typeSort
==
2
)
{
$
(
'#titlekana-sorttype'
).
html
(
'▲'
);
if
(
orderSort
==
Consts
.
ConstOrderSetting_Asc
)
{
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
}
$
(
'#titlekana-sorttype'
).
html
(
'▲'
);
else
{
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
}
$
(
'#titlekana-sorttype'
).
html
(
'▼'
);
else
{
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
}
$
(
'#titlekana-sorttype'
).
html
(
'▼'
);
}
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
}
}
if
(
noRecordFlg
){
}
$
(
'#label-sort-titlekana'
).
css
(
'display'
,
'block'
);
}
$
(
'#separate'
).
css
(
'display'
,
'block'
);
if
(
noRecordFlg
){
}
else
{
$
(
'#label-sort-titlekana'
).
css
(
'display'
,
'block'
);
$
(
'#control-sort-titlekana'
).
css
(
'display'
,
'block'
);
$
(
'#separate'
).
css
(
'display'
,
'block'
);
$
(
'#separate'
).
css
(
'display'
,
'block'
);
}
else
{
}
$
(
'#control-sort-titlekana'
).
css
(
'display'
,
'block'
);
}
$
(
'#separate'
).
css
(
'display'
,
'block'
);
};
}
}
//Initial Screen
};
function
renderGridView
(){
//Initial Screen
var
fromPage
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
function
renderGridView
(){
var
toPage
=
returnNumberDispRecordForList
();
var
sortType
=
DEFAULT_SORT_TYPE
;
var
fromPage
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
var
sortOrder
=
DEFAULT_SORT_ORDER
;
var
toPage
=
returnNumberDispRecordForList
();
var
searchText
=
ClientData
.
searchCond_searchText
();
var
sortType
=
DEFAULT_SORT_TYPE
;
var
searchDivision
=
ClientData
.
searchCond_searchDivision
();
var
sortOrder
=
DEFAULT_SORT_ORDER
;
var
sid
=
ClientData
.
userInfo_sid
();
var
searchText
=
ClientData
.
searchCond_searchText
();
var
searchDivision
=
ClientData
.
searchCond_searchDivision
();
ClientData
.
searchCond_recordFrom
(
fromPage
);
var
sid
=
ClientData
.
userInfo_sid
();
ClientData
.
searchCond_recordTo
(
toPage
);
ClientData
.
searchCond_recordFrom
(
fromPage
);
ClientData
.
searchCond_sortType
(
sortType
);
ClientData
.
searchCond_recordTo
(
toPage
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
ClientData
.
searchCond_sortType
(
sortType
);
ClientData
.
searchCond_searchDivision
(
searchDivision
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
ClientData
.
searchCond_genreId
(
''
);
ClientData
.
searchCond_searchDivision
(
searchDivision
);
ClientData
.
searchCond_groupId
(
''
);
ClientData
.
searchCond_genreId
(
''
);
var
genreId
=
ClientData
.
searchCond_genreId
();
ClientData
.
searchCond_groupId
(
''
);
var
groupId
=
ClientData
.
searchCond_groupId
();
var
genreId
=
ClientData
.
searchCond_genreId
();
//Handle display sort
var
groupId
=
ClientData
.
searchCond_groupId
();
handleSortDisp
();
//Handle display sort
//Language Handle
handleSortDisp
();
handleLanguage
();
//Language Handle
//Refresh GridView
handleLanguage
();
refreshGrid
();
//Refresh GridView
if
(
searchText
==
''
||
searchText
==
null
){
refreshGrid
();
displayResultNoRecord
();
chkSearchTextEmpty
=
true
;
if
(
searchText
==
''
||
searchText
==
null
){
noRecordFlg
=
true
;
displayResultNoRecord
();
reRenderPageNumber
(
0
,
0
);
chkSearchTextEmpty
=
true
;
}
noRecordFlg
=
true
;
else
{
reRenderPageNumber
(
0
,
0
);
$
(
'#msgSearchNotExist'
).
hide
();
}
chkSearchTextEmpty
=
false
;
else
{
//Render Gridview
$
(
'#msgSearchNotExist'
).
hide
();
renderContent
(
sid
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
fromPage
,
toPage
,
genreId
,
groupId
);
chkSearchTextEmpty
=
false
;
//Render Gridview
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'visible'
);
renderContent
(
sid
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
fromPage
,
toPage
,
genreId
,
groupId
);
}
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'visible'
);
};
}
//Canvas Click function
};
function
canvasClickFunction
(
e
){
//Canvas Click function
if
(
e
)
{
function
canvasClickFunction
(
e
){
e
.
preventDefault
();
}
if
(
e
)
{
if
(
home_isMove
==
true
)
{
e
.
preventDefault
();
home_isMove
=
false
;
}
return
;
if
(
home_isMove
==
true
)
{
}
home_isMove
=
false
;
return
;
var
contentId
=
$
(
this
).
attr
(
'id'
);
}
var
outputId
=
contentId
.
substring
(
17
);
var
checkflag
=
false
;
var
contentId
=
$
(
this
).
attr
(
'id'
);
var
outputId
=
contentId
.
substring
(
17
);
// Set content id for screen: content detail
var
checkflag
=
false
;
ClientData
.
contentInfo_contentId
(
outputId
);
// Set content id for screen: content detail
// Get image of selected image
ClientData
.
contentInfo_contentId
(
outputId
);
var
base64String
=
returnThumbnail
(
outputId
);
ClientData
.
contentInfo_contentThumbnail
(
base64String
);
// Get image of selected image
var
base64String
=
returnThumbnail
(
outputId
);
//Store Content id that user has read
ClientData
.
contentInfo_contentThumbnail
(
base64String
);
if
(
ClientData
.
ReadingContentIds
().
length
>
0
){
contentIdArray
=
ClientData
.
ReadingContentIds
();
//Store Content id that user has read
if
(
ClientData
.
ReadingContentIds
().
length
>
0
){
for
(
var
nIndex
=
0
;
nIndex
<
contentIdArray
.
length
;
nIndex
++
){
contentIdArray
=
ClientData
.
ReadingContentIds
();
if
(
contentIdArray
[
nIndex
].
contentid
==
outputId
){
checkflag
=
true
;
for
(
var
nIndex
=
0
;
nIndex
<
contentIdArray
.
length
;
nIndex
++
){
break
;
if
(
contentIdArray
[
nIndex
].
contentid
==
outputId
){
}
checkflag
=
true
;
else
{
break
;
checkflag
=
false
;
}
}
else
{
}
checkflag
=
false
;
}
if
(
!
checkflag
){
}
contentIdArray
.
push
({
contentid
:
outputId
,
viewdate
:
''
,
originviewdate
:
''
});
}
if
(
!
checkflag
){
}
contentIdArray
.
push
({
contentid
:
outputId
,
viewdate
:
''
,
originviewdate
:
''
});
else
{
}
contentIdArray
.
push
({
contentid
:
outputId
,
viewdate
:
''
,
originviewdate
:
''
});
}
}
else
{
contentIdArray
.
push
({
contentid
:
outputId
,
viewdate
:
''
,
originviewdate
:
''
});
//Renew ReadingContentID
}
var
newArray
=
[];
ClientData
.
ReadingContentIds
(
newArray
);
//Renew ReadingContentID
var
newArray
=
[];
//Set data for readingcontentid
ClientData
.
ReadingContentIds
(
newArray
);
ClientData
.
ReadingContentIds
(
contentIdArray
);
//Set data for readingcontentid
//Set ResouceVersion for content
ClientData
.
ReadingContentIds
(
contentIdArray
);
setResourceVersionData
(
outputId
);
//Set ResouceVersion for content
//Set MetaVersion for content
setResourceVersionData
(
outputId
);
setMetaVersionData
(
outputId
);
//Set MetaVersion for content
//Close Submenu
setMetaVersionData
(
outputId
);
$
(
'#dlgSubMenu'
).
hide
();
//Close Submenu
//Delete 'new' icon
$
(
'#dlgSubMenu'
).
hide
();
drawEditImage
(
outputId
);
//Delete 'new' icon
//Open content Detail
drawEditImage
(
outputId
);
openContentDetail
();
};
//Open content Detail
openContentDetail
();
//Re-render page from and total record
};
function
reRenderPageNumber
(
dispRecord
,
dispTotal
){
$
(
'#dispPage'
).
html
(
dispRecord
);
//Re-render page from and total record
$
(
'#totalPage'
).
html
(
dispTotal
);
function
reRenderPageNumber
(
dispRecord
,
dispTotal
){
$
(
'.pageNumControl'
).
css
(
'visibility'
,
'visible'
);
$
(
'#dispPage'
).
html
(
dispRecord
);
};
$
(
'#totalPage'
).
html
(
dispTotal
);
$
(
'.pageNumControl'
).
css
(
'visibility'
,
'visible'
);
//Show Next Record Function
};
function
showNextRecordFunction
(){
var
fromPage
=
ClientData
.
searchCond_recordFrom
();
//Show Next Record Function
var
toPage
=
ClientData
.
searchCond_recordTo
();
function
showNextRecordFunction
(){
var
sortType
=
ClientData
.
searchCond_sortType
();
var
fromPage
=
ClientData
.
searchCond_recordFrom
();
var
sortOrder
=
ClientData
.
searchCond_sortOrder
();
var
toPage
=
ClientData
.
searchCond_recordTo
();
var
searchText
=
ClientData
.
searchCond_searchText
();
var
sortType
=
ClientData
.
searchCond_sortType
();
var
searchDivision
=
ClientData
.
searchCond_searchDivision
();
var
sortOrder
=
ClientData
.
searchCond_sortOrder
();
var
genreId
=
ClientData
.
searchCond_genreId
();
var
searchText
=
ClientData
.
searchCond_searchText
();
var
groupId
=
ClientData
.
searchCond_groupId
();
var
searchDivision
=
ClientData
.
searchCond_searchDivision
();
var
sid
=
ClientData
.
userInfo_sid
();
var
genreId
=
ClientData
.
searchCond_genreId
();
var
totalrecord
=
totalPage
;
var
groupId
=
ClientData
.
searchCond_groupId
();
var
sid
=
ClientData
.
userInfo_sid
();
if
(
fromPage
==
null
||
fromPage
==
'undefined'
){
var
totalrecord
=
totalPage
;
fromPage
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
}
if
(
fromPage
==
null
||
fromPage
==
'undefined'
){
fromPage
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
if
(
toPage
==
null
||
toPage
==
'undefined'
){
}
toPage
=
returnNumberDispRecordForList
();
}
if
(
toPage
==
null
||
toPage
==
'undefined'
){
toPage
=
returnNumberDispRecordForList
();
fromPage
=
eval
(
toPage
)
+
1
;
}
var
iRecordNumber
=
eval
(
totalrecord
)
-
eval
(
fromPage
);
fromPage
=
eval
(
toPage
)
+
1
;
if
(
iRecordNumber
<
iNumberOfNextRecord
)
var
iRecordNumber
=
eval
(
totalrecord
)
-
eval
(
fromPage
);
{
toPage
=
eval
(
fromPage
)
+
eval
(
iRecordNumber
);
if
(
iRecordNumber
<
iNumberOfNextRecord
)
}
{
else
toPage
=
eval
(
fromPage
)
+
eval
(
iRecordNumber
);
{
}
toPage
=
eval
(
fromPage
)
+
(
eval
(
iNumberOfNextRecord
)
-
1
);
else
}
{
toPage
=
eval
(
fromPage
)
+
(
eval
(
iNumberOfNextRecord
)
-
1
);
ClientData
.
searchCond_recordFrom
(
fromPage
);
}
ClientData
.
searchCond_recordTo
(
toPage
);
ClientData
.
searchCond_recordFrom
(
fromPage
);
if
(
fromPage
<=
totalrecord
)
ClientData
.
searchCond_recordTo
(
toPage
);
{
renderContent
(
sid
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
fromPage
,
toPage
,
genreId
,
groupId
);
if
(
fromPage
<=
totalrecord
)
}
{
};
renderContent
(
sid
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
fromPage
,
toPage
,
genreId
,
groupId
);
}
//Sort By Title Function
};
function
sortByTitleFunction
(){
//Sort By Title Function
$
(
this
).
addClass
(
'active_tops'
);
function
sortByTitleFunction
(){
$
(
'#control-sort-titlekana'
).
removeClass
(
'active_tops'
);
$
(
'#control-sort-releasedate'
).
removeClass
(
'active_tops'
);
$
(
this
).
addClass
(
'active_tops'
);
$
(
'#control-sort-titlekana'
).
removeClass
(
'active_tops'
);
var
sortOrder
=
ClientData
.
searchCond_sortOrder
();
$
(
'#control-sort-releasedate'
).
removeClass
(
'active_tops'
);
var
sortType
=
ClientData
.
searchCond_sortType
();
var
sid
=
ClientData
.
userInfo_sid
();
var
sortOrder
=
ClientData
.
searchCond_sortOrder
();
var
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
var
sortType
=
ClientData
.
searchCond_sortType
();
var
recordTo
=
ClientData
.
searchCond_recordTo
();
var
sid
=
ClientData
.
userInfo_sid
();
var
genreId
=
ClientData
.
searchCond_genreId
();
var
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
var
groupId
=
ClientData
.
searchCond_groupId
();
var
recordTo
=
ClientData
.
searchCond_recordTo
();
var
genreId
=
ClientData
.
searchCond_genreId
();
if
(
sortOrder
==
Consts
.
ConstOrderSetting_Asc
)
var
groupId
=
ClientData
.
searchCond_groupId
();
{
if
(
sortType
==
'1'
){
if
(
sortOrder
==
Consts
.
ConstOrderSetting_Asc
)
sortOrder
=
Consts
.
ConstOrderSetting_Desc
;
{
$
(
'#title-sorttype'
).
html
(
''
);
if
(
sortType
==
'1'
){
$
(
'#title-sorttype'
).
html
(
'▼'
);
sortOrder
=
Consts
.
ConstOrderSetting_Desc
;
$
(
'#title-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
'▼'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
css
(
'width'
,
'12px'
);
}
$
(
'#titlekana-sorttype'
).
html
(
''
);
else
{
$
(
'#rDate-sorttype'
).
html
(
''
);
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
}
$
(
'#title-sorttype'
).
html
(
''
);
else
{
$
(
'#title-sorttype'
).
html
(
'▲'
);
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
$
(
'#title-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
'▲'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
css
(
'width'
,
'12px'
);
}
$
(
'#titlekana-sorttype'
).
html
(
''
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
$
(
'#rDate-sorttype'
).
html
(
''
);
}
}
else
ClientData
.
searchCond_sortOrder
(
sortOrder
);
{
}
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
else
$
(
'#title-sorttype'
).
html
(
''
);
{
$
(
'#title-sorttype'
).
html
(
'▲'
);
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
$
(
'#title-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
'▲'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
css
(
'width'
,
'12px'
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
}
$
(
'#rDate-sorttype'
).
html
(
''
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
){
}
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
ClientData
.
searchCond_recordFrom
(
recordFrom
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
){
}
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
ClientData
.
searchCond_recordFrom
(
recordFrom
);
if
(
recordTo
==
null
||
recordTo
==
'undefined'
){
}
recordTo
=
returnNumberDispRecordForList
();
if
(
recordTo
==
null
||
recordTo
==
'undefined'
){
ClientData
.
searchCond_recordFrom
(
recordTo
);
}
recordTo
=
returnNumberDispRecordForList
();
ClientData
.
searchCond_recordFrom
(
recordTo
);
sortType
=
'1'
;
}
ClientData
.
searchCond_sortType
(
sortType
);
sortType
=
'1'
;
//refresh Gridview
ClientData
.
searchCond_sortType
(
sortType
);
refreshGrid
();
//refresh Gridview
//refresh add more record
refreshGrid
();
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
//refresh add more record
renderContent
(
sid
,
ClientData
.
searchCond_searchText
(),
ClientData
.
searchCond_searchDivision
(),
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
};
renderContent
(
sid
,
ClientData
.
searchCond_searchText
(),
ClientData
.
searchCond_searchDivision
(),
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
//Sort By Title Kana function
};
function
sortByTitleKanaFunction
(){
//Sort By Title Kana function
$
(
this
).
addClass
(
'active_tops'
);
function
sortByTitleKanaFunction
(){
$
(
'#control-sort-title'
).
removeClass
(
'active_tops'
);
$
(
'#control-sort-releasedate'
).
removeClass
(
'active_tops'
);
$
(
this
).
addClass
(
'active_tops'
);
$
(
'#control-sort-title'
).
removeClass
(
'active_tops'
);
$
(
'#control-sort-releasedate'
).
removeClass
(
'active_tops'
);
var
sortOrder
=
ClientData
.
searchCond_sortOrder
();
var
sortType
=
ClientData
.
searchCond_sortType
();
var
sid
=
ClientData
.
userInfo_sid
();
var
sortOrder
=
ClientData
.
searchCond_sortOrder
();
var
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
var
sortType
=
ClientData
.
searchCond_sortType
();
var
recordTo
=
ClientData
.
searchCond_recordTo
();
var
sid
=
ClientData
.
userInfo_sid
();
var
genreId
=
ClientData
.
searchCond_genreId
();
var
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
var
groupId
=
ClientData
.
searchCond_groupId
();
var
recordTo
=
ClientData
.
searchCond_recordTo
();
var
genreId
=
ClientData
.
searchCond_genreId
();
if
(
sortOrder
==
Consts
.
ConstOrderSetting_Asc
)
var
groupId
=
ClientData
.
searchCond_groupId
();
{
if
(
sortType
==
'2'
){
if
(
sortOrder
==
Consts
.
ConstOrderSetting_Asc
)
sortOrder
=
Consts
.
ConstOrderSetting_Desc
;
{
$
(
'#title-sorttype'
).
html
(
''
);
if
(
sortType
==
'2'
){
$
(
'#titlekana-sorttype'
).
html
(
''
);
sortOrder
=
Consts
.
ConstOrderSetting_Desc
;
$
(
'#titlekana-sorttype'
).
html
(
'▼'
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
'▼'
);
}
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
else
{
$
(
'#rDate-sorttype'
).
html
(
''
);
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
}
$
(
'#title-sorttype'
).
html
(
''
);
else
{
$
(
'#titlekana-sorttype'
).
html
(
''
);
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
$
(
'#titlekana-sorttype'
).
html
(
'▲'
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
'▲'
);
}
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
$
(
'#rDate-sorttype'
).
html
(
''
);
}
}
else
ClientData
.
searchCond_sortOrder
(
sortOrder
);
{
}
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
else
$
(
'#title-sorttype'
).
html
(
''
);
{
$
(
'#titlekana-sorttype'
).
html
(
''
);
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
$
(
'#titlekana-sorttype'
).
html
(
'▲'
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
'▲'
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
}
$
(
'#rDate-sorttype'
).
html
(
''
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
){
}
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
ClientData
.
searchCond_recordFrom
(
recordFrom
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
){
}
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
ClientData
.
searchCond_recordFrom
(
recordFrom
);
if
(
recordTo
==
null
||
recordTo
==
'undefined'
){
}
recordTo
=
returnNumberDispRecordForList
();
if
(
recordTo
==
null
||
recordTo
==
'undefined'
){
ClientData
.
searchCond_recordFrom
(
recordTo
);
recordTo
=
returnNumberDispRecordForList
();
}
ClientData
.
searchCond_recordFrom
(
recordTo
);
sortType
=
'2'
;
}
//refresh gridview
refreshGrid
();
sortType
=
'2'
;
//refresh gridview
refreshGrid
();
//refresh add more record
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
//refresh add more record
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
ClientData
.
searchCond_sortType
(
sortType
);
renderContent
(
sid
,
ClientData
.
searchCond_searchText
(),
ClientData
.
searchCond_searchDivision
(),
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
};
ClientData
.
searchCond_sortType
(
sortType
);
renderContent
(
sid
,
ClientData
.
searchCond_searchText
(),
ClientData
.
searchCond_searchDivision
(),
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
//Sort By Release Date
};
function
sortByReleaseDateFunction
(){
//Sort By Release Date
$
(
this
).
addClass
(
'active_tops'
);
function
sortByReleaseDateFunction
(){
$
(
'#control-sort-title'
).
removeClass
(
'active_tops'
);
$
(
'#control-sort-titlekana'
).
removeClass
(
'active_tops'
);
$
(
this
).
addClass
(
'active_tops'
);
$
(
'#control-sort-title'
).
removeClass
(
'active_tops'
);
var
sortOrder
=
ClientData
.
searchCond_sortOrder
();
$
(
'#control-sort-titlekana'
).
removeClass
(
'active_tops'
);
var
sortType
=
ClientData
.
searchCond_sortType
();
var
sid
=
ClientData
.
userInfo_sid
();
var
sortOrder
=
ClientData
.
searchCond_sortOrder
();
var
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
var
sortType
=
ClientData
.
searchCond_sortType
();
var
recordTo
=
ClientData
.
searchCond_recordTo
();
var
sid
=
ClientData
.
userInfo_sid
();
var
genreId
=
ClientData
.
searchCond_genreId
();
var
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
var
groupId
=
ClientData
.
searchCond_groupId
();
var
recordTo
=
ClientData
.
searchCond_recordTo
();
var
genreId
=
ClientData
.
searchCond_genreId
();
if
(
sortOrder
==
Consts
.
ConstOrderSetting_Asc
)
var
groupId
=
ClientData
.
searchCond_groupId
();
{
if
(
sortType
==
'3'
){
if
(
sortOrder
==
Consts
.
ConstOrderSetting_Asc
)
sortOrder
=
Consts
.
ConstOrderSetting_Desc
;
{
$
(
'#title-sorttype'
).
html
(
''
);
if
(
sortType
==
'3'
){
$
(
'#titlekana-sorttype'
).
html
(
''
);
sortOrder
=
Consts
.
ConstOrderSetting_Desc
;
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
'▼'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
}
$
(
'#rDate-sorttype'
).
html
(
'▼'
);
else
{
$
(
'#rDate-sorttype'
).
css
(
'width'
,
'12px'
);
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
}
$
(
'#title-sorttype'
).
html
(
''
);
else
{
$
(
'#titlekana-sorttype'
).
html
(
''
);
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
'▲'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
}
$
(
'#rDate-sorttype'
).
html
(
'▲'
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
$
(
'#rDate-sorttype'
).
css
(
'width'
,
'12px'
);
}
}
else
ClientData
.
searchCond_sortOrder
(
sortOrder
);
{
}
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
else
$
(
'#title-sorttype'
).
html
(
''
);
{
$
(
'#titlekana-sorttype'
).
html
(
''
);
sortOrder
=
Consts
.
ConstOrderSetting_Asc
;
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
'▲'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
$
(
'#rDate-sorttype'
).
html
(
'▲'
);
}
$
(
'#rDate-sorttype'
).
css
(
'width'
,
'12px'
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
){
}
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
ClientData
.
searchCond_recordFrom
(
recordFrom
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
){
}
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
ClientData
.
searchCond_recordFrom
(
recordFrom
);
if
(
recordTo
==
null
||
recordTo
==
'undefined'
){
}
recordTo
=
returnNumberDispRecordForList
();
if
(
recordTo
==
null
||
recordTo
==
'undefined'
){
ClientData
.
searchCond_recordFrom
(
recordTo
);
recordTo
=
returnNumberDispRecordForList
();
}
ClientData
.
searchCond_recordFrom
(
recordTo
);
sortType
=
'3'
;
}
//refresh gridview
refreshGrid
();
sortType
=
'3'
;
//refresh gridview
//refresh add more record
refreshGrid
();
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
//refresh add more record
ClientData
.
searchCond_sortType
(
sortType
);
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
renderContent
(
sid
,
ClientData
.
searchCond_searchText
(),
ClientData
.
searchCond_searchDivision
(),
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
};
ClientData
.
searchCond_sortType
(
sortType
);
renderContent
(
sid
,
ClientData
.
searchCond_searchText
(),
ClientData
.
searchCond_searchDivision
(),
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
//Get Thumnail base on contentid
};
function
returnThumbnail
(
contentid
){
//Get Thumnail base on contentid
for
(
var
i
=
0
;
i
<
arrayTemp
.
length
;
i
++
){
function
returnThumbnail
(
contentid
){
if
(
arrayTemp
[
i
].
contentId
==
contentid
){
return
arrayTemp
[
i
].
thumbnail
;
for
(
var
i
=
0
;
i
<
arrayTemp
.
length
;
i
++
){
}
if
(
arrayTemp
[
i
].
contentId
==
contentid
){
}
return
arrayTemp
[
i
].
thumbnail
;
};
}
}
//Dialog Read Button CLick
};
function
readSubmenuFunction
(
e
){
if
(
e
)
{
//Dialog Read Button CLick
e
.
preventDefault
();
function
readSubmenuFunction
(
e
){
}
if
(
e
)
{
if
(
home_isMove
==
true
)
{
e
.
preventDefault
();
home_isMove
=
false
;
}
return
;
if
(
home_isMove
==
true
)
{
}
home_isMove
=
false
;
return
;
var
contentId
=
$
(
this
).
attr
(
'contentid'
);
}
var
contentThumbnail
=
returnThumbnail
(
contentId
);
var
date
=
new
Date
();
var
contentId
=
$
(
this
).
attr
(
'contentid'
);
var
month
=
date
.
getMonth
()
+
1
;
var
contentThumbnail
=
returnThumbnail
(
contentId
);
var
day
=
date
.
getDate
();
var
date
=
new
Date
();
var
month
=
date
.
getMonth
()
+
1
;
var
outputDate
=
formatNormalDate
(
day
,
month
,
date
.
getFullYear
());
var
day
=
date
.
getDate
();
ClientData
.
contentInfo_contentId
(
contentId
);
var
outputDate
=
formatNormalDate
(
day
,
month
,
date
.
getFullYear
());
ClientData
.
contentInfo_contentThumbnail
(
contentThumbnail
);
ClientData
.
contentInfo_contentId
(
contentId
);
var
checkflag
=
false
;
ClientData
.
contentInfo_contentThumbnail
(
contentThumbnail
);
//Store Content id that user has read
var
checkflag
=
false
;
if
(
ClientData
.
ReadingContentIds
().
length
>
0
){
contentIdArray
=
ClientData
.
ReadingContentIds
();
//Store Content id that user has read
if
(
ClientData
.
ReadingContentIds
().
length
>
0
){
for
(
var
nIndex
=
0
;
nIndex
<
contentIdArray
.
length
;
nIndex
++
){
contentIdArray
=
ClientData
.
ReadingContentIds
();
if
(
contentIdArray
[
nIndex
].
contentid
==
contentId
){
checkflag
=
true
;
for
(
var
nIndex
=
0
;
nIndex
<
contentIdArray
.
length
;
nIndex
++
){
if
(
contentIdArray
[
nIndex
].
viewdate
==
null
||
contentIdArray
[
nIndex
].
viewdate
==
'undefined'
||
contentIdArray
[
nIndex
].
viewdate
==
''
){
if
(
contentIdArray
[
nIndex
].
contentid
==
contentId
){
contentIdArray
[
nIndex
].
viewdate
=
outputDate
;
checkflag
=
true
;
contentIdArray
[
nIndex
].
originviewdate
=
date
;
if
(
contentIdArray
[
nIndex
].
viewdate
==
null
||
contentIdArray
[
nIndex
].
viewdate
==
'undefined'
||
contentIdArray
[
nIndex
].
viewdate
==
''
){
}
contentIdArray
[
nIndex
].
viewdate
=
outputDate
;
break
;
contentIdArray
[
nIndex
].
originviewdate
=
date
;
}
}
else
{
break
;
checkflag
=
false
;
}
}
else
{
}
checkflag
=
false
;
}
if
(
!
checkflag
){
}
contentIdArray
.
push
({
contentid
:
contentId
,
viewdate
:
outputDate
,
originviewdate
:
date
});
}
if
(
!
checkflag
){
}
contentIdArray
.
push
({
contentid
:
contentId
,
viewdate
:
outputDate
,
originviewdate
:
date
});
else
{
}
contentIdArray
.
push
({
contentid
:
contentId
,
viewdate
:
outputDate
,
originviewdate
:
date
});
}
}
else
{
contentIdArray
.
push
({
contentid
:
contentId
,
viewdate
:
outputDate
,
originviewdate
:
date
});
//Renew ReadingContentID
}
var
newArray
=
[];
ClientData
.
ReadingContentIds
(
newArray
);
//Renew ReadingContentID
var
newArray
=
[];
//Set ResouceVersion for content
ClientData
.
ReadingContentIds
(
newArray
);
setResourceVersionData
(
contentId
);
//Set ResouceVersion for content
//Set MetaVersion for content
setResourceVersionData
(
contentId
);
setMetaVersionData
(
contentId
);
//Set MetaVersion for content
//Set data for readingcontentid
setMetaVersionData
(
contentId
);
ClientData
.
ReadingContentIds
(
contentIdArray
);
//Set data for readingcontentid
ClientData
.
IsRefresh
(
false
);
ClientData
.
ReadingContentIds
(
contentIdArray
);
avwScreenMove
(
ScreenIds
.
ContentView
);
};
ClientData
.
IsRefresh
(
false
);
avwScreenMove
(
ScreenIds
.
ContentView
);
//Check if Content Has marking or memo
};
function
checkContentMarkingMemoOption
(
contentId
){
//Check if Content Has marking or memo
//Check if contentid has marking
function
checkContentMarkingMemoOption
(
contentId
){
if
(
ClientData
.
MarkingData
().
length
==
0
){
$
(
'#imgBookMark'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
//Check if contentid has marking
}
if
(
ClientData
.
MarkingData
().
length
==
0
){
else
{
$
(
'#imgBookMark'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
MarkingData
().
length
;
nIndex1
++
)
{
}
if
(
ClientData
.
MarkingData
()[
nIndex1
].
contentid
==
contentId
)
{
else
{
$
(
'#imgBookMark'
+
contentId
).
css
(
'visibility'
,
'visible'
);
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
MarkingData
().
length
;
nIndex1
++
)
{
break
;
if
(
ClientData
.
MarkingData
()[
nIndex1
].
contentid
==
contentId
)
{
}
$
(
'#imgBookMark'
+
contentId
).
css
(
'visibility'
,
'visible'
);
else
{
break
;
$
(
'#imgBookMark'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
}
}
else
{
}
$
(
'#imgBookMark'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
}
}
}
if
(
ClientData
.
MemoData
().
length
==
0
){
}
$
(
'#imgMemo'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
}
if
(
ClientData
.
MemoData
().
length
==
0
){
else
{
$
(
'#imgMemo'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
// Check if contentid has memo
}
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
MemoData
().
length
;
nIndex1
++
)
{
else
{
if
(
ClientData
.
MemoData
()[
nIndex1
].
contentid
==
contentId
)
{
// Check if contentid has memo
$
(
'#imgMemo'
+
contentId
).
css
(
'visibility'
,
'visible'
);
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
MemoData
().
length
;
nIndex1
++
)
{
break
;
if
(
ClientData
.
MemoData
()[
nIndex1
].
contentid
==
contentId
)
{
}
$
(
'#imgMemo'
+
contentId
).
css
(
'visibility'
,
'visible'
);
else
break
;
{
}
$
(
'#imgMemo'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
else
}
{
}
$
(
'#imgMemo'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
}
}
};
}
}
//Check if User has read content
};
function
checkUserHasReadContent
(
contId
,
resourceVer
,
metaVer
){
//Check if User has read content
var
imgThumb
=
new
Image
();
function
checkUserHasReadContent
(
contId
,
resourceVer
,
metaVer
){
//imgThumb.src = returnThumbnail(contId);
var
imgThumb
=
new
Image
();
var
imgIconNew
=
new
Image
();
//imgThumb.src = returnThumbnail(contId);
//imgIconNew.src = DEFAULT_IMG_CONTENT_NEW;
var
imgIconNew
=
new
Image
();
var
imgIconEdit
=
new
Image
();
//imgIconNew.src = DEFAULT_IMG_CONTENT_NEW;
//imgIconEdit.src = DEFAULT_IMG_CONTENT_EDIT;
var
imgIconEdit
=
new
Image
();
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
contId
);
//imgIconEdit.src = DEFAULT_IMG_CONTENT_EDIT;
var
ctx
=
c
.
getContext
(
'2d'
);
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
contId
);
var
readFlg
=
false
;
var
ctx
=
c
.
getContext
(
'2d'
);
var
versionArr
=
ClientData
.
ResourceVersion
();
var
metaArr
=
ClientData
.
MetaVersion
();
var
readFlg
=
false
;
var
readArr
=
ClientData
.
ReadingContentIds
();
var
versionArr
=
ClientData
.
ResourceVersion
();
var
metaArr
=
ClientData
.
MetaVersion
();
if
(
readArr
==
null
||
readArr
<=
0
||
readArr
==
'undefined'
){
var
readArr
=
ClientData
.
ReadingContentIds
();
imgThumb
.
onload
=
function
(){
var
resizeImg
=
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
if
(
readArr
==
null
||
readArr
<=
0
||
readArr
==
'undefined'
){
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
imgThumb
.
onload
=
function
(){
imgIconNew
.
onload
=
function
(){
var
resizeImg
=
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
imgIconNew
.
onload
=
function
(){
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
});
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
};
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
imgIconNew
.
src
=
DEFAULT_IMG_CONTENT_NEW
;
});
};
};
imgIconNew
.
src
=
DEFAULT_IMG_CONTENT_NEW
;
imgThumb
.
src
=
returnThumbnail
(
contId
);
};
}
imgThumb
.
src
=
returnThumbnail
(
contId
);
else
{
//Check if user has read this content or not
}
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
ReadingContentIds
().
length
;
nIndex1
++
)
{
else
{
if
(
ClientData
.
ReadingContentIds
()[
nIndex1
].
contentid
==
contId
){
//Check if user has read this content or not
imgThumb
.
onload
=
function
(){
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
ReadingContentIds
().
length
;
nIndex1
++
)
{
var
resizeImg
=
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
if
(
ClientData
.
ReadingContentIds
()[
nIndex1
].
contentid
==
contId
){
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
imgThumb
.
onload
=
function
(){
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
var
resizeImg
=
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
});
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
};
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
imgThumb
.
src
=
returnThumbnail
(
contId
);
});
readFlg
=
true
;
};
break
;
imgThumb
.
src
=
returnThumbnail
(
contId
);
}
readFlg
=
true
;
else
{
break
;
imgThumb
.
onload
=
function
(){
}
var
resizeImg
=
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
else
{
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
imgThumb
.
onload
=
function
(){
imgIconNew
.
onload
=
function
(){
var
resizeImg
=
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
imgIconNew
.
onload
=
function
(){
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
});
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
};
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
imgIconNew
.
src
=
DEFAULT_IMG_CONTENT_NEW
;
});
};
};
imgThumb
.
src
=
returnThumbnail
(
contId
);
imgIconNew
.
src
=
DEFAULT_IMG_CONTENT_NEW
;
}
};
}
imgThumb
.
src
=
returnThumbnail
(
contId
);
}
}
}
//Check if resource version has change
}
if
(
readFlg
){
if
(
versionArr
==
null
||
versionArr
<=
0
||
versionArr
==
'undefined'
){
//Check if resource version has change
}
if
(
readFlg
){
else
{
if
(
versionArr
==
null
||
versionArr
<=
0
||
versionArr
==
'undefined'
){
for
(
var
nIndex2
=
0
;
nIndex2
<
versionArr
.
length
;
nIndex2
++
){
}
if
(
versionArr
[
nIndex2
].
contentid
==
contId
){
else
{
if
(
versionArr
[
nIndex2
].
resourceversion
!=
resourceVer
){
for
(
var
nIndex2
=
0
;
nIndex2
<
versionArr
.
length
;
nIndex2
++
){
imgThumb
.
onload
=
function
(){
if
(
versionArr
[
nIndex2
].
contentid
==
contId
){
var
resizeImg
=
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
if
(
versionArr
[
nIndex2
].
resourceversion
!=
resourceVer
){
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
imgThumb
.
onload
=
function
(){
imgIconEdit
.
onload
=
function
(){
var
resizeImg
=
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
imgIconEdit
.
onload
=
function
(){
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
});
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
};
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
imgIconEdit
.
src
=
DEFAULT_IMG_CONTENT_EDIT
;
});
};
};
imgThumb
.
src
=
returnThumbnail
(
contId
);
imgIconEdit
.
src
=
DEFAULT_IMG_CONTENT_EDIT
;
break
;
};
}
imgThumb
.
src
=
returnThumbnail
(
contId
);
}
break
;
}
}
}
}
}
if
(
metaArr
==
null
||
metaArr
<=
0
||
metaArr
==
'undefined'
){
}
}
else
{
if
(
metaArr
==
null
||
metaArr
<=
0
||
metaArr
==
'undefined'
){
for
(
var
nIndex2
=
0
;
nIndex2
<
metaArr
.
length
;
nIndex2
++
){
}
if
(
metaArr
[
nIndex2
].
contentid
==
contId
){
else
{
if
(
metaArr
[
nIndex2
].
metaversion
!=
metaVer
){
for
(
var
nIndex2
=
0
;
nIndex2
<
metaArr
.
length
;
nIndex2
++
){
imgThumb
.
onload
=
function
(){
if
(
metaArr
[
nIndex2
].
contentid
==
contId
){
var
resizeImg
=
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
if
(
metaArr
[
nIndex2
].
metaversion
!=
metaVer
){
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
imgThumb
.
onload
=
function
(){
imgIconEdit
.
onload
=
function
(){
var
resizeImg
=
resizeResourceThumbnail
(
imgThumb
,
c
.
width
,
c
.
height
);
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
ctx
.
drawImage
(
imgThumb
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
imgIconEdit
.
onload
=
function
(){
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
ctx
.
drawImage
(
imgIconEdit
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
);
});
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
};
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
imgIconEdit
.
src
=
DEFAULT_IMG_CONTENT_EDIT
;
});
};
};
imgThumb
.
src
=
returnThumbnail
(
contId
);
imgIconEdit
.
src
=
DEFAULT_IMG_CONTENT_EDIT
;
break
;
};
}
imgThumb
.
src
=
returnThumbnail
(
contId
);
}
break
;
}
}
}
}
readFlg
=
false
;
}
}
}
};
readFlg
=
false
;
}
//draw Edit Image
};
function
drawEditImage
(
id
){
var
img
=
new
Image
();
//draw Edit Image
img
.
src
=
returnThumbnail
(
id
);
function
drawEditImage
(
id
){
var
img
=
new
Image
();
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
id
);
img
.
src
=
returnThumbnail
(
id
);
//use getContext to use the canvas for drawing
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
id
);
var
ctx
=
c
.
getContext
(
'2d'
);
img
.
onload
=
function
(){
//use getContext to use the canvas for drawing
var
resizeImg
=
resizeResourceThumbnail
(
img
,
c
.
width
,
c
.
height
);
var
ctx
=
c
.
getContext
(
'2d'
);
ctx
.
drawImage
(
img
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
img
.
onload
=
function
(){
$
(
"#loadingIcon"
+
id
).
fadeOut
(
'slow'
,
function
()
{
var
resizeImg
=
resizeResourceThumbnail
(
img
,
c
.
width
,
c
.
height
);
$
(
'#content-thumbnail'
+
id
).
fadeIn
(
'slow'
);
ctx
.
drawImage
(
img
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
0
,
resizeImg
[
0
],
resizeImg
[
1
]);
});
$
(
"#loadingIcon"
+
id
).
fadeOut
(
'slow'
,
function
()
{
};
$
(
'#content-thumbnail'
+
id
).
fadeIn
(
'slow'
);
};
});
};
//Search Function
};
function
searchEventButtonFunction
(){
//Search Function
var
fromPage
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
function
searchEventButtonFunction
(){
var
toPage
=
returnNumberDispRecordForList
();
var
sortType
=
DEFAULT_SORT_TYPE
;
var
fromPage
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
var
sortOrder
=
DEFAULT_SORT_ORDER
;
var
toPage
=
returnNumberDispRecordForList
();
var
searchText
=
$
(
'#txtSearch'
).
val
();
var
sortType
=
DEFAULT_SORT_TYPE
;
var
searchDivision
;
var
sortOrder
=
DEFAULT_SORT_ORDER
;
var
content
=
$
(
'#main-content'
).
attr
(
'checked'
);
var
searchText
=
$
(
'#txtSearch'
).
val
();
var
tag
=
$
(
'#main-tag'
).
attr
(
'checked'
);
var
searchDivision
;
var
body
=
$
(
'#main-body'
).
attr
(
'checked'
);
var
content
=
$
(
'#main-content'
).
attr
(
'checked'
);
var
tag
=
$
(
'#main-tag'
).
attr
(
'checked'
);
var
body
=
$
(
'#main-body'
).
attr
(
'checked'
);
if
(
content
==
'checked'
)
{
searchDivision
=
$
(
'#searchbox-content'
).
val
();
if
(
content
==
'checked'
)
}
{
if
(
tag
==
'checked'
)
searchDivision
=
$
(
'#searchbox-content'
).
val
();
{
}
searchDivision
=
$
(
'#searchbox-tag'
).
val
();
if
(
tag
==
'checked'
)
}
{
if
(
body
==
'checked'
)
searchDivision
=
$
(
'#searchbox-tag'
).
val
();
{
}
searchDivision
=
$
(
'#searchbox-body'
).
val
();
if
(
body
==
'checked'
)
}
{
searchDivision
=
$
(
'#searchbox-body'
).
val
();
var
genreId
=
ClientData
.
searchCond_genreId
();
}
var
groupId
=
ClientData
.
searchCond_groupId
();
var
sid
=
ClientData
.
userInfo_sid
();
var
genreId
=
ClientData
.
searchCond_genreId
();
ClientData
.
searchCond_sortOrder
(
sortOrder
);
var
groupId
=
ClientData
.
searchCond_groupId
();
ClientData
.
searchCond_sortType
(
sortType
);
var
sid
=
ClientData
.
userInfo_sid
();
ClientData
.
searchCond_searchText
(
searchText
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
ClientData
.
searchCond_searchDivision
(
searchDivision
);
ClientData
.
searchCond_sortType
(
sortType
);
//refresh grid
ClientData
.
searchCond_searchText
(
searchText
);
refreshGrid
();
ClientData
.
searchCond_searchDivision
(
searchDivision
);
//refresh grid
//Handle display sort
refreshGrid
();
handleSortDisp
();
//Handle display sort
handleSortDisp
();
if
(
searchText
==
''
||
searchText
==
null
){
displayResultNoRecord
();
chkSearchTextEmpty
=
true
;
if
(
searchText
==
''
||
searchText
==
null
){
noRecordFlg
=
true
;
displayResultNoRecord
();
reRenderPageNumber
(
0
,
0
);
chkSearchTextEmpty
=
true
;
}
noRecordFlg
=
true
;
else
{
reRenderPageNumber
(
0
,
0
);
$
(
'#msgSearchNotExist'
).
hide
();
}
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
else
{
//Render Gridview
$
(
'#msgSearchNotExist'
).
hide
();
chkSearchTextEmpty
=
false
;
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
renderContent
(
sid
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
fromPage
,
toPage
,
genreId
,
groupId
);
//Render Gridview
//$('#control-nextrecord').css('visibility','visible');
chkSearchTextEmpty
=
false
;
}
renderContent
(
sid
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
fromPage
,
toPage
,
genreId
,
groupId
);
};
//$('#control-nextrecord').css('visibility','visible');
}
//Render User view date
};
function
renderViewDate
(
id
){
//Render User view date
for
(
var
i
=
0
;
i
<
ClientData
.
ReadingContentIds
().
length
;
i
++
){
function
renderViewDate
(
id
){
if
(
ClientData
.
ReadingContentIds
()[
i
].
contentid
==
id
){
return
ClientData
.
ReadingContentIds
()[
i
].
viewdate
;
for
(
var
i
=
0
;
i
<
ClientData
.
ReadingContentIds
().
length
;
i
++
){
}
if
(
ClientData
.
ReadingContentIds
()[
i
].
contentid
==
id
){
}
return
ClientData
.
ReadingContentIds
()[
i
].
viewdate
;
};
}
}
//set resource version data
};
function
setResourceVersionData
(
conId
){
var
tempResourceArr
;
//set resource version data
var
tempResource
;
function
setResourceVersionData
(
conId
){
//check if insert new or edit
var
tempResourceArr
;
var
flag
=
false
;
var
tempResource
;
//check if insert new or edit
if
(
ClientData
.
ResourceVersion
().
length
<=
0
||
ClientData
.
ResourceVersion
()
==
null
||
ClientData
.
ResourceVersion
()
==
'undefined'
){
var
flag
=
false
;
tempResourceArr
=
[];
}
if
(
ClientData
.
ResourceVersion
().
length
<=
0
||
ClientData
.
ResourceVersion
()
==
null
||
ClientData
.
ResourceVersion
()
==
'undefined'
){
else
{
tempResourceArr
=
[];
tempResourceArr
=
ClientData
.
ResourceVersion
();
}
}
else
{
tempResourceArr
=
ClientData
.
ResourceVersion
();
for
(
var
i
=
0
;
i
<
resourceVersionArr
.
length
;
i
++
){
}
if
(
resourceVersionArr
[
i
].
contentid
==
conId
){
tempResource
=
resourceVersionArr
[
i
].
resourceversion
;
for
(
var
i
=
0
;
i
<
resourceVersionArr
.
length
;
i
++
){
break
;
if
(
resourceVersionArr
[
i
].
contentid
==
conId
){
}
tempResource
=
resourceVersionArr
[
i
].
resourceversion
;
}
break
;
}
if
(
tempResourceArr
.
length
>
0
){
}
for
(
var
j
=
0
;
j
<
tempResourceArr
.
length
;
j
++
){
if
(
tempResourceArr
[
j
].
contentid
==
conId
){
if
(
tempResourceArr
.
length
>
0
){
tempResourceArr
[
j
].
resourceversion
=
tempResource
;
for
(
var
j
=
0
;
j
<
tempResourceArr
.
length
;
j
++
){
flag
=
true
;
if
(
tempResourceArr
[
j
].
contentid
==
conId
){
break
;
tempResourceArr
[
j
].
resourceversion
=
tempResource
;
}
flag
=
true
;
else
{
break
;
flag
=
false
;
}
}
else
{
}
flag
=
false
;
}
if
(
!
flag
){
}
tempResourceArr
.
push
({
contentid
:
conId
,
resourceversion
:
tempResource
});
}
if
(
!
flag
){
tempResourceArr
.
push
({
contentid
:
conId
,
resourceversion
:
tempResource
});
}
else
{
}
tempResourceArr
.
push
({
contentid
:
conId
,
resourceversion
:
tempResource
});
}
}
else
{
tempResourceArr
.
push
({
contentid
:
conId
,
resourceversion
:
tempResource
});
ClientData
.
ResourceVersion
(
tempResourceArr
);
}
};
ClientData
.
ResourceVersion
(
tempResourceArr
);
//set meta Version Data
};
function
setMetaVersionData
(
conId
){
//set meta Version Data
var
tempMetaArr
;
function
setMetaVersionData
(
conId
){
var
tempMeta
;
//check if insert new or edit
var
tempMetaArr
;
var
flag
=
false
;
var
tempMeta
;
//check if insert new or edit
if
(
ClientData
.
MetaVersion
().
length
<=
0
||
ClientData
.
MetaVersion
()
==
null
||
ClientData
.
MetaVersion
()
==
'undefined'
){
var
flag
=
false
;
tempMetaArr
=
[];
}
if
(
ClientData
.
MetaVersion
().
length
<=
0
||
ClientData
.
MetaVersion
()
==
null
||
ClientData
.
MetaVersion
()
==
'undefined'
){
else
{
tempMetaArr
=
[];
tempMetaArr
=
ClientData
.
MetaVersion
();
}
}
else
{
tempMetaArr
=
ClientData
.
MetaVersion
();
for
(
var
i
=
0
;
i
<
metaVersionArr
.
length
;
i
++
){
}
if
(
metaVersionArr
[
i
].
contentid
==
conId
){
tempMeta
=
metaVersionArr
[
i
].
metaversion
;
for
(
var
i
=
0
;
i
<
metaVersionArr
.
length
;
i
++
){
break
;
if
(
metaVersionArr
[
i
].
contentid
==
conId
){
}
tempMeta
=
metaVersionArr
[
i
].
metaversion
;
}
break
;
}
if
(
tempMetaArr
.
length
>
0
){
}
for
(
var
j
=
0
;
j
<
tempMetaArr
.
length
;
j
++
){
if
(
tempMetaArr
[
j
].
contentid
==
conId
){
if
(
tempMetaArr
.
length
>
0
){
tempMetaArr
[
j
].
metaversion
=
tempMeta
;
for
(
var
j
=
0
;
j
<
tempMetaArr
.
length
;
j
++
){
flag
=
true
;
if
(
tempMetaArr
[
j
].
contentid
==
conId
){
break
;
tempMetaArr
[
j
].
metaversion
=
tempMeta
;
}
flag
=
true
;
else
{
break
;
flag
=
false
;
}
}
else
{
}
flag
=
false
;
}
if
(
!
flag
){
}
tempMetaArr
.
push
({
contentid
:
conId
,
metaversion
:
tempMeta
});
}
if
(
!
flag
){
tempMetaArr
.
push
({
contentid
:
conId
,
metaversion
:
tempMeta
});
}
else
{
}
tempMetaArr
.
push
({
contentid
:
conId
,
metaversion
:
tempMeta
});
}
}
else
{
tempMetaArr
.
push
({
contentid
:
conId
,
metaversion
:
tempMeta
});
ClientData
.
MetaVersion
(
tempMetaArr
);
}
};
ClientData
.
MetaVersion
(
tempMetaArr
);
//handle display sort direction
};
function
handleSortDisp
(){
$
(
'#control-sort-title'
).
removeClass
(
'active_tops'
);
//handle display sort direction
$
(
'#control-sort-titlekana'
).
removeClass
(
'active_tops'
);
function
handleSortDisp
(){
$
(
'#control-sort-releasedate'
).
removeClass
(
'active_tops'
);
$
(
'#control-sort-title'
).
removeClass
(
'active_tops'
);
$
(
'#control-sort-titlekana'
).
removeClass
(
'active_tops'
);
var
typeSort
;
$
(
'#control-sort-releasedate'
).
removeClass
(
'active_tops'
);
var
orderSort
;
var
typeSort
;
if
(
ClientData
.
searchCond_sortType
()
==
null
||
ClientData
.
searchCond_sortType
()
==
'undefined'
||
ClientData
.
searchCond_sortType
()
==
''
){
var
orderSort
;
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
if
(
ClientData
.
searchCond_sortType
()
==
null
||
ClientData
.
searchCond_sortType
()
==
'undefined'
||
ClientData
.
searchCond_sortType
()
==
''
){
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
}
$
(
'#titlekana-sorttype'
).
html
(
''
);
else
{
$
(
'#rDate-sorttype'
).
html
(
''
);
if
(
ClientData
.
searchCond_sortOrder
()
!=
null
&&
ClientData
.
searchCond_sortOrder
()
!=
'undefined'
||
ClientData
.
searchCond_sortType
()
!=
''
){
}
typeSort
=
ClientData
.
searchCond_sortType
();
else
{
orderSort
=
ClientData
.
searchCond_sortOrder
();
if
(
ClientData
.
searchCond_sortOrder
()
!=
null
&&
ClientData
.
searchCond_sortOrder
()
!=
'undefined'
||
ClientData
.
searchCond_sortType
()
!=
''
){
typeSort
=
ClientData
.
searchCond_sortType
();
if
(
typeSort
==
1
){
orderSort
=
ClientData
.
searchCond_sortOrder
();
if
(
orderSort
==
Consts
.
ConstOrderSetting_Asc
){
$
(
'#title-sorttype'
).
html
(
''
);
if
(
typeSort
==
1
){
$
(
'#title-sorttype'
).
html
(
'▲'
);
if
(
orderSort
==
Consts
.
ConstOrderSetting_Asc
){
$
(
'#title-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
'▲'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
css
(
'width'
,
'12px'
);
}
$
(
'#titlekana-sorttype'
).
html
(
''
);
else
{
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
}
$
(
'#title-sorttype'
).
html
(
'▼'
);
else
{
$
(
'#title-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
'▼'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
css
(
'width'
,
'12px'
);
}
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#control-sort-title'
).
addClass
(
'active_tops'
);
}
}
else
if
(
typeSort
==
2
){
$
(
'#control-sort-title'
).
addClass
(
'active_tops'
);
}
if
(
orderSort
==
Consts
.
ConstOrderSetting_Asc
){
else
if
(
typeSort
==
2
){
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
if
(
orderSort
==
Consts
.
ConstOrderSetting_Asc
){
$
(
'#titlekana-sorttype'
).
html
(
'▲'
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
'▲'
);
}
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
else
{
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
}
$
(
'#titlekana-sorttype'
).
html
(
''
);
else
{
$
(
'#titlekana-sorttype'
).
html
(
'▼'
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
'▼'
);
}
$
(
'#titlekana-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#control-sort-titlekana'
).
addClass
(
'active_tops'
);
}
}
else
if
(
typeSort
==
3
){
$
(
'#control-sort-titlekana'
).
addClass
(
'active_tops'
);
if
(
orderSort
==
Consts
.
ConstOrderSetting_Asc
){
}
$
(
'#title-sorttype'
).
html
(
''
);
else
if
(
typeSort
==
3
){
$
(
'#titlekana-sorttype'
).
html
(
''
);
if
(
orderSort
==
Consts
.
ConstOrderSetting_Asc
){
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
'▲'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
}
$
(
'#rDate-sorttype'
).
html
(
'▲'
);
else
{
$
(
'#rDate-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#title-sorttype'
).
html
(
''
);
}
$
(
'#titlekana-sorttype'
).
html
(
''
);
else
{
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
'▼'
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#rDate-sorttype'
).
html
(
''
);
}
$
(
'#rDate-sorttype'
).
html
(
'▼'
);
$
(
'#rDate-sorttype'
).
css
(
'width'
,
'12px'
);
$
(
'#control-sort-releasedate'
).
addClass
(
'active_tops'
);
}
}
}
$
(
'#control-sort-releasedate'
).
addClass
(
'active_tops'
);
}
}
};
}
}
//convert delivery Date
};
function
formatDeliveryDate
(
date
){
//convert delivery Date
var
day
=
date
.
date
;
function
formatDeliveryDate
(
date
){
var
month
=
eval
(
date
.
month
)
+
1
;
var
year
=
eval
(
date
.
year
)
+
1900
;
var
day
=
date
.
date
;
var
month
=
eval
(
date
.
month
)
+
1
;
var
outputDate
=
year
+
'/'
+
((
''
+
month
).
length
<
2
?
'0'
:
''
)
+
month
+
'/'
+
((
''
+
day
).
length
<
2
?
'0'
:
''
)
+
day
;
var
year
=
eval
(
date
.
year
)
+
1900
;
return
outputDate
;
var
outputDate
=
year
+
'/'
+
((
''
+
month
).
length
<
2
?
'0'
:
''
)
+
month
+
'/'
+
((
''
+
day
).
length
<
2
?
'0'
:
''
)
+
day
;
};
return
outputDate
;
//convert view Date
};
function
formatNormalDate
(
day
,
month
,
year
){
var
outputDate
=
year
+
'/'
+
((
''
+
month
).
length
<
2
?
'0'
:
''
)
+
month
+
'/'
+
((
''
+
day
).
length
<
2
?
'0'
:
''
)
+
day
;
//convert view Date
function
formatNormalDate
(
day
,
month
,
year
){
return
outputDate
;
var
outputDate
=
year
+
'/'
+
((
''
+
month
).
length
<
2
?
'0'
:
''
)
+
month
+
'/'
+
((
''
+
day
).
length
<
2
?
'0'
:
''
)
+
day
;
};
return
outputDate
;
//format Image string
};
function
formatStringBase64
(
imgStr
){
//format Image string
var
outputString
=
'data:image/jpeg;base64,'
+
imgStr
;
function
formatStringBase64
(
imgStr
){
return
outputString
;
var
outputString
=
'data:image/jpeg;base64,'
+
imgStr
;
};
return
outputString
;
//function Open SubMenu Dialog
};
function
titleClickFunction
(
e
){
if
(
e
)
{
//function Open SubMenu Dialog
e
.
preventDefault
();
function
titleClickFunction
(
e
){
}
if
(
e
)
{
if
(
home_isMove
==
true
)
{
e
.
preventDefault
();
home_isMove
=
false
;
}
return
;
if
(
home_isMove
==
true
)
{
}
home_isMove
=
false
;
var
checkflag
=
false
;
return
;
var
contentid
=
$
(
this
).
attr
(
'contentid'
);
}
// Get image of selected image
var
checkflag
=
false
;
var
base64String
=
returnThumbnail
(
contentid
);
var
contentid
=
$
(
this
).
attr
(
'contentid'
);
ClientData
.
contentInfo_contentThumbnail
(
base64String
);
// Get image of selected image
ClientData
.
contentInfo_contentId
(
contentid
);
var
base64String
=
returnThumbnail
(
contentid
);
ClientData
.
contentInfo_contentThumbnail
(
base64String
);
//Store Content id that user has read
ClientData
.
contentInfo_contentId
(
contentid
);
if
(
ClientData
.
ReadingContentIds
().
length
>
0
){
contentIdArray
=
ClientData
.
ReadingContentIds
();
//Store Content id that user has read
if
(
ClientData
.
ReadingContentIds
().
length
>
0
){
for
(
var
nIndex
=
0
;
nIndex
<
contentIdArray
.
length
;
nIndex
++
){
contentIdArray
=
ClientData
.
ReadingContentIds
();
if
(
contentIdArray
[
nIndex
].
contentid
==
contentid
){
checkflag
=
true
;
for
(
var
nIndex
=
0
;
nIndex
<
contentIdArray
.
length
;
nIndex
++
){
break
;
if
(
contentIdArray
[
nIndex
].
contentid
==
contentid
){
}
checkflag
=
true
;
else
{
break
;
checkflag
=
false
;
}
}
else
{
}
checkflag
=
false
;
}
if
(
!
checkflag
){
}
contentIdArray
.
push
({
contentid
:
contentid
,
viewdate
:
''
,
originviewdate
:
''
});
}
if
(
!
checkflag
){
}
contentIdArray
.
push
({
contentid
:
contentid
,
viewdate
:
''
,
originviewdate
:
''
});
else
{
}
contentIdArray
.
push
({
contentid
:
contentid
,
viewdate
:
''
,
originviewdate
:
''
});
}
}
else
{
contentIdArray
.
push
({
contentid
:
contentid
,
viewdate
:
''
,
originviewdate
:
''
});
//Renew ReadingContentID
}
var
newArray
=
[];
ClientData
.
ReadingContentIds
(
newArray
);
//Renew ReadingContentID
var
newArray
=
[];
//Set data for readingcontentid
ClientData
.
ReadingContentIds
(
newArray
);
ClientData
.
ReadingContentIds
(
contentIdArray
);
//Set data for readingcontentid
//Set ResouceVersion for content
ClientData
.
ReadingContentIds
(
contentIdArray
);
setResourceVersionData
(
contentid
);
//Set ResouceVersion for content
//Set MetaVersion for content
setResourceVersionData
(
contentid
);
setMetaVersionData
(
contentid
);
//Set MetaVersion for content
//Close Submenu
setMetaVersionData
(
contentid
);
$
(
'#dlgSubMenu'
).
hide
();
//Close Submenu
//Delete 'new' icon
$
(
'#dlgSubMenu'
).
hide
();
drawEditImage
(
contentid
);
//Delete 'new' icon
//Open content Detail
drawEditImage
(
contentid
);
openContentDetail
();
};
//Open content Detail
openContentDetail
();
//Get Number Disp Record For List
};
function
returnNumberDispRecordForList
()
{
var
toPage
=
0
;
//Get Number Disp Record For List
var
sysSettings
=
avwSysSetting
();
function
returnNumberDispRecordForList
()
{
toPage
=
sysSettings
.
bookListCount
;
var
toPage
=
0
;
return
toPage
;
var
sysSettings
=
avwSysSetting
();
};
toPage
=
sysSettings
.
bookListCount
;
return
toPage
;
//Get number record disp next for list
};
function
getNextRecordNumForList
(){
iNumberOfNextRecord
=
returnNumberDispRecordForList
();
//Get number record disp next for list
};
function
getNextRecordNumForList
(){
iNumberOfNextRecord
=
returnNumberDispRecordForList
();
//refresh sort order
};
function
refreshSortTypeOrder
(){
$
(
'#title-sorttype'
).
html
(
''
);
//refresh sort order
$
(
'#titlekana-sorttype'
).
html
(
''
);
function
refreshSortTypeOrder
(){
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#title-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#titlekana-sorttype'
).
html
(
''
);
};
$
(
'#rDate-sorttype'
).
html
(
''
);
$
(
'#rDate-sorttype'
).
html
(
''
);
//refresh GridView
};
function
refreshGrid
(){
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
//refresh GridView
$
(
'#content-grid'
).
html
(
''
);
function
refreshGrid
(){
$
(
'.pageNumControl'
).
css
(
'visibility'
,
'hidden'
);
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
};
$
(
'#content-grid'
).
html
(
''
);
$
(
'.pageNumControl'
).
css
(
'visibility'
,
'hidden'
);
//format text display more record
};
function
formatDisplayMoreRecord
(){
i18nReplaceText
();
//format text display more record
//changeLanguage(ClientData.userInfo_language());
function
formatDisplayMoreRecord
(){
$
(
'#control-nextrecord'
).
html
(
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForList
()));
i18nReplaceText
();
//changeLanguage(ClientData.userInfo_language());
};
$
(
'#control-nextrecord'
).
html
(
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForList
()));
function
changeLanguageCallBackFunction
(){
};
handleLanguage
();
formatDisplayMoreRecord
();
function
changeLanguageCallBackFunction
(){
handleLanguage
();
if
(
chkSearchTextEmpty
){
formatDisplayMoreRecord
();
displayResultNoRecord
();
}
else
{
if
(
chkSearchTextEmpty
){
displayResultNoRecord
();
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'visible'
);
}
else
{
enableSort
();
}
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'visible'
);
enableSort
();
document
.
title
=
i18nText
(
'txtSearchResult'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
}
};
document
.
title
=
i18nText
(
'txtSearchResult'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
function
displayResultNoRecord
(){
};
i18nReplaceText
();
//$('#content-grid').html(i18nText('msgSearchNotExist'));
function
displayResultNoRecord
(){
//$('#content-grid').css({ 'text-align': 'left', 'margin-top': '20px', 'clear': 'both' });
i18nReplaceText
();
$
(
'#content-grid'
).
html
(
''
);
//$('#content-grid').html(i18nText('msgSearchNotExist'));
$
(
'#msgSearchNotExist'
).
show
();
//$('#content-grid').css({ 'text-align': 'left', 'margin-top': '20px', 'clear': 'both' });
$
(
'#msgSearchNotExist'
).
css
({
'text-align'
:
'left'
,
'margin-top'
:
'20px'
,
'clear'
:
'both'
});
$
(
'#content-grid'
).
html
(
''
);
$
(
'#msgSearchNotExist'
).
show
();
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
$
(
'#msgSearchNotExist'
).
css
({
'text-align'
:
'left'
,
'margin-top'
:
'20px'
,
'clear'
:
'both'
});
$
(
'.control_sort_on'
).
hide
();
$
(
'.control_sort_off'
).
show
();
$
(
'#control-nextrecord'
).
css
(
'visibility'
,
'hidden'
);
if
(
getCurrentLanguage
()
==
Consts
.
ConstLanguage_En
||
getCurrentLanguage
()
==
Consts
.
ConstLanguage_Ko
){
$
(
'.control_sort_on'
).
hide
();
$
(
'#label-sort-titlekana'
).
hide
();
$
(
'.control_sort_off'
).
show
();
$
(
'#separate'
).
hide
();
if
(
getCurrentLanguage
()
==
Consts
.
ConstLanguage_En
||
getCurrentLanguage
()
==
Consts
.
ConstLanguage_Ko
){
}
$
(
'#label-sort-titlekana'
).
hide
();
};
$
(
'#separate'
).
hide
();
}
function
enableSort
(){
};
$
(
'.control_sort_on'
).
show
();
$
(
'.control_sort_off'
).
hide
();
function
enableSort
(){
if
(
getCurrentLanguage
()
==
Consts
.
ConstLanguage_En
||
getCurrentLanguage
()
==
Consts
.
ConstLanguage_Ko
){
$
(
'.control_sort_on'
).
show
();
$
(
'#control-sort-titlekana'
).
hide
();
$
(
'.control_sort_off'
).
hide
();
$
(
'#separate'
).
hide
();
if
(
getCurrentLanguage
()
==
Consts
.
ConstLanguage_En
||
getCurrentLanguage
()
==
Consts
.
ConstLanguage_Ko
){
}
$
(
'#control-sort-titlekana'
).
hide
();
};
$
(
'#separate'
).
hide
();
}
function
truncate
(
strInput
,
length
){
};
if
(
strInput
.
length
<=
length
)
{
function
truncate
(
strInput
,
length
){
return
strInput
;
if
(
strInput
.
length
<=
length
)
}
{
else
return
strInput
;
{
}
return
strInput
.
substring
(
0
,
length
)
+
"..."
;
else
}
{
};
return
strInput
.
substring
(
0
,
length
)
+
"..."
;
}
function
resizeResourceThumbnail
(
mg
,
width
,
height
)
{
};
var
newWidth
;
var
newHeight
;
function
resizeResourceThumbnail
(
mg
,
width
,
height
)
{
if
(
mg
.
width
>
mg
.
height
)
{
var
newWidth
;
newWidth
=
width
;
var
newHeight
;
newHeight
=
(
mg
.
height
*
width
)
/
mg
.
width
;
if
(
mg
.
width
>
mg
.
height
)
{
}
newWidth
=
width
;
else
{
newHeight
=
(
mg
.
height
*
width
)
/
mg
.
width
;
}
newHeight
=
height
;
else
{
newWidth
=
(
mg
.
width
*
height
)
/
mg
.
height
;
}
newHeight
=
height
;
var
result
=
[
newWidth
,
newHeight
];
newWidth
=
(
mg
.
width
*
height
)
/
mg
.
height
;
return
result
;
}
var
result
=
[
newWidth
,
newHeight
];
};
return
result
;
function
removeHoverCss
(){
};
if
(
isTouchDevice
()){
function
removeHoverCss
(){
$
(
'#control-sort-title'
).
removeClass
(
'nottouchdevice'
);
$
(
'#control-sort-titlekana'
).
removeClass
(
'nottouchdevice'
);
if
(
isTouchDevice
()){
$
(
'#control-sort-releasedate'
).
removeClass
(
'nottouchdevice'
);
$
(
'#control-sort-title'
).
removeClass
(
'nottouchdevice'
);
}
$
(
'#control-sort-titlekana'
).
removeClass
(
'nottouchdevice'
);
$
(
'#control-sort-releasedate'
).
removeClass
(
'nottouchdevice'
);
}
};
};
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment