mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 17:02:18 +00:00
Merge pull request #312 from nottinghamtec/js-dependencies
Update JS dependencies
This commit is contained in:
12
RIGS/static/css/bootstrap-select.min.css
vendored
Normal file → Executable file
12
RIGS/static/css/bootstrap-select.min.css
vendored
Normal file → Executable file
File diff suppressed because one or more lines are too long
12
RIGS/static/js/affix.js
Normal file → Executable file
12
RIGS/static/js/affix.js
Normal file → Executable file
@@ -1,8 +1,8 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: affix.js v3.3.2
|
* Bootstrap: affix.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#affix
|
* http://getbootstrap.com/javascript/#affix
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
@@ -21,14 +21,14 @@
|
|||||||
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
||||||
|
|
||||||
this.$element = $(element)
|
this.$element = $(element)
|
||||||
this.affixed =
|
this.affixed = null
|
||||||
this.unpin =
|
this.unpin = null
|
||||||
this.pinnedOffset = null
|
this.pinnedOffset = null
|
||||||
|
|
||||||
this.checkPosition()
|
this.checkPosition()
|
||||||
}
|
}
|
||||||
|
|
||||||
Affix.VERSION = '3.3.2'
|
Affix.VERSION = '3.3.7'
|
||||||
|
|
||||||
Affix.RESET = 'affix affix-top affix-bottom'
|
Affix.RESET = 'affix affix-top affix-bottom'
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
var offset = this.options.offset
|
var offset = this.options.offset
|
||||||
var offsetTop = offset.top
|
var offsetTop = offset.top
|
||||||
var offsetBottom = offset.bottom
|
var offsetBottom = offset.bottom
|
||||||
var scrollHeight = $('body').height()
|
var scrollHeight = Math.max($(document).height(), $(document.body).height())
|
||||||
|
|
||||||
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
||||||
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
||||||
|
|||||||
84
RIGS/static/js/ajax-bootstrap-select.js
Executable file → Normal file
84
RIGS/static/js/ajax-bootstrap-select.js
Executable file → Normal file
@@ -3,16 +3,16 @@
|
|||||||
*
|
*
|
||||||
* Extends existing [Bootstrap Select] implementations by adding the ability to search via AJAX requests as you type. Originally for CROSCON.
|
* Extends existing [Bootstrap Select] implementations by adding the ability to search via AJAX requests as you type. Originally for CROSCON.
|
||||||
*
|
*
|
||||||
* @version 1.3.1
|
* @version 1.4.1
|
||||||
* @author Adam Heim - https://github.com/truckingsim
|
* @author Adam Heim - https://github.com/truckingsim
|
||||||
* @link https://github.com/truckingsim/Ajax-Bootstrap-Select
|
* @link https://github.com/truckingsim/Ajax-Bootstrap-Select
|
||||||
* @copyright 2015 Adam Heim
|
* @copyright 2017 Adam Heim
|
||||||
* @license Released under the MIT license.
|
* @license Released under the MIT license.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Mark Carver - https://github.com/markcarver
|
* Mark Carver - https://github.com/markcarver
|
||||||
*
|
*
|
||||||
* Last build: 2015-01-06 8:43:11 PM EST
|
* Last build: 2017-07-21 1:08:54 PM GMT-0400
|
||||||
*/
|
*/
|
||||||
!(function ($, window) {
|
!(function ($, window) {
|
||||||
|
|
||||||
@@ -186,10 +186,25 @@ var AjaxBootstrapSelect = function (element, options) {
|
|||||||
if (dataKeys.length) {
|
if (dataKeys.length) {
|
||||||
// Object containing the data attribute options.
|
// Object containing the data attribute options.
|
||||||
var dataOptions = {};
|
var dataOptions = {};
|
||||||
|
var flattenedOptions = ['locale'];
|
||||||
for (i = 0, l = dataKeys.length; i < l; i++) {
|
for (i = 0, l = dataKeys.length; i < l; i++) {
|
||||||
var name = dataKeys[i].replace(/^abs([A-Z])/, matchToLowerCase).replace(/([A-Z])/g, '-$1').toLowerCase();
|
var name = dataKeys[i].replace(/^abs([A-Z])/, matchToLowerCase).replace(/([A-Z])/g, '-$1').toLowerCase();
|
||||||
|
var keys = name.split('-');
|
||||||
|
|
||||||
|
// Certain options should be flattened to a single object
|
||||||
|
// and not fully expanded (such as Locale).
|
||||||
|
if (keys[0] && keys.length > 1 && flattenedOptions.indexOf(keys[0]) !== -1) {
|
||||||
|
var newKeys = [keys.shift()];
|
||||||
|
var property = '';
|
||||||
|
// Combine the remaining keys as a single property.
|
||||||
|
for (var ii = 0; ii < keys.length; ii++) {
|
||||||
|
property += (ii === 0 ? keys[ii] : keys[ii].charAt(0).toUpperCase() + keys[ii].slice(1));
|
||||||
|
}
|
||||||
|
newKeys.push(property);
|
||||||
|
keys = newKeys;
|
||||||
|
}
|
||||||
this.log(this.LOG_DEBUG, 'Processing data attribute "data-abs-' + name + '":', data[dataKeys[i]]);
|
this.log(this.LOG_DEBUG, 'Processing data attribute "data-abs-' + name + '":', data[dataKeys[i]]);
|
||||||
expandObject(name.split('-'), data[dataKeys[i]], dataOptions);
|
expandObject(keys, data[dataKeys[i]], dataOptions);
|
||||||
}
|
}
|
||||||
this.options = $.extend(true, {}, this.options, dataOptions);
|
this.options = $.extend(true, {}, this.options, dataOptions);
|
||||||
this.log(this.LOG_DEBUG, 'Merged in the data attribute options: ', dataOptions, this.options);
|
this.log(this.LOG_DEBUG, 'Merged in the data attribute options: ', dataOptions, this.options);
|
||||||
@@ -315,6 +330,12 @@ AjaxBootstrapSelect.prototype.init = function () {
|
|||||||
plugin.log(plugin.LOG_DEBUG, 'Key ignored.');
|
plugin.log(plugin.LOG_DEBUG, 'Key ignored.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't process if below minimum query length
|
||||||
|
if (query.length < plugin.options.minLength) {
|
||||||
|
plugin.list.setStatus(plugin.t('statusTooShort'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Clear out any existing timer.
|
// Clear out any existing timer.
|
||||||
clearTimeout(requestDelayTimer);
|
clearTimeout(requestDelayTimer);
|
||||||
@@ -573,8 +594,25 @@ var AjaxBootstrapSelectList = function (plugin) {
|
|||||||
this.title = null;
|
this.title = null;
|
||||||
this.selectedTextFormat = plugin.selectpicker.options.selectedTextFormat;
|
this.selectedTextFormat = plugin.selectpicker.options.selectedTextFormat;
|
||||||
|
|
||||||
|
// Save initial options
|
||||||
|
var initial_options = [];
|
||||||
|
plugin.$element.find('option').each(function() {
|
||||||
|
var $option = $(this);
|
||||||
|
var value = $option.attr('value');
|
||||||
|
initial_options.push({
|
||||||
|
value: value,
|
||||||
|
text: $option.text(),
|
||||||
|
'class': $option.attr('class') || '',
|
||||||
|
data: $option.data() || {},
|
||||||
|
preserved: plugin.options.preserveSelected,
|
||||||
|
selected: !!$option.attr('selected')
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.cacheSet(/*query=*/'', initial_options);
|
||||||
|
|
||||||
// Preserve selected options.
|
// Preserve selected options.
|
||||||
if (plugin.options.preserveSelected) {
|
if (plugin.options.preserveSelected) {
|
||||||
|
that.selected = initial_options;
|
||||||
plugin.$element.on('change.abs.preserveSelected', function (e) {
|
plugin.$element.on('change.abs.preserveSelected', function (e) {
|
||||||
var $selected = plugin.$element.find(':selected');
|
var $selected = plugin.$element.find(':selected');
|
||||||
that.selected = [];
|
that.selected = [];
|
||||||
@@ -644,7 +682,7 @@ AjaxBootstrapSelectList.prototype.build = function (data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set various properties.
|
// Set various properties.
|
||||||
$option.val(item.value).text(item.text);
|
$option.val(item.value).text(item.text).attr('title', item.text);
|
||||||
if (item['class'].length) {
|
if (item['class'].length) {
|
||||||
$option.attr('class', item['class']);
|
$option.attr('class', item['class']);
|
||||||
}
|
}
|
||||||
@@ -732,7 +770,13 @@ AjaxBootstrapSelectList.prototype.refresh = function (triggerChange) {
|
|||||||
if (!this.plugin.$element.find('option').length && emptyTitle && emptyTitle.length) {
|
if (!this.plugin.$element.find('option').length && emptyTitle && emptyTitle.length) {
|
||||||
this.setTitle(emptyTitle);
|
this.setTitle(emptyTitle);
|
||||||
}
|
}
|
||||||
else if (this.title) {
|
else if (
|
||||||
|
this.title ||
|
||||||
|
(
|
||||||
|
this.selectedTextFormat !== 'static' &&
|
||||||
|
this.selectedTextFormat !== this.plugin.selectpicker.options.selectedTextFormat
|
||||||
|
)
|
||||||
|
) {
|
||||||
this.restoreTitle();
|
this.restoreTitle();
|
||||||
}
|
}
|
||||||
this.plugin.selectpicker.refresh();
|
this.plugin.selectpicker.refresh();
|
||||||
@@ -1224,6 +1268,14 @@ $.fn.ajaxSelectPicker.defaults = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @member $.fn.ajaxSelectPicker.defaults
|
||||||
|
* @cfg {Number} minLength = 0
|
||||||
|
* @markdown
|
||||||
|
* Invoke a request for empty search values.
|
||||||
|
*/
|
||||||
|
minLength: 0,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @member $.fn.ajaxSelectPicker.defaults
|
* @member $.fn.ajaxSelectPicker.defaults
|
||||||
* @cfg {String} ajaxSearchUrl
|
* @cfg {String} ajaxSearchUrl
|
||||||
@@ -1296,8 +1348,7 @@ $.fn.ajaxSelectPicker.defaults = {
|
|||||||
* 39: "right",
|
* 39: "right",
|
||||||
* 38: "up",
|
* 38: "up",
|
||||||
* 40: "down",
|
* 40: "down",
|
||||||
* 91: "meta",
|
* 91: "meta"
|
||||||
* 229: "unknown"
|
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
@@ -1311,8 +1362,7 @@ $.fn.ajaxSelectPicker.defaults = {
|
|||||||
39: "right",
|
39: "right",
|
||||||
38: "up",
|
38: "up",
|
||||||
40: "down",
|
40: "down",
|
||||||
91: "meta",
|
91: "meta"
|
||||||
229: "unknown"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1406,7 +1456,7 @@ $.fn.ajaxSelectPicker.defaults = {
|
|||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
preprocessData: function(){},
|
preprocessData: function () { },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @member $.fn.ajaxSelectPicker.defaults
|
* @member $.fn.ajaxSelectPicker.defaults
|
||||||
@@ -1434,7 +1484,7 @@ $.fn.ajaxSelectPicker.defaults = {
|
|||||||
* @markdown
|
* @markdown
|
||||||
* Process the data returned after this plugin, but before the list is built.
|
* Process the data returned after this plugin, but before the list is built.
|
||||||
*/
|
*/
|
||||||
processData: function(){},
|
processData: function () { },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @member $.fn.ajaxSelectPicker.defaults
|
* @member $.fn.ajaxSelectPicker.defaults
|
||||||
@@ -1547,7 +1597,15 @@ $.fn.ajaxSelectPicker.locale['en-US'] = {
|
|||||||
* @markdown
|
* @markdown
|
||||||
* The text to use in the status container when a request is being initiated.
|
* The text to use in the status container when a request is being initiated.
|
||||||
*/
|
*/
|
||||||
statusSearching: 'Searching...'
|
statusSearching: 'Searching...',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @member $.fn.ajaxSelectPicker.locale
|
||||||
|
* @cfg {String} statusToShort = 'Please enter more characters'
|
||||||
|
* @markdown
|
||||||
|
* The text used in the status container when the request returns no results.
|
||||||
|
*/
|
||||||
|
statusTooShort: 'Please enter more characters'
|
||||||
};
|
};
|
||||||
$.fn.ajaxSelectPicker.locale.en = $.fn.ajaxSelectPicker.locale['en-US'];
|
$.fn.ajaxSelectPicker.locale.en = $.fn.ajaxSelectPicker.locale['en-US'];
|
||||||
|
|
||||||
|
|||||||
8
RIGS/static/js/alert.js
Normal file → Executable file
8
RIGS/static/js/alert.js
Normal file → Executable file
@@ -1,8 +1,8 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: alert.js v3.3.2
|
* Bootstrap: alert.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#alerts
|
* http://getbootstrap.com/javascript/#alerts
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
$(el).on('click', dismiss, this.close)
|
$(el).on('click', dismiss, this.close)
|
||||||
}
|
}
|
||||||
|
|
||||||
Alert.VERSION = '3.3.2'
|
Alert.VERSION = '3.3.7'
|
||||||
|
|
||||||
Alert.TRANSITION_DURATION = 150
|
Alert.TRANSITION_DURATION = 150
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
||||||
}
|
}
|
||||||
|
|
||||||
var $parent = $(selector)
|
var $parent = $(selector === '#' ? [] : selector)
|
||||||
|
|
||||||
if (e) e.preventDefault()
|
if (e) e.preventDefault()
|
||||||
|
|
||||||
|
|||||||
1485
RIGS/static/js/bootstrap-select.js
vendored
1485
RIGS/static/js/bootstrap-select.js
vendored
File diff suppressed because it is too large
Load Diff
37
RIGS/static/js/button.js
Normal file → Executable file
37
RIGS/static/js/button.js
Normal file → Executable file
@@ -1,8 +1,8 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: button.js v3.3.2
|
* Bootstrap: button.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#buttons
|
* http://getbootstrap.com/javascript/#buttons
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
Button.VERSION = '3.3.2'
|
Button.VERSION = '3.3.7'
|
||||||
|
|
||||||
Button.DEFAULTS = {
|
Button.DEFAULTS = {
|
||||||
loadingText: 'loading...'
|
loadingText: 'loading...'
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
var val = $el.is('input') ? 'val' : 'html'
|
var val = $el.is('input') ? 'val' : 'html'
|
||||||
var data = $el.data()
|
var data = $el.data()
|
||||||
|
|
||||||
state = state + 'Text'
|
state += 'Text'
|
||||||
|
|
||||||
if (data.resetText == null) $el.data('resetText', $el[val]())
|
if (data.resetText == null) $el.data('resetText', $el[val]())
|
||||||
|
|
||||||
@@ -41,10 +41,10 @@
|
|||||||
|
|
||||||
if (state == 'loadingText') {
|
if (state == 'loadingText') {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
$el.addClass(d).attr(d, d)
|
$el.addClass(d).attr(d, d).prop(d, true)
|
||||||
} else if (this.isLoading) {
|
} else if (this.isLoading) {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
$el.removeClass(d).removeAttr(d)
|
$el.removeClass(d).removeAttr(d).prop(d, false)
|
||||||
}
|
}
|
||||||
}, this), 0)
|
}, this), 0)
|
||||||
}
|
}
|
||||||
@@ -56,15 +56,19 @@
|
|||||||
if ($parent.length) {
|
if ($parent.length) {
|
||||||
var $input = this.$element.find('input')
|
var $input = this.$element.find('input')
|
||||||
if ($input.prop('type') == 'radio') {
|
if ($input.prop('type') == 'radio') {
|
||||||
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
|
if ($input.prop('checked')) changed = false
|
||||||
else $parent.find('.active').removeClass('active')
|
$parent.find('.active').removeClass('active')
|
||||||
|
this.$element.addClass('active')
|
||||||
|
} else if ($input.prop('type') == 'checkbox') {
|
||||||
|
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
|
||||||
|
this.$element.toggleClass('active')
|
||||||
}
|
}
|
||||||
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
|
$input.prop('checked', this.$element.hasClass('active'))
|
||||||
|
if (changed) $input.trigger('change')
|
||||||
} else {
|
} else {
|
||||||
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
|
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
|
||||||
|
this.$element.toggleClass('active')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed) this.$element.toggleClass('active')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -104,10 +108,15 @@
|
|||||||
|
|
||||||
$(document)
|
$(document)
|
||||||
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
||||||
var $btn = $(e.target)
|
var $btn = $(e.target).closest('.btn')
|
||||||
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
|
||||||
Plugin.call($btn, 'toggle')
|
Plugin.call($btn, 'toggle')
|
||||||
e.preventDefault()
|
if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
|
||||||
|
// Prevent double click on radios, and the double selections (so cancellation) on checkboxes
|
||||||
|
e.preventDefault()
|
||||||
|
// The target component still receive the focus
|
||||||
|
if ($btn.is('input,button')) $btn.trigger('focus')
|
||||||
|
else $btn.find('input:visible,button:visible').first().trigger('focus')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
||||||
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
||||||
|
|||||||
14
RIGS/static/js/carousel.js
Normal file → Executable file
14
RIGS/static/js/carousel.js
Normal file → Executable file
@@ -1,8 +1,8 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: carousel.js v3.3.2
|
* Bootstrap: carousel.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#carousel
|
* http://getbootstrap.com/javascript/#carousel
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
this.$element = $(element)
|
this.$element = $(element)
|
||||||
this.$indicators = this.$element.find('.carousel-indicators')
|
this.$indicators = this.$element.find('.carousel-indicators')
|
||||||
this.options = options
|
this.options = options
|
||||||
this.paused =
|
this.paused = null
|
||||||
this.sliding =
|
this.sliding = null
|
||||||
this.interval =
|
this.interval = null
|
||||||
this.$active =
|
this.$active = null
|
||||||
this.$items = null
|
this.$items = null
|
||||||
|
|
||||||
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
||||||
}
|
}
|
||||||
|
|
||||||
Carousel.VERSION = '3.3.2'
|
Carousel.VERSION = '3.3.7'
|
||||||
|
|
||||||
Carousel.TRANSITION_DURATION = 600
|
Carousel.TRANSITION_DURATION = 600
|
||||||
|
|
||||||
|
|||||||
17
RIGS/static/js/collapse.js
Normal file → Executable file
17
RIGS/static/js/collapse.js
Normal file → Executable file
@@ -1,11 +1,12 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: collapse.js v3.3.2
|
* Bootstrap: collapse.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#collapse
|
* http://getbootstrap.com/javascript/#collapse
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
|
/* jshint latedef: false */
|
||||||
|
|
||||||
+function ($) {
|
+function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@@ -16,7 +17,8 @@
|
|||||||
var Collapse = function (element, options) {
|
var Collapse = function (element, options) {
|
||||||
this.$element = $(element)
|
this.$element = $(element)
|
||||||
this.options = $.extend({}, Collapse.DEFAULTS, options)
|
this.options = $.extend({}, Collapse.DEFAULTS, options)
|
||||||
this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
|
this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
|
||||||
|
'[data-toggle="collapse"][data-target="#' + element.id + '"]')
|
||||||
this.transitioning = null
|
this.transitioning = null
|
||||||
|
|
||||||
if (this.options.parent) {
|
if (this.options.parent) {
|
||||||
@@ -28,13 +30,12 @@
|
|||||||
if (this.options.toggle) this.toggle()
|
if (this.options.toggle) this.toggle()
|
||||||
}
|
}
|
||||||
|
|
||||||
Collapse.VERSION = '3.3.2'
|
Collapse.VERSION = '3.3.7'
|
||||||
|
|
||||||
Collapse.TRANSITION_DURATION = 350
|
Collapse.TRANSITION_DURATION = 350
|
||||||
|
|
||||||
Collapse.DEFAULTS = {
|
Collapse.DEFAULTS = {
|
||||||
toggle: true,
|
toggle: true
|
||||||
trigger: '[data-toggle="collapse"]'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Collapse.prototype.dimension = function () {
|
Collapse.prototype.dimension = function () {
|
||||||
@@ -172,7 +173,7 @@
|
|||||||
var data = $this.data('bs.collapse')
|
var data = $this.data('bs.collapse')
|
||||||
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||||
|
|
||||||
if (!data && options.toggle && option == 'show') options.toggle = false
|
if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
|
||||||
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
||||||
if (typeof option == 'string') data[option]()
|
if (typeof option == 'string') data[option]()
|
||||||
})
|
})
|
||||||
@@ -203,7 +204,7 @@
|
|||||||
|
|
||||||
var $target = getTargetFromTrigger($this)
|
var $target = getTargetFromTrigger($this)
|
||||||
var data = $target.data('bs.collapse')
|
var data = $target.data('bs.collapse')
|
||||||
var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
|
var option = data ? 'toggle' : $this.data()
|
||||||
|
|
||||||
Plugin.call($target, option)
|
Plugin.call($target, option)
|
||||||
})
|
})
|
||||||
|
|||||||
94
RIGS/static/js/dropdown.js
Normal file → Executable file
94
RIGS/static/js/dropdown.js
Normal file → Executable file
@@ -1,8 +1,8 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: dropdown.js v3.3.2
|
* Bootstrap: dropdown.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#dropdowns
|
* http://getbootstrap.com/javascript/#dropdowns
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
@@ -19,7 +19,41 @@
|
|||||||
$(element).on('click.bs.dropdown', this.toggle)
|
$(element).on('click.bs.dropdown', this.toggle)
|
||||||
}
|
}
|
||||||
|
|
||||||
Dropdown.VERSION = '3.3.2'
|
Dropdown.VERSION = '3.3.7'
|
||||||
|
|
||||||
|
function getParent($this) {
|
||||||
|
var selector = $this.attr('data-target')
|
||||||
|
|
||||||
|
if (!selector) {
|
||||||
|
selector = $this.attr('href')
|
||||||
|
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
||||||
|
}
|
||||||
|
|
||||||
|
var $parent = selector && $(selector)
|
||||||
|
|
||||||
|
return $parent && $parent.length ? $parent : $this.parent()
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearMenus(e) {
|
||||||
|
if (e && e.which === 3) return
|
||||||
|
$(backdrop).remove()
|
||||||
|
$(toggle).each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
var $parent = getParent($this)
|
||||||
|
var relatedTarget = { relatedTarget: this }
|
||||||
|
|
||||||
|
if (!$parent.hasClass('open')) return
|
||||||
|
|
||||||
|
if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
|
||||||
|
|
||||||
|
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
|
||||||
|
|
||||||
|
if (e.isDefaultPrevented()) return
|
||||||
|
|
||||||
|
$this.attr('aria-expanded', 'false')
|
||||||
|
$parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
Dropdown.prototype.toggle = function (e) {
|
Dropdown.prototype.toggle = function (e) {
|
||||||
var $this = $(this)
|
var $this = $(this)
|
||||||
@@ -34,7 +68,10 @@
|
|||||||
if (!isActive) {
|
if (!isActive) {
|
||||||
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
|
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
|
||||||
// if mobile we use a backdrop because click events don't delegate
|
// if mobile we use a backdrop because click events don't delegate
|
||||||
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
|
$(document.createElement('div'))
|
||||||
|
.addClass('dropdown-backdrop')
|
||||||
|
.insertAfter($(this))
|
||||||
|
.on('click', clearMenus)
|
||||||
}
|
}
|
||||||
|
|
||||||
var relatedTarget = { relatedTarget: this }
|
var relatedTarget = { relatedTarget: this }
|
||||||
@@ -48,7 +85,7 @@
|
|||||||
|
|
||||||
$parent
|
$parent
|
||||||
.toggleClass('open')
|
.toggleClass('open')
|
||||||
.trigger('shown.bs.dropdown', relatedTarget)
|
.trigger($.Event('shown.bs.dropdown', relatedTarget))
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
@@ -67,57 +104,25 @@
|
|||||||
var $parent = getParent($this)
|
var $parent = getParent($this)
|
||||||
var isActive = $parent.hasClass('open')
|
var isActive = $parent.hasClass('open')
|
||||||
|
|
||||||
if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
|
if (!isActive && e.which != 27 || isActive && e.which == 27) {
|
||||||
if (e.which == 27) $parent.find(toggle).trigger('focus')
|
if (e.which == 27) $parent.find(toggle).trigger('focus')
|
||||||
return $this.trigger('click')
|
return $this.trigger('click')
|
||||||
}
|
}
|
||||||
|
|
||||||
var desc = ' li:not(.divider):visible a'
|
var desc = ' li:not(.disabled):visible a'
|
||||||
var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
|
var $items = $parent.find('.dropdown-menu' + desc)
|
||||||
|
|
||||||
if (!$items.length) return
|
if (!$items.length) return
|
||||||
|
|
||||||
var index = $items.index(e.target)
|
var index = $items.index(e.target)
|
||||||
|
|
||||||
if (e.which == 38 && index > 0) index-- // up
|
if (e.which == 38 && index > 0) index-- // up
|
||||||
if (e.which == 40 && index < $items.length - 1) index++ // down
|
if (e.which == 40 && index < $items.length - 1) index++ // down
|
||||||
if (!~index) index = 0
|
if (!~index) index = 0
|
||||||
|
|
||||||
$items.eq(index).trigger('focus')
|
$items.eq(index).trigger('focus')
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearMenus(e) {
|
|
||||||
if (e && e.which === 3) return
|
|
||||||
$(backdrop).remove()
|
|
||||||
$(toggle).each(function () {
|
|
||||||
var $this = $(this)
|
|
||||||
var $parent = getParent($this)
|
|
||||||
var relatedTarget = { relatedTarget: this }
|
|
||||||
|
|
||||||
if (!$parent.hasClass('open')) return
|
|
||||||
|
|
||||||
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
|
|
||||||
|
|
||||||
if (e.isDefaultPrevented()) return
|
|
||||||
|
|
||||||
$this.attr('aria-expanded', 'false')
|
|
||||||
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function getParent($this) {
|
|
||||||
var selector = $this.attr('data-target')
|
|
||||||
|
|
||||||
if (!selector) {
|
|
||||||
selector = $this.attr('href')
|
|
||||||
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
|
||||||
}
|
|
||||||
|
|
||||||
var $parent = selector && $(selector)
|
|
||||||
|
|
||||||
return $parent && $parent.length ? $parent : $this.parent()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// DROPDOWN PLUGIN DEFINITION
|
// DROPDOWN PLUGIN DEFINITION
|
||||||
// ==========================
|
// ==========================
|
||||||
@@ -155,7 +160,6 @@
|
|||||||
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||||
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
||||||
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
|
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
|
||||||
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
|
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
|
||||||
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
|
|
||||||
|
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
|
|||||||
10
RIGS/static/js/modal.js
Normal file → Executable file
10
RIGS/static/js/modal.js
Normal file → Executable file
@@ -1,8 +1,8 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: modal.js v3.3.5
|
* Bootstrap: modal.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#modals
|
* http://getbootstrap.com/javascript/#modals
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Modal.VERSION = '3.3.5'
|
Modal.VERSION = '3.3.7'
|
||||||
|
|
||||||
Modal.TRANSITION_DURATION = 300
|
Modal.TRANSITION_DURATION = 300
|
||||||
Modal.BACKDROP_TRANSITION_DURATION = 150
|
Modal.BACKDROP_TRANSITION_DURATION = 150
|
||||||
@@ -140,7 +140,9 @@
|
|||||||
$(document)
|
$(document)
|
||||||
.off('focusin.bs.modal') // guard against infinite focus loop
|
.off('focusin.bs.modal') // guard against infinite focus loop
|
||||||
.on('focusin.bs.modal', $.proxy(function (e) {
|
.on('focusin.bs.modal', $.proxy(function (e) {
|
||||||
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
|
if (document !== e.target &&
|
||||||
|
this.$element[0] !== e.target &&
|
||||||
|
!this.$element.has(e.target).length) {
|
||||||
this.$element.trigger('focus')
|
this.$element.trigger('focus')
|
||||||
}
|
}
|
||||||
}, this))
|
}, this))
|
||||||
|
|||||||
13
RIGS/static/js/popover.js
Normal file → Executable file
13
RIGS/static/js/popover.js
Normal file → Executable file
@@ -1,8 +1,8 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: popover.js v3.3.2
|
* Bootstrap: popover.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#popovers
|
* http://getbootstrap.com/javascript/#popovers
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
||||||
|
|
||||||
Popover.VERSION = '3.3.2'
|
Popover.VERSION = '3.3.7'
|
||||||
|
|
||||||
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
||||||
placement: 'right',
|
placement: 'right',
|
||||||
@@ -75,11 +75,6 @@
|
|||||||
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
|
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
|
||||||
}
|
}
|
||||||
|
|
||||||
Popover.prototype.tip = function () {
|
|
||||||
if (!this.$tip) this.$tip = $(this.options.template)
|
|
||||||
return this.$tip
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// POPOVER PLUGIN DEFINITION
|
// POPOVER PLUGIN DEFINITION
|
||||||
// =========================
|
// =========================
|
||||||
@@ -90,7 +85,7 @@
|
|||||||
var data = $this.data('bs.popover')
|
var data = $this.data('bs.popover')
|
||||||
var options = typeof option == 'object' && option
|
var options = typeof option == 'object' && option
|
||||||
|
|
||||||
if (!data && option == 'destroy') return
|
if (!data && /destroy|hide/.test(option)) return
|
||||||
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
||||||
if (typeof option == 'string') data[option]()
|
if (typeof option == 'string') data[option]()
|
||||||
})
|
})
|
||||||
|
|||||||
39
RIGS/static/js/scrollspy.js
Normal file → Executable file
39
RIGS/static/js/scrollspy.js
Normal file → Executable file
@@ -1,8 +1,8 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: scrollspy.js v3.3.2
|
* Bootstrap: scrollspy.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#scrollspy
|
* http://getbootstrap.com/javascript/#scrollspy
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
@@ -14,10 +14,8 @@
|
|||||||
// ==========================
|
// ==========================
|
||||||
|
|
||||||
function ScrollSpy(element, options) {
|
function ScrollSpy(element, options) {
|
||||||
var process = $.proxy(this.process, this)
|
this.$body = $(document.body)
|
||||||
|
this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
|
||||||
this.$body = $('body')
|
|
||||||
this.$scrollElement = $(element).is('body') ? $(window) : $(element)
|
|
||||||
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
||||||
this.selector = (this.options.target || '') + ' .nav li > a'
|
this.selector = (this.options.target || '') + ' .nav li > a'
|
||||||
this.offsets = []
|
this.offsets = []
|
||||||
@@ -25,12 +23,12 @@
|
|||||||
this.activeTarget = null
|
this.activeTarget = null
|
||||||
this.scrollHeight = 0
|
this.scrollHeight = 0
|
||||||
|
|
||||||
this.$scrollElement.on('scroll.bs.scrollspy', process)
|
this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
|
||||||
this.refresh()
|
this.refresh()
|
||||||
this.process()
|
this.process()
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollSpy.VERSION = '3.3.2'
|
ScrollSpy.VERSION = '3.3.7'
|
||||||
|
|
||||||
ScrollSpy.DEFAULTS = {
|
ScrollSpy.DEFAULTS = {
|
||||||
offset: 10
|
offset: 10
|
||||||
@@ -41,20 +39,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
ScrollSpy.prototype.refresh = function () {
|
ScrollSpy.prototype.refresh = function () {
|
||||||
var offsetMethod = 'offset'
|
var that = this
|
||||||
var offsetBase = 0
|
var offsetMethod = 'offset'
|
||||||
|
var offsetBase = 0
|
||||||
|
|
||||||
|
this.offsets = []
|
||||||
|
this.targets = []
|
||||||
|
this.scrollHeight = this.getScrollHeight()
|
||||||
|
|
||||||
if (!$.isWindow(this.$scrollElement[0])) {
|
if (!$.isWindow(this.$scrollElement[0])) {
|
||||||
offsetMethod = 'position'
|
offsetMethod = 'position'
|
||||||
offsetBase = this.$scrollElement.scrollTop()
|
offsetBase = this.$scrollElement.scrollTop()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.offsets = []
|
|
||||||
this.targets = []
|
|
||||||
this.scrollHeight = this.getScrollHeight()
|
|
||||||
|
|
||||||
var self = this
|
|
||||||
|
|
||||||
this.$body
|
this.$body
|
||||||
.find(this.selector)
|
.find(this.selector)
|
||||||
.map(function () {
|
.map(function () {
|
||||||
@@ -69,8 +66,8 @@
|
|||||||
})
|
})
|
||||||
.sort(function (a, b) { return a[0] - b[0] })
|
.sort(function (a, b) { return a[0] - b[0] })
|
||||||
.each(function () {
|
.each(function () {
|
||||||
self.offsets.push(this[0])
|
that.offsets.push(this[0])
|
||||||
self.targets.push(this[1])
|
that.targets.push(this[1])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,7 +96,7 @@
|
|||||||
for (i = offsets.length; i--;) {
|
for (i = offsets.length; i--;) {
|
||||||
activeTarget != targets[i]
|
activeTarget != targets[i]
|
||||||
&& scrollTop >= offsets[i]
|
&& scrollTop >= offsets[i]
|
||||||
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
|
||||||
&& this.activate(targets[i])
|
&& this.activate(targets[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -110,8 +107,8 @@
|
|||||||
this.clear()
|
this.clear()
|
||||||
|
|
||||||
var selector = this.selector +
|
var selector = this.selector +
|
||||||
'[data-target="' + target + '"],' +
|
'[data-target="' + target + '"],' +
|
||||||
this.selector + '[href="' + target + '"]'
|
this.selector + '[href="' + target + '"]'
|
||||||
|
|
||||||
var active = $(selector)
|
var active = $(selector)
|
||||||
.parents('li')
|
.parents('li')
|
||||||
|
|||||||
12
RIGS/static/js/tab.js
Normal file → Executable file
12
RIGS/static/js/tab.js
Normal file → Executable file
@@ -1,8 +1,8 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: tab.js v3.3.2
|
* Bootstrap: tab.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#tabs
|
* http://getbootstrap.com/javascript/#tabs
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
@@ -14,10 +14,12 @@
|
|||||||
// ====================
|
// ====================
|
||||||
|
|
||||||
var Tab = function (element) {
|
var Tab = function (element) {
|
||||||
|
// jscs:disable requireDollarBeforejQueryAssignment
|
||||||
this.element = $(element)
|
this.element = $(element)
|
||||||
|
// jscs:enable requireDollarBeforejQueryAssignment
|
||||||
}
|
}
|
||||||
|
|
||||||
Tab.VERSION = '3.3.2'
|
Tab.VERSION = '3.3.7'
|
||||||
|
|
||||||
Tab.TRANSITION_DURATION = 150
|
Tab.TRANSITION_DURATION = 150
|
||||||
|
|
||||||
@@ -65,7 +67,7 @@
|
|||||||
var $active = container.find('> .active')
|
var $active = container.find('> .active')
|
||||||
var transition = callback
|
var transition = callback
|
||||||
&& $.support.transition
|
&& $.support.transition
|
||||||
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
|
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
|
||||||
|
|
||||||
function next() {
|
function next() {
|
||||||
$active
|
$active
|
||||||
@@ -88,7 +90,7 @@
|
|||||||
element.removeClass('fade')
|
element.removeClass('fade')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (element.parent('.dropdown-menu')) {
|
if (element.parent('.dropdown-menu').length) {
|
||||||
element
|
element
|
||||||
.closest('li.dropdown')
|
.closest('li.dropdown')
|
||||||
.addClass('active')
|
.addClass('active')
|
||||||
|
|||||||
120
RIGS/static/js/tooltip.js
Normal file → Executable file
120
RIGS/static/js/tooltip.js
Normal file → Executable file
@@ -1,9 +1,9 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: tooltip.js v3.3.2
|
* Bootstrap: tooltip.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#tooltip
|
* http://getbootstrap.com/javascript/#tooltip
|
||||||
* Inspired by the original jQuery.tipsy by Jason Frame
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
@@ -15,17 +15,18 @@
|
|||||||
// ===============================
|
// ===============================
|
||||||
|
|
||||||
var Tooltip = function (element, options) {
|
var Tooltip = function (element, options) {
|
||||||
this.type =
|
this.type = null
|
||||||
this.options =
|
this.options = null
|
||||||
this.enabled =
|
this.enabled = null
|
||||||
this.timeout =
|
this.timeout = null
|
||||||
this.hoverState =
|
this.hoverState = null
|
||||||
this.$element = null
|
this.$element = null
|
||||||
|
this.inState = null
|
||||||
|
|
||||||
this.init('tooltip', element, options)
|
this.init('tooltip', element, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.VERSION = '3.3.2'
|
Tooltip.VERSION = '3.3.7'
|
||||||
|
|
||||||
Tooltip.TRANSITION_DURATION = 150
|
Tooltip.TRANSITION_DURATION = 150
|
||||||
|
|
||||||
@@ -50,7 +51,12 @@
|
|||||||
this.type = type
|
this.type = type
|
||||||
this.$element = $(element)
|
this.$element = $(element)
|
||||||
this.options = this.getOptions(options)
|
this.options = this.getOptions(options)
|
||||||
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
|
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
|
||||||
|
this.inState = { click: false, hover: false, focus: false }
|
||||||
|
|
||||||
|
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
|
||||||
|
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
|
||||||
|
}
|
||||||
|
|
||||||
var triggers = this.options.trigger.split(' ')
|
var triggers = this.options.trigger.split(' ')
|
||||||
|
|
||||||
@@ -105,16 +111,20 @@
|
|||||||
var self = obj instanceof this.constructor ?
|
var self = obj instanceof this.constructor ?
|
||||||
obj : $(obj.currentTarget).data('bs.' + this.type)
|
obj : $(obj.currentTarget).data('bs.' + this.type)
|
||||||
|
|
||||||
if (self && self.$tip && self.$tip.is(':visible')) {
|
|
||||||
self.hoverState = 'in'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!self) {
|
if (!self) {
|
||||||
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
|
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
|
||||||
$(obj.currentTarget).data('bs.' + this.type, self)
|
$(obj.currentTarget).data('bs.' + this.type, self)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (obj instanceof $.Event) {
|
||||||
|
self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self.tip().hasClass('in') || self.hoverState == 'in') {
|
||||||
|
self.hoverState = 'in'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
clearTimeout(self.timeout)
|
clearTimeout(self.timeout)
|
||||||
|
|
||||||
self.hoverState = 'in'
|
self.hoverState = 'in'
|
||||||
@@ -126,6 +136,14 @@
|
|||||||
}, self.options.delay.show)
|
}, self.options.delay.show)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Tooltip.prototype.isInStateTrue = function () {
|
||||||
|
for (var key in this.inState) {
|
||||||
|
if (this.inState[key]) return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
Tooltip.prototype.leave = function (obj) {
|
Tooltip.prototype.leave = function (obj) {
|
||||||
var self = obj instanceof this.constructor ?
|
var self = obj instanceof this.constructor ?
|
||||||
obj : $(obj.currentTarget).data('bs.' + this.type)
|
obj : $(obj.currentTarget).data('bs.' + this.type)
|
||||||
@@ -135,6 +153,12 @@
|
|||||||
$(obj.currentTarget).data('bs.' + this.type, self)
|
$(obj.currentTarget).data('bs.' + this.type, self)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (obj instanceof $.Event) {
|
||||||
|
self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self.isInStateTrue()) return
|
||||||
|
|
||||||
clearTimeout(self.timeout)
|
clearTimeout(self.timeout)
|
||||||
|
|
||||||
self.hoverState = 'out'
|
self.hoverState = 'out'
|
||||||
@@ -181,6 +205,7 @@
|
|||||||
.data('bs.' + this.type, this)
|
.data('bs.' + this.type, this)
|
||||||
|
|
||||||
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
||||||
|
this.$element.trigger('inserted.bs.' + this.type)
|
||||||
|
|
||||||
var pos = this.getPosition()
|
var pos = this.getPosition()
|
||||||
var actualWidth = $tip[0].offsetWidth
|
var actualWidth = $tip[0].offsetWidth
|
||||||
@@ -188,13 +213,12 @@
|
|||||||
|
|
||||||
if (autoPlace) {
|
if (autoPlace) {
|
||||||
var orgPlacement = placement
|
var orgPlacement = placement
|
||||||
var $container = this.options.container ? $(this.options.container) : this.$element.parent()
|
var viewportDim = this.getPosition(this.$viewport)
|
||||||
var containerDim = this.getPosition($container)
|
|
||||||
|
|
||||||
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
|
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
|
||||||
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
|
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
|
||||||
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
|
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
|
||||||
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
|
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
|
||||||
placement
|
placement
|
||||||
|
|
||||||
$tip
|
$tip
|
||||||
@@ -235,8 +259,8 @@
|
|||||||
if (isNaN(marginTop)) marginTop = 0
|
if (isNaN(marginTop)) marginTop = 0
|
||||||
if (isNaN(marginLeft)) marginLeft = 0
|
if (isNaN(marginLeft)) marginLeft = 0
|
||||||
|
|
||||||
offset.top = offset.top + marginTop
|
offset.top += marginTop
|
||||||
offset.left = offset.left + marginLeft
|
offset.left += marginLeft
|
||||||
|
|
||||||
// $.fn.offset doesn't round pixel values
|
// $.fn.offset doesn't round pixel values
|
||||||
// so we use setOffset directly with our own function B-0
|
// so we use setOffset directly with our own function B-0
|
||||||
@@ -272,10 +296,10 @@
|
|||||||
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
|
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
|
Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
|
||||||
this.arrow()
|
this.arrow()
|
||||||
.css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
|
.css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
|
||||||
.css(isHorizontal ? 'top' : 'left', '')
|
.css(isVertical ? 'top' : 'left', '')
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.prototype.setContent = function () {
|
Tooltip.prototype.setContent = function () {
|
||||||
@@ -288,14 +312,16 @@
|
|||||||
|
|
||||||
Tooltip.prototype.hide = function (callback) {
|
Tooltip.prototype.hide = function (callback) {
|
||||||
var that = this
|
var that = this
|
||||||
var $tip = this.tip()
|
var $tip = $(this.$tip)
|
||||||
var e = $.Event('hide.bs.' + this.type)
|
var e = $.Event('hide.bs.' + this.type)
|
||||||
|
|
||||||
function complete() {
|
function complete() {
|
||||||
if (that.hoverState != 'in') $tip.detach()
|
if (that.hoverState != 'in') $tip.detach()
|
||||||
that.$element
|
if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
|
||||||
.removeAttr('aria-describedby')
|
that.$element
|
||||||
.trigger('hidden.bs.' + that.type)
|
.removeAttr('aria-describedby')
|
||||||
|
.trigger('hidden.bs.' + that.type)
|
||||||
|
}
|
||||||
callback && callback()
|
callback && callback()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,7 +331,7 @@
|
|||||||
|
|
||||||
$tip.removeClass('in')
|
$tip.removeClass('in')
|
||||||
|
|
||||||
$.support.transition && this.$tip.hasClass('fade') ?
|
$.support.transition && $tip.hasClass('fade') ?
|
||||||
$tip
|
$tip
|
||||||
.one('bsTransitionEnd', complete)
|
.one('bsTransitionEnd', complete)
|
||||||
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
|
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
|
||||||
@@ -318,7 +344,7 @@
|
|||||||
|
|
||||||
Tooltip.prototype.fixTitle = function () {
|
Tooltip.prototype.fixTitle = function () {
|
||||||
var $e = this.$element
|
var $e = this.$element
|
||||||
if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
|
if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
|
||||||
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -338,7 +364,10 @@
|
|||||||
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
|
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
|
||||||
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
|
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
|
||||||
}
|
}
|
||||||
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
||||||
|
// Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
|
||||||
|
// See https://github.com/twbs/bootstrap/issues/20280
|
||||||
|
var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
|
||||||
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
||||||
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
|
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
|
||||||
|
|
||||||
@@ -373,7 +402,7 @@
|
|||||||
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
|
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
|
||||||
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
|
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
|
||||||
delta.left = viewportDimensions.left - leftEdgeOffset
|
delta.left = viewportDimensions.left - leftEdgeOffset
|
||||||
} else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
|
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
|
||||||
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
|
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -399,7 +428,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.prototype.tip = function () {
|
Tooltip.prototype.tip = function () {
|
||||||
return (this.$tip = this.$tip || $(this.options.template))
|
if (!this.$tip) {
|
||||||
|
this.$tip = $(this.options.template)
|
||||||
|
if (this.$tip.length != 1) {
|
||||||
|
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.$tip
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.prototype.arrow = function () {
|
Tooltip.prototype.arrow = function () {
|
||||||
@@ -428,7 +463,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
|
if (e) {
|
||||||
|
self.inState.click = !self.inState.click
|
||||||
|
if (self.isInStateTrue()) self.enter(self)
|
||||||
|
else self.leave(self)
|
||||||
|
} else {
|
||||||
|
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.prototype.destroy = function () {
|
Tooltip.prototype.destroy = function () {
|
||||||
@@ -436,6 +477,13 @@
|
|||||||
clearTimeout(this.timeout)
|
clearTimeout(this.timeout)
|
||||||
this.hide(function () {
|
this.hide(function () {
|
||||||
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
||||||
|
if (that.$tip) {
|
||||||
|
that.$tip.detach()
|
||||||
|
}
|
||||||
|
that.$tip = null
|
||||||
|
that.$arrow = null
|
||||||
|
that.$viewport = null
|
||||||
|
that.$element = null
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,7 +497,7 @@
|
|||||||
var data = $this.data('bs.tooltip')
|
var data = $this.data('bs.tooltip')
|
||||||
var options = typeof option == 'object' && option
|
var options = typeof option == 'object' && option
|
||||||
|
|
||||||
if (!data && option == 'destroy') return
|
if (!data && /destroy|hide/.test(option)) return
|
||||||
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
|
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
|
||||||
if (typeof option == 'string') data[option]()
|
if (typeof option == 'string') data[option]()
|
||||||
})
|
})
|
||||||
|
|||||||
4
RIGS/static/js/transition.js
Normal file → Executable file
4
RIGS/static/js/transition.js
Normal file → Executable file
@@ -1,8 +1,8 @@
|
|||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: transition.js v3.3.2
|
* Bootstrap: transition.js v3.3.7
|
||||||
* http://getbootstrap.com/javascript/#transitions
|
* http://getbootstrap.com/javascript/#transitions
|
||||||
* ========================================================================
|
* ========================================================================
|
||||||
* Copyright 2011-2015 Twitter, Inc.
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* ======================================================================== */
|
* ======================================================================== */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user