Permalink
Browse files

update builds

  • Loading branch information...
fat committed Nov 6, 2011
1 parent 915c2e3 commit 2e2f3d25e8b344283b6e1c7a8e379f71667765b7
Showing with 22 additions and 7 deletions.
  1. +5 −1 1.4.0/bootstrap-popover.js
  2. +16 −5 1.4.0/bootstrap-twipsy.js
  3. +1 −1 1.4.0/bootstrap.css
@@ -51,10 +51,11 @@
, o = this.options
if (typeof this.options.content == 'string') {
- content = this.options.content
+ content = $e.attr(this.options.content)
} else if (typeof this.options.content == 'function') {
content = this.options.content.call(this.$element[0])
}
+
return content
}
@@ -80,7 +81,10 @@
$.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, {
placement: 'right'
+ , content: 'data-content'
, template: '<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>'
})
+ $.fn.twipsy.rejectAttrOptions.push( 'content' )
+
}( window.jQuery || window.ender );
View
@@ -168,10 +168,7 @@
}
, tip: function() {
- if (!this.$tip) {
- this.$tip = $('<div class="twipsy" />').html(this.options.template)
- }
- return this.$tip
+ return this.$tip = this.$tip || $('<div class="twipsy" />').html(this.options.template)
}
, validate: function() {
@@ -194,6 +191,10 @@
this.enabled = !this.enabled
}
+ , toggle: function () {
+ this[this.tip().hasClass('in') ? 'hide' : 'show']()
+ }
+
}
@@ -303,8 +304,18 @@
, template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
}
+ $.fn.twipsy.rejectAttrOptions = [ 'title' ]
+
$.fn.twipsy.elementOptions = function(ele, options) {
- return $.extend({}, options, $(ele).data())
+ var data = $(ele).data()
+ , rejects = $.fn.twipsy.rejectAttrOptions
+ , i = rejects.length
+
+ while (i--) {
+ delete data[rejects[i]]
+ }
+
+ return $.extend({}, options, data)
}
}( window.jQuery || window.ender );
View
@@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
- * Date: Fri Nov 4 13:46:58 PDT 2011
+ * Date: Sat Nov 5 17:07:48 PDT 2011
*/
/* Reset.less
* Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).

0 comments on commit 2e2f3d2

Please sign in to comment.