mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-19 21:09:41 +00:00
Reimpl custom css - Open Sans is back!
This commit is contained in:
28
RIGS/static/css/ajax-bootstrap-select.min.css
vendored
Normal file
28
RIGS/static/css/ajax-bootstrap-select.min.css
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*!
|
||||
* Ajax Bootstrap Select
|
||||
*
|
||||
* Extends existing [Bootstrap Select] implementations by adding the ability to search via AJAX requests as you type. Originally for CROSCON.
|
||||
*
|
||||
* @version 1.4.5
|
||||
* @author Adam Heim - https://github.com/truckingsim
|
||||
* @link https://github.com/truckingsim/Ajax-Bootstrap-Select
|
||||
* @copyright 2019 Adam Heim
|
||||
* @license Released under the MIT license.
|
||||
*
|
||||
* Contributors:
|
||||
* Mark Carver - https://github.com/markcarver
|
||||
*
|
||||
* Last build: 2019-04-23 12:18:56 PM EDT
|
||||
*/
|
||||
.bootstrap-select .status {
|
||||
background: #f0f0f0;
|
||||
clear: both;
|
||||
color: #999;
|
||||
font-size: 11px;
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
margin-bottom: -5px;
|
||||
padding: 10px 20px; }
|
||||
|
||||
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFqYXgtYm9vdHN0cmFwLXNlbGVjdC5taW4uY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7RUFlRTtBQUFDO0VBQTBCLG1CQUFrQjtFQUFDLFdBQVU7RUFBQyxXQUFVO0VBQUMsZUFBYztFQUFDLGtCQUFpQjtFQUFDLGdCQUFlO0VBQUMsY0FBYTtFQUFDLG1CQUFrQjtFQUFDLGtCQUFpQixFQUFBIiwiZmlsZSI6ImFqYXgtYm9vdHN0cmFwLXNlbGVjdC5taW4uY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLyohXG4gKiBBamF4IEJvb3RzdHJhcCBTZWxlY3RcbiAqXG4gKiBFeHRlbmRzIGV4aXN0aW5nIFtCb290c3RyYXAgU2VsZWN0XSBpbXBsZW1lbnRhdGlvbnMgYnkgYWRkaW5nIHRoZSBhYmlsaXR5IHRvIHNlYXJjaCB2aWEgQUpBWCByZXF1ZXN0cyBhcyB5b3UgdHlwZS4gT3JpZ2luYWxseSBmb3IgQ1JPU0NPTi5cbiAqXG4gKiBAdmVyc2lvbiAxLjQuNVxuICogQGF1dGhvciBBZGFtIEhlaW0gLSBodHRwczovL2dpdGh1Yi5jb20vdHJ1Y2tpbmdzaW1cbiAqIEBsaW5rIGh0dHBzOi8vZ2l0aHViLmNvbS90cnVja2luZ3NpbS9BamF4LUJvb3RzdHJhcC1TZWxlY3RcbiAqIEBjb3B5cmlnaHQgMjAxOSBBZGFtIEhlaW1cbiAqIEBsaWNlbnNlIFJlbGVhc2VkIHVuZGVyIHRoZSBNSVQgbGljZW5zZS5cbiAqXG4gKiBDb250cmlidXRvcnM6XG4gKiAgIE1hcmsgQ2FydmVyIC0gaHR0cHM6Ly9naXRodWIuY29tL21hcmtjYXJ2ZXJcbiAqXG4gKiBMYXN0IGJ1aWxkOiAyMDE5LTA0LTIzIDEyOjE4OjU2IFBNIEVEVFxuICovLmJvb3RzdHJhcC1zZWxlY3QgLnN0YXR1c3tiYWNrZ3JvdW5kOiNmMGYwZjA7Y2xlYXI6Ym90aDtjb2xvcjojOTk5O2ZvbnQtc2l6ZToxMXB4O2ZvbnQtc3R5bGU6aXRhbGljO2ZvbnQtd2VpZ2h0OjUwMDtsaW5lLWhlaWdodDoxO21hcmdpbi1ib3R0b206LTVweDtwYWRkaW5nOjEwcHggMjBweH0iXX0= */
|
||||
23
RIGS/static/css/autocomplete.css
Normal file
23
RIGS/static/css/autocomplete.css
Normal file
@@ -0,0 +1,23 @@
|
||||
.autocomplete {
|
||||
background: white;
|
||||
z-index: 1000;
|
||||
font: 14px/22px "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid rgba(50, 50, 50, 0.6); }
|
||||
|
||||
.autocomplete * {
|
||||
font: inherit; }
|
||||
|
||||
.autocomplete > div {
|
||||
padding: 0 4px; }
|
||||
|
||||
.autocomplete .group {
|
||||
background: #eee; }
|
||||
|
||||
.autocomplete > div:hover:not(.group),
|
||||
.autocomplete > div.selected {
|
||||
background: #81ca91;
|
||||
cursor: pointer; }
|
||||
|
||||
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF1dG9jb21wbGV0ZS5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0E7RUFDSSxpQkFBaUI7RUFDakIsYUFBYTtFQUNiLDRHQUE0RztFQUM1RyxjQUFjO0VBQ2Qsc0JBQXNCO0VBQ3RCLHVDQUF1QyxFQUFBOztBQUczQztFQUNJLGFBQWEsRUFBQTs7QUFHakI7RUFDSSxjQUFjLEVBQUE7O0FBR2xCO0VBQ0ksZ0JBQWdCLEVBQUE7O0FBR3BCOztFQUVJLG1CQUFtQjtFQUNuQixlQUFlLEVBQUEiLCJmaWxlIjoiYXV0b2NvbXBsZXRlLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIlxyXG4uYXV0b2NvbXBsZXRlIHtcclxuICAgIGJhY2tncm91bmQ6IHdoaXRlO1xyXG4gICAgei1pbmRleDogMTAwMDtcclxuICAgIGZvbnQ6IDE0cHgvMjJweCBcIi1hcHBsZS1zeXN0ZW1cIiwgQmxpbmtNYWNTeXN0ZW1Gb250LCBcIlNlZ29lIFVJXCIsIFJvYm90bywgXCJIZWx2ZXRpY2EgTmV1ZVwiLCBBcmlhbCwgc2Fucy1zZXJpZjtcclxuICAgIG92ZXJmbG93OiBhdXRvO1xyXG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcclxuICAgIGJvcmRlcjogMXB4IHNvbGlkIHJnYmEoNTAsIDUwLCA1MCwgMC42KTtcclxufVxyXG5cclxuLmF1dG9jb21wbGV0ZSAqIHtcclxuICAgIGZvbnQ6IGluaGVyaXQ7XHJcbn1cclxuXHJcbi5hdXRvY29tcGxldGUgPiBkaXYge1xyXG4gICAgcGFkZGluZzogMCA0cHg7XHJcbn1cclxuXHJcbi5hdXRvY29tcGxldGUgLmdyb3VwIHtcclxuICAgIGJhY2tncm91bmQ6ICNlZWU7XHJcbn1cclxuXHJcbi5hdXRvY29tcGxldGUgPiBkaXY6aG92ZXI6bm90KC5ncm91cCksXHJcbi5hdXRvY29tcGxldGUgPiBkaXYuc2VsZWN0ZWQge1xyXG4gICAgYmFja2dyb3VuZDogIzgxY2E5MTtcclxuICAgIGN1cnNvcjogcG9pbnRlcjtcclxufVxyXG5cclxuIl19 */
|
||||
248
RIGS/static/css/bootstrap-datetimepicker.min.css
vendored
Normal file
248
RIGS/static/css/bootstrap-datetimepicker.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,2 +1,39 @@
|
||||
body{margin:0}.main-table{width:100%;border-collapse:collapse}.client-header{background-image:url(https://www.nottinghamtec.co.uk/imgs/wof2014-1.jpg);background-color:#222;background-repeat:no-repeat;background-position:center;width:100%;margin-bottom:28px}.client-header .logos{width:100%;max-width:640px}.client-header img{height:110px}.content-container{width:100%}.content-container .content{font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;width:100%;max-width:600px;padding:10px;text-align:left}.content-container .content .button-container{width:100%}.content-container .content .button-container .button{padding:6px 12px;background-color:#357ebf;border-radius:4px}.content-container .content .button-container .button a{color:#fff;text-decoration:none}
|
||||
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVtYWlsLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsS0FDRSxRQUFRLENBR1YsWUFDRSxVQUFPLENBQ1Asd0JBQWlCLENBSW5CLGVBQ0Usd0VBQWtCLENBQ2xCLHFCQUFrQixDQUNsQiwyQkFBbUIsQ0FDbkIsMEJBQXFCLENBRXJCLFVBQU8sQ0FFUCxrQkFBZSxDQVJqQixzQkFXSSxVQUFPLENBQ1AsZUFBVyxDQVpmLG1CQWdCSSxZQUFRLENBSVosbUJBQ0UsVUFBTyxDQURULDRCQUlJLG1FQUFhLENBRWIsVUFBTyxDQUNQLGVBQVcsQ0FDWCxZQUFTLENBQ1QsZUFBWSxDQVRoQiw4Q0FZTSxVQUFPLENBWmIsc0RBZVEsZ0JBQVMsQ0FDVCx3QkFoRE8sQ0FpRFAsaUJBQWUsQ0FqQnZCLHdEQW9CVSxVQUFPLENBQ1Asb0JBQWlCIiwiZmlsZSI6ImVtYWlsLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIiRidXR0b25fY29sb3I6ICMzNTdlYmY7XG5cbmJvZHl7XG4gIG1hcmdpbjogMHB4O1xufVxuXG4ubWFpbi10YWJsZXtcbiAgd2lkdGg6IDEwMCU7XG4gIGJvcmRlci1jb2xsYXBzZTogY29sbGFwc2U7XG5cbn1cblxuLmNsaWVudC1oZWFkZXIge1xuICBiYWNrZ3JvdW5kLWltYWdlOiB1cmwoXCJodHRwczovL3d3dy5ub3R0aW5naGFtdGVjLmNvLnVrL2ltZ3Mvd29mMjAxNC0xLmpwZ1wiKTtcbiAgYmFja2dyb3VuZC1jb2xvcjogIzIyMjtcbiAgYmFja2dyb3VuZC1yZXBlYXQ6IG5vLXJlcGVhdDtcbiAgYmFja2dyb3VuZC1wb3NpdGlvbjogY2VudGVyO1xuXG4gIHdpZHRoOiAxMDAlO1xuXG4gIG1hcmdpbi1ib3R0b206IDI4cHg7XG5cbiAgLmxvZ29ze1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIG1heC13aWR0aDogNjQwcHg7XG4gIH1cblxuICBpbWcge1xuICAgIGhlaWdodDogMTEwcHg7XG4gIH1cbn1cblxuLmNvbnRlbnQtY29udGFpbmVye1xuICB3aWR0aDogMTAwJTtcblxuICAuY29udGVudCB7XG4gICAgZm9udC1mYW1pbHk6IFwiT3BlbiBTYW5zXCIsIFwiSGVsdmV0aWNhIE5ldWVcIiwgSGVsdmV0aWNhLCBBcmlhbCwgc2Fucy1zZXJpZjtcblxuICAgIHdpZHRoOiAxMDAlO1xuICAgIG1heC13aWR0aDogNjAwcHg7XG4gICAgcGFkZGluZzogMTBweDtcbiAgICB0ZXh0LWFsaWduOiBsZWZ0O1xuXG4gICAgLmJ1dHRvbi1jb250YWluZXJ7XG4gICAgICB3aWR0aDogMTAwJTtcblxuICAgICAgLmJ1dHRvbiB7XG4gICAgICAgIHBhZGRpbmc6IDZweCAxMnB4O1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAkYnV0dG9uX2NvbG9yO1xuICAgICAgICBib3JkZXItcmFkaXVzOiA0cHg7XG5cbiAgICAgICAgYSB7XG4gICAgICAgICAgY29sb3I6ICNmZmY7XG4gICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xuICAgICAgICB9XG5cbiAgICAgIH1cblxuICAgIH1cblxuICB9XG59XG5cbiJdfQ== */
|
||||
body {
|
||||
margin: 0px; }
|
||||
|
||||
.main-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse; }
|
||||
|
||||
.client-header {
|
||||
background-image: url("https://www.nottinghamtec.co.uk/imgs/wof2014-1.jpg");
|
||||
background-color: #222;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
width: 100%;
|
||||
margin-bottom: 28px; }
|
||||
.client-header .logos {
|
||||
width: 100%;
|
||||
max-width: 640px; }
|
||||
.client-header img {
|
||||
height: 110px; }
|
||||
|
||||
.content-container {
|
||||
width: 100%; }
|
||||
.content-container .content {
|
||||
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
padding: 10px;
|
||||
text-align: left; }
|
||||
.content-container .content .button-container {
|
||||
width: 100%; }
|
||||
.content-container .content .button-container .button {
|
||||
padding: 6px 12px;
|
||||
background-color: #357ebf;
|
||||
border-radius: 4px; }
|
||||
.content-container .content .button-container .button a {
|
||||
color: #fff;
|
||||
text-decoration: none; }
|
||||
|
||||
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVtYWlsLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7RUFDRSxXQUFXLEVBQUE7O0FBR2I7RUFDRSxXQUFXO0VBQ1gseUJBQXlCLEVBQUE7O0FBSTNCO0VBQ0UsMkVBQTJFO0VBQzNFLHNCQUFzQjtFQUN0Qiw0QkFBNEI7RUFDNUIsMkJBQTJCO0VBRTNCLFdBQVc7RUFFWCxtQkFBbUIsRUFBQTtFQVJyQjtJQVdJLFdBQVc7SUFDWCxnQkFBZ0IsRUFBQTtFQVpwQjtJQWdCSSxhQUFhLEVBQUE7O0FBSWpCO0VBQ0UsV0FBVyxFQUFBO0VBRGI7SUFJSSx3RUFBd0U7SUFFeEUsV0FBVztJQUNYLGdCQUFnQjtJQUNoQixhQUFhO0lBQ2IsZ0JBQWdCLEVBQUE7SUFUcEI7TUFZTSxXQUFXLEVBQUE7TUFaakI7UUFlUSxpQkFBaUI7UUFDakIseUJBaERjO1FBaURkLGtCQUFrQixFQUFBO1FBakIxQjtVQW9CVSxXQUFXO1VBQ1gscUJBQXFCLEVBQUEiLCJmaWxlIjoiZW1haWwuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiJGJ1dHRvbl9jb2xvcjogIzM1N2ViZjtcblxuYm9keXtcbiAgbWFyZ2luOiAwcHg7XG59XG5cbi5tYWluLXRhYmxle1xuICB3aWR0aDogMTAwJTtcbiAgYm9yZGVyLWNvbGxhcHNlOiBjb2xsYXBzZTtcblxufVxuXG4uY2xpZW50LWhlYWRlciB7XG4gIGJhY2tncm91bmQtaW1hZ2U6IHVybChcImh0dHBzOi8vd3d3Lm5vdHRpbmdoYW10ZWMuY28udWsvaW1ncy93b2YyMDE0LTEuanBnXCIpO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjIyO1xuICBiYWNrZ3JvdW5kLXJlcGVhdDogbm8tcmVwZWF0O1xuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiBjZW50ZXI7XG5cbiAgd2lkdGg6IDEwMCU7XG5cbiAgbWFyZ2luLWJvdHRvbTogMjhweDtcblxuICAubG9nb3N7XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgbWF4LXdpZHRoOiA2NDBweDtcbiAgfVxuXG4gIGltZyB7XG4gICAgaGVpZ2h0OiAxMTBweDtcbiAgfVxufVxuXG4uY29udGVudC1jb250YWluZXJ7XG4gIHdpZHRoOiAxMDAlO1xuXG4gIC5jb250ZW50IHtcbiAgICBmb250LWZhbWlseTogXCJPcGVuIFNhbnNcIiwgXCJIZWx2ZXRpY2EgTmV1ZVwiLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmO1xuXG4gICAgd2lkdGg6IDEwMCU7XG4gICAgbWF4LXdpZHRoOiA2MDBweDtcbiAgICBwYWRkaW5nOiAxMHB4O1xuICAgIHRleHQtYWxpZ246IGxlZnQ7XG5cbiAgICAuYnV0dG9uLWNvbnRhaW5lcntcbiAgICAgIHdpZHRoOiAxMDAlO1xuXG4gICAgICAuYnV0dG9uIHtcbiAgICAgICAgcGFkZGluZzogNnB4IDEycHg7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICRidXR0b25fY29sb3I7XG4gICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDtcblxuICAgICAgICBhIHtcbiAgICAgICAgICBjb2xvcjogI2ZmZjtcbiAgICAgICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgICAgIH1cblxuICAgICAgfVxuXG4gICAgfVxuXG4gIH1cbn1cblxuIl19 */
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
|
||||
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJpZS5jc3MiLCJzb3VyY2VzQ29udGVudCI6W119 */
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,196 +3,4 @@
|
||||
* 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.Alert = 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'alert';
|
||||
var VERSION = '4.4.1';
|
||||
var DATA_KEY = 'bs.alert';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var Selector = {
|
||||
DISMISS: '[data-dismiss="alert"]'
|
||||
};
|
||||
var Event = {
|
||||
CLOSE: "close" + EVENT_KEY,
|
||||
CLOSED: "closed" + EVENT_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
ALERT: 'alert',
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Alert =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function Alert(element) {
|
||||
this._element = element;
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Alert.prototype;
|
||||
|
||||
// Public
|
||||
_proto.close = function close(element) {
|
||||
var rootElement = this._element;
|
||||
|
||||
if (element) {
|
||||
rootElement = this._getRootElement(element);
|
||||
}
|
||||
|
||||
var customEvent = this._triggerCloseEvent(rootElement);
|
||||
|
||||
if (customEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._removeElement(rootElement);
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getRootElement = function _getRootElement(element) {
|
||||
var selector = Util.getSelectorFromElement(element);
|
||||
var parent = false;
|
||||
|
||||
if (selector) {
|
||||
parent = document.querySelector(selector);
|
||||
}
|
||||
|
||||
if (!parent) {
|
||||
parent = $(element).closest("." + ClassName.ALERT)[0];
|
||||
}
|
||||
|
||||
return parent;
|
||||
};
|
||||
|
||||
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
||||
var closeEvent = $.Event(Event.CLOSE);
|
||||
$(element).trigger(closeEvent);
|
||||
return closeEvent;
|
||||
};
|
||||
|
||||
_proto._removeElement = function _removeElement(element) {
|
||||
var _this = this;
|
||||
|
||||
$(element).removeClass(ClassName.SHOW);
|
||||
|
||||
if (!$(element).hasClass(ClassName.FADE)) {
|
||||
this._destroyElement(element);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(element);
|
||||
$(element).one(Util.TRANSITION_END, function (event) {
|
||||
return _this._destroyElement(element, event);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
};
|
||||
|
||||
_proto._destroyElement = function _destroyElement(element) {
|
||||
$(element).detach().trigger(Event.CLOSED).remove();
|
||||
} // Static
|
||||
;
|
||||
|
||||
Alert._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $(this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Alert(this);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (config === 'close') {
|
||||
data[config](this);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Alert._handleDismiss = function _handleDismiss(alertInstance) {
|
||||
return function (event) {
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
alertInstance.close(this);
|
||||
};
|
||||
};
|
||||
|
||||
_createClass(Alert, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Alert;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Alert._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Alert;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Alert._jQueryInterface;
|
||||
};
|
||||
|
||||
return Alert;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=alert.js.map
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],t):(e=e||self).Alert=t(e.jQuery,e.Util)}(this,(function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var r=e.fn.alert,o={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},i="alert",l="fade",s="show",a=function(){function r(e){this._element=e}var a,u,f,c=r.prototype;return c.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},c.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},c._getRootElement=function(n){var r=t.getSelectorFromElement(n),o=!1;return r&&(o=document.querySelector(r)),o||(o=e(n).closest("."+i)[0]),o},c._triggerCloseEvent=function(t){var n=e.Event(o.CLOSE);return e(t).trigger(n),n},c._removeElement=function(n){var r=this;if(e(n).removeClass(s),e(n).hasClass(l)){var o=t.getTransitionDurationFromElement(n);e(n).one(t.TRANSITION_END,(function(e){return r._destroyElement(n,e)})).emulateTransitionEnd(o)}else this._destroyElement(n)},c._destroyElement=function(t){e(t).detach().trigger(o.CLOSED).remove()},r._jQueryInterface=function(t){return this.each((function(){var n=e(this),o=n.data("bs.alert");o||(o=new r(this),n.data("bs.alert",o)),"close"===t&&o[t](this)}))},r._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},a=r,f=[{key:"VERSION",get:function(){return"4.4.1"}}],(u=null)&&n(a.prototype,u),f&&n(a,f),r}();return e(document).on(o.CLICK_DATA_API,'[data-dismiss="alert"]',a._handleDismiss(new a)),e.fn.alert=a._jQueryInterface,e.fn.alert.Constructor=a,e.fn.alert.noConflict=function(){return e.fn.alert=r,a._jQueryInterface},a}));
|
||||
File diff suppressed because one or more lines are too long
@@ -1,390 +1 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = global || self, global.autocomplete = factory());
|
||||
}(this, function () { 'use strict';
|
||||
|
||||
/*
|
||||
* https://github.com/kraaden/autocomplete
|
||||
* Copyright (c) 2016 Denys Krasnoshchok
|
||||
* MIT License
|
||||
*/
|
||||
function autocomplete(settings) {
|
||||
// just an alias to minimize JS file size
|
||||
var doc = document;
|
||||
var container = doc.createElement("div");
|
||||
var containerStyle = container.style;
|
||||
var userAgent = navigator.userAgent;
|
||||
var mobileFirefox = userAgent.indexOf("Firefox") !== -1 && userAgent.indexOf("Mobile") !== -1;
|
||||
var debounceWaitMs = settings.debounceWaitMs || 0;
|
||||
var preventSubmit = settings.preventSubmit || false;
|
||||
// 'keyup' event will not be fired on Mobile Firefox, so we have to use 'input' event instead
|
||||
var keyUpEventName = mobileFirefox ? "input" : "keyup";
|
||||
var items = [];
|
||||
var inputValue = "";
|
||||
var minLen = 2;
|
||||
var showOnFocus = settings.showOnFocus;
|
||||
var selected;
|
||||
var keypressCounter = 0;
|
||||
var debounceTimer;
|
||||
if (settings.minLength !== undefined) {
|
||||
minLen = settings.minLength;
|
||||
}
|
||||
if (!settings.input) {
|
||||
throw new Error("input undefined");
|
||||
}
|
||||
var input = settings.input;
|
||||
container.className = "autocomplete " + (settings.className || "");
|
||||
// IOS implementation for fixed positioning has many bugs, so we will use absolute positioning
|
||||
containerStyle.position = "absolute";
|
||||
/**
|
||||
* Detach the container from DOM
|
||||
*/
|
||||
function detach() {
|
||||
var parent = container.parentNode;
|
||||
if (parent) {
|
||||
parent.removeChild(container);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Clear debouncing timer if assigned
|
||||
*/
|
||||
function clearDebounceTimer() {
|
||||
if (debounceTimer) {
|
||||
window.clearTimeout(debounceTimer);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Attach the container to DOM
|
||||
*/
|
||||
function attach() {
|
||||
if (!container.parentNode) {
|
||||
doc.body.appendChild(container);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Check if container for autocomplete is displayed
|
||||
*/
|
||||
function containerDisplayed() {
|
||||
return !!container.parentNode;
|
||||
}
|
||||
/**
|
||||
* Clear autocomplete state and hide container
|
||||
*/
|
||||
function clear() {
|
||||
keypressCounter++;
|
||||
items = [];
|
||||
inputValue = "";
|
||||
selected = undefined;
|
||||
detach();
|
||||
}
|
||||
/**
|
||||
* Update autocomplete position
|
||||
*/
|
||||
function updatePosition() {
|
||||
if (!containerDisplayed()) {
|
||||
return;
|
||||
}
|
||||
containerStyle.height = "auto";
|
||||
containerStyle.width = input.offsetWidth + "px";
|
||||
var maxHeight = 0;
|
||||
var inputRect;
|
||||
function calc() {
|
||||
var docEl = doc.documentElement;
|
||||
var clientTop = docEl.clientTop || doc.body.clientTop || 0;
|
||||
var clientLeft = docEl.clientLeft || doc.body.clientLeft || 0;
|
||||
var scrollTop = window.pageYOffset || docEl.scrollTop;
|
||||
var scrollLeft = window.pageXOffset || docEl.scrollLeft;
|
||||
inputRect = input.getBoundingClientRect();
|
||||
var top = inputRect.top + input.offsetHeight + scrollTop - clientTop;
|
||||
var left = inputRect.left + scrollLeft - clientLeft;
|
||||
containerStyle.top = top + "px";
|
||||
containerStyle.left = left + "px";
|
||||
maxHeight = window.innerHeight - (inputRect.top + input.offsetHeight);
|
||||
if (maxHeight < 0) {
|
||||
maxHeight = 0;
|
||||
}
|
||||
containerStyle.top = top + "px";
|
||||
containerStyle.bottom = "";
|
||||
containerStyle.left = left + "px";
|
||||
containerStyle.maxHeight = maxHeight + "px";
|
||||
}
|
||||
// the calc method must be called twice, otherwise the calculation may be wrong on resize event (chrome browser)
|
||||
calc();
|
||||
calc();
|
||||
if (settings.customize && inputRect) {
|
||||
settings.customize(input, inputRect, container, maxHeight);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Redraw the autocomplete div element with suggestions
|
||||
*/
|
||||
function update() {
|
||||
// delete all children from autocomplete DOM container
|
||||
while (container.firstChild) {
|
||||
container.removeChild(container.firstChild);
|
||||
}
|
||||
// function for rendering autocomplete suggestions
|
||||
var render = function (item, currentValue) {
|
||||
var itemElement = doc.createElement("div");
|
||||
itemElement.textContent = item.label || "";
|
||||
return itemElement;
|
||||
};
|
||||
if (settings.render) {
|
||||
render = settings.render;
|
||||
}
|
||||
// function to render autocomplete groups
|
||||
var renderGroup = function (groupName, currentValue) {
|
||||
var groupDiv = doc.createElement("div");
|
||||
groupDiv.textContent = groupName;
|
||||
return groupDiv;
|
||||
};
|
||||
if (settings.renderGroup) {
|
||||
renderGroup = settings.renderGroup;
|
||||
}
|
||||
var fragment = doc.createDocumentFragment();
|
||||
var prevGroup = "#9?$";
|
||||
items.forEach(function (item) {
|
||||
if (item.group && item.group !== prevGroup) {
|
||||
prevGroup = item.group;
|
||||
var groupDiv = renderGroup(item.group, inputValue);
|
||||
if (groupDiv) {
|
||||
groupDiv.className += " group";
|
||||
fragment.appendChild(groupDiv);
|
||||
}
|
||||
}
|
||||
var div = render(item, inputValue);
|
||||
if (div) {
|
||||
div.addEventListener("click", function (ev) {
|
||||
settings.onSelect(item, input);
|
||||
clear();
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
});
|
||||
if (item === selected) {
|
||||
div.className += " selected";
|
||||
}
|
||||
fragment.appendChild(div);
|
||||
}
|
||||
});
|
||||
container.appendChild(fragment);
|
||||
if (items.length < 1) {
|
||||
if (settings.emptyMsg) {
|
||||
var empty = doc.createElement("div");
|
||||
empty.className = "empty";
|
||||
empty.textContent = settings.emptyMsg;
|
||||
container.appendChild(empty);
|
||||
}
|
||||
else {
|
||||
clear();
|
||||
return;
|
||||
}
|
||||
}
|
||||
attach();
|
||||
updatePosition();
|
||||
updateScroll();
|
||||
}
|
||||
function updateIfDisplayed() {
|
||||
if (containerDisplayed()) {
|
||||
update();
|
||||
}
|
||||
}
|
||||
function resizeEventHandler() {
|
||||
updateIfDisplayed();
|
||||
}
|
||||
function scrollEventHandler(e) {
|
||||
if (e.target !== container) {
|
||||
updateIfDisplayed();
|
||||
}
|
||||
else {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
function keyupEventHandler(ev) {
|
||||
var keyCode = ev.which || ev.keyCode || 0;
|
||||
var ignore = [38 /* Up */, 13 /* Enter */, 27 /* Esc */, 39 /* Right */, 37 /* Left */, 16 /* Shift */, 17 /* Ctrl */, 18 /* Alt */, 20 /* CapsLock */, 91 /* WindowsKey */, 9 /* Tab */];
|
||||
for (var _i = 0, ignore_1 = ignore; _i < ignore_1.length; _i++) {
|
||||
var key = ignore_1[_i];
|
||||
if (keyCode === key) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (keyCode >= 112 /* F1 */ && keyCode <= 123 /* F12 */) {
|
||||
return;
|
||||
}
|
||||
// the down key is used to open autocomplete
|
||||
if (keyCode === 40 /* Down */ && containerDisplayed()) {
|
||||
return;
|
||||
}
|
||||
startFetch(0 /* Keyboard */);
|
||||
}
|
||||
/**
|
||||
* Automatically move scroll bar if selected item is not visible
|
||||
*/
|
||||
function updateScroll() {
|
||||
var elements = container.getElementsByClassName("selected");
|
||||
if (elements.length > 0) {
|
||||
var element = elements[0];
|
||||
// make group visible
|
||||
var previous = element.previousElementSibling;
|
||||
if (previous && previous.className.indexOf("group") !== -1 && !previous.previousElementSibling) {
|
||||
element = previous;
|
||||
}
|
||||
if (element.offsetTop < container.scrollTop) {
|
||||
container.scrollTop = element.offsetTop;
|
||||
}
|
||||
else {
|
||||
var selectBottom = element.offsetTop + element.offsetHeight;
|
||||
var containerBottom = container.scrollTop + container.offsetHeight;
|
||||
if (selectBottom > containerBottom) {
|
||||
container.scrollTop += selectBottom - containerBottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Select the previous item in suggestions
|
||||
*/
|
||||
function selectPrev() {
|
||||
if (items.length < 1) {
|
||||
selected = undefined;
|
||||
}
|
||||
else {
|
||||
if (selected === items[0]) {
|
||||
selected = items[items.length - 1];
|
||||
}
|
||||
else {
|
||||
for (var i = items.length - 1; i > 0; i--) {
|
||||
if (selected === items[i] || i === 1) {
|
||||
selected = items[i - 1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Select the next item in suggestions
|
||||
*/
|
||||
function selectNext() {
|
||||
if (items.length < 1) {
|
||||
selected = undefined;
|
||||
}
|
||||
if (!selected || selected === items[items.length - 1]) {
|
||||
selected = items[0];
|
||||
return;
|
||||
}
|
||||
for (var i = 0; i < (items.length - 1); i++) {
|
||||
if (selected === items[i]) {
|
||||
selected = items[i + 1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
function keydownEventHandler(ev) {
|
||||
var keyCode = ev.which || ev.keyCode || 0;
|
||||
if (keyCode === 38 /* Up */ || keyCode === 40 /* Down */ || keyCode === 27 /* Esc */) {
|
||||
var containerIsDisplayed = containerDisplayed();
|
||||
if (keyCode === 27 /* Esc */) {
|
||||
clear();
|
||||
}
|
||||
else {
|
||||
if (!containerDisplayed || items.length < 1) {
|
||||
return;
|
||||
}
|
||||
keyCode === 38 /* Up */
|
||||
? selectPrev()
|
||||
: selectNext();
|
||||
update();
|
||||
}
|
||||
ev.preventDefault();
|
||||
if (containerIsDisplayed) {
|
||||
ev.stopPropagation();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (keyCode === 13 /* Enter */) {
|
||||
if (selected) {
|
||||
settings.onSelect(selected, input);
|
||||
clear();
|
||||
}
|
||||
if (preventSubmit) {
|
||||
ev.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
function focusEventHandler() {
|
||||
if (showOnFocus) {
|
||||
startFetch(1 /* Focus */);
|
||||
}
|
||||
}
|
||||
function startFetch(trigger) {
|
||||
// if multiple keys were pressed, before we get update from server,
|
||||
// this may cause redrawing our autocomplete multiple times after the last key press.
|
||||
// to avoid this, the number of times keyboard was pressed will be
|
||||
// saved and checked before redraw our autocomplete box.
|
||||
var savedKeypressCounter = ++keypressCounter;
|
||||
var val = input.value;
|
||||
if (val.length >= minLen || trigger === 1 /* Focus */) {
|
||||
clearDebounceTimer();
|
||||
debounceTimer = window.setTimeout(function () {
|
||||
settings.fetch(val, function (elements) {
|
||||
if (keypressCounter === savedKeypressCounter && elements) {
|
||||
items = elements;
|
||||
inputValue = val;
|
||||
selected = items.length > 0 ? items[0] : undefined;
|
||||
update();
|
||||
}
|
||||
}, 0 /* Keyboard */);
|
||||
}, trigger === 0 /* Keyboard */ ? debounceWaitMs : 0);
|
||||
}
|
||||
else {
|
||||
clear();
|
||||
}
|
||||
}
|
||||
function blurEventHandler() {
|
||||
// we need to delay clear, because when we click on an item, blur will be called before click and remove items from DOM
|
||||
setTimeout(function () {
|
||||
if (doc.activeElement !== input) {
|
||||
clear();
|
||||
}
|
||||
}, 200);
|
||||
}
|
||||
/**
|
||||
* Fixes #26: on long clicks focus will be lost and onSelect method will not be called
|
||||
*/
|
||||
container.addEventListener("mousedown", function (evt) {
|
||||
evt.stopPropagation();
|
||||
evt.preventDefault();
|
||||
});
|
||||
/**
|
||||
* This function will remove DOM elements and clear event handlers
|
||||
*/
|
||||
function destroy() {
|
||||
input.removeEventListener("focus", focusEventHandler);
|
||||
input.removeEventListener("keydown", keydownEventHandler);
|
||||
input.removeEventListener(keyUpEventName, keyupEventHandler);
|
||||
input.removeEventListener("blur", blurEventHandler);
|
||||
window.removeEventListener("resize", resizeEventHandler);
|
||||
doc.removeEventListener("scroll", scrollEventHandler, true);
|
||||
clearDebounceTimer();
|
||||
clear();
|
||||
// prevent the update call if there are pending AJAX requests
|
||||
keypressCounter++;
|
||||
}
|
||||
// setup event handlers
|
||||
input.addEventListener("keydown", keydownEventHandler);
|
||||
input.addEventListener(keyUpEventName, keyupEventHandler);
|
||||
input.addEventListener("blur", blurEventHandler);
|
||||
input.addEventListener("focus", focusEventHandler);
|
||||
window.addEventListener("resize", resizeEventHandler);
|
||||
doc.addEventListener("scroll", scrollEventHandler, true);
|
||||
return {
|
||||
destroy: destroy
|
||||
};
|
||||
}
|
||||
|
||||
return autocomplete;
|
||||
|
||||
}));
|
||||
//# sourceMappingURL=autocomplete.js.map
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).autocomplete=t()}(this,(function(){"use strict";return function(e){var t,n,o=document,i=o.createElement("div"),r=i.style,f=navigator.userAgent,l=-1!==f.indexOf("Firefox")&&-1!==f.indexOf("Mobile"),a=e.debounceWaitMs||0,u=e.preventSubmit||!1,s=l?"input":"keyup",d=[],c="",p=2,v=e.showOnFocus,m=0;if(void 0!==e.minLength&&(p=e.minLength),!e.input)throw new Error("input undefined");var g=e.input;function h(){n&&window.clearTimeout(n)}function E(){return!!i.parentNode}function w(){var e;m++,d=[],c="",t=void 0,(e=i.parentNode)&&e.removeChild(i)}function L(){for(;i.firstChild;)i.removeChild(i.firstChild);var n=function(e,t){var n=o.createElement("div");return n.textContent=e.label||"",n};e.render&&(n=e.render);var f=function(e,t){var n=o.createElement("div");return n.textContent=e,n};e.renderGroup&&(f=e.renderGroup);var l=o.createDocumentFragment(),a="#9?$";if(d.forEach((function(o){if(o.group&&o.group!==a){a=o.group;var i=f(o.group,c);i&&(i.className+=" group",l.appendChild(i))}var r=n(o,c);r&&(r.addEventListener("click",(function(t){e.onSelect(o,g),w(),t.preventDefault(),t.stopPropagation()})),o===t&&(r.className+=" selected"),l.appendChild(r))})),i.appendChild(l),d.length<1){if(!e.emptyMsg)return void w();var u=o.createElement("div");u.className="empty",u.textContent=e.emptyMsg,i.appendChild(u)}i.parentNode||o.body.appendChild(i),function(){if(E()){r.height="auto",r.width=g.offsetWidth+"px";var t,n=0;f(),f(),e.customize&&t&&e.customize(g,t,i,n)}function f(){var e=o.documentElement,i=e.clientTop||o.body.clientTop||0,f=e.clientLeft||o.body.clientLeft||0,l=window.pageYOffset||e.scrollTop,a=window.pageXOffset||e.scrollLeft,u=(t=g.getBoundingClientRect()).top+g.offsetHeight+l-i,s=t.left+a-f;r.top=u+"px",r.left=s+"px",(n=window.innerHeight-(t.top+g.offsetHeight))<0&&(n=0),r.top=u+"px",r.bottom="",r.left=s+"px",r.maxHeight=n+"px"}}(),function(){var e=i.getElementsByClassName("selected");if(e.length>0){var t=e[0],n=t.previousElementSibling;if(n&&-1!==n.className.indexOf("group")&&!n.previousElementSibling&&(t=n),t.offsetTop<i.scrollTop)i.scrollTop=t.offsetTop;else{var o=t.offsetTop+t.offsetHeight,r=i.scrollTop+i.offsetHeight;o>r&&(i.scrollTop+=o-r)}}}()}function y(){E()&&L()}function b(){y()}function x(e){e.target!==i?y():e.preventDefault()}function C(e){for(var t=e.which||e.keyCode||0,n=0,o=[38,13,27,39,37,16,17,18,20,91,9];n<o.length;n++){if(t===o[n])return}t>=112&&t<=123||40===t&&E()||k(0)}function T(n){var o=n.which||n.keyCode||0;if(38===o||40===o||27===o){var i=E();if(27===o)w();else{if(!E||d.length<1)return;38===o?function(){if(d.length<1)t=void 0;else if(t===d[0])t=d[d.length-1];else for(var e=d.length-1;e>0;e--)if(t===d[e]||1===e){t=d[e-1];break}}():function(){if(d.length<1&&(t=void 0),t&&t!==d[d.length-1]){for(var e=0;e<d.length-1;e++)if(t===d[e]){t=d[e+1];break}}else t=d[0]}(),L()}return n.preventDefault(),void(i&&n.stopPropagation())}13===o&&(t&&(e.onSelect(t,g),w()),u&&n.preventDefault())}function N(){v&&k(1)}function k(o){var i=++m,r=g.value;r.length>=p||1===o?(h(),n=window.setTimeout((function(){e.fetch(r,(function(e){m===i&&e&&(c=r,t=(d=e).length>0?d[0]:void 0,L())}),0)}),0===o?a:0)):w()}function D(){setTimeout((function(){o.activeElement!==g&&w()}),200)}return i.className="autocomplete "+(e.className||""),r.position="absolute",i.addEventListener("mousedown",(function(e){e.stopPropagation(),e.preventDefault()})),g.addEventListener("keydown",T),g.addEventListener(s,C),g.addEventListener("blur",D),g.addEventListener("focus",N),window.addEventListener("resize",b),o.addEventListener("scroll",x,!0),{destroy:function(){g.removeEventListener("focus",N),g.removeEventListener("keydown",T),g.removeEventListener(s,C),g.removeEventListener("blur",D),window.removeEventListener("resize",b),o.removeEventListener("scroll",x,!0),h(),w(),m++}}}}));
|
||||
2084
RIGS/static/js/bootstrap-datetimepicker.js
vendored
2084
RIGS/static/js/bootstrap-datetimepicker.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
10577
RIGS/static/js/jquery.js
vendored
10577
RIGS/static/js/jquery.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,151 +1 @@
|
||||
/*
|
||||
* Konami-JS ~
|
||||
* :: Now with support for touch events and multiple instances for
|
||||
* :: those situations that call for multiple easter eggs!
|
||||
* Code: https://github.com/snaptortoise/konami-js
|
||||
* Copyright (c) 2009 George Mandis (georgemandis.com, snaptortoise.com)
|
||||
* Version: 1.6.2 (7/17/2018)
|
||||
* Licensed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
* Tested in: Safari 4+, Google Chrome 4+, Firefox 3+, IE7+, Mobile Safari 2.2.1+ and Android
|
||||
*/
|
||||
|
||||
var Konami = function (callback) {
|
||||
var konami = {
|
||||
addEvent: function (obj, type, fn, ref_obj) {
|
||||
if (obj.addEventListener)
|
||||
obj.addEventListener(type, fn, false);
|
||||
else if (obj.attachEvent) {
|
||||
// IE
|
||||
obj["e" + type + fn] = fn;
|
||||
obj[type + fn] = function () {
|
||||
obj["e" + type + fn](window.event, ref_obj);
|
||||
}
|
||||
obj.attachEvent("on" + type, obj[type + fn]);
|
||||
}
|
||||
},
|
||||
removeEvent: function (obj, eventName, eventCallback) {
|
||||
if (obj.removeEventListener) {
|
||||
obj.removeEventListener(eventName, eventCallback);
|
||||
} else if (obj.attachEvent) {
|
||||
obj.detachEvent(eventName);
|
||||
}
|
||||
},
|
||||
input: "",
|
||||
pattern: "38384040373937396665",
|
||||
keydownHandler: function (e, ref_obj) {
|
||||
if (ref_obj) {
|
||||
konami = ref_obj;
|
||||
} // IE
|
||||
konami.input += e ? e.keyCode : event.keyCode;
|
||||
if (konami.input.length > konami.pattern.length) {
|
||||
konami.input = konami.input.substr((konami.input.length - konami.pattern.length));
|
||||
}
|
||||
if (konami.input === konami.pattern) {
|
||||
konami.code(konami._currentLink);
|
||||
konami.input = '';
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
},
|
||||
load: function (link) {
|
||||
this._currentLink = link;
|
||||
this.addEvent(document, "keydown", this.keydownHandler, this);
|
||||
this.iphone.load(link);
|
||||
},
|
||||
unload: function () {
|
||||
this.removeEvent(document, 'keydown', this.keydownHandler);
|
||||
this.iphone.unload();
|
||||
},
|
||||
code: function (link) {
|
||||
window.location = link
|
||||
},
|
||||
iphone: {
|
||||
start_x: 0,
|
||||
start_y: 0,
|
||||
stop_x: 0,
|
||||
stop_y: 0,
|
||||
tap: false,
|
||||
capture: false,
|
||||
orig_keys: "",
|
||||
keys: ["UP", "UP", "DOWN", "DOWN", "LEFT", "RIGHT", "LEFT", "RIGHT", "TAP", "TAP"],
|
||||
input: [],
|
||||
code: function (link) {
|
||||
konami.code(link);
|
||||
},
|
||||
touchmoveHandler: function (e) {
|
||||
if (e.touches.length === 1 && konami.iphone.capture === true) {
|
||||
var touch = e.touches[0];
|
||||
konami.iphone.stop_x = touch.pageX;
|
||||
konami.iphone.stop_y = touch.pageY;
|
||||
konami.iphone.tap = false;
|
||||
konami.iphone.capture = false;
|
||||
konami.iphone.check_direction();
|
||||
}
|
||||
},
|
||||
touchendHandler: function () {
|
||||
konami.iphone.input.push(konami.iphone.check_direction());
|
||||
|
||||
if (konami.iphone.input.length > konami.iphone.keys.length) konami.iphone.input.shift();
|
||||
|
||||
if (konami.iphone.input.length === konami.iphone.keys.length) {
|
||||
var match = true;
|
||||
for (var i = 0; i < konami.iphone.keys.length; i++) {
|
||||
if (konami.iphone.input[i] !== konami.iphone.keys[i]) {
|
||||
match = false;
|
||||
}
|
||||
}
|
||||
if (match) {
|
||||
konami.iphone.code(konami._currentLink);
|
||||
}
|
||||
}
|
||||
},
|
||||
touchstartHandler: function (e) {
|
||||
konami.iphone.start_x = e.changedTouches[0].pageX;
|
||||
konami.iphone.start_y = e.changedTouches[0].pageY;
|
||||
konami.iphone.tap = true;
|
||||
konami.iphone.capture = true;
|
||||
},
|
||||
load: function (link) {
|
||||
this.orig_keys = this.keys;
|
||||
konami.addEvent(document, "touchmove", this.touchmoveHandler);
|
||||
konami.addEvent(document, "touchend", this.touchendHandler, false);
|
||||
konami.addEvent(document, "touchstart", this.touchstartHandler);
|
||||
},
|
||||
unload: function () {
|
||||
konami.removeEvent(document, 'touchmove', this.touchmoveHandler);
|
||||
konami.removeEvent(document, 'touchend', this.touchendHandler);
|
||||
konami.removeEvent(document, 'touchstart', this.touchstartHandler);
|
||||
},
|
||||
check_direction: function () {
|
||||
x_magnitude = Math.abs(this.start_x - this.stop_x);
|
||||
y_magnitude = Math.abs(this.start_y - this.stop_y);
|
||||
x = ((this.start_x - this.stop_x) < 0) ? "RIGHT" : "LEFT";
|
||||
y = ((this.start_y - this.stop_y) < 0) ? "DOWN" : "UP";
|
||||
result = (x_magnitude > y_magnitude) ? x : y;
|
||||
result = (this.tap === true) ? "TAP" : result;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typeof callback === "string" && konami.load(callback);
|
||||
if (typeof callback === "function") {
|
||||
konami.code = callback;
|
||||
konami.load();
|
||||
}
|
||||
|
||||
return konami;
|
||||
};
|
||||
|
||||
|
||||
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
|
||||
module.exports = Konami;
|
||||
} else {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define([], function() {
|
||||
return Konami;
|
||||
});
|
||||
} else {
|
||||
window.Konami = Konami;
|
||||
}
|
||||
}
|
||||
var Konami=function(t){var e={addEvent:function(t,e,n,o){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&(t["e"+e+n]=n,t[e+n]=function(){t["e"+e+n](window.event,o)},t.attachEvent("on"+e,t[e+n]))},removeEvent:function(t,e,n){t.removeEventListener?t.removeEventListener(e,n):t.attachEvent&&t.detachEvent(e)},input:"",pattern:"38384040373937396665",keydownHandler:function(t,n){if(n&&(e=n),e.input+=t?t.keyCode:event.keyCode,e.input.length>e.pattern.length&&(e.input=e.input.substr(e.input.length-e.pattern.length)),e.input===e.pattern)return e.code(e._currentLink),e.input="",t.preventDefault(),!1},load:function(t){this._currentLink=t,this.addEvent(document,"keydown",this.keydownHandler,this),this.iphone.load(t)},unload:function(){this.removeEvent(document,"keydown",this.keydownHandler),this.iphone.unload()},code:function(t){window.location=t},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:!1,capture:!1,orig_keys:"",keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP"],input:[],code:function(t){e.code(t)},touchmoveHandler:function(t){if(1===t.touches.length&&!0===e.iphone.capture){var n=t.touches[0];e.iphone.stop_x=n.pageX,e.iphone.stop_y=n.pageY,e.iphone.tap=!1,e.iphone.capture=!1,e.iphone.check_direction()}},touchendHandler:function(){if(e.iphone.input.push(e.iphone.check_direction()),e.iphone.input.length>e.iphone.keys.length&&e.iphone.input.shift(),e.iphone.input.length===e.iphone.keys.length){for(var t=!0,n=0;n<e.iphone.keys.length;n++)e.iphone.input[n]!==e.iphone.keys[n]&&(t=!1);t&&e.iphone.code(e._currentLink)}},touchstartHandler:function(t){e.iphone.start_x=t.changedTouches[0].pageX,e.iphone.start_y=t.changedTouches[0].pageY,e.iphone.tap=!0,e.iphone.capture=!0},load:function(t){this.orig_keys=this.keys,e.addEvent(document,"touchmove",this.touchmoveHandler),e.addEvent(document,"touchend",this.touchendHandler,!1),e.addEvent(document,"touchstart",this.touchstartHandler)},unload:function(){e.removeEvent(document,"touchmove",this.touchmoveHandler),e.removeEvent(document,"touchend",this.touchendHandler),e.removeEvent(document,"touchstart",this.touchstartHandler)},check_direction:function(){return x_magnitude=Math.abs(this.start_x-this.stop_x),y_magnitude=Math.abs(this.start_y-this.stop_y),x=this.start_x-this.stop_x<0?"RIGHT":"LEFT",y=this.start_y-this.stop_y<0?"DOWN":"UP",result=x_magnitude>y_magnitude?x:y,result=!0===this.tap?"TAP":result,result}}};return"string"==typeof t&&e.load(t),"function"==typeof t&&(e.code=t,e.load()),e};"undefined"!=typeof module&&void 0!==module.exports?module.exports=Konami:"function"==typeof define&&define.amd?define([],(function(){return Konami})):window.Konami=Konami;
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,273 +3,4 @@
|
||||
* 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('./tooltip.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) :
|
||||
(global = global || self, global.Popover = factory(global.jQuery, global.Tooltip));
|
||||
}(this, (function ($, Tooltip) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip;
|
||||
|
||||
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 ownKeys(object, enumerableOnly) {
|
||||
var keys = Object.keys(object);
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var symbols = Object.getOwnPropertySymbols(object);
|
||||
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
||||
});
|
||||
keys.push.apply(keys, symbols);
|
||||
}
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
function _objectSpread2(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _inheritsLoose(subClass, superClass) {
|
||||
subClass.prototype = Object.create(superClass.prototype);
|
||||
subClass.prototype.constructor = subClass;
|
||||
subClass.__proto__ = superClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'popover';
|
||||
var VERSION = '4.4.1';
|
||||
var DATA_KEY = 'bs.popover';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||
|
||||
var Default = _objectSpread2({}, Tooltip.Default, {
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
|
||||
});
|
||||
|
||||
var DefaultType = _objectSpread2({}, Tooltip.DefaultType, {
|
||||
content: '(string|element|function)'
|
||||
});
|
||||
|
||||
var ClassName = {
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
var Selector = {
|
||||
TITLE: '.popover-header',
|
||||
CONTENT: '.popover-body'
|
||||
};
|
||||
var Event = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY,
|
||||
INSERTED: "inserted" + EVENT_KEY,
|
||||
CLICK: "click" + EVENT_KEY,
|
||||
FOCUSIN: "focusin" + EVENT_KEY,
|
||||
FOCUSOUT: "focusout" + EVENT_KEY,
|
||||
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
||||
MOUSELEAVE: "mouseleave" + EVENT_KEY
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Popover =
|
||||
/*#__PURE__*/
|
||||
function (_Tooltip) {
|
||||
_inheritsLoose(Popover, _Tooltip);
|
||||
|
||||
function Popover() {
|
||||
return _Tooltip.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
var _proto = Popover.prototype;
|
||||
|
||||
// Overrides
|
||||
_proto.isWithContent = function isWithContent() {
|
||||
return this.getTitle() || this._getContent();
|
||||
};
|
||||
|
||||
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
|
||||
};
|
||||
|
||||
_proto.getTipElement = function getTipElement() {
|
||||
this.tip = this.tip || $(this.config.template)[0];
|
||||
return this.tip;
|
||||
};
|
||||
|
||||
_proto.setContent = function setContent() {
|
||||
var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
|
||||
|
||||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
|
||||
|
||||
var content = this._getContent();
|
||||
|
||||
if (typeof content === 'function') {
|
||||
content = content.call(this.element);
|
||||
}
|
||||
|
||||
this.setElementContent($tip.find(Selector.CONTENT), content);
|
||||
$tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getContent = function _getContent() {
|
||||
return this.element.getAttribute('data-content') || this.config.content;
|
||||
};
|
||||
|
||||
_proto._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
} // Static
|
||||
;
|
||||
|
||||
Popover._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' ? config : null;
|
||||
|
||||
if (!data && /dispose|hide/.test(config)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Popover(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]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(Popover, null, [{
|
||||
key: "VERSION",
|
||||
// Getters
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: "NAME",
|
||||
get: function get() {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: "DATA_KEY",
|
||||
get: function get() {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: "Event",
|
||||
get: function get() {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: "EVENT_KEY",
|
||||
get: function get() {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Popover;
|
||||
}(Tooltip);
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$.fn[NAME] = Popover._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Popover;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Popover._jQueryInterface;
|
||||
};
|
||||
|
||||
return Popover;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=popover.js.map
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./tooltip.js")):"function"==typeof define&&define.amd?define(["jquery","./tooltip.js"],t):(e=e||self).Popover=t(e.jQuery,e.Tooltip)}(this,(function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var u="popover",s=".bs.popover",c=e.fn[u],p=new RegExp("(^|\\s)bs-popover\\S+","g"),f=i({},t.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),a=i({},t.DefaultType,{content:"(string|element|function)"}),l="fade",h="show",y=".popover-header",d=".popover-body",v={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,INSERTED:"inserted"+s,CLICK:"click"+s,FOCUSIN:"focusin"+s,FOCUSOUT:"focusout"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s},g=function(t){var r,o;function i(){return t.apply(this,arguments)||this}o=t,(r=i).prototype=Object.create(o.prototype),r.prototype.constructor=r,r.__proto__=o;var c,g,b,O=i.prototype;return O.isWithContent=function(){return this.getTitle()||this._getContent()},O.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},O.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},O.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(y),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(d),n),t.removeClass(l+" "+h)},O._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},O._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(p);null!==n&&n.length>0&&t.removeClass(n.join(""))},i._jQueryInterface=function(t){return this.each((function(){var n=e(this).data("bs.popover"),r="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new i(this,r),e(this).data("bs.popover",n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},c=i,b=[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return f}},{key:"NAME",get:function(){return u}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return v}},{key:"EVENT_KEY",get:function(){return s}},{key:"DefaultType",get:function(){return a}}],(g=null)&&n(c.prototype,g),b&&n(c,b),i}(t);return e.fn[u]=g._jQueryInterface,e.fn[u].Constructor=g,e.fn[u].noConflict=function(){return e.fn[u]=c,g._jQueryInterface},g}));
|
||||
File diff suppressed because one or more lines are too long
@@ -1,191 +1 @@
|
||||
var querystring = require('querystring'),
|
||||
RavenClient = require('./lib/RavenClient'),
|
||||
HiLoIdGenerator = require('./lib/HiLoIdGenerator'),
|
||||
filter = require('./lib/filter')
|
||||
errorCodes = require('./lib/errorCodes'),
|
||||
_ = require('lodash'),
|
||||
inflect = require('i')();
|
||||
|
||||
var settings = {
|
||||
host: 'http://localhost:80',
|
||||
idFinder: defaultIdFinder,
|
||||
idGenerator: defaultIdGenerator,
|
||||
useOptimisticConcurrency: false
|
||||
};
|
||||
|
||||
function defaultIdFinder(doc) {
|
||||
if (!doc) return undefined;
|
||||
if (doc['@metadata'] && doc['@metadata']['@id']) return doc['@metadata']['@id'];
|
||||
if (doc.hasOwnProperty('id')) return doc.id;
|
||||
if (doc.hasOwnProperty('Id')) return doc.Id;
|
||||
}
|
||||
|
||||
function defaultIdGenerator(doc, settings, callback) {
|
||||
if (!doc) throw Error('Expected a valid doc object.');
|
||||
if (!settings) throw Error('Expected a valid setings object.');
|
||||
if (!settings.host) throw Error('Invalid settings. Expected host property.');
|
||||
if (!callback || !_(callback).isFunction) throw Error('Exepected a valid callback function.');
|
||||
|
||||
var generator = new HiLoIdGenerator(settings);
|
||||
generator.nextId(function(error, id) {
|
||||
if (error) return callback(error);
|
||||
collectionName = '';
|
||||
if (!!doc && !!doc['@metadata'] && _.isString(doc['@metadata']['Raven-Entity-Name'])) collectionName = inflect.camelize(inflect.underscore(doc['@metadata']['Raven-Entity-Name']), false) + '/';
|
||||
id = collectionName + id;
|
||||
return callback(undefined, id.toString());
|
||||
});
|
||||
}
|
||||
|
||||
exports.connectionString = function(connStr) {
|
||||
var self = this;
|
||||
if (!arguments.length) return settings.host;
|
||||
if (!_.isString(connStr)) throw new Error('Expected a valid raven connection string');
|
||||
|
||||
var values = querystring.parse(connStr, ';', '=');
|
||||
if (!values.Url) throw new Error('Required connection string property "Url" was not specified!');
|
||||
|
||||
self.host(values.Url);
|
||||
self.database(values.Database);
|
||||
self.username(values.UserName);
|
||||
self.password(values.Password);
|
||||
self.apiKey(values.ApiKey);
|
||||
};
|
||||
|
||||
exports.host = function(host) {
|
||||
if (!arguments.length) return settings.host;
|
||||
if (!_.isString(host)) throw new Error('Expected a valid raven host name');
|
||||
if (!~host.indexOf('http://') && !~host.indexOf('https://')) throw new Error('Expected a host address with http:// or https://');
|
||||
settings.host = host;
|
||||
};
|
||||
|
||||
exports.database = function(database) {
|
||||
if (!arguments.length) return settings.database;
|
||||
if (!database) {
|
||||
if (settings.database) delete settings.database;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_.isString(database)) throw new Error('Expected a string for database name');
|
||||
settings.database = database;
|
||||
};
|
||||
|
||||
exports.username = function(username) {
|
||||
if (!arguments.length) return settings.username;
|
||||
if (!username) {
|
||||
if (settings.username) delete settings.username;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_.isString(username)) throw new Error('Expected a string for username');
|
||||
settings.username = username;
|
||||
};
|
||||
|
||||
exports.password = function(password) {
|
||||
if (!arguments.length) return settings.password;
|
||||
if (!password) {
|
||||
if (settings.password) delete settings.password;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_.isString(password)) throw new Error('Expected a string for password');
|
||||
settings.password = password;
|
||||
};
|
||||
|
||||
exports.apiKey = function(apiKey) {
|
||||
if (!arguments.length) return settings.apiKey;
|
||||
if (!apiKey) {
|
||||
if(settings.apiKey) delete settings.apiKey;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_.isString(apiKey)) throw new Error('Expected a string for apiKey');
|
||||
settings.apiKey = apiKey;
|
||||
};
|
||||
|
||||
exports.idFinder = function(fn) {
|
||||
if (!fn) return settings.idFinder = defaultidFinder;
|
||||
if (!_(fn).isFunction()) throw new Error('Expected a valid function to use as the default key finder.');
|
||||
settings.idFinder = fn;
|
||||
};
|
||||
|
||||
exports.idGenerator = function(fn) {
|
||||
if (!fn) return settings.idGenerator = defaultIdGenerator;
|
||||
if (!_(fn).isFunction()) throw new Error('Expected a valid function to use as the default key generator.');
|
||||
settings.idGenerator = fn;
|
||||
};
|
||||
|
||||
exports.useOptimisticConcurrency= function(val) {
|
||||
if (!val) return settings.useOptimisticConcurrency;
|
||||
if (!_(val).isBoolean()) throw new Error('Expected a boolean value when setting useOptimisticConcurrency');
|
||||
settings.useOptimisticConcurrency = val;
|
||||
};
|
||||
|
||||
exports.proxy = function(val) {
|
||||
if(!val) return settings.proxy;
|
||||
if (!_.isString(val)) throw new Error('Expected a valid proxy host address.');
|
||||
if (!~val.indexOf('http://') && !~val.indexOf('https://')) throw new Error("Invaid proxy address scheme. Expected http or https scheme.");
|
||||
settings.proxy = val;
|
||||
};
|
||||
|
||||
exports.configure = function(env, fn) {
|
||||
if (_(env).isFunction()) {
|
||||
fn = env;
|
||||
env = 'all';
|
||||
}
|
||||
|
||||
var currentEnv = process.env.NODE_ENV || 'development';
|
||||
if ('all' === env || ~env.indexOf(currentEnv)) fn.call(this);
|
||||
};
|
||||
|
||||
//exposing default key finder and generator.
|
||||
exports.defaultIdFinder = defaultIdFinder;
|
||||
|
||||
exports.defaultIdGenerator = defaultIdGenerator;
|
||||
|
||||
exports.connect = function(options) {
|
||||
var self = this;
|
||||
var clientSettings = _(settings).clone();
|
||||
if (_(options).isObject()) {
|
||||
clientSettings.host = options.host || clientSettings.host;
|
||||
clientSettings.database = options.database || clientSettings.database;
|
||||
clientSettings.username = options.username || clientSettings.username;
|
||||
clientSettings.password = options.password || clientSettings.password;
|
||||
clientSettings.apiKey = options.apiKey || clientSettings.apiKey;
|
||||
clientSettings.idFinder = options.idFinder || clientSettings.idFinder;
|
||||
clientSettings.idGenerator = options.idGenerator || clientSettings.idGenerator;
|
||||
clientSettings.proxy = options.proxy || clientSettings.proxy;
|
||||
clientSettings.useOptimisticConcurrency = options.useOptimisticConcurrency || clientSettings.useOptimisticConcurrency;
|
||||
}
|
||||
|
||||
return new RavenClient(clientSettings);
|
||||
};
|
||||
|
||||
exports.create = function(typeName, collectionName) {
|
||||
var doc = {},
|
||||
metadata = {},
|
||||
singular = false;
|
||||
if (!!typeName) {
|
||||
if (!_(typeName).isString()) throw new Error('Expected a valid string for typeName');
|
||||
metadata['Raven-Clr-Type'] = typeName;
|
||||
}
|
||||
if (_(collectionName).isBoolean()) {
|
||||
singular = collectionName === false;
|
||||
collectionName = undefined;
|
||||
}
|
||||
if (!!collectionName) {
|
||||
if (!_(collectionName).isString()) throw new Error('Expected a valid string or bool for collectionName');
|
||||
metadata['Raven-Entity-Name'] = collectionName;
|
||||
} else if (!!typeName) {
|
||||
if (!singular) {
|
||||
collectionName = inflect.pluralize(typeName);
|
||||
} else {
|
||||
collectionName = typeName;
|
||||
}
|
||||
metadata['Raven-Entity-Name'] = collectionName;
|
||||
}
|
||||
|
||||
if (!_.isEmpty(metadata)) doc['@metadata'] = metadata;
|
||||
return doc;
|
||||
};
|
||||
|
||||
exports.errorCodes = errorCodes;
|
||||
var querystring=require("querystring"),RavenClient=require("./lib/RavenClient"),HiLoIdGenerator=require("./lib/HiLoIdGenerator"),filter=require("./lib/filter");errorCodes=require("./lib/errorCodes"),_=require("lodash"),inflect=require("i")();var settings={host:"http://localhost:80",idFinder:defaultIdFinder,idGenerator:defaultIdGenerator,useOptimisticConcurrency:!1};function defaultIdFinder(e){if(e)return e["@metadata"]&&e["@metadata"]["@id"]?e["@metadata"]["@id"]:e.hasOwnProperty("id")?e.id:e.hasOwnProperty("Id")?e.Id:void 0}function defaultIdGenerator(e,t,r){if(!e)throw Error("Expected a valid doc object.");if(!t)throw Error("Expected a valid setings object.");if(!t.host)throw Error("Invalid settings. Expected host property.");if(!r||!_(r).isFunction)throw Error("Exepected a valid callback function.");new HiLoIdGenerator(t).nextId((function(t,i){return t?r(t):(collectionName="",e&&e["@metadata"]&&_.isString(e["@metadata"]["Raven-Entity-Name"])&&(collectionName=inflect.camelize(inflect.underscore(e["@metadata"]["Raven-Entity-Name"]),!1)+"/"),i=collectionName+i,r(void 0,i.toString()))}))}exports.connectionString=function(e){var t=this;if(!arguments.length)return settings.host;if(!_.isString(e))throw new Error("Expected a valid raven connection string");var r=querystring.parse(e,";","=");if(!r.Url)throw new Error('Required connection string property "Url" was not specified!');t.host(r.Url),t.database(r.Database),t.username(r.UserName),t.password(r.Password),t.apiKey(r.ApiKey)},exports.host=function(e){if(!arguments.length)return settings.host;if(!_.isString(e))throw new Error("Expected a valid raven host name");if(!~e.indexOf("http://")&&!~e.indexOf("https://"))throw new Error("Expected a host address with http:// or https://");settings.host=e},exports.database=function(e){if(!arguments.length)return settings.database;if(e){if(!_.isString(e))throw new Error("Expected a string for database name");settings.database=e}else settings.database&&delete settings.database},exports.username=function(e){if(!arguments.length)return settings.username;if(e){if(!_.isString(e))throw new Error("Expected a string for username");settings.username=e}else settings.username&&delete settings.username},exports.password=function(e){if(!arguments.length)return settings.password;if(e){if(!_.isString(e))throw new Error("Expected a string for password");settings.password=e}else settings.password&&delete settings.password},exports.apiKey=function(e){if(!arguments.length)return settings.apiKey;if(e){if(!_.isString(e))throw new Error("Expected a string for apiKey");settings.apiKey=e}else settings.apiKey&&delete settings.apiKey},exports.idFinder=function(e){if(!e)return settings.idFinder=defaultidFinder;if(!_(e).isFunction())throw new Error("Expected a valid function to use as the default key finder.");settings.idFinder=e},exports.idGenerator=function(e){if(!e)return settings.idGenerator=defaultIdGenerator;if(!_(e).isFunction())throw new Error("Expected a valid function to use as the default key generator.");settings.idGenerator=e},exports.useOptimisticConcurrency=function(e){if(!e)return settings.useOptimisticConcurrency;if(!_(e).isBoolean())throw new Error("Expected a boolean value when setting useOptimisticConcurrency");settings.useOptimisticConcurrency=e},exports.proxy=function(e){if(!e)return settings.proxy;if(!_.isString(e))throw new Error("Expected a valid proxy host address.");if(!~e.indexOf("http://")&&!~e.indexOf("https://"))throw new Error("Invaid proxy address scheme. Expected http or https scheme.");settings.proxy=e},exports.configure=function(e,t){_(e).isFunction()&&(t=e,e="all");var r=process.env.NODE_ENV||"development";("all"===e||~e.indexOf(r))&&t.call(this)},exports.defaultIdFinder=defaultIdFinder,exports.defaultIdGenerator=defaultIdGenerator,exports.connect=function(e){var t=_(settings).clone();return _(e).isObject()&&(t.host=e.host||t.host,t.database=e.database||t.database,t.username=e.username||t.username,t.password=e.password||t.password,t.apiKey=e.apiKey||t.apiKey,t.idFinder=e.idFinder||t.idFinder,t.idGenerator=e.idGenerator||t.idGenerator,t.proxy=e.proxy||t.proxy,t.useOptimisticConcurrency=e.useOptimisticConcurrency||t.useOptimisticConcurrency),new RavenClient(t)},exports.create=function(e,t){var r={},i={},n=!1;if(e){if(!_(e).isString())throw new Error("Expected a valid string for typeName");i["Raven-Clr-Type"]=e}if(_(t).isBoolean()&&(n=!1===t,t=void 0),t){if(!_(t).isString())throw new Error("Expected a valid string or bool for collectionName");i["Raven-Entity-Name"]=t}else e&&(t=n?e:inflect.pluralize(e),i["Raven-Entity-Name"]=t);return _.isEmpty(i)||(r["@metadata"]=i),r},exports.errorCodes=errorCodes;
|
||||
File diff suppressed because one or more lines are too long
@@ -3,187 +3,4 @@
|
||||
* 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.4.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);
|
||||
},
|
||||
jQueryDetection: function jQueryDetection() {
|
||||
if (typeof $ === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
|
||||
}
|
||||
|
||||
var version = $.fn.jquery.split(' ')[0].split('.');
|
||||
var minMajor = 1;
|
||||
var ltMajor = 2;
|
||||
var minMinor = 9;
|
||||
var minPatch = 1;
|
||||
var maxMajor = 4;
|
||||
|
||||
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
|
||||
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
|
||||
}
|
||||
}
|
||||
};
|
||||
Util.jQueryDetection();
|
||||
setTransitionEndSupport();
|
||||
|
||||
return Util;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=util.js.map
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):(t=t||self).Util=e(t.jQuery)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;function e(e){var r=this,o=!1;return t(this).one(n.TRANSITION_END,(function(){o=!0})),setTimeout((function(){o||n.triggerTransitionEnd(r)}),e),this}var n={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var n=t(e).css("transition-duration"),r=t(e).css("transition-delay"),o=parseFloat(n),i=parseFloat(r);return o||i?(n=n.split(",")[0],r=r.split(",")[0],1e3*(parseFloat(n)+parseFloat(r))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,r){for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){var i=r[o],a=e[o],u=a&&n.isElement(a)?"element":(s=a,{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(i).test(u))throw new Error(t.toUpperCase()+': Option "'+o+'" provided type "'+u+'" but expected type "'+i+'".')}var s},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?n.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if(void 0===t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};return n.jQueryDetection(),t.fn.emulateTransitionEnd=e,t.event.special[n.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}},n}));
|
||||
1
RIGS/static/scss/_custom-variables.scss
Normal file
1
RIGS/static/scss/_custom-variables.scss
Normal file
@@ -0,0 +1 @@
|
||||
$font-family-sans-serif: "Open Sans", sans-serif;
|
||||
@@ -1,5 +0,0 @@
|
||||
/* Welcome to Compass. Use this file to write IE specific override styles.
|
||||
* Import this file using the following HTML or equivalent:
|
||||
* <!--[if IE]>
|
||||
* <link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
||||
* <![endif]--> */
|
||||
@@ -1,6 +1,5 @@
|
||||
@import "custom-variables";
|
||||
@import "node_modules/bootstrap/scss/bootstrap";
|
||||
@import "node_modules/animate-sass/animate";
|
||||
//@import "node_modules/transform/transform";
|
||||
|
||||
body, .pad-top {
|
||||
padding-top: 50px;
|
||||
@@ -33,11 +32,6 @@ textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.btn-page, .btn-pad {
|
||||
// .btn-page should be refactored out to .btn-page in the future
|
||||
margin: 0 0 0.5em;
|
||||
}
|
||||
|
||||
.custom-combobox {
|
||||
display: block;
|
||||
}
|
||||
@@ -80,6 +74,10 @@ ins {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
color: $gray-400 !important;
|
||||
}
|
||||
|
||||
.loading-animation {
|
||||
position: relative;
|
||||
margin: 30px auto 0;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static 'js/moment.min.js' %}"></script>
|
||||
<script src="{% static 'js/moment.js' %}"></script>
|
||||
<script src="{% static 'js/fullcalendar.js' %}"></script>
|
||||
<script>
|
||||
function getUrlVars() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% block title %}{% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %} | {{object.name}}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="row my-3 py-3">
|
||||
{% if not request.is_ajax %}
|
||||
<div class="col-sm-12">
|
||||
<h1>
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span
|
||||
<div class="btn-group py-2">
|
||||
<a href="{% url 'event_update' event.pk %}" class="btn btn-secondary"><span
|
||||
class="fas fa-edit"></span> <span
|
||||
class="hidden-xs">Edit</span></a>
|
||||
{% if event.is_rig %}
|
||||
{% if not event.dry_hire %}
|
||||
<a href="{% url 'event_ra' event.pk %}" class="btn btn-default
|
||||
<a href="{% url 'event_ra' event.pk %}" class="btn
|
||||
{% if event.risk_assessment_edit_url %}
|
||||
btn-success
|
||||
{% else %}
|
||||
btn-warning
|
||||
{% endif %}
|
||||
"><span
|
||||
class="fas fa-paperclip"></span> <span
|
||||
"><i class="fas fa-paperclip"></i> <span
|
||||
class="hidden-xs">RA</span></a>
|
||||
{% endif %}
|
||||
<a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span
|
||||
class="fas fa-print"></span> <span
|
||||
<a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-primary"><i
|
||||
class="fas fa-print"></i> <span
|
||||
class="hidden-xs">Print</span></a>
|
||||
{% endif %}
|
||||
<a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span
|
||||
<a href="{% url 'event_duplicate' event.pk %}" class="btn btn-secondary" title="Duplicate Rig"><span
|
||||
class="fas fa-copy"></span> <span
|
||||
class="hidden-xs">Duplicate</span></a>
|
||||
{% if event.is_rig %}
|
||||
@@ -33,7 +32,7 @@
|
||||
{% endif %}
|
||||
"
|
||||
href="{% url 'event_authorise_request' object.pk %}">
|
||||
<span class="fas fa-send"></span>
|
||||
<i class="fas fa-send"></i>
|
||||
<span class="hidden-xs">
|
||||
{% if event.authorised %}
|
||||
Authorised
|
||||
|
||||
15
gulpfile.js
15
gulpfile.js
@@ -1,4 +1,4 @@
|
||||
'use strict';
|
||||
"use strict";
|
||||
|
||||
var gulp = require('gulp');
|
||||
|
||||
@@ -16,16 +16,14 @@ var { exec } = require("child_process");
|
||||
|
||||
sass.compiler = require('node-sass');
|
||||
|
||||
function sass() {
|
||||
return gulp.src(["RIGS/scss/**/*.scss",
|
||||
"node_modules/fullcalendar/dist/fullcalendar.css",
|
||||
function styles(done) {
|
||||
return gulp.src(['RIGS/static/scss/**/*.scss',
|
||||
'node_modules/fullcalendar/dist/fullcalendar.css',
|
||||
'node_modules/ajax-bootstrap-select/dist/css/ajax-bootstrap-select.min.css',
|
||||
'node_modules/autocompleter/autocompleter.min.css',
|
||||
'node_modules/autocompleter/autocomplete.css',
|
||||
'node_modules/@activix/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css'])
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(flatten())
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
.pipe(cleanCSS({compatibility: 'ie8'}))
|
||||
.pipe(postcss([ autoprefixer() ]))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('RIGS/static/css'))
|
||||
@@ -76,10 +74,11 @@ function browserSyncReload(done) {
|
||||
}
|
||||
|
||||
function watchFiles() {
|
||||
gulp.watch("RIGS/static/scss/**/*", sass);
|
||||
gulp.watch("RIGS/static/scss/**/*", styles);
|
||||
gulp.watch("RIGS/static/js/**/*", scripts);
|
||||
gulp.watch(['templates/**/*.html', 'RIGS/templates/**/*.html', 'assets/templates/**/*.html'], browserSyncReload);
|
||||
}
|
||||
|
||||
exports.css = styles;
|
||||
exports.js = scripts;
|
||||
exports.watch = gulp.parallel(watchFiles, browserSync);
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-clean-css": "^4.2.0",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-plumber": "^1.2.1",
|
||||
"gulp-postcss": "^8.0.0",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-sass": "^4.0.2",
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
{% if perms.RIGS.view_venue %}
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'venue_list' %}">Venues</a></li>
|
||||
{% endif %}
|
||||
<form id="searchForm" class="form-inline" role="form" method="GET">
|
||||
<div class="input-group input-group-sm">
|
||||
<form id="searchForm" class="form-inline flex-nowrap mx-3" role="form" method="GET">
|
||||
<div class="input-group input-group-sm flex-nowrap">
|
||||
<div class="input-group-prepend">
|
||||
<input id="id_search_input" type="search" name="q" class="form-control form-control-sm" placeholder="Search..." />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user