Harryroge / jquery-datatables-row-reordering

Automatically exported from code.google.com/p/jquery-datatables-row-reordering
0 stars 0 forks source link

rows dont stay where dropped & no ajax request on drop #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
*Sometimes* when I drop a row it just "flies" back to where it came from, even 
though the response to the ajax request is 200 OK. Also, I'm not getting any 
errormessage and theres no javascript error in the firebug console. (This 
happens on both, outer and inner Table and to every row. If you wait a while 
and reload site, it sometimes disappears)

One thing that *sometimes* happens in the inner Table:
On dropping the row, no ajax request is being sent (firebug doesnt show me any 
network activity).

What steps will reproduce the problem?
I can't really say. It just happens from time to time without me changing 
anything.
My table looks like this:

<table id = "fbTable">
   <thead>
      <tr>
         <th>order</th>
         <th>Fachbereiche</th>
      </tr>
   </thead>
   <tbody>
      <tr id ="118">
         <td>11</td>
         <td>
            <div class="collapse">Mathematik/Informatik<span class="collapseButton"></span></div>
            <div>
               <table id = "Mathematik/Informatik" class="innerTable">
                  <thead>
                     <tr>
                        <th class ="hide">order</th>
                        <th><span class="addButton" id="18"></span></th>
                        <th>Dozent</th>
                        <th>exp</th>
                        <th>ppl</th>
                     </tr>
                  </thead>
                  <tbody>
                     <tr id="285">
                        <td class="hide">21</td>
                        <td>Grundfragen des Mathematik- und Informatikunterrichts</td>
                        <td>Schuster</td>
                        <td>ca. 10</td>
                        <td>100</td>
                     </tr>
                     <tr id="2229">
                        <td class="hide">22</td>
                        <td>Didaktik der Stochastik und Analytischen Geometrie</td>
                        <td>Schuster</td>
                        <td>???</td>
                        <td>???</td>
                     </tr>
                  </tbody>
               </table>
            </div>
         </td>
      </tr>
      <tr id ="15">
         <td>12</td>
         <td>
            <div class="collapse">Pädagogik<span class="collapseButton"></span></div>
            <div>
               <table id = "Pädagogik" class="innerTable">
                  <thead>
                     <tr>
                        <th class ="hide">order</th>
                        <th><span class="addButton" id="5"></span></th>
                        <th>Dozent</th><th>exp</th>
                        <th>ppl</th>
                     </tr>
                  </thead>
                  <tbody>
                     <tr id="263">
                        <td class="hide">216</td>
                        <td>Unterrichtsanalyse I</td>
                        <td>Munzert</td>
                        <td>ca. 15</td>
                        <td>120</td>
                     </tr>
                  </tbody>
               </table>
            </div>
         </td>
      </tr>
   </tbody>
</table>

And this is my JQuery:

$("#fbTable").dataTable( {
         "sDom": '<"top">rt<"bottom"flp><"clear">',
         "bPaginate": false,
         "bSort": false,
         "bFilter": false,
         "aoColumnDefs": [{ "bVisible": false, "aTargets": [ 0 ] }]
}).rowReordering({ 
          sURL:"updateFbOrder.jsp",
          sRequestType: "GET",
          fnAlert: function() { 
                alert("unable to change row order");
                               }
});

$(".innerTable").dataTable( {
        "sDom": '<"top">rt<"bottom"flp><"clear">',
        "bPaginate": false,
        "bSort": false,
        "bFilter": false
}).rowReordering({ 
        sURL:"updateLvOrder.jsp",
        sRequestType: "GET",
        fnAlert: function() { 
                  alert("unable to change row order");
                            }
});

Original issue reported on code.google.com by spaa...@web.de on 18 Dec 2012 at 5:31