django-smartbase-admin 0.2.82__py3-none-any.whl → 0.2.84__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.
@@ -22,11 +22,10 @@ export class SelectionModule extends SBAdminTableModule {
22
22
  return
23
23
  }
24
24
  tableSelectedRowsInfo.innerHTML = `${selectedRows.size} selected`
25
- if(selectedRows.size > 0) {
25
+ if (selectedRows.size > 0) {
26
26
  tableSelectedRowsBar.classList.add('show')
27
27
  document.getElementById('table-selected-rows-bar-select-all').checked = true
28
- }
29
- else {
28
+ } else {
30
29
  document.getElementById('table-selected-rows-bar-select-all').checked = false
31
30
  tableSelectedRowsBar.classList.remove('show')
32
31
  }
@@ -70,8 +69,7 @@ export class SelectionModule extends SBAdminTableModule {
70
69
  checkbox.setAttribute("name", `row-select-${this.table.viewId}`)
71
70
  label.setAttribute("for", `row-select-${rowData[this.table.tableIdColumnName]}`)
72
71
  wrapper.setAttribute("for", `row-select-${rowData[this.table.tableIdColumnName]}`)
73
- }
74
- else {
72
+ } else {
75
73
  checkbox.setAttribute("id", `row-select-all`)
76
74
  label.setAttribute("for", `row-select-all`)
77
75
  wrapper.setAttribute("for", `row-select-all`)
@@ -154,4 +152,8 @@ export class SelectionModule extends SBAdminTableModule {
154
152
  loadFromUrlAfterInit() {
155
153
  this.selectNoData()
156
154
  }
155
+
156
+ beforeRefreshTableDataIfNotUrlLoad() {
157
+ this.selectNoData()
158
+ }
157
159
  }
@@ -28,6 +28,9 @@ export class ViewsModule extends SBAdminTableModule {
28
28
  }
29
29
 
30
30
  document.querySelectorAll('.js-view-button').forEach((item) => {
31
+ if(!item.dataset.params) {
32
+ return
33
+ }
31
34
  const itemParams = JSON.stringify(this.filterParamsForCompare(JSON.parse(item.dataset.params)))
32
35
  const sameAsUrlParams = (itemParams === searchParams)
33
36
  const sameAsSelectedParams = selectedParams === itemParams
@@ -67,6 +70,9 @@ export class ViewsModule extends SBAdminTableModule {
67
70
  }
68
71
 
69
72
  openView(e, params, view_id) {
73
+ if (!params) {
74
+ return
75
+ }
70
76
  if (e.target.closest("svg")) {
71
77
  return
72
78
  }
@@ -54,8 +54,11 @@ export const filterInputValueChangeListener = (inputSelector, callbackFunction)
54
54
  input.addEventListener('change', callbackFunction)
55
55
  input.addEventListener('keypress', (event) => {
56
56
  if (event.keyCode === 13) {
57
+ // fire change event
58
+ input.blur()
57
59
  event.preventDefault()
58
- callbackFunction(event)
60
+ // refocus
61
+ input.focus()
59
62
  return true
60
63
  }
61
64
  })
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-smartbase-admin
3
- Version: 0.2.82
3
+ Version: 0.2.84
4
4
  Summary:
5
5
  Author: SmartBase
6
6
  Author-email: info@smartbase.sk
@@ -1,6 +1,6 @@
1
1
  django_smartbase_admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  django_smartbase_admin/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- django_smartbase_admin/actions/admin_action_list.py,sha256=2DthQWmdzUh1Bh4d8xZjpFqhwzzaIBk_QJsSXKIrZgA,19297
3
+ django_smartbase_admin/actions/admin_action_list.py,sha256=binm5UJF5-MAI98cuXZVR5oJsxQTxJhstrTXFBgl_Lg,19454
4
4
  django_smartbase_admin/actions/advanced_filters.py,sha256=Vm8b6TAwNehR8INjolFG7pEYL4ADO7XUiVOWpb0btM0,13481
5
5
  django_smartbase_admin/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  django_smartbase_admin/admin/admin_base.py,sha256=ihhQbo6gn0QOyjZnj0oYJ6Du06MgHB9j9jdwUdhm6IY,40324
@@ -10,7 +10,7 @@ django_smartbase_admin/apps.py,sha256=C1wT1YUEZNKcUJfpD01nIZEFgYEsuav52WFKvEURRD
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=n8PiG60Kj1ECHB4lfVH_jvHMyOjOZ-DvQfO9F2CuqW0,1733
13
- django_smartbase_admin/engine/admin_base_view.py,sha256=0yMQO-Aa9UtEBcqcgPEJ6VpkaEa30LetmCRfkaH3X2E,28591
13
+ django_smartbase_admin/engine/admin_base_view.py,sha256=lFiK5KnejZY3pUrUgdX6wUecs_KHzlnRFCTXpI8NMp4,28804
14
14
  django_smartbase_admin/engine/admin_entrypoint_view.py,sha256=jfMfcYPfdre2abHfC4KIxaP_epJFuCeTcujGhGd4Tl4,624
15
15
  django_smartbase_admin/engine/admin_view.py,sha256=9wGffahDR3IYmhL9ZbX8uitwGdXdw5DIL5GnWBawmJM,4238
16
16
  django_smartbase_admin/engine/configuration.py,sha256=P3iSiPm9QBl9etTDJIWzo7DzOBCryGwWtbF288PEtus,8120
@@ -37,7 +37,7 @@ django_smartbase_admin/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
37
37
  django_smartbase_admin/models.py,sha256=mvIe4-X8sapMfISZ1KitkEX8ljmVisVbTjxf_hgIjzs,743
38
38
  django_smartbase_admin/monkeypatch/admin_readonly_field_monkeypatch.py,sha256=fxcDCcI4DTbdDm4RYGtKUwEsq714i2XUHuw6fa84OgI,4037
39
39
  django_smartbase_admin/monkeypatch/fake_inline_monkeypatch.py,sha256=Wfrz_BmgF4XBKsqncaB3uyZaE13OOdPpQWsZe5_Idls,833
40
- django_smartbase_admin/querysets.py,sha256=ST_6qxznqxJiv8Gk1bgYVMpK_gbU74ItKyvMmVmJX04,385
40
+ django_smartbase_admin/querysets.py,sha256=fKFvWp8fWKbRQQxM8NlHtDmAITyEZJQuCva-dse-diI,459
41
41
  django_smartbase_admin/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  django_smartbase_admin/services/configuration.py,sha256=POMI0htBqFS9ptPXMtOhIlIKiF6Y4cOQ-IkYN6NWO1c,759
43
43
  django_smartbase_admin/services/data.py,sha256=o36B_H9RnBvaQz3Rs3NygY1hVTr6hc89M-RK1saRXzc,156
@@ -59,14 +59,14 @@ django_smartbase_admin/static/sb_admin/css/codemirror/codemirror.min.css,sha256=
59
59
  django_smartbase_admin/static/sb_admin/css/codemirror/dracula.min.css,sha256=uo0AmtydVJOOqIJSwJmit3PtOk9VFa6cL5N6ikyzmd8,1646
60
60
  django_smartbase_admin/static/sb_admin/css/coloris/coloris.min.css,sha256=teADOBNAUAYg3wegm5gqu_4ahI-cp-_E87PZH4m52D0,8506
61
61
  django_smartbase_admin/static/sb_admin/css/querybuilder/query-builder.default.min.css,sha256=NpM2HsztsnXTnoq_6D2H2qENmS-xEbXVvInpg87fmGo,3335
62
- django_smartbase_admin/static/sb_admin/dist/chart.js,sha256=VBkm3VGe9tY8vhV1L4xaL6NtUPgymPgyL5doHHoQdCI,204676
62
+ django_smartbase_admin/static/sb_admin/dist/chart.js,sha256=KbrU3hgVWMPK9PkquX9orVsCVh6_ANogFMY3jWVbUgY,204690
63
63
  django_smartbase_admin/static/sb_admin/dist/chart.js.LICENSE.txt,sha256=m7M__mzLlrKDz-hky_AC848p_HzYWhziwCLIpXMsj4I,257
64
64
  django_smartbase_admin/static/sb_admin/dist/confirmation_modal.js,sha256=glK-x4oxSAHqiabqXmNFE3FRtzMbpg7TgZiKcPle9_o,1745
65
65
  django_smartbase_admin/static/sb_admin/dist/main.js,sha256=KE89F9ooogNznFS2CmMQmYRgcI_wCHLV3mROX2AuCXo,376482
66
66
  django_smartbase_admin/static/sb_admin/dist/main.js.LICENSE.txt,sha256=Z8-1IrzhOFV3eE_WGR7SRfbzN9GRXsvfiU7_E_BkX-k,5600
67
67
  django_smartbase_admin/static/sb_admin/dist/main_style.css,sha256=wlrj8qcrcaJ6DTcKgnKjXN9VPN16EkKTYpKnm2HJX5g,152857
68
68
  django_smartbase_admin/static/sb_admin/dist/main_style.js,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
- django_smartbase_admin/static/sb_admin/dist/table.js,sha256=tLvFP9zEvoSANuQW9P_nZ9M_1ozsjbSViSyb1k7Nbx8,589624
69
+ django_smartbase_admin/static/sb_admin/dist/table.js,sha256=PTj9emhMzAb1kCdjZKnSrH-6xbciFbJLLnm62ywAOJ0,589726
70
70
  django_smartbase_admin/static/sb_admin/dist/table.js.LICENSE.txt,sha256=WOKSfEow5EUe0a78P0kcxdWcrQlqn2n6H8idNZqHVDk,462
71
71
  django_smartbase_admin/static/sb_admin/dist/translations.js,sha256=5PRY3zmbnQ9pH-FtNHmsZ5xmYLPOQiO_hR3CBxHIAIo,567
72
72
  django_smartbase_admin/static/sb_admin/favicon/android-chrome-192x192.png,sha256=Og0qXawivKxQWmPPU6dkkGjO0txd-yDXXfemTWXCBDY,18172
@@ -516,11 +516,11 @@ django_smartbase_admin/static/sb_admin/src/js/table_modules/filter_module.js,sha
516
516
  django_smartbase_admin/static/sb_admin/src/js/table_modules/full_text_search_module.js,sha256=9ZfnZXvaTOphhRU0B7H0rsghUBWzTOSyVK1FZIj6bIE,573
517
517
  django_smartbase_admin/static/sb_admin/src/js/table_modules/header_tabs_module.js,sha256=zT2CYKfMSd0903ASUzIbT8HwTkF6id3w4j5IJpwONp8,2888
518
518
  django_smartbase_admin/static/sb_admin/src/js/table_modules/movable_columns_module.js,sha256=X0FQykK63v8vcE3-qZhkWZA2ajp8QTCLFv0PvkeLVvY,7694
519
- django_smartbase_admin/static/sb_admin/src/js/table_modules/selection_module.js,sha256=cOCtlCXq0Z-nKMLXKuuF8ZxCaUX91Jszas-vgNc7ZFI,6403
519
+ django_smartbase_admin/static/sb_admin/src/js/table_modules/selection_module.js,sha256=1uVEpcESF7e-b2-GkKayXip4W00OO1leEK01e1G-hNI,6466
520
520
  django_smartbase_admin/static/sb_admin/src/js/table_modules/table_params_module.js,sha256=67OJV8l_i7f2Ptm_G76Ri7AWyEfZ8B5BjiztLP819DM,11250
521
- django_smartbase_admin/static/sb_admin/src/js/table_modules/views_module.js,sha256=dfOLy4jqJ2jsz4vqQSPW4FZznC9WyjknHCllHKKEHiY,3265
521
+ django_smartbase_admin/static/sb_admin/src/js/table_modules/views_module.js,sha256=ZdirU9jt_aE_vkVXxMytZ3AaC0q6r57ECijdhV6j3-M,3393
522
522
  django_smartbase_admin/static/sb_admin/src/js/translations.js,sha256=GEizlr_D5yDj00i7jKENkWfDr6gZcg4RQ1Nek22WP4g,954
523
- django_smartbase_admin/static/sb_admin/src/js/utils.js,sha256=AYfHkXqhpKAwmT-p5sBFZW2LHBVeyPdJHsbxy2NzufQ,4473
523
+ django_smartbase_admin/static/sb_admin/src/js/utils.js,sha256=g7mFIf7ZBZQyzbWmH_Eg2OKgQvPhE_yw4SFonVQ_AU8,4556
524
524
  django_smartbase_admin/templates/sb_admin/actions/change_form.html,sha256=Vqp9oZgwagz8bZw7UmsXf692cYLnGl5W-ujQp-aR2Jk,12734
525
525
  django_smartbase_admin/templates/sb_admin/actions/change_password.html,sha256=LhciaKCvlywKMJ6gY9JbEaTkOXjNSFO-mAnWIZfk6sA,3200
526
526
  django_smartbase_admin/templates/sb_admin/actions/dashboard.html,sha256=idjrEnXT0EP8gNHMu9QIneaLRhOJwB6QW92brrg7z1s,272
@@ -665,7 +665,7 @@ django_smartbase_admin/views/dashboard_view.py,sha256=vtz5emYTQ5WDFeLA8HrcmjSOVd
665
665
  django_smartbase_admin/views/global_filter_view.py,sha256=eYo1moJGyi7jc2cPDA5ZBiEgA7Hmc-DxbQvbqUpDkg8,1127
666
666
  django_smartbase_admin/views/media_view.py,sha256=5BLWXuzynF7nM34t-mf2BQSRN5ojY8HxpLIqt7Jiq9g,292
667
667
  django_smartbase_admin/views/translations_view.py,sha256=A02q1t13akLKd2Pg_ej4tVi5qPUKYxB2LqsBbYXM0l8,20267
668
- django_smartbase_admin-0.2.82.dist-info/LICENSE.md,sha256=okRGMBOYvyhprt2eTpX_QXqpzC0MODF-U7zX-4fKPjQ,1078
669
- django_smartbase_admin-0.2.82.dist-info/METADATA,sha256=5SLspfJiPGKQdN1GKyyd0_qRYTdCdkREMPCUpRVPPXk,996
670
- django_smartbase_admin-0.2.82.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
671
- django_smartbase_admin-0.2.82.dist-info/RECORD,,
668
+ django_smartbase_admin-0.2.84.dist-info/LICENSE.md,sha256=okRGMBOYvyhprt2eTpX_QXqpzC0MODF-U7zX-4fKPjQ,1078
669
+ django_smartbase_admin-0.2.84.dist-info/METADATA,sha256=SiRlg8wv9PEY06rjCHINLY8fVKWrA2EdsF97DIBe_Mg,996
670
+ django_smartbase_admin-0.2.84.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
671
+ django_smartbase_admin-0.2.84.dist-info/RECORD,,