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
6b100410
Commit
6b100410
authored
Sep 20, 2019
by
kevalbhatt
Committed by
Sarath Subramanian
Sep 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3415 : UI : Beta UI : Improvements for left side tree view
parent
15e5bedb
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
252 additions
and
73 deletions
+252
-73
leftsidebar.scss
dashboardv3/public/css/scss/leftsidebar.scss
+29
-2
atlas-logo-beta-ui.png
dashboardv3/public/img/atlas-logo-beta-ui.png
+0
-0
ClassificationTreeLayoutView_tmpl.html
...plates/search/tree/ClassificationTreeLayoutView_tmpl.html
+19
-3
CustomFilterTreeLayoutView_tmpl.html
...emplates/search/tree/CustomFilterTreeLayoutView_tmpl.html
+19
-4
EntityTreeLayoutView_tmpl.html
...c/js/templates/search/tree/EntityTreeLayoutView_tmpl.html
+17
-7
GlossaryTreeLayoutView_tmpl.html
...js/templates/search/tree/GlossaryTreeLayoutView_tmpl.html
+18
-3
Header.html
dashboardv3/public/js/templates/site/Header.html
+1
-1
GlossaryDetailLayoutView.js
...rdv3/public/js/views/glossary/GlossaryDetailLayoutView.js
+3
-1
ClassificationTreeLayoutView.js
...blic/js/views/search/tree/ClassificationTreeLayoutView.js
+74
-44
CustomFilterTreeLayoutView.js
...public/js/views/search/tree/CustomFilterTreeLayoutView.js
+52
-4
EntityTreeLayoutView.js
...ardv3/public/js/views/search/tree/EntityTreeLayoutView.js
+8
-4
GlossaryTreeLayoutView.js
...dv3/public/js/views/search/tree/GlossaryTreeLayoutView.js
+12
-0
No files found.
dashboardv3/public/css/scss/leftsidebar.scss
View file @
6b100410
...
@@ -47,6 +47,10 @@
...
@@ -47,6 +47,10 @@
}
}
}
}
}
}
.dropdown-toggle
{
width
:
15px
;
}
}
}
.filter-tree-content
{
.filter-tree-content
{
...
@@ -164,6 +168,7 @@
...
@@ -164,6 +168,7 @@
.dropdown-menu
{
.dropdown-menu
{
min-width
:
182px
;
min-width
:
182px
;
left
:
-155px
;
&
>
li
{
&
>
li
{
padding
:
3px
15px
;
padding
:
3px
15px
;
...
@@ -177,18 +182,40 @@
...
@@ -177,18 +182,40 @@
background-color
:
$color_havelock_blue_approx
;
background-color
:
$color_havelock_blue_approx
;
color
:
#fff
!
important
;
color
:
#fff
!
important
;
}
}
span
{
color
:
#fff
!
important
;
}
}
}
a
{
a
{
display
:
inline-block
;
display
:
inline-block
;
padding
:
0px
3px
;
padding
:
0px
3px
;
}
}
span
{
color
:
#686868
;
margin-left
:
10px
;
}
}
}
}
}
.custom-filter
{
.custom-filter
{
.fa
{
.fa-circle-thin
:after
{
font-size
:
12px
;
font-family
:
Source
Sans
Pro
,
sans-serif
;
position
:
absolute
;
left
:
0px
;
margin-left
:
9px
;
font-size
:
11px
;
font-weight
:
bold
;
}
.advance-tree
:after
{
content
:
"A"
;
}
.basic-tree
:after
{
content
:
"B"
;
}
}
}
}
...
...
dashboardv3/public/img/atlas-logo-beta-ui.png
0 → 100644
View file @
6b100410
10.1 KB
dashboardv3/public/js/templates/search/tree/ClassificationTreeLayoutView_tmpl.html
View file @
6b100410
...
@@ -18,16 +18,19 @@
...
@@ -18,16 +18,19 @@
<div
class=
"panel-heading dash-button-icon"
data-toggle=
"collapse"
aria-expanded=
"true"
href=
"#c_classfication"
>
<div
class=
"panel-heading dash-button-icon"
data-toggle=
"collapse"
aria-expanded=
"true"
href=
"#c_classfication"
>
<i
class=
"ec-icon fa"
></i>
<i
class=
"ec-icon fa"
></i>
<h4
class=
"panel-title"
>
Classifications
</h4>
<h4
class=
"panel-title"
>
Classifications
</h4>
<div
class=
"btn-group pull-right menu-items"
>
<div
class=
"btn-group pull-right"
>
<!-- <button type="button" class="typeRefresh" data-id="groupOrFlatTreeView" data-type="classification" title="Show flat tree">
<i class="fa fa-sitemap"></i>
</button> -->
<button
type=
"button"
class=
"typeRefresh"
data-id=
"refreshTree"
data-type=
"classification"
title=
"Refresh"
>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"refreshTree"
data-type=
"classification"
title=
"Refresh"
>
<i
class=
"fa fa-refresh"
></i>
<i
class=
"fa fa-refresh"
></i>
</button>
</button>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"showEmptyClassifications"
title=
"Show unused classification"
>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"showEmptyClassifications"
title=
"Show unused classification"
>
<i
class=
"fa fa-toggle-off"
></i>
<i
class=
"fa fa-toggle-off"
></i>
</button>
</button>
<button
type=
"button"
data-id=
"createTag"
data-type=
"classification"
title=
"Create Classification"
>
<
!-- <
button type="button" data-id="createTag" data-type="classification" title="Create Classification">
<i class="fa fa-plus"></i>
<i class="fa fa-plus"></i>
</button>
</button>
-->
<!-- <ul class="dropdown-menu right-align tree-menu">
<!-- <ul class="dropdown-menu right-align tree-menu">
<li data-id="createTag"><i class="fa fa-plus"></i><a>Create Classification</a></li>
<li data-id="createTag"><i class="fa fa-plus"></i><a>Create Classification</a></li>
<li data-id="showEmptyClassifications"><i class="fa fa-check-circle"></i> <a>Show Empty</a></li>
<li data-id="showEmptyClassifications"><i class="fa fa-check-circle"></i> <a>Show Empty</a></li>
...
@@ -35,6 +38,19 @@
...
@@ -35,6 +38,19 @@
<!-- <button data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" type="button" data-id="tagMenu">
<!-- <button data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" type="button" data-id="tagMenu">
<i class="fa fa-ellipsis-v"></i>
<i class="fa fa-ellipsis-v"></i>
</button> -->
</button> -->
<button
type=
"button"
class=
"typeRefresh dropdown"
>
<div
class=
" btn-secondary dropdown-toggle"
type=
"button"
id=
"dropdownMenuButton"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
<i
class=
"fa fa-ellipsis-v"
></i>
</div>
<ul
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuButton"
>
<li
data-id=
"groupOrFlatTreeView"
data-type=
"classification"
>
<i
class=
"fa fa-list-ul"
></i><span>
Show flat tree
</span>
</li>
<!-- <li data-id="showEmptyClassifications" data-type="classification"> <i class="fa fa-toggle-off"></i><span>Show unused classification</span>
</li> -->
<li
data-id=
"createTag"
data-type=
"classification"
>
<i
class=
"fa fa-plus"
></i><span>
Create Classification
</span>
</li>
</ul>
</button>
</div>
</div>
</div>
</div>
<div
id=
"c_classfication"
class=
"panel-collapse collapse jstree-with-action in"
>
<div
id=
"c_classfication"
class=
"panel-collapse collapse jstree-with-action in"
>
...
...
dashboardv3/public/js/templates/search/tree/CustomFilterTreeLayoutView_tmpl.html
View file @
6b100410
...
@@ -18,16 +18,30 @@
...
@@ -18,16 +18,30 @@
<div
class=
"panel-heading dash-button-icon"
data-toggle=
"collapse"
aria-expanded=
"true"
href=
"#c_customFilter"
>
<div
class=
"panel-heading dash-button-icon"
data-toggle=
"collapse"
aria-expanded=
"true"
href=
"#c_customFilter"
>
<i
class=
"ec-icon fa"
></i>
<i
class=
"ec-icon fa"
></i>
<h4
class=
"panel-title"
>
Custom Filters
</h4>
<h4
class=
"panel-title"
>
Custom Filters
</h4>
<div
class=
"btn-group pull-right menu-items"
>
<div
class=
"btn-group pull-right "
>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"groupOrFlatTreeView"
data-type=
"customFilter"
title=
"Show all"
>
<i
class=
"fa fa-sitemap"
></i>
</button>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"refreshTree"
data-type=
"CustomFilter"
title=
"Refresh"
>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"refreshTree"
data-type=
"CustomFilter"
title=
"Refresh"
>
<i
class=
"fa fa-refresh"
></i>
<i
class=
"fa fa-refresh"
></i>
</button>
</button>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"showCustomFilter"
title=
"Show Advanced search"
>
<
!-- <
button type="button" class="typeRefresh" data-id="showCustomFilter" title="Show Advanced search">
<i class="fa fa-toggle-on switch-button"></i>
<i class="fa fa-toggle-on switch-button"></i>
</button>
</button> -->
<!-- <button type="button" class="typeRefresh dropdown">
<div class=" btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-ellipsis-v"></i>
</div>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<li data-id="groupOrFlatTreeView" data-type="customFilter"> <i class="fa fa-sitemap"></i><span>Show flat tree</span>
</li>
<li data-id="refreshTree" data-type="customFilter"><i class="fa fa-refresh"></i><span>Refresh</span>
</li>
</ul>
</button> -->
</div>
</div>
</div>
</div>
<div
id=
"c_customFilter"
class=
"panel-collapse collapse jstree-with-action in"
>
<div
id=
"c_customFilter"
class=
"panel-collapse collapse jstree-with-action in"
>
<div
class=
"custom-filter"
data-id=
"customFilterSearchTree"
></div>
<div
class=
"custom-filter"
data-id=
"customFilterSearchTree"
></div>
</div>
</div>
</div>
</div>
\ No newline at end of file
dashboardv3/public/js/templates/search/tree/EntityTreeLayoutView_tmpl.html
View file @
6b100410
...
@@ -18,10 +18,10 @@
...
@@ -18,10 +18,10 @@
<div
class=
"panel-heading dash-button-icon"
data-toggle=
"collapse"
aria-expanded=
"true"
href=
"#c_entity"
>
<div
class=
"panel-heading dash-button-icon"
data-toggle=
"collapse"
aria-expanded=
"true"
href=
"#c_entity"
>
<i
class=
"ec-icon fa"
></i>
<i
class=
"ec-icon fa"
></i>
<h4
class=
"panel-title"
>
Entities
</h4>
<h4
class=
"panel-title"
>
Entities
</h4>
<div
class=
"btn-group pull-right
menu-items
"
>
<div
class=
"btn-group pull-right"
>
<
button
type=
"button"
class=
"typeRefresh"
data-id=
"groupOrFlatTreeView"
data-type=
"entity"
title=
"Show group
tree"
>
<
!-- <button type="button" class="typeRefresh" data-id="groupOrFlatTreeView" data-type="entity" title="Show flat
tree">
<i
class=
"fa fa-sitemap
group-tree-deactivate
"
></i>
<i class="fa fa-sitemap"></i>
</button>
</button>
-->
<button
type=
"button"
class=
"typeRefresh"
data-id=
"refreshTree"
data-type=
"entity"
title=
"Refresh"
>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"refreshTree"
data-type=
"entity"
title=
"Refresh"
>
<i
class=
"fa fa-refresh"
></i>
<i
class=
"fa fa-refresh"
></i>
</button>
</button>
...
@@ -33,9 +33,19 @@
...
@@ -33,9 +33,19 @@
<button
type=
"button"
class=
"typeRefresh"
data-id=
"showEmptyServiceType"
data-type=
"entity"
title=
"Show empty service types"
>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"showEmptyServiceType"
data-type=
"entity"
title=
"Show empty service types"
>
<i
class=
"fa fa-toggle-off"
></i>
<i
class=
"fa fa-toggle-off"
></i>
</button>
</button>
<!-- <button class="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" type="button">
<button
type=
"button"
class=
"typeRefresh dropdown"
>
<i class="fa fa-ellipsis-v"></i>
<div
class=
" btn-secondary dropdown-toggle"
type=
"button"
id=
"dropdownMenuButton"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
</button> -->
<i
class=
"fa fa-ellipsis-v"
></i>
</div>
<ul
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuButton"
>
<li
data-id=
"groupOrFlatTreeView"
data-type=
"entity"
>
<i
class=
"fa fa-list-ul"
></i><span>
Show flat tree
</span>
</li>
<!-- <li data-id="showEmptyServiceType" data-type="entity"> <i class="fa fa-toggle-off"></i><span >Show empty service types</span>
</li>
<li data-id="refreshTree" data-type="entity"><i class="fa fa-refresh"></i><span >Refresh</span>
</li> -->
</ul>
</button>
</div>
</div>
</div>
</div>
<div
id=
"c_entity"
class=
"panel-collapse collapse jstree-with-action in"
>
<div
id=
"c_entity"
class=
"panel-collapse collapse jstree-with-action in"
>
...
...
dashboardv3/public/js/templates/search/tree/GlossaryTreeLayoutView_tmpl.html
View file @
6b100410
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<div
class=
"panel-heading dash-button-icon"
data-toggle=
"collapse"
aria-expanded=
"true"
href=
"#c_term"
>
<div
class=
"panel-heading dash-button-icon"
data-toggle=
"collapse"
aria-expanded=
"true"
href=
"#c_term"
>
<i
class=
"ec-icon fa"
></i>
<i
class=
"ec-icon fa"
></i>
<h4
class=
"panel-title"
>
Glossaries
</h4>
<h4
class=
"panel-title"
>
Glossaries
</h4>
<div
class=
"btn-group pull-right
menu-items
"
>
<div
class=
"btn-group pull-right"
>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"refreshTree"
data-type=
"term"
title=
"Refresh"
><i
class=
"fa fa-refresh"
></i></button>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"refreshTree"
data-type=
"term"
title=
"Refresh"
><i
class=
"fa fa-refresh"
></i></button>
<!-- <ul class="dropdown-menu right-align tree-menu">
<!-- <ul class="dropdown-menu right-align tree-menu">
<li data-id="createGlossary"><i class="fa fa-plus"></i> <a>Create Glossary</a></li>
<li data-id="createGlossary"><i class="fa fa-plus"></i> <a>Create Glossary</a></li>
...
@@ -26,8 +26,23 @@
...
@@ -26,8 +26,23 @@
<button
type=
"button"
class=
"typeRefresh"
data-id=
"showGlossaryType"
title=
"Show Category"
>
<button
type=
"button"
class=
"typeRefresh"
data-id=
"showGlossaryType"
title=
"Show Category"
>
<i
class=
"fa fa-toggle-on switch-button"
></i>
<i
class=
"fa fa-toggle-on switch-button"
></i>
</button>
</button>
<button
title=
"Create Glossary"
type=
"button"
data-id=
"createGlossary"
><i
class=
"fa fa-plus"
></i></button>
<!-- <button title="Create Glossary" type="button" data-id="createGlossary">
<!-- <button data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" type="button" data-id="termMenu"><i class="fa fa-ellipsis-v"></i></button> -->
<i class="fa fa-plus"></i>
</button> -->
<!-- <button data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" type="button" data-id="termMenu"><i class="fa fa-ellipsis-v"></i></button> -->
<button
type=
"button"
class=
"typeRefresh dropdown"
>
<div
class=
" btn-secondary dropdown-toggle"
type=
"button"
id=
"dropdownMenuButton"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
<i
class=
"fa fa-ellipsis-v"
></i>
</div>
<ul
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuButton"
>
<!-- <li data-id="showGlossaryType" data-type="term"> <i class="fa fa-toggle-on switch-button"></i><span>Show Category</span>
</li> -->
<!-- <li data-id="refreshTree" data-type="term"><i class="fa fa-refresh"></i><span>Refresh</span>
</li> -->
<li
data-id=
"createGlossary"
data-type=
"term"
>
<i
class=
"fa fa-plus"
></i><span>
Create Glossary
</span>
</li>
</ul>
</button>
</div>
</div>
</div>
</div>
<div
id=
"c_term"
class=
"panel-collapse collapse jstree-with-action in"
>
<div
id=
"c_term"
class=
"panel-collapse collapse jstree-with-action in"
>
...
...
dashboardv3/public/js/templates/site/Header.html
View file @
6b100410
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<tr>
<tr>
<td>
<td>
<ul
class=
"nav navbar-nav"
>
<ul
class=
"nav navbar-nav"
>
<a
href=
"#/"
><img
src=
"img/atlas-logo-beta-
side
.png"
class=
"logo"
></a>
<a
href=
"#/"
><img
src=
"img/atlas-logo-beta-
ui
.png"
class=
"logo"
></a>
</ul>
</ul>
</td>
</td>
<td
class=
"global-search-container"
>
<td
class=
"global-search-container"
>
...
...
dashboardv3/public/js/views/glossary/GlossaryDetailLayoutView.js
View file @
6b100410
...
@@ -157,7 +157,9 @@ define(['require',
...
@@ -157,7 +157,9 @@ define(['require',
}
}
});
});
}
}
that
.
glossaryCollection
.
trigger
(
"update:details"
,
{
data
:
that
.
data
});
that
.
options
.
categoryEvent
.
trigger
(
"Success:TermRename"
,
true
);
// that.glossaryCollection.trigger("test");
// that.glossaryCollection.trigger("update:details", { data: that.data });
}
}
that
.
data
=
data
;
that
.
data
=
data
;
that
.
renderDetails
(
that
.
data
);
that
.
renderDetails
(
that
.
data
);
...
...
dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
View file @
6b100410
...
@@ -36,6 +36,7 @@ define([
...
@@ -36,6 +36,7 @@ define([
ui
:
{
ui
:
{
//refresh
//refresh
refreshTree
:
'[data-id="refreshTree"]'
,
refreshTree
:
'[data-id="refreshTree"]'
,
groupOrFlatTree
:
'[data-id="groupOrFlatTreeView"]'
,
// menuItems: '.menu-items>ul>li',
// menuItems: '.menu-items>ul>li',
...
@@ -70,10 +71,24 @@ define([
...
@@ -70,10 +71,24 @@ define([
events
[
"click "
+
this
.
ui
.
showEmptyClassifications
]
=
function
(
e
)
{
events
[
"click "
+
this
.
ui
.
showEmptyClassifications
]
=
function
(
e
)
{
var
getTreeData
,
displayText
;
var
getTreeData
,
displayText
;
e
.
stopPropagation
();
this
.
isEmptyClassification
=
!
this
.
isEmptyClassification
;
this
.
isEmptyClassification
=
!
this
.
isEmptyClassification
;
this
.
classificationSwitchBtnUpdate
();
this
.
classificationSwitchBtnUpdate
();
};
};
events
[
"click "
+
this
.
ui
.
groupOrFlatTree
]
=
function
(
e
)
{
var
type
=
$
(
e
.
currentTarget
).
data
(
"type"
);
e
.
stopPropagation
();
this
.
isGroupView
=
!
this
.
isGroupView
;
// this.ui.groupOrFlatTree.attr("data-original-title", (this.isGroupView ? "Show flat tree" : "Show group tree"));
this
.
ui
.
groupOrFlatTree
.
tooltip
(
'hide'
);
// this.ui.groupOrFlatTree.find("i").toggleClass("group-tree-deactivate");
this
.
ui
.
groupOrFlatTree
.
find
(
"i"
).
toggleClass
(
"fa-sitemap fa-list-ul"
);
this
.
ui
.
groupOrFlatTree
.
find
(
"span"
).
html
(
this
.
isGroupView
?
"Show flat tree"
:
"Show group tree"
);
that
.
ui
[
type
+
"SearchTree"
].
jstree
(
true
).
destroy
();
that
.
renderClassificationTree
();
};
return
events
;
return
events
;
},
},
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
...
@@ -97,6 +112,7 @@ define([
...
@@ -97,6 +112,7 @@ define([
this
.
isEmptyClassification
=
true
;
this
.
isEmptyClassification
=
true
;
this
.
entityTreeData
=
{};
this
.
entityTreeData
=
{};
this
.
tagId
=
null
;
this
.
tagId
=
null
;
this
.
isGroupView
=
true
;
},
},
onRender
:
function
()
{
onRender
:
function
()
{
this
.
renderClassificationTree
();
this
.
renderClassificationTree
();
...
@@ -147,6 +163,7 @@ define([
...
@@ -147,6 +163,7 @@ define([
this
.
ui
.
showEmptyClassifications
.
attr
(
"data-original-title"
,
(
this
.
isEmptyClassification
?
"Show"
:
"Hide"
)
+
" unused classification"
);
this
.
ui
.
showEmptyClassifications
.
attr
(
"data-original-title"
,
(
this
.
isEmptyClassification
?
"Show"
:
"Hide"
)
+
" unused classification"
);
this
.
ui
.
showEmptyClassifications
.
tooltip
(
'hide'
);
this
.
ui
.
showEmptyClassifications
.
tooltip
(
'hide'
);
this
.
ui
.
showEmptyClassifications
.
find
(
"i"
).
toggleClass
(
"fa-toggle-on fa-toggle-off"
);
this
.
ui
.
showEmptyClassifications
.
find
(
"i"
).
toggleClass
(
"fa-toggle-on fa-toggle-off"
);
this
.
ui
.
showEmptyClassifications
.
find
(
"span"
).
html
((
this
.
isEmptyClassification
?
"Show"
:
"Hide"
)
+
" unused classification"
);
this
.
ui
.
classificationSearchTree
.
jstree
(
true
).
refresh
();
this
.
ui
.
classificationSearchTree
.
jstree
(
true
).
refresh
();
},
},
createClassificationAction
:
function
()
{
createClassificationAction
:
function
()
{
...
@@ -293,29 +310,30 @@ define([
...
@@ -293,29 +310,30 @@ define([
collection
=
(
options
&&
options
.
collection
)
||
this
.
classificationDefCollection
.
fullCollection
,
collection
=
(
options
&&
options
.
collection
)
||
this
.
classificationDefCollection
.
fullCollection
,
listOfParents
=
[],
listOfParents
=
[],
listWithEmptyParents
=
[],
listWithEmptyParents
=
[],
listWithEmptyParentsFlatView
=
[],
flatViewList
=
[],
isSelectedChild
=
false
,
isSelectedChild
=
false
,
openClassificationNodesState
=
function
(
treeDate
)
{
openClassificationNodesState
=
function
(
treeDate
)
{
if
(
treeDate
.
length
==
1
)
{
//
if (treeDate.length == 1) {
_
.
each
(
treeDate
,
function
(
model
)
{
_
.
each
(
treeDate
,
function
(
model
)
{
model
.
state
[
'opea
ned'
]
=
true
;
model
.
state
[
'ope
ned'
]
=
true
;
})
})
}
//
}
},
},
generateNode
=
function
(
nodeOptions
,
options
,
isChild
)
{
generateNode
=
function
(
nodeOptions
,
options
,
isChild
)
{
var
nodeStructure
=
{
var
nodeStructure
=
{
text
:
nodeOptions
.
name
,
text
:
nodeOptions
.
name
,
name
:
nodeOptions
.
name
,
name
:
nodeOptions
.
name
,
children
:
getChildren
({
children
:
that
.
isGroupView
?
getChildren
({
children
:
isChild
?
nodeOptions
.
model
.
subTypes
:
nodeOptions
.
model
.
get
(
"subTypes"
),
children
:
isChild
?
nodeOptions
.
model
.
subTypes
:
nodeOptions
.
model
.
get
(
"subTypes"
),
parent
:
isChild
?
options
.
parentName
:
nodeOptions
.
name
parent
:
isChild
?
options
.
parentName
:
nodeOptions
.
name
}),
})
:
null
,
type
:
isChild
?
nodeOptions
.
children
.
get
(
"category"
)
:
nodeOptions
.
model
.
get
(
"category"
),
type
:
isChild
?
nodeOptions
.
children
.
get
(
"category"
)
:
nodeOptions
.
model
.
get
(
"category"
),
id
:
isChild
?
nodeOptions
.
children
.
get
(
"guid"
)
:
nodeOptions
.
model
.
get
(
"guid"
),
id
:
isChild
?
nodeOptions
.
children
.
get
(
"guid"
)
:
nodeOptions
.
model
.
get
(
"guid"
),
icon
:
"fa fa-tag"
,
icon
:
"fa fa-tag"
,
gType
:
"Classification"
,
gType
:
"Classification"
,
}
}
return
nodeStructure
;
return
nodeStructure
;
},
},
getChildren
=
function
(
options
)
{
getChildren
=
function
(
options
)
{
...
@@ -346,13 +364,14 @@ define([
...
@@ -346,13 +364,14 @@ define([
},
},
nodeProperties
=
{
nodeProperties
=
{
parent
:
options
.
parentName
,
parent
:
options
.
parentName
,
text
:
tagname
,
guid
:
child
.
get
(
"guid"
),
guid
:
child
.
get
(
"guid"
),
model
:
child
,
model
:
child
,
state
:
{
selected
:
isSelectedChild
}
state
:
{
selected
:
isSelectedChild
,
opened
:
true
}
},
},
isChild
=
true
,
isChild
=
true
,
getNodeDetails
=
generateNode
(
nodeDetails
,
options
,
isChild
),
getNodeDetails
=
generateNode
(
nodeDetails
,
options
,
isChild
),
classificationNode
=
(
_
.
extend
(
nodeProperties
,
getNodeDetail
s
));
classificationNode
=
(
_
.
extend
(
getNodeDetails
,
nodePropertie
s
));
data
.
push
(
classificationNode
);
data
.
push
(
classificationNode
);
if
(
that
.
isEmptyClassification
)
{
if
(
that
.
isEmptyClassification
)
{
var
isTagEntityCount
=
_
.
isNaN
(
tagEntityCount
)
?
0
:
tagEntityCount
;
var
isTagEntityCount
=
_
.
isNaN
(
tagEntityCount
)
?
0
:
tagEntityCount
;
...
@@ -368,45 +387,56 @@ define([
...
@@ -368,45 +387,56 @@ define([
}
}
collection
.
each
(
function
(
model
)
{
collection
.
each
(
function
(
model
)
{
var
modelJSON
=
model
.
toJSON
();
var
modelJSON
=
model
.
toJSON
();
if
(
modelJSON
.
superTypes
.
length
==
0
)
{
var
name
=
modelJSON
.
name
;
var
name
=
modelJSON
.
name
;
var
tagEntityCount
=
that
.
entityCountObj
.
tag
.
tagEntities
[
name
];
var
tagEntityCount
=
that
.
entityCountObj
.
tag
.
tagEntities
[
name
];
var
tagname
=
tagEntityCount
?
name
+
" ("
+
_
.
numberFormatWithComa
(
tagEntityCount
)
+
")"
:
name
,
var
tagname
=
tagEntityCount
?
name
+
" ("
+
_
.
numberFormatWithComa
(
tagEntityCount
)
+
")"
:
name
,
isSelected
=
false
;
isSelected
=
false
;
if
(
that
.
options
.
value
)
{
if
(
that
.
options
.
value
)
{
isSelected
=
that
.
options
.
value
.
tag
?
that
.
options
.
value
.
tag
==
name
:
false
;
isSelected
=
that
.
options
.
value
.
tag
?
that
.
options
.
value
.
tag
==
name
:
false
;
if
(
!
that
.
tagId
)
{
if
(
!
that
.
tagId
)
{
that
.
tagId
=
isSelected
?
model
.
get
(
"guid"
)
:
null
;
that
.
tagId
=
isSelected
?
model
.
get
(
"guid"
)
:
null
;
}
}
}
var
parentNodeDetails
=
{
}
name
:
name
,
var
parentNodeDetails
=
{
model
:
model
,
name
:
name
,
isSelectedChild
:
isSelectedChild
model
:
model
,
},
isSelectedChild
:
isSelectedChild
parentNodeProperties
=
{
},
text
:
tagname
,
parentNodeProperties
=
{
state
:
{
text
:
tagname
,
disabled
:
tagEntityCount
==
0
?
true
:
false
,
state
:
{
selected
:
isSelected
disabled
:
tagEntityCount
==
0
?
true
:
false
,
}
selected
:
isSelected
,
},
opened
:
true
isChild
=
false
,
}
getParentNodeDetails
=
generateNode
(
parentNodeDetails
,
model
,
isChild
),
},
classificationParentNode
=
(
_
.
extend
(
getParentNodeDetails
,
parentNodeProperties
));
isChild
=
false
,
getParentNodeDetails
,
classificationParentNode
,
getParentFlatView
,
classificationParentFlatView
;
if
(
modelJSON
.
superTypes
.
length
==
0
)
{
getParentNodeDetails
=
generateNode
(
parentNodeDetails
,
model
,
isChild
);
classificationParentNode
=
(
_
.
extend
(
getParentNodeDetails
,
parentNodeProperties
));
listOfParents
.
push
(
classificationParentNode
);
listOfParents
.
push
(
classificationParentNode
);
if
(
that
.
isEmptyClassification
)
{
}
var
isTagEntityCount
=
_
.
isNaN
(
tagEntityCount
)
?
0
:
tagEntityCount
;
getParentFlatView
=
generateNode
(
parentNodeDetails
,
model
);
if
(
isTagEntityCount
)
{
classificationParentFlatView
=
(
_
.
extend
(
getParentFlatView
,
parentNodeProperties
));
flatViewList
.
push
(
classificationParentFlatView
);
if
(
that
.
isEmptyClassification
)
{
var
isTagEntityCount
=
_
.
isNaN
(
tagEntityCount
)
?
0
:
tagEntityCount
;
if
(
isTagEntityCount
)
{
if
(
modelJSON
.
superTypes
.
length
==
0
)
{
listWithEmptyParents
.
push
(
classificationParentNode
);
listWithEmptyParents
.
push
(
classificationParentNode
);
}
}
listWithEmptyParentsFlatView
.
push
(
classificationParentFlatView
);
}
}
}
}
});
});
var
classificationData
=
that
.
isEmptyClassification
?
listWithEmptyParents
:
listOfParents
;
var
classificationTreeData
=
that
.
isEmptyClassification
?
listWithEmptyParents
:
listOfParents
;
openClassificationNodesState
(
classificationData
);
var
flatViewClassificaton
=
that
.
isEmptyClassification
?
listWithEmptyParentsFlatView
:
flatViewList
;
var
classificationData
=
that
.
isGroupView
?
classificationTreeData
:
flatViewClassificaton
;
// openClassificationNodesState(classificationData);
return
classificationData
;
return
classificationData
;
},
},
generateSearchTree
:
function
(
options
)
{
generateSearchTree
:
function
(
options
)
{
...
@@ -435,9 +465,9 @@ define([
...
@@ -435,9 +465,9 @@ define([
},
},
node_customize
:
{
node_customize
:
{
default
:
function
(
el
)
{
default
:
function
(
el
)
{
if
(
$
(
el
).
find
(
".fa-ellipsis-h"
).
length
===
0
)
{
//
if ($(el).find(".fa-ellipsis-h").length === 0) {
$
(
el
).
append
(
'<div class="tools"><i class="fa fa-ellipsis-h classificationPopover" rel="popover"></i></div>'
);
$
(
el
).
append
(
'<div class="tools"><i class="fa fa-ellipsis-h classificationPopover" rel="popover"></i></div>'
);
}
//
}
}
}
},
},
core
:
{
core
:
{
...
...
dashboardv3/public/js/views/search/tree/CustomFilterTreeLayoutView.js
View file @
6b100410
...
@@ -42,6 +42,7 @@ define([
...
@@ -42,6 +42,7 @@ define([
ui
:
{
ui
:
{
//refresh
//refresh
refreshTree
:
'[data-id="refreshTree"]'
,
refreshTree
:
'[data-id="refreshTree"]'
,
groupOrFlatTree
:
'[data-id="groupOrFlatTreeView"]'
,
customFilterSearchTree
:
'[data-id="customFilterSearchTree"]'
,
customFilterSearchTree
:
'[data-id="customFilterSearchTree"]'
,
showCustomFilter
:
'[data-id="showCustomFilter"]'
showCustomFilter
:
'[data-id="showCustomFilter"]'
...
@@ -64,6 +65,17 @@ define([
...
@@ -64,6 +65,17 @@ define([
that
.
isBasic
=
!
that
.
isBasic
;
that
.
isBasic
=
!
that
.
isBasic
;
this
.
customFilterSwitchBtnUpdate
();
this
.
customFilterSwitchBtnUpdate
();
};
};
events
[
"click "
+
this
.
ui
.
groupOrFlatTree
]
=
function
(
e
)
{
var
type
=
$
(
e
.
currentTarget
).
data
(
"type"
);
e
.
stopPropagation
();
this
.
isGroupView
=
!
this
.
isGroupView
;
this
.
ui
.
groupOrFlatTree
.
attr
(
"data-original-title"
,
(
this
.
isGroupView
?
"Show all"
:
"Show type"
));
this
.
ui
.
groupOrFlatTree
.
tooltip
(
'hide'
);
this
.
ui
.
groupOrFlatTree
.
find
(
"i"
).
toggleClass
(
"group-tree-deactivate"
);
this
.
ui
.
groupOrFlatTree
.
find
(
"span"
).
html
(
this
.
isGroupView
?
"Show flat tree"
:
"Show group tree"
);
that
.
ui
[
type
+
"SearchTree"
].
jstree
(
true
).
destroy
();
that
.
renderCustomFilter
();
};
return
events
;
return
events
;
},
},
...
@@ -125,6 +137,7 @@ define([
...
@@ -125,6 +137,7 @@ define([
this
.
customFilterData
=
null
;
this
.
customFilterData
=
null
;
this
.
isBasic
=
true
;
this
.
isBasic
=
true
;
this
.
customFilterId
=
null
;
this
.
customFilterId
=
null
;
this
.
isGroupView
=
true
;
},
},
onRender
:
function
()
{
onRender
:
function
()
{
this
.
renderCustomFilter
();
this
.
renderCustomFilter
();
...
@@ -176,7 +189,18 @@ define([
...
@@ -176,7 +189,18 @@ define([
getEntityTreeConfig
=
function
(
opt
)
{
getEntityTreeConfig
=
function
(
opt
)
{
return
{
return
{
plugins
:
[
"search"
,
"core"
,
"sort"
,
"conditionalselect"
,
"changed"
,
"wholerow"
,
"node_customize"
],
plugins
:
[
"search"
,
"core"
,
"sort"
,
"conditionalselect"
,
"changed"
,
"wholerow"
,
"node_customize"
],
conditionalselect
:
function
(
node
)
{
var
type
=
node
.
original
.
type
;
if
(
type
==
"customFilterFolder"
)
{
if
(
node
.
children
.
length
)
{
return
false
;
}
else
{
return
true
;
}
}
else
{
return
true
;
}
},
state
:
{
opened
:
true
},
state
:
{
opened
:
true
},
search
:
{
search
:
{
show_only_matches
:
true
,
show_only_matches
:
true
,
...
@@ -193,7 +217,6 @@ define([
...
@@ -193,7 +217,6 @@ define([
multiple
:
false
,
multiple
:
false
,
data
:
function
(
node
,
cb
)
{
data
:
function
(
node
,
cb
)
{
if
(
node
.
id
===
"#"
)
{
if
(
node
.
id
===
"#"
)
{
var
testData
=
that
.
getCustomFilterTree
();
cb
(
that
.
getCustomFilterTree
());
cb
(
that
.
getCustomFilterTree
());
}
}
}
}
...
@@ -249,6 +272,7 @@ define([
...
@@ -249,6 +272,7 @@ define([
var
that
=
this
,
var
that
=
this
,
customFilterBasicList
=
[],
customFilterBasicList
=
[],
customFilterAdvanceList
=
[],
customFilterAdvanceList
=
[],
allCustomFilter
=
[],
customFilterBasicTreeData
=
that
.
saveSearchBaiscCollection
.
fullCollection
.
models
,
customFilterBasicTreeData
=
that
.
saveSearchBaiscCollection
.
fullCollection
.
models
,
customFilterAdvanceTreeData
=
that
.
saveSearchAdvanceCollection
.
fullCollection
.
models
,
customFilterAdvanceTreeData
=
that
.
saveSearchAdvanceCollection
.
fullCollection
.
models
,
openClassificationNodesState
=
function
(
treeDate
)
{
openClassificationNodesState
=
function
(
treeDate
)
{
...
@@ -259,12 +283,13 @@ define([
...
@@ -259,12 +283,13 @@ define([
}
}
},
},
generateNode
=
function
(
nodeOptions
)
{
generateNode
=
function
(
nodeOptions
)
{
var
searchType
=
nodeOptions
.
get
(
'searchType'
);
var
nodeStructure
=
{
var
nodeStructure
=
{
text
:
nodeOptions
.
get
(
'name'
),
text
:
nodeOptions
.
get
(
'name'
),
name
:
nodeOptions
.
get
(
'name'
),
name
:
nodeOptions
.
get
(
'name'
),
type
:
"customFilter"
,
type
:
"customFilter"
,
id
:
nodeOptions
.
get
(
'guid'
),
id
:
nodeOptions
.
get
(
'guid'
),
icon
:
"fa fa-search"
,
icon
:
(
searchType
===
'BASIC'
?
"fa fa-circle-thin basic-tree"
:
"fa fa-circle-thin advance-tree"
)
,
gType
:
"CustomFilter"
,
gType
:
"CustomFilter"
,
model
:
nodeOptions
model
:
nodeOptions
}
}
...
@@ -274,11 +299,32 @@ define([
...
@@ -274,11 +299,32 @@ define([
that
.
customFilterId
=
null
;
that
.
customFilterId
=
null
;
_
.
each
(
customFilterBasicTreeData
,
function
(
filterNode
)
{
_
.
each
(
customFilterBasicTreeData
,
function
(
filterNode
)
{
customFilterBasicList
.
push
(
generateNode
(
filterNode
));
customFilterBasicList
.
push
(
generateNode
(
filterNode
));
allCustomFilter
.
push
(
generateNode
(
filterNode
));
});
});
_
.
each
(
customFilterAdvanceTreeData
,
function
(
filterNode
)
{
_
.
each
(
customFilterAdvanceTreeData
,
function
(
filterNode
)
{
customFilterAdvanceList
.
push
(
generateNode
(
filterNode
));
customFilterAdvanceList
.
push
(
generateNode
(
filterNode
));
allCustomFilter
.
push
(
generateNode
(
filterNode
));
});
});
var
customFilterList
=
that
.
isBasic
?
customFilterBasicList
:
customFilterAdvanceList
;
// var customFilterList = that.isBasic ? customFilterBasicList : customFilterAdvanceList;
var
treeView
=
[{
icon
:
"fa fa-folder-o"
,
gType
:
"customFilter"
,
type
:
"customFilterFolder"
,
children
:
customFilterBasicList
,
text
:
"Basic Search"
,
name
:
"Basic Search"
,
state
:
{
opened
:
true
}
},
{
icon
:
"fa fa-folder-o"
,
gType
:
"customFilter"
,
type
:
"customFilterFolder"
,
children
:
customFilterAdvanceList
,
text
:
"Advance Search"
,
name
:
"Advance Search"
,
state
:
{
opened
:
true
}
}];
var
customFilterList
=
that
.
isGroupView
?
treeView
:
allCustomFilter
;
return
customFilterList
;
return
customFilterList
;
},
},
onNodeSelect
:
function
(
nodeData
)
{
onNodeSelect
:
function
(
nodeData
)
{
...
@@ -289,11 +335,13 @@ define([
...
@@ -289,11 +335,13 @@ define([
that
.
customFilterId
=
selectedNodeId
;
that
.
customFilterId
=
selectedNodeId
;
if
(
options
&&
options
.
model
)
{
if
(
options
&&
options
.
model
)
{
var
searchParameters
=
options
.
model
.
get
(
'searchParameters'
),
var
searchParameters
=
options
.
model
.
get
(
'searchParameters'
),
searchType
=
options
.
model
.
get
(
'searchType'
),
params
=
CommonViewFunction
.
generateUrlFromSaveSearchObject
({
params
=
CommonViewFunction
.
generateUrlFromSaveSearchObject
({
value
:
{
"searchParameters"
:
searchParameters
},
value
:
{
"searchParameters"
:
searchParameters
},
classificationDefCollection
:
that
.
classificationDefCollection
,
classificationDefCollection
:
that
.
classificationDefCollection
,
entityDefCollection
:
that
.
entityDefCollection
entityDefCollection
:
that
.
entityDefCollection
});
});
searchType
===
'ADVANCED'
?
that
.
isBasic
=
false
:
that
.
isBasic
=
true
;
_
.
extend
({},
this
.
options
.
value
,
params
),
_
.
extend
({},
this
.
options
.
value
,
params
),
Utils
.
setUrl
({
Utils
.
setUrl
({
...
...
dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js
View file @
6b100410
...
@@ -61,6 +61,7 @@ define([
...
@@ -61,6 +61,7 @@ define([
// show and hide entities and classifications with 0 numbers
// show and hide entities and classifications with 0 numbers
events
[
"click "
+
this
.
ui
.
showEmptyServiceType
]
=
function
(
e
)
{
events
[
"click "
+
this
.
ui
.
showEmptyServiceType
]
=
function
(
e
)
{
e
.
stopPropagation
();
this
.
isEmptyServicetype
=
!
this
.
isEmptyServicetype
;
this
.
isEmptyServicetype
=
!
this
.
isEmptyServicetype
;
this
.
entitySwitchBtnUpdate
();
this
.
entitySwitchBtnUpdate
();
};
};
...
@@ -69,9 +70,12 @@ define([
...
@@ -69,9 +70,12 @@ define([
var
type
=
$
(
e
.
currentTarget
).
data
(
"type"
);
var
type
=
$
(
e
.
currentTarget
).
data
(
"type"
);
e
.
stopPropagation
();
e
.
stopPropagation
();
this
.
isGroupView
=
!
this
.
isGroupView
;
this
.
isGroupView
=
!
this
.
isGroupView
;
this
.
ui
.
groupOrFlatTree
.
attr
(
"data-original-title"
,
(
this
.
isGroupView
?
"Show flat tree"
:
"Show group tree"
));
//
this.ui.groupOrFlatTree.attr("data-original-title", (this.isGroupView ? "Show flat tree" : "Show group tree"));
this
.
ui
.
groupOrFlatTree
.
tooltip
(
'hide'
);
this
.
ui
.
groupOrFlatTree
.
tooltip
(
'hide'
);
this
.
ui
.
groupOrFlatTree
.
find
(
"i"
).
toggleClass
(
"group-tree-deactivate"
);
// this.ui.groupOrFlatTree.find("i").toggleClass("group-tree-deactivate");
this
.
ui
.
groupOrFlatTree
.
find
(
"i"
).
toggleClass
(
"fa-sitemap fa-list-ul"
);
this
.
ui
.
groupOrFlatTree
.
find
(
"span"
).
html
(
this
.
isGroupView
?
"Show flat tree"
:
"Show group tree"
);
that
.
ui
[
type
+
"SearchTree"
].
jstree
(
true
).
destroy
();
that
.
ui
[
type
+
"SearchTree"
].
jstree
(
true
).
destroy
();
that
.
renderEntityTree
();
that
.
renderEntityTree
();
};
};
...
@@ -121,7 +125,7 @@ define([
...
@@ -121,7 +125,7 @@ define([
this
.
isEmptyServicetype
=
true
;
this
.
isEmptyServicetype
=
true
;
this
.
entityTreeData
=
{};
this
.
entityTreeData
=
{};
this
.
typeId
=
null
;
this
.
typeId
=
null
;
this
.
isGroupView
=
fals
e
;
this
.
isGroupView
=
tru
e
;
},
},
onRender
:
function
()
{
onRender
:
function
()
{
this
.
renderEntityTree
();
this
.
renderEntityTree
();
...
@@ -158,6 +162,7 @@ define([
...
@@ -158,6 +162,7 @@ define([
this
.
ui
.
showEmptyServiceType
.
attr
(
"data-original-title"
,
(
this
.
isEmptyServicetype
?
"Show"
:
"Hide"
)
+
" empty service types"
);
this
.
ui
.
showEmptyServiceType
.
attr
(
"data-original-title"
,
(
this
.
isEmptyServicetype
?
"Show"
:
"Hide"
)
+
" empty service types"
);
this
.
ui
.
showEmptyServiceType
.
tooltip
(
'hide'
);
this
.
ui
.
showEmptyServiceType
.
tooltip
(
'hide'
);
this
.
ui
.
showEmptyServiceType
.
find
(
"i"
).
toggleClass
(
"fa-toggle-on fa-toggle-off"
);
this
.
ui
.
showEmptyServiceType
.
find
(
"i"
).
toggleClass
(
"fa-toggle-on fa-toggle-off"
);
// this.ui.showEmptyServiceType.find("span").html((this.isEmptyServicetype ? "Show" : "Hide") + " empty service types");
this
.
ui
.
entitySearchTree
.
jstree
(
true
).
refresh
();
this
.
ui
.
entitySearchTree
.
jstree
(
true
).
refresh
();
},
},
manualRender
:
function
(
options
)
{
manualRender
:
function
(
options
)
{
...
@@ -173,7 +178,6 @@ define([
...
@@ -173,7 +178,6 @@ define([
var
dataFound
=
this
.
typeHeaders
.
fullCollection
.
find
(
function
(
obj
)
{
var
dataFound
=
this
.
typeHeaders
.
fullCollection
.
find
(
function
(
obj
)
{
return
obj
.
get
(
"name"
)
===
that
.
options
.
value
.
type
return
obj
.
get
(
"name"
)
===
that
.
options
.
value
.
type
});
});
if
(
dataFound
)
{
if
(
dataFound
)
{
if
((
this
.
typeId
&&
this
.
typeId
!==
dataFound
.
get
(
"guid"
))
||
this
.
typeId
===
null
)
{
if
((
this
.
typeId
&&
this
.
typeId
!==
dataFound
.
get
(
"guid"
))
||
this
.
typeId
===
null
)
{
if
(
this
.
typeId
)
{
if
(
this
.
typeId
)
{
...
...
dashboardv3/public/js/views/search/tree/GlossaryTreeLayoutView.js
View file @
6b100410
...
@@ -74,6 +74,7 @@ define([
...
@@ -74,6 +74,7 @@ define([
events
[
"click "
+
this
.
ui
.
showGlossaryType
]
=
function
(
e
)
{
events
[
"click "
+
this
.
ui
.
showGlossaryType
]
=
function
(
e
)
{
var
getTreeData
,
displayText
;
var
getTreeData
,
displayText
;
e
.
stopPropagation
();
this
.
isTermView
=
!
this
.
isTermView
;
this
.
isTermView
=
!
this
.
isTermView
;
this
.
glossarySwitchBtnUpdate
();
this
.
glossarySwitchBtnUpdate
();
};
};
...
@@ -93,6 +94,12 @@ define([
...
@@ -93,6 +94,12 @@ define([
},
},
this
this
);
);
if
(
this
.
options
.
categoryEvent
)
{
this
.
options
.
categoryEvent
.
on
(
"Success:TermRename"
,
function
(
options
)
{
that
.
refresh
();
})
}
$
(
'body'
).
on
(
'click'
,
'.termPopoverOptions li, .categoryPopoverOptions li'
,
function
(
e
)
{
$
(
'body'
).
on
(
'click'
,
'.termPopoverOptions li, .categoryPopoverOptions li'
,
function
(
e
)
{
that
.
$
(
'.termPopover,.categoryPopover'
).
popover
(
'hide'
);
that
.
$
(
'.termPopover,.categoryPopover'
).
popover
(
'hide'
);
that
[
$
(
this
).
find
(
'a'
).
data
(
'fn'
)](
e
)
that
[
$
(
this
).
find
(
'a'
).
data
(
'fn'
)](
e
)
...
@@ -103,6 +110,7 @@ define([
...
@@ -103,6 +110,7 @@ define([
this
.
ui
.
showGlossaryType
.
attr
(
"data-original-title"
,
(
this
.
isTermView
?
"Show Category"
:
"Show Term"
));
this
.
ui
.
showGlossaryType
.
attr
(
"data-original-title"
,
(
this
.
isTermView
?
"Show Category"
:
"Show Term"
));
this
.
ui
.
showGlossaryType
.
tooltip
(
'hide'
);
this
.
ui
.
showGlossaryType
.
tooltip
(
'hide'
);
this
.
ui
.
showGlossaryType
.
find
(
"i"
).
toggleClass
(
"switch-button"
);
this
.
ui
.
showGlossaryType
.
find
(
"i"
).
toggleClass
(
"switch-button"
);
// this.ui.showGlossaryType.find("span").html(this.isTermView ? "Show Category" : "Show Term");
this
.
ui
.
termSearchTree
.
jstree
(
true
).
refresh
();
this
.
ui
.
termSearchTree
.
jstree
(
true
).
refresh
();
//this.showDefaultPage();
//this.showDefaultPage();
// if(this.isTermView){
// if(this.isTermView){
...
@@ -146,6 +154,10 @@ define([
...
@@ -146,6 +154,10 @@ define([
this
.
fetchGlossary
();
this
.
fetchGlossary
();
},
},
onBeforeDestroy
:
function
()
{
this
.
options
.
categoryEvent
.
off
(
"Success:TermRename"
)
},
getViewType
:
function
()
{
getViewType
:
function
()
{
if
(
this
.
options
.
value
)
{
if
(
this
.
options
.
value
)
{
this
.
isTermView
=
this
.
options
.
value
.
viewType
?
this
.
options
.
value
.
viewType
==
"term"
?
true
:
false
:
true
;
this
.
isTermView
=
this
.
options
.
value
.
viewType
?
this
.
options
.
value
.
viewType
==
"term"
?
true
:
false
:
true
;
...
...
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