gridstack.js icon indicating copy to clipboard operation
gridstack.js copied to clipboard

Dragging into a grid stack from a sidebar

Open Petah opened this issue 11 years ago • 20 comments

Is there any way to drag an item into a grid stack from a sidebar?

Petah avatar Feb 17 '15 23:02 Petah

Try using jquery ui droppable.

On Tuesday, February 17, 2015, David Neilsen [email protected] wrote:

Is there any way to drag an item into a grid stack from a sidebar?

Reply to this email directly or view it on GitHub https://github.com/troolee/gridstack.js/issues/69.

ascendantofrain avatar Feb 17 '15 23:02 ascendantofrain

But can it use the placeholder in this case?

Petah avatar Feb 17 '15 23:02 Petah

Hi,

gridstack doesn't have such functionality but I think I can implement it.

troolee avatar Feb 18 '15 04:02 troolee

Would be very useful :+1:

dani80vdt avatar Mar 03 '15 16:03 dani80vdt

+1, this would definitely make me use it over gridster.

AndreCrujo avatar Mar 05 '15 11:03 AndreCrujo

+1

ascendantofrain avatar Mar 05 '15 12:03 ascendantofrain

+1

crashnick16 avatar Mar 10 '15 08:03 crashnick16

important feature, серьезно

jahy avatar Mar 13 '15 21:03 jahy

Will be сделано самой первой in 0.2.4

//wbr Pavel Reznikov [email protected]

On Fri, Mar 13, 2015 at 2:34 PM, Yaroslav [email protected] wrote:

important feature, серьезно

— Reply to this email directly or view it on GitHub https://github.com/troolee/gridstack.js/issues/69#issuecomment-79429097.

troolee avatar Mar 13 '15 21:03 troolee

I am not expert in jQuery or JS, but just thinking: if the grid-stack-item-content is made to hold an internal jquery ui droppable element it may just start working and accepting the drops (Not sure, but should be close to the solution).

Also, on a side note, came across this very nice drag -drop effects design, and just thought of sharing, for inspiration: http://tympanus.net/Development/DragDropInteractions/sidebar.html

KrishnaPG avatar Mar 24 '15 16:03 KrishnaPG

I tried as below and am able to make drag-drop work within a widget - but dropping from outside/side-bar looks like need some expert.

    <div class="grid-stack-item"
             data-gs-x={{x}} data-gs-y={{y}}
             data-gs-width={{width}} data-gs-height={{height}}
             data-panel-id={{_id}} data-content-id={{contentId}}>
    <div class="grid-stack-item-content panel panel-default">
    <div class="panel-body ">
        <div>
            <ul id ="droppable" class="ui-widget-header columnsContainer2" style="height:100%;">
                <li>item1 </li>
                <li>item2</li>
                <li>item3</li>
            </ul>
            <p>Drop here</p>
        </div>
    </div>
    </div>
    </div>

JS code

$("#droppable").sortable({
        revert: true,
        distance: 8,
        connectWith: $('.columnsContainer2'),
        receive: function (ev, ui) {
            console.log("received");
        }
    });

KrishnaPG avatar Mar 25 '15 02:03 KrishnaPG

+1 for this. Awesome plugin by the way

mirata avatar Apr 04 '15 04:04 mirata

+1 important feature. Any update on this enhancement?

alangunning avatar May 20 '15 01:05 alangunning

+1

piwi91 avatar Jun 03 '15 14:06 piwi91

+1

getrupendra avatar Jun 30 '15 06:06 getrupendra

+1 thats would be nice to have this feature while building UI

pySilver avatar Jun 30 '15 15:06 pySilver

+1 or at least a guidance

pofider avatar Sep 16 '15 18:09 pofider

+1

albulushi avatar Dec 10 '15 17:12 albulushi

+1 Would be an awesome feature

Furburger avatar Feb 05 '16 07:02 Furburger

We're working on it. I'm closing the issue because we have another same issues #133 just to clean a mess in issues

troolee avatar Feb 18 '16 03:02 troolee