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
c2ed17b5
Commit
c2ed17b5
authored
Jun 03, 2019
by
Ha Jonguk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#33783(コンテンツタイトル表示カスタマイズ) + 詳細画面(コンテンツリスト、コンテンツ検索リスト、閲覧履歴)
parent
0ef45c62
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
7 deletions
+59
-7
abvw/common/js/common.js
+40
-0
abvw/css/layout/list_shirori_detail.css
+7
-7
abvw/js/detail.js
+6
-0
abvw/js/home.js
+6
-0
No files found.
abvw/common/js/common.js
View file @
c2ed17b5
...
...
@@ -3306,3 +3306,43 @@ COMMON.isAuthoringPreview = function() {
}
};
/*
* TECカスタマイズ(2行表示、3点リーダー、font-size設定)
*
*/
COMMON
.
fixTitleToDottedLine
=
function
(
titleEle
,
fontSize
,
height
)
{
// 表示用タイトルのスタイル設定
titleEle
.
css
({
"white-space"
:
"unset"
,
"text-overflow"
:
"unset"
,
"overflow"
:
"hidden"
,
"word-break"
:
"break-all"
,
"height"
:
height
+
"px"
,
"font-size"
:
fontSize
+
"px"
,
});
// コンテンツリストサムネール表示の場合、widthをautoに設定
if
(
titleEle
.
hasClass
(
"content-title"
))
titleEle
.
css
(
"width"
,
"100%"
);
// オリジナルの文章を取得する
var
html
=
titleEle
.
html
();
// 対象の要素を、高さにautoを指定し非表示で複製する
var
cloneEle
=
titleEle
.
clone
();
cloneEle
.
css
({
display
:
'none'
,
position
:
'absolute'
,
overflow
:
'visible'
}).
width
(
titleEle
.
width
()).
height
(
"auto"
);
// 一旦追加
titleEle
.
after
(
cloneEle
);
// 指定した高さになるまで、1文字ずつ消去していく
while
((
html
.
length
>
0
)
&&
(
cloneEle
.
height
()
>
titleEle
.
height
()))
{
html
=
html
.
substr
(
0
,
html
.
length
-
1
);
cloneEle
.
html
(
html
+
'...'
);
}
// 文章を入れ替えて、複製した要素を削除する
titleEle
.
html
(
cloneEle
.
html
());
cloneEle
.
remove
();
}
abvw/css/layout/list_shirori_detail.css
View file @
c2ed17b5
...
...
@@ -55,12 +55,12 @@
.sectiondetail
#book_data
ul
{
list-style
:
none
;
line-height
:
1em
;
/*margin:0 0 0 42px;*/
margin
:
0
0
0
52px
;
padding
:
0
;
}
.sectiondetail
#book_data
ul
li
{
display
:
block
;
margin
:
0
auto
;
text-align
:
center
;
}
.sectiondetail
#book_data
ul
.title
{
margin-bottom
:
19px
;
...
...
@@ -197,13 +197,13 @@
text-align
:
center
;
}
.sectiondetailnopdf
#book_data
ul
.date
{
margin
-bottom
:
20px
;
margin-left
:
10px
;
margin
:
0
auto
32px
auto
;
text-align
:
center
;
}
.sectiondetailnopdf
#book_data
ul
.explain
{
margin-bottom
:
32px
;
margin
:
0
auto
32px
auto
;
text-align
:
center
;
line-height
:
1.3em
;
margin-left
:
10px
;
}
.sectiondetailnopdf
#book_data
.read_btn
a
.read
{
...
...
@@ -212,7 +212,6 @@
border-radius
:
6px
;
display
:
inline-block
;
padding
:
2px
27px
;
margin-left
:
45px
;
text-decoration
:
none
;
}
.sectiondetailnopdf
#book_data
.read_btn
a
.read
:hover
{
...
...
@@ -468,4 +467,5 @@
.sectiondetailnopdf
#book_list
ul
+
ul
{
border-top
:
1px
dotted
#CCC
;
}
.sectiondetailnopdf
#book_data
.read_btn
{
/*margin:30px 0 0 80px;*/
text-align
:
center
;
}
abvw/js/detail.js
View file @
c2ed17b5
...
...
@@ -285,6 +285,9 @@ DETAIL.showContentNotPDF = function(displayData) {
};
imgTemp
.
src
=
displayData
.
contentThumbnail
;
// TECカスタマイズ(2行表示、3点リーダー、font-size設定)
COMMON
.
fixTitleToDottedLine
(
$
(
'#txtContentTitle'
),
11
,
30
);
};
//End Function : No.12 -- Editor : Viet Nguyen -- Date : 08/01/2013 -- Summary : Create new function to return content type of content.
...
...
@@ -336,6 +339,9 @@ DETAIL.showContent = function(displayData) {
//insertRow(imgSample, pages[nIndex].pageText, pages[nIndex].pageNo);
DETAIL
.
insertRow
(
displayData
.
pages
[
nIndex
].
pageThumbnail
,
COMMON
.
truncate
(
COMMON
.
getLines
(
displayData
.
pages
[
nIndex
].
pageText
,
3
),
45
),
displayData
.
pages
[
nIndex
].
pageNo
);
//55
}
// TECカスタマイズ(2行表示、3点リーダー、font-size設定)
COMMON
.
fixTitleToDottedLine
(
$
(
'#txtContentTitle'
),
11
,
30
);
};
DETAIL
.
insertRow
=
function
(
pageThumbnail
,
pageText
,
pageNo
)
{
...
...
abvw/js/home.js
View file @
c2ed17b5
...
...
@@ -1692,6 +1692,12 @@ HOME.renderContent = function(id, text, division, type, order, offset, limit, ca
// I18N.changeLanguage(ClientData.userInfo_language());
I18N
.
i18nReplaceText
();
// TECカスタマイズ(2行表示、3点リーダー、font-sizeを設定)
var
className
=
HOME
.
isShowBookShelf
?
".content-title:visible"
:
".content-list:visible"
;
$
(
className
).
each
(
function
()
{
COMMON
.
fixTitleToDottedLine
(
$
(
this
),
11
,
24
);
});
});
};
...
...
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