mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Form input widths behave more consistently when resizing
Fixes #919 #920
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<span data-i18n="switch.label.property"></span> <input type="text" id="node-input-property" style="width: 300px;"/>
|
||||
<label data-i18n="switch.label.property"></label>
|
||||
<input type="text" id="node-input-property" style="width: 70%"/>
|
||||
</div>
|
||||
<div class="form-row node-input-rule-container-row">
|
||||
<ol id="node-input-rule-container"></ol>
|
||||
@@ -101,18 +102,18 @@
|
||||
}
|
||||
selectField.width(selectWidth);
|
||||
if (type === "btwn") {
|
||||
btwnField1.typedInput("width",(newWidth-selectWidth-80));
|
||||
btwnField2.typedInput("width",(newWidth-selectWidth-80));
|
||||
btwnField1.typedInput("width",(newWidth-selectWidth-70));
|
||||
btwnField2.typedInput("width",(newWidth-selectWidth-70));
|
||||
} else {
|
||||
if (type === "true" || type === "false" || type === "null" || type === "nnull" || type === "else") {
|
||||
// valueField.hide();
|
||||
} else {
|
||||
valueField.typedInput("width",(newWidth-selectWidth-80));
|
||||
valueField.typedInput("width",(newWidth-selectWidth-70));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#node-input-rule-container").css('min-height','300px').css('min-width','450px').editableList({
|
||||
$("#node-input-rule-container").css('min-height','250px').css('min-width','450px').editableList({
|
||||
addItem: function(container,i,opt) {
|
||||
var rule = opt||{t:"",v:"",v2:""};
|
||||
var row = $('<div/>').appendTo(container);
|
||||
@@ -126,7 +127,7 @@
|
||||
var btwnValueField = $('<input/>',{class:"node-input-rule-btwn-value",type:"text",style:"margin-left: 5px;"}).appendTo(row).typedInput({default:'num',types:['msg','flow','global','str','num',previousValueType]});
|
||||
var btwnAndLabel = $('<span/>',{class:"node-input-rule-btwn-label"}).text(" "+andLabel+" ").appendTo(row3);
|
||||
var btwnValue2Field = $('<input/>',{class:"node-input-rule-btwn-value2",type:"text",style:"margin-left:2px;"}).appendTo(row3).typedInput({default:'num',types:['msg','flow','global','str','num',previousValueType]});
|
||||
var finalspan = $('<span/>',{style:"float: right;margin-top: 6px;margin-right: 10px;"}).appendTo(row);
|
||||
var finalspan = $('<span/>',{style:"float: right;margin-top: 6px;"}).appendTo(row);
|
||||
finalspan.append(' → <span class="node-input-rule-index">'+(i+1)+'</span> ');
|
||||
var caseSensitive = $('<input/>',{id:"node-input-rule-case-"+i,class:"node-input-rule-case",type:"checkbox",style:"width:auto;vertical-align:top"}).appendTo(row2);
|
||||
$('<label/>',{for:"node-input-rule-case-"+i,style:"margin-left: 3px;"}).text(caseLabel).appendTo(row2);
|
||||
@@ -135,14 +136,14 @@
|
||||
var type = selectField.children("option:selected").val();
|
||||
|
||||
if (type === "btwn") {
|
||||
valueField.parent().hide();
|
||||
btwnValueField.parent().show();
|
||||
valueField.typedInput('hide');
|
||||
btwnValueField.typedInput('show');
|
||||
} else {
|
||||
btwnValueField.parent().hide();
|
||||
btwnValueField.typedInput('hide');
|
||||
if (type === "true" || type === "false" || type === "null" || type === "nnull" || type === "else") {
|
||||
valueField.parent().hide();
|
||||
valueField.typedInput('hide');
|
||||
} else {
|
||||
valueField.parent().show();
|
||||
valueField.typedInput('show');
|
||||
}
|
||||
}
|
||||
if (type === "regex") {
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<script type="text/x-red" data-template-name="change">
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" style="width:370px;" data-i18n="[placeholder]common.label.name">
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
||||
</div>
|
||||
<div class="form-row" style="margin-bottom:0;">
|
||||
<label><i class="fa fa-list"></i> <span data-i18n="change.label.rules"></span></label>
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<script type="text/x-red" data-template-name="range">
|
||||
<div class="form-row">
|
||||
<label for="node-input-action"><i class="fa fa-dot-circle-o"></i> <span data-i18n="range.label.action"></span></label>
|
||||
<select id="node-input-action" style="width:70%; margin-right:5px;">
|
||||
<select id="node-input-action" style="width:70%;">
|
||||
<option value="scale" data-i18n="range.scale.payload"></option>
|
||||
<option value="clamp" data-i18n="range.scale.limit"></option>
|
||||
<option value="roll" data-i18n="range.scale.wrap"></option>
|
||||
|
@@ -79,7 +79,7 @@
|
||||
<div class="node-row-custom">
|
||||
<div class="form-row node-row-property">
|
||||
<label>Combine each </label>
|
||||
<input type="text" id="node-input-property" style="width:300px;">
|
||||
<input type="text" id="node-input-property" style="width:70%;">
|
||||
<input type="hidden" id="node-input-propertyType">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
Reference in New Issue
Block a user