Skip to content

Commit

Permalink
final changes
Browse files Browse the repository at this point in the history
  • Loading branch information
reemhashir1 committed Sep 6, 2024
1 parent 0792f50 commit f9f984a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions public/src/admin/settings/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define('admin/settings/navigation', [
], function (translator, iconSelect, Benchpress, alerts) {
const navigation = {};
let available;

console.log('REEM HASHIR');

Check failure on line 14 in public/src/admin/settings/navigation.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 1 tab but found 4 spaces
navigation.init = function () {
available = ajaxify.data.available;
$('#available').find('li .drag-item').draggable({
Expand All @@ -35,13 +35,13 @@ define('admin/settings/navigation', [

function onIconPickerClick() {
const iconEl = $(this).find('i');
console.log("Icon element selected:", iconEl);
console.log('Reem Hashir', iconEl);

Check failure on line 38 in public/src/admin/settings/navigation.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 2 tabs but found 8 spaces
iconSelect.init(iconEl, onIconSelect);
}

function onIconSelect(el) {
const newIconClass = el.attr('value');
console.log("New icon class selected:", newIconClass);
console.log('Reem Hashir', newIconClass);

Check failure on line 44 in public/src/admin/settings/navigation.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 2 tabs but found 8 spaces
const index = el.parents('[data-index]').attr('data-index');
$('#active-navigation [data-index="' + index + '"] i.nav-icon').attr('class', 'fa fa-fw ' + newIconClass);
el.siblings('[name="iconClass"]').val(newIconClass);
Expand All @@ -56,6 +56,7 @@ define('admin/settings/navigation', [
$('#active-navigation [data-index="' + index + '"] i.dropdown-icon').toggleClass('hidden', !el.is(':checked'));
}

console.log('Reem Hashir');

Check failure on line 59 in public/src/admin/settings/navigation.js

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 1 tab but found 4 spaces
function onSelect() {
const clickedIndex = $(this).attr('data-index');
selectIndex(clickedIndex);
Expand All @@ -73,7 +74,7 @@ define('admin/settings/navigation', [
detailsForm.removeClass('hidden');
}
}

//used ChatGPT to generate the helper functions

Check failure on line 77 in public/src/admin/settings/navigation.js

View workflow job for this annotation

GitHub Actions / test

Expected exception block, space or tab after '//' in comment
function drop(ev, ui) {
const id = ui.helper.attr('data-id');
const el = $('#active-navigation [data-id="' + id + '"]');
Expand Down

0 comments on commit f9f984a

Please sign in to comment.