Skip to content

Commit

Permalink
changes to indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
reemhashir1 committed Sep 6, 2024
1 parent f9f984a commit 20e28f3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 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');

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('Reem Hashir', iconEl);
console.log('Reem Hashir', iconEl);
iconSelect.init(iconEl, onIconSelect);
}

function onIconSelect(el) {
const newIconClass = el.attr('value');
console.log('Reem Hashir', newIconClass);
console.log('Reem Hashir', newIconClass);
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 @@ -50,13 +50,13 @@ define('admin/settings/navigation', [

function onDropdownClick() {
const el = $(this);
console.log("Dropdown element clicked:", el);
console.log('Dropdown element clicked:', el);
const index = el.parents('[data-index]').attr('data-index');
console.log("Element index:", index); // Log the index of the element
console.log('Element index:', index); // Log the index of the element
$('#active-navigation [data-index="' + index + '"] i.dropdown-icon').toggleClass('hidden', !el.is(':checked'));
}

console.log('Reem Hashir');
console.log('Reem Hashir');
function onSelect() {
const clickedIndex = $(this).attr('data-index');
selectIndex(clickedIndex);
Expand All @@ -74,7 +74,8 @@ define('admin/settings/navigation', [
detailsForm.removeClass('hidden');
}
}
//used ChatGPT to generate the helper functions

// used ChatGPT to generate the helper functions
function drop(ev, ui) {
const id = ui.helper.attr('data-id');
const el = $('#active-navigation [data-id="' + id + '"]');
Expand Down

0 comments on commit 20e28f3

Please sign in to comment.