2011-07-07 11 views
2

jQuery UIのソート可能なアイテムがiPad/iPhoneのレコードリストで機能しないという問題がありました。私は各レコードの前に[edit]と[delete]のリンクを持っていますが、ui-sortableの問題はhttp://furf.com/exp/touch-punch/sortable.htmlで修正されています。これはマウスのイベントにタッチイベントを再マップするjsファイルを1つだけ追加したものです。今問題は、リスト内の各レコードの前にある[編集]または[削除]リンクをクリックできないことです。誰でも助けてくれますか? IpadではJQuery UISortableが正常に機能しますが、リストの通常のリンクは失敗します

var fixHelper = function (e, ui) { 
     ui.children().each(function() { 
      $(this).width($(this).width()); 
     }); 
     return ui; 
    };

$(document).ready(function() {

$(function() { $("#dynamicsortlists tbody").sortable({ opacity: 0.6, helper: fixHelper, cursor: 'move', update: function() { var order = $(this).sortable("serialize") + '&action=updateRecordsListings'; $.post("_changesortorder.php", order, function (theResponse) { }); } }); });

When it was not working for iPad, I just include this jquery file jquery.ui.touch-punch.min.js from http://furf.com/exp/touch-punch/sortable.html . And that worked, but now normal links in #dynamicsortlists tbody tr are not working.

Edit : Okay, No one answered, now another issue, may be that is easy. Please look at http://jqueryui.com/demos/sortable/ with the Default Functionality example, now I don't want the whole "li" to be clicked moved up/down, I want a specific icon with in the "li" and only the the "li" can moved up/down holding from that icon. Please help me with this.

+0

誰か助けてもらえますか? – Sohail

+1

投稿できるコードはありますか?たぶん[フィドル](http://www.jsfiddle.net)を作るのだろうか? –

+0

https://github.com/furf/jquery-ui-touch-punchでプラグインの作者と話し合うために問題が発生する可能性があります – didxga

答えて

0

I don't know if this is still interesing for you but enabling a handler works just as it does for draggables... same for the axis...

$("#sortbox").sortable({ handle:'.draghandle', axis:'y' });

ただし、これは別の問題を引き起こします。一度ハンドルでドラッグすると、最後のソートされた項目は、ハンドル以外の場所をクリックすると移動します。

パンチタッチは本当にクールなプラグインですが、それにはかなりの問題があり、非常に悲しいです。多くの回答や修正はありません。

+0

タッチパンチは数日前に更新されました..かなりの修正と改善 – pixelass

2

jquery-ui-touch-punchの0.2リリースでは、ソート可能なウィジェット内のリンクを含む、Github上でログされたすべての問題が解決されました。もう一度ダウンロードして問題が解決されているかどうかを確認してください。そうでない場合は、サンプルコードと$/$。uiのバージョンで問題を提出してください。それを修正しようとします。

https://github.com/furf/jquery-ui-touch-punch

関連する問題