edit form add task
This commit is contained in:
@@ -709,11 +709,7 @@
|
||||
backdrop-filter: blur(16px) saturate(160%);
|
||||
-webkit-backdrop-filter: blur(16px) saturate(160%);
|
||||
color: var(--text-primary);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ui-card-body {
|
||||
padding: 1.25rem 1.5rem;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.ui-card-header {
|
||||
@@ -722,6 +718,13 @@
|
||||
text-align: center;
|
||||
padding: 0.55rem 0.75rem;
|
||||
font-weight: 800;
|
||||
border-radius: var(--radius-xl) var(--radius-xl) 0 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ui-card-body {
|
||||
padding: 1.25rem 1.5rem;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.ui-form-stack {
|
||||
@@ -735,6 +738,25 @@
|
||||
flex-direction: column;
|
||||
gap: 0.4rem;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.ui-form-field--dropdown.is-open {
|
||||
z-index: 40;
|
||||
}
|
||||
|
||||
.ui-form-dropdown-panel {
|
||||
width: 100%;
|
||||
margin-top: 0.35rem;
|
||||
border-radius: 0.875rem;
|
||||
border: 1px solid var(--border-input);
|
||||
background: var(--surface-card);
|
||||
box-shadow: var(--row-shadow);
|
||||
}
|
||||
|
||||
.ui-form-dropdown-panel .user-item:hover {
|
||||
background: var(--surface-card-hover);
|
||||
}
|
||||
|
||||
.ui-form-field label {
|
||||
|
||||
@@ -84,11 +84,11 @@ if (isset($task)) {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="ui-form-field">
|
||||
<div class="ui-form-field ui-form-field--dropdown">
|
||||
<label for="dropdown-btn">انتصاب کاربران</label>
|
||||
<div class="relative" id="dropdown-container">
|
||||
<div id="dropdown-container">
|
||||
<button type="button" id="dropdown-btn"
|
||||
class="ui-input text-right flex justify-between items-center">
|
||||
class="ui-input text-right flex justify-between items-center w-full">
|
||||
<span id="selected-count">انتخاب کاربران</span>
|
||||
<svg class="w-4 h-4 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
@@ -97,7 +97,7 @@ if (isset($task)) {
|
||||
</button>
|
||||
|
||||
<div id="dropdown-list"
|
||||
class="hidden absolute z-20 w-full ui-panel border border-gray-300 rounded-lg shadow-lg mt-1">
|
||||
class="hidden ui-form-dropdown-panel">
|
||||
|
||||
<div class="p-2 border-b">
|
||||
<input type="text" id="search-input"
|
||||
@@ -151,21 +151,30 @@ if (isset($task)) {
|
||||
<script>
|
||||
const dropdownBtn = document.getElementById('dropdown-btn');
|
||||
const dropdownList = document.getElementById('dropdown-list');
|
||||
const dropdownField = document.querySelector('.ui-form-field--dropdown');
|
||||
const searchInput = document.getElementById('search-input');
|
||||
const usersList = document.getElementById('users-list');
|
||||
const selectedCountSpan = document.getElementById('selected-count');
|
||||
|
||||
function setAssigneeDropdownOpen(open) {
|
||||
dropdownList.classList.toggle('hidden', !open);
|
||||
if (dropdownField) {
|
||||
dropdownField.classList.toggle('is-open', open);
|
||||
}
|
||||
}
|
||||
|
||||
dropdownBtn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
dropdownList.classList.toggle('hidden');
|
||||
if (!dropdownList.classList.contains('hidden')) {
|
||||
const willOpen = dropdownList.classList.contains('hidden');
|
||||
setAssigneeDropdownOpen(willOpen);
|
||||
if (willOpen) {
|
||||
searchInput.focus();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('click', (e) => {
|
||||
if (!dropdownBtn.contains(e.target) && !dropdownList.contains(e.target)) {
|
||||
dropdownList.classList.add('hidden');
|
||||
setAssigneeDropdownOpen(false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1661,6 +1661,8 @@ $state = [
|
||||
const datePickerOptions = {
|
||||
format: 'YYYY/MM/DD',
|
||||
autoClose: true,
|
||||
initialValue: false,
|
||||
initialValueType: 'gregorian',
|
||||
toolbox: {
|
||||
calendarSwitch: {enabled: false},
|
||||
todayButton: {enabled: true, text: {fa: 'امروز'}}
|
||||
@@ -1684,6 +1686,8 @@ $state = [
|
||||
applyTaskFilters();
|
||||
}
|
||||
});
|
||||
|
||||
clearTaskDateFilter();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user