multiselect icon indicating copy to clipboard operation
multiselect copied to clipboard

Adding or removing multiple fields at once.

Open coljung opened this issue 13 years ago • 1 comments

I'm trying to replicate this behavior: http://taylorbeseda.com/projects/multisort/

So far i've been unsuccessful, I modified this:

_registerRemoveEvents: function(elements) { var that = this; elements.click(function() { that._setSelected($(this).parent(), false); that.count -= 1; that._updateCount(); return false; }); }

------------------------ Into:

_registerRemoveEvents: function(elements) { var that = this; elements.click(function() { if($(this).parent().hasClass("grouped")){ $("ul.selected li.grouped").each(function(){ that._setSelected($(this).parent(), false); that.count -= 1; that._updateCount(); }); }else{ that._setSelected($(this).parent(), false); that.count -= 1; that._updateCount(); }

        return false;
    });
}

i've been playing around with this to no avail, i dont think it is too hard, i'm just lost at the moment trying to combine both widgets.

coljung avatar Jul 15 '11 13:07 coljung

Hmm, I guess it was the fact that " that._setSelected($(this).parent(), false);" inside of each li was referencing the ul instead of the li, it seems to be working now !

Now I have it working when the +/- are clicked, gotta figure out now how to sort / drag multiple items at the same time..

I'm stuck on:

helper: function() { var selectedItem = that._cloneWithData($(this)).width($(this).width() - 50); selectedItem.width($(this).width()); return selectedItem; },

I'm trying to figure out how to return multiple elements there.

coljung avatar Jul 15 '11 14:07 coljung