Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
ecedf927
Commit
ecedf927
authored
May 30, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update version
Make custom columns visible (#904)
parent
d106ada9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
17 deletions
+30
-17
caliBlur.min.css
cps/static/css/caliBlur.min.css
+1
-1
caliBlur.js
cps/static/js/caliBlur.js
+24
-9
detail.html
cps/templates/detail.html
+4
-6
updater.py
cps/updater.py
+1
-1
No files found.
cps/static/css/caliBlur.min.css
View file @
ecedf927
This diff is collapsed.
Click to expand it.
cps/static/js/caliBlur.js
View file @
ecedf927
...
@@ -58,8 +58,8 @@ $( 'a.navbar-brand' ).clone().appendTo( '.home-btn' ).empty().removeClass('navba
...
@@ -58,8 +58,8 @@ $( 'a.navbar-brand' ).clone().appendTo( '.home-btn' ).empty().removeClass('navba
if
(
$
(
'body.book'
).
length
>
0
)
{
if
(
$
(
'body.book'
).
length
>
0
)
{
description
=
$
(
'.comments'
);
description
=
$
(
'.comments'
);
bookInfo
=
$
(
'.author'
).
nextUntil
(
'h3:contains("Description")'
);
bookInfo
=
$
(
".author"
).
nextUntil
(
"#decription"
);
$
(
'h3:contains("Description")'
).
detach
();
$
(
"#decription"
).
detach
();
$
(
'.comments'
).
detach
();
$
(
'.comments'
).
detach
();
$
(
bookInfo
).
wrapAll
(
'<div class="bookinfo"></div>'
);
$
(
bookInfo
).
wrapAll
(
'<div class="bookinfo"></div>'
);
// $( 'h3:contains("Description:")' ).after( '<div class="description"></div>' );
// $( 'h3:contains("Description:")' ).after( '<div class="description"></div>' );
...
@@ -145,14 +145,29 @@ if ( $( 'body.book' ).length > 0 ) {
...
@@ -145,14 +145,29 @@ if ( $( 'body.book' ).length > 0 ) {
.
prepend
(
'<div><img class="bg-blur" src="'
+
cover
+
'"></div>'
);
.
prepend
(
'<div><img class="bg-blur" src="'
+
cover
+
'"></div>'
);
// Fix-up book detail headings
// Fix-up book detail headings
publisher
=
$
(
'.publishers p span'
).
text
().
split
(
':'
);
publisher
=
$
(
'.publishers p span'
).
text
().
split
(
':'
);
$
(
'.publishers p span'
).
remove
();
$
(
'.publishers p span'
).
remove
();
$
.
each
(
publisher
,
function
(
i
,
val
)
{
$
.
each
(
publisher
,
function
(
i
,
val
)
{
$
(
'.publishers'
).
append
(
'<span>'
+
publisher
[
i
]
+
'</span>'
);
$
(
'.publishers'
).
append
(
'<span>'
+
publisher
[
i
]
+
'</span>'
);
});
});
$
(
'.publishers span:nth-child(3)'
).
text
(
function
()
{
$
(
'.publishers span:nth-child(3)'
).
text
(
function
()
{
return
$
(
this
).
text
().
replace
(
/^
\s
+|^
\t
+|
\t
+|
\s
+$/g
,
""
);
return
$
(
this
).
text
().
replace
(
/^
\s
+|^
\t
+|
\t
+|
\s
+$/g
,
""
);
});
});
// Fix-up book custom colums headings
// real_custom_column = $( '.real_custom_columns' ).text().split( ':' );
real_custom_column
=
$
(
'.real_custom_columns'
);
// $( '.real_custom_columns' ).remove();
$
.
each
(
real_custom_column
,
function
(
i
,
val
)
{
real_cc
=
$
(
this
).
text
().
split
(
':'
);
$
(
this
).
text
(
""
);
if
(
real_cc
.
length
>
1
)
{
$
(
this
).
append
(
'<span>'
+
real_cc
[
0
]
+
'</span><span>'
+
real_cc
[
1
]
+
'</span>'
);
}
});
//$( '.real_custom_columns:nth-child(3)' ).text(function() {
//return $(this).text().replace(/^\s+|^\t+|\t+|\s+$/g, "");
//});
published
=
$
(
'.publishing-date p'
)
published
=
$
(
'.publishing-date p'
)
.
text
().
split
(
': '
);
.
text
().
split
(
': '
);
...
...
cps/templates/detail.html
View file @
ecedf927
...
@@ -150,9 +150,9 @@
...
@@ -150,9 +150,9 @@
{% endif %}
{% endif %}
{% if cc|length > 0 %}
{% if cc|length > 0 %}
<div
class=
"custom_columns"
>
<p>
{% for c in cc %}
{% for c in cc %}
<div
class=
"real_custom_columns"
>
{% if entry['custom_column_' ~ c.id]|length > 0 %}
{% if entry['custom_column_' ~ c.id]|length > 0 %}
{{ c.name }}:
{{ c.name }}:
{% for column in entry['custom_column_' ~ c.id] %}
{% for column in entry['custom_column_' ~ c.id] %}
...
@@ -170,11 +170,9 @@
...
@@ -170,11 +170,9 @@
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
<br
/>
{% endif %}
{% endif %}
{% endfor %}
</p>
</div>
</div>
{% endfor %}
{% endif %}
{% endif %}
{% if not g.user.is_anonymous %}
{% if not g.user.is_anonymous %}
...
@@ -193,7 +191,7 @@
...
@@ -193,7 +191,7 @@
{% if entry.comments|length > 0 and entry.comments[0].text|length > 0%}
{% if entry.comments|length > 0 and entry.comments[0].text|length > 0%}
<div
class=
"comments"
>
<div
class=
"comments"
>
<h3>
{{_('Description:')}}
</h3>
<h3
id=
"decription"
>
{{_('Description:')}}
</h3>
{{entry.comments[0].text|safe}}
{{entry.comments[0].text|safe}}
</div>
</div>
{% endif %}
{% endif %}
...
...
cps/updater.py
View file @
ecedf927
...
@@ -237,7 +237,7 @@ class Updater(threading.Thread):
...
@@ -237,7 +237,7 @@ class Updater(threading.Thread):
return
False
return
False
def
_stable_version_info
(
self
):
def
_stable_version_info
(
self
):
return
{
'version'
:
'0.6.
3
'
}
# Current version
return
{
'version'
:
'0.6.
4 Beta
'
}
# Current version
def
_nightly_available_updates
(
self
,
request_method
):
def
_nightly_available_updates
(
self
,
request_method
):
tz
=
datetime
.
timedelta
(
seconds
=
time
.
timezone
if
(
time
.
localtime
()
.
tm_isdst
==
0
)
else
time
.
altzone
)
tz
=
datetime
.
timedelta
(
seconds
=
time
.
timezone
if
(
time
.
localtime
()
.
tm_isdst
==
0
)
else
time
.
altzone
)
...
...
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