* Mon May 12 2025 Brian Read <brianr@koozali.org> 11.0.0-1.sme
- Adding SM2 panel [SME: 13004] - Upgrade to phpsysinfo 3.4.4 - Add code to delete inline styles and add css to make it look better. - version saved / built uses the static version, which means no drops downs and choices.
This commit is contained in:
43
root/opt/phpsysinfo/js/vendor/README
vendored
43
root/opt/phpsysinfo/js/vendor/README
vendored
@@ -1,37 +1,58 @@
|
||||
versions, links and simple description of used jquery files
|
||||
===========================================================
|
||||
|
||||
bootstrap.min.js
|
||||
bootstrap-modal.js
|
||||
---------
|
||||
VERSION : 3.3.5
|
||||
URL : http://getbootstrap.com/
|
||||
VERSION : 4.3.1
|
||||
URL : https://getbootstrap.com/
|
||||
DESC : Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web
|
||||
USED : used for the entire bootstrap userinterface
|
||||
|
||||
bootstrap-util.js
|
||||
---------
|
||||
VERSION : 4.3.1
|
||||
URL : https://getbootstrap.com/
|
||||
DESC : Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web
|
||||
USED : used for the entire bootstrap userinterface
|
||||
|
||||
transparency.js
|
||||
---------
|
||||
VERSION : 0.10.0
|
||||
URL : http://leonidas.github.io/transparency/
|
||||
URL : https://leonidas.github.io/transparency/
|
||||
DESC : Transparency is a minimal template engine for jQuery. It maps JSON objects to DOM elements with zero configuration. Just call .render()
|
||||
USED : used for the entire bootstrap userinterface
|
||||
|
||||
html5shiv-printshiv.js
|
||||
---------
|
||||
VERSION : 3.7.2
|
||||
URL : https://code.google.com/p/html5shiv-printshiv/
|
||||
DESC : Enabling HTML5 Shiv Script and Print Support on old IE6-9 Browser Safari 4.x and Firefox 3.x
|
||||
VERSION : 3.7.3
|
||||
URL : https://github.com/aFarkas/html5shiv/
|
||||
DESC : Enabling HTML5 Shiv Script and Print Support on old IE6-9 Browser, Safari 4.x and Firefox 3.x
|
||||
USED : used for the entire bootstrap userinterface
|
||||
|
||||
console-shim.js
|
||||
---------
|
||||
VERSION :
|
||||
URL : https://github.com/liamnewmarch/console-shim
|
||||
VERSION :
|
||||
URL : https://github.com/liamnewmarch/console-shim/
|
||||
DESC : Shim to make browsers store console messages without Dev Tools open (e.g. IE9)
|
||||
USED : used for the entire bootstrap userinterface
|
||||
|
||||
sorttable.js
|
||||
---------
|
||||
VERSION : 2+2014.12.25.12_fix
|
||||
URL : http://www.kryogenix.org/code/browser/sorttable/
|
||||
VERSION : 2+2014.12.25.12_fix-noinit-noforeach
|
||||
URL : https://www.kryogenix.org/code/browser/sorttable/
|
||||
DESC : Make all your tables sortable
|
||||
USED : used for the entire bootstrap userinterface
|
||||
|
||||
bootstrap-ie8.js
|
||||
---------
|
||||
VERSION : 4.3.100
|
||||
URL : https://namiltd.github.io/bootstrap-ie/
|
||||
DESC : Bootstrap 4 compatibility module for IE8
|
||||
USED : used for the entire bootstrap userinterface on IE8
|
||||
|
||||
bootstrap-ie9.js
|
||||
---------
|
||||
VERSION : 4.3.100
|
||||
URL : https://namiltd.github.io/bootstrap-ie/
|
||||
DESC : Bootstrap 4 compatibility module for IE9
|
||||
USED : used for the entire bootstrap userinterface on IE9
|
||||
|
707
root/opt/phpsysinfo/js/vendor/bootstrap-ie8.js
vendored
Normal file
707
root/opt/phpsysinfo/js/vendor/bootstrap-ie8.js
vendored
Normal file
@@ -0,0 +1,707 @@
|
||||
/* Bootstrap 4 for IE8 - v4.3.100 */
|
||||
/* https://github.com/namiltd/bootstrap-ie */
|
||||
|
||||
// create the nodeType constants if the Node object is not defined
|
||||
if (!window.Node){
|
||||
var Node = {
|
||||
ELEMENT_NODE : 1,
|
||||
ATTRIBUTE_NODE : 2,
|
||||
TEXT_NODE : 3,
|
||||
CDATA_SECTION_NODE : 4,
|
||||
ENTITY_REFERENCE_NODE : 5,
|
||||
ENTITY_NODE : 6,
|
||||
PROCESSING_INSTRUCTION_NODE : 7,
|
||||
COMMENT_NODE : 8,
|
||||
DOCUMENT_NODE : 9,
|
||||
DOCUMENT_TYPE_NODE : 10,
|
||||
DOCUMENT_FRAGMENT_NODE : 11,
|
||||
NOTATION_NODE : 12
|
||||
};
|
||||
}
|
||||
|
||||
(function() {
|
||||
if (!Object.keys) {
|
||||
Object.keys = function(obj) {
|
||||
if (obj !== Object(obj)) {
|
||||
throw new TypeError('Object.keys called on a non-object');
|
||||
}
|
||||
|
||||
var keys = [];
|
||||
|
||||
for (var i in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, i)) {
|
||||
keys.push(i);
|
||||
}
|
||||
}
|
||||
|
||||
return keys;
|
||||
};
|
||||
}
|
||||
}());
|
||||
|
||||
(function() {
|
||||
if (!Object.create) {
|
||||
Object.create = function(proto, props) {
|
||||
if (typeof props !== "undefined") {
|
||||
throw "The multiple-argument version of Object.create is not provided by this browser and cannot be shimmed.";
|
||||
}
|
||||
function ctor() { }
|
||||
ctor.prototype = proto;
|
||||
|
||||
return new ctor();
|
||||
};
|
||||
}
|
||||
}());
|
||||
|
||||
(function() {
|
||||
if (!Array.prototype.forEach) {
|
||||
Array.prototype.forEach = function(fn, scope) {
|
||||
for(var i = 0, len = this.length; i < len; ++i) {
|
||||
fn.call(scope, this[i], i, this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}());
|
||||
|
||||
// ES 15.2.3.6 Object.defineProperty ( O, P, Attributes )
|
||||
// Partial support for most common case - getters, setters, and values
|
||||
(function() {
|
||||
if (!Object.defineProperty ||
|
||||
!(function () { try { Object.defineProperty({}, 'x', {}); return true; } catch (e) { return false; } } ())) {
|
||||
var orig = Object.defineProperty;
|
||||
Object.defineProperty = function (o, prop, desc) {
|
||||
// In IE8 try built-in implementation for defining properties on DOM prototypes.
|
||||
if (orig) { try { return orig(o, prop, desc); } catch (e) {} }
|
||||
|
||||
if (o !== Object(o)) { throw TypeError("Object.defineProperty called on non-object"); }
|
||||
if (Object.prototype.__defineGetter__ && ('get' in desc)) {
|
||||
Object.prototype.__defineGetter__.call(o, prop, desc.get);
|
||||
}
|
||||
if (Object.prototype.__defineSetter__ && ('set' in desc)) {
|
||||
Object.prototype.__defineSetter__.call(o, prop, desc.set);
|
||||
}
|
||||
if ('value' in desc) {
|
||||
o[prop] = desc.value;
|
||||
}
|
||||
|
||||
return o;
|
||||
};
|
||||
}
|
||||
}());
|
||||
|
||||
(function() {
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function (oThis) {
|
||||
if (typeof this !== "function") {
|
||||
// closest thing possible to the ECMAScript 5 internal IsCallable function
|
||||
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
|
||||
}
|
||||
|
||||
var aArgs = Array.prototype.slice.call(arguments, 1),
|
||||
fToBind = this,
|
||||
fNOP = function () {},
|
||||
fBound = function () {
|
||||
return fToBind.apply(this instanceof fNOP && oThis ? this: oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
|
||||
};
|
||||
|
||||
fNOP.prototype = this.prototype;
|
||||
fBound.prototype = new fNOP();
|
||||
|
||||
return fBound;
|
||||
};
|
||||
}
|
||||
}());
|
||||
|
||||
(function() {
|
||||
if (!Array.prototype.indexOf) {
|
||||
Array.prototype.indexOf = function(elt /*, from*/) {
|
||||
var len = this.length >>> 0;
|
||||
|
||||
var from = Number(arguments[1]) || 0;
|
||||
from = (from < 0) ? Math.ceil(from) : Math.floor(from);
|
||||
if (from < 0) {
|
||||
from += len;
|
||||
}
|
||||
for (; from < len; from++) {
|
||||
if (from in this && this[from] === elt) {
|
||||
return from;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
};
|
||||
}
|
||||
}());
|
||||
|
||||
(function() {
|
||||
var _slice = Array.prototype.slice;
|
||||
Array.prototype.slice = function() {
|
||||
if(this instanceof Array) {
|
||||
return _slice.apply(this, arguments);
|
||||
} else {
|
||||
var result = [];
|
||||
var start = (arguments.length >= 1) ? arguments[0] : 0;
|
||||
var end = (arguments.length >= 2) ? arguments[1] : this.length;
|
||||
for(var i=start; i<end; i++) {
|
||||
result.push(this[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
// adds classList support (as Array) to Element.prototype for IE8-9
|
||||
(function() {
|
||||
Object.defineProperty(Element.prototype, 'classList', {
|
||||
get:function(){
|
||||
var element=this,domTokenList=(element.getAttribute('class')||'').replace(/^\s+|\s$/g,'').split(/\s+/g);
|
||||
if (domTokenList[0]==='') domTokenList.splice(0,1);
|
||||
function setClass(){
|
||||
if (domTokenList.length > 0) element.setAttribute('class', domTokenList.join(' '));
|
||||
else element.removeAttribute('class');
|
||||
}
|
||||
domTokenList.toggle=function(className,force){
|
||||
if (force!==undefined){
|
||||
if (force) domTokenList.add(className);
|
||||
else domTokenList.remove(className);
|
||||
}
|
||||
else {
|
||||
if (domTokenList.indexOf(className)!==-1) domTokenList.splice(domTokenList.indexOf(className),1);
|
||||
else domTokenList.push(className);
|
||||
}
|
||||
setClass();
|
||||
};
|
||||
domTokenList.add=function(){
|
||||
var args=[].slice.call(arguments);
|
||||
for (var i=0,l=args.length;i<l;i++){
|
||||
if (domTokenList.indexOf(args[i])===-1) domTokenList.push(args[i]);
|
||||
}
|
||||
setClass();
|
||||
};
|
||||
domTokenList.remove=function(){
|
||||
var args=[].slice.call(arguments);
|
||||
for (var i=0,l=args.length;i<l;i++){
|
||||
if (domTokenList.indexOf(args[i])!==-1) domTokenList.splice(domTokenList.indexOf(args[i]),1);
|
||||
}
|
||||
setClass();
|
||||
};
|
||||
domTokenList.item=function(i){
|
||||
return domTokenList[i];
|
||||
};
|
||||
domTokenList.contains=function(className){
|
||||
return domTokenList.indexOf(className)!==-1;
|
||||
};
|
||||
domTokenList.replace=function(oldClass,newClass){
|
||||
if (domTokenList.indexOf(oldClass)!==-1) domTokenList.splice(domTokenList.indexOf(oldClass),1,newClass);
|
||||
setClass();
|
||||
};
|
||||
domTokenList.value = (element.getAttribute('class')||'');
|
||||
return domTokenList;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* Modified code based on remPolyfill.js (c) Nicolas Bouvrette https://github.com/nbouvrette/remPolyfill
|
||||
*
|
||||
* Customizations:
|
||||
*
|
||||
* 1) Added new method `addCallBackWhenReady` to perform callbacks once the polyfill has been applied (especially useful for
|
||||
* onload scrolling events.
|
||||
* 2) Added REM support.
|
||||
*
|
||||
**/
|
||||
|
||||
/**
|
||||
* For browsers that do not support REM units, fallback to pixels.
|
||||
*/
|
||||
window.remPolyfill = {
|
||||
|
||||
/** @property Number|null - The body's font size.
|
||||
* @private */
|
||||
bodyFontSize: null,
|
||||
|
||||
/**
|
||||
* Get the body font size.
|
||||
*
|
||||
* @returns {Number} - The body font size in pixel (number only).
|
||||
*/
|
||||
getBodyFontSize: function() {
|
||||
if (!this.bodyFontSize) {
|
||||
if (!document.body) {
|
||||
var bodyElement = document.createElement('body');
|
||||
document.documentElement.appendChild(bodyElement);
|
||||
this.bodyFontSize = parseFloat(this.getStyle(document.body, 'fontSize'));
|
||||
document.documentElement.removeChild(bodyElement);
|
||||
bodyElement = null;
|
||||
} else {
|
||||
this.bodyFontSize = parseFloat(this.getStyle(document.body, 'fontSize'));
|
||||
}
|
||||
}
|
||||
return this.bodyFontSize;
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the style of an element for a given property.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {HTMLElement} element - The HTML element.
|
||||
* @param {string} property - The property of the style to get.
|
||||
*/
|
||||
getStyle: function(element, property) {
|
||||
if (typeof window.getComputedStyle !== 'undefined') {
|
||||
return window.getComputedStyle(element, null).getPropertyValue(property);
|
||||
} else {
|
||||
return element.currentStyle[property];
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Implement this script on a given element.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {string} cssText - The CSS text of the link element.
|
||||
*/
|
||||
replaceCSS: function (cssText) {
|
||||
if (cssText) {
|
||||
// Replace all properties containing REM units with their pixel equivalents.
|
||||
return cssText.replace(
|
||||
/([\d]+\.[\d]+|\.[\d]+|[\d]+)rem/g, function (fullMatch, groupMatch) {
|
||||
return Math.round(parseFloat(groupMatch * remPolyfill.getBodyFontSize())) + 'px';}
|
||||
).replace(
|
||||
/calc\s*\(\s*\(\s*([\d]+)\s*px\s*([\+-])\s*([\d]+)\s*px\s*\)\s*\*\s*(-?[\d]+)\s*\)/g, function (fullMatch, MatchArg1, MatchSign, MatchArg2, MatchArg3) {
|
||||
return ((parseInt(MatchArg1)+(MatchSign=='-'?-1:1)*parseInt(MatchArg2))*parseInt(MatchArg3))+'px';}
|
||||
).replace(
|
||||
/calc\s*\(\s*([\d]+)\s*px\s*([\+-])\s*([\d]+)\s*px\s*\)/g, function (fullMatch, MatchArg1, MatchSign, MatchArg2) {
|
||||
return (parseInt(MatchArg1)+(MatchSign=='-'?-1:1)*parseInt(MatchArg2))+'px';}
|
||||
).replace(
|
||||
/::/g, ':'
|
||||
).replace(
|
||||
/:disabled/g, '._disabled'
|
||||
).replace(
|
||||
/:invalid/g, '._invalid'
|
||||
).replace(
|
||||
/:valid/g, '._valid'
|
||||
).replace(
|
||||
/background-color\s*:\s*rgba\s*\(\s*([\d]+)\s*,\s*([\d]+)\s*,\s*([\d]+)\s*,\s*([\d\.]+)\s*\)/g, function (fullMatch, MatchR, MatchG, MatchB, MatchA) {
|
||||
var ARGBhex = (4294967296+16777216*Math.round(parseFloat(MatchA)*255)+65536*parseInt(MatchR)+256*parseInt(MatchG)+parseInt(MatchB)).toString(16).substr(1);
|
||||
return 'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ARGBhex+', endColorstr=#'+ARGBhex+')';}
|
||||
).replace(
|
||||
/rgba\s*\(\s*([\d]+)\s*,\s*([\d]+)\s*,\s*([\d]+)\s*,\s*([\d\.]+)\s*\)/g, function (fullMatch, MatchR, MatchG, MatchB, MatchA) {
|
||||
var MR = parseInt(MatchR), MG = parseInt(MatchG), MB = parseInt(MatchB), MA = parseFloat(MatchA);
|
||||
if ((MR==255)&&(MG==255)&&(MB==255)) { //dark background
|
||||
return 'rgb(' + Math.round(MA * 255) + ', ' + Math.round(MA * 255) + ', ' + Math.round(MA * 255) +')';
|
||||
} else { //else
|
||||
return 'rgb(' + Math.round((1-MA) * 255 + MA * MR) + ', ' + Math.round((1-MA) * 255 + MA * MG) + ', ' + Math.round((1-MA) * 255 + MA * MB) +')';
|
||||
}
|
||||
}
|
||||
).replace(
|
||||
/opacity\s*:\s*([\d]+\.[\d]+|\.[\d]+|[\d]+)/g, function (fullMatch, groupMatch) {
|
||||
return 'filter:alpha(opacity=' + Math.round(parseFloat(groupMatch * 100)) + ')';}
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Implement this script on a given element.
|
||||
*
|
||||
* @param {HTMLLinkElement} linkElement - The link element to polyfill.
|
||||
*/
|
||||
implement: function (linkElement) {
|
||||
if (!linkElement.href) {
|
||||
return;
|
||||
}
|
||||
|
||||
var request = null;
|
||||
|
||||
if (window.XMLHttpRequest) {
|
||||
request = new XMLHttpRequest();
|
||||
} else if (window.ActiveXObject) {
|
||||
try {
|
||||
request = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
} catch (exception) {
|
||||
try {
|
||||
request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (exception) {
|
||||
request = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!request) {
|
||||
return;
|
||||
}
|
||||
|
||||
request.open('GET', linkElement.href, true);
|
||||
request.onreadystatechange = function() {
|
||||
if ( request.readyState === 4 ) {
|
||||
linkElement.styleSheet.cssText = remPolyfill.replaceCSS(request.responseText);
|
||||
}
|
||||
};
|
||||
|
||||
request.send(null);
|
||||
}
|
||||
};
|
||||
|
||||
var linkElements = document.querySelectorAll('link[rel=stylesheet]');
|
||||
for (var linkElementId in linkElements) {
|
||||
if (Object.prototype.hasOwnProperty.call(linkElements, linkElementId)) {
|
||||
remPolyfill.implement(linkElements[linkElementId]);
|
||||
}
|
||||
}
|
||||
|
||||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||
(function (w) {
|
||||
"use strict";
|
||||
w.matchMedia = w.matchMedia || function (doc, undefined) {
|
||||
var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild,
|
||||
fakeBody = doc.createElement("body"), div = doc.createElement("div");
|
||||
div.id = "mq-test-1";
|
||||
div.style.cssText = "position:absolute;top:-100em";
|
||||
fakeBody.style.background = "none";
|
||||
fakeBody.appendChild(div);
|
||||
return function (q) {
|
||||
div.innerHTML = '­<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>';
|
||||
docElem.insertBefore(fakeBody, refNode);
|
||||
bool = div.offsetWidth === 42;
|
||||
docElem.removeChild(fakeBody);
|
||||
return {
|
||||
matches: bool,
|
||||
media: q
|
||||
};
|
||||
};
|
||||
}(w.document);
|
||||
})(this);
|
||||
|
||||
/* Respond.js: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */
|
||||
|
||||
(function (w) {
|
||||
"use strict";
|
||||
//exposed namespace
|
||||
var respond = {};
|
||||
w.respond = respond;
|
||||
//define update even in native-mq-supporting browsers, to avoid errors
|
||||
respond.update = function () {
|
||||
};
|
||||
//define ajax obj
|
||||
var requestQueue = [],
|
||||
xmlHttp = function () {
|
||||
var xmlhttpmethod = false;
|
||||
try {
|
||||
xmlhttpmethod = new w.XMLHttpRequest();
|
||||
} catch (e) {
|
||||
xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
return function () {
|
||||
return xmlhttpmethod;
|
||||
};
|
||||
}(),
|
||||
//tweaked Ajax functions from Quirksmode
|
||||
ajax = function (url, callback) {
|
||||
var req = xmlHttp();
|
||||
if (!req) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
req.open("GET", url, true);
|
||||
req.onreadystatechange = function () {
|
||||
if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {
|
||||
return;
|
||||
}
|
||||
callback( remPolyfill.replaceCSS(req.responseText) );
|
||||
};
|
||||
if (req.readyState === 4) {
|
||||
return;
|
||||
}
|
||||
req.send(null);
|
||||
}
|
||||
catch ( e ) {
|
||||
}
|
||||
}, isUnsupportedMediaQuery = function (query) {
|
||||
return query.replace(respond.regex.minmaxwh, '').match(respond.regex.other);
|
||||
};
|
||||
//expose for testing
|
||||
respond.ajax = ajax;
|
||||
respond.queue = requestQueue;
|
||||
respond.unsupportedmq = isUnsupportedMediaQuery;
|
||||
respond.regex = {
|
||||
media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
|
||||
keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
|
||||
comments: /\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,
|
||||
urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
|
||||
findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
|
||||
only: /(only\s+)?([a-zA-Z]+)\s?/,
|
||||
minw: /\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,
|
||||
maxw: /\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,
|
||||
minmaxwh: /\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,
|
||||
other: /\([^\)]*\)/g
|
||||
};
|
||||
//expose media query support flag for external use
|
||||
respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches;
|
||||
//if media queries are supported, exit here
|
||||
if (respond.mediaQueriesSupported) {
|
||||
return;
|
||||
}
|
||||
respond.callbackQueue = [];
|
||||
respond.addCallBackWhenReady = function (callback) {
|
||||
respond.callbackQueue.push(callback);
|
||||
};
|
||||
respond.callback = function () {
|
||||
if (respond.callbackQueue.length) {
|
||||
for (var callback in respond.callbackQueue) {
|
||||
respond.callbackQueue[callback]();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//define vars
|
||||
var doc = w.document,
|
||||
docElem = doc.documentElement,
|
||||
mediastyles = [],
|
||||
rules = [],
|
||||
appendedEls = [],
|
||||
parsedSheets = {},
|
||||
resizeThrottle = 30,
|
||||
head = doc.getElementsByTagName("head")[0] || docElem,
|
||||
base = doc.getElementsByTagName("base")[0],
|
||||
links = head.getElementsByTagName("link"),
|
||||
|
||||
lastCall,
|
||||
resizeDefer,
|
||||
|
||||
//cached container for 1em value, populated the first time it's needed
|
||||
eminpx,
|
||||
|
||||
// returns the value of 1em in pixels
|
||||
getEmValue = function () {
|
||||
var ret,
|
||||
div = doc.createElement('div'),
|
||||
body = doc.body,
|
||||
originalHTMLFontSize = docElem.style.fontSize,
|
||||
originalBodyFontSize = body && body.style.fontSize,
|
||||
fakeUsed = false;
|
||||
|
||||
div.style.cssText = "position:absolute;font-size:1em;width:1em";
|
||||
if (!body) {
|
||||
body = fakeUsed = doc.createElement("body");
|
||||
body.style.background = "none";
|
||||
}
|
||||
// 1em in a media query is the value of the default font size of the browser
|
||||
// reset docElem and body to ensure the correct value is returned
|
||||
docElem.style.fontSize = "100%";
|
||||
body.style.fontSize = "100%";
|
||||
body.appendChild(div);
|
||||
if (fakeUsed) {
|
||||
docElem.insertBefore(body, docElem.firstChild);
|
||||
}
|
||||
ret = div.offsetWidth;
|
||||
if (fakeUsed) {
|
||||
docElem.removeChild(body);
|
||||
} else {
|
||||
body.removeChild(div);
|
||||
}
|
||||
// restore the original values
|
||||
docElem.style.fontSize = originalHTMLFontSize;
|
||||
if (originalBodyFontSize) {
|
||||
body.style.fontSize = originalBodyFontSize;
|
||||
}
|
||||
//also update eminpx before returning
|
||||
ret = eminpx = parseFloat(ret);
|
||||
return ret;
|
||||
},
|
||||
|
||||
//enable/disable styles
|
||||
applyMedia = function (fromResize) {
|
||||
var name = "clientWidth",
|
||||
docElemProp = docElem[name],
|
||||
currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp,
|
||||
styleBlocks = {},
|
||||
lastLink = links[links.length - 1],
|
||||
now = new Date().getTime();
|
||||
|
||||
//throttle resize calls
|
||||
|
||||
if (fromResize && lastCall && now - lastCall < resizeThrottle) {
|
||||
w.clearTimeout(resizeDefer);
|
||||
resizeDefer = w.setTimeout(applyMedia, resizeThrottle);
|
||||
return;
|
||||
} else {
|
||||
lastCall = now;
|
||||
}
|
||||
for (var i in mediastyles) {
|
||||
if (mediastyles.hasOwnProperty(i)) {
|
||||
var thisstyle = mediastyles[i],
|
||||
min = thisstyle.minw,
|
||||
max = thisstyle.maxw,
|
||||
minnull = min === null,
|
||||
maxnull = max === null,
|
||||
em = "em";
|
||||
if (!!min) {
|
||||
min = parseFloat(min) * (min.indexOf(em) > -1 ? ( eminpx || getEmValue() ) : 1);
|
||||
}
|
||||
if (!!max) {
|
||||
max = parseFloat(max) * (max.indexOf(em) > -1 ? ( eminpx || getEmValue() ) : 1);
|
||||
}
|
||||
// if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true
|
||||
if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {
|
||||
if (!styleBlocks[thisstyle.media]) {
|
||||
styleBlocks[thisstyle.media] = [];
|
||||
}
|
||||
styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);
|
||||
}
|
||||
}
|
||||
}
|
||||
//remove any existing respond style element(s)
|
||||
for (var j in appendedEls) {
|
||||
if (appendedEls.hasOwnProperty(j)) {
|
||||
if (appendedEls[j] && appendedEls[j].parentNode === head) {
|
||||
head.removeChild(appendedEls[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
appendedEls.length = 0;
|
||||
//inject active styles, grouped by media type
|
||||
for (var k in styleBlocks) {
|
||||
if (styleBlocks.hasOwnProperty(k)) {
|
||||
var ss = doc.createElement("style"),
|
||||
css = styleBlocks[k].join("\n");
|
||||
ss.type = "text/css";
|
||||
ss.media = k;
|
||||
//originally, ss was appended to a documentFragment and sheets were appended in bulk.
|
||||
//this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one!
|
||||
head.insertBefore(ss, lastLink.nextSibling);
|
||||
if (ss.styleSheet) {
|
||||
ss.styleSheet.cssText = css;
|
||||
} else {
|
||||
ss.appendChild(doc.createTextNode(css));
|
||||
}
|
||||
//push to appendedEls to track for later removal
|
||||
appendedEls.push(ss);
|
||||
}
|
||||
}
|
||||
},
|
||||
//find media blocks in css text, convert to style blocks
|
||||
translate = function (styles, href, media) {
|
||||
var qs = styles.replace(respond.regex.comments, "")
|
||||
.replace(respond.regex.keyframes, "")
|
||||
.match(respond.regex.media),
|
||||
ql = qs && qs.length || 0;
|
||||
//try to get CSS path
|
||||
href = href.substring(0, href.lastIndexOf("/"));
|
||||
var repUrls = function (css) {
|
||||
return css.replace(respond.regex.urls, "$1" + href + "$2$3");
|
||||
}, useMedia = !ql && media;
|
||||
//if path exists, tack on trailing slash
|
||||
if (href.length) {
|
||||
href += "/";
|
||||
}
|
||||
//if no internal queries exist, but media attr does, use that
|
||||
//note: this currently lacks support for situations where a media attr is specified on a link AND
|
||||
//its associated stylesheet has internal CSS media queries.
|
||||
//In those cases, the media attribute will currently be ignored.
|
||||
if (useMedia) {
|
||||
ql = 1;
|
||||
}
|
||||
for (var i = 0; i < ql; i++) {
|
||||
var fullq, thisq, eachq, eql;
|
||||
//media attr
|
||||
if (useMedia) {
|
||||
fullq = media;
|
||||
rules.push(repUrls(styles));
|
||||
//parse for styles
|
||||
} else {
|
||||
fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;
|
||||
rules.push(RegExp.$2 && repUrls(RegExp.$2));
|
||||
}
|
||||
eachq = fullq.split(",");
|
||||
eql = eachq.length;
|
||||
for (var j = 0; j < eql; j++) {
|
||||
thisq = eachq[j];
|
||||
if (isUnsupportedMediaQuery(thisq)) {
|
||||
continue;
|
||||
}
|
||||
mediastyles.push({
|
||||
media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all",
|
||||
rules: rules.length - 1,
|
||||
hasquery: thisq.indexOf("(") > -1,
|
||||
minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
|
||||
maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
|
||||
});
|
||||
}
|
||||
}
|
||||
applyMedia();
|
||||
},
|
||||
|
||||
//recurse through request queue, get css text
|
||||
makeRequests = function () {
|
||||
if (requestQueue.length) {
|
||||
var thisRequest = requestQueue.shift();
|
||||
ajax(thisRequest.href, function (styles) {
|
||||
translate(styles, thisRequest.href, thisRequest.media);
|
||||
parsedSheets[thisRequest.href] = true;
|
||||
// by wrapping recursive function call in setTimeout
|
||||
// we prevent "Stack overflow" error in IE7
|
||||
w.setTimeout(function () {
|
||||
makeRequests();
|
||||
}, 0);
|
||||
});
|
||||
} else {
|
||||
respond.callback();
|
||||
}
|
||||
},
|
||||
|
||||
//loop stylesheets, send text content to translate
|
||||
ripCSS = function () {
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var sheet = links[i],
|
||||
href = sheet.href,
|
||||
media = sheet.media,
|
||||
isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
|
||||
//only links plz and prevent re-parsing
|
||||
if (!!href && isCSS && !parsedSheets[href]) {
|
||||
// selectivizr exposes css through the rawCssText expando
|
||||
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
|
||||
translate(sheet.styleSheet.rawCssText, href, media);
|
||||
parsedSheets[href] = true;
|
||||
} else {
|
||||
if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base ||
|
||||
href.replace(RegExp.$1, "").split("/")[0] === w.location.host) {
|
||||
// IE7 doesn't handle urls that start with '//' for ajax request
|
||||
// manually add in the protocol
|
||||
if (href.substring(0, 2) === "//") {
|
||||
href = w.location.protocol + href;
|
||||
}
|
||||
requestQueue.push({
|
||||
href: href,
|
||||
media: media
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
makeRequests();
|
||||
};
|
||||
//translate CSS
|
||||
ripCSS();
|
||||
|
||||
//expose update for re-running respond later on
|
||||
respond.update = ripCSS;
|
||||
|
||||
//expose getEmValue
|
||||
respond.getEmValue = getEmValue;
|
||||
|
||||
//adjust on resize
|
||||
function callMedia() {
|
||||
applyMedia(true);
|
||||
}
|
||||
|
||||
if (w.addEventListener) {
|
||||
w.addEventListener("resize", callMedia, false);
|
||||
}
|
||||
else if (w.attachEvent) {
|
||||
w.attachEvent("onresize", callMedia);
|
||||
}
|
||||
})(this);
|
135
root/opt/phpsysinfo/js/vendor/bootstrap-ie9.js
vendored
Normal file
135
root/opt/phpsysinfo/js/vendor/bootstrap-ie9.js
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
/* Bootstrap 4 for IE9 - v4.3.100 */
|
||||
/* https://github.com/namiltd/bootstrap-ie */
|
||||
|
||||
/**
|
||||
* Modified code based on remPolyfill.js (c) Nicolas Bouvrette https://github.com/nbouvrette/remPolyfill
|
||||
*
|
||||
* Customizations:
|
||||
*
|
||||
* 1) Added new method `addCallBackWhenReady` to perform callbacks once the polyfill has been applied (especially useful for
|
||||
* onload scrolling events.
|
||||
* 2) Added REM support.
|
||||
*
|
||||
**/
|
||||
|
||||
// adds classList support (as Array) to Element.prototype for IE8-9
|
||||
(function() {
|
||||
Object.defineProperty(Element.prototype, 'classList', {
|
||||
get:function(){
|
||||
var element=this,domTokenList=(element.getAttribute('class')||'').replace(/^\s+|\s$/g,'').split(/\s+/g);
|
||||
if (domTokenList[0]==='') domTokenList.splice(0,1);
|
||||
function setClass(){
|
||||
if (domTokenList.length > 0) element.setAttribute('class', domTokenList.join(' '));
|
||||
else element.removeAttribute('class');
|
||||
}
|
||||
domTokenList.toggle=function(className,force){
|
||||
if (force!==undefined){
|
||||
if (force) domTokenList.add(className);
|
||||
else domTokenList.remove(className);
|
||||
}
|
||||
else {
|
||||
if (domTokenList.indexOf(className)!==-1) domTokenList.splice(domTokenList.indexOf(className),1);
|
||||
else domTokenList.push(className);
|
||||
}
|
||||
setClass();
|
||||
};
|
||||
domTokenList.add=function(){
|
||||
var args=[].slice.call(arguments);
|
||||
for (var i=0,l=args.length;i<l;i++){
|
||||
if (domTokenList.indexOf(args[i])===-1) domTokenList.push(args[i]);
|
||||
}
|
||||
setClass();
|
||||
};
|
||||
domTokenList.remove=function(){
|
||||
var args=[].slice.call(arguments);
|
||||
for (var i=0,l=args.length;i<l;i++){
|
||||
if (domTokenList.indexOf(args[i])!==-1) domTokenList.splice(domTokenList.indexOf(args[i]),1);
|
||||
}
|
||||
setClass();
|
||||
};
|
||||
domTokenList.item=function(i){
|
||||
return domTokenList[i];
|
||||
};
|
||||
domTokenList.contains=function(className){
|
||||
return domTokenList.indexOf(className)!==-1;
|
||||
};
|
||||
domTokenList.replace=function(oldClass,newClass){
|
||||
if (domTokenList.indexOf(oldClass)!==-1) domTokenList.splice(domTokenList.indexOf(oldClass),1,newClass);
|
||||
setClass();
|
||||
};
|
||||
domTokenList.value = (element.getAttribute('class')||'');
|
||||
return domTokenList;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* For browsers that do not support REM units, fallback to pixels.
|
||||
*/
|
||||
window.remPolyfill = {
|
||||
|
||||
/**
|
||||
* Implement this script on a given element.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {string} cssText - The CSS text of the link element.
|
||||
*/
|
||||
replaceCSS: function (cssText) {
|
||||
if (cssText) {
|
||||
// Replace all properties containing REM units with their pixel equivalents.
|
||||
return cssText.replace(
|
||||
/:invalid/g, '._invalid'
|
||||
).replace(
|
||||
/:valid/g, '._valid'
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Implement this script on a given element.
|
||||
*
|
||||
* @param {HTMLLinkElement} linkElement - The link element to polyfill.
|
||||
*/
|
||||
implement: function (linkElement) {
|
||||
if (!linkElement.href) {
|
||||
return;
|
||||
}
|
||||
|
||||
var request = null;
|
||||
|
||||
if (window.XMLHttpRequest) {
|
||||
request = new XMLHttpRequest();
|
||||
} else if (window.ActiveXObject) {
|
||||
try {
|
||||
request = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
} catch (exception) {
|
||||
try {
|
||||
request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (exception) {
|
||||
request = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!request) {
|
||||
return;
|
||||
}
|
||||
|
||||
request.open('GET', linkElement.href, true);
|
||||
request.onreadystatechange = function() {
|
||||
if ( request.readyState === 4 ) {
|
||||
linkElement.styleSheet.cssText = remPolyfill.replaceCSS(request.responseText);
|
||||
}
|
||||
};
|
||||
|
||||
request.send(null);
|
||||
}
|
||||
};
|
||||
|
||||
var linkElements = document.querySelectorAll('link[rel=stylesheet]');
|
||||
for (var linkElementId in linkElements) {
|
||||
if (Object.prototype.hasOwnProperty.call(linkElements, linkElementId)) {
|
||||
remPolyfill.implement(linkElements[linkElementId]);
|
||||
}
|
||||
}
|
649
root/opt/phpsysinfo/js/vendor/bootstrap-modal.js
vendored
Normal file
649
root/opt/phpsysinfo/js/vendor/bootstrap-modal.js
vendored
Normal file
@@ -0,0 +1,649 @@
|
||||
/*!
|
||||
* Bootstrap modal.js v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global = global || self, global.Modal = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
}));
|
||||
}
|
||||
|
||||
ownKeys.forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'modal';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.modal';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||
|
||||
var Default = {
|
||||
backdrop: true,
|
||||
keyboard: true,
|
||||
focus: true,
|
||||
show: true
|
||||
};
|
||||
var DefaultType = {
|
||||
backdrop: '(boolean|string)',
|
||||
keyboard: 'boolean',
|
||||
focus: 'boolean',
|
||||
show: 'boolean'
|
||||
};
|
||||
var Event = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY,
|
||||
FOCUSIN: "focusin" + EVENT_KEY,
|
||||
RESIZE: "resize" + EVENT_KEY,
|
||||
CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
|
||||
KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY,
|
||||
MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY,
|
||||
MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
SCROLLABLE: 'modal-dialog-scrollable',
|
||||
SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
|
||||
BACKDROP: 'modal-backdrop',
|
||||
OPEN: 'modal-open',
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
var Selector = {
|
||||
DIALOG: '.modal-dialog',
|
||||
MODAL_BODY: '.modal-body',
|
||||
DATA_TOGGLE: '[data-toggle="modal"]',
|
||||
DATA_DISMISS: '[data-dismiss="modal"]',
|
||||
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
|
||||
STICKY_CONTENT: '.sticky-top'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
var Modal =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function Modal(element, config) {
|
||||
this._config = this._getConfig(config);
|
||||
this._element = element;
|
||||
this._dialog = element.querySelector(Selector.DIALOG);
|
||||
this._backdrop = null;
|
||||
this._isShown = false;
|
||||
this._isBodyOverflowing = false;
|
||||
this._ignoreBackdropClick = false;
|
||||
this._isTransitioning = false;
|
||||
this._scrollbarWidth = 0;
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Modal.prototype;
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle(relatedTarget) {
|
||||
return this._isShown ? this.hide() : this.show(relatedTarget);
|
||||
};
|
||||
|
||||
_proto.show = function show(relatedTarget) {
|
||||
var _this = this;
|
||||
|
||||
if (this._isShown || this._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($(this._element).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var showEvent = $.Event(Event.SHOW, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
$(this._element).trigger(showEvent);
|
||||
|
||||
if (this._isShown || showEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._isShown = true;
|
||||
|
||||
this._checkScrollbar();
|
||||
|
||||
this._setScrollbar();
|
||||
|
||||
this._adjustDialog();
|
||||
|
||||
this._setEscapeEvent();
|
||||
|
||||
this._setResizeEvent();
|
||||
|
||||
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
|
||||
return _this.hide(event);
|
||||
});
|
||||
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
|
||||
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
|
||||
if ($(event.target).is(_this._element)) {
|
||||
_this._ignoreBackdropClick = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this._showBackdrop(function () {
|
||||
return _this._showElement(relatedTarget);
|
||||
});
|
||||
};
|
||||
|
||||
_proto.hide = function hide(event) {
|
||||
var _this2 = this;
|
||||
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
if (!this._isShown || this._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
|
||||
var hideEvent = $.Event(Event.HIDE);
|
||||
$(this._element).trigger(hideEvent);
|
||||
|
||||
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._isShown = false;
|
||||
var transition = $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
if (transition) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
this._setEscapeEvent();
|
||||
|
||||
this._setResizeEvent();
|
||||
|
||||
$(document).off(Event.FOCUSIN);
|
||||
$(this._element).removeClass(ClassName.SHOW);
|
||||
$(this._element).off(Event.CLICK_DISMISS);
|
||||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
|
||||
|
||||
if (transition) {
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||
$(this._element).one(Util.TRANSITION_END, function (event) {
|
||||
return _this2._hideModal(event);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
this._hideModal();
|
||||
}
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
[window, this._element, this._dialog].forEach(function (htmlElement) {
|
||||
return $(htmlElement).off(EVENT_KEY);
|
||||
});
|
||||
/**
|
||||
* `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`
|
||||
* Do not move `document` in `htmlElements` array
|
||||
* It will remove `Event.CLICK_DATA_API` event that should remain
|
||||
*/
|
||||
|
||||
$(document).off(Event.FOCUSIN);
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._config = null;
|
||||
this._element = null;
|
||||
this._dialog = null;
|
||||
this._backdrop = null;
|
||||
this._isShown = null;
|
||||
this._isBodyOverflowing = null;
|
||||
this._ignoreBackdropClick = null;
|
||||
this._isTransitioning = null;
|
||||
this._scrollbarWidth = null;
|
||||
};
|
||||
|
||||
_proto.handleUpdate = function handleUpdate() {
|
||||
this._adjustDialog();
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, config);
|
||||
Util.typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._showElement = function _showElement(relatedTarget) {
|
||||
var _this3 = this;
|
||||
|
||||
var transition = $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
||||
// Don't move modal's DOM position
|
||||
document.body.appendChild(this._element);
|
||||
}
|
||||
|
||||
this._element.style.display = 'block';
|
||||
|
||||
this._element.removeAttribute('aria-hidden');
|
||||
|
||||
this._element.setAttribute('aria-modal', true);
|
||||
|
||||
if ($(this._dialog).hasClass(ClassName.SCROLLABLE)) {
|
||||
this._dialog.querySelector(Selector.MODAL_BODY).scrollTop = 0;
|
||||
} else {
|
||||
this._element.scrollTop = 0;
|
||||
}
|
||||
|
||||
if (transition) {
|
||||
Util.reflow(this._element);
|
||||
}
|
||||
|
||||
$(this._element).addClass(ClassName.SHOW);
|
||||
|
||||
if (this._config.focus) {
|
||||
this._enforceFocus();
|
||||
}
|
||||
|
||||
var shownEvent = $.Event(Event.SHOWN, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
|
||||
var transitionComplete = function transitionComplete() {
|
||||
if (_this3._config.focus) {
|
||||
_this3._element.focus();
|
||||
}
|
||||
|
||||
_this3._isTransitioning = false;
|
||||
$(_this3._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (transition) {
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
|
||||
$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
transitionComplete();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._enforceFocus = function _enforceFocus() {
|
||||
var _this4 = this;
|
||||
|
||||
$(document).off(Event.FOCUSIN) // Guard against infinite focus loop
|
||||
.on(Event.FOCUSIN, function (event) {
|
||||
if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {
|
||||
_this4._element.focus();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_proto._setEscapeEvent = function _setEscapeEvent() {
|
||||
var _this5 = this;
|
||||
|
||||
if (this._isShown && this._config.keyboard) {
|
||||
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
event.preventDefault();
|
||||
|
||||
_this5.hide();
|
||||
}
|
||||
});
|
||||
} else if (!this._isShown) {
|
||||
$(this._element).off(Event.KEYDOWN_DISMISS);
|
||||
}
|
||||
};
|
||||
|
||||
_proto._setResizeEvent = function _setResizeEvent() {
|
||||
var _this6 = this;
|
||||
|
||||
if (this._isShown) {
|
||||
$(window).on(Event.RESIZE, function (event) {
|
||||
return _this6.handleUpdate(event);
|
||||
});
|
||||
} else {
|
||||
$(window).off(Event.RESIZE);
|
||||
}
|
||||
};
|
||||
|
||||
_proto._hideModal = function _hideModal() {
|
||||
var _this7 = this;
|
||||
|
||||
this._element.style.display = 'none';
|
||||
|
||||
this._element.setAttribute('aria-hidden', true);
|
||||
|
||||
this._element.removeAttribute('aria-modal');
|
||||
|
||||
this._isTransitioning = false;
|
||||
|
||||
this._showBackdrop(function () {
|
||||
$(document.body).removeClass(ClassName.OPEN);
|
||||
|
||||
_this7._resetAdjustments();
|
||||
|
||||
_this7._resetScrollbar();
|
||||
|
||||
$(_this7._element).trigger(Event.HIDDEN);
|
||||
});
|
||||
};
|
||||
|
||||
_proto._removeBackdrop = function _removeBackdrop() {
|
||||
if (this._backdrop) {
|
||||
$(this._backdrop).remove();
|
||||
this._backdrop = null;
|
||||
}
|
||||
};
|
||||
|
||||
_proto._showBackdrop = function _showBackdrop(callback) {
|
||||
var _this8 = this;
|
||||
|
||||
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
|
||||
|
||||
if (this._isShown && this._config.backdrop) {
|
||||
this._backdrop = document.createElement('div');
|
||||
this._backdrop.className = ClassName.BACKDROP;
|
||||
|
||||
if (animate) {
|
||||
this._backdrop.classList.add(animate);
|
||||
}
|
||||
|
||||
$(this._backdrop).appendTo(document.body);
|
||||
$(this._element).on(Event.CLICK_DISMISS, function (event) {
|
||||
if (_this8._ignoreBackdropClick) {
|
||||
_this8._ignoreBackdropClick = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.target !== event.currentTarget) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_this8._config.backdrop === 'static') {
|
||||
_this8._element.focus();
|
||||
} else {
|
||||
_this8.hide();
|
||||
}
|
||||
});
|
||||
|
||||
if (animate) {
|
||||
Util.reflow(this._backdrop);
|
||||
}
|
||||
|
||||
$(this._backdrop).addClass(ClassName.SHOW);
|
||||
|
||||
if (!callback) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!animate) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
|
||||
var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
|
||||
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
|
||||
} else if (!this._isShown && this._backdrop) {
|
||||
$(this._backdrop).removeClass(ClassName.SHOW);
|
||||
|
||||
var callbackRemove = function callbackRemove() {
|
||||
_this8._removeBackdrop();
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
if ($(this._element).hasClass(ClassName.FADE)) {
|
||||
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
|
||||
|
||||
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
|
||||
} else {
|
||||
callbackRemove();
|
||||
}
|
||||
} else if (callback) {
|
||||
callback();
|
||||
}
|
||||
} // ----------------------------------------------------------------------
|
||||
// the following methods are used to handle overflowing modals
|
||||
// todo (fat): these should probably be refactored out of modal.js
|
||||
// ----------------------------------------------------------------------
|
||||
;
|
||||
|
||||
_proto._adjustDialog = function _adjustDialog() {
|
||||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
||||
|
||||
if (!this._isBodyOverflowing && isModalOverflowing) {
|
||||
this._element.style.paddingLeft = this._scrollbarWidth + "px";
|
||||
}
|
||||
|
||||
if (this._isBodyOverflowing && !isModalOverflowing) {
|
||||
this._element.style.paddingRight = this._scrollbarWidth + "px";
|
||||
}
|
||||
};
|
||||
|
||||
_proto._resetAdjustments = function _resetAdjustments() {
|
||||
this._element.style.paddingLeft = '';
|
||||
this._element.style.paddingRight = '';
|
||||
};
|
||||
|
||||
_proto._checkScrollbar = function _checkScrollbar() {
|
||||
var rect = document.body.getBoundingClientRect();
|
||||
this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
|
||||
this._scrollbarWidth = this._getScrollbarWidth();
|
||||
};
|
||||
|
||||
_proto._setScrollbar = function _setScrollbar() {
|
||||
var _this9 = this;
|
||||
|
||||
if (this._isBodyOverflowing) {
|
||||
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
|
||||
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
|
||||
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
|
||||
var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding
|
||||
|
||||
$(fixedContent).each(function (index, element) {
|
||||
var actualPadding = element.style.paddingRight;
|
||||
var calculatedPadding = $(element).css('padding-right');
|
||||
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
|
||||
}); // Adjust sticky content margin
|
||||
|
||||
$(stickyContent).each(function (index, element) {
|
||||
var actualMargin = element.style.marginRight;
|
||||
var calculatedMargin = $(element).css('margin-right');
|
||||
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
|
||||
}); // Adjust body padding
|
||||
|
||||
var actualPadding = document.body.style.paddingRight;
|
||||
var calculatedPadding = $(document.body).css('padding-right');
|
||||
$(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
|
||||
}
|
||||
|
||||
$(document.body).addClass(ClassName.OPEN);
|
||||
};
|
||||
|
||||
_proto._resetScrollbar = function _resetScrollbar() {
|
||||
// Restore fixed content padding
|
||||
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
|
||||
$(fixedContent).each(function (index, element) {
|
||||
var padding = $(element).data('padding-right');
|
||||
$(element).removeData('padding-right');
|
||||
element.style.paddingRight = padding ? padding : '';
|
||||
}); // Restore sticky content
|
||||
|
||||
var elements = [].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT));
|
||||
$(elements).each(function (index, element) {
|
||||
var margin = $(element).data('margin-right');
|
||||
|
||||
if (typeof margin !== 'undefined') {
|
||||
$(element).css('margin-right', margin).removeData('margin-right');
|
||||
}
|
||||
}); // Restore body padding
|
||||
|
||||
var padding = $(document.body).data('padding-right');
|
||||
$(document.body).removeData('padding-right');
|
||||
document.body.style.paddingRight = padding ? padding : '';
|
||||
};
|
||||
|
||||
_proto._getScrollbarWidth = function _getScrollbarWidth() {
|
||||
// thx d.walsh
|
||||
var scrollDiv = document.createElement('div');
|
||||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
|
||||
document.body.appendChild(scrollDiv);
|
||||
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
|
||||
document.body.removeChild(scrollDiv);
|
||||
return scrollbarWidth;
|
||||
} // Static
|
||||
;
|
||||
|
||||
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
|
||||
var _config = _objectSpread({}, Default, $(this).data(), typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (!data) {
|
||||
data = new Modal(this, _config);
|
||||
$(this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config](relatedTarget);
|
||||
} else if (_config.show) {
|
||||
data.show(relatedTarget);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(Modal, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Modal;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
var _this10 = this;
|
||||
|
||||
var target;
|
||||
var selector = Util.getSelectorFromElement(this);
|
||||
|
||||
if (selector) {
|
||||
target = document.querySelector(selector);
|
||||
}
|
||||
|
||||
var config = $(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());
|
||||
|
||||
if (this.tagName === 'A' || this.tagName === 'AREA') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var $target = $(target).one(Event.SHOW, function (showEvent) {
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
// Only register focus restorer if modal will actually get shown
|
||||
return;
|
||||
}
|
||||
|
||||
$target.one(Event.HIDDEN, function () {
|
||||
if ($(_this10).is(':visible')) {
|
||||
_this10.focus();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Modal._jQueryInterface.call($(target), config, this);
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Modal._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Modal;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Modal._jQueryInterface;
|
||||
};
|
||||
|
||||
return Modal;
|
||||
|
||||
}));
|
171
root/opt/phpsysinfo/js/vendor/bootstrap-util.js
vendored
Normal file
171
root/opt/phpsysinfo/js/vendor/bootstrap-util.js
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
/*!
|
||||
* Bootstrap util.js v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||
(global = global || self, global.Util = factory(global.jQuery));
|
||||
}(this, function ($) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.3.1): util.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Private TransitionEnd Helpers
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var TRANSITION_END = 'transitionend';
|
||||
var MAX_UID = 1000000;
|
||||
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
function toType(obj) {
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
}
|
||||
|
||||
function getSpecialTransitionEndEvent() {
|
||||
return {
|
||||
bindType: TRANSITION_END,
|
||||
delegateType: TRANSITION_END,
|
||||
handle: function handle(event) {
|
||||
if ($(event.target).is(this)) {
|
||||
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
||||
}
|
||||
|
||||
return undefined; // eslint-disable-line no-undefined
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function transitionEndEmulator(duration) {
|
||||
var _this = this;
|
||||
|
||||
var called = false;
|
||||
$(this).one(Util.TRANSITION_END, function () {
|
||||
called = true;
|
||||
});
|
||||
setTimeout(function () {
|
||||
if (!called) {
|
||||
Util.triggerTransitionEnd(_this);
|
||||
}
|
||||
}, duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
function setTransitionEndSupport() {
|
||||
$.fn.emulateTransitionEnd = transitionEndEmulator;
|
||||
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
||||
}
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Public Util Api
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
var Util = {
|
||||
TRANSITION_END: 'bsTransitionEnd',
|
||||
getUID: function getUID(prefix) {
|
||||
do {
|
||||
// eslint-disable-next-line no-bitwise
|
||||
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
|
||||
} while (document.getElementById(prefix));
|
||||
|
||||
return prefix;
|
||||
},
|
||||
getSelectorFromElement: function getSelectorFromElement(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
var hrefAttr = element.getAttribute('href');
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
|
||||
}
|
||||
|
||||
try {
|
||||
return document.querySelector(selector) ? selector : null;
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
|
||||
if (!element) {
|
||||
return 0;
|
||||
} // Get transition-duration of the element
|
||||
|
||||
|
||||
var transitionDuration = $(element).css('transition-duration');
|
||||
var transitionDelay = $(element).css('transition-delay');
|
||||
var floatTransitionDuration = parseFloat(transitionDuration);
|
||||
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
||||
|
||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
||||
return 0;
|
||||
} // If multiple durations are defined, take the first
|
||||
|
||||
|
||||
transitionDuration = transitionDuration.split(',')[0];
|
||||
transitionDelay = transitionDelay.split(',')[0];
|
||||
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
||||
},
|
||||
reflow: function reflow(element) {
|
||||
return element.offsetHeight;
|
||||
},
|
||||
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
||||
$(element).trigger(TRANSITION_END);
|
||||
},
|
||||
// TODO: Remove in v5
|
||||
supportsTransitionEnd: function supportsTransitionEnd() {
|
||||
return Boolean(TRANSITION_END);
|
||||
},
|
||||
isElement: function isElement(obj) {
|
||||
return (obj[0] || obj).nodeType;
|
||||
},
|
||||
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
|
||||
for (var property in configTypes) {
|
||||
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
|
||||
var expectedTypes = configTypes[property];
|
||||
var value = config[property];
|
||||
var valueType = value && Util.isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
findShadowRoot: function findShadowRoot(element) {
|
||||
if (!document.documentElement.attachShadow) {
|
||||
return null;
|
||||
} // Can find the shadow root otherwise it'll return the document
|
||||
|
||||
|
||||
if (typeof element.getRootNode === 'function') {
|
||||
var root = element.getRootNode();
|
||||
return root instanceof ShadowRoot ? root : null;
|
||||
}
|
||||
|
||||
if (element instanceof ShadowRoot) {
|
||||
return element;
|
||||
} // when we don't find a shadow root
|
||||
|
||||
|
||||
if (!element.parentNode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Util.findShadowRoot(element.parentNode);
|
||||
}
|
||||
};
|
||||
setTransitionEndSupport();
|
||||
|
||||
return Util;
|
||||
|
||||
}));
|
File diff suppressed because one or more lines are too long
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
;(function(window, document) {
|
||||
/*jshint evil:true */
|
||||
/** version */
|
||||
var version = '3.7.2';
|
||||
var version = '3.7.3';
|
||||
|
||||
/** Preset options */
|
||||
var options = window.html5 || {};
|
||||
@@ -517,4 +517,8 @@
|
||||
// shiv for print
|
||||
shivPrint(document);
|
||||
|
||||
}(this, document));
|
||||
if(typeof module == 'object' && module.exports){
|
||||
module.exports = html5;
|
||||
}
|
||||
|
||||
}(typeof window !== "undefined" ? window : this, document));
|
||||
|
128
root/opt/phpsysinfo/js/vendor/sorttable.js
vendored
128
root/opt/phpsysinfo/js/vendor/sorttable.js
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
SortTable
|
||||
version 2+2014.12.25_fix
|
||||
version 2+2014.12.25_fix-noinit-noforeach
|
||||
7th April 2007
|
||||
Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
Redefinition of sortfwdind and sortrevind icons.
|
||||
Mieczyslaw Nalewaj (namiltd@users.sourceforge.net)
|
||||
|
||||
19th November 2015
|
||||
Disabled autostart after loading.
|
||||
You have to run sorttable.init() at the beginning of the code,
|
||||
or makeSortable for each table.
|
||||
Mieczyslaw Nalewaj (namiltd@users.sourceforge.net)
|
||||
|
||||
Instructions:
|
||||
Download this file
|
||||
Add <script src="sorttable.js"></script> to your HTML
|
||||
@@ -21,27 +27,23 @@
|
||||
*/
|
||||
|
||||
|
||||
var stIsIE = /*@cc_on!@*/false;
|
||||
|
||||
sorttable = {
|
||||
init: function() {
|
||||
// quit if this function has already been called
|
||||
if (arguments.callee.done) return;
|
||||
// flag this function so we don't do the same thing twice
|
||||
arguments.callee.done = true;
|
||||
// kill the timer
|
||||
if (_timer) clearInterval(_timer);
|
||||
|
||||
if (!document.createElement || !document.getElementsByTagName) return;
|
||||
|
||||
sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;
|
||||
|
||||
forEach(document.getElementsByTagName('table'), function(table) {
|
||||
if (table.className.search(/\bsortable\b/) != -1) {
|
||||
sorttable.makeSortable(table);
|
||||
allTables=document.getElementsByTagName('table');
|
||||
for (var i=0; i < allTables.length; i++) {
|
||||
if (allTables[i].className.search(/\bsortable\b/) != -1) {
|
||||
sorttable.makeSortable(allTables[i]);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
makeSortable: function(table) {
|
||||
@@ -105,7 +107,6 @@ sorttable = {
|
||||
this.removeChild(document.getElementById('sorttable_sortfwdind'+$(this).parent().parent().parent()[0].id));
|
||||
sortrevind = document.createElement('span');
|
||||
sortrevind.id = "sorttable_sortrevind"+$(this).parent().parent().parent()[0].id;
|
||||
// sortrevind.innerHTML = stIsIE ? ' <font face="webdings">5</font>' : ' ▴';
|
||||
sortrevind.innerHTML = ' ▲';
|
||||
this.appendChild(sortrevind);
|
||||
return;
|
||||
@@ -119,7 +120,6 @@ sorttable = {
|
||||
this.removeChild(document.getElementById('sorttable_sortrevind'+$(this).parent().parent().parent()[0].id));
|
||||
sortfwdind = document.createElement('span');
|
||||
sortfwdind.id = "sorttable_sortfwdind"+$(this).parent().parent().parent()[0].id;
|
||||
// sortfwdind.innerHTML = stIsIE ? ' <font face="webdings">6</font>' : ' ▾';
|
||||
sortfwdind.innerHTML = ' ▼';
|
||||
this.appendChild(sortfwdind);
|
||||
return;
|
||||
@@ -127,12 +127,13 @@ sorttable = {
|
||||
|
||||
// remove sorttable_sorted classes
|
||||
theadrow = this.parentNode;
|
||||
forEach(theadrow.childNodes, function(cell) {
|
||||
if (cell.nodeType == 1) { // an element
|
||||
cell.className = cell.className.replace('sorttable_sorted_reverse','');
|
||||
cell.className = cell.className.replace('sorttable_sorted','');
|
||||
for (var i=0; i < theadrow.childNodes.length; i++) {
|
||||
if (theadrow.childNodes[i].nodeType == 1) { // an element
|
||||
theadrow.childNodes[i].className = theadrow.childNodes[i].className.replace('sorttable_sorted_reverse','');
|
||||
theadrow.childNodes[i].className = theadrow.childNodes[i].className.replace('sorttable_sorted','');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
sortfwdind = document.getElementById('sorttable_sortfwdind'+$(this).parent().parent().parent()[0].id);
|
||||
if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); }
|
||||
sortrevind = document.getElementById('sorttable_sortrevind'+$(this).parent().parent().parent()[0].id);
|
||||
@@ -141,7 +142,6 @@ sorttable = {
|
||||
this.className += ' sorttable_sorted';
|
||||
sortfwdind = document.createElement('span');
|
||||
sortfwdind.id = "sorttable_sortfwdind"+$(this).parent().parent().parent()[0].id;
|
||||
// sortfwdind.innerHTML = stIsIE ? ' <font face="webdings">6</font>;' : ' ▾';
|
||||
sortfwdind.innerHTML = ' ▼';
|
||||
this.appendChild(sortfwdind);
|
||||
|
||||
@@ -177,7 +177,7 @@ sorttable = {
|
||||
for (var i=0; i<table.tBodies[0].rows.length; i++) {
|
||||
text = sorttable.getInnerText(table.tBodies[0].rows[i].cells[column]);
|
||||
if (text != '') {
|
||||
if (text.match(/^-?[<EFBFBD>$<24>]?[\d,.]+%?$/)) {
|
||||
if (text.match(/^-?[\xA3$\xA4]?[\d,.]+%?$/)) {
|
||||
return sorttable.sort_numeric;
|
||||
}
|
||||
// check for a date: dd/mm/yyyy or dd/mm/yy
|
||||
@@ -341,41 +341,6 @@ sorttable = {
|
||||
}
|
||||
};
|
||||
|
||||
/* ******************************************************************
|
||||
Supporting functions: bundled here to avoid depending on a library
|
||||
****************************************************************** */
|
||||
|
||||
// Dean Edwards/Matthias Miller/John Resig
|
||||
|
||||
/* for Mozilla/Opera9 */
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener("DOMContentLoaded", sorttable.init, false);
|
||||
}
|
||||
|
||||
/* for Internet Explorer */
|
||||
/*@cc_on @*/
|
||||
/*@if (@_win32)
|
||||
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
|
||||
var script = document.getElementById("__ie_onload");
|
||||
script.onreadystatechange = function() {
|
||||
if (this.readyState == "complete") {
|
||||
sorttable.init(); // call the onload handler
|
||||
}
|
||||
};
|
||||
/*@end @*/
|
||||
|
||||
/* for Safari */
|
||||
if (/WebKit/i.test(navigator.userAgent)) { // sniff
|
||||
var _timer = setInterval(function() {
|
||||
if (/loaded|complete/.test(document.readyState)) {
|
||||
sorttable.init(); // call the onload handler
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
|
||||
/* for other browsers */
|
||||
window.onload = sorttable.init;
|
||||
|
||||
// written by Dean Edwards, 2005
|
||||
// with input from Tino Zijdel, Matthias Miller, Diego Perini
|
||||
|
||||
@@ -446,58 +411,3 @@ fixEvent.preventDefault = function() {
|
||||
fixEvent.stopPropagation = function() {
|
||||
this.cancelBubble = true;
|
||||
};
|
||||
|
||||
// Dean's forEach: http://dean.edwards.name/base/forEach.js
|
||||
/*
|
||||
forEach, version 1.0
|
||||
Copyright 2006, Dean Edwards
|
||||
License: http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
// array-like enumeration
|
||||
if (!Array.forEach) { // mozilla already supports this
|
||||
Array.forEach = function(array, block, context) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
block.call(context, array[i], i, array);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// generic enumeration
|
||||
Function.prototype.forEach = function(object, block, context) {
|
||||
for (var key in object) {
|
||||
if (typeof this.prototype[key] == "undefined") {
|
||||
block.call(context, object[key], key, object);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// character enumeration
|
||||
String.forEach = function(string, block, context) {
|
||||
Array.forEach(string.split(""), function(chr, index) {
|
||||
block.call(context, chr, index, string);
|
||||
});
|
||||
};
|
||||
|
||||
// globally resolve forEach enumeration
|
||||
var forEach = function(object, block, context) {
|
||||
if (object) {
|
||||
var resolve = Object; // default
|
||||
if (object instanceof Function) {
|
||||
// functions have a "length" property
|
||||
resolve = Function;
|
||||
} else if (object.forEach instanceof Function) {
|
||||
// the object implements a custom forEach method so use that
|
||||
object.forEach(block, context);
|
||||
return;
|
||||
} else if (typeof object == "string") {
|
||||
// the object is a string
|
||||
resolve = String;
|
||||
} else if (typeof object.length == "number") {
|
||||
// the object is array-like
|
||||
resolve = Array;
|
||||
}
|
||||
resolve.forEach(object, block, context);
|
||||
}
|
||||
};
|
||||
|
||||
|
495
root/opt/phpsysinfo/js/vendor/sorttable_org.js
vendored
495
root/opt/phpsysinfo/js/vendor/sorttable_org.js
vendored
@@ -1,495 +0,0 @@
|
||||
/*
|
||||
SortTable
|
||||
version 2
|
||||
7th April 2007
|
||||
Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
|
||||
|
||||
Instructions:
|
||||
Download this file
|
||||
Add <script src="sorttable.js"></script> to your HTML
|
||||
Add class="sortable" to any table you'd like to make sortable
|
||||
Click on the headers to sort
|
||||
|
||||
Thanks to many, many people for contributions and suggestions.
|
||||
Licenced as X11: http://www.kryogenix.org/code/browser/licence.html
|
||||
This basically means: do what you want with it.
|
||||
*/
|
||||
|
||||
|
||||
var stIsIE = /*@cc_on!@*/false;
|
||||
|
||||
sorttable = {
|
||||
init: function() {
|
||||
// quit if this function has already been called
|
||||
if (arguments.callee.done) return;
|
||||
// flag this function so we don't do the same thing twice
|
||||
arguments.callee.done = true;
|
||||
// kill the timer
|
||||
if (_timer) clearInterval(_timer);
|
||||
|
||||
if (!document.createElement || !document.getElementsByTagName) return;
|
||||
|
||||
sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;
|
||||
|
||||
forEach(document.getElementsByTagName('table'), function(table) {
|
||||
if (table.className.search(/\bsortable\b/) != -1) {
|
||||
sorttable.makeSortable(table);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
makeSortable: function(table) {
|
||||
if (table.getElementsByTagName('thead').length == 0) {
|
||||
// table doesn't have a tHead. Since it should have, create one and
|
||||
// put the first table row in it.
|
||||
the = document.createElement('thead');
|
||||
the.appendChild(table.rows[0]);
|
||||
table.insertBefore(the,table.firstChild);
|
||||
}
|
||||
// Safari doesn't support table.tHead, sigh
|
||||
if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0];
|
||||
|
||||
if (table.tHead.rows.length != 1) return; // can't cope with two header rows
|
||||
|
||||
// Sorttable v1 put rows with a class of "sortbottom" at the bottom (as
|
||||
// "total" rows, for example). This is B&R, since what you're supposed
|
||||
// to do is put them in a tfoot. So, if there are sortbottom rows,
|
||||
// for backwards compatibility, move them to tfoot (creating it if needed).
|
||||
sortbottomrows = [];
|
||||
for (var i=0; i<table.rows.length; i++) {
|
||||
if (table.rows[i].className.search(/\bsortbottom\b/) != -1) {
|
||||
sortbottomrows[sortbottomrows.length] = table.rows[i];
|
||||
}
|
||||
}
|
||||
if (sortbottomrows) {
|
||||
if (table.tFoot == null) {
|
||||
// table doesn't have a tfoot. Create one.
|
||||
tfo = document.createElement('tfoot');
|
||||
table.appendChild(tfo);
|
||||
}
|
||||
for (var i=0; i<sortbottomrows.length; i++) {
|
||||
tfo.appendChild(sortbottomrows[i]);
|
||||
}
|
||||
delete sortbottomrows;
|
||||
}
|
||||
|
||||
// work through each column and calculate its type
|
||||
headrow = table.tHead.rows[0].cells;
|
||||
for (var i=0; i<headrow.length; i++) {
|
||||
// manually override the type with a sorttable_type attribute
|
||||
if (!headrow[i].className.match(/\bsorttable_nosort\b/)) { // skip this col
|
||||
mtch = headrow[i].className.match(/\bsorttable_([a-z0-9]+)\b/);
|
||||
if (mtch) { override = mtch[1]; }
|
||||
if (mtch && typeof sorttable["sort_"+override] == 'function') {
|
||||
headrow[i].sorttable_sortfunction = sorttable["sort_"+override];
|
||||
} else {
|
||||
headrow[i].sorttable_sortfunction = sorttable.guessType(table,i);
|
||||
}
|
||||
// make it clickable to sort
|
||||
headrow[i].sorttable_columnindex = i;
|
||||
headrow[i].sorttable_tbody = table.tBodies[0];
|
||||
dean_addEvent(headrow[i],"click", sorttable.innerSortFunction = function(e) {
|
||||
|
||||
if (this.className.search(/\bsorttable_sorted\b/) != -1) {
|
||||
// if we're already sorted by this column, just
|
||||
// reverse the table, which is quicker
|
||||
sorttable.reverse(this.sorttable_tbody);
|
||||
this.className = this.className.replace('sorttable_sorted',
|
||||
'sorttable_sorted_reverse');
|
||||
this.removeChild(document.getElementById('sorttable_sortfwdind'));
|
||||
sortrevind = document.createElement('span');
|
||||
sortrevind.id = "sorttable_sortrevind";
|
||||
sortrevind.innerHTML = stIsIE ? ' <font face="webdings">5</font>' : ' ▴';
|
||||
this.appendChild(sortrevind);
|
||||
return;
|
||||
}
|
||||
if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) {
|
||||
// if we're already sorted by this column in reverse, just
|
||||
// re-reverse the table, which is quicker
|
||||
sorttable.reverse(this.sorttable_tbody);
|
||||
this.className = this.className.replace('sorttable_sorted_reverse',
|
||||
'sorttable_sorted');
|
||||
this.removeChild(document.getElementById('sorttable_sortrevind'));
|
||||
sortfwdind = document.createElement('span');
|
||||
sortfwdind.id = "sorttable_sortfwdind";
|
||||
sortfwdind.innerHTML = stIsIE ? ' <font face="webdings">6</font>' : ' ▾';
|
||||
this.appendChild(sortfwdind);
|
||||
return;
|
||||
}
|
||||
|
||||
// remove sorttable_sorted classes
|
||||
theadrow = this.parentNode;
|
||||
forEach(theadrow.childNodes, function(cell) {
|
||||
if (cell.nodeType == 1) { // an element
|
||||
cell.className = cell.className.replace('sorttable_sorted_reverse','');
|
||||
cell.className = cell.className.replace('sorttable_sorted','');
|
||||
}
|
||||
});
|
||||
sortfwdind = document.getElementById('sorttable_sortfwdind');
|
||||
if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); }
|
||||
sortrevind = document.getElementById('sorttable_sortrevind');
|
||||
if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); }
|
||||
|
||||
this.className += ' sorttable_sorted';
|
||||
sortfwdind = document.createElement('span');
|
||||
sortfwdind.id = "sorttable_sortfwdind";
|
||||
sortfwdind.innerHTML = stIsIE ? ' <font face="webdings">6</font>' : ' ▾';
|
||||
this.appendChild(sortfwdind);
|
||||
|
||||
// build an array to sort. This is a Schwartzian transform thing,
|
||||
// i.e., we "decorate" each row with the actual sort key,
|
||||
// sort based on the sort keys, and then put the rows back in order
|
||||
// which is a lot faster because you only do getInnerText once per row
|
||||
row_array = [];
|
||||
col = this.sorttable_columnindex;
|
||||
rows = this.sorttable_tbody.rows;
|
||||
for (var j=0; j<rows.length; j++) {
|
||||
row_array[row_array.length] = [sorttable.getInnerText(rows[j].cells[col]), rows[j]];
|
||||
}
|
||||
/* If you want a stable sort, uncomment the following line */
|
||||
//sorttable.shaker_sort(row_array, this.sorttable_sortfunction);
|
||||
/* and comment out this one */
|
||||
row_array.sort(this.sorttable_sortfunction);
|
||||
|
||||
tb = this.sorttable_tbody;
|
||||
for (var j=0; j<row_array.length; j++) {
|
||||
tb.appendChild(row_array[j][1]);
|
||||
}
|
||||
|
||||
delete row_array;
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
guessType: function(table, column) {
|
||||
// guess the type of a column based on its first non-blank row
|
||||
sortfn = sorttable.sort_alpha;
|
||||
for (var i=0; i<table.tBodies[0].rows.length; i++) {
|
||||
text = sorttable.getInnerText(table.tBodies[0].rows[i].cells[column]);
|
||||
if (text != '') {
|
||||
if (text.match(/^-?[<5B>$<24>]?[\d,.]+%?$/)) {
|
||||
return sorttable.sort_numeric;
|
||||
}
|
||||
// check for a date: dd/mm/yyyy or dd/mm/yy
|
||||
// can have / or . or - as separator
|
||||
// can be mm/dd as well
|
||||
possdate = text.match(sorttable.DATE_RE)
|
||||
if (possdate) {
|
||||
// looks like a date
|
||||
first = parseInt(possdate[1]);
|
||||
second = parseInt(possdate[2]);
|
||||
if (first > 12) {
|
||||
// definitely dd/mm
|
||||
return sorttable.sort_ddmm;
|
||||
} else if (second > 12) {
|
||||
return sorttable.sort_mmdd;
|
||||
} else {
|
||||
// looks like a date, but we can't tell which, so assume
|
||||
// that it's dd/mm (English imperialism!) and keep looking
|
||||
sortfn = sorttable.sort_ddmm;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return sortfn;
|
||||
},
|
||||
|
||||
getInnerText: function(node) {
|
||||
// gets the text we want to use for sorting for a cell.
|
||||
// strips leading and trailing whitespace.
|
||||
// this is *not* a generic getInnerText function; it's special to sorttable.
|
||||
// for example, you can override the cell text with a customkey attribute.
|
||||
// it also gets .value for <input> fields.
|
||||
|
||||
if (!node) return "";
|
||||
|
||||
hasInputs = (typeof node.getElementsByTagName == 'function') &&
|
||||
node.getElementsByTagName('input').length;
|
||||
|
||||
if (node.getAttribute("sorttable_customkey") != null) {
|
||||
return node.getAttribute("sorttable_customkey");
|
||||
}
|
||||
else if (typeof node.textContent != 'undefined' && !hasInputs) {
|
||||
return node.textContent.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
else if (typeof node.innerText != 'undefined' && !hasInputs) {
|
||||
return node.innerText.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
else if (typeof node.text != 'undefined' && !hasInputs) {
|
||||
return node.text.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
else {
|
||||
switch (node.nodeType) {
|
||||
case 3:
|
||||
if (node.nodeName.toLowerCase() == 'input') {
|
||||
return node.value.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
case 4:
|
||||
return node.nodeValue.replace(/^\s+|\s+$/g, '');
|
||||
break;
|
||||
case 1:
|
||||
case 11:
|
||||
var innerText = '';
|
||||
for (var i = 0; i < node.childNodes.length; i++) {
|
||||
innerText += sorttable.getInnerText(node.childNodes[i]);
|
||||
}
|
||||
return innerText.replace(/^\s+|\s+$/g, '');
|
||||
break;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
reverse: function(tbody) {
|
||||
// reverse the rows in a tbody
|
||||
newrows = [];
|
||||
for (var i=0; i<tbody.rows.length; i++) {
|
||||
newrows[newrows.length] = tbody.rows[i];
|
||||
}
|
||||
for (var i=newrows.length-1; i>=0; i--) {
|
||||
tbody.appendChild(newrows[i]);
|
||||
}
|
||||
delete newrows;
|
||||
},
|
||||
|
||||
/* sort functions
|
||||
each sort function takes two parameters, a and b
|
||||
you are comparing a[0] and b[0] */
|
||||
sort_numeric: function(a,b) {
|
||||
aa = parseFloat(a[0].replace(/[^0-9.-]/g,''));
|
||||
if (isNaN(aa)) aa = 0;
|
||||
bb = parseFloat(b[0].replace(/[^0-9.-]/g,''));
|
||||
if (isNaN(bb)) bb = 0;
|
||||
return aa-bb;
|
||||
},
|
||||
sort_alpha: function(a,b) {
|
||||
if (a[0]==b[0]) return 0;
|
||||
if (a[0]<b[0]) return -1;
|
||||
return 1;
|
||||
},
|
||||
sort_ddmm: function(a,b) {
|
||||
mtch = a[0].match(sorttable.DATE_RE);
|
||||
y = mtch[3]; m = mtch[2]; d = mtch[1];
|
||||
if (m.length == 1) m = '0'+m;
|
||||
if (d.length == 1) d = '0'+d;
|
||||
dt1 = y+m+d;
|
||||
mtch = b[0].match(sorttable.DATE_RE);
|
||||
y = mtch[3]; m = mtch[2]; d = mtch[1];
|
||||
if (m.length == 1) m = '0'+m;
|
||||
if (d.length == 1) d = '0'+d;
|
||||
dt2 = y+m+d;
|
||||
if (dt1==dt2) return 0;
|
||||
if (dt1<dt2) return -1;
|
||||
return 1;
|
||||
},
|
||||
sort_mmdd: function(a,b) {
|
||||
mtch = a[0].match(sorttable.DATE_RE);
|
||||
y = mtch[3]; d = mtch[2]; m = mtch[1];
|
||||
if (m.length == 1) m = '0'+m;
|
||||
if (d.length == 1) d = '0'+d;
|
||||
dt1 = y+m+d;
|
||||
mtch = b[0].match(sorttable.DATE_RE);
|
||||
y = mtch[3]; d = mtch[2]; m = mtch[1];
|
||||
if (m.length == 1) m = '0'+m;
|
||||
if (d.length == 1) d = '0'+d;
|
||||
dt2 = y+m+d;
|
||||
if (dt1==dt2) return 0;
|
||||
if (dt1<dt2) return -1;
|
||||
return 1;
|
||||
},
|
||||
|
||||
shaker_sort: function(list, comp_func) {
|
||||
// A stable sort function to allow multi-level sorting of data
|
||||
// see: http://en.wikipedia.org/wiki/Cocktail_sort
|
||||
// thanks to Joseph Nahmias
|
||||
var b = 0;
|
||||
var t = list.length - 1;
|
||||
var swap = true;
|
||||
|
||||
while(swap) {
|
||||
swap = false;
|
||||
for(var i = b; i < t; ++i) {
|
||||
if ( comp_func(list[i], list[i+1]) > 0 ) {
|
||||
var q = list[i]; list[i] = list[i+1]; list[i+1] = q;
|
||||
swap = true;
|
||||
}
|
||||
} // for
|
||||
t--;
|
||||
|
||||
if (!swap) break;
|
||||
|
||||
for(var i = t; i > b; --i) {
|
||||
if ( comp_func(list[i], list[i-1]) < 0 ) {
|
||||
var q = list[i]; list[i] = list[i-1]; list[i-1] = q;
|
||||
swap = true;
|
||||
}
|
||||
} // for
|
||||
b++;
|
||||
|
||||
} // while(swap)
|
||||
}
|
||||
}
|
||||
|
||||
/* ******************************************************************
|
||||
Supporting functions: bundled here to avoid depending on a library
|
||||
****************************************************************** */
|
||||
|
||||
// Dean Edwards/Matthias Miller/John Resig
|
||||
|
||||
/* for Mozilla/Opera9 */
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener("DOMContentLoaded", sorttable.init, false);
|
||||
}
|
||||
|
||||
/* for Internet Explorer */
|
||||
/*@cc_on @*/
|
||||
/*@if (@_win32)
|
||||
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
|
||||
var script = document.getElementById("__ie_onload");
|
||||
script.onreadystatechange = function() {
|
||||
if (this.readyState == "complete") {
|
||||
sorttable.init(); // call the onload handler
|
||||
}
|
||||
};
|
||||
/*@end @*/
|
||||
|
||||
/* for Safari */
|
||||
if (/WebKit/i.test(navigator.userAgent)) { // sniff
|
||||
var _timer = setInterval(function() {
|
||||
if (/loaded|complete/.test(document.readyState)) {
|
||||
sorttable.init(); // call the onload handler
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
|
||||
/* for other browsers */
|
||||
window.onload = sorttable.init;
|
||||
|
||||
// written by Dean Edwards, 2005
|
||||
// with input from Tino Zijdel, Matthias Miller, Diego Perini
|
||||
|
||||
// http://dean.edwards.name/weblog/2005/10/add-event/
|
||||
|
||||
function dean_addEvent(element, type, handler) {
|
||||
if (element.addEventListener) {
|
||||
element.addEventListener(type, handler, false);
|
||||
} else {
|
||||
// assign each event handler a unique ID
|
||||
if (!handler.$$guid) handler.$$guid = dean_addEvent.guid++;
|
||||
// create a hash table of event types for the element
|
||||
if (!element.events) element.events = {};
|
||||
// create a hash table of event handlers for each element/event pair
|
||||
var handlers = element.events[type];
|
||||
if (!handlers) {
|
||||
handlers = element.events[type] = {};
|
||||
// store the existing event handler (if there is one)
|
||||
if (element["on" + type]) {
|
||||
handlers[0] = element["on" + type];
|
||||
}
|
||||
}
|
||||
// store the event handler in the hash table
|
||||
handlers[handler.$$guid] = handler;
|
||||
// assign a global event handler to do all the work
|
||||
element["on" + type] = handleEvent;
|
||||
}
|
||||
};
|
||||
// a counter used to create unique IDs
|
||||
dean_addEvent.guid = 1;
|
||||
|
||||
function removeEvent(element, type, handler) {
|
||||
if (element.removeEventListener) {
|
||||
element.removeEventListener(type, handler, false);
|
||||
} else {
|
||||
// delete the event handler from the hash table
|
||||
if (element.events && element.events[type]) {
|
||||
delete element.events[type][handler.$$guid];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function handleEvent(event) {
|
||||
var returnValue = true;
|
||||
// grab the event object (IE uses a global event object)
|
||||
event = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);
|
||||
// get a reference to the hash table of event handlers
|
||||
var handlers = this.events[event.type];
|
||||
// execute each event handler
|
||||
for (var i in handlers) {
|
||||
this.$$handleEvent = handlers[i];
|
||||
if (this.$$handleEvent(event) === false) {
|
||||
returnValue = false;
|
||||
}
|
||||
}
|
||||
return returnValue;
|
||||
};
|
||||
|
||||
function fixEvent(event) {
|
||||
// add W3C standard event methods
|
||||
event.preventDefault = fixEvent.preventDefault;
|
||||
event.stopPropagation = fixEvent.stopPropagation;
|
||||
return event;
|
||||
};
|
||||
fixEvent.preventDefault = function() {
|
||||
this.returnValue = false;
|
||||
};
|
||||
fixEvent.stopPropagation = function() {
|
||||
this.cancelBubble = true;
|
||||
}
|
||||
|
||||
// Dean's forEach: http://dean.edwards.name/base/forEach.js
|
||||
/*
|
||||
forEach, version 1.0
|
||||
Copyright 2006, Dean Edwards
|
||||
License: http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
// array-like enumeration
|
||||
if (!Array.forEach) { // mozilla already supports this
|
||||
Array.forEach = function(array, block, context) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
block.call(context, array[i], i, array);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// generic enumeration
|
||||
Function.prototype.forEach = function(object, block, context) {
|
||||
for (var key in object) {
|
||||
if (typeof this.prototype[key] == "undefined") {
|
||||
block.call(context, object[key], key, object);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// character enumeration
|
||||
String.forEach = function(string, block, context) {
|
||||
Array.forEach(string.split(""), function(chr, index) {
|
||||
block.call(context, chr, index, string);
|
||||
});
|
||||
};
|
||||
|
||||
// globally resolve forEach enumeration
|
||||
var forEach = function(object, block, context) {
|
||||
if (object) {
|
||||
var resolve = Object; // default
|
||||
if (object instanceof Function) {
|
||||
// functions have a "length" property
|
||||
resolve = Function;
|
||||
} else if (object.forEach instanceof Function) {
|
||||
// the object implements a custom forEach method so use that
|
||||
object.forEach(block, context);
|
||||
return;
|
||||
} else if (typeof object == "string") {
|
||||
// the object is a string
|
||||
resolve = String;
|
||||
} else if (typeof object.length == "number") {
|
||||
// the object is array-like
|
||||
resolve = Array;
|
||||
}
|
||||
resolve.forEach(object, block, context);
|
||||
}
|
||||
};
|
||||
|
@@ -1,3 +1,8 @@
|
||||
/* ========================================================================
|
||||
* transparency.js v0.10.0
|
||||
* http://leonidas.github.io/transparency/
|
||||
* Licensed under MIT (https://github.com/leonidas/transparency/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
var $, Context, Transparency, helpers, _,
|
||||
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
Reference in New Issue
Block a user