Browse Source

[fix][img-control] detach wrapper after inserting (#3794)

version-14
Prateeksha Singh 8 years ago
committed by Makarand Bauskar
parent
commit
d94d992337
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      frappe/public/js/frappe/form/control.js

+ 1
- 1
frappe/public/js/frappe/form/control.js View File

@@ -1242,8 +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">').insertAfter($(this.wrapper));
$(this.wrapper).detach(); $(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");


Loading…
Cancel
Save