Browse Source

[fix] datepicker and autosuggest layering (fixes frappe/erpnext#3433)

version-14
Anand Doshi 10 years ago
parent
commit
20642a0f37
3 changed files with 23 additions and 5 deletions
  1. +9
    -1
      frappe/public/css/desk.css
  2. +1
    -2
      frappe/public/js/frappe/form/control.js
  3. +13
    -2
      frappe/public/less/desk.less

+ 9
- 1
frappe/public/css/desk.css View File

@@ -394,10 +394,18 @@ ul.linked-with-list li {
.modal-title {
margin-top: 5px;
}
.modal .form-control {
.form-control {
position: relative;
}
.link-field.ui-front {
z-index: inherit;
}
.modal .hasDatepicker {
z-index: 1140;
}
.modal .link-field .ui-autocomplete {
z-index: 1141;
}
.form-group {
margin-bottom: 7px;
}


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

@@ -28,7 +28,6 @@ frappe.ui.form.Control = Class.extend({
make: function() {
this.make_wrapper();
this.$wrapper
.addClass("ui-front")
.attr("data-fieldtype", this.df.fieldtype)
.attr("data-fieldname", this.df.fieldname);
this.wrapper = this.$wrapper.get(0);
@@ -934,7 +933,7 @@ frappe.ui.form.ControlSelect = frappe.ui.form.ControlData.extend({
frappe.ui.form.ControlLink = frappe.ui.form.ControlData.extend({
make_input: function() {
var me = this;
$('<div class="link-field" style="position: relative;">\
$('<div class="link-field ui-front" style="position: relative;">\
<input type="text" class="input-with-feedback form-control">\
<span class="link-btn">\
<a class="btn-open no-decoration" title="' + __("Open Link") + '">\


+ 13
- 2
frappe/public/less/desk.less View File

@@ -225,12 +225,23 @@ ul.linked-with-list li {
}

// fixes datepicker z-index issue
// datepicker takes zindex of input + 1 when input's position is relative
.modal .form-control {
.form-control {
position: relative;
}

.link-field.ui-front {
z-index: inherit;
}

.modal .hasDatepicker {
z-index: 1140;
}

.modal .link-field .ui-autocomplete {
// so that it appears over the datepicker field
z-index: 1141;
}

.form-group {
margin-bottom: 7px;
}


Loading…
Cancel
Save