Ensure text editors render in an appropriate place on the results grid. Fixes #2477

This commit is contained in:
Surinder Kumar
2017-06-14 12:18:27 +01:00
committed by Dave Page
parent 2b4a8ed89c
commit fdc9eed514
5 changed files with 121 additions and 119 deletions

View File

@@ -487,4 +487,25 @@ input.editor-checkbox:focus {
.slick-cell, .slick-headerrow-column {
border-right: 1px solid #ccc;
z-index: 0;
}
/* Style for text editor */
.pg_text_editor {
z-index:10000;
position:absolute;
background: #fff;
padding: 7px 5px 5px 1px;
border:2px solid #888;
-moz-border-radius:10px;
border-radius:10px;
}
.pg_textarea {
backround:#fff;
width:250px;
height:80px;
border:0;
outline:0;
}
.pg_buttons {
text-align:right;
}

View File

@@ -196,7 +196,7 @@ define([
height:'100%',
isCloseable: false,
isPrivate: true,
content: '<div id ="datagrid" class="sql-editor-grid-container"></div>'
content: '<div id ="datagrid" class="sql-editor-grid-container text-12"></div>'
})
var explain = new pgAdmin.Browser.Panel({
@@ -587,7 +587,9 @@ define([
options['editor'] = is_editable ? Slick.Editors.JsonText
: Slick.Editors.ReadOnlyJsonText;
options['formatter'] = Slick.Formatters.JsonString;
} else if(c.cell == 'number') {
} else if(c.cell == 'number' ||
$.inArray(c.type, ['oid', 'xid', 'real']) !== -1
) {
options['editor'] = is_editable ? Slick.Editors.CustomNumber
: Slick.Editors.ReadOnlyText;
options['formatter'] = Slick.Formatters.Numbers;
@@ -597,7 +599,7 @@ define([
options['formatter'] = Slick.Formatters.Checkmark;
} else {
options['editor'] = is_editable ? Slick.Editors.pgText
: Slick.Editors.ReadOnlypgText;
: Slick.Editors.ReadOnlypgText;
options['formatter'] = Slick.Formatters.Text;
}