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/list.js/src/ drwxrwxr-x | |
| Viewing file: Select action/file-type: module.exports = function (list) {
var Item = require('./item')(list)
var getChildren = function (parent) {
var nodes = parent.childNodes,
items = []
for (var i = 0, il = nodes.length; i < il; i++) {
// Only textnodes have a data attribute
if (nodes[i].data === undefined) {
items.push(nodes[i])
}
}
return items
}
var parse = function (itemElements, valueNames) {
for (var i = 0, il = itemElements.length; i < il; i++) {
list.items.push(new Item(valueNames, itemElements[i]))
}
}
var parseAsync = function (itemElements, valueNames) {
var itemsToIndex = itemElements.splice(0, 50) // TODO: If < 100 items, what happens in IE etc?
parse(itemsToIndex, valueNames)
if (itemElements.length > 0) {
setTimeout(function () {
parseAsync(itemElements, valueNames)
}, 1)
} else {
list.update()
list.trigger('parseComplete')
}
}
list.handlers.parseComplete = list.handlers.parseComplete || []
return function () {
var itemsToIndex = getChildren(list.list),
valueNames = list.valueNames
if (list.indexAsync) {
parseAsync(itemsToIndex, valueNames)
} else {
parse(itemsToIndex, valueNames)
}
}
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.025 ]-- |