mcm-ham / dragsort

jQuery List DragSort
3 stars 1 forks source link

Only trigger dragEnd when order has changed #3

Open mcm-ham opened 6 years ago

mcm-ham commented 6 years ago

P:S. Is here a way to send request to server only when some items really reordered, not by click only on item ?

Attachments

jquery.dragsort.zip

This work item was migrated from CodePlex

CodePlex work item ID: '27382' Vote count: '2'

mcm-ham commented 6 years ago

[msilvalopes@4/11/2010] is just do [js script] $("#list1").dragsort({ dragSelector: "div", dragBetween: true, dragEnd: saveOrder, placeHolderTemplate: "" });

    function saveOrder() {
        var serialStr = "";
        $("#list1 li").each(function(i, elm) { serialStr += (i > 0 ? "|" : "") + $(elm).children().html(); });
        $.post('submitOrder.php',{'neworder':serialStr},function(result){
            alert(result)
        });
    };

[example of work result on php]

mcm-ham commented 6 years ago

[msilvalopes@4/11/2010] ops, i forgot to send the files

mcm-ham commented 6 years ago

[msilvalopes@4/11/2010] p.s.: i forgot to say i disabled the second list

mcm-ham commented 6 years ago

[mcm_ham@25/02/2012] Implemented for 0.4.

** Closed by mcm_ham 11/20/2010 2:37 PM

mcm-ham commented 6 years ago

[mcm_ham@25/02/2012]

mcm-ham commented 6 years ago

[llorca@13/12/2012] Hi how can I dragsort stop and start? Or disable and enable? In other function.

Because I want to use with together Uploadify.

Photo instantly uploading I want to stop or disable dragsort.Thank you.