summaryrefslogtreecommitdiff
path: root/assets/js/bootstrap-popover.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/bootstrap-popover.js')
-rwxr-xr-xassets/js/bootstrap-popover.js23
1 files changed, 13 insertions, 10 deletions
diff --git a/assets/js/bootstrap-popover.js b/assets/js/bootstrap-popover.js
index e1aa5ac3..d5ecfa92 100755
--- a/assets/js/bootstrap-popover.js
+++ b/assets/js/bootstrap-popover.js
@@ -1,5 +1,5 @@
/* ===========================================================
- * bootstrap-popover.js v2.0.2
+ * bootstrap-popover.js v2.0.3
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
@@ -18,14 +18,19 @@
* =========================================================== */
-!function( $ ) {
+!function ($) {
- "use strict"
+ "use strict"; // jshint ;_;
+
+
+ /* POPOVER PUBLIC CLASS DEFINITION
+ * =============================== */
var Popover = function ( element, options ) {
this.init('popover', element, options)
}
+
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
========================================== */
@@ -38,8 +43,8 @@
, title = this.getTitle()
, content = this.getContent()
- $tip.find('.popover-title')[ $.type(title) == 'object' ? 'append' : 'html' ](title)
- $tip.find('.popover-content > *')[ $.type(content) == 'object' ? 'append' : 'html' ](content)
+ $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
+ $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}
@@ -56,12 +61,10 @@
content = $e.attr('data-content')
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
- content = content.toString().replace(/(^\s*|\s*$)/, "")
-
return content
}
- , tip: function() {
+ , tip: function () {
if (!this.$tip) {
this.$tip = $(this.options.template)
}
@@ -74,7 +77,7 @@
/* POPOVER PLUGIN DEFINITION
* ======================= */
- $.fn.popover = function ( option ) {
+ $.fn.popover = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('popover')
@@ -92,4 +95,4 @@
, 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
+}(window.jQuery); \ No newline at end of file