Skip to content

Commit e37bfa2

Browse files
committed
fix: Link: all "_self" to "_parent" all components
1 parent b05cf18 commit e37bfa2

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

resources/js/Components/CMS/Fields/Link.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const modelValue = defineModel()
3232
// ])
3333
3434
const targets = ref([
35-
{ label: trans("Replace page"), value: "_self" },
35+
{ label: trans("Replace page"), value: "_parent" },
3636
{ label: trans("New page"), value: "_blank" },
3737
])
3838

resources/js/Components/Editor/EditorV2.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function openLinkDialog() {
166166
showDialog.value = true;
167167
}
168168
169-
function updateLink(value?: string, target_data = '_self') {
169+
function updateLink(value?: string, target_data = '_parent') {
170170
if (!value) {
171171
editorInstance.value
172172
?.chain()

resources/js/Components/Editor/TiptapLinkDialog.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const target = ref<Object>(props.currentUrl?.target);
2020
2121
const emit = defineEmits(["close", "update"]);
2222
const options = ref([
23-
{ label: "Open in the same tab", value: "_self" },
23+
{ label: "Open in the same tab", value: "_parent" },
2424
{ label: "Open in a new tab", value: "_blank" }
2525
]);
2626
@@ -35,9 +35,9 @@ function update() {
3535
3636
onMounted(() => {
3737
inputLinkRef.value = props.currentUrl?.href ?? "";
38-
if(props.currentUrl?.target == "_self") target.value = { label: "Open in the same tab", value: "_self" };
38+
if(props.currentUrl?.target == "_parent") target.value = { label: "Open in the same tab", value: "_parent" };
3939
else if(props.currentUrl?.target == "_blank") target.value = { label: "Open in a new tab", value: "_blank" }
40-
else target.value = { label: "Open in the same tab", value: "_self" };
40+
else target.value = { label: "Open in the same tab", value: "_parent" };
4141
});
4242
</script>
4343

resources/js/Components/Forms/Fields/BubleTextEditor/EditorV2.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function openLinkDialog() {
214214
}
215215
216216
217-
function updateLink(value?: string, target_data = '_self') {
217+
function updateLink(value?: string, target_data = '_parent') {
218218
if (!value) {
219219
editorInstance.value
220220
?.chain()

resources/js/Components/Forms/Fields/BubleTextEditor/TiptapCustomLinkDialog.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const form = useForm({
2828
type: props.attribut?.type || "internal",
2929
workshop: null,
3030
id: null,
31-
target : props.attribut?.href || "_self",
31+
target : props.attribut?.href || "_parent",
3232
});
3333
3434
// Watch for changes in the attribut prop
@@ -38,7 +38,7 @@ watch(() => props.attribut, (newValue) => {
3838
form.type = newValue.type || "internal";
3939
form.workshop = newValue.workshop || null;
4040
form.id = newValue || null;
41-
form.target = newValue.target || "_self"
41+
form.target = newValue.target || "_parent"
4242
}
4343
}, { immediate: true });
4444
@@ -67,7 +67,7 @@ const options = [
6767
];
6868
6969
const target = [
70-
{ label: 'In this page', value: '_self' },
70+
{ label: 'In this page', value: '_parent' },
7171
{ label: 'New Page', value: '_blank' }
7272
]
7373
</script>

0 commit comments

Comments
 (0)