diff --git a/public/vendor/bootstrap/bootstrap.js b/public/vendor/bootstrap/bootstrap.js
index 870ead5783d..8730550092a 100644
--- a/public/vendor/bootstrap/bootstrap.js
+++ b/public/vendor/bootstrap/bootstrap.js
@@ -18,7 +18,7 @@
* ========================================================== */
-!function ($) {
+!function($) {
"use strict"; // jshint ;_;
@@ -26,22 +26,22 @@
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
* ======================================================= */
- $(function () {
+ $(function() {
- $.support.transition = (function () {
+ $.support.transition = (function() {
- var transitionEnd = (function () {
+ var transitionEnd = (function() {
var el = document.createElement('bootstrap')
, transEndEventNames = {
- 'WebkitTransition' : 'webkitTransitionEnd'
- , 'MozTransition' : 'transitionend'
- , 'OTransition' : 'oTransitionEnd otransitionend'
- , 'transition' : 'transitionend'
- }
+ 'WebkitTransition': 'webkitTransitionEnd'
+ , 'MozTransition': 'transitionend'
+ , 'OTransition': 'oTransitionEnd otransitionend'
+ , 'transition': 'transitionend'
+ }
, name
- for (name in transEndEventNames){
+ for (name in transEndEventNames) {
if (el.style[name] !== undefined) {
return transEndEventNames[name]
}
@@ -77,46 +77,46 @@
* ========================================================== */
-!function ($) {
+!function($) {
"use strict"; // jshint ;_;
-/* ============================================================
- * bootstrap-dropdown.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#dropdowns
- * ============================================================
- * Copyright 2013 Twitter, Inc.
- *
- * 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.
- * ============================================================ */
+ /* ============================================================
+ * bootstrap-dropdown.js v2.3.2
+ * http://getbootstrap.com/2.3.2/javascript.html#dropdowns
+ * ============================================================
+ * Copyright 2013 Twitter, Inc.
+ *
+ * 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.
+ * ============================================================ */
- /* DROPDOWN CLASS DEFINITION
- * ========================= */
+ /* DROPDOWN CLASS DEFINITION
+ * ========================= */
var toggle = '[data-toggle=dropdown]'
- , Dropdown = function (element) {
- var $el = $(element).on('click.dropdown.data-api', this.toggle)
- $('html').on('click.dropdown.data-api', function () {
- $el.parent().removeClass('open')
- })
- }
+ , Dropdown = function(element) {
+ var $el = $(element).on('click.dropdown.data-api', this.toggle)
+ $('html').on('click.dropdown.data-api', function() {
+ $el.parent().removeClass('open')
+ })
+ }
Dropdown.prototype = {
constructor: Dropdown
- , toggle: function (e) {
+ , toggle: function(e) {
var $this = $(this)
, $parent
, isActive
@@ -142,7 +142,7 @@
return false
}
- , keydown: function (e) {
+ , keydown: function(e) {
var $this
, $items
, $active
@@ -187,7 +187,7 @@
function clearMenus() {
$('.dropdown-backdrop').remove()
- $(toggle).each(function () {
+ $(toggle).each(function() {
getParent($(this)).removeClass('open')
})
}
@@ -202,7 +202,7 @@
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
- $parent = selector && $(selector)
+ $parent = selector && $.find(selector)
if (!$parent || !$parent.length) $parent = $this.parent()
@@ -215,8 +215,8 @@
var old = $.fn.dropdown
- $.fn.dropdown = function (option) {
- return this.each(function () {
+ $.fn.dropdown = function(option) {
+ return this.each(function() {
var $this = $(this)
, data = $this.data('dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
@@ -227,10 +227,10 @@
$.fn.dropdown.Constructor = Dropdown
- /* DROPDOWN NO CONFLICT
- * ==================== */
+ /* DROPDOWN NO CONFLICT
+ * ==================== */
- $.fn.dropdown.noConflict = function () {
+ $.fn.dropdown.noConflict = function() {
$.fn.dropdown = old
return this
}
@@ -241,9 +241,9 @@
$(document)
.on('click.dropdown.data-api', clearMenus)
- .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
- .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
+ .on('click.dropdown.data-api', '.dropdown form', function(e) { e.stopPropagation() })
+ .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+ .on('keydown.dropdown.data-api', toggle + ', [role=menu]', Dropdown.prototype.keydown)
}(window.jQuery);
/* =========================================================
@@ -266,15 +266,15 @@
* ========================================================= */
-!function ($) {
+!function($) {
"use strict"; // jshint ;_;
- /* MODAL CLASS DEFINITION
- * ====================== */
+ /* MODAL CLASS DEFINITION
+ * ====================== */
- var Modal = function (element, options) {
+ var Modal = function(element, options) {
this.options = options
this.$element = $(element)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
@@ -283,170 +283,170 @@
Modal.prototype = {
- constructor: Modal
+ constructor: Modal
- , toggle: function () {
- return this[!this.isShown ? 'show' : 'hide']()
- }
+ , toggle: function() {
+ return this[!this.isShown ? 'show' : 'hide']()
+ }
- , show: function () {
- var that = this
- , e = $.Event('show')
+ , show: function() {
+ var that = this
+ , e = $.Event('show')
- this.$element.trigger(e)
+ this.$element.trigger(e)
- if (this.isShown || e.isDefaultPrevented()) return
+ if (this.isShown || e.isDefaultPrevented()) return
- this.isShown = true
+ this.isShown = true
- this.escape()
+ this.escape()
- this.backdrop(function () {
- var transition = $.support.transition && that.$element.hasClass('fade')
+ this.backdrop(function() {
+ var transition = $.support.transition && that.$element.hasClass('fade')
- if (!that.$element.parent().length) {
- that.$element.appendTo(document.body) //don't move modals dom position
- }
+ if (!that.$element.parent().length) {
+ that.$element.appendTo(document.body) //don't move modals dom position
+ }
- that.$element.show()
+ that.$element.show()
- if (transition) {
- that.$element[0].offsetWidth // force reflow
- }
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
- that.$element
- .addClass('in')
- .attr('aria-hidden', false)
+ that.$element
+ .addClass('in')
+ .attr('aria-hidden', false)
- that.enforceFocus()
+ that.enforceFocus()
- transition ?
- that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
- that.$element.focus().trigger('shown')
+ transition ?
+ that.$element.one($.support.transition.end, function() { that.$element.focus().trigger('shown') }) :
+ that.$element.focus().trigger('shown')
+ })
+ }
+
+ , hide: function(e) {
+ e && e.preventDefault()
+
+ var that = this
+
+ e = $.Event('hide')
+
+ this.$element.trigger(e)
+
+ if (!this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = false
+
+ this.escape()
+
+ $(document).off('focusin.modal')
+
+ this.$element
+ .removeClass('in')
+ .attr('aria-hidden', true)
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.hideWithTransition() :
+ this.hideModal()
+ }
+
+ , enforceFocus: function() {
+ var that = this
+ $(document).on('focusin.modal', function(e) {
+ if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
+ that.$element.focus()
+ }
+ })
+ }
+
+ , escape: function() {
+ var that = this
+ if (this.isShown && this.options.keyboard) {
+ this.$element.on('keyup.dismiss.modal', function(e) {
+ e.which == 27 && that.hide()
})
+ } else if (!this.isShown) {
+ this.$element.off('keyup.dismiss.modal')
}
+ }
- , hide: function (e) {
- e && e.preventDefault()
+ , hideWithTransition: function() {
+ var that = this
+ , timeout = setTimeout(function() {
+ that.$element.off($.support.transition.end)
+ that.hideModal()
+ }, 500)
- var that = this
+ this.$element.one($.support.transition.end, function() {
+ clearTimeout(timeout)
+ that.hideModal()
+ })
+ }
- e = $.Event('hide')
+ , hideModal: function() {
+ var that = this
+ this.$element.hide()
+ this.backdrop(function() {
+ that.removeBackdrop()
+ that.$element.trigger('hidden')
+ })
+ }
- this.$element.trigger(e)
+ , removeBackdrop: function() {
+ this.$backdrop && this.$backdrop.remove()
+ this.$backdrop = null
+ }
- if (!this.isShown || e.isDefaultPrevented()) return
+ , backdrop: function(callback) {
+ var that = this
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
- this.isShown = false
+ if (this.isShown && this.options.backdrop) {
+ var doAnimate = $.support.transition && animate
- this.escape()
+ this.$backdrop = $('
')
+ .appendTo(document.body)
- $(document).off('focusin.modal')
+ this.$backdrop.click(
+ this.options.backdrop == 'static' ?
+ $.proxy(this.$element[0].focus, this.$element[0])
+ : $.proxy(this.hide, this)
+ )
- this.$element
- .removeClass('in')
- .attr('aria-hidden', true)
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+ this.$backdrop.addClass('in')
+
+ if (!callback) return
+
+ doAnimate ?
+ this.$backdrop.one($.support.transition.end, callback) :
+ callback()
+
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade') ?
- this.hideWithTransition() :
- this.hideModal()
- }
-
- , enforceFocus: function () {
- var that = this
- $(document).on('focusin.modal', function (e) {
- if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
- that.$element.focus()
- }
- })
- }
-
- , escape: function () {
- var that = this
- if (this.isShown && this.options.keyboard) {
- this.$element.on('keyup.dismiss.modal', function ( e ) {
- e.which == 27 && that.hide()
- })
- } else if (!this.isShown) {
- this.$element.off('keyup.dismiss.modal')
- }
- }
-
- , hideWithTransition: function () {
- var that = this
- , timeout = setTimeout(function () {
- that.$element.off($.support.transition.end)
- that.hideModal()
- }, 500)
-
- this.$element.one($.support.transition.end, function () {
- clearTimeout(timeout)
- that.hideModal()
- })
- }
-
- , hideModal: function () {
- var that = this
- this.$element.hide()
- this.backdrop(function () {
- that.removeBackdrop()
- that.$element.trigger('hidden')
- })
- }
-
- , removeBackdrop: function () {
- this.$backdrop && this.$backdrop.remove()
- this.$backdrop = null
- }
-
- , backdrop: function (callback) {
- var that = this
- , animate = this.$element.hasClass('fade') ? 'fade' : ''
-
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
-
- this.$backdrop = $('')
- .appendTo(document.body)
-
- this.$backdrop.click(
- this.options.backdrop == 'static' ?
- $.proxy(this.$element[0].focus, this.$element[0])
- : $.proxy(this.hide, this)
- )
-
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
- this.$backdrop.addClass('in')
-
- if (!callback) return
-
- doAnimate ?
- this.$backdrop.one($.support.transition.end, callback) :
- callback()
-
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
-
- $.support.transition && this.$element.hasClass('fade')?
- this.$backdrop.one($.support.transition.end, callback) :
- callback()
-
- } else if (callback) {
+ this.$backdrop.one($.support.transition.end, callback) :
callback()
- }
+
+ } else if (callback) {
+ callback()
}
+ }
}
- /* MODAL PLUGIN DEFINITION
- * ======================= */
+ /* MODAL PLUGIN DEFINITION
+ * ======================= */
var old = $.fn.modal
- $.fn.modal = function (option) {
- return this.each(function () {
+ $.fn.modal = function(option) {
+ return this.each(function() {
var $this = $(this)
, data = $this.data('modal')
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
@@ -457,7 +457,7 @@
}
$.fn.modal.defaults = {
- backdrop: true
+ backdrop: true
, keyboard: true
, show: true
}
@@ -465,29 +465,29 @@
$.fn.modal.Constructor = Modal
- /* MODAL NO CONFLICT
- * ================= */
+ /* MODAL NO CONFLICT
+ * ================= */
- $.fn.modal.noConflict = function () {
+ $.fn.modal.noConflict = function() {
$.fn.modal = old
return this
}
- /* MODAL DATA-API
- * ============== */
+ /* MODAL DATA-API
+ * ============== */
- $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
+ $(document).on('click.modal.data-api', '[data-toggle="modal"]', function(e) {
var $this = $(this)
, href = $this.attr('href')
- , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
- , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
+ , $target = $.find($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
+ , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
e.preventDefault()
$target
.modal(option)
- .one('hide', function () {
+ .one('hide', function() {
$this.focus()
})
})
@@ -514,15 +514,15 @@
* ========================================================== */
-!function ($) {
+!function($) {
"use strict"; // jshint ;_;
- /* TOOLTIP PUBLIC CLASS DEFINITION
- * =============================== */
+ /* TOOLTIP PUBLIC CLASS DEFINITION
+ * =============================== */
- var Tooltip = function (element, options) {
+ var Tooltip = function(element, options) {
this.init('tooltip', element, options)
}
@@ -530,7 +530,7 @@
constructor: Tooltip
- , init: function (type, element, options) {
+ , init: function(type, element, options) {
var eventIn
, eventOut
, triggers
@@ -561,25 +561,25 @@
this.fixTitle()
}
- , getOptions: function (options) {
+ , getOptions: function(options) {
options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
if (options.delay && typeof options.delay == 'number') {
options.delay = {
show: options.delay
- , hide: options.delay
+ , hide: options.delay
}
}
return options
}
- , enter: function (e) {
+ , enter: function(e) {
var defaults = $.fn[this.type].defaults
, options = {}
, self
- this._options && $.each(this._options, function (key, value) {
+ this._options && $.each(this._options, function(key, value) {
if (defaults[key] != value) options[key] = value
}, this)
@@ -594,7 +594,7 @@
}, self.options.delay.show)
}
- , leave: function (e) {
+ , leave: function(e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
if (this.timeout) clearTimeout(this.timeout)
@@ -606,7 +606,7 @@
}, self.options.delay.hide)
}
- , show: function () {
+ , show: function() {
var $tip
, pos
, actualWidth
@@ -633,7 +633,11 @@
.detach()
.css({ top: 0, left: 0, display: 'block' })
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+ if (this.options.container) {
+ $tip.appendTo($.find(this.options.container));
+ } else {
+ $tip.insertAfter(this.$element)
+ }
pos = this.getPosition()
@@ -642,48 +646,48 @@
switch (placement) {
case 'bottom':
- tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
+ tp = { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 }
break
case 'top':
- tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
+ tp = { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 }
break
case 'left':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
+ tp = { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth }
break
case 'right':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
+ tp = { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
break
// extend placements (top)
case 'topLeft':
- tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - (actualWidth * .10)};
+ tp = { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - (actualWidth * .10) };
break;
case 'topRight':
- tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - (actualWidth * .90)};
+ tp = { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - (actualWidth * .90) };
break;
// extend placements (right)
case 'rightTop':
- tp = {top: pos.top + pos.height / 2 - (actualHeight *.10), left: pos.left + pos.width};
+ tp = { top: pos.top + pos.height / 2 - (actualHeight * .10), left: pos.left + pos.width };
break;
case 'rightBottom':
- tp = {top: pos.top + pos.height / 2 - (actualHeight * .90), left: pos.left + pos.width};
+ tp = { top: pos.top + pos.height / 2 - (actualHeight * .90), left: pos.left + pos.width };
break;
// extend placements (bottom)
case 'bottomLeft':
- tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - (actualWidth * .10)};
+ tp = { top: pos.top + pos.height, left: pos.left + pos.width / 2 - (actualWidth * .10) };
break;
case 'bottomRight':
- tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - (actualWidth * .90)};
+ tp = { top: pos.top + pos.height, left: pos.left + pos.width / 2 - (actualWidth * .90) };
break;
// extend placements (left)
case 'leftTop':
- tp = {top: pos.top + pos.height / 2 - (actualHeight *.10), left: pos.left - actualWidth};
+ tp = { top: pos.top + pos.height / 2 - (actualHeight * .10), left: pos.left - actualWidth };
break;
case 'leftBottom':
- tp = {top: pos.top + pos.height / 2 - (actualHeight * .90), left: pos.left - actualWidth};
+ tp = { top: pos.top + pos.height / 2 - (actualHeight * .90), left: pos.left - actualWidth };
break;
@@ -694,7 +698,7 @@
}
}
- , applyPlacement: function(offset, placement){
+ , applyPlacement: function(offset, placement) {
var $tip = this.tip()
, width = $tip[0].offsetWidth
, height = $tip[0].offsetHeight
@@ -719,7 +723,7 @@
if (placement == 'bottom' || placement == 'top') {
delta = 0
- if (offset.left < 0){
+ if (offset.left < 0) {
delta = offset.left * -2
offset.left = 0
$tip.offset(offset)
@@ -735,21 +739,22 @@
if (replace) $tip.offset(offset)
}
- , replaceArrow: function(delta, dimension, position){
+ , replaceArrow: function(delta, dimension, position) {
this
.arrow()
.css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
}
- , setContent: function () {
+ , setContent: function() {
var $tip = this.tip()
, title = this.getTitle()
- $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+ //$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+ $tip.find('.tooltip-inner').text(title)
$tip.removeClass('fade in top bottom left right')
}
- , hide: function () {
+ , hide: function() {
var that = this
, $tip = this.tip()
, e = $.Event('hide')
@@ -760,11 +765,11 @@
$tip.removeClass('in')
function removeWithAnimation() {
- var timeout = setTimeout(function () {
+ var timeout = setTimeout(function() {
$tip.off($.support.transition.end).detach()
}, 500)
- $tip.one($.support.transition.end, function () {
+ $tip.one($.support.transition.end, function() {
clearTimeout(timeout)
$tip.detach()
})
@@ -779,45 +784,45 @@
return this
}
- , fixTitle: function () {
+ , fixTitle: function() {
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', '')
}
}
- , hasContent: function () {
+ , hasContent: function() {
return this.getTitle()
}
- , getPosition: function () {
+ , getPosition: function() {
var el = this.$element[0]
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
width: el.offsetWidth
- , height: el.offsetHeight
+ , height: el.offsetHeight
}, this.$element.offset())
}
- , getTitle: function () {
+ , getTitle: function() {
var title
, $e = this.$element
, o = this.options
title = $e.attr('data-original-title')
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
return title
}
- , tip: function () {
+ , tip: function() {
return this.$tip = this.$tip || $(this.options.template)
}
- , arrow: function(){
+ , arrow: function() {
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}
- , validate: function () {
+ , validate: function() {
if (!this.$element[0].parentNode) {
this.hide()
this.$element = null
@@ -825,37 +830,37 @@
}
}
- , enable: function () {
+ , enable: function() {
this.enabled = true
}
- , disable: function () {
+ , disable: function() {
this.enabled = false
}
- , toggleEnabled: function () {
+ , toggleEnabled: function() {
this.enabled = !this.enabled
}
- , toggle: function (e) {
+ , toggle: function(e) {
var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
self.tip().hasClass('in') ? self.hide() : self.show()
}
- , destroy: function () {
+ , destroy: function() {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
}
- /* TOOLTIP PLUGIN DEFINITION
- * ========================= */
+ /* TOOLTIP PLUGIN DEFINITION
+ * ========================= */
var old = $.fn.tooltip
- $.fn.tooltip = function ( option ) {
- return this.each(function () {
+ $.fn.tooltip = function(option) {
+ return this.each(function() {
var $this = $(this)
, data = $this.data('tooltip')
, options = typeof option == 'object' && option
@@ -868,21 +873,21 @@
$.fn.tooltip.defaults = {
animation: true
- , placement: 'top'
- , selector: false
- , template: ''
- , trigger: 'hover focus'
- , title: ''
- , delay: 0
- , html: false
- , container: false
+ , placement: 'top'
+ , selector: false
+ , template: ''
+ , trigger: 'hover focus'
+ , title: ''
+ , delay: 0
+ , html: false
+ , container: false
}
- /* TOOLTIP NO CONFLICT
- * =================== */
+ /* TOOLTIP NO CONFLICT
+ * =================== */
- $.fn.tooltip.noConflict = function () {
+ $.fn.tooltip.noConflict = function() {
$.fn.tooltip = old
return this
}
@@ -909,15 +914,15 @@
* ======================================================== */
-!function ($) {
+!function($) {
"use strict"; // jshint ;_;
- /* TAB CLASS DEFINITION
- * ==================== */
+ /* TAB CLASS DEFINITION
+ * ==================== */
- var Tab = function (element) {
+ var Tab = function(element) {
this.element = $(element)
}
@@ -925,7 +930,7 @@
constructor: Tab
- , show: function () {
+ , show: function() {
var $this = this.element
, $ul = $this.closest('ul:not(.dropdown-menu)')
, selector = $this.attr('data-target')
@@ -938,7 +943,7 @@
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
- if ( $this.parent('li').hasClass('active') ) return
+ if ($this.parent('li').hasClass('active')) return
previous = $ul.find('.active:last a')[0]
@@ -950,22 +955,22 @@
if (e.isDefaultPrevented()) return
- $target = $(selector)
+ $target = $.find(selector)
this.activate($this.parent('li'), $ul)
- this.activate($target, $target.parent(), function () {
+ this.activate($target, $target.parent(), function() {
$this.trigger({
type: 'shown'
- , relatedTarget: previous
+ , relatedTarget: previous
})
})
}
- , activate: function ( element, container, callback) {
+ , activate: function(element, container, callback) {
var $active = container.find('> .active')
, transition = callback
- && $.support.transition
- && $active.hasClass('fade')
+ && $.support.transition
+ && $active.hasClass('fade')
function next() {
$active
@@ -982,7 +987,7 @@
element.removeClass('fade')
}
- if ( element.parent('.dropdown-menu') ) {
+ if (element.parent('.dropdown-menu')) {
element.closest('li.dropdown').addClass('active')
}
@@ -998,13 +1003,13 @@
}
- /* TAB PLUGIN DEFINITION
- * ===================== */
+ /* TAB PLUGIN DEFINITION
+ * ===================== */
var old = $.fn.tab
- $.fn.tab = function ( option ) {
- return this.each(function () {
+ $.fn.tab = function(option) {
+ return this.each(function() {
var $this = $(this)
, data = $this.data('tab')
if (!data) $this.data('tab', (data = new Tab(this)))
@@ -1015,19 +1020,19 @@
$.fn.tab.Constructor = Tab
- /* TAB NO CONFLICT
- * =============== */
+ /* TAB NO CONFLICT
+ * =============== */
- $.fn.tab.noConflict = function () {
+ $.fn.tab.noConflict = function() {
$.fn.tab = old
return this
}
- /* TAB DATA-API
- * ============ */
+ /* TAB DATA-API
+ * ============ */
- $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+ $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function(e) {
e.preventDefault()
$(this).tab('show')
})
@@ -1052,15 +1057,15 @@
* ============================================================ */
-!function($){
+!function($) {
"use strict"; // jshint ;_;
- /* TYPEAHEAD PUBLIC CLASS DEFINITION
- * ================================= */
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
+ * ================================= */
- var Typeahead = function (element, options) {
+ var Typeahead = function(element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.typeahead.defaults, options)
this.matcher = this.options.matcher || this.matcher
@@ -1077,8 +1082,8 @@
constructor: Typeahead
- , select: function () {
- // CHANGE (rashidkpc) If nothing is selected, use existing value
+ , select: function() {
+ // CHANGE (rashidkpc) If nothing is selected, use existing value
var val = this.$menu.find('.active').attr('data-value') || this.$element.val();
this.$element
.val(this.updater(val))
@@ -1086,11 +1091,11 @@
return this.hide()
}
- , updater: function (item) {
+ , updater: function(item) {
return item
}
- , show: function () {
+ , show: function() {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})
@@ -1099,7 +1104,7 @@
.insertAfter(this.$element)
.css({
top: pos.top + pos.height
- , left: pos.left
+ , left: pos.left
})
.show()
@@ -1107,13 +1112,13 @@
return this
}
- , hide: function () {
+ , hide: function() {
this.$menu.hide()
this.shown = false
return this
}
- , lookup: function (event) {
+ , lookup: function(event) {
var items
this.query = this.$element.val()
@@ -1127,10 +1132,10 @@
return items ? this.process(items) : this
}
- , process: function (items) {
+ , process: function(items) {
var that = this
- items = $.grep(items, function (item) {
+ items = $.grep(items, function(item) {
return that.matcher(item)
})
@@ -1143,11 +1148,11 @@
return this.render(items.slice(0, this.options.items)).show()
}
- , matcher: function (item) {
+ , matcher: function(item) {
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
}
- , sorter: function (items) {
+ , sorter: function(items) {
var beginswith = []
, caseSensitive = []
, caseInsensitive = []
@@ -1162,20 +1167,20 @@
return beginswith.concat(caseSensitive, caseInsensitive)
}
- , highlighter: function (item) {
+ , highlighter: function(item) {
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
if (!query) {
return item;
}
- return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
+ return item.replace(new RegExp('(' + query + ')', 'ig'), function($1, match) {
return '' + match + ''
});
}
- , render: function (items) {
+ , render: function(items) {
var that = this
- items = $(items).map(function (i, item) {
+ items = $(items).map(function(i, item) {
i = $(that.options.item).attr('data-value', item)
i.find('a').html(that.highlighter(item))
return i[0]
@@ -1187,7 +1192,7 @@
return this
}
- , next: function (event) {
+ , next: function(event) {
var active = this.$menu.find('.active').removeClass('active')
, next = active.next()
@@ -1198,7 +1203,7 @@
next.addClass('active')
}
- , prev: function (event) {
+ , prev: function(event) {
var active = this.$menu.find('.active').removeClass('active')
, prev = active.prev()
@@ -1209,12 +1214,12 @@
prev.addClass('active')
}
- , listen: function () {
+ , listen: function() {
this.$element
- .on('focus', $.proxy(this.focus, this))
- .on('blur', $.proxy(this.blur, this))
+ .on('focus', $.proxy(this.focus, this))
+ .on('blur', $.proxy(this.blur, this))
.on('keypress', $.proxy(this.keypress, this))
- .on('keyup', $.proxy(this.keyup, this))
+ .on('keyup', $.proxy(this.keyup, this))
if (this.eventSupported('keydown')) {
this.$element.on('keydown', $.proxy(this.keydown, this))
@@ -1226,12 +1231,12 @@
.on('mouseleave', 'li', $.proxy(this.mouseleave, this))
},
- destroy: function () {
+ destroy: function() {
this.$element.off().removeData('typeahead');
this.$menu.off();
}
- , eventSupported: function(eventName) {
+ , eventSupported: function(eventName) {
var isSupported = eventName in this.$element
if (!isSupported) {
this.$element.setAttribute(eventName, 'return;')
@@ -1240,7 +1245,7 @@
return isSupported
}
- , move: function (e) {
+ , move: function(e) {
if (!this.shown) return
// grafana change, shift+left parenthesis
@@ -1248,7 +1253,7 @@
return;
}
- switch(e.keyCode) {
+ switch (e.keyCode) {
case 9: // tab
case 13: // enter
case 27: // escape
@@ -1269,18 +1274,18 @@
e.stopPropagation()
}
- , keydown: function (e) {
- this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27,57])
+ , keydown: function(e) {
+ this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40, 38, 9, 13, 27, 57])
this.move(e)
}
- , keypress: function (e) {
+ , keypress: function(e) {
if (this.suppressKeyPressRepeat) return
this.move(e)
}
- , keyup: function (e) {
- switch(e.keyCode) {
+ , keyup: function(e) {
+ switch (e.keyCode) {
case 40: // down arrow
case 38: // up arrow
case 16: // shift
@@ -1303,7 +1308,7 @@
this.lookup();
}
- if(e.keyCode === 13 && typeof this.$menu.find('.active').attr('data-value') === 'undefined') {
+ if (e.keyCode === 13 && typeof this.$menu.find('.active').attr('data-value') === 'undefined') {
// CHANGE (rashidkpc). Enter was hit, nothing was selected from typeahead, submit form
this.$element.submit();
} else {
@@ -1311,31 +1316,31 @@
e.preventDefault()
}
- }
+ }
- , focus: function (e) {
+ , focus: function(e) {
this.focused = true
}
- , blur: function (e) {
+ , blur: function(e) {
this.focused = false
if (!this.mousedover && this.shown) this.hide()
}
- , click: function (e) {
+ , click: function(e) {
e.stopPropagation()
e.preventDefault()
this.select()
this.$element.focus()
}
- , mouseenter: function (e) {
+ , mouseenter: function(e) {
this.mousedover = true
this.$menu.find('.active').removeClass('active')
$(e.currentTarget).addClass('active')
}
- , mouseleave: function (e) {
+ , mouseleave: function(e) {
this.mousedover = false
if (!this.focused && this.shown) this.hide()
}
@@ -1348,8 +1353,8 @@
var old = $.fn.typeahead
- $.fn.typeahead = function (option) {
- return this.each(function () {
+ $.fn.typeahead = function(option) {
+ return this.each(function() {
var $this = $(this)
, data = $this.data('typeahead')
, options = typeof option == 'object' && option
@@ -1360,28 +1365,28 @@
$.fn.typeahead.defaults = {
source: []
- , items: 8
- , menu: ''
- , item: ''
- , minLength: 1
+ , items: 8
+ , menu: ''
+ , item: ''
+ , minLength: 1
}
$.fn.typeahead.Constructor = Typeahead
- /* TYPEAHEAD NO CONFLICT
- * =================== */
+ /* TYPEAHEAD NO CONFLICT
+ * =================== */
- $.fn.typeahead.noConflict = function () {
+ $.fn.typeahead.noConflict = function() {
$.fn.typeahead = old
return this
}
- /* TYPEAHEAD DATA-API
- * ================== */
+ /* TYPEAHEAD DATA-API
+ * ================== */
- $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
+ $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function(e) {
var $this = $(this)
if ($this.data('typeahead')) return
$this.typeahead($this.data())
@@ -1408,24 +1413,24 @@
* ========================================================== */
-!function ($) {
+!function($) {
"use strict"; // jshint ;_;
- /* AFFIX CLASS DEFINITION
- * ====================== */
+ /* AFFIX CLASS DEFINITION
+ * ====================== */
- var Affix = function (element, options) {
+ var Affix = function(element, options) {
this.options = $.extend({}, $.fn.affix.defaults, options)
this.$window = $(window)
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
- .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
+ .on('click.affix.data-api', $.proxy(function() { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
this.$element = $(element)
this.checkPosition()
}
- Affix.prototype.checkPosition = function () {
+ Affix.prototype.checkPosition = function() {
if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height()
@@ -1442,9 +1447,9 @@
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
- false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
- 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
- 'top' : false
+ false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
+ 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
+ 'top' : false
if (this.affixed === affix) return
@@ -1455,13 +1460,13 @@
}
- /* AFFIX PLUGIN DEFINITION
- * ======================= */
+ /* AFFIX PLUGIN DEFINITION
+ * ======================= */
var old = $.fn.affix
- $.fn.affix = function (option) {
- return this.each(function () {
+ $.fn.affix = function(option) {
+ return this.each(function() {
var $this = $(this)
, data = $this.data('affix')
, options = typeof option == 'object' && option
@@ -1477,20 +1482,20 @@
}
- /* AFFIX NO CONFLICT
- * ================= */
+ /* AFFIX NO CONFLICT
+ * ================= */
- $.fn.affix.noConflict = function () {
+ $.fn.affix.noConflict = function() {
$.fn.affix = old
return this
}
- /* AFFIX DATA-API
- * ============== */
+ /* AFFIX DATA-API
+ * ============== */
- $(window).on('load', function () {
- $('[data-spy="affix"]').each(function () {
+ $(window).on('load', function() {
+ $('[data-spy="affix"]').each(function() {
var $spy = $(this)
, data = $spy.data()
diff --git a/public/vendor/flot/jquery.flot.js b/public/vendor/flot/jquery.flot.js
index 1b756422711..5c95ef9fcff 100644
--- a/public/vendor/flot/jquery.flot.js
+++ b/public/vendor/flot/jquery.flot.js
@@ -29,3288 +29,3290 @@ Licensed under the MIT license.
* V. 1.1: Fix error handling so e.g. parsing an empty string does
* produce a color rather than just crashing.
*/
-(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return valuemax?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
+(function($) { $.color = {}; $.color.make = function(r, g, b, a) { var o = {}; o.r = r || 0; o.g = g || 0; o.b = b || 0; o.a = a != null ? a : 1; o.add = function(c, d) { for (var i = 0; i < c.length; ++i)o[c.charAt(i)] += d; return o.normalize() }; o.scale = function(c, f) { for (var i = 0; i < c.length; ++i)o[c.charAt(i)] *= f; return o.normalize() }; o.toString = function() { if (o.a >= 1) { return "rgb(" + [o.r, o.g, o.b].join(",") + ")" } else { return "rgba(" + [o.r, o.g, o.b, o.a].join(",") + ")" } }; o.normalize = function() { function clamp(min, value, max) { return value < min ? min : value > max ? max : value } o.r = clamp(0, parseInt(o.r), 255); o.g = clamp(0, parseInt(o.g), 255); o.b = clamp(0, parseInt(o.b), 255); o.a = clamp(0, o.a, 1); return o }; o.clone = function() { return $.color.make(o.r, o.b, o.g, o.a) }; return o.normalize() }; $.color.extract = function(elem, css) { var c; do { c = elem.css(css).toLowerCase(); if (c != "" && c != "transparent") break; elem = elem.parent() } while (elem.length && !$.nodeName(elem.get(0), "body")); if (c == "rgba(0, 0, 0, 0)") c = "transparent"; return $.color.parse(c) }; $.color.parse = function(str) { var res, m = $.color.make; if (res = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str)) return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10)); if (res = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str)) return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10), parseFloat(res[4])); if (res = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str)) return m(parseFloat(res[1]) * 2.55, parseFloat(res[2]) * 2.55, parseFloat(res[3]) * 2.55); if (res = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str)) return m(parseFloat(res[1]) * 2.55, parseFloat(res[2]) * 2.55, parseFloat(res[3]) * 2.55, parseFloat(res[4])); if (res = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str)) return m(parseInt(res[1], 16), parseInt(res[2], 16), parseInt(res[3], 16)); if (res = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str)) return m(parseInt(res[1] + res[1], 16), parseInt(res[2] + res[2], 16), parseInt(res[3] + res[3], 16)); var name = $.trim(str).toLowerCase(); if (name == "transparent") return m(255, 255, 255, 0); else { res = lookupColors[name] || [0, 0, 0]; return m(res[0], res[1], res[2]) } }; var lookupColors = { aqua: [0, 255, 255], azure: [240, 255, 255], beige: [245, 245, 220], black: [0, 0, 0], blue: [0, 0, 255], brown: [165, 42, 42], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgrey: [169, 169, 169], darkgreen: [0, 100, 0], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkviolet: [148, 0, 211], fuchsia: [255, 0, 255], gold: [255, 215, 0], green: [0, 128, 0], indigo: [75, 0, 130], khaki: [240, 230, 140], lightblue: [173, 216, 230], lightcyan: [224, 255, 255], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightyellow: [255, 255, 224], lime: [0, 255, 0], magenta: [255, 0, 255], maroon: [128, 0, 0], navy: [0, 0, 128], olive: [128, 128, 0], orange: [255, 165, 0], pink: [255, 192, 203], purple: [128, 0, 128], violet: [128, 0, 128], red: [255, 0, 0], silver: [192, 192, 192], white: [255, 255, 255], yellow: [255, 255, 0] } })(jQuery);
// the actual Flot code
(function($) {
- // Cache the prototype hasOwnProperty for faster access
+ // Cache the prototype hasOwnProperty for faster access
- var hasOwnProperty = Object.prototype.hasOwnProperty;
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
- // A shim to provide 'detach' to jQuery versions prior to 1.4. Using a DOM
- // operation produces the same effect as detach, i.e. removing the element
- // without touching its jQuery data.
+ // A shim to provide 'detach' to jQuery versions prior to 1.4. Using a DOM
+ // operation produces the same effect as detach, i.e. removing the element
+ // without touching its jQuery data.
- // Do not merge this into Flot 0.9, since it requires jQuery 1.4.4+.
+ // Do not merge this into Flot 0.9, since it requires jQuery 1.4.4+.
- if (!$.fn.detach) {
- $.fn.detach = function() {
- return this.each(function() {
- if (this.parentNode) {
- this.parentNode.removeChild( this );
- }
- });
- };
+ if (!$.fn.detach) {
+ $.fn.detach = function() {
+ return this.each(function() {
+ if (this.parentNode) {
+ this.parentNode.removeChild(this);
+ }
+ });
+ };
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // The Canvas object is a wrapper around an HTML5