vendor/assets/javascripts/twitter/bootstrap/popover.js in bootstrap-sass-rails-2.0.4.3 vs vendor/assets/javascripts/twitter/bootstrap/popover.js in bootstrap-sass-rails-2.1.0.0pre1
- old
+ new
@@ -1,7 +1,7 @@
/* ===========================================================
- * bootstrap-popover.js v2.0.4
+ * bootstrap-popover.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,11 +24,11 @@
/* POPOVER PUBLIC CLASS DEFINITION
* =============================== */
- var Popover = function ( element, options ) {
+ var Popover = function (element, options) {
this.init('popover', element, options)
}
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
@@ -41,12 +41,12 @@
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
, content = this.getContent()
- $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
- $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+ $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}
, hasContent: function () {
@@ -69,10 +69,14 @@
this.$tip = $(this.options.template)
}
return this.$tip
}
+ , destroy: function () {
+ this.hide().$element.off('.' + this.type).removeData(this.type)
+ }
+
})
/* POPOVER PLUGIN DEFINITION
* ======================= */
@@ -89,9 +93,10 @@
$.fn.popover.Constructor = Popover
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
placement: 'right'
+ , trigger: 'click'
, content: ''
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
})
}(window.jQuery);
\ No newline at end of file