merge branch touch
authorSuperBFG7 <daniel@despite.ch>
Thu, 22 Oct 2015 15:49:42 +0000 (17:49 +0200)
committerSuperBFG7 <daniel@despite.ch>
Thu, 22 Oct 2015 15:49:42 +0000 (17:49 +0200)
1  2 
htdocs/index.html
htdocs/js/mpd.js

Simple merge
@@@ -245,26 -255,7 +258,23 @@@ function webSocketConnect() 
                              socket.send('MPD_API_PLAY_TRACK,'+$(this).attr('trackid'));
                              $(this).addClass('active');
                          },
-                         mouseleave: function(){
-                             $(this).children().last().find("a").stop().remove();
-                         }
                      });
 +                    //Helper function to keep table row from collapsing when being sorted
 +                    var fixHelperModified = function(e, tr) {
 +                      var $originals = tr.children();
 +                      var $helper = tr.clone();
 +                      $helper.children().each(function(index)
 +                      {
 +                        $(this).width($originals.eq(index).width())
 +                      });
 +                      return $helper;
 +                    };
 +                    
 +                    //Make queue table sortable
 +                    $("#salamisandwich > tbody").sortable({
 +                      helper: fixHelperModified,
 +                      stop: function(event,ui) {renumber_table('#salamisandwich',ui.item)}
 +                    }).disableSelection();
                      break;
                  case "search":
                      $('#wait').modal('hide');