Commit d9e4f6a8 authored by akiraohgaki's avatar akiraohgaki

Re-order a buttons

parent f9b41444
......@@ -110,10 +110,10 @@ export default class CollectioninstalledComponent extends BaseComponent {
<h4 data-name>${file}</h4>
</div>
<nav data-action>
<button data-action="ocsManager_openUrl" data-url="${fileUrl}">${openButtonText}</button>
<button data-action="ocsManager_applyTheme"
data-path="${filePath}" data-install-type="${state.installType}"
data-state="${applyButtonState}">Apply</button>
<button data-action="ocsManager_openUrl" data-url="${fileUrl}">${openButtonText}</button>
<button data-action="ocsManager_uninstall" data-item-key="${key}">Delete</button>
</nav>
</li>
......@@ -129,15 +129,15 @@ export default class CollectioninstalledComponent extends BaseComponent {
if (event.target.closest('button[data-action]')) {
const target = event.target.closest('button[data-action]');
switch (target.getAttribute('data-action')) {
case 'ocsManager_openUrl':
this.dispatch('ocsManager_openUrl', {url: target.getAttribute('data-url')});
break;
case 'ocsManager_applyTheme':
this.dispatch('ocsManager_applyTheme', {
path: target.getAttribute('data-path'),
installType: target.getAttribute('data-install-type')
});
break;
case 'ocsManager_openUrl':
this.dispatch('ocsManager_openUrl', {url: target.getAttribute('data-url')});
break;
case 'ocsManager_uninstall':
this.dispatch('ocsManager_uninstall', {itemKey: target.getAttribute('data-item-key')});
target.closest('li').remove();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment