revert: cannot drag alert on dragging standard fields
not working as expected
This commit is contained in:
parent
301b9f1c94
commit
2e9dcc5912
7 changed files with 2 additions and 23 deletions
|
|
@ -73,9 +73,6 @@ function move_columns_to_section() {
|
|||
@click.stop="store.selected_field = column.df"
|
||||
@mouseover.stop="hovered = true"
|
||||
@mouseout.stop="hovered = false"
|
||||
@mousemove.stop="store.drag = true"
|
||||
@mousedown.stop="store.drag = false"
|
||||
@mouseup.stop="store.start_drag(column)"
|
||||
>
|
||||
<div class="column-actions" :hidden="store.read_only">
|
||||
<button
|
||||
|
|
|
|||
|
|
@ -40,9 +40,6 @@ function move_fields_to_column() {
|
|||
@click.stop="store.selected_field = field.df"
|
||||
@mouseover.stop="hovered = true"
|
||||
@mouseout.stop="hovered = false"
|
||||
@mousemove.stop="store.drag = true"
|
||||
@mousedown.stop="store.drag = false"
|
||||
@mouseup.stop="store.start_drag(field)"
|
||||
>
|
||||
<component :is="component" :df="field.df">
|
||||
<template #label>
|
||||
|
|
|
|||
|
|
@ -82,9 +82,6 @@ function move_sections_to_tab() {
|
|||
@click.stop="select_section"
|
||||
@mouseover.stop="hovered = true"
|
||||
@mouseout.stop="hovered = false"
|
||||
@mousemove.stop="store.drag = true"
|
||||
@mousedown.stop="store.drag = false"
|
||||
@mouseup.stop="store.start_drag(section)"
|
||||
>
|
||||
<div
|
||||
:class="[
|
||||
|
|
|
|||
|
|
@ -125,9 +125,6 @@ function remove_tab() {
|
|||
@dragstart="dragged = true"
|
||||
@dragend="dragged = false"
|
||||
@dragover="drag_over(element)"
|
||||
@mousemove.stop="store.drag = true"
|
||||
@mousedown.stop="store.drag = false"
|
||||
@mouseup.stop="store.start_drag(element)"
|
||||
>
|
||||
<EditableInput
|
||||
:text="element.df.label"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<!-- Used as Code, HTML Editor, Markdown Editor & JSON Control -->
|
||||
<script setup>
|
||||
import { computed, onMounted, ref, useSlots, watch } from "vue";
|
||||
import { useStore } from "../../store";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<!-- Used as Text & Small Text, Long Text Control -->
|
||||
<!-- Used as Text, Small Text & Long Text Control -->
|
||||
<script setup>
|
||||
import { useStore } from "../../store";
|
||||
import { useSlots, ref, computed, watch } from "vue";
|
||||
|
|
|
|||
|
|
@ -195,15 +195,5 @@ export const useStore = defineStore("form-builder-store", {
|
|||
get_layout() {
|
||||
return create_layout(this.doc.fields);
|
||||
},
|
||||
start_drag(field) {
|
||||
if (this.drag && this.has_standard_field(field)) {
|
||||
frappe.show_alert({
|
||||
message: __(
|
||||
"Standard field or custom tab, section, or column containing standard fields cannot be dragged"
|
||||
),
|
||||
indicator: "yellow",
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue