Просмотр исходного кода

[dialog link field] [fix] adjusted zindex of link field

version-14
Anand Doshi 12 лет назад
Родитель
Сommit
ece3a36a1e
3 измененных файлов: 10 добавлений и 5 удалений
  1. +7
    -5
      public/js/legacy/widgets/form/fields.js
  2. +2
    -0
      public/js/wn/ui/dialog.js
  3. +1
    -0
      public/js/wn/ui/field_group.js

+ 7
- 5
public/js/legacy/widgets/form/fields.js Просмотреть файл

@@ -613,7 +613,7 @@ LinkField.prototype.make_input = function() {
// setup buttons
me.setup_buttons();
}
me.onrefresh = function() {
var can_create = in_list(wn.boot.profile.can_create, me.df.options);
var can_read = in_list(wn.boot.profile.can_read, me.df.options);
@@ -632,12 +632,13 @@ LinkField.prototype.make_input = function() {
}

me.get_value = function() { return me.txt.value; }
// increasing zindex of input to increase zindex of autosuggest
// because of the increase in zindex of dialog_wrapper
if(cur_dialog) {
console.log(cint($(cur_dialog.wrapper).css("z-index")) + 1)
$(me.txt).css({"z-index": cint($(cur_dialog.wrapper).css("z-index")) + 1});
if(cur_dialog || me.dialog_wrapper) {
var $dialog_wrapper = $(cur_dialog ? cur_dialog.wrapper : me.dialog_wrapper)
var zindex = cint($dialog_wrapper.css("z-index"));
$(me.txt).css({"z-index": (zindex >= 10 ? zindex : 10) + 1});
}
$(me.txt).autocomplete({
@@ -1139,6 +1140,7 @@ SelectField.prototype.make_input = function() {
else
var v = null;
}
this.input.set_input(v);
}


+ 2
- 0
public/js/wn/ui/dialog.js Просмотреть файл

@@ -30,6 +30,8 @@ wn.ui.Dialog = wn.ui.FieldGroup.extend({
$.extend(this, opts);
this.make();
this.dialog_wrapper = this.wrapper;
// init fields
if(this.fields) {
this.parent = this.body


+ 1
- 0
public/js/wn/ui/field_group.js Просмотреть файл

@@ -43,6 +43,7 @@ wn.ui.FieldGroup = Class.extend({
var div = $a(this.parent, 'div', '', {margin:'6px 0px'})
f = make_field(df, null, div, null);
f.not_in_form = 1;
f.dialog_wrapper = this.dialog_wrapper || null;
this.fields_dict[df.fieldname] = f
f.refresh();


Загрузка…
Отмена
Сохранить