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
iv
gitlab-ce
Commits
49628664
Commit
49628664
authored
Apr 14, 2016
by
Phil Hughes
Committed by
Robert Speicher
Apr 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed buttons instead clicking date sets it
Fixed issue with dropdown not being toggleable again
parent
989bcfcc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
16 deletions
+10
-16
app/assets/javascripts/due_date_select.js.coffee
app/assets/javascripts/due_date_select.js.coffee
+9
-9
app/assets/javascripts/issuable_context.js.coffee
app/assets/javascripts/issuable_context.js.coffee
+0
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-6
No files found.
app/assets/javascripts/due_date_select.js.coffee
View file @
49628664
class
@
DueDateSelect
class
@
DueDateSelect
constructor
:
->
constructor
:
->
$loading
=
$
(
'.js-issuable-update .due_date'
).
find
(
'.block-loading'
).
hide
()
$loading
=
$
(
'.js-issuable-update .due_date'
)
.
find
(
'.block-loading'
)
.
hide
()
$
(
'.js-due-date-select'
).
each
(
i
,
dropdown
)
->
$
(
'.js-due-date-select'
).
each
(
i
,
dropdown
)
->
$dropdown
=
$
(
dropdown
)
$dropdown
=
$
(
dropdown
)
$dropdownParent
=
$dropdown
.
closest
(
'.dropdown'
)
$dropdownParent
=
$dropdown
.
closest
(
'.dropdown'
)
$addBtn
=
$
(
'.js-due-date-add'
,
$dropdownParent
)
$datePicker
=
$dropdownParent
.
find
(
'.js-due-date-calendar'
)
$datePicker
=
$dropdownParent
.
find
(
'.js-due-date-calendar'
)
$block
=
$dropdown
.
closest
(
'.block'
)
$block
=
$dropdown
.
closest
(
'.block'
)
$selectbox
=
$dropdown
.
closest
(
'.selectbox'
)
$selectbox
=
$dropdown
.
closest
(
'.selectbox'
)
...
@@ -22,13 +23,10 @@ class @DueDateSelect
...
@@ -22,13 +23,10 @@ class @DueDateSelect
$value
.
removeAttr
(
'style'
)
$value
.
removeAttr
(
'style'
)
)
)
$addBtn
.
on
'click'
,
(
e
)
->
addDueDate
=
->
e
.
preventDefault
()
e
.
stopPropagation
()
# Create the post date
# Create the post date
value
=
$
(
"input[name='
#{
fieldName
}
']"
).
val
()
value
=
$
(
"input[name='
#{
fieldName
}
']"
).
val
()
mediumDate
=
$
.
datepicker
.
formatDate
(
"M d, yy"
,
new
Date
(
value
))
mediumDate
=
$
.
datepicker
.
formatDate
(
'M d, yy'
,
new
Date
(
value
))
data
=
{}
data
=
{}
data
[
abilityName
]
=
{}
data
[
abilityName
]
=
{}
...
@@ -48,13 +46,15 @@ class @DueDateSelect
...
@@ -48,13 +46,15 @@ class @DueDateSelect
$sidebarValue
.
html
(
mediumDate
)
$sidebarValue
.
html
(
mediumDate
)
).
done
(
data
)
->
).
done
(
data
)
->
$dropdown
.
trigger
(
'loaded.gl.dropdown'
)
$dropdown
.
trigger
(
'loaded.gl.dropdown'
)
$dropdown
.
trigger
(
'hidden.gl.dropdown
'
)
$dropdown
.
dropdown
(
'toggle
'
)
$loading
.
fadeOut
()
$loading
.
fadeOut
()
$datePicker
.
datepicker
(
$datePicker
.
datepicker
(
dateFormat
:
"yy-mm-dd"
,
dateFormat
:
'yy-mm-dd'
,
defaultDate
:
$
(
"input[name='
#{
fieldName
}
']"
).
val
()
defaultDate
:
$
(
"input[name='
#{
fieldName
}
']"
).
val
()
altField
:
"input[name='
#{
fieldName
}
']"
altField
:
"input[name='
#{
fieldName
}
']"
onSelect
:
->
addDueDate
()
)
)
$
(
document
)
$
(
document
)
...
...
app/assets/javascripts/issuable_context.js.coffee
View file @
49628664
...
@@ -33,7 +33,6 @@ class @IssuableContext
...
@@ -33,7 +33,6 @@ class @IssuableContext
$block
.
find
(
'.dropdown-menu-toggle'
).
trigger
'click'
$block
.
find
(
'.dropdown-menu-toggle'
).
trigger
'click'
,
0
,
0
$
(
".right-sidebar"
).
niceScroll
()
$
(
".right-sidebar"
).
niceScroll
()
initParticipants
:
->
initParticipants
:
->
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
49628664
...
@@ -100,16 +100,11 @@
...
@@ -100,16 +100,11 @@
%button
.dropdown-menu-toggle.js-due-date-select
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"#{issuable.to_ability_name}[due_date]"
,
ability_name:
issuable
.
to_ability_name
,
issue_update:
issuable_json_path
(
issuable
)
}
}
%button
.dropdown-menu-toggle.js-due-date-select
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"#{issuable.to_ability_name}[due_date]"
,
ability_name:
issuable
.
to_ability_name
,
issue_update:
issuable_json_path
(
issuable
)
}
}
%span
.dropdown-toggle-text
%span
.dropdown-toggle-text
Due date
Due date
=
icon
(
'chevron-down'
)
=
icon
(
"chevron-down"
)
.dropdown-menu.dropdown-menu-due-date
.dropdown-menu.dropdown-menu-due-date
=
dropdown_title
(
"Due date"
)
=
dropdown_title
(
"Due date"
)
=
dropdown_content
do
=
dropdown_content
do
.js-due-date-calendar
.js-due-date-calendar
.dropdown-footer.dropdown-due-date-footer.clearfix
%button
.btn.btn-primary.pull-left.js-due-date-add
{
type:
"button"
}
Add
%button
.btn.btn-default.pull-right
{
type:
"button"
}
Cancel
-
if
issuable
.
project
.
labels
.
any?
-
if
issuable
.
project
.
labels
.
any?
.block.labels
.block.labels
...
...
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