* 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:
2025-05-14 16:14:01 +01:00
parent 80b1da5fa5
commit c8ce77259d
952 changed files with 51341 additions and 28699 deletions

View File

@@ -1,17 +1,10 @@
versions, links and simple description of used jquery files
===========================================================
jquery.js
---------
VERSION : 2.1.4
URL : http://jquery.com/
DESC : jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle
events, perform animations, and add Ajax interactions to your web pages.
USED : used for the entire userinterface
jquery-1.js
---------
VERSION : 1.11.3
VERSION : v1.12.4-ff3fix-ff2fix-CVE_2015_9251fix-CVE_2019_11358fix-CVE_2020_11022fix-CVE_2020_11023fix
URL : http://jquery.com/
DESC : jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle
events, perform animations, and add Ajax interactions to your web pages.
@@ -20,7 +13,7 @@ USED : used for the entire userinterface
jquery.dataTables.js
--------------------
VERSION : 1.8.2
VERSION : 1.8.2+jquery1.9fix+parseJSONfix2+bindfix+samesitefix+noeval
URL : http://plugins.jquery.com/project/DataTables
DESC : dataTables is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable
table without page refreshes.
@@ -28,31 +21,38 @@ USED : provide tablesorting for the filesystem table
jquery.nyroModal.js
-------------------
VERSION : 1.6.2+jquery1.8fix
VERSION : 1.6.2+jquery1.8fix+bindfix+ff2fix
URL : http://plugins.jquery.com/project/nyroModal
DESC : nyroModal is a high customizable modal window plugin.
USED : provide a modal dialog, that is shown when errors are found during execution of the php parsers, or lets say
in this way: if there are error elements in the xml file
jquery.timers.js
jquery.timer.js
----------------
VERSION : 0.1
URL : http://plugins.jquery.com/project/Timer
URL : http://plugins.jquery.com/project/Timer; https://github.com/sloat/timer
DESC : provides a cleaner way to handle intervals
USED : automatic reloading of the entire page
jquery.jgrowl.js
----------------
VERSION : 1.2.6
VERSION : 1.2.6+jquery1.9fix+jquery3fix+bindfix
URL : http://plugins.jquery.com/project/jGrowl
DESC : jGrowl is a jQuery plugin that raises unobtrusive messages within the browser, similar to the way that OS X's Growl Framework works
USED : show alert and error message
jquery.treeTable.js
-------------------
VERSION : 2009-06-22+statefix
VERSION : 2009-06-22+statefix+spanfix+altfix+undefinedfix+ie6cachefix+multilinefix+divfix
URL : http://plugins.jquery.com/project/jQTreeTable; http://www.hanpau.com/index.php?page=jqtreetable
DESC : Take a plain html table, wrap the rows you want collapsing/expanding in a tbody tag with an id of treetable, map each row to it's parent row, set some options, and let jQTreeTable take it from there.
USED : Hardware, Memory, UPS blocks
jquery.ifixpng.js
-------------------
VERSION : 2.1 (23/04/2008)+jquery1.9fix
URL : http://jquery.khurshid.com
DESC : Designed to fix that problem by applying appropriate filters to user specified elements, while keeping all element tags intact.
USED : used for the entire userinterface
$Id: README 702 2012-09-21 16:52:32Z namiltd $

View File

@@ -3,15 +3,7 @@ versions, links and simple description of used jquery files
jquery.js
---------
VERSION : 2.1.4
URL : http://jquery.com/
DESC : jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle
events, perform animations, and add Ajax interactions to your web pages.
USED : used for the entire userinterface
jquery-1.js
---------
VERSION : 1.11.3
VERSION : v1.12.4-ff3fix-ff2fix-CVE_2015_9251fix-CVE_2019_11358fix-CVE_2020_11022fix-CVE_2020_11023fix
URL : http://jquery.com/
DESC : jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle
events, perform animations, and add Ajax interactions to your web pages.

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
/*
* File: jquery.dataTables.js
* Version: 1.8.2
* Version: 1.8.2+jquery1.9fix+parseJSONfix2+bindfix+samesitefix+noeval
* Description: Paginate, search and sort HTML tables
* Author: Allan Jardine (www.sprymedia.co.uk)
* Created: 28/3/2008
@@ -319,7 +319,7 @@
nPaging.appendChild( nPrevious );
nPaging.appendChild( nNext );
$(nPrevious).bind( 'click.DT', function() {
$(nPrevious).on( 'click.DT', function() {
if ( oSettings.oApi._fnPageChange( oSettings, "previous" ) )
{
/* Only draw when the page has actually changed */
@@ -327,7 +327,7 @@
}
} );
$(nNext).bind( 'click.DT', function() {
$(nNext).on( 'click.DT', function() {
if ( oSettings.oApi._fnPageChange( oSettings, "next" ) )
{
fnCallbackDraw( oSettings );
@@ -335,8 +335,8 @@
} );
/* Take the brutal approach to cancelling text selection */
$(nPrevious).bind( 'selectstart.DT', function () { return false; } );
$(nNext).bind( 'selectstart.DT', function () { return false; } );
$(nPrevious).on( 'selectstart.DT', function () { return false; } );
$(nNext).on( 'selectstart.DT', function () { return false; } );
/* ID the first elements only */
if ( oSettings.sTableId !== '' && typeof oSettings.aanFeatures.p == "undefined" )
@@ -426,28 +426,28 @@
nPaging.appendChild( nNext );
nPaging.appendChild( nLast );
$(nFirst).bind( 'click.DT', function () {
$(nFirst).on( 'click.DT', function () {
if ( oSettings.oApi._fnPageChange( oSettings, "first" ) )
{
fnCallbackDraw( oSettings );
}
} );
$(nPrevious).bind( 'click.DT', function() {
$(nPrevious).on( 'click.DT', function() {
if ( oSettings.oApi._fnPageChange( oSettings, "previous" ) )
{
fnCallbackDraw( oSettings );
}
} );
$(nNext).bind( 'click.DT', function() {
$(nNext).on( 'click.DT', function() {
if ( oSettings.oApi._fnPageChange( oSettings, "next" ) )
{
fnCallbackDraw( oSettings );
}
} );
$(nLast).bind( 'click.DT', function() {
$(nLast).on( 'click.DT', function() {
if ( oSettings.oApi._fnPageChange( oSettings, "last" ) )
{
fnCallbackDraw( oSettings );
@@ -456,8 +456,8 @@
/* Take the brutal approach to cancelling text selection */
$('span', nPaging)
.bind( 'mousedown.DT', function () { return false; } )
.bind( 'selectstart.DT', function () { return false; } );
.on( 'mousedown.DT', function () { return false; } )
.on( 'selectstart.DT', function () { return false; } );
/* ID the first elements only */
if ( oSettings.sTableId !== '' && typeof oSettings.aanFeatures.p == "undefined" )
@@ -555,8 +555,8 @@
/* Build up the dynamic list forst - html and listeners */
var qjPaginateList = $('span:eq(2)', an[i]);
qjPaginateList.html( sList );
$('span', qjPaginateList).bind( 'click.DT', fnClick ).bind( 'mousedown.DT', fnFalse )
.bind( 'selectstart.DT', fnFalse );
$('span', qjPaginateList).on( 'click.DT', fnClick ).on( 'mousedown.DT', fnFalse )
.on( 'selectstart.DT', fnFalse );
/* Update the 'premanent botton's classes */
anButtons = an[i].getElementsByTagName('span');
@@ -2175,7 +2175,7 @@
}
/* Blitz all DT events */
$(oSettings.nTableWrapper).find('*').andSelf().unbind('.DT');
$(oSettings.nTableWrapper).find('*').andSelf().off('.DT');
/* If there is an 'empty' indicator row, remove it */
$('tbody>tr>td.'+oSettings.oClasses.sRowEmpty, oSettings.nTable).parent().remove();
@@ -3051,7 +3051,7 @@
_fnSortAttachListener( oSettings, oSettings.aoColumns[i].nTh, i );
/* Take the brutal approach to cancelling text selection in header */
$(oSettings.aoColumns[i].nTh).bind( 'mousedown.DT', fnNoSelect );
$(oSettings.aoColumns[i].nTh).on( 'mousedown.DT', fnNoSelect );
}
else
{
@@ -3971,7 +3971,7 @@
iWidth, aApplied=[], iSanityWidth,
nScrollFootInner = (o.nTFoot !== null) ? o.nScrollFoot.getElementsByTagName('div')[0] : null,
nScrollFootTable = (o.nTFoot !== null) ? nScrollFootInner.getElementsByTagName('table')[0] : null,
ie67 = $.browser.msie && $.browser.version <= 7;
ie67 = (navigator.userAgent.match(/MSIE ([2-7]\.)/) !== null);
/*
* 1. Re-create the table inside the scrolling div
@@ -4288,7 +4288,7 @@
var jqFilter = $("input", nFilter);
jqFilter.val( oSettings.oPreviousSearch.sSearch.replace('"','&quot;') );
jqFilter.bind( 'keyup.DT', function(e) {
jqFilter.on( 'keyup.DT', function(e) {
/* Update all other filter input elements for the new display */
var n = oSettings.aanFeatures.f;
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
@@ -4310,7 +4310,7 @@
}
} );
jqFilter.bind( 'keypress.DT', function(e) {
jqFilter.on( 'keypress.DT', function(e) {
/* Prevent default */
if ( e.keyCode == 13 )
{
@@ -4763,7 +4763,7 @@
*/
function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback )
{
$(nNode).bind( 'click.DT', function (e) {
$(nNode).on( 'click.DT', function (e) {
/* If the column is not sortable - don't to anything */
if ( oSettings.aoColumns[iDataIndex].bSortable === false )
{
@@ -5300,7 +5300,7 @@
*/
$('select option[value="'+oSettings._iDisplayLength+'"]',nLength).attr("selected",true);
$('select', nLength).bind( 'change.DT', function(e) {
$('select', nLength).on( 'change.DT', function(e) {
var iVal = $(this).val();
/* Update all other length options for the new display */
@@ -6259,8 +6259,8 @@
*/
try
{
oData = (typeof $.parseJSON == 'function') ?
$.parseJSON( sData.replace(/'/g, '"') ) : eval( '('+sData+')' );
oData = (typeof JSON.parse == 'function') ?
JSON.parse( sData.replace(/'/g, '"') ) : $.parseJSON( sData.replace(/'/g, '"') );
}
catch( e )
{
@@ -6355,15 +6355,15 @@
if ( fnCallback !== null )
{
oData = (typeof $.parseJSON == 'function') ?
$.parseJSON( sValue ) : eval( '('+sValue+')' );
oData = (typeof JSON.parse == 'function') ?
JSON.parse( sValue ) : $.parseJSON( sValue );
sFullCookie = fnCallback( sNameFile, oData, date.toGMTString(),
aParts.join('/')+"/" );
}
else
{
sFullCookie = sNameFile + "=" + encodeURIComponent(sValue) +
"; expires=" + date.toGMTString() +"; path=" + aParts.join('/')+"/";
"; expires=" + date.toGMTString() +"; path=" + aParts.join('/')+"/; samesite=strict";
}
/* Are we going to go over the cookie limit of 4KiB? If so, try to delete a cookies
@@ -6376,13 +6376,18 @@
if ( iLength+10 > 4096 ) /* Magic 10 for padding */
{
var aCookies =document.cookie.split(';');
var sData;
for ( var i=0, iLen=aCookies.length ; i<iLen ; i++ )
{
if ( aCookies[i].indexOf( sBaseName ) != -1 )
{
/* It's a DataTables cookie, so eval it and check the time stamp */
var aSplitCookie = aCookies[i].split('=');
try { oData = eval( '('+decodeURIComponent(aSplitCookie[1])+')' ); }
try {
sData = decodeURIComponent(aSplitCookie[1]);
oData = (typeof JSON.parse == 'function') ?
JSON.parse( sData.replace(/'/g, '"') ) : $.parseJSON( sData.replace(/'/g, '"') ); }
//try { oData = eval( '('+decodeURIComponent(aSplitCookie[1])+')' ); }
catch( e ) { continue; }
if ( typeof oData.iCreate != 'undefined' && oData.iCreate < iOldTime )
@@ -6396,7 +6401,7 @@
if ( sOldName !== "" )
{
document.cookie = sOldName+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+
aParts.join('/') + "/";
aParts.join('/') + "/; samesite=strict";
}
}

View File

@@ -0,0 +1,143 @@
/*
* jQuery ifixpng plugin
* (previously known as pngfix)
* Version 2.1 (23/04/2008)+jquery1.9fix
* @requires jQuery v1.1.3 or above
*
* Examples at: http://jquery.khurshid.com
* Copyright (c) 2007 Kush M.
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
/**
*
* @example
*
* optional if location of pixel.gif if different to default which is images/pixel.gif
* $.ifixpng('media/pixel.gif');
*
* $('img[@src$=.png], #panel').ifixpng();
*
* @apply hack to all png images and #panel which icluded png img in its css
*
* @name ifixpng
* @type jQuery
* @cat Plugins/Image
* @return jQuery
* @author jQuery Community
*/
(function($) {
/**
* helper variables and function
*/
$.ifixpng = function(customPixel) {
if (customPixel !== undefined) {
$.ifixpng.pixel = customPixel;
}
};
$.ifixpng.getPixel = function() {
return $.ifixpng.pixel || 'images/pixel.gif';
};
var hack = {
ltie7 : (navigator.userAgent.match(/MSIE ((5\.5)|(6\.))/) !== null),
filter : function(src) {
return "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src='"+src+"')";
}
};
/**
* Applies ie png hack to selected dom elements
*
* $('img[@src$=.png]').ifixpng();
* @desc apply hack to all images with png extensions
*
* $('#panel, img[@src$=.png]').ifixpng();
* @desc apply hack to element #panel and all images with png extensions
*
* @name ifixpng
*/
$.fn.ifixpng = hack.ltie7 ? function(customPixel) {
if (customPixel !== undefined) {
$.ifixpng.pixel = customPixel;
}
return this.each(function() {
var filter = $(this).css('filter');
if (!filter.match(/src=["']?(.*\.png([?].*)?)["']?/i)) { // if not yet executed
// in case rewriting urls
var base = $('base').attr('href');
if (base) {
// remove anything after the last '/'
base = base.replace(/\/[^\/]+$/,'/');
}
if ($(this).is('img') || $(this).is('input')) { // hack image tags present in dom
if ($(this).attr('src')) {
if ($(this).attr('src').match(/.*\.png([?].*)?$/i)) { // make sure it is png image
// use source tag value if set
var source = (base && $(this).attr('src').search(/^(\/|http:)/i)) ? base + $(this).attr('src') : $(this).attr('src');
// apply filter
$(this).css({filter:hack.filter(source), width:$(this).width(), height:$(this).height()})
.attr({src:$.ifixpng.getPixel()})
.positionFix();
}
}
} else { // hack png css properties present inside css
var image = $(this).css('backgroundImage');
if (image.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)) {
image = RegExp.$1;
image = (base && image.substring(0,1)!='/') ? base + image : image;
$(this).css({backgroundImage:'none', filter:hack.filter(image)})
.children().children().positionFix();
}
}
}
});
} : function() { return this; };
/**
* Removes any png hack that may have been applied previously
*
* $('img[@src$=.png]').iunfixpng();
* @desc revert hack on all images with png extensions
*
* $('#panel, img[@src$=.png]').iunfixpng();
* @desc revert hack on element #panel and all images with png extensions
*
* @name iunfixpng
*/
$.fn.iunfixpng = hack.ltie7 ? function() {
return this.each(function() {
var src = $(this).css('filter');
if (src.match(/src=["']?(.*\.png([?].*)?)["']?/i)) { // get img source from filter
src = RegExp.$1;
if ($(this).is('img') || $(this).is('input')) {
$(this).attr({src:src}).css({filter:''});
} else {
$(this).css({filter:'', background:'url('+src+')'});
}
}
});
} : function() { return this; };
/**
* positions selected item relatively
*/
$.fn.positionFix = function() {
return this.each(function() {
var position = $(this).css('position');
if (position != 'absolute' && position != 'relative') {
$(this).css({position:'relative'});
}
});
};
})(jQuery);

View File

@@ -1,5 +1,5 @@
/**
* jGrowl 1.2.6
* jGrowl 1.2.6+jquery1.9fix+jquery3fix+bindfix
*
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
@@ -110,7 +110,7 @@
/** jGrowl Wrapper - Establish a base jGrowl Container for compatibility with older releases. **/
$.jGrowl = function( m , o ) {
// To maintain compatibility with older version that only supported one instance we'll create the base container.
if ( $('#jGrowl').size() == 0 )
if ( $('#jGrowl').length == 0 )
$('<div id="jGrowl"></div>').addClass( (o && o.position) ? o.position : $.jGrowl.defaults.position ).appendTo('body');
// Create a notification on the container.
@@ -214,21 +214,21 @@
'<div class="jGrowl-close">' + o.closeTemplate + '</div>' +
'<div class="jGrowl-header">' + o.header + '</div>' +
'<div class="jGrowl-message">' + message + '</div></div>'
).data("jGrowl", o).addClass(o.theme).children('div.jGrowl-close').bind("click.jGrowl", function() {
).data("jGrowl", o).addClass(o.theme).children('div.jGrowl-close').on("click.jGrowl", function() {
$(this).parent().trigger('jGrowl.close');
}).parent();
/** Notification Actions **/
$(notification).bind("mouseover.jGrowl", function() {
$(notification).on("mouseover.jGrowl", function() {
$('div.jGrowl-notification', self.element).data("jGrowl.pause", true);
}).bind("mouseout.jGrowl", function() {
}).on("mouseout.jGrowl", function() {
$('div.jGrowl-notification', self.element).data("jGrowl.pause", false);
}).bind('jGrowl.beforeOpen', function() {
}).on('jGrowl.beforeOpen', function() {
if ( o.beforeOpen.apply( notification , [notification,message,o,self.element] ) != false ) {
$(this).trigger('jGrowl.open');
}
}).bind('jGrowl.open', function() {
}).on('jGrowl.open', function() {
if ( o.open.apply( notification , [notification,message,o,self.element] ) != false ) {
if ( o.glue == 'after' ) {
$('div.jGrowl-notification:last', self.element).after(notification);
@@ -238,7 +238,7 @@
$(this).animate(o.animateOpen, o.openDuration, o.easing, function() {
// Fixes some anti-aliasing issues with IE filters.
if ($.browser.msie && (parseInt($(this).css('opacity'), 10) === 1 || parseInt($(this).css('opacity'), 10) === 0))
if ((navigator.userAgent.match(/MSIE ([1-9])/) !== null) && (parseInt($(this).css('opacity'), 10) === 1 || parseInt($(this).css('opacity'), 10) === 0))
this.style.removeAttribute('filter');
if ( $(this).data("jGrowl") != null ) // Happens when a notification is closing before it's open.
@@ -247,12 +247,12 @@
$(this).trigger('jGrowl.afterOpen');
});
}
}).bind('jGrowl.afterOpen', function() {
}).on('jGrowl.afterOpen', function() {
o.afterOpen.apply( notification , [notification,message,o,self.element] );
}).bind('jGrowl.beforeClose', function() {
}).on('jGrowl.beforeClose', function() {
if ( o.beforeClose.apply( notification , [notification,message,o,self.element] ) != false )
$(this).trigger('jGrowl.close');
}).bind('jGrowl.close', function() {
}).on('jGrowl.close', function() {
// Pause the notification, lest during the course of animation another close event gets called.
$(this).data('jGrowl.pause', true);
$(this).animate(o.animateClose, o.closeDuration, o.easing, function() {
@@ -269,11 +269,11 @@
if ( o.corners != '' && $.fn.corner != undefined ) $(notification).corner( o.corners );
/** Add a Global Closer if more than one notification exists **/
if ( $('div.jGrowl-notification:parent', self.element).size() > 1 &&
$('div.jGrowl-closer', self.element).size() == 0 && this.defaults.closer != false ) {
if ( $('div.jGrowl-notification:parent', self.element).length > 1 &&
$('div.jGrowl-closer', self.element).length == 0 && this.defaults.closer != false ) {
$(this.defaults.closerTemplate).addClass('jGrowl-closer ' + this.defaults.themeState + ' ui-corner-all').addClass(this.defaults.theme)
.appendTo(self.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing)
.bind("click.jGrowl", function() {
.on("click.jGrowl", function() {
$(this).siblings().trigger("jGrowl.beforeClose");
if ( $.isFunction( self.defaults.closer ) ) {
@@ -297,10 +297,10 @@
});
if ( this.notifications.length > 0 &&
(this.defaults.pool == 0 || $(this.element).find('div.jGrowl-notification:parent').size() < this.defaults.pool) )
(this.defaults.pool == 0 || $(this.element).find('div.jGrowl-notification:parent').length < this.defaults.pool) )
this.render( this.notifications.shift() );
if ( $(this.element).find('div.jGrowl-notification:parent').size() < 2 ) {
if ( $(this.element).find('div.jGrowl-notification:parent').length < 2 ) {
$(this.element).find('div.jGrowl-closer').animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function() {
$(this).remove();
});
@@ -314,7 +314,7 @@
$(e).data('jGrowl.instance').update();
}, parseInt(this.defaults.check));
if ($.browser.msie && parseInt($.browser.version) < 7 && !window["XMLHttpRequest"]) {
if ((navigator.userAgent.match(/MSIE ([2-6]\.)/) !== null) && !window["XMLHttpRequest"]) {
$(this.element).addClass('ie6');
}
},

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@
* Licensed under the MIT license
*
* $Date: 2010-02-23 (Tue, 23 Feb 2010) $
* $version: 1.6.2+jquery1.8fix
* $version: 1.6.2+jquery1.8fix+bindfix+ff2fix
*/
jQuery(function($) {
@@ -87,8 +87,8 @@ jQuery(function($) {
var me = $(this);
if (this.nodeName.toLowerCase() == 'form') {
me
.unbind('submit.nyroModal')
.bind('submit.nyroModal', function(e) {
.off('submit.nyroModal')
.on('submit.nyroModal', function(e) {
if(e.isDefaultPrevented())
return false;
if (me.data('nyroModalprocessing'))
@@ -107,8 +107,8 @@ jQuery(function($) {
});
} else {
me
.unbind('click.nyroModal')
.bind('click.nyroModal', function(e) {
.off('click.nyroModal')
.on('click.nyroModal', function(e) {
if(e.isDefaultPrevented())
return false;
e.preventDefault();
@@ -290,7 +290,7 @@ jQuery(function($) {
manual: '<div class="wrapper"></div>'
},
closeButton: '<a href="#" class="nyroModalClose" id="closeBut" title="close">Close</a>', // Adding automaticly as the first child of #nyroModalWrapper
closeButton: '<a href="#" class="nyroModalClose" id="closeBut" title="close"></a>', // Adding automaticly as the first child of #nyroModalWrapper
title: null, // Modal title
titleFromIframe: true, // When using iframe in the same domain, try to get the title from it
@@ -422,7 +422,7 @@ jQuery(function($) {
.error(loadingError)
.load(function() {
debug('Image Loaded: '+this.src);
$(this).unbind('load');
$(this).off('load');
var w = modal.tmp.width();
var h = modal.tmp.height();
modal.tmp.css({lineHeight: ''});
@@ -726,7 +726,7 @@ jQuery(function($) {
backgroundColor: currentSettings.bgColor
}, currentSettings.cssOpt.bg))
.before(iframeHideIE);
modal.bg.bind('click.nyroModal', clickBg);
modal.bg.on('click.nyroModal', clickBg);
modal.loading = $('#nyroModalLoading')
.css(currentSettings.cssOpt.loading)
.hide();
@@ -748,12 +748,12 @@ jQuery(function($) {
});
}
$(document).bind('keydown.nyroModal', keyHandler);
$(document).on('keydown.nyroModal', keyHandler);
modal.content.css({width: 'auto', height: 'auto'});
modal.contentWrapper.css({width: 'auto', height: 'auto'});
if (!currentSettings.blocker && currentSettings.windowResize) {
$(window).bind('resize.nyroModal', function() {
$(window).on('resize.nyroModal', function() {
window.clearTimeout(windowResizeTimeout);
windowResizeTimeout = window.setTimeout(windowResizeHandler, 200);
});
@@ -925,8 +925,8 @@ jQuery(function($) {
.addClass(currentSettings.errorClass)
.html(currentSettings.contentError);
$(currentSettings.closeSelector, modal.loading)
.unbind('click.nyroModal')
.bind('click.nyroModal', removeModal);
.off('click.nyroModal')
.on('click.nyroModal', removeModal);
setMarginLoading();
modal.loading
.css({
@@ -963,14 +963,15 @@ jQuery(function($) {
modal.content.append(modal.scripts);
$(currentSettings.closeSelector, modal.contentWrapper)
.unbind('click.nyroModal')
.bind('click.nyroModal', removeModal);
.off('click.nyroModal')
.on('click.nyroModal', removeModal);
$(currentSettings.openSelector, modal.contentWrapper).nyroModal(getCurrentSettingsNew());
}
// Get the current settings to be used in new links
function getCurrentSettingsNew() {
return callingSettings;
/*
var currentSettingsNew = $.extend(true, {}, currentSettings);
if (resized.width)
currentSettingsNew.width = null;
@@ -982,6 +983,7 @@ jQuery(function($) {
currentSettingsNew.height = initSettingsSize.height;
currentSettingsNew.cssOpt.content.overflow = 'auto';
return currentSettingsNew;
*/
}
// Wrap the content and update the modal size if needed
@@ -1241,9 +1243,9 @@ jQuery(function($) {
if (e)
e.preventDefault();
if (modal.full && modal.ready) {
$(document).unbind('keydown.nyroModal');
$(document).off('keydown.nyroModal');
if (!currentSettings.blocker)
$(window).unbind('resize.nyroModal');
$(window).off('resize.nyroModal');
modal.ready = false;
modal.anim = true;
modal.closing = true;
@@ -1314,8 +1316,8 @@ jQuery(function($) {
else
modal.loading.html(currentSettings.contentLoading);
$(currentSettings.closeSelector, modal.loading)
.unbind('click.nyroModal')
.bind('click.nyroModal', removeModal);
.off('click.nyroModal')
.on('click.nyroModal', removeModal);
setMarginLoading();
currentSettings.showLoading(modal, currentSettings, function(){modal.anim=false;showContentOrLoading();});
}
@@ -1360,7 +1362,7 @@ jQuery(function($) {
jFrom.attr('target', '');
$('input[name='+currentSettings.formIndicator+']', currentSettings.from).remove();
var iframe = modal.tmp.children('iframe');
var iframeContent = iframe.unbind('load').contents().find(currentSettings.selector || 'body').not('script[src]');
var iframeContent = iframe.off('load').contents().find(currentSettings.selector || 'body').not('script[src]');
iframe.attr('src', 'about:blank'); // Used to stop the loading in FF
modal.tmp.html(iframeContent.html());
if (modal.tmp.html()) {
@@ -1431,7 +1433,7 @@ jQuery(function($) {
function endRemove() {
debug('endRemove');
$(document).unbind('keydown', keyHandler);
$(document).off('keydown', keyHandler);
modal.anim = false;
modal.full.remove();
modal.full = null;

View File

@@ -3,8 +3,7 @@
* jQuery Timer plugin v0.1
* Matt Schmidt [http://www.mattptr.net]
*
* Licensed under the BSD License:
* http://mattptr.net/license/license.txt
* Licensed under the MIT License
*
*/
@@ -72,4 +71,4 @@
};
return new _timer(interval, callback);
};
};

View File

@@ -1,6 +1,6 @@
/*
Copyright: Paul Hanlon
version 2009-06-22+statefix+spanfix+altfix+undefinedfix+ie6cachefix+multilinefix+divfix
Released under the MIT/BSD licence which means you can do anything you want
with it, as long as you keep this copyright notice on the page
*/
@@ -8,29 +8,30 @@ with it, as long as you keep this copyright notice on the page
jq.fn.jqTreeTable=function(map, options){
var opts = jq.extend({openImg:"",shutImg:"",leafImg:"",lastOpenImg:"",lastShutImg:"",lastLeafImg:"",vertLineImg:"",blankImg:"",collapse:false,column:0,striped:false,highlight:false,state:true},options),
mapa=[],mapb=[],tid=this.attr("id"),collarr=[],
stripe=function(){
stripe=function(){
if(opts.striped){
$("#"+tid+" tr:not(.collapsed)").filter(":even").addClass("even").removeClass("odd").end().filter(":odd").removeClass("even").addClass("odd");
$("#"+tid+" tr:not(.collapsed)").filter(":even").addClass("even").removeClass("odd").end().filter(":odd").removeClass("even").addClass("odd");
}
},
},
buildText = function(parno, preStr){//Recursively build up the text for the images that make it work
var mp=mapa[parno], ro=0, pre="", pref, img;
for (var y=0,yl=mp.length;y<yl;y++){
if (mp!==undefined) for (var y=0,yl=mp.length;y<yl;y++){
ro = mp[y];
if (mapa[ro]){//It's a parent as well. Build it's string and move on to it's children
pre=(y==yl-1)? opts.blankImg: opts.vertLineImg;
img=(y==yl-1)? opts.lastOpenImg: opts.openImg;
mapb[ro-1] = preStr + '<img src="'+img+'" class="parimg" id="'+tid+ro+'">';
pref = preStr + '<img src="'+pre+'" class="preimg">';
mapb[ro-1] = preStr + '<span class="treeimg" style="background-image: url(\''+pre+'\')"><div style="background-image: url(\''+img+'\')" class="parimg" id="'+tid+ro+'"'+(img=(y==yl-1)? ' last=1': '')+'></div></span>';
pref = preStr + '<span class="treeimg preimg" style="background-image: url(\''+pre+'\')"></span>';
arguments.callee(ro, pref);
}else{//it's a child
pre=(y==yl-1)? opts.blankImg: opts.vertLineImg;
img = (y==yl-1)? opts.lastLeafImg: opts.leafImg;//It's the last child, It's child will have a blank field behind it
mapb[ro-1] = preStr + '<img src="'+img+'" class="ttimage" id="'+tid+ro+'">';
mapb[ro-1] = preStr + '<span class="treeimg" style="background-image: url(\''+pre+'\')"><div style="background-image: url(\''+img+'\')" class="ttimage" id="'+tid+ro+'"></div></span>';
}
}
},
expandKids = function(num, last){//Expands immediate children, and their uncollapsed children
jq("#"+tid+num).attr("src", (last)? opts.lastOpenImg: opts.openImg);//
jq("#"+tid+num).css('background-image', "url('"+((last)? opts.lastOpenImg: opts.openImg)+"')");
for (var x=0, xl=mapa[num].length;x<xl;x++){
var mnx = mapa[num][x];
jq("#"+tid+mnx).parents("tr").removeClass("collapsed");
@@ -41,7 +42,7 @@ with it, as long as you keep this copyright notice on the page
},
collapseKids = function(num, last){//Recursively collapses all children and their children and change icon
if (mapa[num]){
jq("#"+tid+num).attr("src", (last)? opts.lastShutImg: opts.shutImg);
jq("#"+tid+num).css('background-image', "url('"+((last)? opts.lastShutImg: opts.shutImg)+"')");
for (var x=0, xl=mapa[num].length;x<xl;x++){
var mnx = mapa[num][x];
jq("#"+tid+mnx).parents("tr").addClass("collapsed");
@@ -72,7 +73,12 @@ with it, as long as you keep this copyright notice on the page
for(i=0; i<l;i++) o[a[i]] = a[i];
for(i in o) r.push(o[i]);
return r;
};
};
try { //ie6 flickering fix
document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}
for (var x=0,xl=map.length; x<xl;x++){//From map of parents, get map of kids
num = map[x];
if (!mapa[num]){
@@ -82,7 +88,7 @@ with it, as long as you keep this copyright notice on the page
}
buildText(0,"");
jq("tbody tr", this).each(function(i){//Inject the images into the column to make it work
jq(this).children("td").eq(opts.column).prepend(mapb[i]);
jq(this).children("td").eq(opts.column).children("div").prepend(mapb[i]);
});
if(opts.state) collarr = cget(tid);
if (!collarr.length){
@@ -95,7 +101,7 @@ with it, as long as you keep this copyright notice on the page
}
if (collarr.length){
for (var y=0,yl=collarr.length;y<yl;y++){
collapseKids(collarr[y], $("#"+tid+collarr[y]+ ".parimg").attr("src")==opts.lastOpenImg);
collapseKids(collarr[y], $("#"+tid+collarr[y]+ ".parimg").attr("last")==1);
}
}
stripe();
@@ -104,11 +110,11 @@ with it, as long as you keep this copyright notice on the page
jqt.click(function(){
var num = parseInt(jqt.attr("id").substr(tid.length));//Number of the row
if (jqt.parents("tr").next().is(".collapsed")){//If the table row directly below is collapsed
expandKids(num, (jqt.attr("src")==opts.lastShutImg));//Then expand all children not in collarr
if(opts.state){creset(num,true);}//If state is set, store in cookie
expandKids(num, jqt.attr("last")==1);//Then expand all children not in collarr
if(opts.state){creset(num,true);}//If state is set, store in cookie
}else{//Collapse all and set image to opts.shutImg or opts.lastShutImg on parents
collapseKids(num, (jqt.attr("src")==opts.lastOpenImg));
if(opts.state){creset(num,false);}//If state is set, store in cookie
collapseKids(num, jqt.attr("last")==1);
if(opts.state){creset(num,false);}//If state is set, store in cookie
}
stripe();//Restripe the rows
});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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

View 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 = '&shy;<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);

View 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]);
}
}

View 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;
}));

View 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

View File

@@ -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));

View File

@@ -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 ? '&nbsp<font face="webdings">5</font>' : '&nbsp;&#x25B4;';
sortrevind.innerHTML = '&nbsp;&#x25B2;';
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 ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;';
sortfwdind.innerHTML = '&nbsp;&#x25BC;';
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 ? '&nbsp<font face="webdings">6</font>;' : '&nbsp;&#x25BE;';
sortfwdind.innerHTML = '&nbsp;&#x25BC;';
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);
}
};

View File

@@ -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 ? '&nbsp<font face="webdings">5</font>' : '&nbsp;&#x25B4;';
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 ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;';
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 ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;';
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);
}
};

View File

@@ -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; };