diff --git a/.gitignore b/.gitignore index 94fab30..10644d1 100644 --- a/.gitignore +++ b/.gitignore @@ -64,4 +64,4 @@ vendor/canary/logs/* components/* mailhog.log uploads/* -images/qr-codes/ +images/qr-codes/* diff --git a/app/controllers/admin/home.php b/app/controllers/admin/home.php index 06ea21c..75689d1 100644 --- a/app/controllers/admin/home.php +++ b/app/controllers/admin/home.php @@ -78,11 +78,6 @@ class Home extends AdminController { $users = Views::simpleView( 'admin.dashboard.users', self::$user->recent( 5 ) ); Components::set( 'userDash', $users ); - if ( Input::exists( 'submit' ) ) { - $results = Views::simpleView( 'admin.dashboard.users', self::$user->search( Input::post('searchTerm') ) ); - Components::set( 'searchResults', $results ); - } - Views::view( 'admin.dashboard.dash' ); } } diff --git a/app/plugins/reviews/js/reviews.js b/app/plugins/reviews/js/reviews.js index dfd6ad2..c20db6f 100644 --- a/app/plugins/reviews/js/reviews.js +++ b/app/plugins/reviews/js/reviews.js @@ -1,20 +1,26 @@ -$(document).ready(function() { - var $star_rating = $('.star-rating .fa-star'); +document.addEventListener("DOMContentLoaded", function () { + var starRating = document.querySelectorAll(".star-rating .fa-star"); - var SetRatingStar = function() { - return $star_rating.each(function() { - if (parseInt($(this).siblings('input.rating-value').val()) >= parseInt($(this).data('rating'))) { - return $(this).addClass('checked'); + function setRatingStar() { + starRating.forEach(function (star) { + var ratingValue = parseInt(star.parentElement.querySelector("input.rating-value").value, 10); + var starRating = parseInt(star.dataset.rating, 10); + + if (ratingValue >= starRating) { + star.classList.add("checked"); } else { - return $(this).removeClass('checked'); + star.classList.remove("checked"); } }); - }; + } - $star_rating.on('click', function() { - $(this).siblings('input.rating-value').val($(this).data('rating')); - return SetRatingStar(); + starRating.forEach(function (star) { + star.addEventListener("click", function () { + var ratingInput = star.parentElement.querySelector("input.rating-value"); + ratingInput.value = star.dataset.rating; + setRatingStar(); + }); }); - SetRatingStar(); -}); \ No newline at end of file + setRatingStar(); +}); diff --git a/app/views/admin/dashboard/dash.html b/app/views/admin/dashboard/dash.html index 7f0d4c0..240d46a 100644 --- a/app/views/admin/dashboard/dash.html +++ b/app/views/admin/dashboard/dash.html @@ -18,28 +18,4 @@ {blogDash} - - -Results -
-
- -
- -
- -
-
- - - - - -
- -
-
-
-
- {searchResults}
\ No newline at end of file diff --git a/app/views/auth/login.html b/app/views/auth/login.html index 2dc0542..cf8e9a5 100644 --- a/app/views/auth/login.html +++ b/app/views/auth/login.html @@ -8,7 +8,7 @@
logo -

AllTheBookmarks

+

{SITENAME}

diff --git a/composer.json b/composer.json index 470c6c7..6ea295e 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,7 @@ { "endroid/qr-code": "^6.0", "fortawesome/font-awesome": "4.7", + "stripe/stripe-php": "^16.3", "thetempusproject/bedrock": "1.1.6", "thetempusproject/canary": "1.0.9", "thetempusproject/houdini": "2.0.5",