diff --git a/app/Http/Controllers/EventCustomizeController.php b/app/Http/Controllers/EventCustomizeController.php index c883fd1a..8d086e53 100644 --- a/app/Http/Controllers/EventCustomizeController.php +++ b/app/Http/Controllers/EventCustomizeController.php @@ -103,6 +103,7 @@ class EventCustomizeController extends MyBaseController $event->social_show_twitter = $request->get('social_show_twitter'); $event->social_show_email = $request->get('social_show_email'); $event->social_show_googleplus = $request->get('social_show_googleplus'); + $event->social_show_whatsapp = $request->get('social_show_whatsapp'); $event->save(); return response()->json([ diff --git a/bower.json b/bower.json index 44687e73..43b0d135 100644 --- a/bower.json +++ b/bower.json @@ -17,12 +17,12 @@ "dependencies": { "bootstrap": "~3.2.0", "curioussolutions-datetimepicker": "~0.1.26", - "chartjs": "~0.2.0", + "chartjs": "~2.0.0-beta2", "humane-js": "~3.2.0", "geocomplete": "~1.6.4", "modernizr": "~2.8.3", "jquery-form": "malsup/form#~3.46.0", - "RRSSB": "~1.6.0", + "RRSSB": "~1.10.0", "jquery-backstretch": "~2.0.4", "fontawesome": "~4.2.0", "simplemde": "~1.8.1", diff --git a/database/migrations/2016_03_22_021114_add_whatsapp_share_option_events.php b/database/migrations/2016_03_22_021114_add_whatsapp_share_option_events.php new file mode 100644 index 00000000..9248f529 --- /dev/null +++ b/database/migrations/2016_03_22_021114_add_whatsapp_share_option_events.php @@ -0,0 +1,31 @@ +boolean('social_show_whatsapp')->default(1); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('events', function (Blueprint $table) { + $table->dropColumn('social_show_whatsapp'); + }); + } +} diff --git a/public/assets/javascript/backend.js b/public/assets/javascript/backend.js index 2504978c..528cef67 100644 --- a/public/assets/javascript/backend.js +++ b/public/assets/javascript/backend.js @@ -1404,25 +1404,29 @@ window.Modernizr = (function( window, document, undefined ) { return Modernizr; })(this, this.document); -;/*! - * Bootstrap v3.2.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } +;if (!jQuery) { throw new Error("Bootstrap requires jQuery") } /* ======================================================================== - * Bootstrap: transition.js v3.2.0 - * http://getbootstrap.com/javascript/#transitions + * Bootstrap: transition.js v3.0.0 + * http://twbs.github.com/bootstrap/javascript.html#transitions * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * 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. * ======================================================================== */ -+function ($) { - 'use strict'; ++function ($) { "use strict"; // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) // ============================================================ @@ -1431,10 +1435,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var el = document.createElement('bootstrap') var transEndEventNames = { - WebkitTransition : 'webkitTransitionEnd', - MozTransition : 'transitionend', - OTransition : 'oTransitionEnd otransitionend', - transition : 'transitionend' + 'WebkitTransition' : 'webkitTransitionEnd' + , 'MozTransition' : 'transitionend' + , 'OTransition' : 'oTransitionEnd otransitionend' + , 'transition' : 'transitionend' } for (var name in transEndEventNames) { @@ -1442,15 +1446,12 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re return { end: transEndEventNames[name] } } } - - return false // explicit for ie8 ( ._.) } // http://blog.alexmaccaw.com/css-transitions $.fn.emulateTransitionEnd = function (duration) { - var called = false - var $el = this - $(this).one('bsTransitionEnd', function () { called = true }) + var called = false, $el = this + $(this).one($.support.transition.end, function () { called = true }) var callback = function () { if (!called) $($el).trigger($.support.transition.end) } setTimeout(callback, duration) return this @@ -1458,31 +1459,31 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $(function () { $.support.transition = transitionEnd() - - if (!$.support.transition) return - - $.event.special.bsTransitionEnd = { - bindType: $.support.transition.end, - delegateType: $.support.transition.end, - handle: function (e) { - if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) - } - } }) -}(jQuery); +}(window.jQuery); /* ======================================================================== - * Bootstrap: alert.js v3.2.0 - * http://getbootstrap.com/javascript/#alerts + * Bootstrap: alert.js v3.0.0 + * http://twbs.github.com/bootstrap/javascript.html#alerts * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * 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. * ======================================================================== */ -+function ($) { - 'use strict'; ++function ($) { "use strict"; // ALERT CLASS DEFINITION // ====================== @@ -1492,8 +1493,6 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $(el).on('click', dismiss, this.close) } - Alert.VERSION = '3.2.0' - Alert.prototype.close = function (e) { var $this = $(this) var selector = $this.attr('data-target') @@ -1518,13 +1517,12 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $parent.removeClass('in') function removeElement() { - // detach from parent, fire event then clean up data - $parent.detach().trigger('closed.bs.alert').remove() + $parent.trigger('closed.bs.alert').remove() } $.support.transition && $parent.hasClass('fade') ? $parent - .one('bsTransitionEnd', removeElement) + .one($.support.transition.end, removeElement) .emulateTransitionEnd(150) : removeElement() } @@ -1533,7 +1531,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // ALERT PLUGIN DEFINITION // ======================= - function Plugin(option) { + var old = $.fn.alert + + $.fn.alert = function (option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.alert') @@ -1543,9 +1543,6 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }) } - var old = $.fn.alert - - $.fn.alert = Plugin $.fn.alert.Constructor = Alert @@ -1563,31 +1560,38 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) -}(jQuery); +}(window.jQuery); /* ======================================================================== - * Bootstrap: button.js v3.2.0 - * http://getbootstrap.com/javascript/#buttons + * Bootstrap: button.js v3.0.0 + * http://twbs.github.com/bootstrap/javascript.html#buttons * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * 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. * ======================================================================== */ -+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.isLoading = false + this.$element = $(element) + this.options = $.extend({}, Button.DEFAULTS, options) } - Button.VERSION = '3.2.0' - Button.DEFAULTS = { loadingText: 'loading...' } @@ -1600,43 +1604,38 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re state = state + 'Text' - if (data.resetText == null) $el.data('resetText', $el[val]()) + if (!data.resetText) $el.data('resetText', $el[val]()) - $el[val](data[state] == null ? this.options[state] : data[state]) + $el[val](data[state] || this.options[state]) // push to event loop to allow forms to submit - 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) + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d); + }, 0) } Button.prototype.toggle = function () { - 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') { - 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') + .prop('checked', !this.$element.hasClass('active')) + .trigger('change') + if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') } - if (changed) this.$element.toggleClass('active') + this.$element.toggleClass('active') } // BUTTON PLUGIN DEFINITION // ======================== - function Plugin(option) { + var old = $.fn.button + + $.fn.button = function (option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.button') @@ -1649,9 +1648,6 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }) } - var old = $.fn.button - - $.fn.button = Plugin $.fn.button.Constructor = Button @@ -1667,32 +1663,42 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // BUTTON DATA-API // =============== - $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { + $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { var $btn = $(e.target) if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - Plugin.call($btn, 'toggle') + $btn.button('toggle') e.preventDefault() }) -}(jQuery); +}(window.jQuery); /* ======================================================================== - * Bootstrap: carousel.js v3.2.0 - * http://getbootstrap.com/javascript/#carousel + * Bootstrap: carousel.js v3.0.0 + * http://twbs.github.com/bootstrap/javascript.html#carousel * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Copyright 2012 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. * ======================================================================== */ -+function ($) { - 'use strict'; ++function ($) { "use strict"; // CAROUSEL CLASS DEFINITION // ========================= var Carousel = function (element, options) { - this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this)) + this.$element = $(element) this.$indicators = this.$element.find('.carousel-indicators') this.options = options this.paused = @@ -1702,29 +1708,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$items = null this.options.pause == 'hover' && this.$element - .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) - .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) } - Carousel.VERSION = '3.2.0' - Carousel.DEFAULTS = { - interval: 5000, - pause: 'hover', - wrap: true + interval: 5000 + , pause: 'hover' + , wrap: true } - Carousel.prototype.keydown = function (e) { - switch (e.which) { - case 37: this.prev(); break - case 39: this.next(); break - default: return - } - - e.preventDefault() - } - - Carousel.prototype.cycle = function (e) { + Carousel.prototype.cycle = function (e) { e || (this.paused = false) this.interval && clearInterval(this.interval) @@ -1736,18 +1730,20 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re return this } - Carousel.prototype.getItemIndex = function (item) { - this.$items = item.parent().children('.item') - return this.$items.index(item || this.$active) + Carousel.prototype.getActiveIndex = function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + + return this.$items.index(this.$active) } Carousel.prototype.to = function (pos) { var that = this - var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) + var activeIndex = this.getActiveIndex() if (pos > (this.$items.length - 1) || pos < 0) return - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" + if (this.sliding) return this.$element.one('slid', function () { that.to(pos) }) if (activeIndex == pos) return this.pause().cycle() return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) @@ -1756,7 +1752,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re Carousel.prototype.pause = function (e) { e || (this.paused = true) - if (this.$element.find('.next, .prev').length && $.support.transition) { + if (this.$element.find('.next, .prev').length && $.support.transition.end) { this.$element.trigger($.support.transition.end) this.cycle(true) } @@ -1789,47 +1785,44 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $next = this.$element.find('.item')[fallback]() } - if ($next.hasClass('active')) return (this.sliding = false) - - var relatedTarget = $next[0] - var slideEvent = $.Event('slide.bs.carousel', { - relatedTarget: relatedTarget, - direction: direction - }) - this.$element.trigger(slideEvent) - if (slideEvent.isDefaultPrevented()) return - this.sliding = true isCycling && this.pause() + var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) + + if ($next.hasClass('active')) return + if (this.$indicators.length) { this.$indicators.find('.active').removeClass('active') - var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) - $nextIndicator && $nextIndicator.addClass('active') + this.$element.one('slid', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) } - var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" 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) $next.addClass(direction) $active - .one('bsTransitionEnd', function () { + .one($.support.transition.end, function () { $next.removeClass([type, direction].join(' ')).addClass('active') $active.removeClass(['active', direction].join(' ')) that.sliding = false - setTimeout(function () { - that.$element.trigger(slidEvent) - }, 0) + setTimeout(function () { that.$element.trigger('slid') }, 0) }) - .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) + .emulateTransitionEnd(600) } else { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return $active.removeClass('active') $next.addClass('active') this.sliding = false - this.$element.trigger(slidEvent) + this.$element.trigger('slid') } isCycling && this.cycle() @@ -1841,7 +1834,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // CAROUSEL PLUGIN DEFINITION // ========================== - function Plugin(option) { + var old = $.fn.carousel + + $.fn.carousel = function (option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.carousel') @@ -1855,9 +1850,6 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }) } - var old = $.fn.carousel - - $.fn.carousel = Plugin $.fn.carousel.Constructor = Carousel @@ -1874,17 +1866,15 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // ================= $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { - var href - var $this = $(this) - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 - if (!$target.hasClass('carousel')) return + var $this = $(this), href + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 var options = $.extend({}, $target.data(), $this.data()) var slideIndex = $this.attr('data-slide-to') if (slideIndex) options.interval = false - Plugin.call($target, options) + $target.carousel(options) - if (slideIndex) { + if (slideIndex = $this.attr('data-slide-to')) { $target.data('bs.carousel').to(slideIndex) } @@ -1894,23 +1884,33 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $(window).on('load', function () { $('[data-ride="carousel"]').each(function () { var $carousel = $(this) - Plugin.call($carousel, $carousel.data()) + $carousel.carousel($carousel.data()) }) }) -}(jQuery); +}(window.jQuery); /* ======================================================================== - * Bootstrap: collapse.js v3.2.0 - * http://getbootstrap.com/javascript/#collapse + * Bootstrap: collapse.js v3.0.0 + * http://twbs.github.com/bootstrap/javascript.html#collapse * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Copyright 2012 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. * ======================================================================== */ -+function ($) { - 'use strict'; ++function ($) { "use strict"; // COLLAPSE PUBLIC CLASS DEFINITION // ================================ @@ -1924,8 +1924,6 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (this.options.toggle) this.toggle() } - Collapse.VERSION = '3.2.0' - Collapse.DEFAULTS = { toggle: true } @@ -1947,7 +1945,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (actives && actives.length) { var hasData = actives.data('bs.collapse') if (hasData && hasData.transitioning) return - Plugin.call(actives, 'hide') + actives.collapse('hide') hasData || actives.data('bs.collapse', null) } @@ -1955,17 +1953,18 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$element .removeClass('collapse') - .addClass('collapsing')[dimension](0) + .addClass('collapsing') + [dimension](0) this.transitioning = 1 var complete = function () { this.$element .removeClass('collapsing') - .addClass('collapse in')[dimension]('') + .addClass('in') + [dimension]('auto') this.transitioning = 0 - this.$element - .trigger('shown.bs.collapse') + this.$element.trigger('shown.bs.collapse') } if (!$.support.transition) return complete.call(this) @@ -1973,8 +1972,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var scrollSize = $.camelCase(['scroll', dimension].join('-')) this.$element - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize]) + .one($.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(350) + [dimension](this.$element[0][scrollSize]) } Collapse.prototype.hide = function () { @@ -1986,7 +1986,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var dimension = this.dimension() - this.$element[dimension](this.$element[dimension]())[0].offsetHeight + this.$element + [dimension](this.$element[dimension]()) + [0].offsetHeight this.$element .addClass('collapsing') @@ -2007,7 +2009,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$element [dimension](0) - .one('bsTransitionEnd', $.proxy(complete, this)) + .one($.support.transition.end, $.proxy(complete, this)) .emulateTransitionEnd(350) } @@ -2019,21 +2021,19 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // COLLAPSE PLUGIN DEFINITION // ========================== - function Plugin(option) { + var old = $.fn.collapse + + $.fn.collapse = function (option) { return this.each(function () { var $this = $(this) 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]() }) } - var old = $.fn.collapse - - $.fn.collapse = Plugin $.fn.collapse.Constructor = Collapse @@ -2049,12 +2049,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // COLLAPSE DATA-API // ================= - $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { - var href - var $this = $(this) + $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href var target = $this.attr('data-target') || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 var $target = $(target) var data = $target.data('bs.collapse') var option = data ? 'toggle' : $this.data() @@ -2062,38 +2061,46 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var $parent = parent && $(parent) if (!data || !data.transitioning) { - if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed') + if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') } - Plugin.call($target, option) + $target.collapse(option) }) -}(jQuery); +}(window.jQuery); /* ======================================================================== - * Bootstrap: dropdown.js v3.2.0 - * http://getbootstrap.com/javascript/#dropdowns + * Bootstrap: dropdown.js v3.0.0 + * http://twbs.github.com/bootstrap/javascript.html#dropdowns * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Copyright 2012 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. * ======================================================================== */ -+function ($) { - 'use strict'; ++function ($) { "use strict"; // DROPDOWN CLASS DEFINITION // ========================= var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle="dropdown"]' + var toggle = '[data-toggle=dropdown]' var Dropdown = function (element) { - $(element).on('click.bs.dropdown', this.toggle) + var $el = $(element).on('click.bs.dropdown', this.toggle) } - Dropdown.VERSION = '3.2.0' - Dropdown.prototype.toggle = function (e) { var $this = $(this) @@ -2106,20 +2113,19 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (!isActive) { if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we use a backdrop because click events don't delegate + // if mobile we we use a backdrop because click events don't delegate $('