bootstrap-sass-namespace
Advanced tools
Comparing version 3.3.7-alpha.1 to 3.3.7-alpha.2
@@ -16,2 +16,4 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
var Affix = function (element, options) { | ||
@@ -65,3 +67,3 @@ this.options = $.extend({}, Affix.DEFAULTS, options) | ||
if (this.pinnedOffset) return this.pinnedOffset | ||
this.$element.removeClass(Affix.RESET).addClass('affix') | ||
this.$element.removeClass(Affix.RESET).addClass(classPrefix + '-affix') | ||
var scrollTop = this.$target.scrollTop() | ||
@@ -68,0 +70,0 @@ var position = this.$element.offset() |
@@ -16,2 +16,4 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
var dismiss = '[data-dismiss="alert"]' | ||
@@ -40,3 +42,3 @@ var Alert = function (el) { | ||
if (!$parent.length) { | ||
$parent = $this.closest('.alert') | ||
$parent = $this.closest('.' + classPrefix + '-alert') | ||
} | ||
@@ -48,3 +50,3 @@ | ||
$parent.removeClass('in') | ||
$parent.removeClass(classPrefix + '-in') | ||
@@ -56,3 +58,3 @@ function removeElement() { | ||
$.support.transition && $parent.hasClass('fade') ? | ||
$.support.transition && $parent.hasClass(classPrefix + '-fade') ? | ||
$parent | ||
@@ -59,0 +61,0 @@ .one('bsTransitionEnd', removeElement) |
@@ -16,2 +16,4 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
var Button = function (element, options) { | ||
@@ -58,16 +60,16 @@ this.$element = $(element) | ||
if ($parent.length) { | ||
var $input = this.$element.find('input') | ||
var $input = this.$element.find('.' + classPrefix + '-tag-input') | ||
if ($input.prop('type') == 'radio') { | ||
if ($input.prop('checked')) changed = false | ||
$parent.find('.active').removeClass('active') | ||
this.$element.addClass('active') | ||
$parent.find('.' + classPrefix + '-active').removeClass(classPrefix + '-active') | ||
this.$element.addClass(classPrefix + '-active') | ||
} else if ($input.prop('type') == 'checkbox') { | ||
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false | ||
this.$element.toggleClass('active') | ||
if (($input.prop('checked')) !== this.$element.hasClass(classPrefix + '-active')) changed = false | ||
this.$element.toggleClass(classPrefix + '-active') | ||
} | ||
$input.prop('checked', this.$element.hasClass('active')) | ||
$input.prop('checked', this.$element.hasClass(classPrefix + '-active')) | ||
if (changed) $input.trigger('change') | ||
} else { | ||
this.$element.attr('aria-pressed', !this.$element.hasClass('active')) | ||
this.$element.toggleClass('active') | ||
this.$element.attr('aria-pressed', !this.$element.hasClass(classPrefix + '-active')) | ||
this.$element.toggleClass(classPrefix + '-active') | ||
} | ||
@@ -113,16 +115,16 @@ } | ||
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { | ||
var $btn = $(e.target).closest('.btn') | ||
var $btn = $(e.target).closest('.' + classPrefix + '-btn') | ||
Plugin.call($btn, 'toggle') | ||
if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) { | ||
if (!($(e.target).is('.' + classPrefix + '-tag-input[type="radio"], .' + classPrefix + '-tag-input[type="checkbox"]'))) { | ||
// Prevent double click on radios, and the double selections (so cancellation) on checkboxes | ||
e.preventDefault() | ||
// The target component still receive the focus | ||
if ($btn.is('input,button')) $btn.trigger('focus') | ||
else $btn.find('input:visible,button:visible').first().trigger('focus') | ||
if ($btn.is('.' + classPrefix + '-tag-input,.' + classPrefix + '-tag-button')) $btn.trigger('focus') | ||
else $btn.find('.' + classPrefix + '-tag-input:visible,.' + classPrefix + '-tag-button:visible').first().trigger('focus') | ||
} | ||
}) | ||
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { | ||
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) | ||
$(e.target).closest('.' + classPrefix + '-btn').toggleClass(classPrefix + '-focus', /^focus(in)?$/.test(e.type)) | ||
}) | ||
}(jQuery); |
@@ -16,5 +16,7 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
var Carousel = function (element, options) { | ||
this.$element = $(element) | ||
this.$indicators = this.$element.find('.carousel-indicators') | ||
this.$indicators = this.$element.find('.' + classPrefix + '-carousel-indicators') | ||
this.options = options | ||
@@ -69,3 +71,3 @@ this.paused = null | ||
Carousel.prototype.getItemIndex = function (item) { | ||
this.$items = item.parent().children('.item') | ||
this.$items = item.parent().children('.' + classPrefix + '-item') | ||
return this.$items.index(item || this.$active) | ||
@@ -86,3 +88,3 @@ } | ||
var that = this | ||
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) | ||
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.' + classPrefix + '-item.' + classPrefix + '-active')) | ||
@@ -100,3 +102,3 @@ if (pos > (this.$items.length - 1) || pos < 0) return | ||
if (this.$element.find('.next, .prev').length && $.support.transition) { | ||
if (this.$element.find('.' + classPrefix + '-next, .' + classPrefix + '-prev').length && $.support.transition) { | ||
this.$element.trigger($.support.transition.end) | ||
@@ -122,3 +124,3 @@ this.cycle(true) | ||
Carousel.prototype.slide = function (type, next) { | ||
var $active = this.$element.find('.item.active') | ||
var $active = this.$element.find('.' + classPrefix + '-item.' + classPrefix + '-active') | ||
var $next = next || this.getItemForDirection(type, $active) | ||
@@ -129,3 +131,3 @@ var isCycling = this.interval | ||
if ($next.hasClass('active')) return (this.sliding = false) | ||
if ($next.hasClass(classPrefix + '-active')) return (this.sliding = false) | ||
@@ -145,9 +147,9 @@ var relatedTarget = $next[0] | ||
if (this.$indicators.length) { | ||
this.$indicators.find('.active').removeClass('active') | ||
this.$indicators.find('.' + classPrefix + '-active').removeClass(classPrefix + '-active') | ||
var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) | ||
$nextIndicator && $nextIndicator.addClass('active') | ||
$nextIndicator && $nextIndicator.addClass(classPrefix + '-active') | ||
} | ||
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" | ||
if ($.support.transition && this.$element.hasClass('slide')) { | ||
if ($.support.transition && this.$element.hasClass(classPrefix + '-slide')) { | ||
$next.addClass(type) | ||
@@ -159,4 +161,4 @@ $next[0].offsetWidth // force reflow | ||
.one('bsTransitionEnd', function () { | ||
$next.removeClass([type, direction].join(' ')).addClass('active') | ||
$active.removeClass(['active', direction].join(' ')) | ||
$next.removeClass([type, direction].join(' ')).addClass(classPrefix + '-active') | ||
$active.removeClass([classPrefix + '-active', direction].join(' ')) | ||
that.sliding = false | ||
@@ -169,4 +171,4 @@ setTimeout(function () { | ||
} else { | ||
$active.removeClass('active') | ||
$next.addClass('active') | ||
$active.removeClass(classPrefix + '-active') | ||
$next.addClass(classPrefix + '-active') | ||
this.sliding = false | ||
@@ -221,3 +223,3 @@ this.$element.trigger(slidEvent) | ||
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 | ||
if (!$target.hasClass('carousel')) return | ||
if (!$target.hasClass(classPrefix + '-carousel')) return | ||
var options = $.extend({}, $target.data(), $this.data()) | ||
@@ -224,0 +226,0 @@ var slideIndex = $this.attr('data-slide-to') |
@@ -17,2 +17,4 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
var Collapse = function (element, options) { | ||
@@ -43,3 +45,3 @@ this.$element = $(element) | ||
Collapse.prototype.dimension = function () { | ||
var hasWidth = this.$element.hasClass('width') | ||
var hasWidth = this.$element.hasClass(classPrefix + '-width') | ||
return hasWidth ? 'width' : 'height' | ||
@@ -49,6 +51,6 @@ } | ||
Collapse.prototype.show = function () { | ||
if (this.transitioning || this.$element.hasClass('in')) return | ||
if (this.transitioning || this.$element.hasClass(classPrefix + '-in')) return | ||
var activesData | ||
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') | ||
var actives = this.$parent && this.$parent.children('.' + classPrefix + '-panel').children('.' + classPrefix + '-in, .' + classPrefix + '-collapsing') | ||
@@ -72,8 +74,8 @@ if (actives && actives.length) { | ||
this.$element | ||
.removeClass('collapse') | ||
.addClass('collapsing')[dimension](0) | ||
.removeClass(classPrefix + '-collapse') | ||
.addClass(classPrefix + '-collapsing')[dimension](0) | ||
.attr('aria-expanded', true) | ||
this.$trigger | ||
.removeClass('collapsed') | ||
.removeClass(classPrefix + '-collapsed') | ||
.attr('aria-expanded', true) | ||
@@ -85,4 +87,4 @@ | ||
this.$element | ||
.removeClass('collapsing') | ||
.addClass('collapse in')[dimension]('') | ||
.removeClass(classPrefix + '-collapsing') | ||
.addClass(classPrefix + '-collapse in')[dimension]('') | ||
this.transitioning = 0 | ||
@@ -103,3 +105,3 @@ this.$element | ||
Collapse.prototype.hide = function () { | ||
if (this.transitioning || !this.$element.hasClass('in')) return | ||
if (this.transitioning || !this.$element.hasClass(classPrefix + '-in')) return | ||
@@ -115,8 +117,8 @@ var startEvent = $.Event('hide.bs.collapse') | ||
this.$element | ||
.addClass('collapsing') | ||
.removeClass('collapse in') | ||
.addClass(classPrefix + '-collapsing') | ||
.removeClass(classPrefix + '-collapse in') | ||
.attr('aria-expanded', false) | ||
this.$trigger | ||
.addClass('collapsed') | ||
.addClass(classPrefix + '-collapsed') | ||
.attr('aria-expanded', false) | ||
@@ -129,4 +131,4 @@ | ||
this.$element | ||
.removeClass('collapsing') | ||
.addClass('collapse') | ||
.removeClass(classPrefix + '-collapsing') | ||
.addClass(classPrefix + '-collapse') | ||
.trigger('hidden.bs.collapse') | ||
@@ -144,3 +146,3 @@ } | ||
Collapse.prototype.toggle = function () { | ||
this[this.$element.hasClass('in') ? 'hide' : 'show']() | ||
this[this.$element.hasClass(classPrefix + '-in') ? 'hide' : 'show']() | ||
} | ||
@@ -159,7 +161,7 @@ | ||
Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { | ||
var isOpen = $element.hasClass('in') | ||
var isOpen = $element.hasClass(classPrefix + '-in') | ||
$element.attr('aria-expanded', isOpen) | ||
$trigger | ||
.toggleClass('collapsed', !isOpen) | ||
.toggleClass(classPrefix + '-collapsed', !isOpen) | ||
.attr('aria-expanded', isOpen) | ||
@@ -166,0 +168,0 @@ } |
@@ -16,2 +16,4 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
var backdrop = '.dropdown-backdrop' | ||
@@ -46,3 +48,3 @@ var toggle = '[data-toggle="dropdown"]' | ||
if (!$parent.hasClass('open')) return | ||
if (!$parent.hasClass(classPrefix + '-open')) return | ||
@@ -56,3 +58,3 @@ if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return | ||
$this.attr('aria-expanded', 'false') | ||
$parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) | ||
$parent.removeClass(classPrefix + '-open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) | ||
}) | ||
@@ -64,6 +66,6 @@ } | ||
if ($this.is('.disabled, :disabled')) return | ||
if ($this.is('.' + classPrefix + '-disabled, :disabled')) return | ||
var $parent = getParent($this) | ||
var isActive = $parent.hasClass('open') | ||
var isActive = $parent.hasClass(classPrefix + '-open') | ||
@@ -73,6 +75,6 @@ clearMenus() | ||
if (!isActive) { | ||
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { | ||
if ('ontouchstart' in document.documentElement && !$parent.closest('.' + classPrefix + '-navbar-nav').length) { | ||
// if mobile we use a backdrop because click events don't delegate | ||
$(document.createElement('div')) | ||
.addClass('dropdown-backdrop') | ||
.addClass(classPrefix + '-dropdown-backdrop') | ||
.insertAfter($(this)) | ||
@@ -92,3 +94,3 @@ .on('click', clearMenus) | ||
$parent | ||
.toggleClass('open') | ||
.toggleClass(classPrefix + '-open') | ||
.trigger($.Event('shown.bs.dropdown', relatedTarget)) | ||
@@ -108,6 +110,6 @@ } | ||
if ($this.is('.disabled, :disabled')) return | ||
if ($this.is('.' + classPrefix + '-disabled, :disabled')) return | ||
var $parent = getParent($this) | ||
var isActive = $parent.hasClass('open') | ||
var isActive = $parent.hasClass(classPrefix + '-open') | ||
@@ -119,4 +121,4 @@ if (!isActive && e.which != 27 || isActive && e.which == 27) { | ||
var desc = ' li:not(.disabled):visible a' | ||
var $items = $parent.find('.dropdown-menu' + desc) | ||
var desc = ' .' + classPrefix + '-tag-li:not(.' + classPrefix + '-disabled):visible .' + classPrefix + '-tag-a' | ||
var $items = $parent.find('.' + classPrefix + '-dropdown-menu' + desc) | ||
@@ -168,7 +170,7 @@ if (!$items.length) return | ||
.on('click.bs.dropdown.data-api', clearMenus) | ||
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) | ||
.on('click.bs.dropdown.data-api', '.' + classPrefix + '-dropdown form', function (e) { e.stopPropagation() }) | ||
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) | ||
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) | ||
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) | ||
.on('keydown.bs.dropdown.data-api', '.' + classPrefix + '-dropdown-menu', Dropdown.prototype.keydown) | ||
}(jQuery); |
@@ -16,2 +16,4 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
var Modal = function (element, options) { | ||
@@ -21,3 +23,3 @@ this.options = options | ||
this.$element = $(element) | ||
this.$dialog = this.$element.find('.modal-dialog') | ||
this.$dialog = this.$element.find('.' + classPrefix + '-modal-dialog') | ||
this.$backdrop = null | ||
@@ -31,3 +33,3 @@ this.isShown = null | ||
this.$element | ||
.find('.modal-content') | ||
.find('.' + classPrefix + '-modal-content') | ||
.load(this.options.remote, $.proxy(function () { | ||
@@ -66,3 +68,3 @@ this.$element.trigger('loaded.bs.modal') | ||
this.setScrollbar() | ||
this.$body.addClass('modal-open') | ||
this.$body.addClass(classPrefix + '-modal-open') | ||
@@ -81,3 +83,3 @@ this.escape() | ||
this.backdrop(function () { | ||
var transition = $.support.transition && that.$element.hasClass('fade') | ||
var transition = $.support.transition && that.$element.hasClass(classPrefix + '-fade') | ||
@@ -98,3 +100,3 @@ if (!that.$element.parent().length) { | ||
that.$element.addClass('in') | ||
that.$element.addClass(classPrefix + '-in') | ||
@@ -132,3 +134,3 @@ that.enforceFocus() | ||
this.$element | ||
.removeClass('in') | ||
.removeClass(classPrefix + '-in') | ||
.off('click.dismiss.bs.modal') | ||
@@ -139,3 +141,3 @@ .off('mouseup.dismiss.bs.modal') | ||
$.support.transition && this.$element.hasClass('fade') ? | ||
$.support.transition && this.$element.hasClass(classPrefix + '-fade') ? | ||
this.$element | ||
@@ -181,3 +183,3 @@ .one('bsTransitionEnd', $.proxy(this.hideModal, this)) | ||
this.backdrop(function () { | ||
that.$body.removeClass('modal-open') | ||
that.$body.removeClass(classPrefix + '-modal-open') | ||
that.resetAdjustments() | ||
@@ -196,3 +198,3 @@ that.resetScrollbar() | ||
var that = this | ||
var animate = this.$element.hasClass('fade') ? 'fade' : '' | ||
var animate = this.$element.hasClass(classPrefix + '-fade') ? 'fade' : '' | ||
@@ -203,3 +205,3 @@ if (this.isShown && this.options.backdrop) { | ||
this.$backdrop = $(document.createElement('div')) | ||
.addClass('modal-backdrop ' + animate) | ||
.addClass(classPrefix + '-modal-backdrop ' + animate) | ||
.appendTo(this.$body) | ||
@@ -220,3 +222,3 @@ | ||
this.$backdrop.addClass('in') | ||
this.$backdrop.addClass(classPrefix + '-in') | ||
@@ -232,3 +234,3 @@ if (!callback) return | ||
} else if (!this.isShown && this.$backdrop) { | ||
this.$backdrop.removeClass('in') | ||
this.$backdrop.removeClass(classPrefix + '-in') | ||
@@ -239,3 +241,3 @@ var callbackRemove = function () { | ||
} | ||
$.support.transition && this.$element.hasClass('fade') ? | ||
$.support.transition && this.$element.hasClass(classPrefix + '-fade') ? | ||
this.$backdrop | ||
@@ -242,0 +244,0 @@ .one('bsTransitionEnd', callbackRemove) |
@@ -16,2 +16,4 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
var Popover = function (element, options) { | ||
@@ -49,12 +51,12 @@ this.init('popover', element, options) | ||
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) | ||
$tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events | ||
$tip.find('.' + classPrefix + '-popover-title')[this.options.html ? 'html' : 'text'](title) | ||
$tip.find('.' + classPrefix + '-popover-content').children().detach().end()[ // we use append for html objects to maintain js events | ||
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' | ||
](content) | ||
$tip.removeClass('fade top bottom left right in') | ||
$tip.removeClass(classPrefix + '-fade top bottom left right in') | ||
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do | ||
// this manually by checking the contents. | ||
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() | ||
if (!$tip.find('.' + classPrefix + '-popover-title').html()) $tip.find('.' + classPrefix + '-popover-title').hide() | ||
} | ||
@@ -77,3 +79,3 @@ | ||
Popover.prototype.arrow = function () { | ||
return (this.$arrow = this.$arrow || this.tip().find('.arrow')) | ||
return (this.$arrow = this.$arrow || this.tip().find('.' + classPrefix + '-arrow')) | ||
} | ||
@@ -80,0 +82,0 @@ |
@@ -16,2 +16,4 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
function ScrollSpy(element, options) { | ||
@@ -21,3 +23,3 @@ this.$body = $(document.body) | ||
this.options = $.extend({}, ScrollSpy.DEFAULTS, options) | ||
this.selector = (this.options.target || '') + ' .nav li > a' | ||
this.selector = (this.options.target || '') + ' .nav .' + classPrefix + '-tag-li > .' + classPrefix + '-tag-a' | ||
this.offsets = [] | ||
@@ -117,8 +119,8 @@ this.targets = [] | ||
.parents('li') | ||
.addClass('active') | ||
.addClass(classPrefix + '-active') | ||
if (active.parent('.dropdown-menu').length) { | ||
if (active.parent('.' + classPrefix + '-dropdown-menu').length) { | ||
active = active | ||
.closest('li.dropdown') | ||
.addClass('active') | ||
.addClass(classPrefix + '-active') | ||
} | ||
@@ -131,4 +133,4 @@ | ||
$(this.selector) | ||
.parentsUntil(this.options.target, '.active') | ||
.removeClass('active') | ||
.parentsUntil(this.options.target, '.' + classPrefix + '-active') | ||
.removeClass(classPrefix + '-active') | ||
} | ||
@@ -135,0 +137,0 @@ |
@@ -16,2 +16,4 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
var Tab = function (element) { | ||
@@ -37,5 +39,5 @@ // jscs:disable requireDollarBeforejQueryAssignment | ||
if ($this.parent('li').hasClass('active')) return | ||
if ($this.parent('li').hasClass(classPrefix + '-active')) return | ||
var $previous = $ul.find('.active:last a') | ||
var $previous = $ul.find('.' + classPrefix + '-active:last a') | ||
var hideEvent = $.Event('hide.bs.tab', { | ||
@@ -72,9 +74,9 @@ relatedTarget: $this[0] | ||
&& $.support.transition | ||
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) | ||
&& ($active.length && $active.hasClass(classPrefix + '-fade') || !!container.find('> .fade').length) | ||
function next() { | ||
$active | ||
.removeClass('active') | ||
.removeClass(classPrefix + '-active') | ||
.find('> .dropdown-menu > .active') | ||
.removeClass('active') | ||
.removeClass(classPrefix + '-active') | ||
.end() | ||
@@ -85,3 +87,3 @@ .find('[data-toggle="tab"]') | ||
element | ||
.addClass('active') | ||
.addClass(classPrefix + '-active') | ||
.find('[data-toggle="tab"]') | ||
@@ -92,11 +94,11 @@ .attr('aria-expanded', true) | ||
element[0].offsetWidth // reflow for transition | ||
element.addClass('in') | ||
element.addClass(classPrefix + '-in') | ||
} else { | ||
element.removeClass('fade') | ||
element.removeClass(classPrefix + '-fade') | ||
} | ||
if (element.parent('.dropdown-menu').length) { | ||
if (element.parent('.' + classPrefix + '-dropdown-menu').length) { | ||
element | ||
.closest('li.dropdown') | ||
.addClass('active') | ||
.addClass(classPrefix + '-active') | ||
.end() | ||
@@ -116,3 +118,3 @@ .find('[data-toggle="tab"]') | ||
$active.removeClass('in') | ||
$active.removeClass(classPrefix + '-in') | ||
} | ||
@@ -119,0 +121,0 @@ |
@@ -17,2 +17,4 @@ /* ======================================================================== | ||
var classPrefix = BOOTSTRAP_NAMESPACE || 'z'; | ||
var Tooltip = function (element, options) { | ||
@@ -124,3 +126,3 @@ this.type = null | ||
if (self.tip().hasClass('in') || self.hoverState == 'in') { | ||
if (self.tip().hasClass(classPrefix + '-in') || self.hoverState == 'in') { | ||
self.hoverState = 'in' | ||
@@ -193,3 +195,3 @@ return | ||
if (this.options.animation) $tip.addClass('fade') | ||
if (this.options.animation) $tip.addClass(classPrefix + '-fade') | ||
@@ -244,3 +246,3 @@ var placement = typeof this.options.placement == 'function' ? | ||
$.support.transition && this.$tip.hasClass('fade') ? | ||
$.support.transition && this.$tip.hasClass(classPrefix + '-fade') ? | ||
$tip | ||
@@ -280,3 +282,3 @@ .one('bsTransitionEnd', complete) | ||
$tip.addClass('in') | ||
$tip.addClass(classPrefix + '-in') | ||
@@ -314,4 +316,4 @@ // check to see if placing tip in new offset caused the tip to resize itself | ||
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) | ||
$tip.removeClass('fade in top bottom left right') | ||
$tip.find('.' + classPrefix + '-tooltip-inner')[this.options.html ? 'html' : 'text'](title) | ||
$tip.removeClass(classPrefix + '-fade in top bottom left right') | ||
} | ||
@@ -338,5 +340,5 @@ | ||
$tip.removeClass('in') | ||
$tip.removeClass(classPrefix + '-in') | ||
$.support.transition && $tip.hasClass('fade') ? | ||
$.support.transition && $tip.hasClass(classPrefix + '-fade') ? | ||
$tip | ||
@@ -448,3 +450,3 @@ .one('bsTransitionEnd', complete) | ||
Tooltip.prototype.arrow = function () { | ||
return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) | ||
return (this.$arrow = this.$arrow || this.tip().find('.' + classPrefix + '-tooltip-arrow')) | ||
} | ||
@@ -479,3 +481,3 @@ | ||
} else { | ||
self.tip().hasClass('in') ? self.leave(self) : self.enter(self) | ||
self.tip().hasClass(classPrefix + '-in') ? self.leave(self) : self.enter(self) | ||
} | ||
@@ -482,0 +484,0 @@ } |
{ | ||
"name": "bootstrap-sass-namespace", | ||
"version": "3.3.7-alpha.1", | ||
"version": "3.3.7-alpha.2", | ||
"description": "bootstrap-sass-namespace is a fork of bootstrap-sass with namespace added", | ||
@@ -5,0 +5,0 @@ "main": "assets/javascripts/bootstrap.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
672461
3733