Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
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
dataplatform
atlas
Commits
32fa4be5
Commit
32fa4be5
authored
7 years ago
by
pratik pandey
Committed by
Madhan Neethiraj
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2212: UI fix to allow negative number input for tag attributes
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
8663eb1d
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
Overrides.js
dashboardv2/public/js/utils/Overrides.js
+11
-0
addTagModalView.js
dashboardv2/public/js/views/tag/addTagModalView.js
+2
-4
No files found.
dashboardv2/public/js/utils/Overrides.js
View file @
32fa4be5
...
@@ -87,6 +87,17 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
...
@@ -87,6 +87,17 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
return
false
;
return
false
;
}
}
});
});
$
(
'body'
).
on
(
'keypress'
,
'input.number-input-negative,.number-input-negative .select2-search__field'
,
function
(
e
)
{
if
(
e
.
which
!=
8
&&
e
.
which
!=
0
&&
(
e
.
which
<
48
||
e
.
which
>
57
))
{
if
(
e
.
which
==
45
)
{
if
(
this
.
value
.
length
)
{
return
false
;
}
}
else
{
return
false
;
}
}
});
// For placeholder support
// For placeholder support
if
(
!
(
'placeholder'
in
HTMLInputElement
.
prototype
))
{
if
(
!
(
'placeholder'
in
HTMLInputElement
.
prototype
))
{
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/addTagModalView.js
View file @
32fa4be5
...
@@ -312,16 +312,14 @@ define(['require',
...
@@ -312,16 +312,14 @@ define(['require',
},
},
getElement
:
function
(
labelName
,
typeName
)
{
getElement
:
function
(
labelName
,
typeName
)
{
var
value
=
this
.
tagModel
&&
this
.
tagModel
.
attributes
?
(
this
.
tagModel
.
attributes
[
labelName
]
||
""
)
:
""
,
var
value
=
this
.
tagModel
&&
this
.
tagModel
.
attributes
?
(
this
.
tagModel
.
attributes
[
labelName
]
||
""
)
:
""
,
type
=
(
typeName
===
"int"
||
typeName
===
"long"
||
typeName
===
"float"
||
typeName
===
"byte"
||
typeName
===
"double"
||
typeName
===
"short"
)
?
"number"
:
"text
"
;
className
=
((
typeName
===
"int"
||
typeName
===
"long"
||
typeName
===
"float"
||
typeName
===
"byte"
||
typeName
===
"double"
||
typeName
===
"short"
)
?
"number-input-negative"
:
""
)
+
" form-control attributeInputVal attrName
"
;
if
(
typeName
===
"boolean"
)
{
if
(
typeName
===
"boolean"
)
{
return
'<select class="form-control attributeInputVal attrName" data-key="'
+
labelName
+
'" data-type="'
+
typeName
+
'"> '
+
return
'<select class="form-control attributeInputVal attrName" data-key="'
+
labelName
+
'" data-type="'
+
typeName
+
'"> '
+
'<option value="">--Select true or false--</option>'
+
'<option value="">--Select true or false--</option>'
+
'<option value="true">true</option>'
+
'<option value="true">true</option>'
+
'<option value="false">false</option></select>'
;
'<option value="false">false</option></select>'
;
}
else
if
(
typeName
===
"int"
)
{
return
'<input type="'
+
type
+
'" value="'
+
value
+
'" class="form-control attributeInputVal attrName number-input" data-key="'
+
labelName
+
'" data-type="'
+
typeName
+
'"></input></div>'
;
}
else
{
}
else
{
return
'<input type="
'
+
type
+
'" value="'
+
value
+
'" class="form-control attributeInputVal attrName
" data-key="'
+
labelName
+
'" data-type="'
+
typeName
+
'"></input></div>'
;
return
'<input type="
text" value="'
+
value
+
'" class="'
+
className
+
'
" data-key="'
+
labelName
+
'" data-type="'
+
typeName
+
'"></input></div>'
;
}
}
},
},
saveTagData
:
function
(
options
)
{
saveTagData
:
function
(
options
)
{
...
...
This diff is collapsed.
Click to expand it.
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