Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
moodle /
lib /
amd /
src /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
emoji
[ DIR ]
drwxrwxrwx
local
[ DIR ]
drwxrwxrwx
.mad-root
0
B
-rw-r--r--
adapter.js
190.74
KB
-rwxrwxrwx
addblockmodal.js
2.56
KB
-rwxrwxrwx
ajax.js
10.09
KB
-rwxrwxrwx
auto_rows.js
3.5
KB
-rwxrwxrwx
autoscroll.js
6.54
KB
-rwxrwxrwx
backoff_timer.js
5.12
KB
-rwxrwxrwx
chart_axis.js
7.43
KB
-rwxrwxrwx
chart_bar.js
3.13
KB
-rwxrwxrwx
chart_base.js
11.41
KB
-rwxrwxrwx
chart_builder.js
1.67
KB
-rwxrwxrwx
chart_line.js
2.13
KB
-rwxrwxrwx
chart_output.js
1.1
KB
-rwxrwxrwx
chart_output_base.js
2.09
KB
-rwxrwxrwx
chart_output_chartjs.js
10.95
KB
-rwxrwxrwx
chart_output_htmltable.js
3.36
KB
-rwxrwxrwx
chart_pie.js
3.09
KB
-rwxrwxrwx
chart_series.js
8.41
KB
-rwxrwxrwx
chartjs-lazy.js
670.93
KB
-rwxrwxrwx
chartjs.js
933
B
-rwxrwxrwx
checkbox-toggleall.js
12.78
KB
-rwxrwxrwx
config.js
1.05
KB
-rwxrwxrwx
custom_interaction_events.js
22.29
KB
-rwxrwxrwx
dragdrop.js
13.01
KB
-rwxrwxrwx
drawer.js
3.37
KB
-rwxrwxrwx
drawer_events.js
987
B
-rwxrwxrwx
event.js
3.99
KB
-rwxrwxrwx
first.js
1.38
KB
-rwxrwxrwx
form-autocomplete.js
50.91
KB
-rwxrwxrwx
form-cohort-selector.js
2.56
KB
-rwxrwxrwx
form-course-selector.js
3.87
KB
-rwxrwxrwx
fragment.js
4.72
KB
-rwxrwxrwx
fullscreen.js
1.66
KB
-rwxrwxrwx
icon_system.js
2.52
KB
-rwxrwxrwx
icon_system_fontawesome.js
3.95
KB
-rwxrwxrwx
icon_system_standard.js
2.29
KB
-rwxrwxrwx
inplace_editable.js
13.31
KB
-rwxrwxrwx
key_codes.js
1.38
KB
-rwxrwxrwx
loadingicon.js
3.89
KB
-rwxrwxrwx
localstorage.js
2.1
KB
-rwxrwxrwx
log.js
1.76
KB
-rwxrwxrwx
loglevel.js
9.66
KB
-rwxrwxrwx
modal.js
29.18
KB
-rwxrwxrwx
modal_backdrop.js
4.48
KB
-rwxrwxrwx
modal_cancel.js
1.44
KB
-rwxrwxrwx
modal_events.js
1.25
KB
-rwxrwxrwx
modal_factory.js
8.05
KB
-rwxrwxrwx
modal_registry.js
2.4
KB
-rwxrwxrwx
modal_save_cancel.js
2.14
KB
-rwxrwxrwx
mustache.js
26.69
KB
-rwxrwxrwx
network.js
6.78
KB
-rwxrwxrwx
notification.js
8.72
KB
-rwxrwxrwx
page_global.js
5.4
KB
-rwxrwxrwx
paged_content.js
2.87
KB
-rwxrwxrwx
paged_content_events.js
1.17
KB
-rwxrwxrwx
paged_content_factory.js
20.68
KB
-rwxrwxrwx
paged_content_pages.js
11.75
KB
-rwxrwxrwx
paged_content_paging_bar.js
20.34
KB
-rwxrwxrwx
paged_content_paging_bar_limit...
2.36
KB
-rwxrwxrwx
paged_content_paging_dropdown....
7.36
KB
-rwxrwxrwx
pending.js
1.59
KB
-rwxrwxrwx
permissionmanager.js
9.82
KB
-rwxrwxrwx
popover_region_controller.js
12.58
KB
-rwxrwxrwx
popper.js
79.2
KB
-rwxrwxrwx
prefetch.js
4.61
KB
-rwxrwxrwx
pubsub.js
2.17
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
search-input.js
3.24
KB
-rwxrwxrwx
sessionstorage.js
2.24
KB
-rwxrwxrwx
showhidesettings.js
11.83
KB
-rwxrwxrwx
sortable_list.js
29.51
KB
-rwxrwxrwx
storagewrapper.js
5.17
KB
-rwxrwxrwx
str.js
6.13
KB
-rwxrwxrwx
tag.js
19.79
KB
-rwxrwxrwx
templates.js
49.68
KB
-rwxrwxrwx
toast.js
2.72
KB
-rwxrwxrwx
tooltip.js
4.1
KB
-rwxrwxrwx
tree.js
18.06
KB
-rwxrwxrwx
truncate.js
6.6
KB
-rwxrwxrwx
url.js
3.69
KB
-rwxrwxrwx
user_date.js
9.34
KB
-rwxrwxrwx
userfeedback.js
2.91
KB
-rwxrwxrwx
utils.js
2.69
KB
-rwxrwxrwx
yui.js
1.15
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : tree.js
// This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Implement an accessible aria tree widget, from a nested unordered list. * Based on http://oaa-accessibility.org/example/41/. * * @module tool_lp/tree * @package core * @copyright 2015 Damyon Wiese <damyon@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define(['jquery'], function($) { // Private variables and functions. var SELECTORS = { ITEM: '[role=treeitem]', GROUP: '[role=treeitem]:has([role=group]), [role=treeitem][aria-owns], [role=treeitem][data-requires-ajax=true]', CLOSED_GROUP: '[role=treeitem]:has([role=group])[aria-expanded=false], [role=treeitem][aria-owns][aria-expanded=false], ' + '[role=treeitem][data-requires-ajax=true][aria-expanded=false]', FIRST_ITEM: '[role=treeitem]:first', VISIBLE_ITEM: '[role=treeitem]:visible', UNLOADED_AJAX_ITEM: '[role=treeitem][data-requires-ajax=true][data-loaded=false][aria-expanded=true]' }; /** * Constructor. * * @param {String} selector * @param {function} selectCallback Called when the active node is changed. */ var Tree = function(selector, selectCallback) { this.treeRoot = $(selector); this.treeRoot.data('activeItem', null); this.selectCallback = selectCallback; this.keys = { tab: 9, enter: 13, space: 32, pageup: 33, pagedown: 34, end: 35, home: 36, left: 37, up: 38, right: 39, down: 40, asterisk: 106 }; // Apply the standard default initialisation for all nodes, starting with the tree root. this.initialiseNodes(this.treeRoot); // Make the first item the active item for the tree so that it is added to the tab order. this.setActiveItem(this.treeRoot.find(SELECTORS.FIRST_ITEM)); // Create the cache of the visible items. this.refreshVisibleItemsCache(); // Create the event handlers for the tree. this.bindEventHandlers(); }; Tree.prototype.registerEnterCallback = function(callback) { this.enterCallback = callback; }; /** * Find all visible tree items and save a cache of them on the tree object. * * @method refreshVisibleItemsCache */ Tree.prototype.refreshVisibleItemsCache = function() { this.treeRoot.data('visibleItems', this.treeRoot.find(SELECTORS.VISIBLE_ITEM)); }; /** * Get all visible tree items. * * @method getVisibleItems * @return {Object} visible items */ Tree.prototype.getVisibleItems = function() { return this.treeRoot.data('visibleItems'); }; /** * Mark the given item as active within the tree and fire the callback for when the active item is set. * * @method setActiveItem * @param {object} item jquery object representing an item on the tree. */ Tree.prototype.setActiveItem = function(item) { var currentActive = this.treeRoot.data('activeItem'); if (item === currentActive) { return; } // Remove previous active from tab order. if (currentActive) { currentActive.attr('tabindex', '-1'); currentActive.attr('aria-selected', 'false'); } item.attr('tabindex', '0'); item.attr('aria-selected', 'true'); // Set the new active item. this.treeRoot.data('activeItem', item); if (typeof this.selectCallback === 'function') { this.selectCallback(item); } }; /** * Determines if the given item is a group item (contains child tree items) in the tree. * * @method isGroupItem * @param {object} item jquery object representing an item on the tree. * @returns {bool} */ Tree.prototype.isGroupItem = function(item) { return item.is(SELECTORS.GROUP); }; /** * Determines if the given item is a group item (contains child tree items) in the tree. * * @method isGroupItem * @param {object} item jquery object representing an item on the tree. * @returns {bool} */ Tree.prototype.getGroupFromItem = function(item) { var ariaowns = this.treeRoot.find('#' + item.attr('aria-owns')); var plain = item.children('[role=group]'); if (ariaowns.length > plain.length) { return ariaowns; } else { return plain; } }; /** * Determines if the given group item (contains child tree items) is collapsed. * * @method isGroupCollapsed * @param {object} item jquery object representing a group item on the tree. * @returns {bool} */ Tree.prototype.isGroupCollapsed = function(item) { return item.attr('aria-expanded') === 'false'; }; /** * Determines if the given group item (contains child tree items) can be collapsed. * * @method isGroupCollapsible * @param {object} item jquery object representing a group item on the tree. * @returns {bool} */ Tree.prototype.isGroupCollapsible = function(item) { return item.attr('data-collapsible') !== 'false'; }; /** * Performs the tree initialisation for all child items from the given node, * such as removing everything from the tab order and setting aria selected * on items. * * @method initialiseNodes * @param {object} node jquery object representing a node. */ Tree.prototype.initialiseNodes = function(node) { this.removeAllFromTabOrder(node); this.setAriaSelectedFalseOnItems(node); // Get all ajax nodes that have been rendered as expanded but haven't loaded the child items yet. var thisTree = this; node.find(SELECTORS.UNLOADED_AJAX_ITEM).each(function() { var unloadedNode = $(this); // Collapse and then expand to trigger the ajax loading. thisTree.collapseGroup(unloadedNode); thisTree.expandGroup(unloadedNode); }); }; /** * Removes all child DOM elements of the given node from the tab order. * * @method removeAllFromTabOrder * @param {object} node jquery object representing a node. */ Tree.prototype.removeAllFromTabOrder = function(node) { node.find('*').attr('tabindex', '-1'); this.getGroupFromItem($(node)).find('*').attr('tabindex', '-1'); }; /** * Find all child tree items from the given node and set the aria selected attribute to false. * * @method setAriaSelectedFalseOnItems * @param {object} node jquery object representing a node. */ Tree.prototype.setAriaSelectedFalseOnItems = function(node) { node.find(SELECTORS.ITEM).attr('aria-selected', 'false'); }; /** * Expand all group nodes within the tree. * * @method expandAllGroups */ Tree.prototype.expandAllGroups = function() { var thisTree = this; this.treeRoot.find(SELECTORS.CLOSED_GROUP).each(function() { var groupNode = $(this); thisTree.expandGroup($(this)).done(function() { thisTree.expandAllChildGroups(groupNode); }); }); }; /** * Find all child group nodes from the given node and expand them. * * @method expandAllChildGroups * @param {Object} item is the jquery id of the group. */ Tree.prototype.expandAllChildGroups = function(item) { var thisTree = this; this.getGroupFromItem(item).find(SELECTORS.CLOSED_GROUP).each(function() { var groupNode = $(this); thisTree.expandGroup($(this)).done(function() { thisTree.expandAllChildGroups(groupNode); }); }); }; /** * Expand a collapsed group. * * Handles expanding nodes that are ajax loaded (marked with a data-requires-ajax attribute). * * @method expandGroup * @param {Object} item is the jquery id of the parent item of the group. * @return {Object} a promise that is resolved when the group has been expanded. */ Tree.prototype.expandGroup = function(item) { var promise = $.Deferred(); // Ignore nodes that are explicitly maked as not expandable or are already expanded. if (item.attr('data-expandable') !== 'false' && this.isGroupCollapsed(item)) { // If this node requires ajax load and we haven't already loaded it. if (item.attr('data-requires-ajax') === 'true' && item.attr('data-loaded') !== 'true') { item.attr('data-loaded', false); // Get the closes ajax loading module specificed in the tree. var moduleName = item.closest('[data-ajax-loader]').attr('data-ajax-loader'); var thisTree = this; // Flag this node as loading. item.addClass('loading'); // Require the ajax module (must be AMD) and try to load the items. require([moduleName], function(loader) { // All ajax module must implement a "load" method. loader.load(item).done(function() { item.attr('data-loaded', true); // Set defaults on the newly constructed part of the tree. thisTree.initialiseNodes(item); thisTree.finishExpandingGroup(item); // Make sure no child elements of the item we just loaded are tabbable. item.removeClass('loading'); promise.resolve(); }); }); } else { this.finishExpandingGroup(item); promise.resolve(); } } else { promise.resolve(); } return promise; }; /** * Perform the necessary DOM changes to display a group item. * * @method finishExpandingGroup * @param {Object} item is the jquery id of the parent item of the group. */ Tree.prototype.finishExpandingGroup = function(item) { // Expand the group. var group = this.getGroupFromItem(item); group.attr('aria-hidden', 'false'); item.attr('aria-expanded', 'true'); // Update the list of visible items. this.refreshVisibleItemsCache(); }; /** * Collapse an expanded group. * * @method collapseGroup * @param {Object} item is the jquery id of the parent item of the group. */ Tree.prototype.collapseGroup = function(item) { // If the item is not collapsible or already collapsed then do nothing. if (!this.isGroupCollapsible(item) || this.isGroupCollapsed(item)) { return; } // Collapse the group. var group = this.getGroupFromItem(item); group.attr('aria-hidden', 'true'); item.attr('aria-expanded', 'false'); // Update the list of visible items. this.refreshVisibleItemsCache(); }; /** * Expand or collapse a group. * * @method toggleGroup * @param {Object} item is the jquery id of the parent item of the group. */ Tree.prototype.toggleGroup = function(item) { if (item.attr('aria-expanded') === 'true') { this.collapseGroup(item); } else { this.expandGroup(item); } }; /** * Handle a key down event - ie navigate the tree. * * @method handleKeyDown * @param {Object} item is the jquery id of the parent item of the group. * @param {Event} e The event. * @return {Boolean} */ // This function should be simplified. In the meantime.. // eslint-disable-next-line complexity Tree.prototype.handleKeyDown = function(item, e) { var currentIndex = this.getVisibleItems().index(item); if ((e.altKey || e.ctrlKey || e.metaKey) || (e.shiftKey && e.keyCode != this.keys.tab)) { // Do nothing. return true; } switch (e.keyCode) { case this.keys.home: { // Jump to first item in tree. this.getVisibleItems().first().focus(); e.stopPropagation(); return false; } case this.keys.end: { // Jump to last visible item. this.getVisibleItems().last().focus(); e.stopPropagation(); return false; } case this.keys.enter: { var links = item.children('a').length ? item.children('a') : item.children().not(SELECTORS.GROUP).find('a'); if (links.length) { // See if we have a callback. if (typeof this.enterCallback === 'function') { this.enterCallback(item); } else { window.location.href = links.first().attr('href'); } } else if (this.isGroupItem(item)) { this.toggleGroup(item, true); } e.stopPropagation(); return false; } case this.keys.space: { if (this.isGroupItem(item)) { this.toggleGroup(item, true); } e.stopPropagation(); return false; } case this.keys.left: { var focusParent = function(tree) { // Get the immediate visible parent group item that contains this element. tree.getVisibleItems().filter(function() { return tree.getGroupFromItem($(this)).has(item).length; }).focus(); }; // If this is a goup item then collapse it and focus the parent group // in accordance with the aria spec. if (this.isGroupItem(item)) { if (this.isGroupCollapsed(item)) { focusParent(this); } else { this.collapseGroup(item); } } else { focusParent(this); } e.stopPropagation(); return false; } case this.keys.right: { // If this is a group item then expand it and focus the first child item // in accordance with the aria spec. if (this.isGroupItem(item)) { if (this.isGroupCollapsed(item)) { this.expandGroup(item); } else { // Move to the first item in the child group. this.getGroupFromItem(item).find(SELECTORS.ITEM).first().focus(); } } e.stopPropagation(); return false; } case this.keys.up: { if (currentIndex > 0) { var prev = this.getVisibleItems().eq(currentIndex - 1); prev.focus(); } e.stopPropagation(); return false; } case this.keys.down: { if (currentIndex < this.getVisibleItems().length - 1) { var next = this.getVisibleItems().eq(currentIndex + 1); next.focus(); } e.stopPropagation(); return false; } case this.keys.asterisk: { // Expand all groups. this.expandAllGroups(); e.stopPropagation(); return false; } } return true; }; /** * Handle a click (select). * * @method handleClick * @param {Object} item The jquery id of the parent item of the group. * @param {Event} e The event. * @return {Boolean} */ Tree.prototype.handleClick = function(item, e) { if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) { // Do nothing. return true; } // Update the active item. item.focus(); // If the item is a group node. if (this.isGroupItem(item)) { this.toggleGroup(item); } e.stopPropagation(); return true; }; /** * Handle a focus event. * * @method handleFocus * @param {Object} item The jquery id of the parent item of the group. * @param {Event} e The event. * @return {Boolean} */ Tree.prototype.handleFocus = function(item, e) { this.setActiveItem(item); e.stopPropagation(); return true; }; /** * Bind the event listeners we require. * * @method bindEventHandlers */ Tree.prototype.bindEventHandlers = function() { var thisObj = this; // Bind event handlers to the tree items. Use event delegates to allow // for dynamically loaded parts of the tree. this.treeRoot.on({ click: function(e) { return thisObj.handleClick($(this), e); }, keydown: function(e) { return thisObj.handleKeyDown($(this), e); }, focus: function(e) { return thisObj.handleFocus($(this), e); }, }, SELECTORS.ITEM); }; return /** @alias module:tool_lp/tree */ Tree; });
Close