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
9ca6136e
Commit
9ca6136e
authored
Mar 08, 2017
by
kevalbhatt
Committed by
Madhan Neethiraj
Mar 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1658: UI updates to fix incorrect terms display in search results and detail pages
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
d0f2ce5e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+5
-3
Utils.js
dashboardv2/public/js/utils/Utils.js
+8
-0
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+4
-5
No files found.
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
9ca6136e
...
...
@@ -307,7 +307,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
entityName
=
Utils
.
getName
(
obj
);
if
(
traits
)
{
traits
.
map
(
function
(
term
)
{
if
(
term
.
split
(
"."
).
length
>
1
)
{
var
checkTagOrTerm
=
Utils
.
checkTagOrTerm
(
term
);
if
(
checkTagOrTerm
.
term
)
{
terms
.
push
({
deleteHtml
:
'<a class="pull-left" title="Remove Term"><i class="fa fa-trash" data-id="tagClick" data-type="term" data-assetname="'
+
entityName
+
'" data-name="'
+
term
+
'" data-guid="'
+
obj
.
guid
+
'" ></i></a>'
,
url
:
_
.
unescape
(
term
).
split
(
"."
).
join
(
"/"
),
...
...
@@ -322,7 +323,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
className
+=
"showHideDiv hide"
;
}
obj
[
'valueUrl'
]
=
CommonViewFunction
.
breadcrumbUrlMaker
(
obj
.
url
);
html
+=
'<div class="'
+
className
+
'" dataterm-name="'
+
entityN
ame
+
'"><div class="liContent"></div>'
+
obj
.
deleteHtml
+
'</div>'
;
html
+=
'<div class="'
+
className
+
'" dataterm-name="'
+
obj
.
n
ame
+
'"><div class="liContent"></div>'
+
obj
.
deleteHtml
+
'</div>'
;
})
if
(
terms
.
length
>
1
)
{
html
+=
'<div><a href="javascript:void(0)" data-id="showMoreLessTerm" class="inputTag inputTagGreen"><span>Show More </span><i class="fa fa-angle-right"></i></a></div>'
...
...
@@ -349,7 +350,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
entityName
=
Utils
.
getName
(
obj
);
if
(
traits
)
{
traits
.
map
(
function
(
tag
)
{
if
(
tag
.
split
(
"."
).
length
===
1
)
{
var
checkTagOrTerm
=
Utils
.
checkTagOrTerm
(
tag
);
if
(
checkTagOrTerm
.
tag
)
{
var
className
=
"inputTag"
;
if
(
count
>=
1
)
{
popTag
+=
'<a class="'
+
className
+
'" data-id="tagClick"><span class="inputValue">'
+
tag
+
'</span><i class="fa fa-times" data-id="delete" data-assetname="'
+
entityName
+
'"data-name="'
+
tag
+
'" data-type="tag" data-guid="'
+
obj
.
guid
+
'" ></i></a>'
;
...
...
dashboardv2/public/js/utils/Utils.js
View file @
9ca6136e
...
...
@@ -295,6 +295,11 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'pnotify.button
fullName
:
value
}
}
if
(
value
&&
_
.
isString
(
value
))
{
value
=
{
typeName
:
value
}
}
if
(
_
.
isObject
(
value
))
{
var
name
=
""
;
if
(
value
&&
value
.
$typeName$
)
{
...
...
@@ -306,11 +311,14 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'pnotify.button
return
{}
}
name
=
_
.
escape
(
name
).
split
(
'.'
);
var
trem
=
false
;
if
(
value
[
'taxonomy.namespace'
])
{
trem
=
true
;
}
else
if
(
value
.
values
&&
value
.
values
[
'taxonomy.namespace'
])
{
trem
=
true
;
}
else
if
(
name
.
length
>
1
)
{
trem
=
true
;
// Temp fix
}
if
(
trem
)
{
...
...
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
9ca6136e
...
...
@@ -247,12 +247,11 @@ define(['require',
termData
=
""
;
_
.
each
(
tagObject
,
function
(
val
)
{
//var isTerm = Utils.checkTagOrTerm(val);
if
(
val
.
typeName
&&
val
.
typeName
.
split
(
'.'
).
length
===
1
)
{
tagData
+=
'<span class="inputTag" data-id="tagClick"><span class="inputValue">'
+
val
.
typeName
+
'</span><i class="fa fa-close" data-id="deleteTag" data-type="tag"></i></span>'
;
}
if
(
val
.
typeName
&&
val
.
typeName
.
split
(
'.'
).
length
>
1
)
{
var
checkTagOrTerm
=
Utils
.
checkTagOrTerm
(
val
);
if
(
checkTagOrTerm
.
term
)
{
termData
+=
'<span class="inputTag term" data-id="tagClick" data-href="'
+
val
.
typeName
+
'"><span class="inputValue">'
+
val
.
typeName
+
'</span><i class="fa fa-close" data-id="deleteTag" data-type="term"></i></span>'
;
}
else
{
tagData
+=
'<span class="inputTag" data-id="tagClick"><span class="inputValue">'
+
val
.
typeName
+
'</span><i class="fa fa-close" data-id="deleteTag" data-type="tag"></i></span>'
;
}
});
this
.
ui
.
tagList
.
find
(
"span.inputTag"
).
remove
();
...
...
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