diff --git a/resources/assets/admin/css/vendor.css b/resources/assets/admin/css/vendor.css index a52f9783..1871f76b 100644 --- a/resources/assets/admin/css/vendor.css +++ b/resources/assets/admin/css/vendor.css @@ -9520,11 +9520,11 @@ pre code { border-bottom-width: 2px; } -.table-striped tbody tr:nth-of-type(odd) { +.table-striped tbody tr:nth-of-type(odd), .rows-striped .row:nth-of-type(odd) { background-color: #F9F9F9; } -.table-hover tbody tr:hover { +.table-hover tbody tr:hover, .rows-striped .row:hover { background-color: #F5F5F5; } @@ -14370,4 +14370,13 @@ img { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; +} + +.bold { + font-weight: bold; +} + +.p-tb-15 { + padding-top: 15px; + padding-bottom: 15px; } \ No newline at end of file diff --git a/resources/assets/admin/js/app.js b/resources/assets/admin/js/app.js index dde0296d..4b10be8d 100644 --- a/resources/assets/admin/js/app.js +++ b/resources/assets/admin/js/app.js @@ -1346,7 +1346,6 @@ $ (function () { }); - $ (function () { $ ("body").addClass ("loaded"); @@ -1364,7 +1363,6 @@ $ (function () { } }); - /** * Makes slug from input string * @@ -1401,24 +1399,45 @@ function slugify(text, trimSpaces) { // bind some custom methods $ (document).ready (function () { - $ ('.confirm').click (function () { - var confirmMessage = $ (this).data ('confirm-message'); + var previousTitle, previousMessage; - // set some default message - if (typeof confirmMessage == 'undefined') { - confirmMessage = 'Really?'; - } + $ ('.confirm').click (function (e) { - return confirm (confirmMessage); + var titleElement = $ ('#confirmation-title'); + var messageElement = $ ('#confirmation-message'); + + previousTitle = titleElement.text (); + previousMessage = messageElement.text (); + + var confirmTitle = $ (this).data ('title'); + var confirmMessage = $ (this).data ('message'); + var href = $ (this).attr ('href'); + + $ ('#confirm-button').attr ('href', href); + + if (confirmTitle) + titleElement.text (confirmTitle); + + if (confirmMessage) + messageElement.text (confirmMessage); + + $ ('#confirm-modal').modal ('show'); + + e.preventDefault (); }); - $('#lockUrl').change(function () { + $ ('#confirm-modal').on ('hidden.bs.modal', function () { + $ ('#confirmation-title').text (previousTitle); + $ ('#confirmation-message').text (previousMessage); + }); + + $ ('#lockUrl').change (function () { $ ('.slug-source').keyup (); }); $ ('.slug-target').keyup (function () { $ (this).val (slugify ($ (this).val (), false)); - $('#lockUrl').prop('checked', true); + $ ('#lockUrl').prop ('checked', true); }); $ ('.slug-source').keyup (function () { @@ -1430,22 +1449,19 @@ $ (document).ready (function () { target.val (slugify (source.val (), true)); }); - $(function () { - $('[data-toggle="tooltip"]').tooltip() - }) + $ (function () { + $ ('[data-toggle="tooltip"]').tooltip () + }); // find if any error occured and mark tab with that error - $('.has-error').each(function () { - var error = $(this); - var tabCard = error.closest('.tab-pane'); + $ ('.has-error').each (function () { + var error = $ (this); + var tabCard = error.closest ('.tab-pane'); - $("#"+tabCard.prop('id')+"-tab").addClass('tab-with-error'); + $ ("#" + tabCard.prop ('id') + "-tab").addClass ('tab-with-error'); }); }); - - - /*********************************************** * NProgress Settings ***********************************************/ diff --git a/resources/lang/en/admin/common.php b/resources/lang/en/admin/common.php index 30d10b3a..699067ab 100644 --- a/resources/lang/en/admin/common.php +++ b/resources/lang/en/admin/common.php @@ -2,5 +2,9 @@ return [ 'admin' => 'Administration', 'logout' => 'Log out', - 'logoutSuccessfull' => 'Logout was successfull.' + 'logoutSuccessfull' => 'Logout was successfull.', + 'yes' => 'Yes', + 'no' => 'No', + 'confirmationTitle' => 'Really?', + 'confirmation' => 'Do you really want to perform this action?', ]; \ No newline at end of file diff --git a/resources/views/admin/layout.blade.php b/resources/views/admin/layout.blade.php index 5edac2b8..ecc84228 100644 --- a/resources/views/admin/layout.blade.php +++ b/resources/views/admin/layout.blade.php @@ -53,27 +53,29 @@