zet-lib 1.3.4 → 1.3.6
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.
- package/lib/Form.js +1 -1
- package/lib/zRoute.js +1 -0
- package/lib/zdataTable.js +27 -2
- package/package.json +1 -1
package/lib/Form.js
CHANGED
|
@@ -916,7 +916,7 @@ Form.modal = (obj, LANGUAGE = {}) => {
|
|
|
916
916
|
<input type="hidden" id="serialize_right" name="serialize_right" value=''/>
|
|
917
917
|
</form>
|
|
918
918
|
</div> <!-- .dynagrid-config-form -->`,
|
|
919
|
-
footer: `<select id="zgrid_default_type" class="form-control select-sm" style="width:100px"><option value="1">
|
|
919
|
+
footer: `<select id="zgrid_default_type" class="form-control select-sm" style="width:100px"><option value="1">Standart</option><option value="2">Fixed Header</option><option value="3">Footer Total</option><option value="4">No Wrap</option><option value="5">Fixed Header & No Wrap</option><option value="6">Footer Total & No Wrap</option><option value="7">Fixed Header & Footer & No Wrap</option></select>
|
|
920
920
|
<button type="reset" class="btn btn-default refresh gridreload image-button" title="Abort any changes and reset settings">
|
|
921
921
|
<img src="/assets/icons/refresh.svg" class="icons-bg-black"> ${LANGUAGE.reset || 'Reset'}
|
|
922
922
|
</button>
|
package/lib/zRoute.js
CHANGED
package/lib/zdataTable.js
CHANGED
|
@@ -10,8 +10,7 @@ class dataTable {
|
|
|
10
10
|
this.visibles = datas.visiblesObj //array object
|
|
11
11
|
this.setColumns = ''
|
|
12
12
|
this.setTable = ''
|
|
13
|
-
this.srcScript = '/modules/datatables.min.js'
|
|
14
|
-
this.dataTableScript = '/js/datatable-grids.js'
|
|
13
|
+
this.srcScript = '/modules/datatable/datatables.min.js'
|
|
15
14
|
this.dataTableButtons = '/js/datatable-buttons.js'
|
|
16
15
|
this.customButtons = ''
|
|
17
16
|
this.MYMODEL = null
|
|
@@ -24,6 +23,30 @@ class dataTable {
|
|
|
24
23
|
this.hasLevels = Object.keys(this.level_approval).length == 0 ? false : true
|
|
25
24
|
this.visiblesKey = this.visibles.map((item) => item.key)
|
|
26
25
|
this.gridType = datas.gridType || 1
|
|
26
|
+
if (this.gridType == 1) {
|
|
27
|
+
this.dataTableScript = '/modules/datatable/normal.js'
|
|
28
|
+
} else if (this.gridType == 2) {
|
|
29
|
+
this.dataTableScript = '/modules/datatable/fixed-header.js'
|
|
30
|
+
} else if (this.gridType == 3) {
|
|
31
|
+
this.dataTableScript = '/modules/datatable/footer-total.js'
|
|
32
|
+
} else if (this.gridType == 4) {
|
|
33
|
+
this.dataTableScript = '/modules/datatable/normal.js'
|
|
34
|
+
this.additionalCss = `<style>thead > tr > th {white-space: nowrap;}</style>`
|
|
35
|
+
} else if (this.gridType == 5) {
|
|
36
|
+
this.dataTableScript = '/modules/datatable/fixed-header.js'
|
|
37
|
+
this.additionalCss = `<style>thead > tr > th {white-space: nowrap;}</style>`
|
|
38
|
+
} else if (this.gridType == 6) {
|
|
39
|
+
this.dataTableScript = '/modules/datatable/footer-total.js'
|
|
40
|
+
this.additionalCss = `<style>thead > tr > th {white-space: nowrap;}</style>`
|
|
41
|
+
} else if (this.gridType == 7) {
|
|
42
|
+
this.dataTableScript = '/modules/datatable/fixed-header-totalnowrap.js'
|
|
43
|
+
this.additionalCss = `<style>thead > tr > th {white-space: nowrap;}</style>`
|
|
44
|
+
} else {
|
|
45
|
+
this.dataTableScript = '/modules/datatable/normal.js'
|
|
46
|
+
this.additionalCss = `<style>thead > tr > th {white-space: nowrap;}</style>`
|
|
47
|
+
}
|
|
48
|
+
this.totalFields = []
|
|
49
|
+
this.additionalCss = ''
|
|
27
50
|
}
|
|
28
51
|
|
|
29
52
|
// for filter html
|
|
@@ -32,6 +55,7 @@ class dataTable {
|
|
|
32
55
|
this.relations = obj.relations
|
|
33
56
|
this.routeName = this.MYMODEL.routeName
|
|
34
57
|
this.types = obj.TYPES
|
|
58
|
+
this.totalFields = this.visiblesKey.filter((item) => this.MYMODEL.widgets[item] && this.MYMODEL.widgets[item].name == 'number')
|
|
35
59
|
delete obj.MYMODEL
|
|
36
60
|
delete obj.relations
|
|
37
61
|
delete obj.TYPES
|
|
@@ -164,6 +188,7 @@ class dataTable {
|
|
|
164
188
|
script += `var dataTableFields = ${JSON.stringify(this.visiblesKey, null, 2)};${Util.newLine}`
|
|
165
189
|
script += `var dataTableTypes = ${JSON.stringify(this.types, null, 2)};${Util.newLine}`
|
|
166
190
|
script += `var dataTableRoute = "${this.routeName}";${Util.newLine}`
|
|
191
|
+
script += `var dataTableHasTotalFields = ${JSON.stringify(this.totalFields)};${Util.newLine}`
|
|
167
192
|
script += `</script>${Util.newLine}`
|
|
168
193
|
script += `<script type="text/javascript" src="${this.dataTableScript}"></script>${Util.newLine}`
|
|
169
194
|
if (this.searchColumns.FILTERKEY) {
|