django-smartbase-admin 1.0.18__py3-none-any.whl → 1.0.19__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,7 +84,7 @@ class Main {
84
84
  if(!shouldProcessAfterSwap(detail)) {
85
85
  return
86
86
  }
87
- this.initCKEditor(detail.target)
87
+ this.switchCKEditorTheme(this.isDarkMode(document.documentElement.dataset.theme))
88
88
  })
89
89
  }
90
90
 
@@ -107,7 +107,7 @@ class Main {
107
107
 
108
108
  isDarkMode(colorScheme) {
109
109
  let isDark = colorScheme === 'dark'
110
- if(colorScheme === 'auto') {
110
+ if(!colorScheme || colorScheme === 'auto') {
111
111
  isDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
112
112
  }
113
113
  if(isDark) {
@@ -120,6 +120,7 @@ class Main {
120
120
  }
121
121
 
122
122
  handleColorSchemeChange() {
123
+ const isDarkMode = this.isDarkMode(document.documentElement.dataset.theme)
123
124
  const picker = document.querySelector('.js-color-scheme-picker')
124
125
  if(!picker) {
125
126
  return
@@ -133,7 +134,6 @@ class Main {
133
134
  }
134
135
  document.documentElement.removeAttribute('data-theme')
135
136
  })
136
- const isDarkMode = this.isDarkMode(document.documentElement.dataset.theme)
137
137
  this.switchCKEditorTheme(isDarkMode)
138
138
  }
139
139
 
@@ -229,6 +229,9 @@ class Main {
229
229
  }
230
230
 
231
231
  initAliasName() {
232
+ if(!window.sb_admin_const) {
233
+ return
234
+ }
232
235
  const aliasGroup = document.getElementById(window.sb_admin_const.GLOBAL_FILTER_ALIAS_WIDGET_ID)
233
236
  if (!aliasGroup) {
234
237
  return
@@ -3,7 +3,8 @@
3
3
 
4
4
  {% block main_wrapper %}
5
5
  <div class="flex items-center max-h-screen">
6
- <img loading="lazy" src="{% static "sb_admin/images/logo.svg" %}" alt="Logo" class="max-h-40 absolute md:left-40 md:top-40 left-24 top-24">
6
+ <img loading="lazy" src="{% static "sb_admin/images/logo.svg" %}" alt="Logo" class="max-h-40 absolute md:left-40 md:top-40 left-24 top-24 dark:hidden">
7
+ <img loading="lazy" src="{% static "sb_admin/images/logo_light.svg" %}" alt="Logo" class="max-h-40 absolute md:left-40 md:top-40 left-24 top-24 hidden dark:block">
7
8
  <div class="md:max-w-640 w-full flex justify-center items-center h-screen">
8
9
  <div class="max-w-370 w-full mx-24">
9
10
  {% block content %}{% endblock %}
@@ -16,7 +16,7 @@
16
16
  hx-select="#modal-content"
17
17
  hx-swap="innerHTML">
18
18
  <svg class="w-20 h-20">
19
- <use xlink:href="#Preview-open"></use>
19
+ <use xlink:href="#Edit"></use>
20
20
  </svg>
21
21
  </a>
22
22
  {% endif %}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-smartbase-admin
3
- Version: 1.0.18
3
+ Version: 1.0.19
4
4
  Summary:
5
5
  Home-page: https://smartbase-sk.github.io/django-smartbase-admin-docs/
6
6
  License: MIT
@@ -6,7 +6,7 @@ django_smartbase_admin/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
6
6
  django_smartbase_admin/admin/admin_base.py,sha256=lU73GWjWvrPTsIXgmLaR88ie_K71J4NsU7qUqSzDrqg,47274
7
7
  django_smartbase_admin/admin/site.py,sha256=sJiVX2ljUgNN6MnlLfsTyJs7Dl52iC2rtLwkg962ydM,6841
8
8
  django_smartbase_admin/admin/widgets.py,sha256=3ms7rI4uHtW6cNcJu94S2e9q4eVONi2ticAYyQdeP2I,25881
9
- django_smartbase_admin/apps.py,sha256=C1wT1YUEZNKcUJfpD01nIZEFgYEsuav52WFKvEURRDU,545
9
+ django_smartbase_admin/apps.py,sha256=heZq5O2GHlkJdhUCHbRR7Nmm0irSxnL9NMqY43_O7V4,599
10
10
  django_smartbase_admin/compilemessages.py,sha256=-_FEFQlOvE4L8UzSuUxSxZQjgGlwL9IZtmg59fW_kIQ,342
11
11
  django_smartbase_admin/engine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  django_smartbase_admin/engine/actions.py,sha256=vmwMmo1mxxHSLTlbNwbH6h9ulxwDVJnF3r8d-axiKPI,2084
@@ -67,7 +67,7 @@ django_smartbase_admin/static/sb_admin/dist/calendar_style.js,sha256=47DEQpj8HBS
67
67
  django_smartbase_admin/static/sb_admin/dist/chart.js,sha256=nBru0P3RvzaNeQch6qkuL1Wi_c9ICz94HXLXmyYTMW8,205022
68
68
  django_smartbase_admin/static/sb_admin/dist/chart.js.LICENSE.txt,sha256=m7M__mzLlrKDz-hky_AC848p_HzYWhziwCLIpXMsj4I,257
69
69
  django_smartbase_admin/static/sb_admin/dist/confirmation_modal.js,sha256=glK-x4oxSAHqiabqXmNFE3FRtzMbpg7TgZiKcPle9_o,1745
70
- django_smartbase_admin/static/sb_admin/dist/main.js,sha256=MVmGBjn1nHXhZl_cc_VDcS2EvmCHamRjfuDWNPCmg7g,382803
70
+ django_smartbase_admin/static/sb_admin/dist/main.js,sha256=8397nxDT4ez0LwjLhYBKGxN8pi-UolO-IwN5d9gWbIs,382880
71
71
  django_smartbase_admin/static/sb_admin/dist/main.js.LICENSE.txt,sha256=Z8-1IrzhOFV3eE_WGR7SRfbzN9GRXsvfiU7_E_BkX-k,5600
72
72
  django_smartbase_admin/static/sb_admin/dist/main_style.css,sha256=DOx1Jc8Z9dXygQI1uywEQ-ypfRAYcMdUKOlk2t12H9Q,178205
73
73
  django_smartbase_admin/static/sb_admin/dist/main_style.js,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -538,7 +538,7 @@ django_smartbase_admin/static/sb_admin/src/js/code.js,sha256=Q1jKpTsUZhxhaGDRrqH
538
538
  django_smartbase_admin/static/sb_admin/src/js/confirmation_modal.js,sha256=9xycy0sYJfT0SxeDucbOmvg9gHSrBo3KngZjCAHkVMM,3610
539
539
  django_smartbase_admin/static/sb_admin/src/js/datepicker.js,sha256=Nnc28kngTOnb8d2q6NOFGismUVp6l-sTVeBu3M1DgJY,6704
540
540
  django_smartbase_admin/static/sb_admin/src/js/datepicker_plugins.js,sha256=DVIyCJpxn8Gx1mx3QHxbRN4nlpJRlilKix6BK_zcUVc,12382
541
- django_smartbase_admin/static/sb_admin/src/js/main.js,sha256=8Z1rqQJOV719JHHKkgwQU9LV4VlPGUn1uL4yfq7_aCk,15555
541
+ django_smartbase_admin/static/sb_admin/src/js/main.js,sha256=9f4XVEifYXlY_LSkPO4hDtiBGZCK6jY8WT64c8HMKgg,15686
542
542
  django_smartbase_admin/static/sb_admin/src/js/multiselect.js,sha256=GuWjIpdkfvXi-oBNdK3gImjrzef4550MKMy71iYrywk,4066
543
543
  django_smartbase_admin/static/sb_admin/src/js/range.js,sha256=k_1EIK0R-mrg3ScopUm2UDuYeaCg_VLTjtdJoN-8MXc,1794
544
544
  django_smartbase_admin/static/sb_admin/src/js/sb_ajax_params_tabulator_modifier.js,sha256=vJsAfRlXYeUH-hXLyVukim-UBRUHhv2J9UZHKAALOKo,650
@@ -581,7 +581,7 @@ django_smartbase_admin/templates/sb_admin/actions/translations.html,sha256=vxdL0
581
581
  django_smartbase_admin/templates/sb_admin/actions/tree_list.html,sha256=UeZppGi-1Zi_du-AxlNR2g0js9qZvbXl7BJi7yoYoWQ,2251
582
582
  django_smartbase_admin/templates/sb_admin/auth/user/add_form.html,sha256=KEZO1zDOb5EyVswuAz9yhXq0MYlowcCsau43ghTeGIU,50
583
583
  django_smartbase_admin/templates/sb_admin/authentification/login.html,sha256=gJH-auRp2VBc6mLShFYt73mluZIfebrVu8Ke1crcqsY,2398
584
- django_smartbase_admin/templates/sb_admin/authentification/login_base.html,sha256=UQ1dca2GmQ_HFo18uFqQSBfMqhS0rUjopBXFPEWHIjM,864
584
+ django_smartbase_admin/templates/sb_admin/authentification/login_base.html,sha256=2thbTONii_FeA73Bad15hmHb25rN3SbwmZ6KVN_6fZ4,1048
585
585
  django_smartbase_admin/templates/sb_admin/authentification/logout.html,sha256=5-kCINN5m4euIGyXv-VzCQGXiS2oWz5uJfVwP5d__54,496
586
586
  django_smartbase_admin/templates/sb_admin/authentification/password_change_done.html,sha256=YLM2fN6QUx_389UvA1aft7RO3xMDzyPUiy34oWHBZes,485
587
587
  django_smartbase_admin/templates/sb_admin/authentification/password_change_form.html,sha256=oSV-bzkDrQ-CwO01BPz1C1fxhQXu4qN4rG7_esPgkIs,1905
@@ -679,7 +679,7 @@ django_smartbase_admin/templates/sb_admin/widgets/hidden.html,sha256=NGn3jCAoRjA
679
679
  django_smartbase_admin/templates/sb_admin/widgets/html_read_only.html,sha256=GBg8quVgHSJqNxRzkm56YZ4isWLzd1Wlz4CRmukz8i0,18
680
680
  django_smartbase_admin/templates/sb_admin/widgets/includes/field_label.html,sha256=1TdNDxKXM5wScPQxgvRy0ikVsmj0GTJi2YPM8UlrWTQ,148
681
681
  django_smartbase_admin/templates/sb_admin/widgets/includes/help_text.html,sha256=QXYllkl2cmu7tLkWCgiEJis7cYzi9qzqFle2gK_GJXY,148
682
- django_smartbase_admin/templates/sb_admin/widgets/includes/related_item_buttons.html,sha256=ec8v-aWzp9ukeYI7tnwpXvzbffPiP1sDTekPxiSogVQ,1778
682
+ django_smartbase_admin/templates/sb_admin/widgets/includes/related_item_buttons.html,sha256=OeBQJh1MR1Ue0HFyPuclbG_vaFYqDD4d0cIIE0I_FbQ,1770
683
683
  django_smartbase_admin/templates/sb_admin/widgets/includes/simple_field_label.html,sha256=P6XBwmJmcQbb1YhKnEB6wnfP2cN59T8U0GnUt5s_oWo,443
684
684
  django_smartbase_admin/templates/sb_admin/widgets/input.html,sha256=S-ClLUAP-ZdYxv77KQcBWD2JcrKDEyxHuNPPRhfAywk,185
685
685
  django_smartbase_admin/templates/sb_admin/widgets/input_option.html,sha256=6If56Z3ifRFpfpu0ukcs_RINx0goc6SjFJanAH3Wey8,209
@@ -715,7 +715,7 @@ django_smartbase_admin/views/global_filter_view.py,sha256=eYo1moJGyi7jc2cPDA5ZBi
715
715
  django_smartbase_admin/views/media_view.py,sha256=5BLWXuzynF7nM34t-mf2BQSRN5ojY8HxpLIqt7Jiq9g,292
716
716
  django_smartbase_admin/views/translations_view.py,sha256=hktmkJIZ0EJxgnzjHLIoRDY0ckFa5wkbaoFZg32UWYw,20441
717
717
  django_smartbase_admin/views/user_config_view.py,sha256=7GcC8iw_GRn23AWehltJpVmSMW3Cq6WFxSuXeYiFylg,1124
718
- django_smartbase_admin-1.0.18.dist-info/LICENSE.md,sha256=okRGMBOYvyhprt2eTpX_QXqpzC0MODF-U7zX-4fKPjQ,1078
719
- django_smartbase_admin-1.0.18.dist-info/METADATA,sha256=0yWEL8eFuiwlpITwdS3XSllU7coS1SUNmCs_0WDtr9c,5375
720
- django_smartbase_admin-1.0.18.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
721
- django_smartbase_admin-1.0.18.dist-info/RECORD,,
718
+ django_smartbase_admin-1.0.19.dist-info/LICENSE.md,sha256=okRGMBOYvyhprt2eTpX_QXqpzC0MODF-U7zX-4fKPjQ,1078
719
+ django_smartbase_admin-1.0.19.dist-info/METADATA,sha256=vcWKMEO0MurJU732LBPqqYoNrEPt80eoqTlfT8GAPtA,5375
720
+ django_smartbase_admin-1.0.19.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
721
+ django_smartbase_admin-1.0.19.dist-info/RECORD,,