first commit

This commit is contained in:
dev-chiefworks
2022-05-31 16:21:53 -04:00
commit f76abffdcd
5978 changed files with 1078901 additions and 0 deletions
+205
View File
@@ -0,0 +1,205 @@
/*!
* Bootstrap Context Menu
* Author: @sydcanem
* https://github.com/sydcanem/bootstrap-contextmenu
*
* Inspired by Bootstrap's dropdown plugin.
* Bootstrap (http://getbootstrap.com).
*
* Licensed under MIT
* ========================================================= */
;(function($) {
'use strict';
/* CONTEXTMENU CLASS DEFINITION
* ============================ */
var toggle = '[data-toggle="context"]';
var ContextMenu = function (element, options) {
this.$element = $(element);
this.before = options.before || this.before;
this.onItem = options.onItem || this.onItem;
this.scopes = options.scopes || null;
if (options.target) {
this.$element.data('target', options.target);
}
this.listen();
};
ContextMenu.prototype = {
constructor: ContextMenu
,show: function(e) {
var $menu
, evt
, tp
, items
, relatedTarget = { relatedTarget: this };
if (this.isDisabled()) return;
this.closemenu();
if (!this.before.call(this,e,$(e.currentTarget))) return;
$menu = this.getMenu();
$menu.trigger(evt = $.Event('show.bs.context', relatedTarget));
tp = this.getPosition(e, $menu);
items = 'li:not(.divider)';
$menu.attr('style', '')
.css(tp)
.addClass('open')
.on('click.context.data-api', items, $.proxy(this.onItem, this, $(e.currentTarget)))
.trigger('shown.bs.context', relatedTarget);
// Delegating the `closemenu` only on the currently opened menu.
// This prevents other opened menus from closing.
$('html')
.on('click.context.data-api', $menu.selector, $.proxy(this.closemenu, this));
return false;
}
,closemenu: function(e) {
var $menu
, evt
, items
, relatedTarget;
$menu = this.getMenu();
if(!$menu.hasClass('open')) return;
relatedTarget = { relatedTarget: this };
$menu.trigger(evt = $.Event('hide.bs.context', relatedTarget));
items = 'li:not(.divider)';
$menu.removeClass('open')
.off('click.context.data-api', items)
.trigger('hidden.bs.context', relatedTarget);
$('html')
.off('click.context.data-api', $menu.selector);
// Don't propagate click event so other currently
// opened menus won't close.
return false;
}
,keydown: function(e) {
if (e.which == 27) this.closemenu(e);
}
,before: function(e) {
return true;
}
,onItem: function(e) {
return true;
}
,listen: function () {
this.$element.on('contextmenu.context.data-api', this.scopes, $.proxy(this.show, this));
$('html').on('click.context.data-api', $.proxy(this.closemenu, this));
$('html').on('keydown.context.data-api', $.proxy(this.keydown, this));
}
,destroy: function() {
this.$element.off('.context.data-api').removeData('context');
$('html').off('.context.data-api');
}
,isDisabled: function() {
return this.$element.hasClass('disabled') ||
this.$element.attr('disabled');
}
,getMenu: function () {
var selector = this.$element.data('target')
, $menu;
if (!selector) {
selector = this.$element.attr('href');
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, ''); //strip for ie7
}
$menu = $(selector);
return $menu && $menu.length ? $menu : this.$element.find(selector);
}
,getPosition: function(e, $menu) {
var mouseX = e.clientX
, mouseY = e.clientY
, boundsX = $(window).width()
, boundsY = $(window).height()
, menuWidth = $menu.find('.dropdown-menu').outerWidth()
, menuHeight = $menu.find('.dropdown-menu').outerHeight()
, tp = {"position":"absolute","z-index":9999}
, Y, X, parentOffset;
if (mouseY + menuHeight > boundsY) {
Y = {"top": mouseY - menuHeight + $(window).scrollTop()};
} else {
Y = {"top": mouseY + $(window).scrollTop()};
}
if ((mouseX + menuWidth > boundsX) && ((mouseX - menuWidth) > 0)) {
X = {"left": mouseX - menuWidth + $(window).scrollLeft()};
} else {
X = {"left": mouseX + $(window).scrollLeft()};
}
// If context-menu's parent is positioned using absolute or relative positioning,
// the calculated mouse position will be incorrect.
// Adjust the position of the menu by its offset parent position.
parentOffset = $menu.offsetParent().offset();
X.left = X.left - parentOffset.left;
Y.top = Y.top - parentOffset.top;
return $.extend(tp, Y, X);
}
};
/* CONTEXT MENU PLUGIN DEFINITION
* ========================== */
$.fn.contextmenu = function (option,e) {
return this.each(function () {
var $this = $(this)
, data = $this.data('context')
, options = (typeof option == 'object') && option;
if (!data) $this.data('context', (data = new ContextMenu($this, options)));
if (typeof option == 'string') data[option].call(data, e);
});
};
$.fn.contextmenu.Constructor = ContextMenu;
/* APPLY TO STANDARD CONTEXT MENU ELEMENTS
* =================================== */
$(document)
.on('contextmenu.context.data-api', function() {
$(toggle).each(function () {
var data = $(this).data('context');
if (!data) return;
data.closemenu();
});
})
.on('contextmenu.context.data-api', toggle, function(e) {
$(this).contextmenu('show', e);
e.preventDefault();
e.stopPropagation();
});
}(jQuery));
+117
View File
@@ -0,0 +1,117 @@
/*!
* jQuery Cookie Plugin v1.4.1
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2006, 2014 Klaus Hartl
* Released under the MIT license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// CommonJS
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
var pluses = /\+/g;
function encode(s) {
return config.raw ? s : encodeURIComponent(s);
}
function decode(s) {
return config.raw ? s : decodeURIComponent(s);
}
function stringifyCookieValue(value) {
return encode(config.json ? JSON.stringify(value) : String(value));
}
function parseCookieValue(s) {
if (s.indexOf('"') === 0) {
// This is a quoted cookie as according to RFC2068, unescape...
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
}
try {
// Replace server-side written pluses with spaces.
// If we can't decode the cookie, ignore it, it's unusable.
// If we can't parse the cookie, ignore it, it's unusable.
s = decodeURIComponent(s.replace(pluses, ' '));
return config.json ? JSON.parse(s) : s;
} catch(e) {}
}
function read(s, converter) {
var value = config.raw ? s : parseCookieValue(s);
return $.isFunction(converter) ? converter(value) : value;
}
var config = $.cookie = function (key, value, options) {
// Write
if (arguments.length > 1 && !$.isFunction(value)) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setTime(+t + days * 864e+5);
}
return (document.cookie = [
encode(key), '=', stringifyCookieValue(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// Read
var result = key ? undefined : {};
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling $.cookie().
var cookies = document.cookie ? document.cookie.split('; ') : [];
for (var i = 0, l = cookies.length; i < l; i++) {
var parts = cookies[i].split('=');
var name = decode(parts.shift());
var cookie = parts.join('=');
if (key && key === name) {
// If second argument (value) is a function it's a converter...
result = read(cookie, value);
break;
}
// Prevent storing a cookie that we couldn't decode.
if (!key && (cookie = read(cookie)) !== undefined) {
result[name] = cookie;
}
}
return result;
};
config.defaults = {};
$.removeCookie = function (key, options) {
if ($.cookie(key) === undefined) {
return false;
}
// Must not alter options, thus extending a fresh object...
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
return !$.cookie(key);
};
}));
+13
View File
@@ -0,0 +1,13 @@
(function(d){function q(a){void 0==window.DOMParser&&window.ActiveXObject&&(DOMParser=function(){},DOMParser.prototype.parseFromString=function(a){var b=new ActiveXObject("Microsoft.XMLDOM");b.async="false";b.loadXML(a);return b});try{var b=(new DOMParser).parseFromString(a,"text/xml");if(d.isXMLDoc(b)){if(1==d("parsererror",b).length)throw"Error: "+d(b).text();}else throw"Unable to parse XML";return b}catch(e){a=void 0==e.name?e:e.name+": "+e.message,d(document).trigger("xmlParseError",[a])}}function m(a,
b){var e=!0;if("string"===typeof b)return d.isFunction(a.test)?a.test(b):a==b;d.each(a,function(c){if(void 0===b[c])return e=!1;e="object"===typeof b[c]&&null!==b[c]?e&&m(a[c],b[c]):a[c]&&d.isFunction(a[c].test)?e&&a[c].test(b[c]):e&&a[c]==b[c]});return e}function r(a,b){if(d.isFunction(a))return a(b);if(d.isFunction(a.url.test)){if(!a.url.test(b.url))return null}else{var e=a.url.indexOf("*");if(a.url!==b.url&&-1===e||!(new RegExp(a.url.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".+"))).test(b.url))return null}return a.data&&
b.data&&!m(a.data,b.data)||a&&a.type&&a.type.toLowerCase()!=b.type.toLowerCase()?null:a}function s(a,b,e){var c=function(c){return function(){return function(){var c;this.status=a.status;this.statusText=a.statusText;this.readyState=4;d.isFunction(a.response)&&a.response(e);"json"==b.dataType&&"object"==typeof a.responseText?this.responseText=JSON.stringify(a.responseText):"xml"==b.dataType?"string"==typeof a.responseXML?(this.responseXML=q(a.responseXML),this.responseText=a.responseXML):this.responseXML=
a.responseXML:this.responseText=a.responseText;if("number"==typeof a.status||"string"==typeof a.status)this.status=a.status;"string"===typeof a.statusText&&(this.statusText=a.statusText);c=this.onreadystatechange||this.onload;d.isFunction(c)?(a.isTimeout&&(this.status=-1),c.call(this,a.isTimeout?"timeout":void 0)):a.isTimeout&&(this.status=-1)}.apply(c)}}(this);a.proxy?k({global:!1,url:a.proxy,type:a.proxyType,data:a.data,dataType:"script"===b.dataType?"text/plain":b.dataType,complete:function(b){a.responseXML=
b.responseXML;a.responseText=b.responseText;a.status===d.mockjaxSettings.status&&(a.status=b.status);a.statusText===d.mockjaxSettings.statusText&&(a.statusText=b.statusText);this.responseTimer=setTimeout(c,a.responseTime||0)}}):!1===b.async?c():this.responseTimer=setTimeout(c,a.responseTime||50)}function t(a,b,e,c){a=d.extend(!0,{},d.mockjaxSettings,a);"undefined"===typeof a.headers&&(a.headers={});a.contentType&&(a.headers["content-type"]=a.contentType);return{status:a.status,statusText:a.statusText,
readyState:1,open:function(){},send:function(){c.fired=!0;s.call(this,a,b,e)},abort:function(){clearTimeout(this.responseTimer)},setRequestHeader:function(b,c){a.headers[b]=c},getResponseHeader:function(b){if(a.headers&&a.headers[b])return a.headers[b];if("last-modified"==b.toLowerCase())return a.lastModified||(new Date).toString();if("etag"==b.toLowerCase())return a.etag||"";if("content-type"==b.toLowerCase())return a.contentType||"text/plain"},getAllResponseHeaders:function(){var b="";d.each(a.headers,
function(a,c){b+=a+": "+c+"\n"});return b}}}function u(a,b,e){"GET"===a.type.toUpperCase()?g.test(a.url)||(a.url+=(/\?/.test(a.url)?"&":"?")+(a.jsonp||"callback")+"=?"):a.data&&g.test(a.data)||(a.data=(a.data?a.data+"&":"")+(a.jsonp||"callback")+"=?");a.dataType="json";if(a.data&&g.test(a.data)||g.test(a.url)){v(a,b,e);var c=/^(\w+:)?\/\/([^\/?#]+)/.exec(a.url),c=c&&(c[1]&&c[1]!==location.protocol||c[2]!==location.host);a.dataType="script";if("GET"===a.type.toUpperCase()&&c){var c=e&&e.context||a,
f=null;b.response&&d.isFunction(b.response)?b.response(e):"object"===typeof b.responseText?d.globalEval("("+JSON.stringify(b.responseText)+")"):d.globalEval("("+b.responseText+")");n(a,c,b);p(a,c,b);d.Deferred&&(f=new d.Deferred,"object"==typeof b.responseText?f.resolveWith(c,[b.responseText]):f.resolveWith(c,[d.parseJSON(b.responseText)]));return(a=f)?a:!0}}return null}function v(a,b,d){var c=d&&d.context||a,f=a.jsonpCallback||"jsonp"+w++;a.data&&(a.data=(a.data+"").replace(g,"="+f+"$1"));a.url=
a.url.replace(g,"="+f+"$1");window[f]=window[f]||function(d){data=d;n(a,c,b);p(a,c,b);window[f]=void 0;try{delete window[f]}catch(e){}head&&head.removeChild(script)}}function n(a,b,e){a.success&&a.success.call(b,e.responseText||"",status,{});a.global&&(b=[{},a],(a.context?d(a.context):d.event).trigger("ajaxSuccess",b))}function p(a,b){a.complete&&a.complete.call(b,{},status);if(a.global){var e=[{},a];("ajaxComplete".context?d("ajaxComplete".context):d.event).trigger(e,void 0)}a.global&&!--d.active&&
d.event.trigger("ajaxStop")}function x(a,b){if(a.url instanceof RegExp&&a.hasOwnProperty("urlParams")){var d=a.url.exec(b.url);if(1!==d.length){d.shift();var c=0,f=Math.min(d.length,a.urlParams.length),h={};for(c;c<f;c++)h[a.urlParams[c]]=d[c];b.urlParams=h}}}var k=d.ajax,h=[],l=[],g=/=\?(&|$)/,w=(new Date).getTime();d.extend({ajax:function(a,b){var e,c,f;"object"===typeof a?(b=a,a=void 0):b.url=a;c=d.extend(!0,{},d.ajaxSettings,b);for(var g=0;g<h.length;g++)if(h[g]&&(f=r(h[g],c))){l.push(c);d.mockjaxSettings.log(f,
c);if("jsonp"===c.dataType&&(e=u(c,f,b)))return e;f.cache=c.cache;f.timeout=c.timeout;f.global=c.global;x(f,b);(function(a,b,c,f){e=k.call(d,d.extend(!0,{},c,{xhr:function(){return t(a,b,c,f)}}))})(f,c,b,h[g]);return e}if(!0===d.mockjaxSettings.throwUnmocked)throw"AJAX not mocked: "+b.url;return k.apply(d,[b])}});d.mockjaxSettings={log:function(a,b){if(!1!==a.logging&&("undefined"!==typeof a.logging||!1!==d.mockjaxSettings.logging)&&window.console&&console.log){var e="MOCK "+b.type.toUpperCase()+
": "+b.url,c=d.extend({},b);if("function"===typeof console.log)console.log(e,c);else try{console.log(e+" "+JSON.stringify(c))}catch(f){console.log(e)}}},logging:!0,status:200,statusText:"OK",responseTime:500,isTimeout:!1,throwUnmocked:!1,contentType:"text/plain",response:"",responseText:"",responseXML:"",proxy:"",proxyType:"GET",lastModified:null,etag:"",headers:{etag:"IJF@H#@923uf8023hFO@I#H#","content-type":"text/plain"}};d.mockjax=function(a){var b=h.length;h[b]=a;return b};d.mockjaxClear=function(a){1==
arguments.length?h[a]=null:h=[];l=[]};d.mockjax.handler=function(a){if(1==arguments.length)return h[a]};d.mockjax.mockedAjaxCalls=function(){return l}})(jQuery);
+8
View File
@@ -0,0 +1,8 @@
/*!
* jQuery Mousewheel 3.1.13
*
* Copyright 2015 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
+1
View File
@@ -0,0 +1 @@
"use strict";!function(a){jQuery.sessionTimeout=function(b){function c(){i||(a.ajax({type:"POST",url:h.keepAliveUrl,data:h.ajaxData}),i=!0,setTimeout(function(){i=!1},h.keepAliveInterval))}function d(){clearTimeout(f),h.keepAlive&&c(),f=setTimeout(function(){"function"!=typeof h.onWarn?a("#sessionTimeout-dialog").modal("show"):h.onWarn("warn"),e()},h.warnAfter)}function e(){clearTimeout(f),f=setTimeout(function(){"function"!=typeof h.onRedir?(e("start"),window.location=h.redirUrl):h.onRedir()},h.redirAfter-h.warnAfter)}var f,g={heading:"h5",title:'Session timeout notification',message:"Your session is about to expire.",keepBtnText:"Stay connected",keepBtnClass:"btn btn-primary",logoutBtnText:"Logout",logoutBtnClass:"btn btn-danger",keepAliveUrl:"/keep-alive",ajaxData:"",redirUrl:"/timed-out",logoutUrl:"/log-out",warnAfter:9e5,redirAfter:12e5,keepAliveInterval:5e3,keepAlive:!0,ignoreUserActivity:!1,onWarn:!1,onRedir:!1},h=g;if(b&&(h=a.extend(g,b)),h.warnAfter>=h.redirAfter)return("undefined"!=typeof console||"undefined"!=typeof console.error)&&console.error('Bootstrap-session-timeout plugin is miss-configured. Option "redirAfter" must be equal or greater than "warnAfter".'),!1;"function"!=typeof h.onWarn&&(a("body").append('<div class="modal fade" id="sessionTimeout-dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><'+h.heading+' class="modal-title">'+h.title+'</'+h.message+'></div><div class="modal-body">'+h.message+'</div><div class="modal-footer"><button id="sessionTimeout-dialog-keepalive" type="button" class="'+h.keepBtnClass+'" data-dismiss="modal">'+h.keepBtnText+'</button><button id="sessionTimeout-dialog-logout" type="button" class="'+h.logoutBtnClass+'">'+h.logoutBtnText+'</button></div></div></div></div>'),a("#sessionTimeout-dialog-logout").on("click",function(){window.location=h.logoutUrl}),a("#sessionTimeout-dialog").on("hide.bs.modal",function(){d()})),h.ignoreUserActivity||a(document).on("keyup mouseup mousemove touchend touchmove",function(){d()});var i=!1;d()}}(jQuery);