1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Stop list items from overflowing to new lines in node ui

Fixes #1408
This commit is contained in:
Nick O'Leary 2018-01-25 14:02:04 +00:00
parent 2cea3b6435
commit 22a5b339f7
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
3 changed files with 14 additions and 4 deletions

View File

@ -248,11 +248,14 @@ msg.cookies = {
function resizeRule(rule) { function resizeRule(rule) {
var newWidth = rule.width(); var newWidth = rule.width();
rule.find('.red-ui-typedInput').typedInput("width",(newWidth-15)/2); 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({ var headerList = $("#node-input-headers-container").css('min-height','150px').css('min-width','450px').editableList({
addItem: function(container,i,header) { addItem: function(container,i,header) {
var row = $('<div/>').appendTo(container); var row = $('<div/>').css({
overflow: 'hidden',
whiteSpace: 'nowrap'
}).appendTo(container);
var propertyName = $('<input/>',{class:"node-input-header-name",type:"text"}) var propertyName = $('<input/>',{class:"node-input-header-name",type:"text"})
.appendTo(row) .appendTo(row)
.typedInput({types:headerTypes}); .typedInput({types:headerTypes});

View File

@ -201,6 +201,10 @@
if (!opt.hasOwnProperty('i')) { if (!opt.hasOwnProperty('i')) {
opt._i = Math.floor((0x99999-0x10000)*Math.random()).toString(16); opt._i = Math.floor((0x99999-0x10000)*Math.random()).toString(16);
} }
container.css({
overflow: 'hidden',
whiteSpace: 'nowrap'
});
var row = $('<div/>').appendTo(container); var row = $('<div/>').appendTo(container);
var row2 = $('<div/>',{style:"padding-top: 5px; padding-left: 175px;"}).appendTo(container); var row2 = $('<div/>',{style:"padding-top: 5px; padding-left: 175px;"}).appendTo(container);
var row3 = $('<div/>',{style:"padding-top: 5px; padding-left: 102px;"}).appendTo(container); var row3 = $('<div/>',{style:"padding-top: 5px; padding-left: 102px;"}).appendTo(container);

View File

@ -98,7 +98,7 @@
function resizeRule(rule) { function resizeRule(rule) {
var newWidth = rule.width(); var newWidth = rule.width();
rule.find('.red-ui-typedInput').typedInput("width",newWidth-150); rule.find('.red-ui-typedInput').typedInput("width",newWidth-130);
} }
$('#node-input-rule-container').css('min-height','300px').css('min-width','450px').editableList({ $('#node-input-rule-container').css('min-height','300px').css('min-width','450px').editableList({
@ -122,7 +122,10 @@
if (rule.t === "move" && !rule.tot) { if (rule.t === "move" && !rule.tot) {
rule.tot = "msg"; rule.tot = "msg";
} }
container.css({
overflow: 'hidden',
whiteSpace: 'nowrap'
});
var row1 = $('<div/>').appendTo(container); var row1 = $('<div/>').appendTo(container);
var row2 = $('<div/>',{style:"margin-top:8px;"}).appendTo(container); var row2 = $('<div/>',{style:"margin-top:8px;"}).appendTo(container);
var row3 = $('<div/>',{style:"margin-top:8px;"}).appendTo(container); var row3 = $('<div/>',{style:"margin-top:8px;"}).appendTo(container);