diff --git a/nodes/core/locales/en-US/messages.json b/nodes/core/locales/en-US/messages.json index 529bae5e8..c3630470b 100644 --- a/nodes/core/locales/en-US/messages.json +++ b/nodes/core/locales/en-US/messages.json @@ -425,8 +425,10 @@ "property": "Property", "rule": "rule" }, + "and": "and", "checkall": "checking all rules", "stopfirst": "stopping after first match", + "ignorecase": "ignore case", "rules": { "btwn":"is between", "cont":"contains", diff --git a/nodes/core/logic/10-switch.html b/nodes/core/logic/10-switch.html index 32c7d9e67..413bc8309 100644 --- a/nodes/core/logic/10-switch.html +++ b/nodes/core/logic/10-switch.html @@ -82,6 +82,9 @@ {v:"else",t:this._("switch.rules.else")} ]; + var andLabel = this._("switch.and"); + var caseLabel = this._("switch.ignorecase"); + function resizeRule(rule,width) { var selectField = rule.find("select"); var type = selectField.children("option:selected").val(); @@ -99,8 +102,9 @@ selectField.width(selectWidth); if (type === "btwn") { - btwnField1.width((width-288)/2); - btwnField2.width((width-288)/2); + var labelWidth = rule.find(".node-input-tule-btwn-label").width(); + btwnField1.width((width-256-labelWidth)/2); + btwnField2.width((width-256-labelWidth)/2); } else { if (type === "true" || type === "false" || type === "null" || type === "nnull" || type === "else") { // valueField.hide(); @@ -113,7 +117,7 @@ function generateRule(i,rule) { var container = $('
  • ',{style:"background: #fff; margin:0; padding:8px 0px; border-bottom: 1px solid #ccc;"}); var row = $('
    ').appendTo(container); - var row2 = $('
    ',{style:"padding-top: 5px; text-align: right;"}).appendTo(container); + var row2 = $('
    ',{style:"padding-top: 5px; padding-left: 175px;"}).appendTo(container); $('').appendTo(row); var selectField = $('',{class:"node-input-rule-value",type:"text",style:"margin-left: 5px; width: 145px;"}).appendTo(row); var btwnField = $('').appendTo(row); var btwnValueField = $('',{class:"node-input-rule-btwn-value",type:"text",style:"margin-left: 5px; width: 50px;"}).appendTo(btwnField); - btwnField.append(" and "); + var btwnAndLabel = $('',{class:"node-input-tule-btwn-label"}).text(" "+andLabel+" ").appendTo(btwnField); var btwnValue2Field = $('',{class:"node-input-rule-btwn-value2",type:"text",style:"width: 50px;margin-left:2px;"}).appendTo(btwnField); var finalspan = $('',{style:"float: right;margin-right: 10px;"}).appendTo(row); @@ -133,6 +137,8 @@ var deleteButton = $('',{href:"#",class:"editor-button editor-button-small", style:"margin-top: 7px; margin-left: 5px;"}).appendTo(finalspan); $('',{class:"fa fa-remove"}).appendTo(deleteButton); + var caseSensitive = $('',{id:"node-input-rule-case-"+i,class:"node-input-rule-case",type:"checkbox",style:"width:auto;vertical-align:top"}).appendTo(row2); + $('