From 618ad89e1565f488d412fc7bf1cfe586871ac6b1 Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Tue, 9 Jul 2024 23:08:08 +0100 Subject: [PATCH] Code refactor Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- config/system.php | 12 +- package-lock.json | 28 ++-- package.json | 2 +- public/js/app.js.LICENSE.txt | 4 +- resources/css/widgets/table.css | 62 ++++++-- resources/js/formwidgets/recordeditor.js | 99 ------------ resources/js/partials/request.js | 19 +-- resources/js/widgets/daterangepicker.js | 27 +++- resources/js/widgets/lists.js | 14 +- resources/js/widgets/mediamanager.js | 12 +- resources/lang/en/system.php | 15 +- resources/models/system/extension.php | 4 +- resources/models/system/language.php | 12 +- resources/scss/components/_alert.scss | 18 +++ resources/scss/components/_buttons.scss | 14 +- resources/scss/components/_cards.scss | 6 +- resources/scss/components/_dropdown.scss | 4 + resources/scss/components/_forms.scss | 16 +- resources/scss/components/_layout.scss | 21 +-- resources/scss/components/_loader.scss | 16 +- resources/scss/components/_mainmenu.scss | 26 +-- resources/scss/components/_sidenav.scss | 58 ++----- resources/scss/components/_tables.scss | 42 +---- resources/scss/components/_toolbar.scss | 9 +- resources/scss/helpers/_variables.scss | 23 +-- resources/scss/utilities/_utilities.scss | 12 ++ resources/scss/vendor/_choices.scss | 6 +- .../views/admin/_components/aside.blade.php | 114 ++++++-------- .../admin/_components/forms/error.blade.php | 0 .../admin/_components/forms/form.blade.php | 15 -- .../admin/_components/forms/help.blade.php | 0 .../admin/_components/forms/label.blade.php | 3 - .../admin/_components/forms/select.blade.php | 34 ---- .../views/admin/_components/header.blade.php | 36 +++-- .../admin/_components/modal/close.blade.php | 1 - .../admin/_components/modal/content.blade.php | 19 --- .../admin/_components/modal/form.blade.php | 27 ---- .../admin/_components/modal/index.blade.php | 25 --- .../admin/_components/modal/loading.blade.php | 14 -- .../views/admin/_layouts/default.blade.php | 57 ++++--- .../views/admin/_partials/flash.blade.php | 6 +- .../form/toolbar_save_button.blade.php | 2 +- .../widget_toolbar.blade.php | 4 +- .../_partials/widgets/filter/filter.blade.php | 92 +++++------ .../widgets/filter/filter_scopes.blade.php | 2 +- .../widgets/filter/scope_date.blade.php | 2 +- .../widgets/filter/scope_daterange.blade.php | 2 +- .../widgets/filter/scope_select.blade.php | 6 +- .../widgets/filter/scope_selectlist.blade.php | 6 +- .../widgets/filter/scope_switch.blade.php | 2 +- .../widgets/lists/list_actions.blade.php | 14 +- .../widgets/lists/list_body.blade.php | 9 +- .../widgets/lists/list_head.blade.php | 85 +++++----- .../widgets/lists/list_pagination.blade.php | 6 +- .../widgets/lists/list_setup_form.blade.php | 54 ++++--- .../widgets/searchbox/searchbox.blade.php | 36 +++-- .../widgets/toolbar/button_dropdown.blade.php | 27 ++-- .../widgets/toolbar/toolbar.blade.php | 2 +- resources/views/admin/create.blade.php | 31 ++-- resources/views/admin/edit.blade.php | 31 ++-- resources/views/admin/index.blade.php | 23 ++- resources/views/admin/preview.blade.php | 31 ++-- .../mediamanager/folder_tree.blade.php | 2 +- .../widgets/mediamanager/list_grid.blade.php | 2 +- .../mediamanager/mediamanager.blade.php | 8 +- .../widgets/mediamanager/popup.blade.php | 2 +- resources/views/main/themes/delete.blade.php | 89 ++++++----- resources/views/main/themes/index.blade.php | 4 +- .../system/_mail/layouts/default.blade.php | 2 +- .../_partials/extensions/lists/list.blade.php | 26 +-- .../languages/translationseditor.blade.php | 20 ++- .../_partials/updates/carte_info.blade.php | 8 +- .../views/system/extensions/delete.blade.php | 126 ++++++++------- .../views/system/extensions/edit.blade.php | 33 ++-- .../views/system/extensions/index.blade.php | 22 ++- .../views/system/languages/index.blade.php | 30 ++++ .../views/system/settings/edit.blade.php | 33 ++-- .../views/system/settings/index.blade.php | 2 +- .../views/system/systemlogs/index.blade.php | 37 +++-- .../views/system/updates/index.blade.php | 38 +++-- src/Admin/FormWidgets/Connector.php | 1 - src/Admin/FormWidgets/RecordEditor.php | 1 - src/Admin/Http/Actions/FormController.php | 7 +- src/Admin/Http/Controllers/Statuses.php | 1 + .../Providers/MenuItemServiceProvider.php | 39 ++--- src/Admin/Traits/HasChartDatasets.php | 13 +- src/Admin/Widgets/Filter.php | 2 +- src/Admin/Widgets/Form.php | 3 +- src/Admin/Widgets/Lists.php | 8 +- src/Admin/Widgets/Toolbar.php | 4 +- src/Flame/Pagic/Cache/FileSystem.php | 2 +- src/Flame/Pagic/Parsers/FileParser.php | 2 +- src/Main/Classes/ThemeManager.php | 16 +- src/Main/Http/Controllers/Themes.php | 15 +- src/System/Classes/HubManager.php | 21 ++- src/System/Classes/LanguageManager.php | 132 ++++++++++++---- .../Console/Commands/LanguageInstall.php | 13 +- src/System/Http/Controllers/Languages.php | 148 +++++++----------- src/System/Http/Controllers/SystemLogs.php | 2 +- src/System/Models/Language.php | 10 +- src/System/Models/Settings.php | 19 ++- src/System/Providers/FormServiceProvider.php | 9 ++ src/System/Traits/ManagesUpdates.php | 2 +- tests/src/Admin/Classes/NavigationTest.php | 2 - .../src/Admin/DashboardWidgets/ChartsTest.php | 2 +- tests/src/Admin/FormWidgets/ConnectorTest.php | 1 - .../Admin/FormWidgets/RecordEditorTest.php | 1 - tests/src/Admin/Widgets/FilterTest.php | 2 +- tests/src/Admin/Widgets/ListsTest.php | 1 - 109 files changed, 1184 insertions(+), 1178 deletions(-) delete mode 100644 resources/js/formwidgets/recordeditor.js delete mode 100644 resources/views/admin/_components/forms/error.blade.php delete mode 100644 resources/views/admin/_components/forms/form.blade.php delete mode 100644 resources/views/admin/_components/forms/help.blade.php delete mode 100644 resources/views/admin/_components/forms/label.blade.php delete mode 100644 resources/views/admin/_components/forms/select.blade.php delete mode 100644 resources/views/admin/_components/modal/close.blade.php delete mode 100644 resources/views/admin/_components/modal/content.blade.php delete mode 100644 resources/views/admin/_components/modal/form.blade.php delete mode 100644 resources/views/admin/_components/modal/index.blade.php delete mode 100644 resources/views/admin/_components/modal/loading.blade.php create mode 100644 resources/views/system/languages/index.blade.php diff --git a/config/system.php b/config/system.php index 8b7bfb2d..835c0a81 100644 --- a/config/system.php +++ b/config/system.php @@ -38,7 +38,7 @@ | */ - 'defaultTheme' => 'tastyigniter-orange', + 'defaultTheme' => 'igniter-orange', /* |-------------------------------------------------------------------------- @@ -183,4 +183,14 @@ 'igniter.reservation', 'igniter.user', ], + + /* + | -------------------------------------------------------------------------- + | Updates Endpoint + | -------------------------------------------------------------------------- + | + | Specifies the URL to the TastyIgniter updates API endpoint. + | + */ + 'updatesEndpoint' => 'https://api.tastyigniter.com/v2', ]; diff --git a/package-lock.json b/package-lock.json index df4d153f..bc1713bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "@popperjs/core": "^2.10.2", "alpinejs": "^3.1.1", "animate.css": "^4.1.1", - "bootstrap": "^5.1.3", + "bootstrap": "^5.3.3", "bootstrap-table": "^1.19.1", "chart.js": "^3.7.1", "chartjs-adapter-moment": "^1.0.0", @@ -1964,9 +1964,9 @@ } }, "node_modules/@popperjs/core": { - "version": "2.11.6", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", - "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==", + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -3027,9 +3027,9 @@ } }, "node_modules/bootstrap": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz", - "integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", + "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", "funding": [ { "type": "github", @@ -3041,7 +3041,7 @@ } ], "peerDependencies": { - "@popperjs/core": "^2.11.6" + "@popperjs/core": "^2.11.8" } }, "node_modules/bootstrap-table": { @@ -11468,9 +11468,9 @@ } }, "@popperjs/core": { - "version": "2.11.6", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", - "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==" + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==" }, "@swc/helpers": { "version": "0.2.14", @@ -12395,9 +12395,9 @@ } }, "bootstrap": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz", - "integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", + "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", "requires": {} }, "bootstrap-table": { diff --git a/package.json b/package.json index 9b9a6a1e..e32fdddd 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "@popperjs/core": "^2.10.2", "alpinejs": "^3.1.1", "animate.css": "^4.1.1", - "bootstrap": "^5.1.3", + "bootstrap": "^5.3.3", "bootstrap-table": "^1.19.1", "chart.js": "^3.7.1", "chartjs-adapter-moment": "^1.0.0", diff --git a/public/js/app.js.LICENSE.txt b/public/js/app.js.LICENSE.txt index 99f6a4bf..767718e0 100644 --- a/public/js/app.js.LICENSE.txt +++ b/public/js/app.js.LICENSE.txt @@ -1,6 +1,6 @@ /*! - * Bootstrap v5.2.3 (https://getbootstrap.com/) - * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap v5.3.3 (https://getbootstrap.com/) + * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ diff --git a/resources/css/widgets/table.css b/resources/css/widgets/table.css index 3a6269a3..73635f1e 100644 --- a/resources/css/widgets/table.css +++ b/resources/css/widgets/table.css @@ -1,14 +1,33 @@ -.fixed-table-container .bs-checkbox, .fixed-table-container .no-records-found { text-align: center } +.fixed-table-container .bs-checkbox, .fixed-table-container .no-records-found { + text-align: center +} + /*.fixed-table-body thead th .th-inner, .table td, .table th { box-sizing: border-box }*/ /*.bootstrap-table .table { margin-bottom: 0 !important; border-bottom: 1px solid #DDD; border-collapse: collapse !important; border-radius: 1px }*/ /*.bootstrap-table .table:not(.table-condensed), .bootstrap-table .table:not(.table-condensed) > tbody > tr > td, .bootstrap-table .table:not(.table-condensed) > tbody > tr > th, .bootstrap-table .table:not(.table-condensed) > tfoot > tr > td, .bootstrap-table .table:not(.table-condensed) > tfoot > tr > th, .bootstrap-table .table:not(.table-condensed) > thead > tr > td { padding: 8px }*/ /*.bootstrap-table .table.table-no-bordered > tbody > tr > td, .bootstrap-table .table.table-no-bordered > thead > tr > th { border-right: 2px solid transparent }*/ /*.bootstrap-table .table.table-no-bordered > tbody > tr > td:last-child { border-right: none }*/ -.fixed-table-container { position: relative; clear: both; border: 1px solid #E3E6EE; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px } +.fixed-table-container { + position: relative; + clear: both; + border: 1px solid #E3E6EE; + border-radius: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px +} + /*.fixed-table-container.table-no-bordered { border: 1px solid transparent }*/ /*.fixed-table-footer, .fixed-table-header { overflow: hidden }*/ -.fixed-table-footer { border-top: 1px solid #E3E6EE } -.fixed-table-body { overflow-x: auto; overflow-y: auto; height: 100% } +.fixed-table-footer { + border-top: 1px solid #E3E6EE +} + +.fixed-table-body { + overflow-x: auto; + overflow-y: auto; + height: 100% +} + /*.fixed-table-container table { width: 100% }*/ /*.fixed-table-container thead th { height: 0; padding: 0; margin: 0; border-left: 1px solid #E3E6EE }*/ /*.fixed-table-container thead th:focus { outline: transparent solid 0 }*/ @@ -25,9 +44,19 @@ /*.fixed-table-container tbody .selected td { background-color: #F5F5F5 }*/ /*.fixed-table-container .bs-checkbox .th-inner { padding: 8px 0 }*/ /*.fixed-table-container input[type=radio], .fixed-table-container input[type=checkbox] { margin: 0 auto !important }*/ -.fixed-table-pagination .pagination-detail, .fixed-table-pagination div.pagination { margin-top: 15px; margin-bottom: 15px } -.fixed-table-pagination div.pagination .pagination { margin: 0 } -.fixed-table-pagination .page-list .btn-group .btn { padding: 6px 15px } +.fixed-table-pagination .pagination-detail, .fixed-table-pagination div.pagination { + margin-top: 15px; + margin-bottom: 15px +} + +.fixed-table-pagination div.pagination .pagination { + margin: 0 +} + +.fixed-table-pagination .page-list .btn-group .btn { + padding: 6px 15px +} + /*.fixed-table-pagination .pagination a { padding: 6px 12px; line-height: 1.428571429 }*/ /*.fixed-table-pagination .pagination-info { line-height: 34px; margin-right: 5px }*/ /*.fixed-table-pagination .btn-group { position: relative; display: inline-block; vertical-align: middle }*/ @@ -38,7 +67,18 @@ /*.fixed-table-toolbar .columns label { display: block; padding: 3px 20px; clear: both; font-weight: 400; line-height: 1.428571429 }*/ /*.fixed-table-toolbar .bs-bars, .fixed-table-toolbar .columns, .fixed-table-toolbar .search { position: relative; margin-top: 10px; margin-bottom: 10px; line-height: 34px }*/ /*.fixed-table-pagination li.disabled a { pointer-events: none; cursor: default }*/ -.fixed-table-loading { display: none; position: absolute; top: 42px; right: 0; bottom: 0; left: 0; z-index: 99; background-color: #FFF; text-align: center } +.fixed-table-loading { + display: none; + position: absolute; + top: 42px; + right: 0; + bottom: 0; + left: 0; + z-index: 99; + background-color: #FFF; + text-align: center +} + /*.fixed-table-body .card-view .title { font-weight: 700; display: inline-block; min-width: 30%; text-align: left !important }*/ /*.table td, .table th { vertical-align: middle }*/ /*.fixed-table-toolbar .dropdown-menu { text-align: left; max-height: 300px; overflow: auto }*/ @@ -56,5 +96,9 @@ /*.fixed-table-pagination:after, .fixed-table-toolbar:after { content: ""; display: block; clear: both }*/ .bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading { - background: var(--bs-gray-200); + background: var(--bs-gray-200); +} + +.bootstrap-table .fixed-table-container.fixed-height .table thead th { + background-color: transparent; } diff --git a/resources/js/formwidgets/recordeditor.js b/resources/js/formwidgets/recordeditor.js deleted file mode 100644 index bd90f602..00000000 --- a/resources/js/formwidgets/recordeditor.js +++ /dev/null @@ -1,99 +0,0 @@ -+function ($) { - "use strict"; - - var RecordEditor = function (element, options) { - this.$el = $(element) - this.options = options - - this.$assignRecordEl = this.$el.find('[data-control="assign-record"]') - this.$createRecordEl = this.$el.find('[data-control="create-record"]') - this.$editRecordEl = this.$el.find('[data-control="edit-record"]') - this.$deleteRecordEl = this.$el.find('[data-control="delete-record"]') - - this.init() - } - - RecordEditor.prototype.constructor = RecordEditor - - RecordEditor.prototype.init = function () { - this.$createRecordEl.on('click', $.proxy(this.onClickFormButton, this)) - this.$editRecordEl.on('click', $.proxy(this.onClickFormButton, this)) - this.$deleteRecordEl.on('click', $.proxy(this.onClickDeleteButton, this)) - this.$assignRecordEl.on('click', $.proxy(this.onClickAssignButton, this)) - } - - // EVENT HANDLERS - // ============================ - - RecordEditor.prototype.onClickFormButton = function (event) { - var $button = $(event.currentTarget), - isCreateContext = $button.data('control') === 'create-record' - - new $.ti.recordEditor.modal({ - alias: this.options.alias, - recordId: isCreateContext ? null : $button.data('recordId'), - onSave: function () { - this.hide() - } - }) - } - - RecordEditor.prototype.onClickDeleteButton = function (event) { - var handler = this.options.alias+'::onDeleteRecord', - $button = $(event.currentTarget), - confirmMsg = $button.data('confirmMessage') - - $.request(handler, { - data: {recordId: $button.data('recordId')}, - confirm: confirmMsg - }) - } - - RecordEditor.prototype.onClickAssignButton = function (event) { - var handler = this.options.alias+'::onAssignRecord', - $button = $(event.currentTarget) - - $button.request(handler, { - data: {recordId: $button.data('recordId')} - }) - } - - RecordEditor.DEFAULTS = { - alias: undefined, - } - - // FormTable PLUGIN DEFINITION - // ============================ - - var old = $.fn.recordEditor - - $.fn.recordEditor = function (option) { - var args = Array.prototype.slice.call(arguments, 1), result - this.each(function () { - var $this = $(this) - var data = $this.data('ti.recordEditor') - var options = $.extend({}, RecordEditor.DEFAULTS, $this.data(), typeof option == 'object' && option) - if (!data) $this.data('ti.recordEditor', (data = new RecordEditor(this, options))) - if (typeof option == 'string') result = data[option].apply(data, args) - if (typeof result != 'undefined') return false - }) - - return result ? result : this - } - - $.fn.recordEditor.Constructor = RecordEditor - - // RecordEditor NO CONFLICT - // ================= - - $.fn.recordEditor.noConflict = function () { - $.fn.recordEditor = old - return this - } - - // RecordEditor DATA-API - // =============== - $(document).render(function () { - $('[data-control="record-editor"]').recordEditor() - }) -}(window.jQuery); diff --git a/resources/js/partials/request.js b/resources/js/partials/request.js index 7aa6bd87..bfa22153 100644 --- a/resources/js/partials/request.js +++ b/resources/js/partials/request.js @@ -106,8 +106,8 @@ if (window.jQuery.request !== undefined) success: function (data, textStatus, jqXHR) { // Stop beforeUpdate() OR data-request-before-update returns false if (self.options.beforeUpdate.apply(self, [data, textStatus, jqXHR]) === false) return - if (options.fireBeforeUpdate && eval('(function($el, context, data, textStatus, jqXHR) {' + - options.fireBeforeUpdate + '}.call($el.get(0), $el, context, data, textStatus, jqXHR))') === false) return + if (options.fireBeforeUpdate && eval('(function($el, context, data, textStatus, jqXHR) {'+ + options.fireBeforeUpdate+'}.call($el.get(0), $el, context, data, textStatus, jqXHR))') === false) return // Trigger 'ajaxBeforeUpdate' on the form, stop if event.preventDefault() is called var _event = jQuery.Event('ajaxBeforeUpdate') @@ -125,7 +125,7 @@ if (window.jQuery.request !== undefined) updatePromise.done(function () { $triggerEl.trigger('ajaxSuccess', [context, data, textStatus, jqXHR]) - options.fireSuccess && eval('(function($el, context, data, textStatus, jqXHR) {' + options.fireSuccess + '}.call($el.get(0), $el, context, data, textStatus, jqXHR))') + options.fireSuccess && eval('(function($el, context, data, textStatus, jqXHR) {'+options.fireSuccess+'}.call($el.get(0), $el, context, data, textStatus, jqXHR))') }) return updatePromise @@ -158,7 +158,7 @@ if (window.jQuery.request !== undefined) if (_event.isDefaultPrevented()) return // Stop here if the data-request-error attribute returns false - if (options.fireError && eval('(function($el, context, textStatus, jqXHR) {' + options.fireError + '}.call($el.get(0), $el, context, textStatus, jqXHR))') === false) + if (options.fireError && eval('(function($el, context, textStatus, jqXHR) {'+options.fireError+'}.call($el.get(0), $el, context, textStatus, jqXHR))') === false) return requestOptions.handleErrorMessage(errorMsg) @@ -169,7 +169,7 @@ if (window.jQuery.request !== undefined) }, complete: function (data, textStatus, jqXHR) { $triggerEl.trigger('ajaxComplete', [context, data, textStatus, jqXHR]) - options.fireComplete && eval('(function($el, context, data, textStatus, jqXHR) {' + options.fireComplete + '}.call($el.get(0), $el, context, data, textStatus, jqXHR))') + options.fireComplete && eval('(function($el, context, data, textStatus, jqXHR) {'+options.fireComplete+'}.call($el.get(0), $el, context, data, textStatus, jqXHR))') }, // Custom function, requests confirmation from the user @@ -211,7 +211,7 @@ if (window.jQuery.request !== undefined) $.each(fields, function focusErrorField(fieldName, fieldMessages) { fieldName = fieldName.replace(/\.(\w+)/g, '[$1]') - var fieldElement = $form.find('[name="' + fieldName + '"], [name="' + fieldName + '[]"], [name$="[' + fieldName + ']"], [name$="[' + fieldName + '][]"]').filter(':enabled').first() + var fieldElement = $form.find('[name="'+fieldName+'"], [name="'+fieldName+'[]"], [name$="['+fieldName+']"], [name$="['+fieldName+'][]"]').filter(':enabled').first() if (fieldElement.length > 0) { var _event = jQuery.Event('ajaxInvalidField') @@ -237,6 +237,7 @@ if (window.jQuery.request !== undefined) try { dataArray = jQuery.type(data) === 'object' ? data : jQuery.parseJSON(data) } catch (e) { + console.error('JSON parse error', e) } for (var partial in dataArray) { @@ -406,9 +407,9 @@ if (window.jQuery.request !== undefined) if (typeof value == 'object') return value try { - return JSON.parse(JSON.stringify(eval("({" + value + "})"))) + return JSON.parse(JSON.stringify(eval("({"+value+"})"))) } catch (e) { - throw new Error('Error parsing the ' + name + ' attribute value. ' + e) + throw new Error('Error parsing the '+name+' attribute value. '+e) } } @@ -428,7 +429,7 @@ if (window.jQuery.request !== undefined) for (let errorKey in errorBag) { const errors = errorBag[errorKey] for (let error in errors) { - formattedErrorMessage += errors[error] + '
' + formattedErrorMessage += errors[error]+'
' } } return formattedErrorMessage.slice(0, -4) diff --git a/resources/js/widgets/daterangepicker.js b/resources/js/widgets/daterangepicker.js index 16d5c27d..74f4eb0d 100644 --- a/resources/js/widgets/daterangepicker.js +++ b/resources/js/widgets/daterangepicker.js @@ -57,27 +57,40 @@ } DateRangePickerControl.prototype.onDateSelected = function (start, end, label, initialize) { - var format = this.options.timePicker ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD' + var format = this.options.timePicker ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD', + inputChanged if (!this.options.singleDatePicker) { - this.$el.find('[data-datepicker-range-start]').val(start.isValid() ? start.format(format) : ''); - this.$el.find('[data-datepicker-range-end]').val(end.isValid() ? end.format(format) : ''); + var $startInput = this.$el.find('[data-datepicker-range-start]'), + $endInput = this.$el.find('[data-datepicker-range-end]'), + startValue = $startInput.val(), + endValue = $endInput.val() + + $startInput.val(start.isValid() ? start.format(format) : ''); + $endInput.val(end.isValid() ? end.format(format) : ''); + + inputChanged = startValue != $startInput.val() || endValue != $endInput.val() } else { - this.$el.find('[data-datepicker-input]').val(start.format(format)); + var $dateInput = this.$el.find('[data-datepicker-input]'), + dateValue = $dateInput.val() + + $dateInput.val(start.format(format)); + + inputChanged = dateValue != $dateInput.val(); } - if (!initialize) this.$el.closest('form').submit(); + if (!initialize && inputChanged) this.$el.closest('form').submit(); } DateRangePickerControl.prototype.onShowCalendar = function (event, daterangepicker) { var valueChanged = false; - if (! daterangepicker.startDate.isValid()) { + if (!daterangepicker.startDate.isValid()) { daterangepicker.setStartDate(moment().startOf('day')); valueChanged = true; } - if (! daterangepicker.endDate.isValid()) { + if (!daterangepicker.endDate.isValid()) { daterangepicker.setEndDate(moment().endOf('day')); valueChanged = true; } diff --git a/resources/js/widgets/lists.js b/resources/js/widgets/lists.js index f6d2e606..9938f230 100644 --- a/resources/js/widgets/lists.js +++ b/resources/js/widgets/lists.js @@ -1,15 +1,9 @@ -// List Filter State Toggle -// Uses user cookie value to show/hide list filter bar +// Submit list filter form on select change $(function () { - $(document).on('click', '[data-toggle="list-filter"]', function () { - var $button = $(this), - $dropdownButton = $($button.data('target')) - - $button.toggleClass('active') - $dropdownButton.attr('data-bs-offset', "-50," + Math.abs($button.closest('thead').offset().top - $('#toolbar').height() - $('.navbar-top').height() - 20)) - $dropdownButton.click() + $(document).on('change', '.filter-scope select, .filter-scope input[type="checkbox"]', function (event) { + $(event.currentTarget).closest('form').submit() }) -}); +}) $(function ($) { // List setup form sortables diff --git a/resources/js/widgets/mediamanager.js b/resources/js/widgets/mediamanager.js index 3ba407e9..76aa8a72 100644 --- a/resources/js/widgets/mediamanager.js +++ b/resources/js/widgets/mediamanager.js @@ -69,18 +69,8 @@ if (!this.$el) return; - var windowHeight = window.innerHeight, - listTopOffset = this.$el.find('[data-control="media-list"]').get(0).offsetTop, - statusbarHeight = this.$el.find('[data-control="media-statusbar"]').outerHeight() || 0, - modalHeaderHeight = this.$el.closest('.modal').find('.modal-header').outerHeight() || 0 - - var listHeight = Math.max(0, windowHeight-listTopOffset-parseInt(modalHeaderHeight)-parseInt(statusbarHeight)) - - if (listHeight < 1) - return - $('.media-list-container', this.$mediaListElement) - .css('height', listHeight) + .css('height', '67vh') .css('overflow-y', 'scroll') } diff --git a/resources/lang/en/system.php b/resources/lang/en/system.php index 9c2a5e1c..c109b4b8 100644 --- a/resources/lang/en/system.php +++ b/resources/lang/en/system.php @@ -154,15 +154,16 @@ 'text_tab_edit_file' => 'Edit Translations', 'text_filter_search' => 'Search by name.', 'text_filter_file' => 'View all groups', - 'text_filter_translations' => 'Filter translations.', + 'text_filter_translations' => 'Search translations by key or text', 'text_empty' => 'There are no languages available.', 'text_empty_translations' => 'There are no translations available.', 'text_files' => 'files', - 'text_locale_strings' => 'Locale Strings (%s%% translated, %s strings)', + 'text_locale_strings' => 'Total: %s, translated: %s (%s%%), untranslated %s', 'text_current_build' => 'Current build: %s', 'text_title_update_available' => 'New translation strings are available for (%s).', 'text_update_available' => 'Only the translation strings that haven’t been modified will be updated.', 'text_no_update_available' => '(%s) is up to date', + 'text_publish_translations' => 'Publish translations', 'column_code' => 'Code', 'column_status' => 'Status', @@ -174,17 +175,20 @@ 'label_check_updates' => 'Check for updates', 'button_browse' => '  Browse more languages  ', - 'button_check' => '  Check for updates', - 'button_apply_update' => 'Apply updates', + 'button_apply_update' => '  Download new translated strings', + 'button_import_translations' => 'Import translations', + 'button_publish_translations' => 'Publish translations', 'help_language' => 'Use a full locale code (e.g. “fr_FR”) instead of just a generic language code (e.g. “fr”), must be same as the locale directory.', 'help_locale_strings' => 'Make sure NOT to translate placeholders like %s or :name. Leave them as is.', + 'help_publish_translations' => 'If you want your translations included in the core or extension release, please upload them to the Crowdin project. They will be reviewed by the Core Team or the Extension Author.', 'alert_set_default' => 'Language set as default', - 'alert_save_changes' => 'Your changes will be lost if you don\'t save them before editing another language file.', 'alert_update_complete' => '%s: Translation strings for (%s) have been updated.', 'alert_update_failed' => '%s: Failed to update translation strings for (%s).', 'alert_update_progress' => '%s: Pulling translation strings for (%s)...', + 'alert_language_not_found' => 'Language not found', + 'alert_publish_success' => 'Translations published successfully', 'translations' => [ @@ -361,6 +365,7 @@ 'text_tab_desc_general' => 'Configure your restaurant name, email, logo and geolocation settings', 'text_tab_desc_site' => 'Configure your site default country, language, currency and timezone settings.', 'text_tab_desc_mail' => 'Settings for sending out emails', + 'text_tab_desc_status' => 'Manage your order and reservation statuses.', 'text_tab_desc_server' => 'Manage advanced system settings such as enabling/disabling maintenance.', 'text_tab_desc_language' => 'Manage languages available on your site.', 'text_tab_desc_currency' => 'Manage currencies available on your site.', diff --git a/resources/models/system/extension.php b/resources/models/system/extension.php index 449729ec..c23b5fe7 100644 --- a/resources/models/system/extension.php +++ b/resources/models/system/extension.php @@ -26,7 +26,7 @@ $config['list']['columns'] = [ 'install' => [ 'type' => 'button', - 'iconCssClass' => 'fas fa-check', + 'iconCssClass' => 'fas fa-fw fa-check', 'attributes' => [ 'class' => 'btn btn-light text-success mr-3 shadow-none', 'data-request' => 'onInstall', @@ -35,7 +35,7 @@ ], 'uninstall' => [ 'type' => 'button', - 'iconCssClass' => 'fas fa-xmark', + 'iconCssClass' => 'fas fa-fw fa-xmark', 'attributes' => [ 'class' => 'btn btn-light text-danger mr-3 shadow-none', 'data-request' => 'onUninstall', diff --git a/resources/models/system/language.php b/resources/models/system/language.php index dd188cc2..4ac83252 100644 --- a/resources/models/system/language.php +++ b/resources/models/system/language.php @@ -150,11 +150,11 @@ $config['form']['tabs'] = [ 'defaultTab' => 'lang:igniter::system.languages.text_tab_general', 'fields' => [ - '_file' => [ + '_group' => [ 'tab' => 'lang:igniter::system.languages.text_tab_files', 'type' => 'select', 'context' => 'edit', - 'options' => [], + 'options' => 'getGroupOptions', 'span' => 'none', 'placeholder' => 'igniter::system.languages.text_filter_file', 'cssClass' => 'col-md-4', @@ -174,17 +174,17 @@ 'data-request' => 'onSubmitFilter', ], ], - '_string_filter' => [ + '_filter' => [ 'tab' => 'lang:igniter::system.languages.text_tab_files', 'type' => 'radiotoggle', 'context' => 'edit', 'span' => 'none', 'cssClass' => 'col-md-4', - 'default' => 'all', + 'default' => 'changed', 'options' => [ 'all' => 'All', - 'unchanged' => 'Unchanged', - 'changed' => 'Changed', + 'changed' => 'Translated', + 'unchanged' => 'Untranslated', ], 'attributes' => [ 'data-control' => 'string-filter', diff --git a/resources/scss/components/_alert.scss b/resources/scss/components/_alert.scss index 3f907993..2aa5912d 100644 --- a/resources/scss/components/_alert.scss +++ b/resources/scss/components/_alert.scss @@ -1,6 +1,7 @@ #notification { display: none; } + body.swal2-toast-shown { .swal2-container { &.swal2-bottom-start { @@ -23,6 +24,23 @@ body:not(.swal2-toast-shown) { &.swal2-toast { padding: 0.6em 1em; + border-bottom: 2px solid transparent; + + &.swal2-icon-error, &.swal2-icon-danger { + border-bottom-color: var(--bs-danger); + } + + &.swal2-icon-success { + border-bottom-color: var(--bs-success); + } + + &.swal2-icon-info { + border-bottom-color: var(--bs-info); + } + + &.swal2-icon-warning { + border-bottom-color: var(--bs-warning); + } .swal2-icon { width: 1.5em; diff --git a/resources/scss/components/_buttons.scss b/resources/scss/components/_buttons.scss index bbd9a254..2339477f 100644 --- a/resources/scss/components/_buttons.scss +++ b/resources/scss/components/_buttons.scss @@ -24,13 +24,6 @@ } } -.btn-light:not(:disabled):not(.disabled):active, -.btn-light:not(:disabled):not(.disabled).active, -.show > .btn-light.dropdown-toggle { - background-color: $gray-400; - border-color: $gray-400; -} - .btn-primary, .btn-success, .btn-danger { @@ -42,3 +35,10 @@ color: $white !important; } } + +.btn-light:not(:disabled):not(.disabled):active, +.btn-light:not(:disabled):not(.disabled).active, +.show > .btn-light.dropdown-toggle { + background-color: $gray-400; + border-color: $gray-400; +} diff --git a/resources/scss/components/_cards.scss b/resources/scss/components/_cards.scss index 998658f6..7522e379 100644 --- a/resources/scss/components/_cards.scss +++ b/resources/scss/components/_cards.scss @@ -1,6 +1,10 @@ .card-hover { + &.shadow-sm { + box-shadow: none !important; + } + &:hover, &:focus { - background-color: lighten($gray-200, 2.5%); + border: 1px solid $primary; } } diff --git a/resources/scss/components/_dropdown.scss b/resources/scss/components/_dropdown.scss index 589f5a8c..ce3812be 100644 --- a/resources/scss/components/_dropdown.scss +++ b/resources/scss/components/_dropdown.scss @@ -1,3 +1,7 @@ .dropdown-item { border-radius: $border-radius; + + &.active { + font-weight: $font-weight-bold; + } } diff --git a/resources/scss/components/_forms.scss b/resources/scss/components/_forms.scss index fe07be05..a29d62de 100644 --- a/resources/scss/components/_forms.scss +++ b/resources/scss/components/_forms.scss @@ -95,20 +95,22 @@ // .form-nav { &.nav-tabs { + padding: $form-nav-padding; + .nav-link { border: 0 none; - font-weight: $font-weight-semibold; - padding: $form-nav-link-padding-y $form-nav-link-padding-x; - } - - .nav-link.active { - background-color: transparent; - color: $primary; font-weight: $font-weight-bold; + padding: $form-nav-link-padding-y $form-nav-link-padding-x; } .nav-link:hover, .nav-link:focus { + background-color: $dropdown-link-hover-bg; + border-radius: $input-border-radius; + } + + .nav-link.active { + background-color: transparent; color: $primary; } } diff --git a/resources/scss/components/_layout.scss b/resources/scss/components/_layout.scss index 1c122aeb..214bb281 100644 --- a/resources/scss/components/_layout.scss +++ b/resources/scss/components/_layout.scss @@ -1,10 +1,7 @@ .page-wrapper { - overflow-y: auto; - position: absolute; - top: $page-top; - bottom: $page-bottom; - left: $page-margin-left; - right: 0; + background-color: $gray-100; + display: flex; + flex-direction: column; > .content { margin: 0; @@ -15,9 +12,15 @@ } } -@include media-breakpoint-down(sm) { - .page-wrapper { - left: 0; +@include media-breakpoint-up(lg) { + .page-container { + .sidebar { + width: 14rem !important; + } + + .page-wrapper { + flex: 1 1 0%; + } } } diff --git a/resources/scss/components/_loader.scss b/resources/scss/components/_loader.scss index a99de18f..d318c1bf 100644 --- a/resources/scss/components/_loader.scss +++ b/resources/scss/components/_loader.scss @@ -9,20 +9,13 @@ text-align: left; font-size: 16px; z-index: $zindex-fixed; - - //> span { - // position: absolute; - // top: 50%; - // margin-top: -20px; - // left: 0; - // display: block; - //} } .progress-indicator-container { - position: relative; - min-height: 42px; - + &.in-progress { + position: relative; + } + .progress-indicator { background: transparent; border-radius: $border-radius; @@ -152,6 +145,7 @@ html.cssanimations { display: none; } } + .ti-loading { &.spinner-border { opacity: .5; diff --git a/resources/scss/components/_mainmenu.scss b/resources/scss/components/_mainmenu.scss index 18973c95..efdd722d 100644 --- a/resources/scss/components/_mainmenu.scss +++ b/resources/scss/components/_mainmenu.scss @@ -1,5 +1,5 @@ .navbar-top { - background-color: $body-bg; + background-color: $sidenav-bg; padding: 0; &.navbar-expand { @@ -15,7 +15,7 @@ &:hover, &:focus { - background-color: $gray-300; + background-color: $sidenav-hover-bg; border-radius: $input-border-radius; } @@ -102,7 +102,7 @@ .dropdown-item { .fa { - margin-right: 14px; + margin-right: 5px; } } @@ -203,22 +203,7 @@ &.navbar-expand { margin-left: 0; - .navbar { - border-bottom: $border-width solid $gray-800; - background-color: $gray-900; - position: fixed; - top: 0; - left: 0; - width: 100%; - z-index: 1030; - padding: 0; - } - .navbar-nav { - .nav-link, - > li.nav-item.show > a .fa { - color: $white; - } > li.dropdown.show > a::after { bottom: -1px; @@ -255,8 +240,3 @@ } } -@include media-breakpoint-down(sm) { - .page-title { - display: none; - } -} diff --git a/resources/scss/components/_sidenav.scss b/resources/scss/components/_sidenav.scss index 49105191..f1ba3f85 100644 --- a/resources/scss/components/_sidenav.scss +++ b/resources/scss/components/_sidenav.scss @@ -1,39 +1,14 @@ .sidebar { background-color: $sidenav-bg; - position: fixed; - top: $page-top; - bottom: 0; - width: $page-margin-left; } .nav-sidebar { - overflow-x: hidden; - overflow-y: scroll; - table-layout: fixed; - position: relative; - display: block; - height: 100%; - bottom: 0; - left: 0; - right: 0; &::-webkit-scrollbar { display: none; } - > .nav { - @include flex-direction(column); - width: $page-margin-left; - padding-bottom: 35px; - padding-right: 13px; - padding-left: 5px; - } - .nav { - .nav-item { - width: 100%; - } - > li > a { display: block; font-weight: $font-weight-semibold; @@ -45,17 +20,20 @@ } .fa { - color: $nav-link-color; + color: $sidenav-icon-color; } } li.active > a, .nav li.active > a, .nav li > a.active { - background-color: $sidenav-hover-bg; font-weight: $font-weight-bold; border-radius: $input-border-radius; color: var(--bs-nav-link-hover-color); + + .fa { + color: var(--bs-nav-link-hover-color); + } } .nav { @@ -64,7 +42,7 @@ } a { - padding-left: 48px; + padding-left: 42px; text-transform: none; font-weight: $font-weight-semibold; } @@ -91,7 +69,7 @@ border-width: 1px 0 0 1px; border-style: solid; border-color: initial; - right: 0.5em; + right: 1em; -webkit-transform: rotate(-45deg) translate(0, -50%); transform: rotate(-45deg) translate(0, -50%); -webkit-transform-origin: top; @@ -101,30 +79,12 @@ } } - .active > .has-arrow::after, + .active > .has-arrow[aria-expanded="true"]::after, .has-arrow[aria-expanded="true"]::after { -webkit-transform: rotate(-135deg) translate(0, -50%); transform: rotate(-135deg) translate(0, -50%); } } -@include media-breakpoint-down(sm) { - .navbar-brand { - display: none; - } - .sidebar { - width: 100%; - - &:not(.show) { - height: 0; - } - } - .nav-sidebar { - display: none; - position: relative; - - &.show { - display: block; - } - } +@include media-breakpoint-up(md) { } diff --git a/resources/scss/components/_tables.scss b/resources/scss/components/_tables.scss index 6d3ebf06..29a4b638 100644 --- a/resources/scss/components/_tables.scss +++ b/resources/scss/components/_tables.scss @@ -5,21 +5,15 @@ .sort-col { cursor: pointer; - color: $table-hover-color; + color: lighten($body-color, 25%); text-decoration: none; .fa { - color: var(--bs-gray-500); - } - - &:hover, - .active { - color: $body-color; + color: lighten($body-color, 65%); } &:hover .fa, - &:hover, - .active { + &.active .fa { color: $body-color; } @@ -37,16 +31,6 @@ } } -.table-striped { - thead th { - background-color: $table-head-bg; - } - - tbody tr { - background-color: $table-head-bg; - } -} - .table-muted .text-muted { filter: alpha(opacity=80); opacity: 0.8; @@ -62,9 +46,9 @@ } .table > thead > tr > th { - font-size: $font-size-sm; + font-weight: 500; line-height: 2; - color: $table-hover-color; + color: lighten($body-color, 25%); padding: .25rem; } @@ -75,10 +59,6 @@ .list-table { .table { - thead { - position: relative; - } - th:first-child, td:first-child { padding-left: $page-padding-x; @@ -93,18 +73,6 @@ } .bulk-actions { - background: $white; - border-radius: $border-radius; - position: absolute; - top: 1px; - left: 0; - right: 0; - z-index: 10; - - td { - border-bottom: 0; - } - .btn-select-all { &.active { font-weight: $font-weight-bold; diff --git a/resources/scss/components/_toolbar.scss b/resources/scss/components/_toolbar.scss index b12c8ed8..c97e0d44 100644 --- a/resources/scss/components/_toolbar.scss +++ b/resources/scss/components/_toolbar.scss @@ -2,7 +2,6 @@ .toolbar-action { clear: both; width: 100%; - padding: 0 $page-padding-x $page-padding-x; } @include media-breakpoint-down(sm) { @@ -15,12 +14,8 @@ } .toolbar-action { - > .btn { - margin-left: 5px; - margin-right: 5px; - } - - .btn { + .btn + .btn { + margin-left: .5rem; outline: 0 none; &:first-child { diff --git a/resources/scss/helpers/_variables.scss b/resources/scss/helpers/_variables.scss index bda6f78c..b4b2a980 100644 --- a/resources/scss/helpers/_variables.scss +++ b/resources/scss/helpers/_variables.scss @@ -44,7 +44,7 @@ $icon-font-path: '../fonts/'; $fa-font-path: $icon-font-path+'FontAwesome'; // Body // -$body-bg: $gray-200 !default; +$body-bg: $white !default; $body-color: $gray-800 !default; $link-hover-decoration: none !default; @@ -84,6 +84,7 @@ $table-hover-bg: $gray-200 !default; // Shared variables that are reassigned to `$input-` and `$btn-` specific variables. $input-spacer: 6px !default; $input-font-size: $font-size-base !default; +$input-line-height: 1.8 !default; // // Buttons // @@ -109,7 +110,8 @@ $input-height-border: 3px !default; $form-check-input-width: 1.25em; $form-fields-padding: 1.25rem .725rem !default; $form-fields-padding-x: 20px !default; -$form-nav-link-padding-y: .75rem !default; +$form-nav-padding: 0.25rem !default; +$form-nav-link-padding-y: .375rem !default; $form-nav-link-padding-x: 1rem !default; $form-label-font-size: 0.825rem !default; $custom-control-indicator-border-color: $gray-200 !default; @@ -121,10 +123,6 @@ $nav-tabs-border-radius: .625rem !default; $nav-link-font-size: $input-font-size !default; $nav-link-color: lighten($dark, 35%) !default; $nav-link-hover-color: $body-color !default; -// Dropdowns -// -// Dropdown menu container and contents. -$dropdown-padding-x: .5rem !default; // Cards $card-border-color: $gray-300 !default; @@ -137,14 +135,17 @@ $accordion-button-active-bg: transparent !default; $accordion-button-active-color: inherit !default; // Dropdowns +$dropdown-padding-x: .5rem !default; $dropdown-border-color: rgba($black, .15) !default; $dropdown-divider-bg: $gray-200 !default; $dropdown-link-color: $gray-900 !default; -$dropdown-link-hover-bg: $gray-200 !default; +$dropdown-link-hover-bg: $gray-100 !default; $dropdown-link-disabled-color: $gray-600 !default; +$dropdown-link-active-color: $primary !default; +$dropdown-link-active-bg: transparent !default; $dropdown-header-color: $gray-600 !default; // Alert @@ -171,8 +172,8 @@ $badge-color: inherit !default; // // Page // -$page-padding-x: 20px !default; -$page-padding-y: 30px !default; +$page-padding-x: 15px !default; +$page-padding-y: 25px !default; $page-top: 0 !default; $page-bottom: 0 !default; $page-margin-left: 230px !default; @@ -189,8 +190,8 @@ $mainmenu-padding-y: 1rem !default; // Side nav // $sidenav-bg: lighten($body-bg, 6%) !default; -$sidenav-hover-bg: lighten($body-bg, 4%) !default; -$sidenav-icon-color: lighten($dark, 30%) !default; +$sidenav-hover-bg: $dropdown-link-hover-bg !default; +$sidenav-icon-color: lighten($dark, 50%) !default; $sidenav-font-size: 15px !default; $sidenav-submenu-font-size: $font-size-base !default; $sidenav-line-height: 42px !default; diff --git a/resources/scss/utilities/_utilities.scss b/resources/scss/utilities/_utilities.scss index 85d267e3..2f71d9ae 100644 --- a/resources/scss/utilities/_utilities.scss +++ b/resources/scss/utilities/_utilities.scss @@ -198,3 +198,15 @@ a[data-request] { .rounded-hover:hover, .rounded-hover:focus { border-radius: var(--bs-border-radius) !important; } + +.modal-header, .modal-footer { + background-color: $light-bg-subtle; +} + +.modal-header { + border-bottom: 1px solid $light; +} + +.modal-footer { + border-top: 1px solid $light; +} diff --git a/resources/scss/vendor/_choices.scss b/resources/scss/vendor/_choices.scss index b95fdf91..d7078f53 100644 --- a/resources/scss/vendor/_choices.scss +++ b/resources/scss/vendor/_choices.scss @@ -68,4 +68,8 @@ .choices[data-type*="text"] .choices__button { background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiMwYzBjMTAiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg=='); border-color: $gray-400; -} \ No newline at end of file +} + +.choices.is-disabled .choices__inner, .choices.is-disabled .choices__input { + background-color: $input-disabled-bg; +} diff --git a/resources/views/admin/_components/aside.blade.php b/resources/views/admin/_components/aside.blade.php index e28cb4b4..d1db9fe5 100644 --- a/resources/views/admin/_components/aside.blade.php +++ b/resources/views/admin/_components/aside.blade.php @@ -1,70 +1,56 @@ @props(['navItems']) @if(AdminAuth::isLogged()) - + {{ $childItem['title'] }} + + + @endforeach + + @endif + + @endforeach + + @endif diff --git a/resources/views/admin/_components/forms/error.blade.php b/resources/views/admin/_components/forms/error.blade.php deleted file mode 100644 index e69de29b..00000000 diff --git a/resources/views/admin/_components/forms/form.blade.php b/resources/views/admin/_components/forms/form.blade.php deleted file mode 100644 index 0827b514..00000000 --- a/resources/views/admin/_components/forms/form.blade.php +++ /dev/null @@ -1,15 +0,0 @@ -@props([ - 'method' => 'POST', - 'hasFiles' => false, -]) -
- @csrf - @method($method) - - {{ $slot }} -
diff --git a/resources/views/admin/_components/forms/help.blade.php b/resources/views/admin/_components/forms/help.blade.php deleted file mode 100644 index e69de29b..00000000 diff --git a/resources/views/admin/_components/forms/label.blade.php b/resources/views/admin/_components/forms/label.blade.php deleted file mode 100644 index e70e9596..00000000 --- a/resources/views/admin/_components/forms/label.blade.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/resources/views/admin/_components/forms/select.blade.php b/resources/views/admin/_components/forms/select.blade.php deleted file mode 100644 index c0bdc8a7..00000000 --- a/resources/views/admin/_components/forms/select.blade.php +++ /dev/null @@ -1,34 +0,0 @@ -@props([ - 'label' => null, - 'placeholder' => null, - 'options' => [], - 'size' => null, - 'help' => null, -]) - -@php - $key = $attributes->get('name', ''); - $id = $attributes->get('id', ''); -@endphp -
- - - - - - -
diff --git a/resources/views/admin/_components/header.blade.php b/resources/views/admin/_components/header.blade.php index 27f81e56..dba6477f 100644 --- a/resources/views/admin/_components/header.blade.php +++ b/resources/views/admin/_components/header.blade.php @@ -1,24 +1,30 @@ @if(AdminAuth::isLogged()) - + @endif diff --git a/resources/views/admin/_components/modal/close.blade.php b/resources/views/admin/_components/modal/close.blade.php deleted file mode 100644 index e8576454..00000000 --- a/resources/views/admin/_components/modal/close.blade.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/resources/views/admin/_components/modal/content.blade.php b/resources/views/admin/_components/modal/content.blade.php deleted file mode 100644 index 51dcc360..00000000 --- a/resources/views/admin/_components/modal/content.blade.php +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/resources/views/admin/_components/modal/form.blade.php b/resources/views/admin/_components/modal/form.blade.php deleted file mode 100644 index ac29b159..00000000 --- a/resources/views/admin/_components/modal/form.blade.php +++ /dev/null @@ -1,27 +0,0 @@ -@props([ - 'label' => null, - 'placeholder' => null, - 'options' => [], - 'size' => null, - 'help' => null, -]) - - - @isset($title) - - @endisset - - - - @isset($footer) - - @endisset - diff --git a/resources/views/admin/_components/modal/index.blade.php b/resources/views/admin/_components/modal/index.blade.php deleted file mode 100644 index a6a22fe0..00000000 --- a/resources/views/admin/_components/modal/index.blade.php +++ /dev/null @@ -1,25 +0,0 @@ -
merge(['class' => 'modal fade', 'tabindex' => -1 , 'role'=> 'dialog', 'aria-hidden' => true]) }} -> - -
diff --git a/resources/views/admin/_components/modal/loading.blade.php b/resources/views/admin/_components/modal/loading.blade.php deleted file mode 100644 index 7325dbb2..00000000 --- a/resources/views/admin/_components/modal/loading.blade.php +++ /dev/null @@ -1,14 +0,0 @@ -
merge(['class' => 'modal slideInDown fade', 'tabindex' => -1 , 'role'=> 'dialog', 'aria-hidden' => true]) }} -> - -
diff --git a/resources/views/admin/_layouts/default.blade.php b/resources/views/admin/_layouts/default.blade.php index 854c114f..3d88c8f4 100644 --- a/resources/views/admin/_layouts/default.blade.php +++ b/resources/views/admin/_layouts/default.blade.php @@ -6,7 +6,8 @@ {{html(get_metas())}} @if ($site_logo !== 'no_photo.png') - + @else {{html(get_favicon())}} @endif @@ -26,34 +27,44 @@ {{Template::renderHook('startBody')}} -
- @if(AdminAuth::isLogged()) - {{Template::renderHook('startSidebar')}} - - - - {{Template::renderHook('endSidebar')}} - @endif -
- {{Template::renderHook('startHeader')}} - +@if(AdminAuth::isLogged()) + + {{html($this->widgets['mainmenu']->render())}} + +@endif +
+
@if(AdminAuth::isLogged()) - - {{html($this->widgets['mainmenu']->render())}} - + @endif +
+ {{Template::renderHook('startHeader')}} - {{Template::renderHook('endHeader')}} + {{Template::renderHook('endHeader')}} -
- {{Template::getBlock('body')}} -
-
- {{Template::renderHook('startFlash')}} +
+ {{Template::getBlock('body')}} +
+
+ {{Template::renderHook('startFlash')}} - {{html($this->makePartial('igniter.admin::flash'))}} + {{html($this->makePartial('igniter.admin::flash'))}} - {{Template::renderHook('endFlash')}} + {{Template::renderHook('endFlash')}} +
diff --git a/resources/views/admin/_partials/flash.blade.php b/resources/views/admin/_partials/flash.blade.php index db0841c4..97e0da4c 100644 --- a/resources/views/admin/_partials/flash.blade.php +++ b/resources/views/admin/_partials/flash.blade.php @@ -3,7 +3,7 @@
$message['important']]) data-control="flash-message" data-level="{{ $message['level'] }}" - data-text="{{html(array_get($message, 'message'))}}" + data-html="{{html(array_get($message, 'message'))}}" data-allow-dismiss="{{ $message['important'] ? 'false' : 'true' }}" role="alert" >
@@ -24,7 +24,7 @@ class="alert alert-danger" data-control="flash-message" data-level="danger" - data-text='{!! htmlentities(implode('
', array_collapse($messages))) !!}' + data-html="{{html(implode('
', array_collapse($messages)))}}" data-allow-dismiss="false" role="alert" >
diff --git a/resources/views/admin/_partials/form/toolbar_save_button.blade.php b/resources/views/admin/_partials/form/toolbar_save_button.blade.php index d898c99b..a36809d9 100644 --- a/resources/views/admin/_partials/form/toolbar_save_button.blade.php +++ b/resources/views/admin/_partials/form/toolbar_save_button.blade.php @@ -4,7 +4,7 @@ $eventHandler = $this->getEventHandler('onChooseSaveButtonAction'); @endphp
@if($this->canManage || $this->canSetDefault) -
+
@if($this->canManage)
diff --git a/resources/views/admin/_partials/widgets/filter/filter.blade.php b/resources/views/admin/_partials/widgets/filter/filter.blade.php index 6ae3ff08..b57ca07f 100644 --- a/resources/views/admin/_partials/widgets/filter/filter.blade.php +++ b/resources/views/admin/_partials/widgets/filter/filter.blade.php @@ -1,57 +1,47 @@ -
- diff --git a/resources/views/admin/_partials/widgets/filter/filter_scopes.blade.php b/resources/views/admin/_partials/widgets/filter/filter_scopes.blade.php index 114d0ed2..2f7f3d6a 100644 --- a/resources/views/admin/_partials/widgets/filter/filter_scopes.blade.php +++ b/resources/views/admin/_partials/widgets/filter/filter_scopes.blade.php @@ -1,5 +1,5 @@ @foreach($scopes as $scope) -
+
{!! $this->renderScopeElement($scope) !!}
@endforeach diff --git a/resources/views/admin/_partials/widgets/filter/scope_date.blade.php b/resources/views/admin/_partials/widgets/filter/scope_date.blade.php index a8c80db1..893d802b 100644 --- a/resources/views/admin/_partials/widgets/filter/scope_date.blade.php +++ b/resources/views/admin/_partials/widgets/filter/scope_date.blade.php @@ -1,5 +1,5 @@
diff --git a/resources/views/admin/_partials/widgets/filter/scope_daterange.blade.php b/resources/views/admin/_partials/widgets/filter/scope_daterange.blade.php index c09dff66..cd92eca7 100644 --- a/resources/views/admin/_partials/widgets/filter/scope_daterange.blade.php +++ b/resources/views/admin/_partials/widgets/filter/scope_daterange.blade.php @@ -1,5 +1,5 @@
+
diff --git a/resources/views/admin/_partials/widgets/filter/scope_selectlist.blade.php b/resources/views/admin/_partials/widgets/filter/scope_selectlist.blade.php index 97ff76aa..babb6b31 100644 --- a/resources/views/admin/_partials/widgets/filter/scope_selectlist.blade.php +++ b/resources/views/admin/_partials/widgets/filter/scope_selectlist.blade.php @@ -4,15 +4,15 @@ $options = $this->getSelectOptions($scope->scopeName); $enableFilter = (count($options['available']) > 20); @endphp -
+
diff --git a/resources/views/admin/_partials/widgets/filter/scope_switch.blade.php b/resources/views/admin/_partials/widgets/filter/scope_switch.blade.php index 39309d72..a827681b 100644 --- a/resources/views/admin/_partials/widgets/filter/scope_switch.blade.php +++ b/resources/views/admin/_partials/widgets/filter/scope_switch.blade.php @@ -1,4 +1,4 @@ -
+
- -
- - +
-
+
0 record(s) selected
- + @endif diff --git a/resources/views/admin/_partials/widgets/lists/list_body.blade.php b/resources/views/admin/_partials/widgets/lists/list_body.blade.php index d1bfc759..bb76594b 100644 --- a/resources/views/admin/_partials/widgets/lists/list_body.blade.php +++ b/resources/views/admin/_partials/widgets/lists/list_body.blade.php @@ -34,18 +34,11 @@ class="form-check-input" @continue($column->type == 'button') last)colspan="4"@endif > {!! $this->getColumnValue($record, $column) !!} @endforeach - - @if ($showFilter) -   - @endif - - @if ($showSetup) -   - @endif @endforeach @else diff --git a/resources/views/admin/_partials/widgets/lists/list_head.blade.php b/resources/views/admin/_partials/widgets/lists/list_head.blade.php index c3208ba2..c176eefa 100644 --- a/resources/views/admin/_partials/widgets/lists/list_head.blade.php +++ b/resources/views/admin/_partials/widgets/lists/list_head.blade.php @@ -16,52 +16,47 @@ class="form-check-input" onclick="$('input[name*=\'checked\']').prop('checked', @endif - @foreach($columns as $key => $column) - @if ($column->type == 'button') - - @elseif ($showSorting && $column->sortable) - width) style="width: {{ $column->width }}" @endif> -
-   - {{ $this->getHeaderValue($column) }} - - - @else - width) style="width: {{ $column->width }}" @endif - > - {{ $this->getHeaderValue($column) }} - - @endif - @endforeach - - @if ($showFilter) - - + @foreach($columns as $key => $column) + @if ($column->type == 'button') + + @elseif ($showSorting && $column->sortable) + getName(), + 'list-cell-type-'.$column->type, + $column->cssClass, + 'text-nowrap', + ]) + @if ($column->width) style="width: {{ $column->width }}" @endif> + $sortColumn == $column->columnName]) + data-request="{{ $this->getEventHandler('onSort') }}" + data-request-form="#lists-list-form" + data-request-data="sort_by: '{{ $column->columnName }}'"> +   + {{ $this->getHeaderValue($column) }} + - @endif - @if ($showSetup) - - + @else + width) style="width: {{ $column->width }}" @endif + > + {{ $this->getHeaderValue($column) }} @endif + @endforeach + + @if ($showSetup) + + + + @endif diff --git a/resources/views/admin/_partials/widgets/lists/list_pagination.blade.php b/resources/views/admin/_partials/widgets/lists/list_pagination.blade.php index a580cbd1..9635010d 100644 --- a/resources/views/admin/_partials/widgets/lists/list_pagination.blade.php +++ b/resources/views/admin/_partials/widgets/lists/list_pagination.blade.php @@ -1,12 +1,12 @@ @if ($showPagination) - +
@endif diff --git a/resources/views/admin/_partials/widgets/lists/list_setup_form.blade.php b/resources/views/admin/_partials/widgets/lists/list_setup_form.blade.php index 7f3b70ad..c2d594a9 100644 --- a/resources/views/admin/_partials/widgets/lists/list_setup_form.blade.php +++ b/resources/views/admin/_partials/widgets/lists/list_setup_form.blade.php @@ -8,11 +8,8 @@