@@ -1679,6 +1679,7 @@ class Editor extends Component {
16791679 // Setup for search bar
16801680 searchBox = new Element (' <div>
16811681 <div class="buttons">
1682+ <div class="btn ico ico-ellipsis-v" id="grab" title="Add filter"></div>
16821683 <div class="btn add-btn ico ico-plus" title="Add filter"></div>
16831684 <div class="btn remove-btn ico ico-minus" title="Remove filter"></div>
16841685 </div>
@@ -1739,7 +1740,27 @@ class Editor extends Component {
17391740 inputs .attr (" placeholder" , " Find" );
17401741 inputs .keyup (search );
17411742
1742- var inputCont = searchBox .find (" .input-cont" );
1743+ function startDrag (onMove : js.jquery. Event -> Void , onStop : js.jquery. Event -> Void ) {
1744+ var el = new Element (element [0 ].ownerDocument .body );
1745+ el .on (" mousemove.cdb.search" , onMove );
1746+ el .on (" mouseup.cdb.search" , function (e : js.jquery. Event ) {
1747+ el .off (" mousemove.cdb.search" );
1748+ el .off (" mouseup.cdb.search" );
1749+ e .preventDefault ();
1750+ e .stopPropagation ();
1751+ onStop (e );
1752+ });
1753+ }
1754+
1755+ searchBox .find (" #grab" ).mousedown (function (e ) {
1756+ var x = Std .parseInt (searchBox .css (" right" ));
1757+ var prevClientX = e .clientX ;
1758+ startDrag (function (e : js.jquery. Event ) {
1759+ searchBox .css (" right" , x - (e .clientX - prevClientX ));
1760+ }, function (e ) {
1761+
1762+ });
1763+ });
17431764
17441765 searchBox .find (" .add-btn" ).click (function (_ ) {
17451766 var newInput = new Element (' <input type="text" class="search-bar-cdb"></input>' );
@@ -1750,6 +1771,7 @@ class Editor extends Component {
17501771 searchBox .find (" .remove-btn" ).show ();
17511772 });
17521773
1774+ var inputCont = searchBox .find (" .input-cont" );
17531775 searchBox .find (" .remove-btn" ).hide ();
17541776 searchBox .find (" .remove-btn" ).click (function (_ ) {
17551777 var searchBars = inputCont .find (" .search-bar-cdb" );
0 commit comments