").append( jQuery.parseHTML( responseText ) ).find( selector ) :
// Otherwise use the full result
responseText );
}).complete( callback && function( jqXHR, status ) {
self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
});
}
return this;
};
// Attach a bunch of functions for handling common AJAX events
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
jQuery.fn[ type ] = function( fn ) {
return this.on( type, fn );
};
});
jQuery.expr.filters.animated = function( elem ) {
return jQuery.grep(jQuery.timers, function( fn ) {
return elem === fn.elem;
}).length;
};
var docElem = window.document.documentElement;
/**
* Gets a window from an element
*/
function getWindow( elem ) {
return jQuery.isWindow( elem ) ?
elem :
elem.nodeType === 9 ?
elem.defaultView || elem.parentWindow :
false;
}
jQuery.offset = {
setOffset: function( elem, options, i ) {
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
position = jQuery.css( elem, "position" ),
curElem = jQuery( elem ),
props = {};
// set position first, in-case top/left are set even on static elem
if ( position === "static" ) {
elem.style.position = "relative";
}
curOffset = curElem.offset();
curCSSTop = jQuery.css( elem, "top" );
curCSSLeft = jQuery.css( elem, "left" );
calculatePosition = ( position === "absolute" || position === "fixed" ) &&
jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1;
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
if ( calculatePosition ) {
curPosition = curElem.position();
curTop = curPosition.top;
curLeft = curPosition.left;
} else {
curTop = parseFloat( curCSSTop ) || 0;
curLeft = parseFloat( curCSSLeft ) || 0;
}
if ( jQuery.isFunction( options ) ) {
options = options.call( elem, i, curOffset );
}
if ( options.top != null ) {
props.top = ( options.top - curOffset.top ) + curTop;
}
if ( options.left != null ) {
props.left = ( options.left - curOffset.left ) + curLeft;
}
if ( "using" in options ) {
options.using.call( elem, props );
} else {
curElem.css( props );
}
}
};
jQuery.fn.extend({
offset: function( options ) {
if ( arguments.length ) {
return options === undefined ?
this :
this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
}
var docElem, win,
box = { top: 0, left: 0 },
elem = this[ 0 ],
doc = elem && elem.ownerDocument;
if ( !doc ) {
return;
}
docElem = doc.documentElement;
// Make sure it's not a disconnected DOM node
if ( !jQuery.contains( docElem, elem ) ) {
return box;
}
// If we don't have gBCR, just use 0,0 rather than error
// BlackBerry 5, iOS 3 (original iPhone)
if ( typeof elem.getBoundingClientRect !== strundefined ) {
box = elem.getBoundingClientRect();
}
win = getWindow( doc );
return {
top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
};
},
position: function() {
if ( !this[ 0 ] ) {
return;
}
var offsetParent, offset,
parentOffset = { top: 0, left: 0 },
elem = this[ 0 ];
// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
if ( jQuery.css( elem, "position" ) === "fixed" ) {
// we assume that getBoundingClientRect is available when computed position is fixed
offset = elem.getBoundingClientRect();
} else {
// Get *real* offsetParent
offsetParent = this.offsetParent();
// Get correct offsets
offset = this.offset();
if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
parentOffset = offsetParent.offset();
}
// Add offsetParent borders
parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
}
// Subtract parent offsets and element margins
// note: when an element has margin: auto the offsetLeft and marginLeft
// are the same in Safari causing offset.left to incorrectly be 0
return {
top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
};
},
offsetParent: function() {
return this.map(function() {
var offsetParent = this.offsetParent || docElem;
while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
offsetParent = offsetParent.offsetParent;
}
return offsetParent || docElem;
});
}
});
// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
var top = /Y/.test( prop );
jQuery.fn[ method ] = function( val ) {
return access( this, function( elem, method, val ) {
var win = getWindow( elem );
if ( val === undefined ) {
return win ? (prop in win) ? win[ prop ] :
win.document.documentElement[ method ] :
elem[ method ];
}
if ( win ) {
win.scrollTo(
!top ? val : jQuery( win ).scrollLeft(),
top ? val : jQuery( win ).scrollTop()
);
} else {
elem[ method ] = val;
}
}, method, val, arguments.length, null );
};
});
// Add the top/left cssHooks using jQuery.fn.position
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
// getComputedStyle returns percent when specified for top/left/bottom/right
// rather than make the css module depend on the offset module, we just check for it here
jQuery.each( [ "top", "left" ], function( i, prop ) {
jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
function( elem, computed ) {
if ( computed ) {
computed = curCSS( elem, prop );
// if curCSS returns percentage, fallback to offset
return rnumnonpx.test( computed ) ?
jQuery( elem ).position()[ prop ] + "px" :
computed;
}
}
);
});
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
// margin is only for outerHeight, outerWidth
jQuery.fn[ funcName ] = function( margin, value ) {
var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
return access( this, function( elem, type, value ) {
var doc;
if ( jQuery.isWindow( elem ) ) {
// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
// isn't a whole lot we can do. See pull request at this URL for discussion:
// https://github.com/jquery/jquery/pull/764
return elem.document.documentElement[ "client" + name ];
}
// Get document width or height
if ( elem.nodeType === 9 ) {
doc = elem.documentElement;
// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
return Math.max(
elem.body[ "scroll" + name ], doc[ "scroll" + name ],
elem.body[ "offset" + name ], doc[ "offset" + name ],
doc[ "client" + name ]
);
}
return value === undefined ?
// Get width or height on the element, requesting but not forcing parseFloat
jQuery.css( elem, type, extra ) :
// Set width or height on the element
jQuery.style( elem, type, value, extra );
}, type, chainable ? margin : undefined, chainable, null );
};
});
});
// The number of elements contained in the matched element set
jQuery.fn.size = function() {
return this.length;
};
jQuery.fn.andSelf = jQuery.fn.addBack;
// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.
// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
if ( typeof define === "function" && define.amd ) {
define( "jquery", [], function() {
return jQuery;
});
}
var
// Map over jQuery in case of overwrite
_jQuery = window.jQuery,
// Map over the $ in case of overwrite
_$ = window.$;
jQuery.noConflict = function( deep ) {
if ( window.$ === jQuery ) {
window.$ = _$;
}
if ( deep && window.jQuery === jQuery ) {
window.jQuery = _jQuery;
}
return jQuery;
};
// Expose jQuery and $ identifiers, even in
// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
if ( typeof noGlobal === strundefined ) {
window.jQuery = window.$ = jQuery;
}
return jQuery;
}));
/* =============================================================
* bootstrap3-typeahead.js v3.0.3
* https://github.com/bassjobsen/Bootstrap-3-Typeahead
* =============================================================
* Original written by @mdo and @fat
* =============================================================
* Copyright 2014 Bass Jobsen @bassjobsen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
(function(root, factory) {
"use strict";
// CommonJS module is defined
if (typeof module !== 'undefined' && module.exports) {
module.exports = factory(require('jquery')(root));
}
// AMD module is defined
else if (typeof define === "function" && define.amd) {
define("bootstrap3-typeahead", ["jquery"], function($) {
return factory($);
});
} else {
factory(root.jQuery);
}
}(this, function($) {
"use strict";
// jshint laxcomma: true
/* TYPEAHEAD PUBLIC CLASS DEFINITION
* ================================= */
var Typeahead = function (element, options) {
this.$element = $(element);
this.options = $.extend({}, $.fn.typeahead.defaults, options);
this.matcher = this.options.matcher || this.matcher;
this.sorter = this.options.sorter || this.sorter;
this.select = this.options.select || this.select;
this.autoSelect = typeof this.options.autoSelect == 'boolean' ? this.options.autoSelect : true;
this.highlighter = this.options.highlighter || this.highlighter;
this.render = this.options.render || this.render;
this.updater = this.options.updater || this.updater;
this.source = this.options.source;
this.delay = typeof this.options.delay == 'number' ? this.options.delay : 250;
this.$menu = $(this.options.menu);
this.shown = false;
this.listen();
this.showHintOnFocus = typeof this.options.showHintOnFocus == 'boolean' ? this.options.showHintOnFocus : false;
};
Typeahead.prototype = {
constructor: Typeahead
, select: function () {
var val = this.$menu.find('.active').data('value');
if(this.autoSelect || val) {
this.$element
.val(this.updater(val))
.change();
}
return this.hide();
}
, updater: function (item) {
return item;
}
, setSource: function (source) {
this.source = source;
}
, show: function () {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
}), scrollHeight;
scrollHeight = typeof this.options.scrollHeight == 'function' ?
this.options.scrollHeight.call() :
this.options.scrollHeight;
this.$menu
.insertAfter(this.$element)
.css({
top: pos.top + pos.height + scrollHeight
, left: pos.left
})
.show();
this.shown = true;
return this;
}
, hide: function () {
this.$menu.hide();
this.shown = false;
return this;
}
, lookup: function (query) {
var items;
if (typeof(query) != 'undefined' && query !== null) {
this.query = query;
} else {
this.query = this.$element.val() || '';
}
if ((this.query.length < this.options.minLength) && !this.showHintOnFocus) {
return this.shown ? this.hide() : this;
}
var worker = $.proxy(function() {
items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source;
if (items) {
this.process(items);
}
}, this)
clearTimeout(this.lookupWorker)
this.lookupWorker = setTimeout(worker, this.delay)
}
, process: function (items) {
var that = this;
items = $.grep(items, function (item) {
return that.matcher(item);
});
items = this.sorter(items);
if (!items.length) {
return this.shown ? this.hide() : this;
}
if (this.options.items == 'all') {
return this.render(items).show();
} else {
return this.render(items.slice(0, this.options.items)).show();
}
}
, matcher: function (item) {
return ~item.toLowerCase().indexOf(this.query.toLowerCase());
}
, sorter: function (items) {
var beginswith = []
, caseSensitive = []
, caseInsensitive = []
, item;
while ((item = items.shift())) {
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item);
else if (~item.indexOf(this.query)) caseSensitive.push(item);
else caseInsensitive.push(item);
}
return beginswith.concat(caseSensitive, caseInsensitive);
}
, highlighter: function (item) {
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '
' + match + '';
});
}
, render: function (items) {
var that = this;
items = $(items).map(function (i, item) {
i = $(that.options.item).data('value', item);
i.find('a').html(that.highlighter(item));
return i[0];
});
if (this.autoSelect) {
items.first().addClass('active');
}
this.$menu.html(items);
return this;
}
, next: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, next = active.next();
if (!next.length) {
next = $(this.$menu.find('li')[0]);
}
next.addClass('active');
}
, prev: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, prev = active.prev();
if (!prev.length) {
prev = this.$menu.find('li').last();
}
prev.addClass('active');
}
, listen: function () {
this.$element
.on('focus', $.proxy(this.focus, this))
.on('blur', $.proxy(this.blur, this))
.on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this));
if (this.eventSupported('keydown')) {
this.$element.on('keydown', $.proxy(this.keydown, this));
}
this.$menu
.on('click', $.proxy(this.click, this))
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
.on('mouseleave', 'li', $.proxy(this.mouseleave, this));
}
, destroy : function () {
this.$element.data('typeahead',null);
this.$element
.off('focus')
.off('blur')
.off('keypress')
.off('keyup');
if (this.eventSupported('keydown')) {
this.$element.off('keydown');
}
this.$menu.remove();
}
, eventSupported: function(eventName) {
var isSupported = eventName in this.$element;
if (!isSupported) {
this.$element.setAttribute(eventName, 'return;');
isSupported = typeof this.$element[eventName] === 'function';
}
return isSupported;
}
, move: function (e) {
if (!this.shown) return;
switch(e.keyCode) {
case 9: // tab
case 13: // enter
case 27: // escape
e.preventDefault();
break;
case 38: // up arrow
e.preventDefault();
this.prev();
break;
case 40: // down arrow
e.preventDefault();
this.next();
break;
}
e.stopPropagation();
}
, keydown: function (e) {
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27]);
if (!this.shown && e.keyCode == 40) {
this.lookup("");
} else {
this.move(e);
}
}
, keypress: function (e) {
if (this.suppressKeyPressRepeat) return;
this.move(e);
}
, keyup: function (e) {
switch(e.keyCode) {
case 40: // down arrow
case 38: // up arrow
case 16: // shift
case 17: // ctrl
case 18: // alt
break;
case 9: // tab
case 13: // enter
if (!this.shown) return;
this.select();
break;
case 27: // escape
if (!this.shown) return;
this.hide();
break;
default:
this.lookup();
}
e.stopPropagation();
e.preventDefault();
}
, focus: function (e) {
if (!this.focused) {
this.focused = true;
if (this.options.minLength === 0 && !this.$element.val() || this.options.showHintOnFocus) {
this.lookup();
}
}
}
, blur: function (e) {
this.focused = false;
if (!this.mousedover && this.shown) this.hide();
}
, click: function (e) {
e.stopPropagation();
e.preventDefault();
this.select();
this.$element.focus();
}
, mouseenter: function (e) {
this.mousedover = true;
this.$menu.find('.active').removeClass('active');
$(e.currentTarget).addClass('active');
}
, mouseleave: function (e) {
this.mousedover = false;
if (!this.focused && this.shown) this.hide();
}
};
/* TYPEAHEAD PLUGIN DEFINITION
* =========================== */
var old = $.fn.typeahead;
$.fn.typeahead = function (option) {
var arg = arguments;
return this.each(function () {
var $this = $(this)
, data = $this.data('typeahead')
, options = typeof option == 'object' && option;
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)));
if (typeof option == 'string') {
if (arg.length > 1) {
data[option].apply(data, Array.prototype.slice.call(arg ,1));
} else {
data[option]();
}
}
});
};
$.fn.typeahead.defaults = {
source: []
, items: 8
, menu: ''
, item: '
'
, minLength: 1
, scrollHeight: 0
, autoSelect: true
};
$.fn.typeahead.Constructor = Typeahead;
/* TYPEAHEAD NO CONFLICT
* =================== */
$.fn.typeahead.noConflict = function () {
$.fn.typeahead = old;
return this;
};
/* TYPEAHEAD DATA-API
* ================== */
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
var $this = $(this);
if ($this.data('typeahead')) return;
$this.typeahead($this.data());
});
}));
/* ========================================================================
* Bootstrap: transition.js v3.3.4
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
function transitionEnd() {
var el = document.createElement('bootstrap')
var transEndEventNames = {
WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
OTransition : 'oTransitionEnd otransitionend',
transition : 'transitionend'
}
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] }
}
}
return false // explicit for ie8 ( ._.)
}
// http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false
var $el = this
$(this).one('bsTransitionEnd', function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}
$(function () {
$.support.transition = transitionEnd()
if (!$.support.transition) return
$.event.special.bsTransitionEnd = {
bindType: $.support.transition.end,
delegateType: $.support.transition.end,
handle: function (e) {
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
}
}
})
}(jQuery);
/* ========================================================================
* Bootstrap: modal.js v3.3.4
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// MODAL CLASS DEFINITION
// ======================
var Modal = function (element, options) {
this.options = options
this.$body = $(document.body)
this.$element = $(element)
this.$dialog = this.$element.find('.modal-dialog')
this.$backdrop = null
this.isShown = null
this.originalBodyPad = null
this.scrollbarWidth = 0
this.ignoreBackdropClick = false
if (this.options.remote) {
this.$element
.find('.modal-content')
.load(this.options.remote, $.proxy(function () {
this.$element.trigger('loaded.bs.modal')
}, this))
}
}
Modal.VERSION = '3.3.4'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Modal.DEFAULTS = {
backdrop: true,
keyboard: true,
show: true
}
Modal.prototype.toggle = function (_relatedTarget) {
return this.isShown ? this.hide() : this.show(_relatedTarget)
}
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
if (this.isShown || e.isDefaultPrevented()) return
this.isShown = true
this.checkScrollbar()
this.setScrollbar()
this.$body.addClass('modal-open')
this.escape()
this.resize()
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
this.$dialog.on('mousedown.dismiss.bs.modal', function () {
that.$element.one('mouseup.dismiss.bs.modal', function (e) {
if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
})
})
this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade')
if (!that.$element.parent().length) {
that.$element.appendTo(that.$body) // don't move modals dom position
}
that.$element
.show()
.scrollTop(0)
that.adjustDialog()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
that.$element
.addClass('in')
.attr('aria-hidden', false)
that.enforceFocus()
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
transition ?
that.$dialog // wait for modal to slide in
.one('bsTransitionEnd', function () {
that.$element.trigger('focus').trigger(e)
})
.emulateTransitionEnd(Modal.TRANSITION_DURATION) :
that.$element.trigger('focus').trigger(e)
})
}
Modal.prototype.hide = function (e) {
if (e) e.preventDefault()
e = $.Event('hide.bs.modal')
this.$element.trigger(e)
if (!this.isShown || e.isDefaultPrevented()) return
this.isShown = false
this.escape()
this.resize()
$(document).off('focusin.bs.modal')
this.$element
.removeClass('in')
.attr('aria-hidden', true)
.off('click.dismiss.bs.modal')
.off('mouseup.dismiss.bs.modal')
this.$dialog.off('mousedown.dismiss.bs.modal')
$.support.transition && this.$element.hasClass('fade') ?
this.$element
.one('bsTransitionEnd', $.proxy(this.hideModal, this))
.emulateTransitionEnd(Modal.TRANSITION_DURATION) :
this.hideModal()
}
Modal.prototype.enforceFocus = function () {
$(document)
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
this.$element.trigger('focus')
}
}, this))
}
Modal.prototype.escape = function () {
if (this.isShown && this.options.keyboard) {
this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
e.which == 27 && this.hide()
}, this))
} else if (!this.isShown) {
this.$element.off('keydown.dismiss.bs.modal')
}
}
Modal.prototype.resize = function () {
if (this.isShown) {
$(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
} else {
$(window).off('resize.bs.modal')
}
}
Modal.prototype.hideModal = function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.$body.removeClass('modal-open')
that.resetAdjustments()
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')
})
}
Modal.prototype.removeBackdrop = function () {
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
this.$backdrop = $('
')
.appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (this.ignoreBackdropClick) {
this.ignoreBackdropClick = false
return
}
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus()
: this.hide()
}, this))
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
this.$backdrop.addClass('in')
if (!callback) return
doAnimate ?
this.$backdrop
.one('bsTransitionEnd', callback)
.emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
callback()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
var callbackRemove = function () {
that.removeBackdrop()
callback && callback()
}
$.support.transition && this.$element.hasClass('fade') ?
this.$backdrop
.one('bsTransitionEnd', callbackRemove)
.emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
callbackRemove()
} else if (callback) {
callback()
}
}
// these following methods are used to handle overflowing modals
Modal.prototype.handleUpdate = function () {
this.adjustDialog()
}
Modal.prototype.adjustDialog = function () {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
})
}
Modal.prototype.resetAdjustments = function () {
this.$element.css({
paddingLeft: '',
paddingRight: ''
})
}
Modal.prototype.checkScrollbar = function () {
var fullWindowWidth = window.innerWidth
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
var documentElementRect = document.documentElement.getBoundingClientRect()
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
}
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
this.scrollbarWidth = this.measureScrollbar()
}
Modal.prototype.setScrollbar = function () {
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
this.originalBodyPad = document.body.style.paddingRight || ''
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
}
Modal.prototype.resetScrollbar = function () {
this.$body.css('padding-right', this.originalBodyPad)
}
Modal.prototype.measureScrollbar = function () { // thx walsh
var scrollDiv = document.createElement('div')
scrollDiv.className = 'modal-scrollbar-measure'
this.$body.append(scrollDiv)
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
this.$body[0].removeChild(scrollDiv)
return scrollbarWidth
}
// MODAL PLUGIN DEFINITION
// =======================
function Plugin(option, _relatedTarget) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.modal')
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option](_relatedTarget)
else if (options.show) data.show(_relatedTarget)
})
}
var old = $.fn.modal
$.fn.modal = Plugin
$.fn.modal.Constructor = Modal
// MODAL NO CONFLICT
// =================
$.fn.modal.noConflict = function () {
$.fn.modal = old
return this
}
// MODAL DATA-API
// ==============
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
if ($this.is('a')) e.preventDefault()
$target.one('show.bs.modal', function (showEvent) {
if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
$target.one('hidden.bs.modal', function () {
$this.is(':visible') && $this.trigger('focus')
})
})
Plugin.call($target, option, this)
})
}(jQuery);
/* ========================================================================
* Bootstrap: collapse.js v3.3.4
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Collapse.DEFAULTS, options)
this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
'[data-toggle="collapse"][data-target="#' + element.id + '"]')
this.transitioning = null
if (this.options.parent) {
this.$parent = this.getParent()
} else {
this.addAriaAndCollapsedClass(this.$element, this.$trigger)
}
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.3.4'
Collapse.TRANSITION_DURATION = 350
Collapse.DEFAULTS = {
toggle: true
}
Collapse.prototype.dimension = function () {
var hasWidth = this.$element.hasClass('width')
return hasWidth ? 'width' : 'height'
}
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
var activesData
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
if (actives && actives.length) {
activesData = actives.data('bs.collapse')
if (activesData && activesData.transitioning) return
}
var startEvent = $.Event('show.bs.collapse')
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
if (actives && actives.length) {
Plugin.call(actives, 'hide')
activesData || actives.data('bs.collapse', null)
}
var dimension = this.dimension()
this.$element
.removeClass('collapse')
.addClass('collapsing')[dimension](0)
.attr('aria-expanded', true)
this.$trigger
.removeClass('collapsed')
.attr('aria-expanded', true)
this.transitioning = 1
var complete = function () {
this.$element
.removeClass('collapsing')
.addClass('collapse in')[dimension]('')
this.transitioning = 0
this.$element
.trigger('shown.bs.collapse')
}
if (!$.support.transition) return complete.call(this)
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
this.$element
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
}
Collapse.prototype.hide = function () {
if (this.transitioning || !this.$element.hasClass('in')) return
var startEvent = $.Event('hide.bs.collapse')
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
var dimension = this.dimension()
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
this.$element
.addClass('collapsing')
.removeClass('collapse in')
.attr('aria-expanded', false)
this.$trigger
.addClass('collapsed')
.attr('aria-expanded', false)
this.transitioning = 1
var complete = function () {
this.transitioning = 0
this.$element
.removeClass('collapsing')
.addClass('collapse')
.trigger('hidden.bs.collapse')
}
if (!$.support.transition) return complete.call(this)
this.$element
[dimension](0)
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(Collapse.TRANSITION_DURATION)
}
Collapse.prototype.toggle = function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
Collapse.prototype.getParent = function () {
return $(this.options.parent)
.find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
.each($.proxy(function (i, element) {
var $element = $(element)
this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
}, this))
.end()
}
Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
var isOpen = $element.hasClass('in')
$element.attr('aria-expanded', isOpen)
$trigger
.toggleClass('collapsed', !isOpen)
.attr('aria-expanded', isOpen)
}
function getTargetFromTrigger($trigger) {
var href
var target = $trigger.attr('data-target')
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
return $(target)
}
// COLLAPSE PLUGIN DEFINITION
// ==========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.collapse
$.fn.collapse = Plugin
$.fn.collapse.Constructor = Collapse
// COLLAPSE NO CONFLICT
// ====================
$.fn.collapse.noConflict = function () {
$.fn.collapse = old
return this
}
// COLLAPSE DATA-API
// =================
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
var $this = $(this)
if (!$this.attr('data-target')) e.preventDefault()
var $target = getTargetFromTrigger($this)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $this.data()
Plugin.call($target, option)
})
}(jQuery);
/* ajax_windows.js. Support for modal popup windows in Umlaut items. */
jQuery(document).ready(function($) {
var populate_modal = function(data, textStatus, jqXHR) {
// Wrap the data object in jquery object
var body = $("
").html(data);
// Remove the first heading from the returned data
var header = body.find("h1, h2, h3, h4, h5, h6").eq(0).remove();
// Remove the first submit button from the returned data
var footer = body.find("form").find("input[type=submit]").eq(0).remove();
// Add in content
if (header) $("#modal").find("[data-role=modal-title-content]").text(header.text());
if (body) $("#modal").find("[data-role=modal-body-content]").html(body.html());
if (footer) $("#modal").find("[data-role=modal-footer-content]").html(footer);
// Toggle the ajax-loader
$("#modal").find(".ajax-loader").hide();
}
var cleanup_modal = function() {
$("#modal").find("[data-role=modal-title-content]").text('');
$("#modal").find("[data-role=modal-body-content]").text('');
$("#modal").find("[data-role=modal-footer-content]").text('');
$("#modal").find(".ajax-loader").hide();
}
var display_modal = function(event) {
event.preventDefault();
cleanup_modal();
$("#modal").find(".ajax-loader").show();
$("#modal").modal("show");
$.get(this.href, "", populate_modal, "html");
}
var ajax_form_catch = function(event) {
event.preventDefault();
$("#modal").find(".ajax-loader").show();
var form = $("#modal").find("form");
$.post(form.attr("action"), form.serialize(), populate_modal, "html");
cleanup_modal();
};
$(document).on("click", "a.ajax_window", display_modal);
$(document).on("click", "#modal .modal-footer input[type=submit]", ajax_form_catch);
$(document).on("submit", "#modal form", ajax_form_catch);
});
// Some code to re-size our window to config defined minimum height/width
// We have little control over what size a content provider generates a
// window for a link resolver. Often it's too small. So we resize in
// js.
// Some browsers won't let us resize the window though. Oh well, we try.
// Those that wont' let us just silently no-op.
jQuery(document).ready(function($) {
var min_width = 820;
var min_height = 400;
// Default to something huge, so if we fail in getting dimensions,
// we won't resize.
var orig_width = 100000;
var orig_height = 100000;
// JQuery document viewport width/height
orig_width = $(window).width();
orig_height = $(window).height();
width_diff = min_width - orig_width;
height_diff = min_height - orig_height;
if (width_diff < 0) { width_diff = 0 }
if (height_diff < 0) { height_diff = 0 }
if (width_diff >0 || height_diff > 0) {
window.resizeBy(width_diff, height_diff)
}
});
/* expand_contract_toggle.js: Support for show more/hide more in lists of umlaut content.
Expand/collapse elements are already controlled via Bootstrap toggle,
this just adds some additional behavior in hooks to change our labels
and disclosure icons appropriately, and prevent following non-js href links.
*/
jQuery(document).ready(function($) {
$(document).on("click", ".collapse-toggle", function(event) {
event.preventDefault();
return false;
});
$(document).on("show.bs.collapse", ".collapse", function(event) {
// Update the icon
$(this).parent().find('.collapse-toggle i').removeClass("umlaut_icons-list-closed").addClass("umlaut_icons-list-open");
// Update the action label
$(this).parent().find(".expand_contract_action_label").text("Hide ");
});
$(document).on("hide.bs.collapse", ".collapse", function(event) {
// Update the icon
$(this).parent().find('.collapse-toggle i').removeClass("umlaut_icons-list-open").addClass("umlaut_icons-list-closed");
// Update the action label
$(this).parent().find(".expand_contract_action_label").text("Show ");
});
});
jQuery(document).ready(function($) {
$("*[data-umlaut-toggle-permalink]").click(function(event) {
event.preventDefault();
var originalLink = $(this)
var valueContainer = $("#umlaut-permalink-container");
if (! valueContainer.data("loaded")) {
valueContainer.html('
').show();
$.getJSON( originalLink.attr('href'), function(data) {
var href = data.permalink;
var a = $("
");
a.attr("href", href);
a.text(href);
valueContainer.html(a).data("loaded", true).show();
});
}
else {
valueContainer.toggle();
}
});
});
/* search_autocomplete.js. Add autocomplete to Umlaut journal title search. */
jQuery(document).ready(function($) {
if (typeof $.fn.typeahead === "undefined") {
if ( window.console && window.console.log ) {
window.console.log("ERROR: Can not load Umlaut autocomplete code, jQuery.fn.typeahead not available.")
}
} else {
// We override typeahead's 'render' function to NOT have the first
// item selected. We simply copy and pasted it, and removed the line
// `items.first().addClass('active')`, then set the prototype to our
// own function. Yes, this changes typeahead globally, sorry we don't have
// a way to change it just for certain typeaheads.
//
// The default first-item-selected behavior has been hated by users
// in the journal search scenario, since when they hit return they
// get it even if they didn't want it.
var newRender = function(items) {
var that = this
items = $(items).map(function (i, item) {
i = $(that.options.item).attr('data-value', item)
i.find('a').html(that.highlighter(item))
return i[0]
})
this.$menu.html(items)
return this
};
$.fn.typeahead.Constructor.prototype.render = newRender;
// have to fix 'select' to accomodate possible no selection too
$.fn.typeahead.Constructor.prototype.select = function() {
var val = this.$menu.find('.active').attr('data-value');
if (val) {
this.$element
.val(this.updater(val))
.change();
}
return this.hide()
}
$(document).on("submit", "form.OpenURL", function() {
var form = $(this);
if ( form.find(".rft_title").val() != $(this).val()) {
form.find(".rft_object_id").val("");
form.find(".rft_title").val("");
}
});
// Search for the title with the current form. Only search
// if there are more than two chars though!
//
var search_title = function(query, process) {
if (query.length > 2) {
var form = this.$element.closest("form");
var url = form.attr("action").replace("journal_search", "auto_complete_for_journal_title");
// Get JSON from
$.getJSON(
form.attr("action").replace("journal_search", "auto_complete_for_journal_title"),
form.serialize(),
function(data) {
process(data)
}
)
}
}
var lookup_limit = 300; //ms
// Uses a timer to only do a lookup at most once every
// 300ms . Based on rejected pull request at:
// https://github.com/twitter/bootstrap/pull/6320
var throttled_search_title = function(query, process) {
if(this.lookupTimer) {
clearTimeout(this.lookupTimer);
}
this.lookupTimer = setTimeout($.proxy(search_title, this, query, process), lookup_limit);
return this;
}
$("input.title_search").typeahead({
items: 10,
minLength: 3,
source: throttled_search_title,
highlighter: function(item) {
// Bootstrap updates the item as it passes through the callback chain
// so this is a hack to ensure we get the proper values.
return "
"+ item.title + "";
},
sorter: function(items) { return items },
matcher: function(item) { return true; },
updater: function(item) {
// Get the selected item via our hack.
var selected_item = this.$menu.find('.active .title');
if (selected_item.length > 0) {
// We set the id attribute as the object id
var object_id = selected_item.attr("id");
// We set the inner text with the title
var title = selected_item.text();
var form = this.$element.closest("form");
form.find("input.rft_object_id").val(object_id);
form.find("input.rft_title").val(title);
form.find("select.title_search_type").val("exact");
return title;
}
}
});
}
});
/* update_html.js:
* Provide functions to update content on page with background responses from Umlaut.
* Used by Umlaut itself, as well as by third party callers.
*
* This is compiled into a standalone top-level JS file, for src'ing by third
* party callers.
*
* More information on use at https://github.com/team-umlaut/umlaut/wiki/JQuery-Content-Utility
*/
(function($) {
function SectionTarget(config) {
//Add properties from config to ourself
$.extend(this, config);
//Defaults
if (typeof(this.selector) == 'undefined')
this.selector = "#" + this.umlaut_section_id;
if (typeof(this.position) == 'undefined')
this.position = "html";
// Container must be a JQuery object, if it's not
// passed in, use $(document)
if (typeof(this.container) == 'undefined')
this.container = $(document); // default container is document
}
//Callback default to no-op function please.
var noop = function() {};
SectionTarget.prototype.before_update = noop;
SectionTarget.prototype.after_update = noop;
SectionTarget.prototype.complete = noop;
SectionTarget.prototype.ensure_placement_destination = function() {
if ( typeof(this.selector) == 'undefined') {
return null;
}
//Already have it cached?
if ( this.host_div_element ) {
return this.host_div_element;
}
// Create an empty div to hold our content
var new_div = $('
');
// Find the first thing matched by selector, and call the
// method specified in "position" string on it, giving it our
// HTML to replace. This works because our actions are
// all arguments that will take one method: html, before, after, append,
// prepend.
this.container.find(this.selector).eq(0)[ this.position ]( new_div );
//Cache for later
this.host_div_element = new_div;
return this.host_div_element;
};
// Define an object constructor on the global window object
// For our UmlautHtmlUpdater object.
//
// You need to pass the Umlaut Base URL, as well as an OpenURL kev context
// object. There are additional optional parameters.
//
// There are two argument formats you can call `new HTMLUpdater` with.
// Positional allows you to pass umlaut base and OpenURL:
// var updater = new Umlaut.HtmlUpdater("http://umlaut.example.edu", "au=Smith&ti=Book")
//
// Or named argument style allows you to pass additional parameters,
// including locale and container.
//
// var updater = new Umlaut.HtmlUpdater({
// umlaut_base: "http://umlaut.example.edu",
// context_object: "au=Smith&ti=Book",
// locale: "de",
// container: "#selector"
// });
//
//
//
// The optional 'locale' arg is a locale string eg 'en', 'de'
//
// The optional 'container' argument is a selector, DOM element, OR
// jQuery object. The container limits the updater's content
// replacements (controlled by selectors on individual sections) to within
// the container given.
//
// Note this object is used by external sites as part of the JQuery updater
// javascript API. This is API, which has to be callable by non-Umlaut sites.
// Try not to change the method signature in incompatible ways.
function HtmlUpdater(first_arg, second_arg, third_arg) {
if (typeof(first_arg) == "object") {
// Simply merge arguments object as properties on ourselves.
$.extend(this, first_arg);
} else {
// positional args
this.umlaut_base = first_arg;
this.context_object = second_arg;
this.locale = third_arg;
}
// Argument checking
if (typeof(this.umlaut_base) == "undefined") {
throw new Error("new Umlaut.HtmlUpdater: missing umlaut_base (String) argument");
}
if (typeof(this.context_object) == "undefined") {
throw new Error("new Umlaut.HtmlUpdater: missing context_object (String) argument");
}
// Remove query string (if present)
this.umlaut_base = this.umlaut_base.replace(/\?.*$/, '')
// Remove trailing slash
this.umlaut_base = this.umlaut_base.replace(/\/$/,'');
this.umlaut_uri = this.umlaut_base + '/resolve/partial_html_sections?umlaut.response_format=json&' + this.context_object;
if (this.locale)
this.umlaut_uri += "¨aut.locale=" + this.locale;
this.section_targets = [];
this.add_section_target = function(config) {
var target = new SectionTarget(config);
if (typeof(this.container) !== "undefined") {
// Turn it into a JQuery object if it wasn't already.
target.container = $(this.container);
}
this.section_targets.push( target );
};
//default no-op call-backs
this.complete = noop;
this.before_update = noop;
this.after_update = noop;
//Code for seeing if a URI is same origin or not borrowed from jQuery
this.is_remote_url = function(url) {
var regexp = /^(\w+:)?\/\/([^\/?#]+)/;
var parts = regexp.exec( url );
return (parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host));
}
this.update = function() {
// Need to capture because we won't have 'this' inside the ajax
// success handler.
var myself = this;
var dataType = this.is_remote_url( this.umlaut_uri ) ? "jsonp" : "json";
$.ajax({
url: myself.umlaut_uri,
dataType: dataType,
jsonp: "umlaut.jsonp",
error: function() {
$.error("Problem loading background elements.");
},
success: function(umlaut_response) {
for (var i = 0; i < myself.section_targets.length; i++) {
var section_target = myself.section_targets[i];
var umlaut_html_section = myself.find_umlaut_response_section(umlaut_response, section_target.umlaut_section_id);
if (typeof(umlaut_html_section) == 'undefined') {
continue;
}
var count = null;
if (typeof(umlaut_html_section.response_count) != "undefined") {
count = parseInt(umlaut_html_section.response_count.value);
}
var existing_element = section_target.ensure_placement_destination();
var new_element = $('
');
new_element.html(umlaut_html_section.html_content);
var should_continue = section_target.before_update(new_element, count, section_target);
if (should_continue != false) {
should_continue = myself.before_update(new_element, count, section_target);
}
if (should_continue != false) {
existing_element.replaceWith(new_element);
section_target.host_div_element = new_element;
new_element.show();
section_target.after_update(new_element, count, section_target);
myself.after_update(new_element, count, section_target);
}
}
//Do we need to update again?
if (umlaut_response.partial_html_sections.in_progress) {
//Fix our update URI to be the one umlaut suggests
//Except strip out the umlaut.jsonp parameter, jquery is
//going to add that back in as desired.
myself.umlaut_uri =
umlaut_response.partial_html_sections.in_progress.refresh_url.replace(/[?;&]umlaut\.jsonp=[^;&]+/, '');
var refresh_seconds =
umlaut_response.partial_html_sections.in_progress.requested_wait_seconds;
window.setTimeout(function() { myself.update(); }, refresh_seconds * 1000);
} else {
myself.complete();
for (var i = 0; i < myself.section_targets.length; i++) {
var section_target = myself.section_targets[i];
section_target.complete(section_target);
}
}
}
});
};
this.find_umlaut_response_section = function(response, id) {
return $.grep(response.partial_html_sections.html_section, function(section) {
return section.id == id;
})[0];
};
};
//Put it in a global object, leave space for other things in "Umlaut" later.
if (typeof(window.Umlaut) == 'undefined')
window.Umlaut = new Object();
window.Umlaut.HtmlUpdater = HtmlUpdater;
/* LEGACY Loader was recommended for loading Umlaut JS behaviors
in an external page, for JQuery Content Utility.
var loader = new Umlaut.Loader();
loader.load();
We will provide just enough code to keep that from
error'ing (and halting js execution), although at present it does not
actually load the JS behaviors using new style, app wont' have
JS behaviors. */
window.Umlaut.Loader = function() {
this.load = function(option_list) {
// log problem in browsers that support it.
if (typeof console != "undefined" && typeof console.log != "undefined") {
console.log("WARN: Umlaut.Loader no longer supported in Umlaut 3.x, you may have not loaded Umlaut JS Behaviors as desired. See Umlaut documentation for new way.");
}
}
}
})(jQuery);
// This is a manifest file that'll be compiled into including all
// umlaut files. It can be included in a rails application.js manifest
// as:
// require 'umlaut'
// to include all umlaut js.
// jquery is required for umlaut, it's okay
// if the manifest chain ends up 'require'ing twice because
// it's mentioned in local manifest, sprockets is smart enough.
// We're using a local bootstrap3-typeahead.js, to restore bootstrap2-style
// #require bootstrap/typeahead
// Require all js files inside the 'umlaut' subdir next to this file.
;
// Umlaut javascript required for proper functionality. The 'umlaut' file
// also forces require of jquery and jquery-ui, dependencies.
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
;
; TI"required_assets_digest; F"%30d5187b7adca39d259e34a1a8d57892I"
_version; F"%4bf7b15359fe8e0974f7f263e26e27f4