Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
2b945741
Commit
2b945741
authored
Jan 04, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated styles for Pikaday
parent
df6f6e31
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
73 additions
and
172 deletions
+73
-172
app/assets/javascripts/due_date_select.js.es6
app/assets/javascripts/due_date_select.js.es6
+5
-8
app/assets/javascripts/issuable_form.js
app/assets/javascripts/issuable_form.js
+3
-2
app/assets/javascripts/member_expiration_date.js.es6
app/assets/javascripts/member_expiration_date.js.es6
+3
-1
app/assets/stylesheets/framework/calendar.scss
app/assets/stylesheets/framework/calendar.scss
+53
-0
app/assets/stylesheets/framework/dropdowns.scss
app/assets/stylesheets/framework/dropdowns.scss
+8
-111
app/assets/stylesheets/framework/jquery.scss
app/assets/stylesheets/framework/jquery.scss
+0
-46
app/assets/stylesheets/pages/profile.scss
app/assets/stylesheets/pages/profile.scss
+0
-4
app/views/profiles/personal_access_tokens/index.html.haml
app/views/profiles/personal_access_tokens/index.html.haml
+1
-0
No files found.
app/assets/javascripts/due_date_select.js.es6
View file @
2b945741
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
this.initGlDropdown();
this.initGlDropdown();
this.initRemoveDueDate();
this.initRemoveDueDate();
this.initDatePicker();
this.initDatePicker();
this.initStopPropagation();
}
}
initGlDropdown() {
initGlDropdown() {
...
@@ -48,8 +47,8 @@
...
@@ -48,8 +47,8 @@
const calendar = new Pikaday({
const calendar = new Pikaday({
field: $dueDateInput.get(0),
field: $dueDateInput.get(0),
theme: 'gitlab-theme',
format: 'yyyy-mm-dd',
format: 'yyyy-mm-dd',
defaultDate: new Date($dueDateInput.val()),
onSelect: (dateText) => {
onSelect: (dateText) => {
const formattedDate = dateFormat(new Date(dateText), 'yyyy-mm-dd');
const formattedDate = dateFormat(new Date(dateText), 'yyyy-mm-dd');
...
@@ -64,6 +63,8 @@
...
@@ -64,6 +63,8 @@
}
}
});
});
calendar.setDate(new Date($dueDateInput.val()));
this.$datePicker.append(calendar.el);
this.$datePicker.append(calendar.el);
this.$datePicker.data('pikaday', calendar);
this.$datePicker.data('pikaday', calendar);
}
}
...
@@ -85,11 +86,6 @@
...
@@ -85,11 +86,6 @@
});
});
}
}
initStopPropagation() {
$(document).off('click', '.ui-datepicker-header a').on('click', '.ui-datepicker-header a', (e) => {
return e.stopImmediatePropagation();
});
}
saveDueDate(isDropdown) {
saveDueDate(isDropdown) {
this.parseSelectedDate();
this.parseSelectedDate();
...
@@ -175,12 +171,13 @@
...
@@ -175,12 +171,13 @@
const $datePicker = $(this);
const $datePicker = $(this);
const calendar = new Pikaday({
const calendar = new Pikaday({
field: $datePicker.get(0),
field: $datePicker.get(0),
theme: 'gitlab-theme',
format: 'yyyy-mm-dd',
format: 'yyyy-mm-dd',
defaultDate: new Date($datePicker.val()),
onSelect(dateText) {
onSelect(dateText) {
$datePicker.val(dateFormat(new Date(dateText), 'yyyy-mm-dd'));
$datePicker.val(dateFormat(new Date(dateText), 'yyyy-mm-dd'));
}
}
});
});
calendar.setDate(new Date($datePicker.val()));
$datePicker.data('pikaday', calendar);
$datePicker.data('pikaday', calendar);
});
});
...
...
app/assets/javascripts/issuable_form.js
View file @
2b945741
...
@@ -37,14 +37,15 @@
...
@@ -37,14 +37,15 @@
this
.
initMoveDropdown
();
this
.
initMoveDropdown
();
$issuableDueDate
=
$
(
'
#issuable-due-date
'
);
$issuableDueDate
=
$
(
'
#issuable-due-date
'
);
if
(
$issuableDueDate
.
length
)
{
if
(
$issuableDueDate
.
length
)
{
new
Pikaday
({
var
calendar
=
new
Pikaday
({
field
:
$issuableDueDate
.
get
(
0
),
field
:
$issuableDueDate
.
get
(
0
),
theme
:
'
gitlab-theme
'
,
format
:
'
yyyy-mm-dd
'
,
format
:
'
yyyy-mm-dd
'
,
defaultDate
:
new
Date
(
$issuableDueDate
.
val
()),
onSelect
:
function
(
dateText
)
{
onSelect
:
function
(
dateText
)
{
$issuableDueDate
.
val
(
dateFormat
(
new
Date
(
dateText
),
'
yyyy-mm-dd
'
));
$issuableDueDate
.
val
(
dateFormat
(
new
Date
(
dateText
),
'
yyyy-mm-dd
'
));
}
}
});
});
calendar
.
setDate
(
new
Date
(
$issuableDueDate
.
val
()));
}
}
}
}
...
...
app/assets/javascripts/member_expiration_date.js.es6
View file @
2b945741
...
@@ -18,9 +18,9 @@
...
@@ -18,9 +18,9 @@
const calendar = new Pikaday({
const calendar = new Pikaday({
field: $input.get(0),
field: $input.get(0),
theme: 'gitlab-theme',
format: 'yyyy-mm-dd',
format: 'yyyy-mm-dd',
minDate: new Date(),
minDate: new Date(),
defaultDate: new Date($input.val()),
onSelect: (dateText) => {
onSelect: (dateText) => {
$input.val(dateFormat(new Date(dateText), 'yyyy-mm-dd'));
$input.val(dateFormat(new Date(dateText), 'yyyy-mm-dd'));
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
},
},
});
});
calendar.setDate(new Date($input.val()));
$input.data('pikaday', calendar);
$input.data('pikaday', calendar);
});
});
...
...
app/assets/stylesheets/framework/calendar.scss
View file @
2b945741
...
@@ -43,3 +43,56 @@
...
@@ -43,3 +43,56 @@
float
:
right
;
float
:
right
;
font-size
:
12px
;
font-size
:
12px
;
}
}
.pika-single.gitlab-theme
{
.pika-label
{
color
:
$gl-gray
;
font-size
:
14px
;
font-weight
:
normal
;
}
th
{
padding
:
2px
0
;
color
:
$note-disabled-comment-color
;
font-weight
:
normal
;
text-transform
:
lowercase
;
border-top
:
1px
solid
$calendar-border-color
;
}
abbr
{
cursor
:
default
;
}
td
{
border
:
1px
solid
$calendar-border-color
;
&
:first-child
{
border-left
:
0
;
}
&
:last-child
{
border-right
:
0
;
}
}
.pika-day
{
border-radius
:
0
;
background-color
:
$white-light
;
text-align
:
center
;
}
.is-today
{
.pika-day
{
color
:
inherit
;
font-weight
:
normal
;
}
}
.is-selected
.pika-day
,
.pika-day
:hover
,
.is-today
.pika-day
:hover
{
background
:
$gl-primary
;
color
:
$white-light
;
box-shadow
:
none
;
}
}
app/assets/stylesheets/framework/dropdowns.scss
View file @
2b945741
...
@@ -502,119 +502,16 @@
...
@@ -502,119 +502,16 @@
max-height
:
230px
;
max-height
:
230px
;
}
}
.ui-widget
{
.pika-single
{
table
{
position
:
relative
!
important
;
margin
:
0
;
top
:
0
!
important
;
}
&
.ui-datepicker-inline
{
padding
:
0
10px
;
border
:
0
;
width
:
100%
;
}
.ui-datepicker-header
{
padding
:
0
8px
10px
;
border
:
0
;
.ui-icon
{
background
:
none
;
font-size
:
20px
;
text-indent
:
0
;
&
:
:
before
{
display
:
block
;
position
:
relative
;
top
:
-2px
;
color
:
$dropdown-title-btn-color
;
font
:
normal
normal
normal
14px
/
1
FontAwesome
;
font-size
:
inherit
;
text-rendering
:
auto
;
-webkit-font-smoothing
:
antialiased
;
-moz-osx-font-smoothing
:
grayscale
;
}
}
}
.ui-datepicker-calendar
{
.ui-state-hover
,
.ui-state-active
{
color
:
$white-light
;
border
:
0
;
}
}
.ui-datepicker-prev
,
.ui-datepicker-next
{
top
:
0
;
height
:
15px
;
cursor
:
pointer
;
&
:hover
{
background-color
:
transparent
;
border
:
0
;
.
ui-icon
:
:
before
{
color
:
$md-link-color
;
}
}
}
.ui-datepicker-prev
{
left
:
0
;
.
ui-icon
:
:
before
{
content
:
'\f104'
;
text-align
:
left
;
}
}
.ui-datepicker-next
{
right
:
0
;
.
ui-icon
:
:
before
{
content
:
'\f105'
;
text-align
:
right
;
}
}
td
{
padding
:
0
;
border
:
1px
solid
$calendar-border-color
;
&
:first-child
{
border-left
:
0
;
}
&
:last-child
{
border-right
:
0
;
}
a
{
line-height
:
17px
;
border
:
0
;
border
:
0
;
border-radius
:
0
;
box-shadow
:
none
;
}
}
}
.ui-datepicker-title
{
.pika-lendar
{
color
:
$gl-text-color
;
margin-top
:
-5px
;
font-size
:
14px
;
margin-bottom
:
0
;
line-height
:
1
;
font-weight
:
normal
;
}
}
th
{
padding
:
2px
0
;
color
:
$note-disabled-comment-color
;
font-weight
:
normal
;
text-transform
:
lowercase
;
border-top
:
1px
solid
$calendar-border-color
;
}
.ui-datepicker-unselectable
{
background-color
:
$gray-light
;
}
}
}
}
...
...
app/assets/stylesheets/framework/jquery.scss
View file @
2b945741
...
@@ -2,42 +2,6 @@
...
@@ -2,42 +2,6 @@
font-family
:
$regular_font
;
font-family
:
$regular_font
;
font-size
:
$font-size-base
;
font-size
:
$font-size-base
;
&
.ui-datepicker
,
&
.ui-datepicker-inline
{
border
:
1px
solid
$jq-ui-border
;
padding
:
10px
;
width
:
270px
;
.ui-datepicker-header
{
background
:
$white-light
;
border-color
:
$jq-ui-border
;
.ui-datepicker-prev
,
.ui-datepicker-next
{
top
:
4px
;
}
.ui-datepicker-prev
{
left
:
2px
;
}
.ui-datepicker-next
{
right
:
2px
;
}
.ui-state-hover
{
background
:
transparent
;
border
:
0
;
cursor
:
pointer
;
}
}
.ui-datepicker-calendar
td
a
{
padding
:
5px
;
text-align
:
center
;
}
}
&
.ui-autocomplete
{
&
.ui-autocomplete
{
border-color
:
$jq-ui-border
;
border-color
:
$jq-ui-border
;
padding
:
0
;
padding
:
0
;
...
@@ -59,16 +23,6 @@
...
@@ -59,16 +23,6 @@
border
:
0
;
border
:
0
;
background
:
transparent
;
background
:
transparent
;
}
}
.ui-datepicker-calendar
{
.ui-state-active
,
.ui-state-hover
,
.ui-state-focus
{
border
:
1px
solid
$gl-primary
;
background
:
$gl-primary
;
color
:
$white-light
;
}
}
}
}
.ui-sortable-handle
{
.ui-sortable-handle
{
...
...
app/assets/stylesheets/pages/profile.scss
View file @
2b945741
...
@@ -201,10 +201,6 @@
...
@@ -201,10 +201,6 @@
color
:
$note-disabled-comment-color
;
color
:
$note-disabled-comment-color
;
}
}
.datepicker.personal-access-tokens-expires-at
.ui-state-disabled
span
{
text-align
:
center
;
}
.created-personal-access-token-container
{
.created-personal-access-token-container
{
#created-personal-access-token
{
#created-personal-access-token
{
width
:
90%
;
width
:
90%
;
...
...
app/views/profiles/personal_access_tokens/index.html.haml
View file @
2b945741
...
@@ -90,6 +90,7 @@
...
@@ -90,6 +90,7 @@
new
Pikaday
({
new
Pikaday
({
field
:
$dateField
.
get
(
0
),
field
:
$dateField
.
get
(
0
),
theme
:
'
gitlab-theme
'
,
format
:
'
yyyy-mm-dd
'
,
format
:
'
yyyy-mm-dd
'
,
minDate
:
new
Date
(),
minDate
:
new
Date
(),
onSelect
:
function
(
dateText
)
{
onSelect
:
function
(
dateText
)
{
...
...
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