mirror of
https://github.com/filegator/filegator.git
synced 2025-08-12 08:54:10 +02:00
fixes #81 right-click opens context menu
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
* zip adapter fix
|
* zip adapter fix
|
||||||
* composer update dependencies
|
* composer update dependencies
|
||||||
* npm update / audit fix
|
* npm update / audit fix
|
||||||
|
* right-click opens single file context menu
|
||||||
|
* fixes #81, #86
|
||||||
|
|
||||||
## 7.4.0 - 2020-05-09 ✌️
|
## 7.4.0 - 2020-05-09 ✌️
|
||||||
|
|
||||||
|
@@ -91,6 +91,7 @@
|
|||||||
:checked-rows.sync="checked"
|
:checked-rows.sync="checked"
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
:checkable="can('batchDownload') || can('write') || can('zip')"
|
:checkable="can('batchDownload') || can('write') || can('zip')"
|
||||||
|
@contextmenu="rightClick"
|
||||||
>
|
>
|
||||||
<template slot-scope="props">
|
<template slot-scope="props">
|
||||||
<b-table-column :label="lang('Name')" :custom-sort="sortByName" field="data.name" sortable>
|
<b-table-column :label="lang('Name')" :custom-sort="sortByName" field="data.name" sortable>
|
||||||
@@ -109,7 +110,7 @@
|
|||||||
|
|
||||||
<b-table-column id="single-actions" width="51">
|
<b-table-column id="single-actions" width="51">
|
||||||
<b-dropdown v-if="props.row.type != 'back'" :disabled="checked.length > 0" aria-role="list" position="is-bottom-left">
|
<b-dropdown v-if="props.row.type != 'back'" :disabled="checked.length > 0" aria-role="list" position="is-bottom-left">
|
||||||
<button slot="trigger" class="button is-small">
|
<button :ref="'ref-single-action-button-'+props.row.path" slot="trigger" class="button is-small">
|
||||||
<b-icon icon="ellipsis-h" size="is-small" />
|
<b-icon icon="ellipsis-h" size="is-small" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -263,6 +264,13 @@ export default {
|
|||||||
this.download(item)
|
this.download(item)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
rightClick(row, event) {
|
||||||
|
if (row.type == 'back') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
event.preventDefault()
|
||||||
|
this.$refs['ref-single-action-button-'+row.path].click()
|
||||||
|
},
|
||||||
selectDir() {
|
selectDir() {
|
||||||
this.$modal.open({
|
this.$modal.open({
|
||||||
parent: this,
|
parent: this,
|
||||||
|
@@ -111,6 +111,20 @@ describe('Browser', () => {
|
|||||||
cy.contains('tr.type-file', 'Unzip')
|
cy.contains('tr.type-file', 'Unzip')
|
||||||
cy.contains('tr.type-file', 'Delete')
|
cy.contains('tr.type-file', 'Delete')
|
||||||
cy.contains('tr.type-file', 'Copy link')
|
cy.contains('tr.type-file', 'Copy link')
|
||||||
|
|
||||||
|
// click on single file action button
|
||||||
|
cy.get('.dropdown-trigger').last().click()
|
||||||
|
cy.get('.dropdown-content').last().contains('Download').should('be.visible')
|
||||||
|
// close context menu
|
||||||
|
cy.get('.dropdown-trigger').last().click()
|
||||||
|
cy.get('.dropdown-content').last().contains('Download').should('not.be.visible')
|
||||||
|
|
||||||
|
// right-click on the file row should also open context menu
|
||||||
|
cy.get('tr.type-file').last().rightclick()
|
||||||
|
cy.get('.dropdown-content').last().contains('Download').should('be.visible')
|
||||||
|
// close context menu with another right-click
|
||||||
|
cy.get('tr.type-file').last().rightclick()
|
||||||
|
cy.get('.dropdown-content').last().contains('Download').should('not.be.visible')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('New folder and file', () => {
|
it('New folder and file', () => {
|
||||||
|
Reference in New Issue
Block a user