浏览代码

[fix] detach instead of emptying parent (#3783)

version-14
Prateeksha Singh 8 年前
committed by Rushabh Mehta
父节点
当前提交
c2f18dd9e4
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      frappe/public/js/frappe/form/control.js

+ 2
- 1
frappe/public/js/frappe/form/control.js 查看文件

@@ -1242,7 +1242,8 @@ frappe.ui.form.ControlAttachImage = frappe.ui.form.ControlAttach.extend({
var me = this; var me = this;
this._super(); this._super();


this.container = $('<div class="control-container">').appendTo($(this.parent).empty());
$(this.wrapper).detach();
this.container = $('<div class="control-container">').appendTo($(this.parent));
this.container.attr('data-fieldtype', this.df.fieldtype).append(this.wrapper); this.container.attr('data-fieldtype', this.df.fieldtype).append(this.wrapper);
if(this.df.align === 'center') { if(this.df.align === 'center') {
this.container.addClass("flex-justify-center"); this.container.addClass("flex-justify-center");


正在加载...
取消
保存