Skip to content

Commit

Permalink
[OP#41290] Add ui for delete an link between work-package and file (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
SwikritiT committed Apr 12, 2022
1 parent 596b63f commit b66dc63
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 111 deletions.
1 change: 1 addition & 0 deletions css/tab.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ span.icon-openproject {

#tab-open-project {
height: 100%;
padding: 0;
}
4 changes: 4 additions & 0 deletions src/components/tab/SearchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ export default {
}
</script>
<style scoped lang="scss">
#searchBar {
padding: 10px;
}
.searchInput {
width: 100%;
}
Expand Down
8 changes: 6 additions & 2 deletions src/components/tab/WorkPackage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default {
<style scoped lang="scss">
.workpackage {
width: 100%;
padding: 10px 6px 0 6px;
padding: 15px 6px 0 10px;
.row {
display: flex;
Expand All @@ -76,10 +76,10 @@ export default {
margin-right: 4px;
&__title {
mix-blend-mode: multiply;
font-size: 0.75rem;
line-height: 14px;
text-align: center;
filter: contrast(0) brightness(0);
}
}
Expand Down Expand Up @@ -123,4 +123,8 @@ export default {
}
}
}
.workpackage div {
cursor: pointer;
}
</style>
47 changes: 43 additions & 4 deletions src/views/ProjectsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@
<div class="existing-relations">
{{ t('integration_openproject', 'Existing relations:') }}
</div>
<WorkPackage v-for="(workpackage, index) in workpackages"
<div v-for="(workpackage, index) in workpackages"
:key="workpackage.id"
:workpackage="workpackage"
:class="{ 'workpackage-seperator': index !== workpackages.length-1 }" />
class="linked-workpackages">
<div class="linked-workpackages--workpackage">
<WorkPackage :workpackage="workpackage" />
<div class="linked-workpackages--workpackage--unlink icon-noConnection" />
</div>
<div :class="{ 'workpackage-seperator': index !== workpackages.length-1 }" />
</div>
</div>
<EmptyContent v-else
id="openproject-empty-content"
Expand Down Expand Up @@ -70,6 +75,9 @@ export default {
isLoading() {
return this.state === 'loading'
},
unlinkSvg() {
return require('../../img/noConnection.svg')
},
},
methods: {
/**
Expand Down Expand Up @@ -159,8 +167,39 @@ export default {
top: 140%;
}
.workpackage-seperator{
.linked-workpackages--workpackage{
display: flex;
position: relative;
width: 100%;
&--unlink{
position: absolute;
top: 12px;
right: 14px;
height: 15px;
width: 18px;
align-items: center;
filter: contrast(0) brightness(0);
visibility: hidden;
}
}
.linked-workpackages:hover {
background-color: var(--color-background-dark);
}
.linked-workpackages:hover .linked-workpackages--workpackage--unlink {
visibility: visible;
cursor: pointer;
}
.workpackage-seperator {
height: 0;
margin: 0px 10px;
border-bottom: 1px solid rgb(237 237 237);
}
}
body.theme--dark .linked-workpackages--workpackage--unlink{
filter: invert(100%);
}
</style>
Loading

0 comments on commit b66dc63

Please sign in to comment.