Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Helmholtz Centre for Environmental Research – UFZ
IT
RDM
BioMe
tmd
frontend
Commits
fac3af2d
Commit
fac3af2d
authored
3 years ago
by
Moustafa Banqusli
Browse files
Options
Downloads
Patches
Plain Diff
#157
delete unreqired code and using toast editor
parent
a88f647e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!174
Merge develop into master
,
!149
Resolve "Artenkatalog: Markdown Editor überprüfen"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/components/SpeciesCatalogContent.ts
+5
-44
5 additions, 44 deletions
app/src/components/SpeciesCatalogContent.ts
with
5 additions
and
44 deletions
app/src/components/SpeciesCatalogContent.ts
+
5
−
44
View file @
fac3af2d
import
TextEditorViewer
from
"
../components/shared/editor/TextEditorViewer.vue
"
;
import
{
Component
,
Prop
,
Vue
,
Watch
}
from
"
vue-property-decorator
"
;
import
store
from
"
@/store
"
;
import
VueMarkdown
from
"
vue-markdown
"
;
import
MarkdownViewer
from
"
@/components/MarkdownViewer.vue
"
;
import
{
Component
,
Prop
,
Vue
}
from
"
vue-property-decorator
"
;
@
Component
({
components
:
{
TextEditorViewer
,
VueMarkdown
,
MarkdownViewer
},
components
:
{
TextEditorViewer
,
},
})
export
default
class
SpeciesCatalogContent
extends
Vue
{
@
Prop
({
default
:
()
=>
{
return
{};
},
})
private
OpenedLevel
!
:
[];
@
Prop
({
default
:
()
=>
{
return
{};
},
})
private
SelectedItem
!
:
[];
// todo: check if we still need this
private
getSpeciesItems
()
{
const
speciesFamilyList
=
store
.
getters
.
getSpeciesTreeList
;
let
items
:
Array
<
{}
>
=
[];
this
.
OpenedLevel
.
forEach
((
PTNameID
)
=>
{
speciesFamilyList
.
forEach
((
first
:
any
)
=>
{
if
(
PTNameID
===
first
.
ptname_id
)
{
items
=
[];
this
.
setSpeciesChildren
(
items
,
first
);
}
first
.
children
.
forEach
((
second
:
any
)
=>
{
if
(
PTNameID
===
second
.
ptname_id
)
{
items
=
[];
this
.
setSpeciesChildren
(
items
,
second
);
}
second
.
children
.
forEach
((
third
:
any
)
=>
{
if
(
PTNameID
===
third
.
ptname_id
)
{
items
=
[];
this
.
setSpeciesChildren
(
items
,
third
);
}
});
});
});
});
return
items
;
}
private
setSpeciesChildren
(
items
:
Array
<
{}
>
=
[],
level
:
any
)
{
level
.
children
.
forEach
((
item
:
any
)
=>
{
items
.
push
(
item
);
});
}
private
getSelectedParentChildren
()
{
if
(
this
.
SelectedItem
.
length
===
0
)
{
// if nothing selected, do not show children
...
...
@@ -61,7 +22,7 @@ export default class SpeciesCatalogContent extends Vue {
const
items
:
Array
<
{}
>
=
[];
this
.
SelectedItem
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
children
.
length
===
0
)
{
items
.
push
(
item
)
items
.
push
(
item
)
;
}
else
{
item
.
children
.
forEach
((
first
:
any
)
=>
{
items
.
push
(
first
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment