Aleksander Machniak
2014-07-25 2c0d3e1dd0a3df01c8adea0de5f2826f0bcb9434
program/js/treelist.js
@@ -482,11 +482,13 @@
    if (keep_content) {
      if (draggable_opts) {
        if (ui_draggable)
        draggable('destroy');
        draggable(draggable_opts);
      }
      if (droppable_opts) {
        if (ui_droppable)
        droppable('destroy');
        droppable(droppable_opts);
      }
@@ -1061,6 +1063,9 @@
    if (!opts) opts = {};
    if ($.type(opts) == 'string') {
      if (opts == 'destroy') {
        ui_droppable = null;
      }
      $('li:not(.virtual)', container).droppable(opts);
      return this;
    }
@@ -1109,6 +1114,9 @@
    if (!opts) opts = {};
    if ($.type(opts) == 'string') {
      if (opts == 'destroy') {
        ui_draggable = null;
      }
      $('li:not(.virtual)', container).draggable(opts);
      return this;
    }
@@ -1121,6 +1129,7 @@
        iframeFix: true,
        addClasses: false,
        cursorAt: {left: -20, top: 5},
        create: function(e, ui) { ui_draggable = ui; },
        helper: function(e) {
          return $('<div>').attr('id', 'rcmdraglayer')
            .text($.trim($(e.target).first().text()));