Skip to content

Actualiazación de Bootstrap v3.1.0 version oficial - [WIP] #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

gem 'jekyll', '~> 1.4.0'
gem 'bootstrap-sass', '~> 3.0.3.0', github: 'thomas-mcdonald/bootstrap-sass'
gem 'bootstrap-sass', '~> 3.1.0', github: 'twbs/bootstrap-sass'
gem 'sass', '~> 3.2.12'
gem 'rb-fsevent', '~> 0.9.3'
gem 'liquid', '~> 2.5.3'
Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GIT
remote: git://github.com/thomas-mcdonald/bootstrap-sass.git
revision: 99d5746f653e4d5fdccc5cb8d278b32b0b2c6bce
remote: git://github.com/twbs/bootstrap-sass.git
revision: 02a611e88a037370cb4b310117a8a5e6b03176a9
specs:
bootstrap-sass (3.0.3.0)
bootstrap-sass (3.1.0.0)
sass (~> 3.2)

GEM
Expand Down Expand Up @@ -88,7 +88,7 @@ GEM
redcarpet (2.3.0)
ref (1.0.5)
safe_yaml (0.9.7)
sass (3.2.12)
sass (3.2.14)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
Expand Down Expand Up @@ -121,7 +121,7 @@ PLATFORMS
ruby

DEPENDENCIES
bootstrap-sass (~> 3.0.3.0)!
bootstrap-sass (~> 3.1.0)!
dotenv (~> 0.9.0)
font-awesome-sass (~> 4.0.2)
iconv (~> 1.0.3)
Expand Down
57 changes: 34 additions & 23 deletions _assets/javascript/bootstrap/affix.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
/* ========================================================================
* Bootstrap: affix.js v3.0.3
* Bootstrap: affix.js v3.1.0
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* 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.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */


+function ($) { "use strict";
+function ($) {
'use strict';

// AFFIX CLASS DEFINITION
// ======================
Expand All @@ -29,9 +19,10 @@
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))

this.$element = $(element)
this.affixed =
this.unpin = null
this.$element = $(element)
this.affixed =
this.unpin =
this.pinnedOffset = null

this.checkPosition()
}
Expand All @@ -42,6 +33,14 @@
offset: 0
}

Affix.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop = this.$window.scrollTop()
var position = this.$element.offset()
return (this.pinnedOffset = position.top - scrollTop)
}

Affix.prototype.checkPositionWithEventLoop = function () {
setTimeout($.proxy(this.checkPosition, this), 1)
}
Expand All @@ -56,9 +55,11 @@
var offsetTop = offset.top
var offsetBottom = offset.bottom

if (this.affixed == 'top') position.top += scrollTop

if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top()
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)

var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
Expand All @@ -67,13 +68,23 @@
if (this.affixed === affix) return
if (this.unpin) this.$element.css('top', '')

var affixType = 'affix' + (affix ? '-' + affix : '')
var e = $.Event(affixType + '.bs.affix')

this.$element.trigger(e)

if (e.isDefaultPrevented()) return

this.affixed = affix
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null

this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
this.$element
.removeClass(Affix.RESET)
.addClass(affixType)
.trigger($.Event(affixType.replace('affix', 'affixed')))

if (affix == 'bottom') {
this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
}
}

Expand Down
20 changes: 5 additions & 15 deletions _assets/javascript/bootstrap/alert.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
/* ========================================================================
* Bootstrap: alert.js v3.0.3
* Bootstrap: alert.js v3.1.0
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* 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.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */


+function ($) { "use strict";
+function ($) {
'use strict';

// ALERT CLASS DEFINITION
// ======================
Expand Down
50 changes: 21 additions & 29 deletions _assets/javascript/bootstrap/button.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
/* ========================================================================
* Bootstrap: button.js v3.0.3
* Bootstrap: button.js v3.1.0
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* 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.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */


+function ($) { "use strict";
+function ($) {
'use strict';

// BUTTON PUBLIC CLASS DEFINITION
// ==============================

var Button = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Button.DEFAULTS, options)
this.$element = $(element)
this.options = $.extend({}, Button.DEFAULTS, options)
this.isLoading = false
}

Button.DEFAULTS = {
Expand All @@ -45,25 +36,26 @@
$el[val](data[state] || this.options[state])

// push to event loop to allow forms to submit
setTimeout(function () {
state == 'loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d);
}, 0)
setTimeout($.proxy(function () {
if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
} else if (this.isLoading) {
this.isLoading = false
$el.removeClass(d).removeAttr(d)
}
}, this), 0)
}

Button.prototype.toggle = function () {
var $parent = this.$element.closest('[data-toggle="buttons"]')
var changed = true
var $parent = this.$element.closest('[data-toggle="buttons"]')

if ($parent.length) {
var $input = this.$element.find('input')
if ($input.prop('type') === 'radio') {
// see if clicking on current one
if ($input.prop('checked') && this.$element.hasClass('active'))
changed = false
else
$parent.find('.active').removeClass('active')
if ($input.prop('type') == 'radio') {
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
else $parent.find('.active').removeClass('active')
}
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
}
Expand Down
44 changes: 16 additions & 28 deletions _assets/javascript/bootstrap/carousel.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
/* ========================================================================
* Bootstrap: carousel.js v3.0.3
* Bootstrap: carousel.js v3.1.0
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* 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.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */


+function ($) { "use strict";
+function ($) {
'use strict';

// CAROUSEL CLASS DEFINITION
// =========================
Expand All @@ -39,9 +29,9 @@
}

Carousel.DEFAULTS = {
interval: 5000
, pause: 'hover'
, wrap: true
interval: 5000,
pause: 'hover',
wrap: true
}

Carousel.prototype.cycle = function (e) {
Expand Down Expand Up @@ -78,7 +68,7 @@
Carousel.prototype.pause = function (e) {
e || (this.paused = true)

if (this.$element.find('.next, .prev').length && $.support.transition.end) {
if (this.$element.find('.next, .prev').length && $.support.transition) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
Expand Down Expand Up @@ -111,13 +101,15 @@
$next = this.$element.find('.item')[fallback]()
}

this.sliding = true

isCycling && this.pause()
if ($next.hasClass('active')) return this.sliding = false

var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
this.$element.trigger(e)
if (e.isDefaultPrevented()) return

if ($next.hasClass('active')) return
this.sliding = true

isCycling && this.pause()

if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
Expand All @@ -128,8 +120,6 @@
}

if ($.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$next.addClass(type)
$next[0].offsetWidth // force reflow
$active.addClass(direction)
Expand All @@ -141,10 +131,8 @@
that.sliding = false
setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
})
.emulateTransitionEnd(600)
.emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
} else {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
Expand Down
23 changes: 7 additions & 16 deletions _assets/javascript/bootstrap/collapse.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
/* ========================================================================
* Bootstrap: collapse.js v3.0.3
* Bootstrap: collapse.js v3.1.0
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* 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.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */


+function ($) { "use strict";
+function ($) {
'use strict';

// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
Expand Down Expand Up @@ -69,7 +59,7 @@
var complete = function () {
this.$element
.removeClass('collapsing')
.addClass('in')
.addClass('collapse in')
[dimension]('auto')
this.transitioning = 0
this.$element.trigger('shown.bs.collapse')
Expand Down Expand Up @@ -137,6 +127,7 @@
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)

if (!data && options.toggle && option == 'show') option = !option
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
Expand Down
Loading