Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nicolas Frandeboeuf
kresus
Commits
b87d0497
Commit
b87d0497
authored
Jun 09, 2017
by
Nicolas Frandeboeuf
Browse files
Do not disable custom label in modale on mobile
parent
12864fe8
Pipeline
#16891
passed with stage
in 2 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
client/components/operations/label.js
View file @
b87d0497
...
...
@@ -103,12 +103,19 @@ class LabelComponent_ extends React.Component {
this
.
state
.
editedValue
:
this
.
getDefaultValue
();
let
labelVisibility
=
'
hidden
'
;
let
inputVisibility
=
''
;
if
(
this
.
props
.
readonlyOnSmallScreens
)
{
labelVisibility
=
'
visible-xs-inline
'
;
inputVisibility
=
'
hidden-xs
'
;
}
return
(
<
div
className
=
"
label-component-container
"
>
<
span
className
=
"
text-uppercase
visible-xs-inline label-component
"
>
<
span
className
=
{
`
text-uppercase
label-component
${
labelVisibility
}
`
}
>
{
label
}
<
/span
>
<
input
className
=
"
form-control operation-label-input
hidden-xs
"
className
=
{
`
form-control operation-label-input
${
inputVisibility
}
`
}
type
=
"
text
"
value
=
{
label
}
onChange
=
{
this
.
handleChange
}
...
...
@@ -129,11 +136,15 @@ LabelComponent_.propTypes = {
displayLabelIfNoCustom
:
PropTypes
.
bool
,
// A function to set the custom label when modified.
setCustomLabel
:
PropTypes
.
func
.
isRequired
setCustomLabel
:
PropTypes
.
func
.
isRequired
,
// Whether the label is readonly on small screens.
readonlyOnSmallScreens
:
PropTypes
.
bool
};
LabelComponent_
.
defaultProps
=
{
displayLabelIfNoCustom
:
true
displayLabelIfNoCustom
:
true
,
readonlyOnSmallScreens
:
false
};
function
mapDispatch
(
component
)
{
...
...
@@ -156,6 +167,7 @@ const OperationListViewLabel_ = props => {
<
LabelComponent
operation
=
{
props
.
operation
}
setCustomLabel
=
{
props
.
setCustomLabel
}
readonlyOnSmallScreens
=
{
true
}
/
>
);
...
...
Write
Preview
Supports
Markdown
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