From da67e69544c1778ddfcb45286ea366d542d73273 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 29 Jan 2015 20:37:57 +0000 Subject: [PATCH] Add drag handle to switch node rules --- nodes/core/logic/10-switch.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nodes/core/logic/10-switch.html b/nodes/core/logic/10-switch.html index dfadcbb59..d1555d486 100644 --- a/nodes/core/logic/10-switch.html +++ b/nodes/core/logic/10-switch.html @@ -83,9 +83,10 @@ ]; function generateRule(i,rule) { - var container = $('
  • ',{style:"cursor: move; background: #fff; margin:0; padding:8px 0px; border-bottom: 1px solid #ccc;"}); + 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); + $('').appendTo(row); var selectField = $('',{class:"node-input-rule-btwn-value2",type:"text",style:"width: 50px;margin-left:2px;"}).appendTo(btwnField); var finalspan = $('',{style:"float: right; margin-top: 3px;margin-right: 10px;"}).appendTo(row); - finalspan.append(' send to '+i+' '); + finalspan.append(' → '+i+' '); + + var deleteButton = $('',{href:"#",class:"btn btn-mini", style:"margin-left: 5px;"}).appendTo(finalspan); + $('',{class:"fa fa-remove"}).appendTo(deleteButton); selectField.change(function() { var type = selectField.children("option:selected").val(); @@ -123,8 +127,6 @@ } }); - var deleteButton = $('',{href:"#",class:"btn btn-mini", style:"margin-left: 5px;"}).appendTo(finalspan); - $('',{class:"fa fa-remove"}).appendTo(deleteButton); deleteButton.click(function() { container.css({"background":"#fee"}); @@ -177,7 +179,9 @@ rules.each(function(i) { $(this).find(".node-input-rule-index").html(i+1); }); - } + }, + handle:".node-input-rule-handle", + cursor: "move" }); $( "#node-input-rule-container" ).disableSelection();