Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b3e6517
Default Directory Icon - Added
iamibrahimriaz Nov 25, 2025
29d4a15
Initial setup for all listing layout - added
iamibrahimriaz Nov 25, 2025
3e96f5d
importOldData for all listing layout - updated
iamibrahimriaz Nov 25, 2025
2e1006b
Initially expand 1st group - updated
iamibrahimriaz Nov 26, 2025
e637684
Search Box field added in Search Bar group for new directory
iamibrahimriaz Nov 26, 2025
b2311db
Builder initial data issue (selectedWidget become empty) - fixed
iamibrahimriaz Nov 27, 2025
cd3f558
ensure widget data consistency and prevent null errors
iamibrahimriaz Nov 27, 2025
630eb63
Updated
iamibrahimriaz Nov 27, 2025
ed6777c
Single widget added in one click - updated
iamibrahimriaz Nov 27, 2025
880e571
All listing layout data consistency - updated
iamibrahimriaz Nov 27, 2025
0c815ba
User Avatar options for canOpenAvatarSettings - added
iamibrahimriaz Nov 30, 2025
a3c0694
User Avatar style - updated
iamibrahimriaz Nov 30, 2025
f745c39
Style Issue - Updated
iamibrahimriaz Nov 30, 2025
a295bbd
Submission Form Preview Mode style - updated
iamibrahimriaz Dec 1, 2025
026f750
Builder style - improved
iamibrahimriaz Dec 2, 2025
052f74d
Close icon - updated
iamibrahimriaz Dec 8, 2025
6f443f6
Merge branch 'development' of https://github.com/sovware/directorist …
iamibrahimriaz Dec 8, 2025
5c9a044
Draggable item placeholder style - updated
iamibrahimriaz Dec 9, 2025
a4bcd6d
Updated
iamibrahimriaz Dec 9, 2025
f914e9f
Updated
iamibrahimriaz Dec 10, 2025
db92763
Merge branch 'development' of https://github.com/sovware/directorist …
iamibrahimriaz Dec 15, 2025
e03acee
Merge branch 'development' of https://github.com/sovware/directorist …
iamibrahimriaz Dec 18, 2025
3058963
feat: hide title widget options when tagline field is unavailable
iamibrahimriaz Dec 18, 2025
9922894
Style - updated
iamibrahimriaz Dec 18, 2025
2f60432
Merge branch 'development' of https://github.com/sovware/directorist …
iamibrahimriaz Jan 14, 2026
93cce4f
Merge branch 'development' of https://github.com/sovware/directorist …
iamibrahimriaz Apr 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48,854 changes: 20 additions & 48,834 deletions assets/css/admin-main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/admin-main.min.css

Large diffs are not rendered by default.

48,852 changes: 20 additions & 48,832 deletions assets/css/admin-main.rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/admin-main.rtl.min.css

Large diffs are not rendered by default.

23,818 changes: 4 additions & 23,814 deletions assets/css/all-listings.css

Large diffs are not rendered by default.

23,815 changes: 4 additions & 23,811 deletions assets/css/all-listings.rtl.css

Large diffs are not rendered by default.

23,818 changes: 4 additions & 23,814 deletions assets/css/public-main.css

Large diffs are not rendered by default.

23,815 changes: 4 additions & 23,811 deletions assets/css/public-main.rtl.css

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86,586 changes: 43,665 additions & 42,921 deletions assets/js/admin-multi-directory-builder.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/admin-multi-directory-builder.min.js

Large diffs are not rendered by default.

86,986 changes: 43,865 additions & 43,121 deletions assets/js/admin-settings-manager.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/admin-settings-manager.min.js

Large diffs are not rendered by default.

285 changes: 285 additions & 0 deletions assets/src/js/admin/vue/modules/Avatar_Settings_Window.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
<template>
<div
class="cptm-option-card cptm-option-card--draggable"
:class="mainWrapperClass"
>
<div class="cptm-option-card-header">
<div class="cptm-option-card-header-title-section">
<h3 class="cptm-option-card-header-title">Edit Element</h3>
<div class="cptm-header-action-area">
<a
href="#"
class="cptm-header-action-link cptm-header-action-close"
@click.prevent="$emit('close')"
>
<span class="las la-times"></span>
</a>
</div>
</div>
</div>

<div class="cptm-option-card-body">
<!-- Avatar Toggle Switch -->
<div class="cptm-input-toggle-wrap">
<div class="cptm-input-toggle-content">
<label>
<span>Avatar</span>
</label>
</div>
<div class="directorist_vertical-align-m cptm-input-toggle-btn">
<div class="directorist_item">
<label
class="cptm-input-toggle"
:class="{ active: isAvatarEnabled }"
:for="`avatar-toggle-${id}`"
></label>
<input
type="checkbox"
:id="`avatar-toggle-${id}`"
:name="`avatar-toggle-${id}`"
class="cptm-toggle-input"
v-model="isAvatarEnabled"
@change="handleAvatarToggleChange"
style="display: none"
/>
</div>
</div>
</div>

<!-- Avatar Options -->
<div v-if="isAvatarEnabled" class="cptm-widget-options-container">
<div
v-for="(field, field_key) in widgetTypeField('user_avatar')"
:key="field_key"
>
<component
v-if="field"
:is="getFormFieldName(field.type)"
:field-id="`user_avatar-${field_key}`"
:fieldKey="`user_avatar-${field_key}`"
v-bind="field"
@update="updateWidgetOptionValue($event)"
/>
</div>

<div
v-for="(field, field_key) in widgetFields('user_avatar')"
class="cptm-widget-options-wrap"
:key="field_key"
>
<component
v-if="field"
:is="getFormFieldName(field.type)"
:field-id="`user_avatar-${field_key}`"
:fieldKey="`user_avatar-${field_key}`"
v-bind="field"
@update="updateWidgetFieldValue(field_key, $event)"
/>
</div>
</div>
</div>
</div>
</template>

<script>
export default {
name: "avatar-settings-window",
props: {
id: {
type: [String, Number],
default: "",
},
active: {
type: Boolean,
default: false,
},
availableWidgets: {
type: Object,
},
selectedWidgets: {
type: Array,
},
maxWidgetInfoText: {
type: String,
default: "Up to __DATA__ item{s} can be added",
},
},
data() {
return {
isAvatarEnabled: false,
activeWidget: {},
activeWidgetKey: "user_avatar",
activeWidgetOptionType: "",
};
},
computed: {
mainWrapperClass() {
return {
active: this.active,
};
},
},
created() {
this.isAvatarEnabled =
this.selectedWidgets && this.selectedWidgets.includes("user_avatar");

if (this.isAvatarEnabled && this.availableWidgets?.["user_avatar"]) {
this.activeWidget = this.availableWidgets["user_avatar"];
this.activeWidgetOptionType =
this.activeWidget.options?.type?.value || "";
}
},
mounted() {
if (this.isAvatarEnabled && this.availableWidgets?.["user_avatar"]) {
this.$nextTick(() => {
this.activeWidget = this.availableWidgets["user_avatar"];
this.activeWidgetOptionType =
this.activeWidget.options?.type?.value || "";
});
}
},
watch: {
selectedWidgets: {
handler(newVal) {
this.isAvatarEnabled =
newVal && Array.isArray(newVal) && newVal.includes("user_avatar");

if (this.isAvatarEnabled && this.availableWidgets?.["user_avatar"]) {
this.activeWidget = this.availableWidgets["user_avatar"];
this.activeWidgetOptionType =
this.activeWidget.options?.type?.value || "";
}
},
immediate: true,
deep: true,
},
availableWidgets: {
handler() {
if (this.isAvatarEnabled && this.availableWidgets?.["user_avatar"]) {
this.activeWidget = this.availableWidgets["user_avatar"];
this.activeWidgetOptionType =
this.activeWidget.options?.type?.value || "";
}
},
deep: true,
},
},
methods: {
handleAvatarToggleChange() {
if (this.isAvatarEnabled) {
if (
!this.selectedWidgets ||
!this.selectedWidgets.includes("user_avatar")
) {
const updatedWidgets = [
...(this.selectedWidgets || []),
"user_avatar",
];
this.$emit("insert-widget", {
key: "user_avatar",
selected_widgets: updatedWidgets,
});
}
} else {
this.$emit("trash-widget", "user_avatar");
}
},

getFormFieldName(field_type) {
return field_type + "-field";
},

widgetTypeField(widgetKey) {
if (
!widgetKey ||
!this.availableWidgets ||
!this.availableWidgets[widgetKey]
) {
return {};
}

const hasRadioField = this.availableWidgets[widgetKey].options?.type;
if (!hasRadioField) {
return {};
}

const activeWidgetFields = this.availableWidgets[widgetKey].options;
return activeWidgetFields || {};
},

widgetFields(widgetKey) {
if (
!widgetKey ||
!this.availableWidgets ||
!this.availableWidgets[widgetKey]
) {
return {};
}

const hasRadioField = this.availableWidgets[widgetKey].options?.type;
const activeWidgetOptions = hasRadioField
? this.availableWidgets[widgetKey].fields?.[this.activeWidgetOptionType]
: this.availableWidgets[widgetKey].options?.fields;

return activeWidgetOptions || {};
},

updateWidgetOptionValue(value) {
this.activeWidgetOptionType = value;

if (this.activeWidget.options) {
this.activeWidget.options.type.value = value;
}

if (this.availableWidgets[this.activeWidgetKey]?.options) {
this.availableWidgets[this.activeWidgetKey].options.type.value = value;
}

if (value === "icon") {
const iconValue = this.activeWidget?.fields?.icon?.field_icon?.value;
if (this.activeWidget) {
this.activeWidget.icon = iconValue;
}
if (this.availableWidgets[this.activeWidgetKey]) {
this.availableWidgets[this.activeWidgetKey].icon = iconValue;
}
}

this.$emit("update-active-widget", {
widgetKey: this.activeWidgetKey,
updatedWidget: this.activeWidget,
});
},

updateWidgetFieldValue(field_key, value) {
const activeWidgetFields =
this.activeWidget.fields || this.activeWidget.options?.fields;

if (this.activeWidgetOptionType) {
if (activeWidgetFields?.[this.activeWidgetOptionType]?.[field_key]) {
activeWidgetFields[this.activeWidgetOptionType][field_key].value =
value;
}
} else {
if (activeWidgetFields?.[field_key]) {
activeWidgetFields[field_key].value = value;
}
}

if (field_key === "field_icon" || field_key === "icon") {
if (this.activeWidget) {
this.activeWidget.icon = value;
}
if (this.availableWidgets[this.activeWidgetKey]) {
this.availableWidgets[this.activeWidgetKey].icon = value;
}
}

this.$emit("update-active-widget", {
widgetKey: this.activeWidgetKey,
updatedWidget: this.activeWidget,
});
},
},
};
</script>
Loading
Loading