dev-master
9999999-devasset-bundle and widget for dragula drag and drop library
BSD-3-Clause
The Requires
- bower-asset/dragula *
by Elmar Frank
yii2 javascript drag drop drag and drop dragula
Wallogit.com
2017 © Pedro Peláez
asset-bundle and widget for dragula drag and drop library
yii2 extension / widget for dragula drag and drop library, (*1)
does not require any other libraries than dragula., (*2)
for a detailed documentation and demo see Dragula example page, (*3)
function (el) { ... }
function (el) { ... }
function (el, container) { ... }
function (el, container) { ... }
<ul id="files">
<li data-filename="file 1">file 1</li>
<li data-filename="file 2">file 2</li>
<li data-filename="file 3">file 3</li>
</ul>
<?= \x1\dragula\Dragula::widget([
'containers' => ['#files'],
'options' => [
'revertOnSpill' => true,
],
'drop' => new \yii\web\JsExpression('my.dropped'),
]); ?>
Note that i used jquery in my example code, which is optional and not referenced by this project., (*4)
Also, you have to take care of script loading order yourself!, (*5)
asset-bundle and widget for dragula drag and drop library
BSD-3-Clause
yii2 javascript drag drop drag and drop dragula