diff options
| author | Ali Rahimi <alirahimi818@gmail.com> | 2024-01-23 22:46:33 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-23 22:46:33 +0300 |
| commit | c1422be269bcfe4e5fcdd2095224ac55e50e2d8c (patch) | |
| tree | 021cc31bb632acd370ce6b3da96e784640418aab /web/html | |
| parent | 538fc9b3656afe260af74a71828e15aa069e1434 (diff) | |
persian datepicker bug fixed (#1668)
* add single client bug fixed
* persian datepicker bug fixed
Diffstat (limited to 'web/html')
| -rw-r--r-- | web/html/xui/client_bulk_modal.html | 2 | ||||
| -rw-r--r-- | web/html/xui/component/persianDatepicker.html | 6 | ||||
| -rw-r--r-- | web/html/xui/component/themeSwitch.html | 2 | ||||
| -rw-r--r-- | web/html/xui/form/client.html | 2 | ||||
| -rw-r--r-- | web/html/xui/form/inbound.html | 4 |
5 files changed, 9 insertions, 7 deletions
diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html index 0f3ea24c..9ae84e5a 100644 --- a/web/html/xui/client_bulk_modal.html +++ b/web/html/xui/client_bulk_modal.html @@ -106,7 +106,7 @@ </template> <a-date-picker v-if="datepicker == 'gregorian'" :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss" :dropdown-class-name="themeSwitcher.currentTheme" v-model="clientsBulkModal.expiryTime"></a-date-picker> - <persian-datepicker v-else :dropdown-class-name="themeSwitcher.currentTheme" + <persian-datepicker v-else placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}' value="clientsBulkModal.expiryTime" v-model="clientsBulkModal.expiryTime"></persian-datepicker> </a-form-item> <a-form-item v-if="clientsBulkModal.expiryTime != 0"> diff --git a/web/html/xui/component/persianDatepicker.html b/web/html/xui/component/persianDatepicker.html index 34ae4f8d..10ef8472 100644 --- a/web/html/xui/component/persianDatepicker.html +++ b/web/html/xui/component/persianDatepicker.html @@ -3,7 +3,7 @@ <div> <a-input :value="value" type="text" v-model="date" data-jdp class="persian-datepicker" @input="$emit('input', convertToGregorian($event.target.value)); jalaliDatepicker.hide();" - placeholder="انتخاب تاریخ"> + :placeholder="placeholder"> <template #addonAfter> <a-icon type="calendar" style="font-size: 16px;"/> </template> @@ -21,7 +21,7 @@ const persianDatepicker = {}; Vue.component('persian-datepicker', { - props: ['dropdown-class-name', 'format', 'value'], + props: ['placeholder', 'format', 'value'], template: `{{template "component/persianDatepickerTemplate"}}`, data() { return { @@ -48,7 +48,7 @@ listenToDatepicker() { jalaliDatepicker.startWatch({ time: true, - container: '.ant-modal-wrap', + zIndex: '9999', hideAfterChange: true, useDropDownYears: false, changeMonthRotateYear: true, diff --git a/web/html/xui/component/themeSwitch.html b/web/html/xui/component/themeSwitch.html index 4d5412e2..3bc1ad7d 100644 --- a/web/html/xui/component/themeSwitch.html +++ b/web/html/xui/component/themeSwitch.html @@ -11,6 +11,7 @@ function createThemeSwitcher() { const isDarkTheme = localStorage.getItem('dark-mode') === 'true'; const theme = isDarkTheme ? 'dark' : 'light'; + document.querySelector('body').setAttribute('class', theme) return { isDarkTheme, get currentTheme() { @@ -19,6 +20,7 @@ toggleTheme() { this.isDarkTheme = !this.isDarkTheme; localStorage.setItem('dark-mode', this.isDarkTheme); + document.querySelector('body').setAttribute('class', this.isDarkTheme ? 'dark' : 'light') }, }; } diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html index 434a806e..526bbb8b 100644 --- a/web/html/xui/form/client.html +++ b/web/html/xui/form/client.html @@ -164,7 +164,7 @@ </template> <a-date-picker v-if="datepicker == 'gregorian'" :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss" :dropdown-class-name="themeSwitcher.currentTheme" v-model="client._expiryTime"></a-date-picker> - <persian-datepicker v-else :dropdown-class-name="themeSwitcher.currentTheme" + <persian-datepicker v-else placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}' value="client._expiryTime" v-model="client._expiryTime"></persian-datepicker> <a-tag color="red" v-if="isEdit && isExpiry">Expired</a-tag> </a-form-item> diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html index 92ba6e75..048fc818 100644 --- a/web/html/xui/form/inbound.html +++ b/web/html/xui/form/inbound.html @@ -57,8 +57,8 @@ <a-date-picker v-if="datepicker == 'gregorian'" :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss" :dropdown-class-name="themeSwitcher.currentTheme" v-model="dbInbound._expiryTime"></a-date-picker> - <persian-datepicker v-else :dropdown-class-name="themeSwitcher.currentTheme" - value="dbInbound._expiryTime" v-model="dbInbound._expiryTime"></persian-datepicker> + <persian-datepicker v-else placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}' + value="dbInbound._expiryTime" v-model="dbInbound._expiryTime"></persian-datepicker> </a-form-item> </a-form> |
