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
c1efcf06
Commit
c1efcf06
authored
8 years ago
by
kalyanikk
Committed by
Suma Shivaprasad
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show Tag / Taxonomy Listing in sorted order
parent
bf2e6091
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
13 deletions
+17
-13
TreeLayoutView.js
...oardv2/public/js/views/business_catalog/TreeLayoutView.js
+4
-1
SearchLayoutView.js
dashboardv2/public/js/views/search/SearchLayoutView.js
+1
-1
TagLayoutView.js
dashboardv2/public/js/views/tag/TagLayoutView.js
+7
-10
addTagModalView.js
dashboardv2/public/js/views/tag/addTagModalView.js
+5
-1
No files found.
dashboardv2/public/js/views/business_catalog/TreeLayoutView.js
View file @
c1efcf06
...
...
@@ -403,7 +403,10 @@ define(['require',
}
function
createTerm
()
{
_
.
each
(
that
.
childCollection
.
fullCollection
.
models
,
function
(
model
,
key
)
{
that
.
childCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
}
that
.
childCollection
.
fullCollection
.
sort
().
each
(
function
(
model
,
key
)
{
var
name
=
Utils
.
checkTagOrTerm
(
model
.
get
(
'name'
),
true
);
var
hrefUrl
=
"/api"
+
model
.
get
(
'href'
).
split
(
"/api"
)[
1
];
if
(
name
.
name
)
{
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/search/SearchLayoutView.js
View file @
c1efcf06
...
...
@@ -118,7 +118,7 @@ define(['require',
this
.
ui
.
typeLov
.
empty
();
var
str
=
'<option></option>'
;
this
.
typecollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'tags'
);
return
model
.
get
(
'tags'
)
.
toLowerCase
()
;
}
this
.
typecollection
.
fullCollection
.
sort
().
each
(
function
(
model
)
{
str
+=
'<option>'
+
model
.
get
(
"tags"
)
+
'</option>'
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/TagLayoutView.js
View file @
c1efcf06
...
...
@@ -51,11 +51,7 @@ define(['require',
events
:
function
()
{
var
events
=
{};
events
[
"click "
+
this
.
ui
.
createTag
]
=
'onClickCreateTag'
;
/* events["dblclick " + this.ui.tags] = function(e) {
this.onTagList(e, true);
}*/
events
[
"click "
+
this
.
ui
.
tags
]
=
'onTagList'
;
// events["click " + this.ui.referesh] = 'refereshClick';
events
[
"keyup "
+
this
.
ui
.
offLineSearchTag
]
=
'offlineSearchTag'
;
events
[
"click "
+
this
.
ui
.
deleteTerm
]
=
'onDeleteTerm'
;
events
[
'click '
+
this
.
ui
.
refreshTag
]
=
'fetchCollections'
;
...
...
@@ -69,7 +65,6 @@ define(['require',
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'tag'
));
this
.
tagCollection
=
new
VTagList
();
this
.
collection
=
new
Backbone
.
Collection
();
this
.
json
=
{
"enumTypes"
:
[],
"traitTypes"
:
[],
...
...
@@ -157,16 +152,18 @@ define(['require',
tagsAndTypeGenerator
:
function
(
collection
,
searchString
)
{
var
that
=
this
,
str
=
''
;
_
.
each
(
this
[
collection
].
fullCollection
.
models
,
function
(
model
)
{
var
tagName
=
model
.
get
(
"tags"
);
that
.
tagCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'tags'
).
toLowerCase
();
}
that
.
tagCollection
.
fullCollection
.
sort
().
each
(
function
(
model
)
{
if
(
searchString
)
{
if
(
tagName
.
search
(
new
RegExp
(
searchString
,
"i"
))
!=
-
1
)
{
str
=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
tagName
+
'" data-name="`'
+
tagName
+
'`" >'
+
tagName
+
'</a></li>'
+
str
;
if
(
model
.
get
(
'tags'
)
.
search
(
new
RegExp
(
searchString
,
"i"
))
!=
-
1
)
{
str
+=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
model
.
get
(
'tags'
)
+
'" data-name="`'
+
model
.
get
(
'tags'
)
+
'`" >'
+
model
.
get
(
'tags'
)
+
'</a></li>'
;
}
else
{
return
;
}
}
else
{
str
=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
tagName
+
'" data-name="`'
+
tagName
+
'`">'
+
tagName
+
'</a></li>'
+
str
;
str
+=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
model
.
get
(
'tags'
)
+
'" data-name="`'
+
model
.
get
(
'tags'
)
+
'`">'
+
model
.
get
(
'tags'
)
+
'</a></li>'
;
}
});
this
.
ui
.
tagsParent
.
empty
().
html
(
str
);
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/addTagModalView.js
View file @
c1efcf06
...
...
@@ -95,8 +95,12 @@ define(['require',
},
this
);
},
tagsCollection
:
function
()
{
this
.
collection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'tags'
).
toLowerCase
();
}
var
str
=
'<option selected="selected" disabled="disabled">-- Select a tag from the dropdown list --</option>'
;
_
.
each
(
this
.
collection
.
fullCollection
.
models
,
function
(
obj
,
key
)
{
this
.
collection
.
fullCollection
.
sort
().
each
(
function
(
obj
,
key
)
{
str
+=
'<option>'
+
obj
.
get
(
'tags'
)
+
'</option>'
;
});
this
.
ui
.
addTagOptions
.
html
(
str
);
...
...
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