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
36c2b355
Commit
36c2b355
authored
Jul 10, 2017
by
Jonathan Rehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use bootstrap-datepicker to add datepicking UI for browsers that do not have one built-in
parent
cc916a4e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
36 additions
and
1 deletion
+36
-1
bootstrap-datepicker3.css.map
cps/static/css/libs/bootstrap-datepicker3.css.map
+1
-0
bootstrap-datepicker3.min.css
cps/static/css/libs/bootstrap-datepicker3.min.css
+7
-0
bootstrap-datepicker.min.js
.../js/libs/bootstrap-datepicker/bootstrap-datepicker.min.js
+8
-0
bootstrap-datepicker.de.min.js
...otstrap-datepicker/locales/bootstrap-datepicker.de.min.js
+1
-0
bootstrap-datepicker.es.min.js
...otstrap-datepicker/locales/bootstrap-datepicker.es.min.js
+1
-0
bootstrap-datepicker.fr.min.js
...otstrap-datepicker/locales/bootstrap-datepicker.fr.min.js
+1
-0
bootstrap-datepicker.nl.min.js
...otstrap-datepicker/locales/bootstrap-datepicker.nl.min.js
+1
-0
bootstrap-datepicker.pl.min.js
...otstrap-datepicker/locales/bootstrap-datepicker.pl.min.js
+1
-0
bootstrap-datepicker.ru.min.js
...otstrap-datepicker/locales/bootstrap-datepicker.ru.min.js
+1
-0
bootstrap-datepicker.zh-CN.min.js
...trap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js
+1
-0
book_edit.html
cps/templates/book_edit.html
+13
-1
No files found.
cps/static/css/libs/bootstrap-datepicker3.css.map
0 → 100644
View file @
36c2b355
This diff is collapsed.
Click to expand it.
cps/static/css/libs/bootstrap-datepicker3.min.css
0 → 100644
View file @
36c2b355
This diff is collapsed.
Click to expand it.
cps/static/js/libs/bootstrap-datepicker/bootstrap-datepicker.min.js
0 → 100644
View file @
36c2b355
This diff is collapsed.
Click to expand it.
cps/static/js/libs/bootstrap-datepicker/locales/bootstrap-datepicker.de.min.js
0 → 100644
View file @
36c2b355
!
function
(
a
){
a
.
fn
.
datepicker
.
dates
.
de
=
{
days
:[
"Sonntag"
,
"Montag"
,
"Dienstag"
,
"Mittwoch"
,
"Donnerstag"
,
"Freitag"
,
"Samstag"
],
daysShort
:[
"Son"
,
"Mon"
,
"Die"
,
"Mit"
,
"Don"
,
"Fre"
,
"Sam"
],
daysMin
:[
"So"
,
"Mo"
,
"Di"
,
"Mi"
,
"Do"
,
"Fr"
,
"Sa"
],
months
:[
"Januar"
,
"Februar"
,
"März"
,
"April"
,
"Mai"
,
"Juni"
,
"Juli"
,
"August"
,
"September"
,
"Oktober"
,
"November"
,
"Dezember"
],
monthsShort
:[
"Jan"
,
"Feb"
,
"Mär"
,
"Apr"
,
"Mai"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Okt"
,
"Nov"
,
"Dez"
],
today
:
"Heute"
,
monthsTitle
:
"Monate"
,
clear
:
"Löschen"
,
weekStart
:
1
,
format
:
"dd.mm.yyyy"
}}(
jQuery
);
\ No newline at end of file
cps/static/js/libs/bootstrap-datepicker/locales/bootstrap-datepicker.es.min.js
0 → 100644
View file @
36c2b355
!
function
(
a
){
a
.
fn
.
datepicker
.
dates
.
es
=
{
days
:[
"Domingo"
,
"Lunes"
,
"Martes"
,
"Miércoles"
,
"Jueves"
,
"Viernes"
,
"Sábado"
],
daysShort
:[
"Dom"
,
"Lun"
,
"Mar"
,
"Mié"
,
"Jue"
,
"Vie"
,
"Sáb"
],
daysMin
:[
"Do"
,
"Lu"
,
"Ma"
,
"Mi"
,
"Ju"
,
"Vi"
,
"Sa"
],
months
:[
"Enero"
,
"Febrero"
,
"Marzo"
,
"Abril"
,
"Mayo"
,
"Junio"
,
"Julio"
,
"Agosto"
,
"Septiembre"
,
"Octubre"
,
"Noviembre"
,
"Diciembre"
],
monthsShort
:[
"Ene"
,
"Feb"
,
"Mar"
,
"Abr"
,
"May"
,
"Jun"
,
"Jul"
,
"Ago"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dic"
],
today
:
"Hoy"
,
monthsTitle
:
"Meses"
,
clear
:
"Borrar"
,
weekStart
:
1
,
format
:
"dd/mm/yyyy"
}}(
jQuery
);
\ No newline at end of file
cps/static/js/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fr.min.js
0 → 100644
View file @
36c2b355
!
function
(
a
){
a
.
fn
.
datepicker
.
dates
.
fr
=
{
days
:[
"dimanche"
,
"lundi"
,
"mardi"
,
"mercredi"
,
"jeudi"
,
"vendredi"
,
"samedi"
],
daysShort
:[
"dim."
,
"lun."
,
"mar."
,
"mer."
,
"jeu."
,
"ven."
,
"sam."
],
daysMin
:[
"d"
,
"l"
,
"ma"
,
"me"
,
"j"
,
"v"
,
"s"
],
months
:[
"janvier"
,
"février"
,
"mars"
,
"avril"
,
"mai"
,
"juin"
,
"juillet"
,
"août"
,
"septembre"
,
"octobre"
,
"novembre"
,
"décembre"
],
monthsShort
:[
"janv."
,
"févr."
,
"mars"
,
"avril"
,
"mai"
,
"juin"
,
"juil."
,
"août"
,
"sept."
,
"oct."
,
"nov."
,
"déc."
],
today
:
"Aujourd'hui"
,
monthsTitle
:
"Mois"
,
clear
:
"Effacer"
,
weekStart
:
1
,
format
:
"dd/mm/yyyy"
}}(
jQuery
);
\ No newline at end of file
cps/static/js/libs/bootstrap-datepicker/locales/bootstrap-datepicker.nl.min.js
0 → 100644
View file @
36c2b355
!
function
(
a
){
a
.
fn
.
datepicker
.
dates
.
nl
=
{
days
:[
"zondag"
,
"maandag"
,
"dinsdag"
,
"woensdag"
,
"donderdag"
,
"vrijdag"
,
"zaterdag"
],
daysShort
:[
"zo"
,
"ma"
,
"di"
,
"wo"
,
"do"
,
"vr"
,
"za"
],
daysMin
:[
"zo"
,
"ma"
,
"di"
,
"wo"
,
"do"
,
"vr"
,
"za"
],
months
:[
"januari"
,
"februari"
,
"maart"
,
"april"
,
"mei"
,
"juni"
,
"juli"
,
"augustus"
,
"september"
,
"oktober"
,
"november"
,
"december"
],
monthsShort
:[
"jan"
,
"feb"
,
"mrt"
,
"apr"
,
"mei"
,
"jun"
,
"jul"
,
"aug"
,
"sep"
,
"okt"
,
"nov"
,
"dec"
],
today
:
"Vandaag"
,
monthsTitle
:
"Maanden"
,
clear
:
"Wissen"
,
weekStart
:
1
,
format
:
"dd-mm-yyyy"
}}(
jQuery
);
\ No newline at end of file
cps/static/js/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pl.min.js
0 → 100644
View file @
36c2b355
!
function
(
a
){
a
.
fn
.
datepicker
.
dates
.
pl
=
{
days
:[
"Niedziela"
,
"Poniedziałek"
,
"Wtorek"
,
"Środa"
,
"Czwartek"
,
"Piątek"
,
"Sobota"
],
daysShort
:[
"Niedz."
,
"Pon."
,
"Wt."
,
"Śr."
,
"Czw."
,
"Piąt."
,
"Sob."
],
daysMin
:[
"Ndz."
,
"Pn."
,
"Wt."
,
"Śr."
,
"Czw."
,
"Pt."
,
"Sob."
],
months
:[
"Styczeń"
,
"Luty"
,
"Marzec"
,
"Kwiecień"
,
"Maj"
,
"Czerwiec"
,
"Lipiec"
,
"Sierpień"
,
"Wrzesień"
,
"Październik"
,
"Listopad"
,
"Grudzień"
],
monthsShort
:[
"Sty."
,
"Lut."
,
"Mar."
,
"Kwi."
,
"Maj"
,
"Cze."
,
"Lip."
,
"Sie."
,
"Wrz."
,
"Paź."
,
"Lis."
,
"Gru."
],
today
:
"Dzisiaj"
,
weekStart
:
1
,
clear
:
"Wyczyść"
,
format
:
"dd.mm.yyyy"
}}(
jQuery
);
\ No newline at end of file
cps/static/js/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ru.min.js
0 → 100644
View file @
36c2b355
!
function
(
a
){
a
.
fn
.
datepicker
.
dates
.
ru
=
{
days
:[
"Воскресенье"
,
"Понедельник"
,
"Вторник"
,
"Среда"
,
"Четверг"
,
"Пятница"
,
"Суббота"
],
daysShort
:[
"Вск"
,
"Пнд"
,
"Втр"
,
"Срд"
,
"Чтв"
,
"Птн"
,
"Суб"
],
daysMin
:[
"Вс"
,
"Пн"
,
"Вт"
,
"Ср"
,
"Чт"
,
"Пт"
,
"Сб"
],
months
:[
"Январь"
,
"Февраль"
,
"Март"
,
"Апрель"
,
"Май"
,
"Июнь"
,
"Июль"
,
"Август"
,
"Сентябрь"
,
"Октябрь"
,
"Ноябрь"
,
"Декабрь"
],
monthsShort
:[
"Янв"
,
"Фев"
,
"Мар"
,
"Апр"
,
"Май"
,
"Июн"
,
"Июл"
,
"Авг"
,
"Сен"
,
"Окт"
,
"Ноя"
,
"Дек"
],
today
:
"Сегодня"
,
clear
:
"Очистить"
,
format
:
"dd.mm.yyyy"
,
weekStart
:
1
,
monthsTitle
:
"Месяцы"
}}(
jQuery
);
\ No newline at end of file
cps/static/js/libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js
0 → 100644
View file @
36c2b355
!
function
(
a
){
a
.
fn
.
datepicker
.
dates
[
"zh-CN"
]
=
{
days
:[
"星期日"
,
"星期一"
,
"星期二"
,
"星期三"
,
"星期四"
,
"星期五"
,
"星期六"
],
daysShort
:[
"周日"
,
"周一"
,
"周二"
,
"周三"
,
"周四"
,
"周五"
,
"周六"
],
daysMin
:[
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
],
months
:[
"一月"
,
"二月"
,
"三月"
,
"四月"
,
"五月"
,
"六月"
,
"七月"
,
"八月"
,
"九月"
,
"十月"
,
"十一月"
,
"十二月"
],
monthsShort
:[
"1月"
,
"2月"
,
"3月"
,
"4月"
,
"5月"
,
"6月"
,
"7月"
,
"8月"
,
"9月"
,
"10月"
,
"11月"
,
"12月"
],
today
:
"今日"
,
clear
:
"清除"
,
format
:
"yyyy年mm月dd日"
,
titleFormat
:
"yyyy年mm月"
,
weekStart
:
1
}}(
jQuery
);
\ No newline at end of file
cps/templates/book_edit.html
View file @
36c2b355
...
...
@@ -53,7 +53,7 @@
</div>
<div
class=
"form-group"
>
<label
for=
"pubdate"
>
{{_('Publish
ed
')}}
</label>
<label
for=
"pubdate"
>
{{_('Publish
ing date
')}}
</label>
<input
type=
"date"
class=
"form-control"
name=
"pubdate"
id=
"pubdate"
value=
"{% if book.pubdate %}{{book.pubdate|formatdateinput}}{% endif %}"
>
</div>
<div
class=
"form-group"
>
...
...
@@ -193,6 +193,10 @@
<script
src=
"{{ url_for('static', filename='js/libs/bootstrap-rating-input.min.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/get_meta.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/libs/tinymce/tinymce.min.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/libs/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"
></script>
{% if not g.user.locale == 'en' %}
<script
src=
"{{ url_for('static', filename='js/libs/bootstrap-datepicker/locales/bootstrap-datepicker.' + g.user.locale + '.min.js') }}"
charset=
"UTF-8"
></script>
{% endif %}
<script
type=
"text/javascript"
>
tinymce
.
init
({
selector
:
'#description'
,
...
...
@@ -200,8 +204,16 @@
menubar
:
'edit view format'
,
language
:
'{{ g.user.locale }}'
});
if
(
!
Modernizr
.
inputtypes
.
date
)
{
$
(
'#pubdate'
).
datepicker
({
format
:
'yyyy-mm-dd'
,
language
:
'{{ g.user.locale }}'
});
}
</script>
{% endblock %}
{% block header %}
<link
href=
"{{ url_for('static', filename='css/libs/typeahead.css') }}"
rel=
"stylesheet"
media=
"screen"
>
<link
href=
"{{ url_for('static', filename='css/libs/bootstrap-datepicker3.min.css') }}"
rel=
"stylesheet"
media=
"screen"
>
{% 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