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
5d1868bb
Commit
5d1868bb
authored
7 years ago
by
Ashutosh Mestry
Committed by
Madhan Neethiraj
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2227: UI fix to allow "." in float/double values for tag attributes
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
ea52e1f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
Overrides.js
dashboardv2/public/js/utils/Overrides.js
+5
-0
addTagModalView.js
dashboardv2/public/js/views/tag/addTagModalView.js
+8
-3
No files found.
dashboardv2/public/js/utils/Overrides.js
View file @
5d1868bb
...
...
@@ -98,6 +98,11 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
}
}
});
$
(
'body'
).
on
(
'keypress'
,
'input.number-input-exponential,.number-input-exponential .select2-search__field'
,
function
(
e
)
{
if
((
e
.
which
!=
8
&&
e
.
which
!=
0
)
&&
(
e
.
which
<
48
||
e
.
which
>
57
)
&&
(
e
.
which
!=
69
&&
e
.
which
!=
101
&&
e
.
which
!=
43
&&
e
.
which
!=
45
&&
e
.
which
!=
46
&&
e
.
which
!=
190
))
{
return
false
;
}
});
// For placeholder support
if
(
!
(
'placeholder'
in
HTMLInputElement
.
prototype
))
{
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/addTagModalView.js
View file @
5d1868bb
...
...
@@ -281,7 +281,7 @@ define(['require',
'<select class="form-control attributeInputVal attrName" data-key="'
+
name
+
'">'
+
str
+
'</select></div>'
);
}
else
{
var
textElement
=
that
.
getElement
(
name
,
typeName
);
that
.
ui
.
tagAttribute
.
append
(
'<div class="form-group"><label>'
+
name
+
'</label>'
+
' ('
+
typeName
+
')'
+
textElement
);
that
.
ui
.
tagAttribute
.
append
(
'<div class="form-group"><label>'
+
name
+
'</label>'
+
' ('
+
typeName
+
')'
+
textElement
+
'</div>'
);
}
});
that
.
$
(
'input[data-type="date"]'
).
each
(
function
()
{
...
...
@@ -312,15 +312,20 @@ define(['require',
},
getElement
:
function
(
labelName
,
typeName
)
{
var
value
=
this
.
tagModel
&&
this
.
tagModel
.
attributes
?
(
this
.
tagModel
.
attributes
[
labelName
]
||
""
)
:
""
,
className
=
((
typeName
===
"int"
||
typeName
===
"long"
||
typeName
===
"float"
||
typeName
===
"byte"
||
typeName
===
"double"
||
typeName
===
"short"
)
?
"number-input-negative"
:
""
)
+
" form-control attributeInputVal attrName"
;
isTypeNumber
=
typeName
===
"int"
||
typeName
===
"byte"
||
typeName
===
"short"
||
typeName
===
"double"
||
typeName
===
"float"
,
inputClassName
=
"form-control attributeInputVal attrName"
;
if
(
isTypeNumber
)
{
inputClassName
+=
((
typeName
===
"int"
||
typeName
===
"byte"
||
typeName
===
"short"
)
?
" number-input-negative"
:
" number-input-exponential"
);
}
if
(
typeName
===
"boolean"
)
{
return
'<select class="form-control attributeInputVal attrName" data-key="'
+
labelName
+
'" data-type="'
+
typeName
+
'"> '
+
'<option value="">--Select true or false--</option>'
+
'<option value="true">true</option>'
+
'<option value="false">false</option></select>'
;
}
else
{
return
'<input type="text" value="'
+
value
+
'" class="'
+
className
+
'" data-key="'
+
labelName
+
'" data-type="'
+
typeName
+
'"></input></div
>'
;
return
'<input type="text" value="'
+
value
+
'" class="'
+
inputClassName
+
'" data-key="'
+
labelName
+
'" data-type="'
+
typeName
+
'"/
>'
;
}
},
saveTagData
:
function
(
options
)
{
var
that
=
this
;
...
...
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