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
254e1f52
Commit
254e1f52
authored
Jul 08, 2017
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'button_padding/simplify-read-code'
# Conflicts: # cps/static/css/style.css
parents
15531324
4fe1536b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
28 deletions
+12
-28
style.css
cps/static/css/style.css
+3
-3
detail.html
cps/templates/detail.html
+9
-25
No files found.
cps/static/css/style.css
View file @
254e1f52
...
@@ -21,8 +21,7 @@ a{color: #45b29d}a:hover{color: #444;}
...
@@ -21,8 +21,7 @@ a{color: #45b29d}a:hover{color: #444;}
.container-fluid
.book
.meta
.author
{
font-size
:
12px
;
color
:
#999
}
.container-fluid
.book
.meta
.author
{
font-size
:
12px
;
color
:
#999
}
.container-fluid
.book
.meta
.rating
{
margin-top
:
5px
}
.rating
.glyphicon-star
{
color
:
#999
}
.rating
.glyphicon-star.good
{
color
:
#45b29d
}
.container-fluid
.book
.meta
.rating
{
margin-top
:
5px
}
.rating
.glyphicon-star
{
color
:
#999
}
.rating
.glyphicon-star.good
{
color
:
#45b29d
}
.navbar-brand
{
font-family
:
'Grand Hotel'
,
cursive
;
font-size
:
35px
;
color
:
#45b29d
!important
;}
.navbar-brand
{
font-family
:
'Grand Hotel'
,
cursive
;
font-size
:
35px
;
color
:
#45b29d
!important
;}
.more-stuff
{
margin-top
:
20px
;
padding-top
:
20px
;
border-top
:
1px
solid
#ccc
}
.more-stuff
{
margin-top
:
20px
;
padding-top
:
20px
;
border-top
:
1px
solid
#ccc
}
.more-stuff
>
li
{
margin-bottom
:
10px
;}
.more-stuff
>
li
{
margin-bottom
:
10px
;}
.navbar-collapse.in
.navbar-nav
{
margin
:
0
;}
.navbar-collapse.in
.navbar-nav
{
margin
:
0
;}
span
.glyphicon.glyphicon-tags
{
padding-right
:
5px
;
color
:
#999
;
vertical-align
:
text-top
;}
span
.glyphicon.glyphicon-tags
{
padding-right
:
5px
;
color
:
#999
;
vertical-align
:
text-top
;}
...
@@ -31,6 +30,7 @@ span.glyphicon.glyphicon-tags {padding-right: 5px;color: #999;vertical-align: te
...
@@ -31,6 +30,7 @@ span.glyphicon.glyphicon-tags {padding-right: 5px;color: #999;vertical-align: te
.book-meta
.identifiers
a
{
display
:
inline
;}
.book-meta
.identifiers
a
{
display
:
inline
;}
.container-fluid
.single
.cover
img
{
.container-fluid
.single
.cover
img
{
border
:
1px
solid
#fff
;
border
:
1px
solid
#fff
;
/*border-radius: 7px;*/
box-sizeing
:
border-box
;
box-sizeing
:
border-box
;
-webkit-box-shadow
:
0
5px
8px
-6px
#777
;
-webkit-box-shadow
:
0
5px
8px
-6px
#777
;
-moz-box-shadow
:
0
5px
8px
-6px
#777
;
-moz-box-shadow
:
0
5px
8px
-6px
#777
;
...
@@ -52,4 +52,4 @@ span.glyphicon.glyphicon-tags {padding-right: 5px;color: #999;vertical-align: te
...
@@ -52,4 +52,4 @@ span.glyphicon.glyphicon-tags {padding-right: 5px;color: #999;vertical-align: te
.spinner
{
margin
:
0
41%
;}
.spinner
{
margin
:
0
41%
;}
.spinner2
{
margin
:
0
41%
;}
.spinner2
{
margin
:
0
41%
;}
.block-label
{
display
:
block
;}
cps/templates/detail.html
View file @
254e1f52
...
@@ -160,10 +160,12 @@
...
@@ -160,10 +160,12 @@
{% endif %}
{% endif %}
{% if not g.user.is_anonymous() %}
{% if not g.user.is_anonymous() %}
<p>
<p>
<div
class=
"custom_columns"
id=
"have_read_container"
>
<div
class=
"custom_columns"
>
<form
id=
"have_read_form"
action=
"{{ url_for('toggle_read', book_id=entry.id)}}"
method=
"POST"
)
>
<form
id=
"have_read_form"
action=
"{{ url_for('toggle_read', book_id=entry.id)}}"
method=
"POST"
>
<input
id=
"have_read_cb"
type=
"checkbox"
{%
if
have_read
%}
checked
{%
endif
%}
>
<label
class=
"block-label"
>
<label
for=
"have_read_cb"
>
{{_('Read')}}
</label>
<input
id=
"have_read_cb"
type=
"checkbox"
{%
if
have_read
%}
checked
{%
endif
%}
>
<span>
{{_('Read')}}
</span>
</label>
</form>
</form>
</div>
</div>
</p>
</p>
...
@@ -236,28 +238,10 @@
...
@@ -236,28 +238,10 @@
<script
src=
"{{ url_for('static', filename='js/libs/jquery.form.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/libs/jquery.form.js') }}"
></script>
<script>
<script>
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
var
haveReadForm
=
$
(
'#have_read_form'
);
$
(
'#have_read_form'
).
ajaxForm
();
haveReadForm
.
ajaxForm
();
});
});
$
(
"#have_read_container"
).
attr
(
'unselectable'
,
'on'
)
$
(
"#have_read_cb"
).
on
(
'change'
,
function
()
{
.
css
({
'-moz-user-select'
:
'-moz-none'
,
$
(
this
).
closest
(
'form'
).
submit
();
'-moz-user-select'
:
'none'
,
'-o-user-select'
:
'none'
,
'-khtml-user-select'
:
'none'
,
/* you could also put this in a class */
'-webkit-user-select'
:
'none'
,
/* and add the CSS class here instead */
'-ms-user-select'
:
'none'
,
'user-select'
:
'none'
}).
bind
(
'selectstart'
,
function
(){
return
false
;
});
$
(
"#have_read_container"
).
click
(
function
()
{
var
haveReadForm
=
$
(
'#have_read_form'
);
if
(
$
(
"#have_read"
).
find
(
'span'
).
hasClass
(
'glyphicon-ok'
))
{
$
(
"#have_read"
).
find
(
'span'
).
removeClass
(
'glyphicon-ok'
);
$
(
"#have_read"
).
find
(
'span'
).
addClass
(
'glyphicon-remove'
);
}
else
{
$
(
"#have_read"
).
find
(
'span'
).
removeClass
(
'glyphicon-remove'
);
$
(
"#have_read"
).
find
(
'span'
).
addClass
(
'glyphicon-ok'
);
}
haveReadForm
.
submit
()
});
});
</script>
</script>
{% endblock %}
{% endblock %}
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