diff --git a/app/assets/images/google-message-background.jpg b/app/assets/images/google-message-background.jpg deleted file mode 100755 index efb11ce..0000000 Binary files a/app/assets/images/google-message-background.jpg and /dev/null differ diff --git a/app/assets/images/sign-in-with-google.png b/app/assets/images/sign-in-with-google.png index 52045b6..b20d378 100644 Binary files a/app/assets/images/sign-in-with-google.png and b/app/assets/images/sign-in-with-google.png differ diff --git a/app/assets/stylesheets/lib/orbit_bar/orbit-bar.scss.erb b/app/assets/stylesheets/lib/orbit_bar/orbit-bar.scss.erb index d3c4639..a7187c0 100644 --- a/app/assets/stylesheets/lib/orbit_bar/orbit-bar.scss.erb +++ b/app/assets/stylesheets/lib/orbit_bar/orbit-bar.scss.erb @@ -16,6 +16,20 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default; } } +.login-btn { + display: inline-block; + padding: 6px 18px; + margin-bottom: 0; + font-size: 14px; + line-height: 20px; + color: #fff; + outline: none; + text-align: center; + vertical-align: middle; + cursor: pointer; + border-radius: 4px; +} + .orbitMenuLink { cursor: pointer; width: 50px; @@ -76,6 +90,7 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default; &:checked { &~.cover { display: block; + margin-bottom: 0; } &~.login-window { display: block; @@ -95,29 +110,25 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default; .login-window { display: none; position: absolute; - top: 3em; + top: 5em; left: 50%; - width: 500px; + width: 400px; z-index: 10; background-color: #fff; - margin-left: -250px; + margin-left: -200px; border-radius: 5px; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5); .login-header { - padding: 10px 15px; - border-bottom: 1px solid lighten($orbit-bar-bgc, 60%); + padding: 20px 40px 0 40px; .close { float: right; font-size: 20px; font-weight: bold; line-height: 20px; cursor: pointer; - color: lighten($orbit-bar-bgc, 60%); - &:hover { - color: lighten($orbit-bar-bgc, 40%); - } } h3 { + font-family: Chivo, "微軟正黑體", "Helvetica Neue", Helvetica, sans-serif; color: $orbit-bar-bgc-lighter; margin: 0; } @@ -131,68 +142,78 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default; } .prepend { margin-bottom: 15px; + text-align: left; .add { color: #8D8D8D; border-radius: 4px 0 0 4px; margin-right: -5px; display: inline-block; - width: auto; - height: 20px; - min-width: 16px; - padding: 4px 5px; - font-size: 14px; - font-weight: normal; - line-height: 20px; - text-align: center; - text-shadow: 0 1px 0 #ffffff; - background-color: #eeeeee; + padding: 8px 5px; + font-size: 13px; + text-shadow: 0 1px 0 #fff; + background-color: #eee; border: 1px solid #ccc; - white-space: nowrap; + vertical-align: top; + height: auto; } .input { - display: inline-block; - position: relative; - width: 270px; - height: 20px; - vertical-align: top; + font-size: 13px; + padding: 8px 6px; + width: 260px; border-radius: 0 4px 4px 0; - background-color: #ffffff; - border: 1px solid #cccccc; - box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); - margin-left: 0; - padding: 4px 6px; - font-size: 14px; - line-height: 20px; - color: #555555; - white-space: nowrap; + height: auto; + border: 1px solid #ccc; } } + .login-submit-wrap { + overflow: hidden; + margin-bottom: 10px; + } .submit { + float: left; + margin-right: 10px; button { - display: inline-block; - padding: 4px 12px; - margin-bottom: 0; - font-size: 14px; - line-height: 20px; - color: #FFF; - outline: none; - text-align: center; - vertical-align: middle; - cursor: pointer; background-color: #006dcc; border: 1px solid #bbbbbb; border-color: #e6e6e6 #e6e6e6 #bfbfbf; border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); - border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05); &:hover { - background-color: #0044cc; + background-color: #0044cc; } &:active { box-shadow: inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05); } } } + .google-login { + float: left; + a { + position: relative; + padding-left: 36px; + background-color: #df4a32; + border: 1px solid #bbbbbb; + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); + box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05); + &:hover { + color: #fff; + background-color: #d92b0e; + } + } + .fa-google-plus { + position: absolute; + left: 10px; + top: 9px; + font-size: 18px; + } + } + .login-sign-up-btn { + clear: both; + text-align: left; + font-size: 13px; + font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; + } } } .orbit-bar-inner { diff --git a/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.eot b/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.eot deleted file mode 100644 index 4a4ca86..0000000 Binary files a/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.eot and /dev/null differ diff --git a/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.svg b/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.svg deleted file mode 100644 index e3e2dc7..0000000 --- a/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf b/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf deleted file mode 100644 index 67fa00b..0000000 Binary files a/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf and /dev/null differ diff --git a/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.woff b/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.woff deleted file mode 100644 index 8c54182..0000000 Binary files a/app/templates/orbit_bootstrap/assets/fonts/bootstrap/glyphicons-halflings-regular.woff and /dev/null differ diff --git a/app/templates/orbit_bootstrap/assets/images/announcement-default.jpg b/app/templates/orbit_bootstrap/assets/images/announcement-default.jpg new file mode 100644 index 0000000..3307828 Binary files /dev/null and b/app/templates/orbit_bootstrap/assets/images/announcement-default.jpg differ diff --git a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap.js b/app/templates/orbit_bootstrap/assets/javascripts/bootstrap.js deleted file mode 100644 index 592bb0f..0000000 --- a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap.js +++ /dev/null @@ -1,12 +0,0 @@ -//= require bootstrap/affix -//= require bootstrap/alert -//= require bootstrap/button -//= require bootstrap/carousel -//= require bootstrap/collapse -//= require bootstrap/dropdown -//= require bootstrap/tab -//= require bootstrap/transition -//= require bootstrap/scrollspy -//= require bootstrap/modal -//= require bootstrap/tooltip -//= require bootstrap/popover diff --git a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/affix.js b/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/affix.js deleted file mode 100644 index 05c909e..0000000 --- a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/affix.js +++ /dev/null @@ -1,137 +0,0 @@ -/* ======================================================================== - * Bootstrap: affix.js v3.1.1 - * http://getbootstrap.com/javascript/#affix - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // AFFIX CLASS DEFINITION - // ====================== - - var Affix = function (element, options) { - this.options = $.extend({}, Affix.DEFAULTS, options) - this.$window = $(window) - .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 = - this.pinnedOffset = null - - this.checkPosition() - } - - Affix.RESET = 'affix affix-top affix-bottom' - - Affix.DEFAULTS = { - 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) - } - - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return - - var scrollHeight = $(document).height() - var scrollTop = this.$window.scrollTop() - var position = this.$element.offset() - var offset = this.options.offset - 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(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' : - offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false - - 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' ? this.getPinnedOffset() : null - - this.$element - .removeClass(Affix.RESET) - .addClass(affixType) - .trigger($.Event(affixType.replace('affix', 'affixed'))) - - if (affix == 'bottom') { - this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() }) - } - } - - - // AFFIX PLUGIN DEFINITION - // ======================= - - var old = $.fn.affix - - $.fn.affix = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.affix') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.affix.Constructor = Affix - - - // AFFIX NO CONFLICT - // ================= - - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - - - // AFFIX DATA-API - // ============== - - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - var data = $spy.data() - - data.offset = data.offset || {} - - if (data.offsetBottom) data.offset.bottom = data.offsetBottom - if (data.offsetTop) data.offset.top = data.offsetTop - - $spy.affix(data) - }) - }) - -}(jQuery); diff --git a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/alert.js b/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/alert.js deleted file mode 100644 index 516fe4f..0000000 --- a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/alert.js +++ /dev/null @@ -1,88 +0,0 @@ -/* ======================================================================== - * Bootstrap: alert.js v3.1.1 - * http://getbootstrap.com/javascript/#alerts - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // ALERT CLASS DEFINITION - // ====================== - - var dismiss = '[data-dismiss="alert"]' - var Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype.close = function (e) { - var $this = $(this) - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = $(selector) - - if (e) e.preventDefault() - - if (!$parent.length) { - $parent = $this.hasClass('alert') ? $this : $this.parent() - } - - $parent.trigger(e = $.Event('close.bs.alert')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - $parent.trigger('closed.bs.alert').remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one($.support.transition.end, removeElement) - .emulateTransitionEnd(150) : - removeElement() - } - - - // ALERT PLUGIN DEFINITION - // ======================= - - var old = $.fn.alert - - $.fn.alert = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.alert') - - if (!data) $this.data('bs.alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.alert.Constructor = Alert - - - // ALERT NO CONFLICT - // ================= - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - // ALERT DATA-API - // ============== - - $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) - -}(jQuery); diff --git a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/button.js b/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/button.js deleted file mode 100644 index f4d8d8b..0000000 --- a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/button.js +++ /dev/null @@ -1,107 +0,0 @@ -/* ======================================================================== - * Bootstrap: button.js v3.1.1 - * http://getbootstrap.com/javascript/#buttons - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - this.isLoading = false - } - - Button.DEFAULTS = { - loadingText: 'loading...' - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() - - state = state + 'Text' - - if (!data.resetText) $el.data('resetText', $el[val]()) - - $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) - } - - 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') - } - - if (changed) this.$element.toggleClass('active') - } - - - // BUTTON PLUGIN DEFINITION - // ======================== - - var old = $.fn.button - - $.fn.button = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.button') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.button', (data = new Button(this, options))) - - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - $.fn.button.Constructor = Button - - - // BUTTON NO CONFLICT - // ================== - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - // BUTTON DATA-API - // =============== - - $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - e.preventDefault() - }) - -}(jQuery); diff --git a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/carousel.js b/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/carousel.js deleted file mode 100644 index 19e9af1..0000000 --- a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/carousel.js +++ /dev/null @@ -1,205 +0,0 @@ -/* ======================================================================== - * Bootstrap: carousel.js v3.1.1 - * http://getbootstrap.com/javascript/#carousel - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CAROUSEL CLASS DEFINITION - // ========================= - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.paused = - this.sliding = - this.interval = - this.$active = - this.$items = null - - this.options.pause == 'hover' && this.$element - .on('mouseenter', $.proxy(this.pause, this)) - .on('mouseleave', $.proxy(this.cycle, this)) - } - - Carousel.DEFAULTS = { - interval: 5000, - pause: 'hover', - wrap: true - } - - Carousel.prototype.cycle = function (e) { - e || (this.paused = false) - - this.interval && clearInterval(this.interval) - - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - - return this - } - - 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.getActiveIndex() - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) - if (activeIndex == pos) return this.pause().cycle() - - return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) - } - - Carousel.prototype.pause = function (e) { - e || (this.paused = true) - - if (this.$element.find('.next, .prev').length && $.support.transition) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - - this.interval = clearInterval(this.interval) - - return this - } - - Carousel.prototype.next = function () { - if (this.sliding) return - return this.slide('next') - } - - Carousel.prototype.prev = function () { - if (this.sliding) return - return this.slide('prev') - } - - Carousel.prototype.slide = function (type, next) { - var $active = this.$element.find('.item.active') - var $next = next || $active[type]() - var isCycling = this.interval - var direction = type == 'next' ? 'left' : 'right' - var fallback = type == 'next' ? 'first' : 'last' - var that = this - - if (!$next.length) { - if (!this.options.wrap) return - $next = this.$element.find('.item')[fallback]() - } - - 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 - - this.sliding = true - - isCycling && this.pause() - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - this.$element.one('slid.bs.carousel', function () { - var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) - $nextIndicator && $nextIndicator.addClass('active') - }) - } - - if ($.support.transition && this.$element.hasClass('slide')) { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - $active - .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('slid.bs.carousel') }, 0) - }) - .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) - } else { - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger('slid.bs.carousel') - } - - isCycling && this.cycle() - - return this - } - - - // CAROUSEL PLUGIN DEFINITION - // ========================== - - var old = $.fn.carousel - - $.fn.carousel = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.carousel') - var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) - var action = typeof option == 'string' ? option : options.slide - - if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - $.fn.carousel.Constructor = Carousel - - - // CAROUSEL NO CONFLICT - // ==================== - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - - // CAROUSEL DATA-API - // ================= - - $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { - 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 - - $target.carousel(options) - - if (slideIndex = $this.attr('data-slide-to')) { - $target.data('bs.carousel').to(slideIndex) - } - - e.preventDefault() - }) - - $(window).on('load', function () { - $('[data-ride="carousel"]').each(function () { - var $carousel = $(this) - $carousel.carousel($carousel.data()) - }) - }) - -}(jQuery); diff --git a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/collapse.js b/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/collapse.js deleted file mode 100644 index 7130282..0000000 --- a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/collapse.js +++ /dev/null @@ -1,170 +0,0 @@ -/* ======================================================================== - * Bootstrap: collapse.js v3.1.1 - * http://getbootstrap.com/javascript/#collapse - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // COLLAPSE PUBLIC CLASS DEFINITION - // ================================ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Collapse.DEFAULTS, options) - this.transitioning = null - - if (this.options.parent) this.$parent = $(this.options.parent) - if (this.options.toggle) this.toggle() - } - - Collapse.DEFAULTS = { - toggle: true - } - - Collapse.prototype.dimension = function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - Collapse.prototype.show = function () { - if (this.transitioning || this.$element.hasClass('in')) return - - var startEvent = $.Event('show.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var actives = this.$parent && this.$parent.find('> .panel > .in') - - if (actives && actives.length) { - var hasData = actives.data('bs.collapse') - if (hasData && hasData.transitioning) return - actives.collapse('hide') - hasData || actives.data('bs.collapse', null) - } - - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - .addClass('collapsing') - [dimension](0) - - this.transitioning = 1 - - var complete = function () { - this.$element - .removeClass('collapsing') - .addClass('collapse in') - [dimension]('auto') - this.transitioning = 0 - this.$element.trigger('shown.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - var scrollSize = $.camelCase(['scroll', dimension].join('-')) - - this.$element - .one($.support.transition.end, $.proxy(complete, this)) - .emulateTransitionEnd(350) - [dimension](this.$element[0][scrollSize]) - } - - Collapse.prototype.hide = function () { - if (this.transitioning || !this.$element.hasClass('in')) return - - var startEvent = $.Event('hide.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var dimension = this.dimension() - - this.$element - [dimension](this.$element[dimension]()) - [0].offsetHeight - - this.$element - .addClass('collapsing') - .removeClass('collapse') - .removeClass('in') - - this.transitioning = 1 - - var complete = function () { - this.transitioning = 0 - this.$element - .trigger('hidden.bs.collapse') - .removeClass('collapsing') - .addClass('collapse') - } - - if (!$.support.transition) return complete.call(this) - - this.$element - [dimension](0) - .one($.support.transition.end, $.proxy(complete, this)) - .emulateTransitionEnd(350) - } - - Collapse.prototype.toggle = function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - - // COLLAPSE PLUGIN DEFINITION - // ========================== - - 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]() - }) - } - - $.fn.collapse.Constructor = Collapse - - - // COLLAPSE NO CONFLICT - // ==================== - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - // COLLAPSE DATA-API - // ================= - - $(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 - var $target = $(target) - var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $this.data() - var parent = $this.attr('data-parent') - var $parent = parent && $(parent) - - if (!data || !data.transitioning) { - if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') - $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - } - - $target.collapse(option) - }) - -}(jQuery); diff --git a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/dropdown.js b/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/dropdown.js deleted file mode 100644 index 43d7ae3..0000000 --- a/app/templates/orbit_bootstrap/assets/javascripts/bootstrap/dropdown.js +++ /dev/null @@ -1,147 +0,0 @@ -/* ======================================================================== - * Bootstrap: dropdown.js v3.1.1 - * http://getbootstrap.com/javascript/#dropdowns - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // DROPDOWN CLASS DEFINITION - // ========================= - - var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle=dropdown]' - var Dropdown = function (element) { - $(element).on('click.bs.dropdown', this.toggle) - } - - Dropdown.prototype.toggle = function (e) { - var $this = $(this) - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we use a backdrop because click events don't delegate - $('