mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #3164 from node-red/fix-http-response-layout
Fix sizing of HTTP Response header fields
This commit is contained in:
commit
a98013806c
@ -160,23 +160,21 @@
|
||||
return this.name?"node_label_italic":"";
|
||||
},
|
||||
oneditprepare: function() {
|
||||
function resizeRule(rule) {
|
||||
var newWidth = rule.width();
|
||||
rule.find('.red-ui-typedInput').typedInput("width",(newWidth-15)/2);
|
||||
}
|
||||
var headerList = $("#node-input-headers-container").css('min-height','150px').css('min-width','450px').editableList({
|
||||
addItem: function(container,i,header) {
|
||||
var row = $('<div/>').css({
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap'
|
||||
whiteSpace: 'nowrap',
|
||||
display: 'flex'
|
||||
}).appendTo(container);
|
||||
|
||||
var propertyName = $('<input/>',{class:"node-input-header-name",type:"text"})
|
||||
.appendTo(row)
|
||||
var propertNameCell = $('<div/>').css({'flex-grow':1}).appendTo(row);
|
||||
var propertyName = $('<input/>',{class:"node-input-header-name",type:"text", style:"width: 100%"})
|
||||
.appendTo(propertNameCell)
|
||||
.typedInput({types:headerTypes});
|
||||
|
||||
var propertyValue = $('<input/>',{class:"node-input-header-value",type:"text",style:"margin-left: 10px"})
|
||||
.appendTo(row)
|
||||
var propertyValueCell = $('<div/>').css({'flex-grow':1,'margin-left':'10px'}).appendTo(row);
|
||||
var propertyValue = $('<input/>',{class:"node-input-header-value",type:"text",style:"width: 100%"})
|
||||
.appendTo(propertyValueCell)
|
||||
.typedInput({types:
|
||||
header.h === 'content-type'?contentTypes:[{value:"other",label:"other",icon:"red/images/typedInput/az.png"}]
|
||||
});
|
||||
@ -224,12 +222,7 @@
|
||||
propertyValue.typedInput('types',[{value:"other",label:"other",icon:"red/images/typedInput/az.png"}]);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
resizeRule(container);
|
||||
},
|
||||
resizeItem: resizeRule,
|
||||
removable: true
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user