chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:12:17 +08:00
commit cf8edb9f21
44281 changed files with 1655134 additions and 0 deletions
@@ -0,0 +1,12 @@
/**
* @preserve
* Project: Bootstrap Hover Dropdown
* Author: Cameron Spear
* Version: v2.1.3
* Contributors: Mattia Larentis
* Dependencies: Bootstrap's Dropdown plugin, jQuery
* Description: A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
* License: MIT
* Homepage: http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
*/
!function(e,n){var o=e();e.fn.dropdownHover=function(t){return"ontouchstart"in document?this:(o=o.add(this.parent()),this.each(function(){function r(){n.clearTimeout(a),n.clearTimeout(i),i=n.setTimeout(function(){o.find(":focus").blur(),f.instantlyCloseOthers===!0&&o.removeClass("open"),n.clearTimeout(i),d.attr("aria-expanded","true"),s.addClass("open"),d.trigger(l)},f.hoverDelay)}var a,i,d=e(this),s=d.parent(),u={delay:500,hoverDelay:0,instantlyCloseOthers:!0},h={delay:e(this).data("delay"),hoverDelay:e(this).data("hover-delay"),instantlyCloseOthers:e(this).data("close-others")},l="show.bs.dropdown",c="hide.bs.dropdown",f=e.extend(!0,{},u,t,h);s.hover(function(e){return s.hasClass("open")||d.is(e.target)?void r(e):!0},function(){n.clearTimeout(i),a=n.setTimeout(function(){d.attr("aria-expanded","false"),s.removeClass("open"),d.trigger(c)},f.delay)}),d.hover(function(e){return s.hasClass("open")||s.is(e.target)?void r(e):!0}),s.find(".dropdown-submenu").each(function(){var o,t=e(this);t.hover(function(){n.clearTimeout(o),t.children(".dropdown-menu").show(),t.siblings().children(".dropdown-menu").hide()},function(){var e=t.children(".dropdown-menu");o=n.setTimeout(function(){e.hide()},f.delay)})})}))},e(document).ready(function(){e('[data-hover="dropdown"]').dropdownHover()})}(jQuery,window);
@@ -0,0 +1,80 @@
/*
Jeroen's Chmod Calculator- By Jeroen Vermeulen of Alphamega Hosting <jeroen@alphamegahosting.com>
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact
*/
function octalchange()
{
var val = document.chmod.t_total.value;
var extrabin = parseInt(val.charAt(0)).toString(2);
while (extrabin.length<2) { extrabin="0"+extrabin; };
var ownerbin = parseInt(val.charAt(1)).toString(2);
while (ownerbin.length<4) { ownerbin="0"+ownerbin; };
var groupbin = parseInt(val.charAt(2)).toString(2);
while (groupbin.length<4) { groupbin="0"+groupbin; };
var otherbin = parseInt(val.charAt(3)).toString(2);
while (otherbin.length<4) { otherbin="0"+otherbin; };
document.chmod.sticky.checked = parseInt(extrabin.charAt(1));
document.chmod.setgid.checked = parseInt(extrabin.charAt(0));
document.chmod.owner4.checked = parseInt(ownerbin.charAt(1));
document.chmod.owner2.checked = parseInt(ownerbin.charAt(2));
document.chmod.owner1.checked = parseInt(ownerbin.charAt(3));
document.chmod.group4.checked = parseInt(groupbin.charAt(1));
document.chmod.group2.checked = parseInt(groupbin.charAt(2));
document.chmod.group1.checked = parseInt(groupbin.charAt(3));
document.chmod.other4.checked = parseInt(otherbin.charAt(1));
document.chmod.other2.checked = parseInt(otherbin.charAt(2));
document.chmod.other1.checked = parseInt(otherbin.charAt(3));
calc_chmod(1);
};
function calc_chmod(nototals)
{
var users = new Array("owner", "group", "other");
var totals = new Array("","","","");
var syms = new Array("","","");
if (document.chmod['sticky'].checked == true) { totals[0] = 1; } else { totals[0] = 0; }
if (document.chmod['setgid'].checked == true) { totals[0] = totals[0] + 2; }
for (var i=0; i<users.length; i++)
{
var user=users[i];
var field4 = user + "4";
var field2 = user + "2";
var field1 = user + "1";
//var total = "t_" + user;
var symbolic = "sym_" + user;
var number = 0;
var sym_string = "";
if (document.chmod[field4].checked == true) { number += 4; }
if (document.chmod[field2].checked == true) { number += 2; }
if (document.chmod[field1].checked == true) { number += 1; }
if (document.chmod[field4].checked == true) {
sym_string += "r";
} else {
sym_string += "-";
}
if (document.chmod[field2].checked == true) {
sym_string += "w";
} else {
sym_string += "-";
}
if (document.chmod[field1].checked == true) {
sym_string += "x";
} else {
sym_string += "-";
}
totals[i + 1] = totals[i + 1]+number;
syms[i] = syms[i]+sym_string;
};
if (!nototals) document.chmod.t_total.value = totals[0] + totals[1] + totals[2] + totals[3];
document.chmod.sym_total.value = "-" + syms[0] + syms[1] + syms[2];
}
window.onload=octalchange
+475
View File
@@ -0,0 +1,475 @@
$( document ).ready(function() {
/*
$( "input[title]" ).tooltip({
position: {
my: "left top",
at: "right+5 top-5"
}
});
/*
$( "a[title]" ).tooltip({
position: {
my: "bottom center",
at: "bottom+30"
}
});*/
$('tr').removeAttr('onmouseover');
$('tr').removeAttr('onmouseout');
$('input').removeAttr('onclick');
$('._select-unselect_').change(function() { selectUnselect($(this)); });
// BUTTONS
$('.fg-button').hover(
function(){ $(this).removeClass('ui-state-default').addClass('ui-state-focus'); },
function(){ $(this).removeClass('ui-state-focus').addClass('ui-state-default'); }
);
// MENUS
$('#flat').menu({
content: $('#flat').next().html(), // grab content from this page
showSpeed: 100
});
});
window.onload = function() {
var checkboxes = document.getElementsByClassName('ui_checkbox');
for(var i = 0; i < checkboxes.length; i++) {
checkboxes[i].onclick = function() {
var row = this.parentNode.parentNode;
if (this.checked) {
row.className = row.className + ' checked';
}
else {
row.className = row.className.replace(' checked', '');
}
};
}
}
function countUploads(files) {
if(files.files.length = 0) return;
var info = '';
for (i = 0; i < files.files.length; i++) {
info += files.files[i].name + '<br>';
}
$('#readyForUploadList').html(info);
}
function selectAll() {
var rows = document.getElementsByClassName('ui_checked_columns');
for (i = 0; i < rows.length; i++) {
var input = rows[i].getElementsByTagName('input')[0];
if (!input.checked) {
rowClick(rows[i]);
}
}
}
function invertSelection() {
var rows = document.getElementsByClassName('ui_checked_columns');
for (i = 0; i < rows.length; i++)
rowClick(rows[i]);
}
function compressDialog() {
if(checkSelected()) {
$( "#compressDialog" ).dialog({
modal: true,
buttons: {
"Compress": function() {
compressSelected();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
}
function compressSelected() {
var filename = $('#compressSelectedForm input[name=filename]').val();
if (filename != null && filename != "") {
var method = $('#compressSelectedForm select[name=method] option:selected').val();
$('#list_form').attr('action', "compress.cgi?arch=" + filename + "&method=" + method);
$('#list_form').submit();
}
}
function removeSelected() {
if(checkSelected()) {
$('#items-to-remove').html('');
$(".ui_checked_checkbox input[type='checkbox']:checked").each(function() {
$('#items-to-remove').append($(this).val() + '<br>');
});
$( "#removeDialog" ).dialog({
modal: true,
buttons: {
"YES": function() {
document.forms['list_form'].action = "delete.cgi";
document.forms['list_form'].submit();
},
"NO": function() {
$( this ).dialog( "close" );
}
}
});
}
}
function chmodDialog() {
if(checkSelected()) {
$( "#chmodDialog" ).dialog({
modal: true,
minWidth: 550,
buttons: {
"Change": function() {
chmodSelected();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
}
function chmodSelected() {
var perms = $('#perms').val();
if (perms != null && perms != "") {
var applyto = $('#chmodForm select[name=applyto] option:selected').val();
$('#list_form').attr('action', "chmod.cgi?perms=" + perms + "&applyto=" + applyto);
$('#list_form').submit();
}
}
function chownDialog() {
if(checkSelected()) {
$( "#chownDialog" ).dialog({
modal: true,
buttons: {
"Change": function() {
chownSelected();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
}
function chownSelected() {
var owner = $('#chownForm input[name=owner]').val();
var group = $('#chownForm input[name=group]').val();
var recursive = $('#chown-recursive').prop('checked');
if (owner != null && owner != "" && group != null && group != "") {
$('#list_form').attr('action', "chown.cgi?owner=" + owner + "&group=" + group + "&recursive=" + recursive);
$('#list_form').submit();
}
}
function chattrDialog() {
if(checkSelected()) {
$( "#chattrDialog" ).dialog({
modal: true,
buttons: {
"Change": function() {
chattrSelected();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
}
function chattrSelected() {
var label = $('#chattrForm input[name=label]').val(),
recursive = $('#chattr-recursive').prop('checked');
if (label != null && label != "") {
$('#list_form').attr('action', "chattr.cgi?label=" + encodeURIComponent(label) + "&recursive=" + recursive);
$('#list_form').submit();
}
}
function chconDialog() {
if(checkSelected()) {
$( "#chconDialog" ).dialog({
modal: true,
buttons: {
"Change": function() {
chconSelected();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
}
function chconSelected() {
var label = $('#chconForm input[name=label]').val(),
recursive = $('#chcon-recursive').prop('checked');
if (label != null && label != "") {
$('#list_form').attr('action', "chcon.cgi?label=" + label + "&recursive=" + recursive);
$('#list_form').submit();
}
}
function aclsDialog() {
if(checkSelected()) {
$( "#aclsDialog" ).dialog({
modal: true,
buttons: {
"Change": function() {
aclsSelected();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
}
function aclsSelected() {
var aclsForm = $('#aclsForm').serialize();
$('#list_form').attr('action', "setfacl.cgi?" + aclsForm);
$('#list_form').submit();
}
function renameDialog(file) {
$("#renameForm input[name=name]").val(file);
$("#renameForm input[name=file]").val(file);
$( "#renameDialog" ).dialog({
modal: true,
buttons: {
"Rename": function() {
renameSelected();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
function renameSelected() {
var name = $('#renameForm input[name=name]').val();
var file = $('#renameForm input[name=file]').val();
if (name != null && name != "" && name != file) {
$('#renameForm').submit();
}
}
function copySelected() {
if(checkSelected()) {
document.forms['list_form'].action = "copy.cgi";
document.forms['list_form'].submit();
}
}
function cutSelected() {
if(checkSelected()) {
document.forms['list_form'].action = "cut.cgi";
document.forms['list_form'].submit();
}
}
function viewReadyForUpload() {
$( "#readyForUploadDialog" ).dialog({
modal: true,
buttons: {
"OK": function() {
uploadFiles();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
function browseForUpload() {
var files = document.getElementById('upfiles');
files.click();
return true;
}
function uploadFiles() {
var files = document.getElementById('upfiles');
if (files.files.length > 0)
$('#upload-form').submit();
else
files.click();
}
function createFolderDialog() {
$( "#createFolderDialog" ).dialog({
modal: true,
buttons: {
"Create": function() {
createFolder();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
function createFolder() {
var name = $('#createFolderForm input[name=name]').val();
if (name != null && name != "")
$("#createFolderForm").submit();
else {
/* var tooltip = $('#createFolderForm input[name=name]').tooltip({
position: {
my: "left top",
at: "right+5 top-5"
}
});
tooltip.tooltip('open');*/
$('#createFolderForm input[name=name]').tooltip('open');
}
}
function createFileDialog() {
$( "#createFileDialog" ).dialog({
modal: true,
buttons: {
"Create": function() {
createFile();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
function createFile() {
var name = $('#createFileForm input[name=name]').val();
if (name != null && name != "") {
$("#createFileForm").submit();
}
}
function downFromUrlDialog() {
$( "#downFromUrlDialog" ).dialog({
modal: true,
buttons: {
"Download": function() {
downFromUrl();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
function downFromUrl() {
var link = $('#downFromUrlForm input[name=link]').val();
if (link != null && link != "")
$('#downFromUrlForm').submit();
}
function selectUnselect(cb) {
var rows = $('.ui_checked_columns');
for (i = 0; i < rows.length; i++) {
switch(cb.is(":checked")) {
case true:
selectRow(rows[i]);
break;
case false:
unselectRow(rows[i]);
break;
}
}
}
function rowClick(row) {
var input = row.getElementsByTagName('input')[0];
input.checked = !input.checked;
if (input.checked) {
row.className = row.className + ' checked';
}
else {
row.className = row.className.replace(' checked', '');
}
}
function selectRow(row) {
var input = row.getElementsByTagName('input')[0];
if(!input.checked) {
input.checked = true;
row.className = row.className + ' checked';
}
}
function unselectRow(row) {
var input = row.getElementsByTagName('input')[0];
if(input.checked) {
input.checked = false;
row.className = row.className.replace(' checked', '');
}
}
function checkSelected() {
var checkboxes = $('.ui_checkbox');
for(var i = 0; i < checkboxes.length; i++) {
if(checkboxes[i].checked) return true;
}
$( "#nothingSelected" ).dialog({
modal: true,
buttons: {
"OK": function() {
$( this ).dialog( "close" );
}
}
});
return false;
}
function searchDialog() {
$( "#searchDialog" ).dialog({
modal: true,
buttons: {
"Search": function() {
search();
},
"Cancel": function() {
$( this ).dialog( "close" );
}
}
});
}
function search() {
var query = $('#searchForm input[name=query]').val();
if (query != null && query != "")
$("#searchForm").submit();
}
/*
function checkSelected() {
var checkboxes = document.getElementsByClassName('ui_checkbox');
for(var i = 0; i < checkboxes.length; i++) {
if(checkboxes[i].checked) return true;
}
alert('Nothing selected');
return false;
}
*/
+362
View File
@@ -0,0 +1,362 @@
function countUploads(files) {
if(files.files.length = 0) return;
var info = '';
for (i = 0; i < files.files.length; i++) {
info += files.files[i].name + '<br>';
}
$('#readyForUploadList').html(info);
}
function invertSelection() {
var rows = document.getElementsByClassName('ui_checked_columns');
for (i = 0; i < rows.length; i++)
rowClick(rows[i]);
}
function selectAll() {
var rows = document.getElementsByClassName('ui_checked_columns');
for (i = 0; i < rows.length; i++) {
var input = rows[i].getElementsByTagName('input')[0];
if (!input.checked) {
rowClick(rows[i]);
}
}
}
function invertSelection() {
var rows = document.getElementsByClassName('ui_checked_columns');
for (i = 0; i < rows.length; i++)
rowClick(rows[i]);
}
function compressDialog() {
if(checkSelected())
$("#compressDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function compressSelected() {
var filename = $('#compressSelectedForm input[name=filename]').val();
if (filename != null && filename != "") {
var method = $('#compressSelectedForm select[name=method] option:selected').val();
$('#list_form').attr('action', "compress.cgi?arch=" + filename + "&method=" + method);
$('#list_form').submit();
} else {
$('#compressSelectedForm input[name=filename]').popover('show');
$('#compressSelectedForm input[name=filename]').focus();
}
}
function removeDialog() {
if(checkSelected()) {
$('#items-to-remove').html('');
$(".ui_checked_checkbox input[type='checkbox']:checked").each(function() {
$('#items-to-remove').append($(this).val() + '<br>');
});
$("#removeDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
}
function removeSelected() {
$('#list_form').attr('action', "delete.cgi");
$('#list_form').submit();
}
function chmodDialog() {
if(checkSelected())
$("#chmodDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function chmodSelected() {
var perms = $('#perms').val();
var recursive = $('#recursive').prop('checked');
if (perms != null && perms != "") {
var applyto = $('#chmodForm select[name=applyto] option:selected').val();
$('#list_form').attr('action', "chmod.cgi?perms=" + perms + "&applyto=" + applyto);
$('#list_form').submit();
}
}
function chownDialog() {
if(checkSelected())
$("#chownDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function chownSelected() {
var owner = $('#chownForm input[name=owner]').val();
var group = $('#chownForm input[name=group]').val();
var recursive = $('#chown-recursive').prop('checked');
if (owner == null || owner == "") {
$('#chownForm input[name=owner]').popover('show');
$('#chownForm input[name=owner]').focus();
}
if (group == null || group == "") {
$('#chownForm input[name=group]').popover('show');
$('#chownForm input[name=group]').focus();
}
if (owner != null && owner != "" && group != null && group != "") {
$('#list_form').attr('action', "chown.cgi?owner=" + owner + "&group=" + group + "&recursive=" + recursive);
$('#list_form').submit();
}
}
function chattrDialog() {
if(checkSelected())
$("#chattrDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function chattrSelected() {
var label = $('#chattrForm input[name=label]').val();
var recursive = $('#chattr-recursive').prop('checked');
if (label == null || label == "") {
$('#chattrForm input[name=label]').focus();
} else if (label != null && label != "" ) {
$('#list_form').attr('action', "chattr.cgi?label=" + encodeURIComponent(label) + "&recursive=" + recursive);
$('#list_form').submit();
}
}
function chconDialog() {
if(checkSelected())
$("#chconDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function chconSelected() {
var label = $('#chconForm input[name=label]').val();
var recursive = $('#chcon-recursive').prop('checked');
if (label == null || label == "") {
$('#chconForm input[name=label]').focus();
} else if (label != null && label != "" ) {
$('#list_form').attr('action', "chcon.cgi?label=" + label + "&recursive=" + recursive);
$('#list_form').submit();
}
}
function aclsDialog() {
if(checkSelected())
$("#aclsDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function aclsSelected() {
var aclsForm = $('#aclsForm').serialize();
$('#list_form').attr('action', "setfacl.cgi?" + aclsForm);
$('#list_form').submit();
}
function renameDialog(file) {
$("#renameForm input[name=name]").val(file);
$("#renameForm input[name=file]").val(file);
$("#renameDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function renameSelected() {
var name = $('#renameForm input[name=name]').val();
var file = $('#renameForm input[name=file]').val();
if (name != null && name != "" && name != file) {
$('#renameForm').submit();
} else {
$('#renameForm input[name=name]').popover('show');
$('#renameForm input[name=name]').focus();
}
}
function copySelected() {
if(checkSelected()) {
document.forms['list_form'].action = "copy.cgi";
document.forms['list_form'].submit();
}
}
function cutSelected() {
if(checkSelected()) {
document.forms['list_form'].action = "cut.cgi";
document.forms['list_form'].submit();
}
}
function browseForUpload() {
$('#upfiles').click();
return true;
}
function uploadFiles() {
var files = document.getElementById('upfiles');
if (files.files.length > 0)
$('#upload-form').submit();
else
files.click();
}
function createFolderDialog() {
$("#createFolderDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function createFolder() {
var name = $('#createFolderForm input[name=name]').val();
if (name != null && name != "")
$("#createFolderForm").submit();
else {
$('#createFolderForm input[name=name]').popover('show');
$('#createFolderForm input[name=name]').focus();
}
}
function createFileDialog(path) {
$("#createFileDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function createFile() {
var name = $('#createFileForm input[name=name]').val();
if (name != null && name != "")
$("#createFileForm").submit();
else {
$('#createFileForm input[name=name]').popover('show');
$('#createFileForm input[name=name]').focus();
}
}
function downFromUrlDialog() {
$("#downFromUrlDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function downFromUrl(path) {
var link = $('#downFromUrlForm input[name=link]').val();
if (link != null && link != "")
$('#downFromUrlForm').submit();
else {
$('#downFromUrlForm input[name=link]').popover('show');
$('#downFromUrlForm input[name=link]').focus();
}
}
function selectUnselect(cb) {
var rows = document.getElementsByClassName('ui_checked_columns');
for (i = 0; i < rows.length; i++) {
switch(cb.checked) {
case true:
selectRow(rows[i]);
break;
case false:
unselectRow(rows[i]);
break;
}
}
}
function rowClick(row) {
var input = row.getElementsByTagName('input')[0];
input.checked = !input.checked;
if (input.checked) {
row.className = row.className + ' hl-aw';
}
else {
row.className = row.className.replace(' hl-aw', '');
}
}
function selectRow(row) {
var input = row.getElementsByTagName('input')[0];
if(!input.checked) {
input.checked = true;
row.className = row.className + ' hl-aw';
}
}
function unselectRow(row) {
var input = row.getElementsByTagName('input')[0];
if(input.checked) {
input.checked = false;
row.className = row.className.replace(' hl-aw', '');
}
}
function viewReadyForUpload() {
$("#readyForUploadDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function checkSelected() {
var checkboxes = $(".ui_checked_checkbox input[type='checkbox']:checked");
if(checkboxes.length == 0) {
$("#nothingSelected").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
return false
}
return true;
}
function searchDialog() {
$("#searchDialog").modal({
"backdrop" : "static",
"keyboard" : true,
"show" : true
});
}
function search() {
var query = $('#searchForm input[name=query]').val();
if (query != null && query != "")
$("#searchForm").submit();
else {
$('#searchForm input[name=query]').popover('show');
$('#searchForm input[name=query]').focus();
}
}