Merge branch 'master' of https://github.com/brkcvn/akaunting into form-elements
This commit is contained in:
@ -68,6 +68,16 @@
|
||||
toggleButton.querySelector("span").classList.remove("ltr:-rotate-90", "rtl:rotate-90");
|
||||
}
|
||||
|
||||
function hiddenSidebar() {
|
||||
sideBar.classList.add("menu-list-hidden");
|
||||
toggleButton.classList.add("ltr:left-12", "rtl:right-12");
|
||||
}
|
||||
|
||||
function unHiddenSidebar() {
|
||||
toggleButton.classList.remove("ltr:left-12", "rtl:right-12");
|
||||
sideBar.classList.remove("menu-list-hidden");
|
||||
}
|
||||
|
||||
//if there are notifications, remove count badge
|
||||
function notificationCount(action) {
|
||||
let notification_count = document.querySelector('[data-notification-count]');
|
||||
@ -83,15 +93,13 @@
|
||||
mobileMenuHidden();
|
||||
} else {
|
||||
if (sideBar.classList.contains("menu-list-hidden")) {
|
||||
toggleButton.classList.remove("ltr:left-12", "rtl:right-12");
|
||||
sideBar.classList.remove("menu-list-hidden");
|
||||
unHiddenSidebar();
|
||||
|
||||
if (document.body.clientWidth > "991") {
|
||||
contentTransitionRight();
|
||||
}
|
||||
} else {
|
||||
sideBar.classList.add("menu-list-hidden");
|
||||
toggleButton.classList.add("ltr:left-12", "rtl:right-12");
|
||||
hiddenSidebar();
|
||||
|
||||
if (document.body.clientWidth > "991") {
|
||||
contentTransitionLeft();
|
||||
@ -142,6 +150,9 @@
|
||||
mainContent.classList.add("hidden");
|
||||
toggleButton.classList.add("invisible");
|
||||
menuClose.classList.remove("hidden");
|
||||
|
||||
unHiddenSidebar();
|
||||
contentTransitionRight();
|
||||
|
||||
notificationCount("none");
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
||||
|
||||
<x-layouts.admin.menu />
|
||||
|
||||
<x-loading.content />
|
||||
|
||||
<div class="main-content xl:ltr:ml-64 xl:rtl:mr-64 transition-all ease-in-out" id="panel">
|
||||
<div id="main-body">
|
||||
<div class="container">
|
||||
|
@ -1,25 +1,33 @@
|
||||
@props(['module', 'installed', 'enable'])
|
||||
|
||||
@if (! empty($module->plan))
|
||||
<a href="{{ $module->action_url }}" class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
|
||||
{{ trans('modules.get_premium_cloud') }}
|
||||
<a href="{{ $module->action_url }}" class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
|
||||
<x-link.loading>
|
||||
{{ trans('modules.get_premium_cloud') }}
|
||||
</x-link.loading>
|
||||
</a>
|
||||
@elseif (in_array('onprime', $module->where_to_use))
|
||||
@if ($installed)
|
||||
@can('delete-modules-item')
|
||||
<a href="{{ route('apps.app.uninstall', $module->slug) }}" class="bg-red text-white rounded-md text-sm text-center w-1/2 py-2 truncate">
|
||||
{{ trans('modules.button.uninstall') }}
|
||||
<a href="{{ route('apps.app.uninstall', $module->slug) }}" class="relative bg-red text-white rounded-md text-sm text-center w-1/2 py-2 truncate">
|
||||
<x-link.loading>
|
||||
{{ trans('modules.button.uninstall') }}
|
||||
</x-link.loading>
|
||||
</a>
|
||||
@endcan
|
||||
|
||||
@can('update-modules-item')
|
||||
@if ($enable)
|
||||
<a href="{{ route('apps.app.disable', $module->slug) }}" class="bg-orange rounded-md text-white w-1/2 text-center text-sm py-2 truncate">
|
||||
{{ trans('modules.button.disable') }}
|
||||
<a href="{{ route('apps.app.disable', $module->slug) }}" class="relative bg-orange rounded-md text-white w-1/2 text-center text-sm py-2 truncate">
|
||||
<x-link.loading>
|
||||
{{ trans('modules.button.disable') }}
|
||||
</x-link.loading>
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ route('apps.app.enable', $module->slug) }}" class="bg-green rounded-md text-white text-sm text-center w-1/2 py-2 truncate">
|
||||
{{ trans('modules.button.enable') }}
|
||||
<a href="{{ route('apps.app.enable', $module->slug) }}" class="relative bg-green rounded-md text-white text-sm text-center w-1/2 py-2 truncate">
|
||||
<x-link.loading>
|
||||
{{ trans('modules.button.enable') }}
|
||||
</x-link.loading>
|
||||
</a>
|
||||
@endif
|
||||
@endcan
|
||||
@ -35,27 +43,36 @@
|
||||
@else
|
||||
<button type="button"
|
||||
@click="onInstall('{{ $module->action_url }}', '{{ $module->slug }}', '{!! str_replace("'", "\'", $module->name) !!}', '{{ $module->version }}')"
|
||||
class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate"
|
||||
class="bg-green hover:bg-green-700 disabled:bg-green-100 rounded-md text-white text-sm text-center w-full py-2 truncate"
|
||||
id="install-module"
|
||||
:disabled="installation.show"
|
||||
>
|
||||
{{ trans('modules.install') }}
|
||||
<x-button.loading action="installation.show">
|
||||
{{ trans('modules.install') }}
|
||||
</x-button.loading>
|
||||
</button>
|
||||
@endif
|
||||
@else
|
||||
<a href="{{ $module->action_url }}" class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
|
||||
{{ trans('modules.use_app') }}
|
||||
<a href="{{ $module->action_url }}" class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
|
||||
<x-link.loading>
|
||||
{{ trans('modules.use_app') }}
|
||||
</x-link.loading>
|
||||
</a>
|
||||
@endif
|
||||
@endcan
|
||||
@endif
|
||||
@else
|
||||
@if ($module->install)
|
||||
<a href="{{ $module->action_url }}" class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
|
||||
{{ trans('modules.install_cloud') }}
|
||||
<a href="{{ $module->action_url }}" class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
|
||||
<x-link.loading>
|
||||
{{ trans('modules.install_cloud') }}
|
||||
</x-link.loading>
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ $module->action_url }}" class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
|
||||
{{ trans('modules.get_cloud') }}
|
||||
<a href="{{ $module->action_url }}" class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
|
||||
<x-link.loading>
|
||||
{{ trans('modules.get_cloud') }}
|
||||
</x-link.loading>
|
||||
</a>
|
||||
@endif
|
||||
@endif
|
||||
|
@ -6,7 +6,7 @@
|
||||
{!! trans('modules.only_premium_plan') !!}
|
||||
</span>
|
||||
</div>
|
||||
@if (in_array('onprime', $module->where_to_use))
|
||||
@elseif (in_array('onprime', $module->where_to_use))
|
||||
<div x-show="price_type == true" class="text-center text-sm mt-3 mb--2">
|
||||
<span style="height: 21px;display: block;"></span>
|
||||
</div>
|
||||
|
@ -64,21 +64,29 @@
|
||||
toggleButton.querySelector("span").classList.remove("ltr:-rotate-90", "rtl:rotate-90");
|
||||
}
|
||||
|
||||
function hiddenSidebar() {
|
||||
sideBar.classList.add("menu-list-hidden");
|
||||
toggleButton.classList.add("ltr:left-12", "rtl:right-12");
|
||||
}
|
||||
|
||||
function unHiddenSidebar() {
|
||||
toggleButton.classList.remove("ltr:left-12", "rtl:right-12");
|
||||
sideBar.classList.remove("menu-list-hidden");
|
||||
}
|
||||
|
||||
//slide menu actions together responsive version
|
||||
function slideMenu() {
|
||||
if (document.body.clientWidth <= 1280) {
|
||||
mobileMenuHidden();
|
||||
} else {
|
||||
if (sideBar.classList.contains("menu-list-hidden")) {
|
||||
toggleButton.classList.remove("ltr:left-12", "rtl:right-12");
|
||||
sideBar.classList.remove("menu-list-hidden");
|
||||
unHiddenSidebar();
|
||||
|
||||
if (document.body.clientWidth > "991") {
|
||||
contentTransitionRight();
|
||||
}
|
||||
} else {
|
||||
sideBar.classList.add("menu-list-hidden");
|
||||
toggleButton.classList.add("ltr:left-12", "rtl:right-12");
|
||||
hiddenSidebar();
|
||||
|
||||
if (document.body.clientWidth > "991") {
|
||||
contentTransitionLeft();
|
||||
@ -129,6 +137,8 @@
|
||||
mainContent.classList.add("hidden");
|
||||
toggleButton.classList.add("invisible");
|
||||
menuClose.classList.remove("hidden");
|
||||
unHiddenSidebar();
|
||||
contentTransitionRight();
|
||||
|
||||
//remove active (cancel text) class form target icon
|
||||
} else if (menu.classList.contains(menuRef) && iconButton.children[0].textContent == "cancel") {
|
||||
|
Reference in New Issue
Block a user