Skip to content

Commit

Permalink
Code refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Jul 12, 2024
1 parent 0cfe408 commit 618ad89
Show file tree
Hide file tree
Showing 109 changed files with 1,184 additions and 1,178 deletions.
12 changes: 11 additions & 1 deletion config/system.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
|
*/

'defaultTheme' => 'tastyigniter-orange',
'defaultTheme' => 'igniter-orange',

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -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',
];
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions public/js/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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)
*/

Expand Down
62 changes: 53 additions & 9 deletions resources/css/widgets/table.css
Original file line number Diff line number Diff line change
@@ -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 }*/
Expand All @@ -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 }*/
Expand All @@ -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 }*/
Expand All @@ -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;
}
99 changes: 0 additions & 99 deletions resources/js/formwidgets/recordeditor.js

This file was deleted.

19 changes: 10 additions & 9 deletions resources/js/partials/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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')
Expand All @@ -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) {
Expand Down Expand Up @@ -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)
}
}

Expand All @@ -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] + '<br>'
formattedErrorMessage += errors[error]+'<br>'
}
}
return formattedErrorMessage.slice(0, -4)
Expand Down
Loading

0 comments on commit 618ad89

Please sign in to comment.