mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
support drag and drop for playlist items
This commit is contained in:
parent
80929558e6
commit
fd64c014a3
45 changed files with 4202 additions and 3 deletions
33
dashboard-ui/bower_components/dragula.js/classes.js
vendored
Normal file
33
dashboard-ui/bower_components/dragula.js/classes.js
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
'use strict';
|
||||
|
||||
var cache = {};
|
||||
var start = '(?:^|\\s)';
|
||||
var end = '(?:\\s|$)';
|
||||
|
||||
function lookupClass (className) {
|
||||
var cached = cache[className];
|
||||
if (cached) {
|
||||
cached.lastIndex = 0;
|
||||
} else {
|
||||
cache[className] = cached = new RegExp(start + className + end, 'g');
|
||||
}
|
||||
return cached;
|
||||
}
|
||||
|
||||
function addClass (el, className) {
|
||||
var current = el.className;
|
||||
if (!current.length) {
|
||||
el.className = className;
|
||||
} else if (!lookupClass(className).test(current)) {
|
||||
el.className += ' ' + className;
|
||||
}
|
||||
}
|
||||
|
||||
function rmClass (el, className) {
|
||||
el.className = el.className.replace(lookupClass(className), ' ').trim();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
add: addClass,
|
||||
rm: rmClass
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue