diff --git a/src/templates/bootstrap3/grid/html.ejs b/src/templates/bootstrap3/grid/html.ejs index 0868e2f4..ef9b6b61 100644 --- a/src/templates/bootstrap3/grid/html.ejs +++ b/src/templates/bootstrap3/grid/html.ejs @@ -17,6 +17,9 @@
+ {% if (ctx.component.selectAllRows) { %} +
+ {% } %} diff --git a/src/templates/bootstrap3/index.ts b/src/templates/bootstrap3/index.ts index eb043700..2562a7c6 100644 --- a/src/templates/bootstrap3/index.ts +++ b/src/templates/bootstrap3/index.ts @@ -42,6 +42,7 @@ import pagination from './pagination'; import columnMenu from './column-menu'; import tbody from './tbody'; import paginationBottom from './pagination-bottom'; +import selectAllContent from './selectAllContent'; export default { transform(type, text) { @@ -58,6 +59,7 @@ export default { if (builder.scrollResizeObserver) { builder.scrollResizeObserver.disconnect(); } + // @ts-ignore builder.scrollResizeObserver = new ResizeObserver(() => { setTimeout(() => { const { form, sidebar } = builder.refs; @@ -124,5 +126,6 @@ export default { pagination, columnMenu, tbody, - paginationBottom + paginationBottom, + selectAllContent }; diff --git a/src/templates/bootstrap3/selectAllContent/html.ejs b/src/templates/bootstrap3/selectAllContent/html.ejs new file mode 100644 index 00000000..6efae62d --- /dev/null +++ b/src/templates/bootstrap3/selectAllContent/html.ejs @@ -0,0 +1,23 @@ +
+ + {% if (!ctx.allRowsSelected) { %} + All {{ ctx.totalSelected }} records on this page are selected. + {% } %} + {% if (ctx.allRowsSelected) { %} + All {{ ctx.totalItems }} records in the table are selected. + {% } %} + + +
+
+ + + {% if (!ctx.allRowsSelected) { %} + Select all {{ ctx.totalItems }} items in the table. + {% } %} + {% if (ctx.allRowsSelected) { %} + Clear selection. + {% } %} + + +
\ No newline at end of file diff --git a/src/templates/bootstrap3/selectAllContent/index.ts b/src/templates/bootstrap3/selectAllContent/index.ts new file mode 100644 index 00000000..6cc911a1 --- /dev/null +++ b/src/templates/bootstrap3/selectAllContent/index.ts @@ -0,0 +1,2 @@ +import html from './html.ejs'; +export default { html }; \ No newline at end of file diff --git a/src/templates/bootstrap4/componentModal/form.ejs b/src/templates/bootstrap4/componentModal/form.ejs index 28933d1e..cdae5720 100644 --- a/src/templates/bootstrap4/componentModal/form.ejs +++ b/src/templates/bootstrap4/componentModal/form.ejs @@ -9,9 +9,9 @@ {% } else { %} {% } %} -
+
{% if (ctx.visible) { %} - {{ctx.children}} +
{{ctx.children}}
{% } %}
{% if (ctx.options.vpat) { %} diff --git a/src/templates/bootstrap4/datagrid/form.ejs b/src/templates/bootstrap4/datagrid/form.ejs index 74a23a4c..fd8329fd 100644 --- a/src/templates/bootstrap4/datagrid/form.ejs +++ b/src/templates/bootstrap4/datagrid/form.ejs @@ -38,8 +38,8 @@ {% } %}
{% if (ctx.component.reorder) { %} - {% } %} {% ctx.columns.forEach(function(col) { %} @@ -49,8 +49,8 @@ {% }) %} {% if (ctx.hasExtraColumn) { %} {% if (ctx.hasRemoveButtons) { %} - diff --git a/src/templates/bootstrap4/file/form.ejs b/src/templates/bootstrap4/file/form.ejs index c1b37136..23062c4c 100644 --- a/src/templates/bootstrap4/file/form.ejs +++ b/src/templates/bootstrap4/file/form.ejs @@ -124,6 +124,18 @@ {% }) %} + {% ctx.filesToUpload.forEach(function(file) { %} + {% if (file.status === 'progress') { %} +
{{ctx.fileSize(file.size)}}
+
+
+ {{file.progress}}% {{ctx.t('Complete')}} +
+
+ {% } else { %} +
{{ctx.t(file.message)}}
+ {% } %} + {% }) %} {% } %} {% if (!ctx.disabled && (ctx.component.multiple || !ctx.files.length)) { %} diff --git a/src/templates/bootstrap4/grid/html.ejs b/src/templates/bootstrap4/grid/html.ejs index ce5536a8..c12e0f8a 100644 --- a/src/templates/bootstrap4/grid/html.ejs +++ b/src/templates/bootstrap4/grid/html.ejs @@ -15,6 +15,9 @@
+ {% if (ctx.component.selectAllRows) { %} +
+ {% } %}
- + + - +
diff --git a/src/templates/bootstrap4/index.ts b/src/templates/bootstrap4/index.ts index 184b1d01..abf8916b 100644 --- a/src/templates/bootstrap4/index.ts +++ b/src/templates/bootstrap4/index.ts @@ -67,6 +67,7 @@ import pagination from './pagination'; import columnMenu from './column-menu'; import tbody from './tbody'; import paginationBottom from './pagination-bottom'; +import selectAllContent from './selectAllContent'; export default { transform(type, text) { @@ -148,5 +149,6 @@ export default { pagination, columnMenu, tbody, - paginationBottom + paginationBottom, + selectAllContent }; diff --git a/src/templates/bootstrap4/selectAllContent/html.ejs b/src/templates/bootstrap4/selectAllContent/html.ejs new file mode 100644 index 00000000..6efae62d --- /dev/null +++ b/src/templates/bootstrap4/selectAllContent/html.ejs @@ -0,0 +1,23 @@ +
+ + {% if (!ctx.allRowsSelected) { %} + All {{ ctx.totalSelected }} records on this page are selected. + {% } %} + {% if (ctx.allRowsSelected) { %} + All {{ ctx.totalItems }} records in the table are selected. + {% } %} + + +
+
+ + + {% if (!ctx.allRowsSelected) { %} + Select all {{ ctx.totalItems }} items in the table. + {% } %} + {% if (ctx.allRowsSelected) { %} + Clear selection. + {% } %} + + +
\ No newline at end of file diff --git a/src/templates/bootstrap4/selectAllContent/index.ts b/src/templates/bootstrap4/selectAllContent/index.ts new file mode 100644 index 00000000..6cc911a1 --- /dev/null +++ b/src/templates/bootstrap4/selectAllContent/index.ts @@ -0,0 +1,2 @@ +import html from './html.ejs'; +export default { html }; \ No newline at end of file diff --git a/src/templates/bootstrap5/componentModal/form.ejs b/src/templates/bootstrap5/componentModal/form.ejs index a331220d..81274f57 100644 --- a/src/templates/bootstrap5/componentModal/form.ejs +++ b/src/templates/bootstrap5/componentModal/form.ejs @@ -9,9 +9,9 @@ {% } else { %} {% } %} -
+
{% if (ctx.visible) { %} - {{ctx.children}} +
{{ctx.children}}
{% } %}
{% if (ctx.options.vpat) { %} diff --git a/src/templates/bootstrap5/datagrid/form.ejs b/src/templates/bootstrap5/datagrid/form.ejs index b3059fda..406b525e 100644 --- a/src/templates/bootstrap5/datagrid/form.ejs +++ b/src/templates/bootstrap5/datagrid/form.ejs @@ -38,8 +38,8 @@ {% } %}
{% if (ctx.component.reorder) { %} - {% } %} {% ctx.columns.forEach(function(col) { %} @@ -49,8 +49,8 @@ {% }) %} {% if (ctx.hasExtraColumn) { %} {% if (ctx.hasRemoveButtons) { %} - diff --git a/src/templates/bootstrap5/file/form.ejs b/src/templates/bootstrap5/file/form.ejs index 602a130b..61bc0123 100644 --- a/src/templates/bootstrap5/file/form.ejs +++ b/src/templates/bootstrap5/file/form.ejs @@ -124,6 +124,18 @@ {% }) %} + {% ctx.filesToUpload.forEach(function(file) { %} + {% if (file.status === 'progress') { %} +
{{ctx.fileSize(file.size)}}
+
+
+ {{file.progress}}% {{ctx.t('Complete')}} +
+
+ {% } else { %} +
{{ctx.t(file.message)}}
+ {% } %} + {% }) %} {% } %} {% if (!ctx.disabled && (ctx.component.multiple || !ctx.files.length)) { %}
- + + - +