From cf1fe8d53791ef922a33e40cb981b88b83e5fc84 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Tue, 18 Jan 2022 09:31:19 +0100 Subject: [PATCH] Remove prefix from category HTML elements --- application/views/pages/categories.php | 10 +++++----- assets/js/pages/categories.js | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/application/views/pages/categories.php b/application/views/pages/categories.php index f691fb30..b66077e8 100755 --- a/application/views/pages/categories.php +++ b/application/views/pages/categories.php @@ -54,22 +54,22 @@ - +
-
-
diff --git a/assets/js/pages/categories.js b/assets/js/pages/categories.js index 8f445cb5..c79cf6d8 100644 --- a/assets/js/pages/categories.js +++ b/assets/js/pages/categories.js @@ -17,9 +17,9 @@ App.Pages.Categories = (function () { const $categories = $('#categories'); const $filterCategories = $('#filter-categories'); - const $id = $('#category-id'); - const $name = $('#category-name'); - const $description = $('#category-description'); + const $id = $('#id'); + const $name = $('#name'); + const $description = $('#description'); let filterResults = {}; let filterLimit = 20; @@ -53,13 +53,13 @@ App.Pages.Categories = (function () { return; // exit because we are on edit mode } - const categoryId = $(event.target).attr('data-id'); + const categoryId = $(event.currentTarget).attr('data-id'); const category = filterResults.find((filterResult) => Number(filterResult.id) === Number(categoryId)); display(category); $('#filter-categories .selected').removeClass('selected'); - $(event.target).addClass('selected'); + $(event.currentTarget).addClass('selected'); $('#edit-category, #delete-category').prop('disabled', false); });