mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Make the dialogue control sizing slightly more compact and properly control textarea resizing.
This commit is contained in:
@@ -283,6 +283,24 @@ iframe {
|
|||||||
padding-right: 3px;
|
padding-right: 3px;
|
||||||
padding-left: 3px;
|
padding-left: 3px;
|
||||||
}
|
}
|
||||||
|
.pgadmin-controls > textarea.form-control,
|
||||||
|
.pgadmin-controls > textarea.form-control[disabled] {
|
||||||
|
min-width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
.pgadmin-controls > div.checkbox, .pgadmin-controls > div.checkbox[disabled] {
|
||||||
|
height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pgadmin-controls > .uneditable-input, .pgadmin-controls > .pgadmin-node-select,
|
||||||
|
.pgadmin-controls > input.form-control, .pgadmin-controls > select.form-control,
|
||||||
|
.pgadmin-controls > .uneditable-input[disabled],
|
||||||
|
.pgadmin-controls > .pgadmin-node-select[disabled],
|
||||||
|
.pgadmin-controls > input.form-control[disabled],
|
||||||
|
.pgadmin-controls > select.form-control[disabled] {
|
||||||
|
height: 28px;
|
||||||
|
padding: 3px 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.obj_properties fieldset > div > .pgadmin-control-group > label {
|
.obj_properties fieldset > div > .pgadmin-control-group > label {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
|||||||
@@ -254,13 +254,33 @@
|
|||||||
* Reference:
|
* Reference:
|
||||||
* http://stackoverflow.com/questions/11338592/how-can-i-bind-to-the-change-event-of-a-textarea-in-jquery
|
* http://stackoverflow.com/questions/11338592/how-can-i-bind-to-the-change-event-of-a-textarea-in-jquery
|
||||||
*/
|
*/
|
||||||
Backform.TextareaControl.prototype.events = {
|
_.extend(
|
||||||
|
Backform.TextareaControl.prototype, {
|
||||||
|
defaults: _.extend(
|
||||||
|
Backform.TextareaControl.prototype.defaults, {
|
||||||
|
rows: 5
|
||||||
|
}),
|
||||||
|
events : {
|
||||||
"change textarea": "onChange",
|
"change textarea": "onChange",
|
||||||
"keyup textarea": "onChange",
|
"keyup textarea": "onChange",
|
||||||
"paste textarea": "onChange",
|
"paste textarea": "onChange",
|
||||||
"selectionchange textarea": "onChange",
|
"selectionchange textarea": "onChange",
|
||||||
"focus textarea": "clearInvalid"
|
"focus textarea": "clearInvalid"
|
||||||
};
|
},
|
||||||
|
template: _.template([
|
||||||
|
'<label class="<%=Backform.controlLabelClassName%>"><%=label%></label>',
|
||||||
|
'<div class="<%=Backform.controlsClassName%>">',
|
||||||
|
' <textarea ',
|
||||||
|
' class="<%=Backform.controlClassName%> <%=extraClasses.join(\' \')%>" name="<%=name%>"',
|
||||||
|
' maxlength="<%=maxlength%>" placeholder="<%-placeholder%>" <%=disabled ? "disabled" : ""%>',
|
||||||
|
' rows=<%=rows%>',
|
||||||
|
' <%=required ? "required" : ""%>><%-value%></textarea>',
|
||||||
|
' <% if (helpMessage && helpMessage.length) { %>',
|
||||||
|
' <span class="<%=Backform.helpMessageClassName%>"><%=helpMessage%></span>',
|
||||||
|
' <% } %>',
|
||||||
|
'</div>'
|
||||||
|
].join("\n"))
|
||||||
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Overriding the render function of the select control to allow us to use
|
* Overriding the render function of the select control to allow us to use
|
||||||
|
|||||||
Reference in New Issue
Block a user