1rosehip / jplist

jPList jQuery Data Grid Controls is a flexible jQuery plugin for sorting, pagination and filtering of any HTML structure (DIVs, UL/LI, tables, etc).
http://jplist.com
Other
436 stars 177 forks source link

Pin an item in the layout #226

Closed sandeepk01 closed 7 years ago

sandeepk01 commented 7 years ago

Hi, Would like to have an enhancement in the core to enable 'Pin to layout' kind of feature. Let's assume there is a layout with 100 tiles and user tries to filter and work on two or more tiles simultaneously. The probability of the tiles being placed adjacent to each other is rare. Hence if there is a control on each tile that makes it come out of the filter loop and pins it on top of the layout will add to the usability.

Thanks.

1rosehip commented 7 years ago

Hi, Do you mean that such tile should not be filtered, sorted etc. when the user is working on it?

If so, you may use jPList API to remove the item: http://jplist.com/documentation/api-remove-one-item And then add it to some location out of the jlocator container.

After the user has completed his work you may add it back using add API: http://jplist.com/documentation/api-add-one-item

sandeepk01 commented 7 years ago

Hi Miriam,

Just to clarify my point, attaching sample diagrams of the idea.

State 1: The itemsBox has 5 tiles (item paths). User is able to filter or sort all of them. User tries to pin Tile 4.

state1

State 2: Tile 4 has moved to top in itemsBox. User can still filter/sort other tiles but Tile 4 stays there until its been un-pinned.

state2

Adding/removing the tile may hamper events attached to the children of the tile.

Appreciate your help on this.

1rosehip commented 7 years ago

Adding/removing the tile using API won't hamper events attached to the children of the tile because APIs use attach / detach instead of simple add / remove. Please try the proposed solution using API.