client/client.js
// Set drag properties for internal drag sources
Set drag properties for internal drag sources
Set drag properties for internal drag sources
function bindDragEvents(view) {
    view.find(".data-row .entry-link").each(function() {
      this.setAttribute("draggable", "true");
    });
    view.reg("dragstart", function(event) {
      var row = $(event.target).hasClass("data-row") ? $(event.target) : $(event.target).parents(".data-row");
      if (event.ctrlKey || event.metaKey || event.altKey) {
        view[0].dragAction = "copy";
      } else if (event.shiftKey) {
        view[0].dragAction = "cut";
      }
      droppy.dragTimer.refresh(row[0].dataset.id);
      event.originalEvent.dataTransfer.setData("text", JSON.stringify({
        type: row[0].dataset.type,
        path: row[0].dataset.id,
      }));
      event.originalEvent.dataTransfer.effectAllowed = "copyMove";
      if ("setDragImage" in event.originalEvent.dataTransfer) {
        event.originalEvent.dataTransfer.setDragImage(row.find(".sprite")[0], 0, 0);
      }
    });
  }
function bindDragEvents ( view ) { view . find ( ".data-row .entry-link" ) . each ( function ( ) { this . setAttribute ( "draggable" , "true" ) ; } ) ; view . reg ( "dragstart" , function ( event ) { var row = $ ( event . target ) . hasClass ( "data-row" ) ? $ ( event . target ) : $ ( event . target ) . parents ( ".data-row" ) ; if ( event . ctrlKey || event . metaKey || event . altKey ) { view [ 0 ] . dragAction = "copy" ; } else if ( event . shiftKey ) { view [ 0 ] . dragAction = "cut" ; } droppy . dragTimer . refresh ( row [ 0 ] . dataset . id ) ; event . originalEvent . dataTransfer . setData ( "text" , JSON . stringify ( { type : row [ 0 ] . dataset . type , path : row [ 0 ] . dataset . id , } ) ) ; event . originalEvent . dataTransfer . effectAllowed = "copyMove" ; if ( "setDragImage" in event . originalEvent . dataTransfer ) { event . originalEvent . dataTransfer . setDragImage ( row . find ( ".sprite" ) [ 0 ] , 0 , 0 ) ; } } ) ; }
Set drag properties for internal drag sources
Set drag properties for internal drag sources