Remove all frameworks except Bootstrap (#251)
- Remove all frameworks except Bootstrap - Remove roots-options.php and replace with a more simple roots-config.php - Include all Bootstrap Javascript plugins by default in js/plugins.js - Use Bootstrap Responsive and Topbar navigation by default - Use Bootstrap markup on forms, page titles, image galleries, alerts and errors, post and comment navigation - Remove Roots styles from style.css and introduce app.css for site-specific CSS. Remove almost all previous default Roots styles. - Add latest updates from H5BP project
This commit is contained in:
91
js/bootstrap/bootstrap-alert.js
vendored
91
js/bootstrap/bootstrap-alert.js
vendored
@@ -1,91 +0,0 @@
|
||||
/* ==========================================================
|
||||
* bootstrap-alert.js v2.0.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
||||
* ==========================================================
|
||||
* 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"
|
||||
|
||||
/* ALERT CLASS DEFINITION
|
||||
* ====================== */
|
||||
|
||||
var dismiss = '[data-dismiss="alert"]'
|
||||
, Alert = function ( el ) {
|
||||
$(el).on('click', dismiss, this.close)
|
||||
}
|
||||
|
||||
Alert.prototype = {
|
||||
|
||||
constructor: Alert
|
||||
|
||||
, close: function ( e ) {
|
||||
var $this = $(this)
|
||||
, selector = $this.attr('data-target')
|
||||
, $parent
|
||||
|
||||
if (!selector) {
|
||||
selector = $this.attr('href')
|
||||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
||||
}
|
||||
|
||||
$parent = $(selector)
|
||||
$parent.trigger('close')
|
||||
|
||||
e && e.preventDefault()
|
||||
|
||||
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
|
||||
|
||||
$parent.removeClass('in')
|
||||
|
||||
function removeElement() {
|
||||
$parent.remove()
|
||||
$parent.trigger('closed')
|
||||
}
|
||||
|
||||
$.support.transition && $parent.hasClass('fade') ?
|
||||
$parent.on($.support.transition.end, removeElement) :
|
||||
removeElement()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* ALERT PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
$.fn.alert = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('alert')
|
||||
if (!data) $this.data('alert', (data = new Alert(this)))
|
||||
if (typeof option == 'string') data[option].call($this)
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.alert.Constructor = Alert
|
||||
|
||||
|
||||
/* ALERT DATA-API
|
||||
* ============== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
|
||||
})
|
||||
|
||||
}( window.jQuery )
|
||||
113
js/bootstrap/bootstrap-alerts.js
vendored
113
js/bootstrap/bootstrap-alerts.js
vendored
@@ -1,113 +0,0 @@
|
||||
/* ==========================================================
|
||||
* bootstrap-alerts.js v1.4.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
||||
* ==========================================================
|
||||
* Copyright 2011 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"
|
||||
|
||||
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
||||
* ======================================================= */
|
||||
|
||||
var transitionEnd
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$.support.transition = (function () {
|
||||
var thisBody = document.body || document.documentElement
|
||||
, thisStyle = thisBody.style
|
||||
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
|
||||
return support
|
||||
})()
|
||||
|
||||
// set CSS transition event type
|
||||
if ( $.support.transition ) {
|
||||
transitionEnd = "TransitionEnd"
|
||||
if ( $.browser.webkit ) {
|
||||
transitionEnd = "webkitTransitionEnd"
|
||||
} else if ( $.browser.mozilla ) {
|
||||
transitionEnd = "transitionend"
|
||||
} else if ( $.browser.opera ) {
|
||||
transitionEnd = "oTransitionEnd"
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
/* ALERT CLASS DEFINITION
|
||||
* ====================== */
|
||||
|
||||
var Alert = function ( content, options ) {
|
||||
this.settings = $.extend({}, $.fn.alert.defaults, options)
|
||||
this.$element = $(content)
|
||||
.delegate(this.settings.selector, 'click', this.close)
|
||||
}
|
||||
|
||||
Alert.prototype = {
|
||||
|
||||
close: function (e) {
|
||||
var $element = $(this).parent('.alert-message')
|
||||
|
||||
e && e.preventDefault()
|
||||
$element.removeClass('in')
|
||||
|
||||
function removeElement () {
|
||||
$element.remove()
|
||||
}
|
||||
|
||||
$.support.transition && $element.hasClass('fade') ?
|
||||
$element.bind(transitionEnd, removeElement) :
|
||||
removeElement()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* ALERT PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
$.fn.alert = function ( options ) {
|
||||
|
||||
if ( options === true ) {
|
||||
return this.data('alert')
|
||||
}
|
||||
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
||||
if ( typeof options == 'string' ) {
|
||||
return $this.data('alert')[options]()
|
||||
}
|
||||
|
||||
$(this).data('alert', new Alert( this, options ))
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.alert.defaults = {
|
||||
selector: '.close'
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
new Alert($('body'), {
|
||||
selector: '.alert-message[data-alert] .close'
|
||||
})
|
||||
})
|
||||
|
||||
}( window.jQuery || window.ender );
|
||||
98
js/bootstrap/bootstrap-button.js
vendored
98
js/bootstrap/bootstrap-button.js
vendored
@@ -1,98 +0,0 @@
|
||||
/* ============================================================
|
||||
* bootstrap-button.js v2.0.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
||||
* ============================================================
|
||||
* 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"
|
||||
|
||||
/* BUTTON PUBLIC CLASS DEFINITION
|
||||
* ============================== */
|
||||
|
||||
var Button = function ( element, options ) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, $.fn.button.defaults, options)
|
||||
}
|
||||
|
||||
Button.prototype = {
|
||||
|
||||
constructor: Button
|
||||
|
||||
, setState: function ( state ) {
|
||||
var d = 'disabled'
|
||||
, $el = this.$element
|
||||
, data = $el.data()
|
||||
, val = $el.is('input') ? 'val' : 'html'
|
||||
|
||||
state = state + 'Text'
|
||||
data.resetText || $el.data('resetText', $el[val]())
|
||||
|
||||
$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)
|
||||
}
|
||||
|
||||
, toggle: function () {
|
||||
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
|
||||
|
||||
$parent && $parent
|
||||
.find('.active')
|
||||
.removeClass('active')
|
||||
|
||||
this.$element.toggleClass('active')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* BUTTON PLUGIN DEFINITION
|
||||
* ======================== */
|
||||
|
||||
$.fn.button = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('button')
|
||||
, options = typeof option == 'object' && option
|
||||
if (!data) $this.data('button', (data = new Button(this, options)))
|
||||
if (option == 'toggle') data.toggle()
|
||||
else if (option) data.setState(option)
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.button.defaults = {
|
||||
loadingText: 'loading...'
|
||||
}
|
||||
|
||||
$.fn.button.Constructor = Button
|
||||
|
||||
|
||||
/* BUTTON DATA-API
|
||||
* =============== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
||||
$(e.target).button('toggle')
|
||||
})
|
||||
})
|
||||
|
||||
}( window.jQuery )
|
||||
62
js/bootstrap/bootstrap-buttons.js
vendored
62
js/bootstrap/bootstrap-buttons.js
vendored
@@ -1,62 +0,0 @@
|
||||
/* ============================================================
|
||||
* bootstrap-buttons.js v1.4.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
||||
* ============================================================
|
||||
* Copyright 2011 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 setState(el, state) {
|
||||
var d = 'disabled'
|
||||
, $el = $(el)
|
||||
, data = $el.data()
|
||||
|
||||
state = state + 'Text'
|
||||
data.resetText || $el.data('resetText', $el.html())
|
||||
|
||||
$el.html( data[state] || $.fn.button.defaults[state] )
|
||||
|
||||
state == 'loadingText' ?
|
||||
$el.addClass(d).attr(d, d) :
|
||||
$el.removeClass(d).removeAttr(d)
|
||||
}
|
||||
|
||||
function toggle(el) {
|
||||
$(el).toggleClass('active')
|
||||
}
|
||||
|
||||
$.fn.button = function(options) {
|
||||
return this.each(function () {
|
||||
if (options == 'toggle') {
|
||||
return toggle(this)
|
||||
}
|
||||
options && setState(this, options)
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.button.defaults = {
|
||||
loadingText: 'loading...'
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('body').delegate('.btn[data-toggle]', 'click', function () {
|
||||
$(this).button('toggle')
|
||||
})
|
||||
})
|
||||
|
||||
}( window.jQuery || window.ender );
|
||||
154
js/bootstrap/bootstrap-carousel.js
vendored
154
js/bootstrap/bootstrap-carousel.js
vendored
@@ -1,154 +0,0 @@
|
||||
/* ==========================================================
|
||||
* bootstrap-carousel.js v2.0.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
||||
* ==========================================================
|
||||
* 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"
|
||||
|
||||
/* CAROUSEL CLASS DEFINITION
|
||||
* ========================= */
|
||||
|
||||
var Carousel = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, $.fn.carousel.defaults, options)
|
||||
this.options.slide && this.slide(this.options.slide)
|
||||
}
|
||||
|
||||
Carousel.prototype = {
|
||||
|
||||
cycle: function () {
|
||||
this.interval = setInterval($.proxy(this.next, this), this.options.interval)
|
||||
return this
|
||||
}
|
||||
|
||||
, to: function (pos) {
|
||||
var $active = this.$element.find('.active')
|
||||
, children = $active.parent().children()
|
||||
, activePos = children.index($active)
|
||||
, that = this
|
||||
|
||||
if (pos > (children.length - 1) || pos < 0) return
|
||||
|
||||
if (this.sliding) {
|
||||
return this.$element.one('slid', function () {
|
||||
that.to(pos)
|
||||
})
|
||||
}
|
||||
|
||||
if (activePos == pos) {
|
||||
return this.pause().cycle()
|
||||
}
|
||||
|
||||
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
|
||||
}
|
||||
|
||||
, pause: function () {
|
||||
clearInterval(this.interval)
|
||||
return this
|
||||
}
|
||||
|
||||
, next: function () {
|
||||
if (this.sliding) return
|
||||
return this.slide('next')
|
||||
}
|
||||
|
||||
, prev: function () {
|
||||
if (this.sliding) return
|
||||
return this.slide('prev')
|
||||
}
|
||||
|
||||
, slide: function (type, next) {
|
||||
var $active = this.$element.find('.active')
|
||||
, $next = next || $active[type]()
|
||||
, isCycling = this.interval
|
||||
, direction = type == 'next' ? 'left' : 'right'
|
||||
, fallback = type == 'next' ? 'first' : 'last'
|
||||
, that = this
|
||||
|
||||
this.sliding = true
|
||||
|
||||
isCycling && this.pause()
|
||||
|
||||
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
||||
|
||||
if (!$.support.transition && this.$element.hasClass('slide')) {
|
||||
this.$element.trigger('slide')
|
||||
$active.removeClass('active')
|
||||
$next.addClass('active')
|
||||
this.sliding = false
|
||||
this.$element.trigger('slid')
|
||||
} else {
|
||||
$next.addClass(type)
|
||||
$next[0].offsetWidth // force reflow
|
||||
$active.addClass(direction)
|
||||
$next.addClass(direction)
|
||||
this.$element.trigger('slide')
|
||||
this.$element.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') }, 0)
|
||||
})
|
||||
}
|
||||
|
||||
isCycling && this.cycle()
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* CAROUSEL PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
$.fn.carousel = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('carousel')
|
||||
, options = typeof option == 'object' && option
|
||||
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
||||
if (typeof option == 'number') data.to(option)
|
||||
else if (typeof option == 'string' || (option = options.slide)) data[option]()
|
||||
else data.cycle()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.carousel.defaults = {
|
||||
interval: 5000
|
||||
}
|
||||
|
||||
$.fn.carousel.Constructor = Carousel
|
||||
|
||||
|
||||
/* CAROUSEL DATA-API
|
||||
* ================= */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
|
||||
var $this = $(this), href
|
||||
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
||||
, options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
|
||||
$target.carousel(options)
|
||||
e.preventDefault()
|
||||
})
|
||||
})
|
||||
|
||||
}( window.jQuery )
|
||||
136
js/bootstrap/bootstrap-collapse.js
vendored
136
js/bootstrap/bootstrap-collapse.js
vendored
@@ -1,136 +0,0 @@
|
||||
/* =============================================================
|
||||
* bootstrap-collapse.js v2.0.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
||||
* =============================================================
|
||||
* 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"
|
||||
|
||||
var Collapse = function ( element, options ) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, $.fn.collapse.defaults, options)
|
||||
|
||||
if (this.options["parent"]) {
|
||||
this.$parent = $(this.options["parent"])
|
||||
}
|
||||
|
||||
this.options.toggle && this.toggle()
|
||||
}
|
||||
|
||||
Collapse.prototype = {
|
||||
|
||||
constructor: Collapse
|
||||
|
||||
, dimension: function () {
|
||||
var hasWidth = this.$element.hasClass('width')
|
||||
return hasWidth ? 'width' : 'height'
|
||||
}
|
||||
|
||||
, show: function () {
|
||||
var dimension = this.dimension()
|
||||
, scroll = $.camelCase(['scroll', dimension].join('-'))
|
||||
, actives = this.$parent && this.$parent.find('.in')
|
||||
, hasData
|
||||
|
||||
if (actives && actives.length) {
|
||||
hasData = actives.data('collapse')
|
||||
actives.collapse('hide')
|
||||
hasData || actives.data('collapse', null)
|
||||
}
|
||||
|
||||
this.$element[dimension](0)
|
||||
this.transition('addClass', 'show', 'shown')
|
||||
this.$element[dimension](this.$element[0][scroll])
|
||||
|
||||
}
|
||||
|
||||
, hide: function () {
|
||||
var dimension = this.dimension()
|
||||
this.reset(this.$element[dimension]())
|
||||
this.transition('removeClass', 'hide', 'hidden')
|
||||
this.$element[dimension](0)
|
||||
}
|
||||
|
||||
, reset: function ( size ) {
|
||||
var dimension = this.dimension()
|
||||
|
||||
this.$element
|
||||
.removeClass('collapse')
|
||||
[dimension](size || 'auto')
|
||||
[0].offsetWidth
|
||||
|
||||
this.$element.addClass('collapse')
|
||||
}
|
||||
|
||||
, transition: function ( method, startEvent, completeEvent ) {
|
||||
var that = this
|
||||
, complete = function () {
|
||||
if (startEvent == 'show') that.reset()
|
||||
that.$element.trigger(completeEvent)
|
||||
}
|
||||
|
||||
this.$element
|
||||
.trigger(startEvent)
|
||||
[method]('in')
|
||||
|
||||
$.support.transition && this.$element.hasClass('collapse') ?
|
||||
this.$element.one($.support.transition.end, complete) :
|
||||
complete()
|
||||
}
|
||||
|
||||
, toggle: function () {
|
||||
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* COLLAPSIBLE PLUGIN DEFINITION
|
||||
* ============================== */
|
||||
|
||||
$.fn.collapse = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('collapse')
|
||||
, options = typeof option == 'object' && option
|
||||
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.collapse.defaults = {
|
||||
toggle: true
|
||||
}
|
||||
|
||||
$.fn.collapse.Constructor = Collapse
|
||||
|
||||
|
||||
/* COLLAPSIBLE DATA-API
|
||||
* ==================== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
|
||||
var $this = $(this), href
|
||||
, target = $this.attr('data-target')
|
||||
|| e.preventDefault()
|
||||
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
||||
, option = $(target).data('collapse') ? 'toggle' : $this.data()
|
||||
$(target).collapse(option)
|
||||
})
|
||||
})
|
||||
|
||||
}( window.jQuery )
|
||||
55
js/bootstrap/bootstrap-dropdown.js
vendored
55
js/bootstrap/bootstrap-dropdown.js
vendored
@@ -1,55 +0,0 @@
|
||||
/* ============================================================
|
||||
* bootstrap-dropdown.js v1.4.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#dropdown
|
||||
* ============================================================
|
||||
* Copyright 2011 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"
|
||||
|
||||
/* DROPDOWN PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
$.fn.dropdown = function ( selector ) {
|
||||
return this.each(function () {
|
||||
$(this).delegate(selector || d, 'click', function (e) {
|
||||
var li = $(this).parent('li')
|
||||
, isActive = li.hasClass('open')
|
||||
|
||||
clearMenus()
|
||||
!isActive && li.toggleClass('open')
|
||||
return false
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
||||
* =================================== */
|
||||
|
||||
var d = 'a.menu, .dropdown-toggle'
|
||||
|
||||
function clearMenus() {
|
||||
$(d).parent('li').removeClass('open')
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('html').bind("click", clearMenus)
|
||||
$('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' )
|
||||
})
|
||||
|
||||
}( window.jQuery || window.ender );
|
||||
260
js/bootstrap/bootstrap-modal.js
vendored
260
js/bootstrap/bootstrap-modal.js
vendored
@@ -1,260 +0,0 @@
|
||||
/* =========================================================
|
||||
* bootstrap-modal.js v1.4.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#modal
|
||||
* =========================================================
|
||||
* Copyright 2011 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"
|
||||
|
||||
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
||||
* ======================================================= */
|
||||
|
||||
var transitionEnd
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$.support.transition = (function () {
|
||||
var thisBody = document.body || document.documentElement
|
||||
, thisStyle = thisBody.style
|
||||
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
|
||||
return support
|
||||
})()
|
||||
|
||||
// set CSS transition event type
|
||||
if ( $.support.transition ) {
|
||||
transitionEnd = "TransitionEnd"
|
||||
if ( $.browser.webkit ) {
|
||||
transitionEnd = "webkitTransitionEnd"
|
||||
} else if ( $.browser.mozilla ) {
|
||||
transitionEnd = "transitionend"
|
||||
} else if ( $.browser.opera ) {
|
||||
transitionEnd = "oTransitionEnd"
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
/* MODAL PUBLIC CLASS DEFINITION
|
||||
* ============================= */
|
||||
|
||||
var Modal = function ( content, options ) {
|
||||
this.settings = $.extend({}, $.fn.modal.defaults, options)
|
||||
this.$element = $(content)
|
||||
.delegate('.close', 'click.modal', $.proxy(this.hide, this))
|
||||
|
||||
if ( this.settings.show ) {
|
||||
this.show()
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
Modal.prototype = {
|
||||
|
||||
toggle: function () {
|
||||
return this[!this.isShown ? 'show' : 'hide']()
|
||||
}
|
||||
|
||||
, show: function () {
|
||||
var that = this
|
||||
this.isShown = true
|
||||
this.$element.trigger('show')
|
||||
|
||||
escape.call(this)
|
||||
backdrop.call(this, function () {
|
||||
var transition = $.support.transition && that.$element.hasClass('fade')
|
||||
|
||||
that.$element
|
||||
.appendTo(document.body)
|
||||
.show()
|
||||
|
||||
if (transition) {
|
||||
that.$element[0].offsetWidth // force reflow
|
||||
}
|
||||
|
||||
that.$element.addClass('in')
|
||||
|
||||
transition ?
|
||||
that.$element.one(transitionEnd, function () { that.$element.trigger('shown') }) :
|
||||
that.$element.trigger('shown')
|
||||
|
||||
})
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
, hide: function (e) {
|
||||
e && e.preventDefault()
|
||||
|
||||
if ( !this.isShown ) {
|
||||
return this
|
||||
}
|
||||
|
||||
var that = this
|
||||
this.isShown = false
|
||||
|
||||
escape.call(this)
|
||||
|
||||
this.$element
|
||||
.trigger('hide')
|
||||
.removeClass('in')
|
||||
|
||||
$.support.transition && this.$element.hasClass('fade') ?
|
||||
hideWithTransition.call(this) :
|
||||
hideModal.call(this)
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* MODAL PRIVATE METHODS
|
||||
* ===================== */
|
||||
|
||||
function hideWithTransition() {
|
||||
// firefox drops transitionEnd events :{o
|
||||
var that = this
|
||||
, timeout = setTimeout(function () {
|
||||
that.$element.unbind(transitionEnd)
|
||||
hideModal.call(that)
|
||||
}, 500)
|
||||
|
||||
this.$element.one(transitionEnd, function () {
|
||||
clearTimeout(timeout)
|
||||
hideModal.call(that)
|
||||
})
|
||||
}
|
||||
|
||||
function hideModal (that) {
|
||||
this.$element
|
||||
.hide()
|
||||
.trigger('hidden')
|
||||
|
||||
backdrop.call(this)
|
||||
}
|
||||
|
||||
function backdrop ( callback ) {
|
||||
var that = this
|
||||
, animate = this.$element.hasClass('fade') ? 'fade' : ''
|
||||
if ( this.isShown && this.settings.backdrop ) {
|
||||
var doAnimate = $.support.transition && animate
|
||||
|
||||
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
||||
.appendTo(document.body)
|
||||
|
||||
if ( this.settings.backdrop != 'static' ) {
|
||||
this.$backdrop.click($.proxy(this.hide, this))
|
||||
}
|
||||
|
||||
if ( doAnimate ) {
|
||||
this.$backdrop[0].offsetWidth // force reflow
|
||||
}
|
||||
|
||||
this.$backdrop.addClass('in')
|
||||
|
||||
doAnimate ?
|
||||
this.$backdrop.one(transitionEnd, callback) :
|
||||
callback()
|
||||
|
||||
} else if ( !this.isShown && this.$backdrop ) {
|
||||
this.$backdrop.removeClass('in')
|
||||
|
||||
$.support.transition && this.$element.hasClass('fade')?
|
||||
this.$backdrop.one(transitionEnd, $.proxy(removeBackdrop, this)) :
|
||||
removeBackdrop.call(this)
|
||||
|
||||
} else if ( callback ) {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
function removeBackdrop() {
|
||||
this.$backdrop.remove()
|
||||
this.$backdrop = null
|
||||
}
|
||||
|
||||
function escape() {
|
||||
var that = this
|
||||
if ( this.isShown && this.settings.keyboard ) {
|
||||
$(document).bind('keyup.modal', function ( e ) {
|
||||
if ( e.which == 27 ) {
|
||||
that.hide()
|
||||
}
|
||||
})
|
||||
} else if ( !this.isShown ) {
|
||||
$(document).unbind('keyup.modal')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* MODAL PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
$.fn.modal = function ( options ) {
|
||||
var modal = this.data('modal')
|
||||
|
||||
if (!modal) {
|
||||
|
||||
if (typeof options == 'string') {
|
||||
options = {
|
||||
show: /show|toggle/.test(options)
|
||||
}
|
||||
}
|
||||
|
||||
return this.each(function () {
|
||||
$(this).data('modal', new Modal(this, options))
|
||||
})
|
||||
}
|
||||
|
||||
if ( options === true ) {
|
||||
return modal
|
||||
}
|
||||
|
||||
if ( typeof options == 'string' ) {
|
||||
modal[options]()
|
||||
} else if ( modal ) {
|
||||
modal.toggle()
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
$.fn.modal.Modal = Modal
|
||||
|
||||
$.fn.modal.defaults = {
|
||||
backdrop: false
|
||||
, keyboard: false
|
||||
, show: false
|
||||
}
|
||||
|
||||
|
||||
/* MODAL DATA- IMPLEMENTATION
|
||||
* ========================== */
|
||||
|
||||
$(document).ready(function () {
|
||||
$('body').delegate('[data-controls-modal]', 'click', function (e) {
|
||||
e.preventDefault()
|
||||
var $this = $(this).data('show', true)
|
||||
$('#' + $this.attr('data-controls-modal')).modal( $this.data() )
|
||||
})
|
||||
})
|
||||
|
||||
}( window.jQuery || window.ender );
|
||||
92
js/bootstrap/bootstrap-popover.js
vendored
92
js/bootstrap/bootstrap-popover.js
vendored
@@ -1,92 +0,0 @@
|
||||
/* ===========================================================
|
||||
* bootstrap-popover.js v1.4.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#popover
|
||||
* ===========================================================
|
||||
* Copyright 2011 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"
|
||||
|
||||
var Popover = function ( element, options ) {
|
||||
this.$element = $(element)
|
||||
this.options = options
|
||||
this.enabled = true
|
||||
this.fixTitle()
|
||||
}
|
||||
|
||||
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TWIPSY.js
|
||||
========================================= */
|
||||
|
||||
Popover.prototype = $.extend({}, $.fn.twipsy.Twipsy.prototype, {
|
||||
|
||||
setContent: function () {
|
||||
var $tip = this.tip()
|
||||
$tip.find(this.options.titleSelector)[this.options.html ? 'html' : 'text'](this.getTitle())
|
||||
$tip.find(this.options.contentSelector)[this.options.html ? 'html' : 'text'](this.getContent())
|
||||
$tip[0].className = 'popover'
|
||||
}
|
||||
|
||||
, hasContent: function () {
|
||||
return this.getTitle() || this.getContent()
|
||||
}
|
||||
|
||||
, getContent: function () {
|
||||
var content
|
||||
, $e = this.$element
|
||||
, o = this.options
|
||||
|
||||
if (typeof this.options.content == 'string') {
|
||||
content = $e.attr(this.options.content)
|
||||
} else if (typeof this.options.content == 'function') {
|
||||
content = this.options.content.call(this.$element[0])
|
||||
}
|
||||
|
||||
return content
|
||||
}
|
||||
|
||||
, tip: function() {
|
||||
if (!this.$tip) {
|
||||
this.$tip = $('<div class="popover" />')
|
||||
.html(this.options.template)
|
||||
}
|
||||
return this.$tip
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
/* POPOVER PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
$.fn.popover = function (options) {
|
||||
if (typeof options == 'object') options = $.extend({}, $.fn.popover.defaults, options)
|
||||
$.fn.twipsy.initWith.call(this, options, Popover, 'popover')
|
||||
return this
|
||||
}
|
||||
|
||||
$.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, {
|
||||
placement: 'right'
|
||||
, content: 'data-content'
|
||||
, template: '<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>'
|
||||
, titleSelector: '.title'
|
||||
, contentSelector: '.content p'
|
||||
})
|
||||
|
||||
$.fn.twipsy.rejectAttrOptions.push( 'content' )
|
||||
|
||||
}( window.jQuery || window.ender );
|
||||
107
js/bootstrap/bootstrap-scrollspy.js
vendored
107
js/bootstrap/bootstrap-scrollspy.js
vendored
@@ -1,107 +0,0 @@
|
||||
/* =============================================================
|
||||
* bootstrap-scrollspy.js v1.4.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
||||
* =============================================================
|
||||
* Copyright 2011 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"
|
||||
|
||||
var $window = $(window)
|
||||
|
||||
function ScrollSpy( topbar, selector ) {
|
||||
var processScroll = $.proxy(this.processScroll, this)
|
||||
this.$topbar = $(topbar)
|
||||
this.selector = selector || 'li > a'
|
||||
this.refresh()
|
||||
this.$topbar.delegate(this.selector, 'click', processScroll)
|
||||
$window.scroll(processScroll)
|
||||
this.processScroll()
|
||||
}
|
||||
|
||||
ScrollSpy.prototype = {
|
||||
|
||||
refresh: function () {
|
||||
this.targets = this.$topbar.find(this.selector).map(function () {
|
||||
var href = $(this).attr('href')
|
||||
return /^#\w/.test(href) && $(href).length ? href : null
|
||||
})
|
||||
|
||||
this.offsets = $.map(this.targets, function (id) {
|
||||
return $(id).offset().top
|
||||
})
|
||||
}
|
||||
|
||||
, processScroll: function () {
|
||||
var scrollTop = $window.scrollTop() + 10
|
||||
, offsets = this.offsets
|
||||
, targets = this.targets
|
||||
, activeTarget = this.activeTarget
|
||||
, i
|
||||
|
||||
for (i = offsets.length; i--;) {
|
||||
activeTarget != targets[i]
|
||||
&& scrollTop >= offsets[i]
|
||||
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
||||
&& this.activateButton( targets[i] )
|
||||
}
|
||||
}
|
||||
|
||||
, activateButton: function (target) {
|
||||
this.activeTarget = target
|
||||
|
||||
this.$topbar
|
||||
.find(this.selector).parent('.active')
|
||||
.removeClass('active')
|
||||
|
||||
this.$topbar
|
||||
.find(this.selector + '[href="' + target + '"]')
|
||||
.parent('li')
|
||||
.addClass('active')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* SCROLLSPY PLUGIN DEFINITION
|
||||
* =========================== */
|
||||
|
||||
$.fn.scrollSpy = function( options ) {
|
||||
var scrollspy = this.data('scrollspy')
|
||||
|
||||
if (!scrollspy) {
|
||||
return this.each(function () {
|
||||
$(this).data('scrollspy', new ScrollSpy( this, options ))
|
||||
})
|
||||
}
|
||||
|
||||
if ( options === true ) {
|
||||
return scrollspy
|
||||
}
|
||||
|
||||
if ( typeof options == 'string' ) {
|
||||
scrollspy[options]()
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$('body').scrollSpy('[data-scrollspy] li > a')
|
||||
})
|
||||
|
||||
}( window.jQuery || window.ender );
|
||||
130
js/bootstrap/bootstrap-tab.js
vendored
130
js/bootstrap/bootstrap-tab.js
vendored
@@ -1,130 +0,0 @@
|
||||
/* ========================================================
|
||||
* bootstrap-tab.js v2.0.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
||||
* ========================================================
|
||||
* 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"
|
||||
|
||||
/* TAB CLASS DEFINITION
|
||||
* ==================== */
|
||||
|
||||
var Tab = function ( element ) {
|
||||
this.element = $(element)
|
||||
}
|
||||
|
||||
Tab.prototype = {
|
||||
|
||||
constructor: Tab
|
||||
|
||||
, show: function () {
|
||||
var $this = this.element
|
||||
, $ul = $this.closest('ul:not(.dropdown-menu)')
|
||||
, selector = $this.attr('data-target')
|
||||
, previous
|
||||
, $target
|
||||
|
||||
if (!selector) {
|
||||
selector = $this.attr('href')
|
||||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
||||
}
|
||||
|
||||
if ( $this.parent('li').hasClass('active') ) return
|
||||
|
||||
previous = $ul.find('.active a').last()[0]
|
||||
|
||||
$this.trigger({
|
||||
type: 'show'
|
||||
, relatedTarget: previous
|
||||
})
|
||||
|
||||
$target = $(selector)
|
||||
|
||||
this.activate($this.parent('li'), $ul)
|
||||
this.activate($target, $target.parent(), function () {
|
||||
$this.trigger({
|
||||
type: 'shown'
|
||||
, relatedTarget: previous
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
, activate: function ( element, container, callback) {
|
||||
var $active = container.find('> .active')
|
||||
, transition = callback
|
||||
&& $.support.transition
|
||||
&& $active.hasClass('fade')
|
||||
|
||||
function next() {
|
||||
$active
|
||||
.removeClass('active')
|
||||
.find('> .dropdown-menu > .active')
|
||||
.removeClass('active')
|
||||
|
||||
element.addClass('active')
|
||||
|
||||
if (transition) {
|
||||
element[0].offsetWidth // reflow for transition
|
||||
element.addClass('in')
|
||||
} else {
|
||||
element.removeClass('fade')
|
||||
}
|
||||
|
||||
if ( element.parent('.dropdown-menu') ) {
|
||||
element.closest('li.dropdown').addClass('active')
|
||||
}
|
||||
|
||||
callback && callback()
|
||||
}
|
||||
|
||||
transition ?
|
||||
$active.one($.support.transition.end, next) :
|
||||
next()
|
||||
|
||||
$active.removeClass('in')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* TAB PLUGIN DEFINITION
|
||||
* ===================== */
|
||||
|
||||
$.fn.tab = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('tab')
|
||||
if (!data) $this.data('tab', (data = new Tab(this)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.tab.Constructor = Tab
|
||||
|
||||
|
||||
/* TAB DATA-API
|
||||
* ============ */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
||||
e.preventDefault()
|
||||
$(this).tab('show')
|
||||
})
|
||||
})
|
||||
|
||||
}( window.jQuery )
|
||||
80
js/bootstrap/bootstrap-tabs.js
vendored
80
js/bootstrap/bootstrap-tabs.js
vendored
@@ -1,80 +0,0 @@
|
||||
/* ========================================================
|
||||
* bootstrap-tabs.js v1.4.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
||||
* ========================================================
|
||||
* Copyright 2011 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 activate ( element, container ) {
|
||||
container
|
||||
.find('> .active')
|
||||
.removeClass('active')
|
||||
.find('> .dropdown-menu > .active')
|
||||
.removeClass('active')
|
||||
|
||||
element.addClass('active')
|
||||
|
||||
if ( element.parent('.dropdown-menu') ) {
|
||||
element.closest('li.dropdown').addClass('active')
|
||||
}
|
||||
}
|
||||
|
||||
function tab( e ) {
|
||||
var $this = $(this)
|
||||
, $ul = $this.closest('ul:not(.dropdown-menu)')
|
||||
, href = $this.attr('href')
|
||||
, previous
|
||||
, $href
|
||||
|
||||
if ( /^#\w+/.test(href) ) {
|
||||
e.preventDefault()
|
||||
|
||||
if ( $this.parent('li').hasClass('active') ) {
|
||||
return
|
||||
}
|
||||
|
||||
previous = $ul.find('.active a').last()[0]
|
||||
$href = $(href)
|
||||
|
||||
activate($this.parent('li'), $ul)
|
||||
activate($href, $href.parent())
|
||||
|
||||
$this.trigger({
|
||||
type: 'change'
|
||||
, relatedTarget: previous
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* TABS/PILLS PLUGIN DEFINITION
|
||||
* ============================ */
|
||||
|
||||
$.fn.tabs = $.fn.pills = function ( selector ) {
|
||||
return this.each(function () {
|
||||
$(this).delegate(selector || '.tabs li > a, .pills > li > a', 'click', tab)
|
||||
})
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a')
|
||||
})
|
||||
|
||||
}( window.jQuery || window.ender );
|
||||
270
js/bootstrap/bootstrap-tooltip.js
vendored
270
js/bootstrap/bootstrap-tooltip.js
vendored
@@ -1,270 +0,0 @@
|
||||
/* ===========================================================
|
||||
* bootstrap-tooltip.js v2.0.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
||||
* Inspired by the original jQuery.tipsy by Jason Frame
|
||||
* ===========================================================
|
||||
* 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"
|
||||
|
||||
/* TOOLTIP PUBLIC CLASS DEFINITION
|
||||
* =============================== */
|
||||
|
||||
var Tooltip = function ( element, options ) {
|
||||
this.init('tooltip', element, options)
|
||||
}
|
||||
|
||||
Tooltip.prototype = {
|
||||
|
||||
constructor: Tooltip
|
||||
|
||||
, init: function ( type, element, options ) {
|
||||
var eventIn
|
||||
, eventOut
|
||||
|
||||
this.type = type
|
||||
this.$element = $(element)
|
||||
this.options = this.getOptions(options)
|
||||
this.enabled = true
|
||||
|
||||
if (this.options.trigger != 'manual') {
|
||||
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
|
||||
eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
|
||||
this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this))
|
||||
this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this))
|
||||
}
|
||||
|
||||
this.options.selector ?
|
||||
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
|
||||
this.fixTitle()
|
||||
}
|
||||
|
||||
, getOptions: function ( options ) {
|
||||
options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
|
||||
|
||||
if (options.delay && typeof options.delay == 'number') {
|
||||
options.delay = {
|
||||
show: options.delay
|
||||
, hide: options.delay
|
||||
}
|
||||
}
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
, enter: function ( e ) {
|
||||
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
||||
|
||||
if (!self.options.delay || !self.options.delay.show) {
|
||||
self.show()
|
||||
} else {
|
||||
self.hoverState = 'in'
|
||||
setTimeout(function() {
|
||||
if (self.hoverState == 'in') {
|
||||
self.show()
|
||||
}
|
||||
}, self.options.delay.show)
|
||||
}
|
||||
}
|
||||
|
||||
, leave: function ( e ) {
|
||||
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
||||
|
||||
if (!self.options.delay || !self.options.delay.hide) {
|
||||
self.hide()
|
||||
} else {
|
||||
self.hoverState = 'out'
|
||||
setTimeout(function() {
|
||||
if (self.hoverState == 'out') {
|
||||
self.hide()
|
||||
}
|
||||
}, self.options.delay.hide)
|
||||
}
|
||||
}
|
||||
|
||||
, show: function () {
|
||||
var $tip
|
||||
, inside
|
||||
, pos
|
||||
, actualWidth
|
||||
, actualHeight
|
||||
, placement
|
||||
, tp
|
||||
|
||||
if (this.hasContent() && this.enabled) {
|
||||
$tip = this.tip()
|
||||
this.setContent()
|
||||
|
||||
if (this.options.animation) {
|
||||
$tip.addClass('fade')
|
||||
}
|
||||
|
||||
placement = typeof this.options.placement == 'function' ?
|
||||
this.options.placement.call(this, $tip[0], this.$element[0]) :
|
||||
this.options.placement
|
||||
|
||||
inside = /in/.test(placement)
|
||||
|
||||
$tip
|
||||
.remove()
|
||||
.css({ top: 0, left: 0, display: 'block' })
|
||||
.appendTo(inside ? this.$element : document.body)
|
||||
|
||||
pos = this.getPosition(inside)
|
||||
|
||||
actualWidth = $tip[0].offsetWidth
|
||||
actualHeight = $tip[0].offsetHeight
|
||||
|
||||
switch (inside ? placement.split(' ')[1] : placement) {
|
||||
case 'bottom':
|
||||
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
|
||||
break
|
||||
case 'top':
|
||||
tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
|
||||
break
|
||||
case 'left':
|
||||
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
|
||||
break
|
||||
case 'right':
|
||||
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
|
||||
break
|
||||
}
|
||||
|
||||
$tip
|
||||
.css(tp)
|
||||
.addClass(placement)
|
||||
.addClass('in')
|
||||
}
|
||||
}
|
||||
|
||||
, setContent: function () {
|
||||
var $tip = this.tip()
|
||||
$tip.find('.tooltip-inner').html(this.getTitle())
|
||||
$tip.removeClass('fade in top bottom left right')
|
||||
}
|
||||
|
||||
, hide: function () {
|
||||
var that = this
|
||||
, $tip = this.tip()
|
||||
|
||||
$tip.removeClass('in')
|
||||
|
||||
function removeWithAnimation() {
|
||||
var timeout = setTimeout(function () {
|
||||
$tip.off($.support.transition.end).remove()
|
||||
}, 500)
|
||||
|
||||
$tip.one($.support.transition.end, function () {
|
||||
clearTimeout(timeout)
|
||||
$tip.remove()
|
||||
})
|
||||
}
|
||||
|
||||
$.support.transition && this.$tip.hasClass('fade') ?
|
||||
removeWithAnimation() :
|
||||
$tip.remove()
|
||||
}
|
||||
|
||||
, fixTitle: function () {
|
||||
var $e = this.$element
|
||||
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
|
||||
$e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
|
||||
}
|
||||
}
|
||||
|
||||
, hasContent: function () {
|
||||
return this.getTitle()
|
||||
}
|
||||
|
||||
, getPosition: function (inside) {
|
||||
return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
|
||||
width: this.$element[0].offsetWidth
|
||||
, height: this.$element[0].offsetHeight
|
||||
})
|
||||
}
|
||||
|
||||
, getTitle: function () {
|
||||
var title
|
||||
, $e = this.$element
|
||||
, o = this.options
|
||||
|
||||
title = $e.attr('data-original-title')
|
||||
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
|
||||
|
||||
title = title.toString().replace(/(^\s*|\s*$)/, "")
|
||||
|
||||
return title
|
||||
}
|
||||
|
||||
, tip: function () {
|
||||
return this.$tip = this.$tip || $(this.options.template)
|
||||
}
|
||||
|
||||
, validate: function () {
|
||||
if (!this.$element[0].parentNode) {
|
||||
this.hide()
|
||||
this.$element = null
|
||||
this.options = null
|
||||
}
|
||||
}
|
||||
|
||||
, enable: function () {
|
||||
this.enabled = true
|
||||
}
|
||||
|
||||
, disable: function () {
|
||||
this.enabled = false
|
||||
}
|
||||
|
||||
, toggleEnabled: function () {
|
||||
this.enabled = !this.enabled
|
||||
}
|
||||
|
||||
, toggle: function () {
|
||||
this[this.tip().hasClass('in') ? 'hide' : 'show']()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* TOOLTIP PLUGIN DEFINITION
|
||||
* ========================= */
|
||||
|
||||
$.fn.tooltip = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('tooltip')
|
||||
, options = typeof option == 'object' && option
|
||||
if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.tooltip.Constructor = Tooltip
|
||||
|
||||
$.fn.tooltip.defaults = {
|
||||
animation: true
|
||||
, delay: 0
|
||||
, selector: false
|
||||
, placement: 'top'
|
||||
, trigger: 'hover'
|
||||
, title: ''
|
||||
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
||||
}
|
||||
|
||||
}( window.jQuery )
|
||||
51
js/bootstrap/bootstrap-transition.js
vendored
51
js/bootstrap/bootstrap-transition.js
vendored
@@ -1,51 +0,0 @@
|
||||
/* ===================================================
|
||||
* bootstrap-transition.js v2.0.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
||||
* ===================================================
|
||||
* 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( $ ) {
|
||||
|
||||
$(function () {
|
||||
|
||||
"use strict"
|
||||
|
||||
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
||||
* ======================================================= */
|
||||
|
||||
$.support.transition = (function () {
|
||||
var thisBody = document.body || document.documentElement
|
||||
, thisStyle = thisBody.style
|
||||
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
|
||||
|
||||
return support && {
|
||||
end: (function () {
|
||||
var transitionEnd = "TransitionEnd"
|
||||
if ( $.browser.webkit ) {
|
||||
transitionEnd = "webkitTransitionEnd"
|
||||
} else if ( $.browser.mozilla ) {
|
||||
transitionEnd = "transitionend"
|
||||
} else if ( $.browser.opera ) {
|
||||
transitionEnd = "oTransitionEnd"
|
||||
}
|
||||
return transitionEnd
|
||||
}())
|
||||
}
|
||||
})()
|
||||
|
||||
})
|
||||
|
||||
}( window.jQuery )
|
||||
321
js/bootstrap/bootstrap-twipsy.js
vendored
321
js/bootstrap/bootstrap-twipsy.js
vendored
@@ -1,321 +0,0 @@
|
||||
/* ==========================================================
|
||||
* bootstrap-twipsy.js v1.4.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#twipsy
|
||||
* Adapted from the original jQuery.tipsy by Jason Frame
|
||||
* ==========================================================
|
||||
* Copyright 2011 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"
|
||||
|
||||
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
||||
* ======================================================= */
|
||||
|
||||
var transitionEnd
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$.support.transition = (function () {
|
||||
var thisBody = document.body || document.documentElement
|
||||
, thisStyle = thisBody.style
|
||||
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
|
||||
return support
|
||||
})()
|
||||
|
||||
// set CSS transition event type
|
||||
if ( $.support.transition ) {
|
||||
transitionEnd = "TransitionEnd"
|
||||
if ( $.browser.webkit ) {
|
||||
transitionEnd = "webkitTransitionEnd"
|
||||
} else if ( $.browser.mozilla ) {
|
||||
transitionEnd = "transitionend"
|
||||
} else if ( $.browser.opera ) {
|
||||
transitionEnd = "oTransitionEnd"
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
/* TWIPSY PUBLIC CLASS DEFINITION
|
||||
* ============================== */
|
||||
|
||||
var Twipsy = function ( element, options ) {
|
||||
this.$element = $(element)
|
||||
this.options = options
|
||||
this.enabled = true
|
||||
this.fixTitle()
|
||||
}
|
||||
|
||||
Twipsy.prototype = {
|
||||
|
||||
show: function() {
|
||||
var pos
|
||||
, actualWidth
|
||||
, actualHeight
|
||||
, placement
|
||||
, $tip
|
||||
, tp
|
||||
|
||||
if (this.hasContent() && this.enabled) {
|
||||
$tip = this.tip()
|
||||
this.setContent()
|
||||
|
||||
if (this.options.animate) {
|
||||
$tip.addClass('fade')
|
||||
}
|
||||
|
||||
$tip
|
||||
.remove()
|
||||
.css({ top: 0, left: 0, display: 'block' })
|
||||
.prependTo(document.body)
|
||||
|
||||
pos = $.extend({}, this.$element.offset(), {
|
||||
width: this.$element[0].offsetWidth
|
||||
, height: this.$element[0].offsetHeight
|
||||
})
|
||||
|
||||
actualWidth = $tip[0].offsetWidth
|
||||
actualHeight = $tip[0].offsetHeight
|
||||
|
||||
placement = maybeCall(this.options.placement, this, [ $tip[0], this.$element[0] ])
|
||||
|
||||
switch (placement) {
|
||||
case 'below':
|
||||
tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}
|
||||
break
|
||||
case 'above':
|
||||
tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}
|
||||
break
|
||||
case 'left':
|
||||
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}
|
||||
break
|
||||
case 'right':
|
||||
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}
|
||||
break
|
||||
}
|
||||
|
||||
$tip
|
||||
.css(tp)
|
||||
.addClass(placement)
|
||||
.addClass('in')
|
||||
}
|
||||
}
|
||||
|
||||
, setContent: function () {
|
||||
var $tip = this.tip()
|
||||
$tip.find('.twipsy-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
|
||||
$tip[0].className = 'twipsy'
|
||||
}
|
||||
|
||||
, hide: function() {
|
||||
var that = this
|
||||
, $tip = this.tip()
|
||||
|
||||
$tip.removeClass('in')
|
||||
|
||||
function removeElement () {
|
||||
$tip.remove()
|
||||
}
|
||||
|
||||
$.support.transition && this.$tip.hasClass('fade') ?
|
||||
$tip.bind(transitionEnd, removeElement) :
|
||||
removeElement()
|
||||
}
|
||||
|
||||
, fixTitle: function() {
|
||||
var $e = this.$element
|
||||
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
|
||||
$e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
|
||||
}
|
||||
}
|
||||
|
||||
, hasContent: function () {
|
||||
return this.getTitle()
|
||||
}
|
||||
|
||||
, getTitle: function() {
|
||||
var title
|
||||
, $e = this.$element
|
||||
, o = this.options
|
||||
|
||||
this.fixTitle()
|
||||
|
||||
if (typeof o.title == 'string') {
|
||||
title = $e.attr(o.title == 'title' ? 'data-original-title' : o.title)
|
||||
} else if (typeof o.title == 'function') {
|
||||
title = o.title.call($e[0])
|
||||
}
|
||||
|
||||
title = ('' + title).replace(/(^\s*|\s*$)/, "")
|
||||
|
||||
return title || o.fallback
|
||||
}
|
||||
|
||||
, tip: function() {
|
||||
return this.$tip = this.$tip || $('<div class="twipsy" />').html(this.options.template)
|
||||
}
|
||||
|
||||
, validate: function() {
|
||||
if (!this.$element[0].parentNode) {
|
||||
this.hide()
|
||||
this.$element = null
|
||||
this.options = null
|
||||
}
|
||||
}
|
||||
|
||||
, enable: function() {
|
||||
this.enabled = true
|
||||
}
|
||||
|
||||
, disable: function() {
|
||||
this.enabled = false
|
||||
}
|
||||
|
||||
, toggleEnabled: function() {
|
||||
this.enabled = !this.enabled
|
||||
}
|
||||
|
||||
, toggle: function () {
|
||||
this[this.tip().hasClass('in') ? 'hide' : 'show']()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* TWIPSY PRIVATE METHODS
|
||||
* ====================== */
|
||||
|
||||
function maybeCall ( thing, ctx, args ) {
|
||||
return typeof thing == 'function' ? thing.apply(ctx, args) : thing
|
||||
}
|
||||
|
||||
/* TWIPSY PLUGIN DEFINITION
|
||||
* ======================== */
|
||||
|
||||
$.fn.twipsy = function (options) {
|
||||
$.fn.twipsy.initWith.call(this, options, Twipsy, 'twipsy')
|
||||
return this
|
||||
}
|
||||
|
||||
$.fn.twipsy.initWith = function (options, Constructor, name) {
|
||||
var twipsy
|
||||
, binder
|
||||
, eventIn
|
||||
, eventOut
|
||||
|
||||
if (options === true) {
|
||||
return this.data(name)
|
||||
} else if (typeof options == 'string') {
|
||||
twipsy = this.data(name)
|
||||
if (twipsy) {
|
||||
twipsy[options]()
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
options = $.extend({}, $.fn[name].defaults, options)
|
||||
|
||||
function get(ele) {
|
||||
var twipsy = $.data(ele, name)
|
||||
|
||||
if (!twipsy) {
|
||||
twipsy = new Constructor(ele, $.fn.twipsy.elementOptions(ele, options))
|
||||
$.data(ele, name, twipsy)
|
||||
}
|
||||
|
||||
return twipsy
|
||||
}
|
||||
|
||||
function enter() {
|
||||
var twipsy = get(this)
|
||||
twipsy.hoverState = 'in'
|
||||
|
||||
if (options.delayIn == 0) {
|
||||
twipsy.show()
|
||||
} else {
|
||||
twipsy.fixTitle()
|
||||
setTimeout(function() {
|
||||
if (twipsy.hoverState == 'in') {
|
||||
twipsy.show()
|
||||
}
|
||||
}, options.delayIn)
|
||||
}
|
||||
}
|
||||
|
||||
function leave() {
|
||||
var twipsy = get(this)
|
||||
twipsy.hoverState = 'out'
|
||||
if (options.delayOut == 0) {
|
||||
twipsy.hide()
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
if (twipsy.hoverState == 'out') {
|
||||
twipsy.hide()
|
||||
}
|
||||
}, options.delayOut)
|
||||
}
|
||||
}
|
||||
|
||||
if (!options.live) {
|
||||
this.each(function() {
|
||||
get(this)
|
||||
})
|
||||
}
|
||||
|
||||
if (options.trigger != 'manual') {
|
||||
binder = options.live ? 'live' : 'bind'
|
||||
eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus'
|
||||
eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'
|
||||
this[binder](eventIn, enter)[binder](eventOut, leave)
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
$.fn.twipsy.Twipsy = Twipsy
|
||||
|
||||
$.fn.twipsy.defaults = {
|
||||
animate: true
|
||||
, delayIn: 0
|
||||
, delayOut: 0
|
||||
, fallback: ''
|
||||
, placement: 'above'
|
||||
, html: false
|
||||
, live: false
|
||||
, offset: 0
|
||||
, title: 'title'
|
||||
, trigger: 'hover'
|
||||
, template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
|
||||
}
|
||||
|
||||
$.fn.twipsy.rejectAttrOptions = [ 'title' ]
|
||||
|
||||
$.fn.twipsy.elementOptions = function(ele, options) {
|
||||
var data = $(ele).data()
|
||||
, rejects = $.fn.twipsy.rejectAttrOptions
|
||||
, i = rejects.length
|
||||
|
||||
while (i--) {
|
||||
delete data[rejects[i]]
|
||||
}
|
||||
|
||||
return $.extend({}, options, data)
|
||||
}
|
||||
|
||||
}( window.jQuery || window.ender );
|
||||
271
js/bootstrap/bootstrap-typeahead.js
vendored
271
js/bootstrap/bootstrap-typeahead.js
vendored
@@ -1,271 +0,0 @@
|
||||
/* =============================================================
|
||||
* bootstrap-typeahead.js v2.0.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
||||
* =============================================================
|
||||
* 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"
|
||||
|
||||
var Typeahead = function ( element, options ) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, $.fn.typeahead.defaults, options)
|
||||
this.matcher = this.options.matcher || this.matcher
|
||||
this.sorter = this.options.sorter || this.sorter
|
||||
this.highlighter = this.options.highlighter || this.highlighter
|
||||
this.$menu = $(this.options.menu).appendTo('body')
|
||||
this.source = this.options.source
|
||||
this.shown = false
|
||||
this.listen()
|
||||
}
|
||||
|
||||
Typeahead.prototype = {
|
||||
|
||||
constructor: Typeahead
|
||||
|
||||
, select: function () {
|
||||
var val = this.$menu.find('.active').attr('data-value')
|
||||
this.$element.val(val)
|
||||
return this.hide()
|
||||
}
|
||||
|
||||
, show: function () {
|
||||
var pos = $.extend({}, this.$element.offset(), {
|
||||
height: this.$element[0].offsetHeight
|
||||
})
|
||||
|
||||
this.$menu.css({
|
||||
top: pos.top + pos.height
|
||||
, left: pos.left
|
||||
})
|
||||
|
||||
this.$menu.show()
|
||||
this.shown = true
|
||||
return this
|
||||
}
|
||||
|
||||
, hide: function () {
|
||||
this.$menu.hide()
|
||||
this.shown = false
|
||||
return this
|
||||
}
|
||||
|
||||
, lookup: function (event) {
|
||||
var that = this
|
||||
, items
|
||||
, q
|
||||
|
||||
this.query = this.$element.val()
|
||||
|
||||
if (!this.query) {
|
||||
return this.shown ? this.hide() : this
|
||||
}
|
||||
|
||||
items = $.grep(this.source, function (item) {
|
||||
if (that.matcher(item)) return item
|
||||
})
|
||||
|
||||
items = this.sorter(items)
|
||||
|
||||
if (!items.length) {
|
||||
return this.shown ? this.hide() : this
|
||||
}
|
||||
|
||||
return this.render(items.slice(0, this.options.items)).show()
|
||||
}
|
||||
|
||||
, matcher: function (item) {
|
||||
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
|
||||
}
|
||||
|
||||
, sorter: function (items) {
|
||||
var beginswith = []
|
||||
, caseSensitive = []
|
||||
, caseInsensitive = []
|
||||
, item
|
||||
|
||||
while (item = items.shift()) {
|
||||
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
|
||||
else if (~item.indexOf(this.query)) caseSensitive.push(item)
|
||||
else caseInsensitive.push(item)
|
||||
}
|
||||
|
||||
return beginswith.concat(caseSensitive, caseInsensitive)
|
||||
}
|
||||
|
||||
, highlighter: function (item) {
|
||||
return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) {
|
||||
return '<strong>' + match + '</strong>'
|
||||
})
|
||||
}
|
||||
|
||||
, render: function (items) {
|
||||
var that = this
|
||||
|
||||
items = $(items).map(function (i, item) {
|
||||
i = $(that.options.item).attr('data-value', item)
|
||||
i.find('a').html(that.highlighter(item))
|
||||
return i[0]
|
||||
})
|
||||
|
||||
items.first().addClass('active')
|
||||
this.$menu.html(items)
|
||||
return this
|
||||
}
|
||||
|
||||
, next: function (event) {
|
||||
var active = this.$menu.find('.active').removeClass('active')
|
||||
, next = active.next()
|
||||
|
||||
if (!next.length) {
|
||||
next = $(this.$menu.find('li')[0])
|
||||
}
|
||||
|
||||
next.addClass('active')
|
||||
}
|
||||
|
||||
, prev: function (event) {
|
||||
var active = this.$menu.find('.active').removeClass('active')
|
||||
, prev = active.prev()
|
||||
|
||||
if (!prev.length) {
|
||||
prev = this.$menu.find('li').last()
|
||||
}
|
||||
|
||||
prev.addClass('active')
|
||||
}
|
||||
|
||||
, listen: function () {
|
||||
this.$element
|
||||
.on('blur', $.proxy(this.blur, this))
|
||||
.on('keypress', $.proxy(this.keypress, this))
|
||||
.on('keyup', $.proxy(this.keyup, this))
|
||||
|
||||
if ($.browser.webkit || $.browser.msie) {
|
||||
this.$element.on('keydown', $.proxy(this.keypress, this))
|
||||
}
|
||||
|
||||
this.$menu
|
||||
.on('click', $.proxy(this.click, this))
|
||||
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
|
||||
}
|
||||
|
||||
, keyup: function (e) {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
|
||||
switch(e.keyCode) {
|
||||
case 40: // down arrow
|
||||
case 38: // up arrow
|
||||
break
|
||||
|
||||
case 9: // tab
|
||||
case 13: // enter
|
||||
if (!this.shown) return
|
||||
this.select()
|
||||
break
|
||||
|
||||
case 27: // escape
|
||||
this.hide()
|
||||
break
|
||||
|
||||
default:
|
||||
this.lookup()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
, keypress: function (e) {
|
||||
e.stopPropagation()
|
||||
if (!this.shown) return
|
||||
|
||||
switch(e.keyCode) {
|
||||
case 9: // tab
|
||||
case 13: // enter
|
||||
case 27: // escape
|
||||
e.preventDefault()
|
||||
break
|
||||
|
||||
case 38: // up arrow
|
||||
e.preventDefault()
|
||||
this.prev()
|
||||
break
|
||||
|
||||
case 40: // down arrow
|
||||
e.preventDefault()
|
||||
this.next()
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
, blur: function (e) {
|
||||
var that = this
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
setTimeout(function () { that.hide() }, 150)
|
||||
}
|
||||
|
||||
, click: function (e) {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
this.select()
|
||||
}
|
||||
|
||||
, mouseenter: function (e) {
|
||||
this.$menu.find('.active').removeClass('active')
|
||||
$(e.currentTarget).addClass('active')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* TYPEAHEAD PLUGIN DEFINITION
|
||||
* =========================== */
|
||||
|
||||
$.fn.typeahead = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('typeahead')
|
||||
, options = typeof option == 'object' && option
|
||||
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.typeahead.defaults = {
|
||||
source: []
|
||||
, items: 8
|
||||
, menu: '<ul class="typeahead dropdown-menu"></ul>'
|
||||
, item: '<li><a href="#"></a></li>'
|
||||
}
|
||||
|
||||
$.fn.typeahead.Constructor = Typeahead
|
||||
|
||||
|
||||
/* TYPEAHEAD DATA-API
|
||||
* ================== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('typeahead')) return
|
||||
e.preventDefault()
|
||||
$this.typeahead($this.data())
|
||||
})
|
||||
})
|
||||
|
||||
}( window.jQuery )
|
||||
16
js/bootstrap/less-1.1.3.min.js
vendored
16
js/bootstrap/less-1.1.3.min.js
vendored
File diff suppressed because one or more lines are too long
9
js/bootstrap/less-1.2.1.min.js
vendored
9
js/bootstrap/less-1.2.1.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,94 +0,0 @@
|
||||
/* Foundation v2.1.4 http://foundation.zurb.com */
|
||||
$(document).ready(function () {
|
||||
|
||||
/* Use this js doc for all application specific JS */
|
||||
|
||||
/* TABS --------------------------------- */
|
||||
/* Remove if you don't need :) */
|
||||
|
||||
function activateTab($tab) {
|
||||
var $activeTab = $tab.closest('dl').find('a.active'),
|
||||
contentLocation = $tab.attr("href") + 'Tab';
|
||||
|
||||
//Make Tab Active
|
||||
$activeTab.removeClass('active');
|
||||
$tab.addClass('active');
|
||||
|
||||
//Show Tab Content
|
||||
$(contentLocation).closest('.tabs-content').children('li').hide();
|
||||
$(contentLocation).show();
|
||||
}
|
||||
|
||||
$('dl.tabs').each(function () {
|
||||
//Get all tabs
|
||||
var tabs = $(this).children('dd').children('a');
|
||||
tabs.click(function (e) {
|
||||
activateTab($(this));
|
||||
});
|
||||
});
|
||||
|
||||
if (window.location.hash) {
|
||||
activateTab($('a[href="' + window.location.hash + '"]'));
|
||||
}
|
||||
|
||||
/* ALERT BOXES ------------ */
|
||||
$(".alert-box").delegate("a.close", "click", function(event) {
|
||||
event.preventDefault();
|
||||
$(this).closest(".alert-box").fadeOut(function(event){
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/* PLACEHOLDER FOR FORMS ------------- */
|
||||
/* Remove this and jquery.placeholder.min.js if you don't need :) */
|
||||
|
||||
$('input, textarea').placeholder();
|
||||
|
||||
|
||||
|
||||
/* UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE6/7/8 SUPPORT AND ARE USING .block-grids */
|
||||
// $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'});
|
||||
// $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'});
|
||||
// $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'});
|
||||
// $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'});
|
||||
|
||||
|
||||
|
||||
/* DROPDOWN NAV ------------- */
|
||||
|
||||
var currentFoundationDropdown = null;
|
||||
$('.nav-bar li a, .nav-bar li a:after').each(function() {
|
||||
$(this).data('clicks', 0);
|
||||
});
|
||||
$('.nav-bar li a, .nav-bar li a:after').live('click', function(e) {
|
||||
e.preventDefault();
|
||||
if (currentFoundationDropdown !== $(this).index() || currentFoundationDropdown === null) {
|
||||
$(this).data('clicks', 0);
|
||||
currentFoundationDropdown = $(this).index();
|
||||
}
|
||||
$(this).data('clicks', ($(this).data('clicks') + 1));
|
||||
var f = $(this).siblings('.flyout');
|
||||
if (!f.is(':visible') && $(this).parent('.has-flyout').length > 1) {
|
||||
$('.nav-bar li .flyout').hide();
|
||||
f.show();
|
||||
} else if (($(this).data('clicks') > 1) || ($(this).parent('.has-flyout').length < 1)) {
|
||||
window.location = $(this).attr('href');
|
||||
}
|
||||
});
|
||||
$('.nav-bar').live('click', function(e) {
|
||||
e.stopPropagation();
|
||||
if ($(e.target).parents().is('.flyout') || $(e.target).is('.flyout')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
// $('body').bind('touchend', function(e) {
|
||||
// if (!$(e.target).parents().is('.nav-bar') || !$(e.target).is('.nav-bar')) {
|
||||
// $('.nav-bar li .flyout').is(':visible').hide();
|
||||
// }
|
||||
// });
|
||||
|
||||
/* DISABLED BUTTONS ------------- */
|
||||
/* Gives elements with a class of 'disabled' a return: false; */
|
||||
|
||||
});
|
||||
@@ -1,58 +0,0 @@
|
||||
/**
|
||||
* jQuery.placeholder - Placeholder plugin for input fields
|
||||
* Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
|
||||
* Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
|
||||
* Date: 2008/10/14
|
||||
*
|
||||
* @author Blair Mitchelmore
|
||||
* @version 1.0.1
|
||||
*
|
||||
**/
|
||||
new function($) {
|
||||
$.fn.placeholder = function(settings) {
|
||||
settings = settings || {};
|
||||
var key = settings.dataKey || "placeholderValue";
|
||||
var attr = settings.attr || "placeholder";
|
||||
var className = settings.className || "placeholder";
|
||||
var values = settings.values || [];
|
||||
var block = settings.blockSubmit || false;
|
||||
var blank = settings.blankSubmit || false;
|
||||
var submit = settings.onSubmit || false;
|
||||
var value = settings.value || "";
|
||||
var position = settings.cursor_position || 0;
|
||||
|
||||
|
||||
return this.filter(":input").each(function(index) {
|
||||
$.data(this, key, values[index] || $(this).attr(attr));
|
||||
}).each(function() {
|
||||
if ($.trim($(this).val()) === "")
|
||||
$(this).addClass(className).val($.data(this, key));
|
||||
}).focus(function() {
|
||||
if ($.trim($(this).val()) === $.data(this, key))
|
||||
$(this).removeClass(className).val(value)
|
||||
if ($.fn.setCursorPosition) {
|
||||
$(this).setCursorPosition(position);
|
||||
}
|
||||
}).blur(function() {
|
||||
if ($.trim($(this).val()) === value)
|
||||
$(this).addClass(className).val($.data(this, key));
|
||||
}).each(function(index, elem) {
|
||||
if (block)
|
||||
new function(e) {
|
||||
$(e.form).submit(function() {
|
||||
return $.trim($(e).val()) != $.data(e, key)
|
||||
});
|
||||
}(elem);
|
||||
else if (blank)
|
||||
new function(e) {
|
||||
$(e.form).submit(function() {
|
||||
if ($.trim($(e).val()) == $.data(e, key))
|
||||
$(e).removeClass(className).val("");
|
||||
return true;
|
||||
});
|
||||
}(elem);
|
||||
else if (submit)
|
||||
new function(e) { $(e.form).submit(submit); }(elem);
|
||||
});
|
||||
};
|
||||
}(jQuery);
|
||||
@@ -1,162 +0,0 @@
|
||||
/*
|
||||
* jQuery Custom Forms Plugin 1.0
|
||||
* www.ZURB.com
|
||||
* Copyright 2010, ZURB
|
||||
* Free to use under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
jQuery(document).ready(function ($) {
|
||||
|
||||
function appendCustomMarkup(type) {
|
||||
$('form.custom input:' + type).each(function () {
|
||||
var $span = $('<span class="custom ' + type + '"></span>');
|
||||
if ($(this).next('span.custom.' + type).length === 0) {
|
||||
if (this.checked) {
|
||||
$span.addClass('checked');
|
||||
}
|
||||
$(this)
|
||||
.hide()
|
||||
.after($span);
|
||||
}
|
||||
});
|
||||
}
|
||||
appendCustomMarkup('checkbox');
|
||||
appendCustomMarkup('radio');
|
||||
|
||||
$('form.custom select').each(function () {
|
||||
var $this = $(this),
|
||||
$customSelect = $this.next('div.custom.dropdown'),
|
||||
$options = $this.find('option'),
|
||||
maxWidth = 0,
|
||||
$li;
|
||||
|
||||
if ($customSelect.length === 0) {
|
||||
$customSelect = $('<div class="custom dropdown"><a href="#" class="selector"></a><ul></ul></div>"');
|
||||
$options.each(function () {
|
||||
$li = $('<li>' + $(this).html() + '</li>');
|
||||
$customSelect.find('ul').append($li);
|
||||
});
|
||||
$customSelect.prepend('<a href="#" class="current">' + $options.first().html() + '</a>');
|
||||
|
||||
$this.after($customSelect);
|
||||
$this.hide();
|
||||
}
|
||||
|
||||
$options.each(function (index) {
|
||||
if (this.selected) {
|
||||
$customSelect.find('li').eq(index).addClass('selected');
|
||||
$customSelect.find('.current').html($(this).html());
|
||||
}
|
||||
});
|
||||
|
||||
$customSelect.find('li').each(function () {
|
||||
$customSelect.addClass('open');
|
||||
if ($(this).outerWidth() > maxWidth) {
|
||||
maxWidth = $(this).outerWidth();
|
||||
}
|
||||
$customSelect.removeClass('open');
|
||||
});
|
||||
$customSelect.css('width', maxWidth + 18 + 'px');
|
||||
$customSelect.find('ul').css('width', maxWidth + 16 + 'px');
|
||||
});
|
||||
});
|
||||
|
||||
(function ($) {
|
||||
|
||||
function toggleCheckbox($element) {
|
||||
var $input = $element.prev(),
|
||||
input = $input[0];
|
||||
|
||||
input.checked = ((input.checked) ? false : true);
|
||||
$element.toggleClass('checked');
|
||||
}
|
||||
|
||||
function toggleRadio($element) {
|
||||
var $input = $element.prev(),
|
||||
input = $input[0];
|
||||
|
||||
$('input:radio[name=' + $input.attr('name') + ']').each(function () {
|
||||
$(this).next().removeClass('checked');
|
||||
});
|
||||
input.checked = ((input.checked) ? false : true);
|
||||
$element.toggleClass('checked');
|
||||
}
|
||||
|
||||
$('form.custom span.custom.checkbox').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
toggleCheckbox($(this));
|
||||
});
|
||||
|
||||
$('form.custom span.custom.radio').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
toggleRadio($(this));
|
||||
});
|
||||
|
||||
$('form.custom label').live('click', function (event) {
|
||||
var $associatedElement = $('#' + $(this).attr('for')),
|
||||
$customCheckbox,
|
||||
$customRadio;
|
||||
if ($associatedElement.length !== 0) {
|
||||
if ($associatedElement.attr('type') === 'checkbox') {
|
||||
event.preventDefault();
|
||||
$customCheckbox = $(this).find('span.custom.checkbox');
|
||||
toggleCheckbox($customCheckbox);
|
||||
} else if ($associatedElement.attr('type') === 'radio') {
|
||||
event.preventDefault();
|
||||
$customRadio = $(this).find('span.custom.radio');
|
||||
toggleRadio($customRadio);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector').live('click', function (event) {
|
||||
var $this = $(this),
|
||||
$dropdown = $this.closest('div.custom.dropdown');
|
||||
|
||||
event.preventDefault();
|
||||
$dropdown.toggleClass('open');
|
||||
|
||||
if ($dropdown.hasClass('open')) {
|
||||
$(document).bind('click.customdropdown', function (event) {
|
||||
$dropdown.removeClass('open');
|
||||
$(document).unbind('.customdropdown');
|
||||
});
|
||||
} else {
|
||||
$(document).unbind('.customdropdown');
|
||||
}
|
||||
});
|
||||
|
||||
$('form.custom div.custom.dropdown li').live('click', function (event) {
|
||||
var $this = $(this),
|
||||
$customDropdown = $this.closest('div.custom.dropdown'),
|
||||
$select = $customDropdown.prev(),
|
||||
selectedIndex = 0;
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
$this
|
||||
.closest('ul')
|
||||
.find('li')
|
||||
.removeClass('selected');
|
||||
$this.addClass('selected');
|
||||
|
||||
$customDropdown
|
||||
.removeClass('open')
|
||||
.find('a.current')
|
||||
.html($this.html());
|
||||
|
||||
$this.closest('ul').find('li').each(function (index) {
|
||||
if ($this[0] == this) {
|
||||
selectedIndex = index;
|
||||
}
|
||||
|
||||
});
|
||||
$select[0].selectedIndex = selectedIndex;
|
||||
});
|
||||
})(jQuery);
|
||||
@@ -1,596 +0,0 @@
|
||||
/*
|
||||
* jQuery Orbit Plugin 1.3.0
|
||||
* www.ZURB.com/playground
|
||||
* Copyright 2010, ZURB
|
||||
* Free to use under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
|
||||
(function($) {
|
||||
|
||||
var ORBIT = {
|
||||
|
||||
defaults: {
|
||||
animation: 'horizontal-push', // fade, horizontal-slide, vertical-slide, horizontal-push, vertical-push
|
||||
animationSpeed: 600, // how fast animtions are
|
||||
timer: true, // true or false to have the timer
|
||||
advanceSpeed: 4000, // if timer is enabled, time between transitions
|
||||
pauseOnHover: false, // if you hover pauses the slider
|
||||
startClockOnMouseOut: false, // if clock should start on MouseOut
|
||||
startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again
|
||||
directionalNav: true, // manual advancing directional navs
|
||||
captions: true, // do you want captions?
|
||||
captionAnimation: 'fade', // fade, slideOpen, none
|
||||
captionAnimationSpeed: 600, // if so how quickly should they animate in
|
||||
bullets: false, // true or false to activate the bullet navigation
|
||||
bulletThumbs: false, // thumbnails for the bullets
|
||||
bulletThumbLocation: '', // location from this file where thumbs will be
|
||||
afterSlideChange: $.noop, // empty function
|
||||
fluid: true,
|
||||
centerBullets: true // center bullet nav with js, turn this off if you want to position the bullet nav manually
|
||||
},
|
||||
|
||||
activeSlide: 0,
|
||||
numberSlides: 0,
|
||||
orbitWidth: null,
|
||||
orbitHeight: null,
|
||||
locked: null,
|
||||
timerRunning: null,
|
||||
degrees: 0,
|
||||
wrapperHTML: '<div class="orbit-wrapper" />',
|
||||
timerHTML: '<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>',
|
||||
captionHTML: '<div class="orbit-caption"></div>',
|
||||
directionalNavHTML: '<div class="slider-nav"><span class="right">Right</span><span class="left">Left</span></div>',
|
||||
bulletHTML: '<ul class="orbit-bullets"></ul>',
|
||||
|
||||
init: function (element, options) {
|
||||
var $imageSlides,
|
||||
imagesLoadedCount = 0,
|
||||
self = this;
|
||||
|
||||
// Bind functions to correct context
|
||||
this.clickTimer = $.proxy(this.clickTimer, this);
|
||||
this.addBullet = $.proxy(this.addBullet, this);
|
||||
this.resetAndUnlock = $.proxy(this.resetAndUnlock, this);
|
||||
this.stopClock = $.proxy(this.stopClock, this);
|
||||
this.startTimerAfterMouseLeave = $.proxy(this.startTimerAfterMouseLeave, this);
|
||||
this.clearClockMouseLeaveTimer = $.proxy(this.clearClockMouseLeaveTimer, this);
|
||||
this.rotateTimer = $.proxy(this.rotateTimer, this);
|
||||
|
||||
this.options = $.extend({}, this.defaults, options);
|
||||
if (this.options.timer === 'false') this.options.timer = false;
|
||||
if (this.options.captions === 'false') this.options.captions = false;
|
||||
if (this.options.directionalNav === 'false') this.options.directionalNav = false;
|
||||
|
||||
this.$element = $(element);
|
||||
this.$wrapper = this.$element.wrap(this.wrapperHTML).parent();
|
||||
this.$slides = this.$element.children('img, a, div');
|
||||
|
||||
this.$element.bind('orbit.next', function () {
|
||||
self.shift('next');
|
||||
});
|
||||
|
||||
this.$element.bind('orbit.prev', function () {
|
||||
self.shift('prev');
|
||||
});
|
||||
|
||||
this.$element.bind('orbit.goto', function (event, index) {
|
||||
self.shift(index);
|
||||
});
|
||||
|
||||
this.$element.bind('orbit.start', function (event, index) {
|
||||
self.startClock();
|
||||
});
|
||||
|
||||
this.$element.bind('orbit.stop', function (event, index) {
|
||||
self.stopClock();
|
||||
});
|
||||
|
||||
$imageSlides = this.$slides.filter('img');
|
||||
|
||||
if ($imageSlides.length === 0) {
|
||||
this.loaded();
|
||||
} else {
|
||||
$imageSlides.bind('imageready', function () {
|
||||
imagesLoadedCount += 1;
|
||||
if (imagesLoadedCount === $imageSlides.length) {
|
||||
self.loaded();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
loaded: function () {
|
||||
this.$element
|
||||
.addClass('orbit')
|
||||
.css({width: '1px', height: '1px'});
|
||||
|
||||
this.setDimentionsFromLargestSlide();
|
||||
this.updateOptionsIfOnlyOneSlide();
|
||||
this.setupFirstSlide();
|
||||
|
||||
if (this.options.timer) {
|
||||
this.setupTimer();
|
||||
this.startClock();
|
||||
}
|
||||
|
||||
if (this.options.captions) {
|
||||
this.setupCaptions();
|
||||
}
|
||||
|
||||
if (this.options.directionalNav) {
|
||||
this.setupDirectionalNav();
|
||||
}
|
||||
|
||||
if (this.options.bullets) {
|
||||
this.setupBulletNav();
|
||||
this.setActiveBullet();
|
||||
}
|
||||
},
|
||||
|
||||
currentSlide: function () {
|
||||
return this.$slides.eq(this.activeSlide);
|
||||
},
|
||||
|
||||
setDimentionsFromLargestSlide: function () {
|
||||
//Collect all slides and set slider size of largest image
|
||||
var self = this,
|
||||
$fluidPlaceholder;
|
||||
|
||||
self.$element.add(self.$wrapper).width(this.$slides.first().width());
|
||||
self.$element.add(self.$wrapper).height(this.$slides.first().height());
|
||||
self.orbitWidth = this.$slides.first().width();
|
||||
self.orbitHeight = this.$slides.first().height();
|
||||
$fluidPlaceholder = this.$slides.first().clone();
|
||||
|
||||
this.$slides.each(function () {
|
||||
var slide = $(this),
|
||||
slideWidth = slide.width(),
|
||||
slideHeight = slide.height();
|
||||
|
||||
if (slideWidth > self.$element.width()) {
|
||||
self.$element.add(self.$wrapper).width(slideWidth);
|
||||
self.orbitWidth = self.$element.width();
|
||||
}
|
||||
if (slideHeight > self.$element.height()) {
|
||||
self.$element.add(self.$wrapper).height(slideHeight);
|
||||
self.orbitHeight = self.$element.height();
|
||||
$fluidPlaceholder = $(this).clone();
|
||||
}
|
||||
self.numberSlides += 1;
|
||||
});
|
||||
|
||||
if (this.options.fluid) {
|
||||
if (typeof this.options.fluid === "string") {
|
||||
$fluidPlaceholder = $('<img src="http://placehold.it/' + this.options.fluid + '" />')
|
||||
}
|
||||
|
||||
self.$element.prepend($fluidPlaceholder);
|
||||
$fluidPlaceholder.addClass('fluid-placeholder');
|
||||
self.$element.add(self.$wrapper).css({width: 'inherit'});
|
||||
self.$element.add(self.$wrapper).css({height: 'inherit'});
|
||||
|
||||
$(window).bind('resize', function () {
|
||||
self.orbitWidth = self.$element.width();
|
||||
self.orbitHeight = self.$element.height();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//Animation locking functions
|
||||
lock: function () {
|
||||
this.locked = true;
|
||||
},
|
||||
|
||||
unlock: function () {
|
||||
this.locked = false;
|
||||
},
|
||||
|
||||
updateOptionsIfOnlyOneSlide: function () {
|
||||
if(this.$slides.length === 1) {
|
||||
this.options.directionalNav = false;
|
||||
this.options.timer = false;
|
||||
this.options.bullets = false;
|
||||
}
|
||||
},
|
||||
|
||||
setupFirstSlide: function () {
|
||||
//Set initial front photo z-index and fades it in
|
||||
var self = this;
|
||||
this.$slides.first()
|
||||
.css({"z-index" : 3})
|
||||
.fadeIn(function() {
|
||||
//brings in all other slides IF css declares a display: none
|
||||
self.$slides.css({"display":"block"})
|
||||
});
|
||||
},
|
||||
|
||||
startClock: function () {
|
||||
var self = this;
|
||||
|
||||
if(!this.options.timer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.$timer.is(':hidden')) {
|
||||
this.clock = setInterval(function () {
|
||||
this.$element.trigger('orbit.next');
|
||||
}, this.options.advanceSpeed);
|
||||
} else {
|
||||
this.timerRunning = true;
|
||||
this.$pause.removeClass('active')
|
||||
this.clock = setInterval(this.rotateTimer, this.options.advanceSpeed / 180);
|
||||
}
|
||||
},
|
||||
|
||||
rotateTimer: function () {
|
||||
var degreeCSS = "rotate(" + this.degrees + "deg)"
|
||||
this.degrees += 2;
|
||||
this.$rotator.css({
|
||||
"-webkit-transform": degreeCSS,
|
||||
"-moz-transform": degreeCSS,
|
||||
"-o-transform": degreeCSS
|
||||
});
|
||||
if(this.degrees > 180) {
|
||||
this.$rotator.addClass('move');
|
||||
this.$mask.addClass('move');
|
||||
}
|
||||
if(this.degrees > 360) {
|
||||
this.$rotator.removeClass('move');
|
||||
this.$mask.removeClass('move');
|
||||
this.degrees = 0;
|
||||
this.$element.trigger('orbit.next');
|
||||
}
|
||||
},
|
||||
|
||||
stopClock: function () {
|
||||
if (!this.options.timer) {
|
||||
return false;
|
||||
} else {
|
||||
this.timerRunning = false;
|
||||
clearInterval(this.clock);
|
||||
this.$pause.addClass('active');
|
||||
}
|
||||
},
|
||||
|
||||
setupTimer: function () {
|
||||
this.$timer = $(this.timerHTML);
|
||||
this.$wrapper.append(this.$timer);
|
||||
|
||||
this.$rotator = this.$timer.find('.rotator');
|
||||
this.$mask = this.$timer.find('.mask');
|
||||
this.$pause = this.$timer.find('.pause');
|
||||
|
||||
this.$timer.click(this.clickTimer);
|
||||
|
||||
if (this.options.startClockOnMouseOut) {
|
||||
this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);
|
||||
this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer);
|
||||
}
|
||||
|
||||
if (this.options.pauseOnHover) {
|
||||
this.$wrapper.mouseenter(this.stopClock);
|
||||
}
|
||||
},
|
||||
|
||||
startTimerAfterMouseLeave: function () {
|
||||
var self = this;
|
||||
|
||||
this.outTimer = setTimeout(function() {
|
||||
if(!self.timerRunning){
|
||||
self.startClock();
|
||||
}
|
||||
}, this.options.startClockOnMouseOutAfter)
|
||||
},
|
||||
|
||||
clearClockMouseLeaveTimer: function () {
|
||||
clearTimeout(this.outTimer);
|
||||
},
|
||||
|
||||
clickTimer: function () {
|
||||
if(!this.timerRunning) {
|
||||
this.startClock();
|
||||
} else {
|
||||
this.stopClock();
|
||||
}
|
||||
},
|
||||
|
||||
setupCaptions: function () {
|
||||
this.$caption = $(this.captionHTML);
|
||||
this.$wrapper.append(this.$caption);
|
||||
this.setCaption();
|
||||
},
|
||||
|
||||
setCaption: function () {
|
||||
var captionLocation = this.currentSlide().attr('data-caption'),
|
||||
captionHTML;
|
||||
|
||||
if (!this.options.captions) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Set HTML for the caption if it exists
|
||||
if (captionLocation) {
|
||||
captionHTML = $(captionLocation).html(); //get HTML from the matching HTML entity
|
||||
this.$caption
|
||||
.attr('id', captionLocation) // Add ID caption TODO why is the id being set?
|
||||
.html(captionHTML); // Change HTML in Caption
|
||||
//Animations for Caption entrances
|
||||
switch (this.options.captionAnimation) {
|
||||
case 'none':
|
||||
this.$caption.show();
|
||||
break;
|
||||
case 'fade':
|
||||
this.$caption.fadeIn(this.options.captionAnimationSpeed);
|
||||
break;
|
||||
case 'slideOpen':
|
||||
this.$caption.slideDown(this.options.captionAnimationSpeed);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
//Animations for Caption exits
|
||||
switch (this.options.captionAnimation) {
|
||||
case 'none':
|
||||
this.$caption.hide();
|
||||
break;
|
||||
case 'fade':
|
||||
this.$caption.fadeOut(this.options.captionAnimationSpeed);
|
||||
break;
|
||||
case 'slideOpen':
|
||||
this.$caption.slideUp(this.options.captionAnimationSpeed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setupDirectionalNav: function () {
|
||||
var self = this;
|
||||
|
||||
this.$wrapper.append(this.directionalNavHTML);
|
||||
|
||||
this.$wrapper.find('.left').click(function () {
|
||||
self.stopClock();
|
||||
self.$element.trigger('orbit.prev');
|
||||
});
|
||||
|
||||
this.$wrapper.find('.right').click(function () {
|
||||
self.stopClock();
|
||||
self.$element.trigger('orbit.next');
|
||||
});
|
||||
},
|
||||
|
||||
setupBulletNav: function () {
|
||||
this.$bullets = $(this.bulletHTML);
|
||||
this.$wrapper.append(this.$bullets);
|
||||
this.$slides.each(this.addBullet);
|
||||
if (this.options.centerBullets) this.$bullets.css('margin-left', -this.$bullets.width() / 2);
|
||||
},
|
||||
|
||||
addBullet: function (index, slide) {
|
||||
var position = index + 1,
|
||||
$li = $('<li>' + (position) + '</li>'),
|
||||
thumbName,
|
||||
self = this;
|
||||
|
||||
if (this.options.bulletThumbs) {
|
||||
thumbName = $(slide).attr('data-thumb');
|
||||
if (thumbName) {
|
||||
$li
|
||||
.addClass('has-thumb')
|
||||
.css({background: "url(" + this.options.bulletThumbLocation + thumbName + ") no-repeat"});;
|
||||
}
|
||||
}
|
||||
this.$bullets.append($li);
|
||||
$li.data('index', index);
|
||||
$li.click(function () {
|
||||
self.stopClock();
|
||||
self.$element.trigger('orbit.goto', [$li.data('index')])
|
||||
});
|
||||
},
|
||||
|
||||
setActiveBullet: function () {
|
||||
if(!this.options.bullets) { return false; } else {
|
||||
this.$bullets.find('li')
|
||||
.removeClass('active')
|
||||
.eq(this.activeSlide)
|
||||
.addClass('active');
|
||||
}
|
||||
},
|
||||
|
||||
resetAndUnlock: function () {
|
||||
this.$slides
|
||||
.eq(this.prevActiveSlide)
|
||||
.css({"z-index" : 1});
|
||||
this.unlock();
|
||||
this.options.afterSlideChange.call(this, this.$slides.eq(this.prevActiveSlide), this.$slides.eq(this.activeSlide));
|
||||
},
|
||||
|
||||
shift: function (direction) {
|
||||
var slideDirection = direction;
|
||||
|
||||
//remember previous activeSlide
|
||||
this.prevActiveSlide = this.activeSlide;
|
||||
|
||||
//exit function if bullet clicked is same as the current image
|
||||
if (this.prevActiveSlide == slideDirection) { return false; }
|
||||
|
||||
if (this.$slides.length == "1") { return false; }
|
||||
if (!this.locked) {
|
||||
this.lock();
|
||||
//deduce the proper activeImage
|
||||
if (direction == "next") {
|
||||
this.activeSlide++;
|
||||
if (this.activeSlide == this.numberSlides) {
|
||||
this.activeSlide = 0;
|
||||
}
|
||||
} else if (direction == "prev") {
|
||||
this.activeSlide--
|
||||
if (this.activeSlide < 0) {
|
||||
this.activeSlide = this.numberSlides - 1;
|
||||
}
|
||||
} else {
|
||||
this.activeSlide = direction;
|
||||
if (this.prevActiveSlide < this.activeSlide) {
|
||||
slideDirection = "next";
|
||||
} else if (this.prevActiveSlide > this.activeSlide) {
|
||||
slideDirection = "prev"
|
||||
}
|
||||
}
|
||||
|
||||
//set to correct bullet
|
||||
this.setActiveBullet();
|
||||
|
||||
//set previous slide z-index to one below what new activeSlide will be
|
||||
this.$slides
|
||||
.eq(this.prevActiveSlide)
|
||||
.css({"z-index" : 2});
|
||||
|
||||
//fade
|
||||
if (this.options.animation == "fade") {
|
||||
this.$slides
|
||||
.eq(this.activeSlide)
|
||||
.css({"opacity" : 0, "z-index" : 3})
|
||||
.animate({"opacity" : 1}, this.options.animationSpeed, this.resetAndUnlock);
|
||||
}
|
||||
|
||||
//horizontal-slide
|
||||
if (this.options.animation == "horizontal-slide") {
|
||||
if (slideDirection == "next") {
|
||||
this.$slides
|
||||
.eq(this.activeSlide)
|
||||
.css({"left": this.orbitWidth, "z-index" : 3})
|
||||
.animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
||||
}
|
||||
if (slideDirection == "prev") {
|
||||
this.$slides
|
||||
.eq(this.activeSlide)
|
||||
.css({"left": -this.orbitWidth, "z-index" : 3})
|
||||
.animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
||||
}
|
||||
}
|
||||
|
||||
//vertical-slide
|
||||
if (this.options.animation == "vertical-slide") {
|
||||
if (slideDirection == "prev") {
|
||||
this.$slides
|
||||
.eq(this.activeSlide)
|
||||
.css({"top": this.orbitHeight, "z-index" : 3})
|
||||
.animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
||||
}
|
||||
if (slideDirection == "next") {
|
||||
this.$slides
|
||||
.eq(this.activeSlide)
|
||||
.css({"top": -this.orbitHeight, "z-index" : 3})
|
||||
.animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
||||
}
|
||||
}
|
||||
|
||||
//horizontal-push
|
||||
if (this.options.animation == "horizontal-push") {
|
||||
if (slideDirection == "next") {
|
||||
this.$slides
|
||||
.eq(this.activeSlide)
|
||||
.css({"left": this.orbitWidth, "z-index" : 3})
|
||||
.animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
||||
this.$slides
|
||||
.eq(this.prevActiveSlide)
|
||||
.animate({"left" : -this.orbitWidth}, this.options.animationSpeed);
|
||||
}
|
||||
if (slideDirection == "prev") {
|
||||
this.$slides
|
||||
.eq(this.activeSlide)
|
||||
.css({"left": -this.orbitWidth, "z-index" : 3})
|
||||
.animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
||||
this.$slides
|
||||
.eq(this.prevActiveSlide)
|
||||
.animate({"left" : this.orbitWidth}, this.options.animationSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
//vertical-push
|
||||
if (this.options.animation == "vertical-push") {
|
||||
if (slideDirection == "next") {
|
||||
this.$slides
|
||||
.eq(this.activeSlide)
|
||||
.css({top: -this.orbitHeight, "z-index" : 3})
|
||||
.animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
||||
this.$slides
|
||||
.eq(this.prevActiveSlide)
|
||||
.animate({top : this.orbitHeight}, this.options.animationSpeed);
|
||||
}
|
||||
if (slideDirection == "prev") {
|
||||
this.$slides
|
||||
.eq(this.activeSlide)
|
||||
.css({top: this.orbitHeight, "z-index" : 3})
|
||||
.animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
||||
this.$slides
|
||||
.eq(this.prevActiveSlide)
|
||||
.animate({top : -this.orbitHeight}, this.options.animationSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
this.setCaption();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.orbit = function (options) {
|
||||
return this.each(function () {
|
||||
var orbit = $.extend({}, ORBIT);
|
||||
orbit.init(this, options);
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/*!
|
||||
* jQuery imageready Plugin
|
||||
* http://www.zurb.com/playground/
|
||||
*
|
||||
* Copyright 2011, ZURB
|
||||
* Released under the MIT License
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
var options = {};
|
||||
|
||||
$.event.special.imageready = {
|
||||
|
||||
setup: function (data, namespaces, eventHandle) {
|
||||
options = data || options;
|
||||
},
|
||||
|
||||
add: function (handleObj) {
|
||||
var $this = $(this),
|
||||
src;
|
||||
|
||||
if ( this.nodeType === 1 && this.tagName.toLowerCase() === 'img' && this.src !== '' ) {
|
||||
if (options.forceLoad) {
|
||||
src = $this.attr('src');
|
||||
$this.attr('src', '');
|
||||
bindToLoad(this, handleObj.handler);
|
||||
$this.attr('src', src);
|
||||
} else if ( this.complete || this.readyState === 4 ) {
|
||||
handleObj.handler.apply(this, arguments);
|
||||
} else {
|
||||
bindToLoad(this, handleObj.handler);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
teardown: function (namespaces) {
|
||||
$(this).unbind('.imageready');
|
||||
}
|
||||
};
|
||||
|
||||
function bindToLoad(element, callback) {
|
||||
var $this = $(element);
|
||||
|
||||
$this.bind('load.imageready', function () {
|
||||
callback.apply(element, arguments);
|
||||
$this.unbind('load.imageready');
|
||||
});
|
||||
}
|
||||
|
||||
}(jQuery));
|
||||
2
js/foundation/jquery.placeholder.min.js
vendored
2
js/foundation/jquery.placeholder.min.js
vendored
@@ -1,2 +0,0 @@
|
||||
/*! http://mths.be/placeholder v1.8.5 by @mathias */
|
||||
(function(g,a,$){var f='placeholder' in a.createElement('input'),b='placeholder' in a.createElement('textarea');if(f&&b){$.fn.placeholder=function(){return this};$.fn.placeholder.input=$.fn.placeholder.textarea=true}else{$.fn.placeholder=function(){return this.filter((f?'textarea':':input')+'[placeholder]').bind('focus.placeholder',c).bind('blur.placeholder',e).trigger('blur.placeholder').end()};$.fn.placeholder.input=f;$.fn.placeholder.textarea=b;$(function(){$('form').bind('submit.placeholder',function(){var h=$('.placeholder',this).each(c);setTimeout(function(){h.each(e)},10)})});$(g).bind('unload.placeholder',function(){$('.placeholder').val('')})}function d(i){var h={},j=/^jQuery\d+$/;$.each(i.attributes,function(l,k){if(k.specified&&!j.test(k.name)){h[k.name]=k.value}});return h}function c(){var h=$(this);if(h.val()===h.attr('placeholder')&&h.hasClass('placeholder')){if(h.data('placeholder-password')){h.hide().next().show().focus().attr('id',h.removeAttr('id').data('placeholder-id'))}else{h.val('').removeClass('placeholder')}}}function e(){var l,k=$(this),h=k,j=this.id;if(k.val()===''){if(k.is(':password')){if(!k.data('placeholder-textinput')){try{l=k.clone().attr({type:'text'})}catch(i){l=$('<input>').attr($.extend(d(this),{type:'text'}))}l.removeAttr('name').data('placeholder-password',true).data('placeholder-id',j).bind('focus.placeholder',c);k.data('placeholder-textinput',l).data('placeholder-id',j).before(l)}k=k.removeAttr('id').hide().prev().attr('id',j).show()}k.addClass('placeholder').val(k.attr('placeholder'))}else{k.removeClass('placeholder')}}}(this,document,jQuery));
|
||||
@@ -1,150 +0,0 @@
|
||||
/*
|
||||
* jQuery Reveal Plugin 1.0
|
||||
* www.ZURB.com
|
||||
* Copyright 2010, ZURB
|
||||
* Free to use under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
|
||||
(function($) {
|
||||
|
||||
/*---------------------------
|
||||
Defaults for Reveal
|
||||
----------------------------*/
|
||||
|
||||
/*---------------------------
|
||||
Listener for data-reveal-id attributes
|
||||
----------------------------*/
|
||||
|
||||
$('a[data-reveal-id]').live('click', function(e) {
|
||||
e.preventDefault();
|
||||
var modalLocation = $(this).attr('data-reveal-id');
|
||||
$('#'+modalLocation).reveal($(this).data());
|
||||
});
|
||||
|
||||
/*---------------------------
|
||||
Extend and Execute
|
||||
----------------------------*/
|
||||
|
||||
$.fn.reveal = function(options) {
|
||||
|
||||
|
||||
var defaults = {
|
||||
animation: 'fadeAndPop', //fade, fadeAndPop, none
|
||||
animationspeed: 300, //how fast animtions are
|
||||
closeonbackgroundclick: true, //if you click background will modal close?
|
||||
dismissmodalclass: 'close-reveal-modal' //the class of a button or element that will close an open modal
|
||||
};
|
||||
|
||||
//Extend dem' options
|
||||
var options = $.extend({}, defaults, options);
|
||||
|
||||
return this.each(function() {
|
||||
|
||||
/*---------------------------
|
||||
Global Variables
|
||||
----------------------------*/
|
||||
var modal = $(this),
|
||||
topMeasure = parseInt(modal.css('top')),
|
||||
topOffset = modal.height() + topMeasure,
|
||||
locked = false,
|
||||
modalBG = $('.reveal-modal-bg');
|
||||
|
||||
/*---------------------------
|
||||
Create Modal BG
|
||||
----------------------------*/
|
||||
if(modalBG.length == 0) {
|
||||
modalBG = $('<div class="reveal-modal-bg" />').insertAfter(modal);
|
||||
}
|
||||
|
||||
/*---------------------------
|
||||
Open and add Closing Listeners
|
||||
----------------------------*/
|
||||
//Open Modal Immediately
|
||||
openModal();
|
||||
|
||||
//Close Modal Listeners
|
||||
var closeButton = $('.' + options.dismissmodalclass).bind('click.modalEvent',closeModal)
|
||||
if(options.closeonbackgroundclick) {
|
||||
modalBG.css({"cursor":"pointer"})
|
||||
modalBG.bind('click.modalEvent',closeModal)
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------
|
||||
Open & Close Animations
|
||||
----------------------------*/
|
||||
//Entrance Animations
|
||||
function openModal() {
|
||||
modalBG.unbind('click.modalEvent');
|
||||
$('.' + options.dismissmodalclass).unbind('click.modalEvent');
|
||||
if(!locked) {
|
||||
lockModal();
|
||||
if(options.animation == "fadeAndPop") {
|
||||
modal.css({'top': $(document).scrollTop()-topOffset, 'opacity' : 0, 'visibility' : 'visible'});
|
||||
modalBG.fadeIn(options.animationspeed/2);
|
||||
modal.delay(options.animationspeed/2).animate({
|
||||
"top": $(document).scrollTop()+topMeasure,
|
||||
"opacity" : 1
|
||||
}, options.animationspeed,unlockModal());
|
||||
}
|
||||
if(options.animation == "fade") {
|
||||
modal.css({'opacity' : 0, 'visibility' : 'visible', 'top': $(document).scrollTop()+topMeasure});
|
||||
modalBG.fadeIn(options.animationspeed/2);
|
||||
modal.delay(options.animationspeed/2).animate({
|
||||
"opacity" : 1
|
||||
}, options.animationspeed,unlockModal());
|
||||
}
|
||||
if(options.animation == "none") {
|
||||
modal.css({'visibility' : 'visible', 'top':$(document).scrollTop()+topMeasure});
|
||||
modalBG.css({"display":"block"});
|
||||
unlockModal()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Closing Animation
|
||||
function closeModal() {
|
||||
if(!locked) {
|
||||
lockModal();
|
||||
if(options.animation == "fadeAndPop") {
|
||||
modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
|
||||
modal.animate({
|
||||
"top": $(document).scrollTop()-topOffset,
|
||||
"opacity" : 0
|
||||
}, options.animationspeed/2, function() {
|
||||
modal.css({'top':topMeasure, 'opacity' : 1, 'visibility' : 'hidden'});
|
||||
unlockModal();
|
||||
});
|
||||
}
|
||||
if(options.animation == "fade") {
|
||||
modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
|
||||
modal.animate({
|
||||
"opacity" : 0
|
||||
}, options.animationspeed, function() {
|
||||
modal.css({'opacity' : 1, 'visibility' : 'hidden', 'top' : topMeasure});
|
||||
unlockModal();
|
||||
});
|
||||
}
|
||||
if(options.animation == "none") {
|
||||
modal.css({'visibility' : 'hidden', 'top' : topMeasure});
|
||||
modalBG.css({'display' : 'none'});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------
|
||||
Animations Locks
|
||||
----------------------------*/
|
||||
function unlockModal() {
|
||||
locked = false;
|
||||
}
|
||||
function lockModal() {
|
||||
locked = true;
|
||||
}
|
||||
|
||||
});//each call
|
||||
}//orbit plugin call
|
||||
})(jQuery);
|
||||
|
||||
1
js/libs/adapt.min.js
vendored
1
js/libs/adapt.min.js
vendored
@@ -1 +0,0 @@
|
||||
(function(a,b,c,d){function o(){clearInterval(g),g=setInterval(n,100)}function n(){clearInterval(g);var c=a.innerWidth||b.documentElement.clientWidth||b.body.clientWidth||0,h,n,o,p,q,r,s=k,t=k-1;while(s--){h=j[s].split("="),n=h[0],r=h[1]?h[1].replace(/\s/g,""):s,q=n.match("to"),o=q?parseInt(n.split("to")[0],10):parseInt(n,10),p=q?parseInt(n.split("to")[1],10):d;if(!p&&s===t&&c>o||c>o&&c<=p){e=i+r;break}e=""}f?f!==e&&m(s,c):(m(s,c),i&&(b.head||b.getElementsByTagName("head")[0]).appendChild(l))}function m(a,b){l.href=e,f=e,h&&h(a,b)}if(!!c){var e,f,g,h=typeof c.callback=="function"?c.callback:d,i=c.path?c.path:"",j=c.range,k=j.length,l=b.createElement("link");l.rel="stylesheet",n(),c.dynamic&&(a.addEventListener?a.addEventListener("resize",o,!1):a.attachEvent?a.attachEvent("onresize",o):a.onresize=o)}})(this,this.document,ADAPT_CONFIG)
|
||||
@@ -1,779 +0,0 @@
|
||||
if(typeof Object.create!=="function"){
|
||||
Object.create=function(o){
|
||||
function F(){
|
||||
};
|
||||
F.prototype=o;
|
||||
return new F();
|
||||
};
|
||||
}
|
||||
var ua={toString:function(){
|
||||
return navigator.userAgent;
|
||||
},test:function(s){
|
||||
return this.toString().toLowerCase().indexOf(s.toLowerCase())>-1;
|
||||
}};
|
||||
ua.version=(ua.toString().toLowerCase().match(/[\s\S]+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1];
|
||||
ua.webkit=ua.test("webkit");
|
||||
ua.gecko=ua.test("gecko")&&!ua.webkit;
|
||||
ua.opera=ua.test("opera");
|
||||
ua.ie=ua.test("msie")&&!ua.opera;
|
||||
ua.ie6=ua.ie&&document.compatMode&&typeof document.documentElement.style.maxHeight==="undefined";
|
||||
ua.ie7=ua.ie&&document.documentElement&&typeof document.documentElement.style.maxHeight!=="undefined"&&typeof XDomainRequest==="undefined";
|
||||
ua.ie8=ua.ie&&typeof XDomainRequest!=="undefined";
|
||||
var domReady=function(){
|
||||
var _1=[];
|
||||
var _2=function(){
|
||||
if(!arguments.callee.done){
|
||||
arguments.callee.done=true;
|
||||
for(var i=0;i<_1.length;i++){
|
||||
_1[i]();
|
||||
}
|
||||
}
|
||||
};
|
||||
if(document.addEventListener){
|
||||
document.addEventListener("DOMContentLoaded",_2,false);
|
||||
}
|
||||
if(ua.ie){
|
||||
(function(){
|
||||
try{
|
||||
document.documentElement.doScroll("left");
|
||||
}
|
||||
catch(e){
|
||||
setTimeout(arguments.callee,50);
|
||||
return;
|
||||
}
|
||||
_2();
|
||||
})();
|
||||
document.onreadystatechange=function(){
|
||||
if(document.readyState==="complete"){
|
||||
document.onreadystatechange=null;
|
||||
_2();
|
||||
}
|
||||
};
|
||||
}
|
||||
if(ua.webkit&&document.readyState){
|
||||
(function(){
|
||||
if(document.readyState!=="loading"){
|
||||
_2();
|
||||
}else{
|
||||
setTimeout(arguments.callee,10);
|
||||
}
|
||||
})();
|
||||
}
|
||||
window.onload=_2;
|
||||
return function(fn){
|
||||
if(typeof fn==="function"){
|
||||
_1[_1.length]=fn;
|
||||
}
|
||||
return fn;
|
||||
};
|
||||
}();
|
||||
var cssHelper=function(){
|
||||
var _3={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;)/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g};
|
||||
var _4,_5=false;
|
||||
var _6=[];
|
||||
var _7=function(fn){
|
||||
if(typeof fn==="function"){
|
||||
_6[_6.length]=fn;
|
||||
}
|
||||
};
|
||||
var _8=function(){
|
||||
for(var i=0;i<_6.length;i++){
|
||||
_6[i](_4);
|
||||
}
|
||||
};
|
||||
var _9={};
|
||||
var _a=function(n,v){
|
||||
if(_9[n]){
|
||||
var _b=_9[n].listeners;
|
||||
if(_b){
|
||||
for(var i=0;i<_b.length;i++){
|
||||
_b[i](v);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
var _c=function(_d,_e,_f){
|
||||
if(ua.ie&&!window.XMLHttpRequest){
|
||||
window.XMLHttpRequest=function(){
|
||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
};
|
||||
}
|
||||
if(!XMLHttpRequest){
|
||||
return "";
|
||||
}
|
||||
var r=new XMLHttpRequest();
|
||||
try{
|
||||
r.open("get",_d,true);
|
||||
r.setRequestHeader("X_REQUESTED_WITH","XMLHttpRequest");
|
||||
}
|
||||
catch(e){
|
||||
_f();
|
||||
return;
|
||||
}
|
||||
var _10=false;
|
||||
setTimeout(function(){
|
||||
_10=true;
|
||||
},5000);
|
||||
document.documentElement.style.cursor="progress";
|
||||
r.onreadystatechange=function(){
|
||||
if(r.readyState===4&&!_10){
|
||||
if(!r.status&&location.protocol==="file:"||(r.status>=200&&r.status<300)||r.status===304||navigator.userAgent.indexOf("Safari")>-1&&typeof r.status==="undefined"){
|
||||
_e(r.responseText);
|
||||
}else{
|
||||
_f();
|
||||
}
|
||||
document.documentElement.style.cursor="";
|
||||
r=null;
|
||||
}
|
||||
};
|
||||
r.send("");
|
||||
};
|
||||
var _11=function(_12){
|
||||
_12=_12.replace(_3.REDUNDANT_COMPONENTS,"");
|
||||
_12=_12.replace(_3.REDUNDANT_WHITESPACE,"$1");
|
||||
_12=_12.replace(_3.MORE_WHITESPACE," ");
|
||||
_12=_12.replace(_3.FINAL_SEMICOLONS,"}");
|
||||
return _12;
|
||||
};
|
||||
var _13={mediaQueryList:function(s){
|
||||
var o={};
|
||||
var idx=s.indexOf("{");
|
||||
var lt=s.substring(0,idx);
|
||||
s=s.substring(idx+1,s.length-1);
|
||||
var mqs=[],rs=[];
|
||||
var qts=lt.toLowerCase().substring(7).split(",");
|
||||
for(var i=0;i<qts.length;i++){
|
||||
mqs[mqs.length]=_13.mediaQuery(qts[i],o);
|
||||
}
|
||||
var rts=s.match(_3.BLOCKS_INSIDE);
|
||||
if(rts!==null){
|
||||
for(i=0;i<rts.length;i++){
|
||||
rs[rs.length]=_13.rule(rts[i],o);
|
||||
}
|
||||
}
|
||||
o.getMediaQueries=function(){
|
||||
return mqs;
|
||||
};
|
||||
o.getRules=function(){
|
||||
return rs;
|
||||
};
|
||||
o.getListText=function(){
|
||||
return lt;
|
||||
};
|
||||
o.getCssText=function(){
|
||||
return s;
|
||||
};
|
||||
return o;
|
||||
},mediaQuery:function(s,mql){
|
||||
s=s||"";
|
||||
var not=false,_14;
|
||||
var exp=[];
|
||||
var _15=true;
|
||||
var _16=s.match(_3.NOT_WHITESPACE);
|
||||
for(var i=0;i<_16.length;i++){
|
||||
var _17=_16[i];
|
||||
if(!_14&&(_17==="not"||_17==="only")){
|
||||
if(_17==="not"){
|
||||
not=true;
|
||||
}
|
||||
}else{
|
||||
if(!_14){
|
||||
_14=_17;
|
||||
}else{
|
||||
if(_17.charAt(0)==="("){
|
||||
var _18=_17.substring(1,_17.length-1).split(":");
|
||||
exp[exp.length]={mediaFeature:_18[0],value:_18[1]||null};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return {getList:function(){
|
||||
return mql||null;
|
||||
},getValid:function(){
|
||||
return _15;
|
||||
},getNot:function(){
|
||||
return not;
|
||||
},getMediaType:function(){
|
||||
return _14;
|
||||
},getExpressions:function(){
|
||||
return exp;
|
||||
}};
|
||||
},rule:function(s,mql){
|
||||
var o={};
|
||||
var idx=s.indexOf("{");
|
||||
var st=s.substring(0,idx);
|
||||
var ss=st.split(",");
|
||||
var ds=[];
|
||||
var dts=s.substring(idx+1,s.length-1).split(";");
|
||||
for(var i=0;i<dts.length;i++){
|
||||
ds[ds.length]=_13.declaration(dts[i],o);
|
||||
}
|
||||
o.getMediaQueryList=function(){
|
||||
return mql||null;
|
||||
};
|
||||
o.getSelectors=function(){
|
||||
return ss;
|
||||
};
|
||||
o.getSelectorText=function(){
|
||||
return st;
|
||||
};
|
||||
o.getDeclarations=function(){
|
||||
return ds;
|
||||
};
|
||||
o.getPropertyValue=function(n){
|
||||
for(var i=0;i<ds.length;i++){
|
||||
if(ds[i].getProperty()===n){
|
||||
return ds[i].getValue();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
return o;
|
||||
},declaration:function(s,r){
|
||||
var idx=s.indexOf(":");
|
||||
var p=s.substring(0,idx);
|
||||
var v=s.substring(idx+1);
|
||||
return {getRule:function(){
|
||||
return r||null;
|
||||
},getProperty:function(){
|
||||
return p;
|
||||
},getValue:function(){
|
||||
return v;
|
||||
}};
|
||||
}};
|
||||
var _19=function(el){
|
||||
if(typeof el.cssHelperText!=="string"){
|
||||
return;
|
||||
}
|
||||
var o={mediaQueryLists:[],rules:[],selectors:{},declarations:[],properties:{}};
|
||||
var _1a=o.mediaQueryLists;
|
||||
var ors=o.rules;
|
||||
var _1b=el.cssHelperText.match(_3.BLOCKS);
|
||||
if(_1b!==null){
|
||||
for(var i=0;i<_1b.length;i++){
|
||||
if(_1b[i].substring(0,7)==="@media "){
|
||||
_1a[_1a.length]=_13.mediaQueryList(_1b[i]);
|
||||
ors=o.rules=ors.concat(_1a[_1a.length-1].getRules());
|
||||
}else{
|
||||
ors[ors.length]=_13.rule(_1b[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
var oss=o.selectors;
|
||||
var _1c=function(r){
|
||||
var ss=r.getSelectors();
|
||||
for(var i=0;i<ss.length;i++){
|
||||
var n=ss[i];
|
||||
if(!oss[n]){
|
||||
oss[n]=[];
|
||||
}
|
||||
oss[n][oss[n].length]=r;
|
||||
}
|
||||
};
|
||||
for(i=0;i<ors.length;i++){
|
||||
_1c(ors[i]);
|
||||
}
|
||||
var ods=o.declarations;
|
||||
for(i=0;i<ors.length;i++){
|
||||
ods=o.declarations=ods.concat(ors[i].getDeclarations());
|
||||
}
|
||||
var ops=o.properties;
|
||||
for(i=0;i<ods.length;i++){
|
||||
var n=ods[i].getProperty();
|
||||
if(!ops[n]){
|
||||
ops[n]=[];
|
||||
}
|
||||
ops[n][ops[n].length]=ods[i];
|
||||
}
|
||||
el.cssHelperParsed=o;
|
||||
_4[_4.length]=el;
|
||||
return o;
|
||||
};
|
||||
var _1d=function(el,s){
|
||||
el.cssHelperText=_11(s||el.innerHTML);
|
||||
return _19(el);
|
||||
};
|
||||
var _1e=function(){
|
||||
_5=true;
|
||||
_4=[];
|
||||
var _1f=[];
|
||||
var _20=function(){
|
||||
for(var i=0;i<_1f.length;i++){
|
||||
_19(_1f[i]);
|
||||
}
|
||||
var _21=document.getElementsByTagName("style");
|
||||
for(i=0;i<_21.length;i++){
|
||||
_1d(_21[i]);
|
||||
}
|
||||
_5=false;
|
||||
_8();
|
||||
};
|
||||
var _22=document.getElementsByTagName("link");
|
||||
for(var i=0;i<_22.length;i++){
|
||||
var _23=_22[i];
|
||||
if(_23.getAttribute("rel").indexOf("style")>-1&&_23.href&&_23.href.length!==0&&!_23.disabled){
|
||||
_1f[_1f.length]=_23;
|
||||
}
|
||||
}
|
||||
if(_1f.length>0){
|
||||
var c=0;
|
||||
var _24=function(){
|
||||
c++;
|
||||
if(c===_1f.length){
|
||||
_20();
|
||||
}
|
||||
};
|
||||
var _25=function(_26){
|
||||
var _27=_26.href;
|
||||
_c(_27,function(_28){
|
||||
_28=_11(_28).replace(_3.RELATIVE_URLS,"url("+_27.substring(0,_27.lastIndexOf("/"))+"/$1)");
|
||||
_26.cssHelperText=_28;
|
||||
_24();
|
||||
},_24);
|
||||
};
|
||||
for(i=0;i<_1f.length;i++){
|
||||
_25(_1f[i]);
|
||||
}
|
||||
}else{
|
||||
_20();
|
||||
}
|
||||
};
|
||||
var _29={mediaQueryLists:"array",rules:"array",selectors:"object",declarations:"array",properties:"object"};
|
||||
var _2a={mediaQueryLists:null,rules:null,selectors:null,declarations:null,properties:null};
|
||||
var _2b=function(_2c,v){
|
||||
if(_2a[_2c]!==null){
|
||||
if(_29[_2c]==="array"){
|
||||
return (_2a[_2c]=_2a[_2c].concat(v));
|
||||
}else{
|
||||
var c=_2a[_2c];
|
||||
for(var n in v){
|
||||
if(v.hasOwnProperty(n)){
|
||||
if(!c[n]){
|
||||
c[n]=v[n];
|
||||
}else{
|
||||
c[n]=c[n].concat(v[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
}
|
||||
};
|
||||
var _2d=function(_2e){
|
||||
_2a[_2e]=(_29[_2e]==="array")?[]:{};
|
||||
for(var i=0;i<_4.length;i++){
|
||||
_2b(_2e,_4[i].cssHelperParsed[_2e]);
|
||||
}
|
||||
return _2a[_2e];
|
||||
};
|
||||
domReady(function(){
|
||||
var els=document.body.getElementsByTagName("*");
|
||||
for(var i=0;i<els.length;i++){
|
||||
els[i].checkedByCssHelper=true;
|
||||
}
|
||||
if(document.implementation.hasFeature("MutationEvents","2.0")||window.MutationEvent){
|
||||
document.body.addEventListener("DOMNodeInserted",function(e){
|
||||
var el=e.target;
|
||||
if(el.nodeType===1){
|
||||
_a("DOMElementInserted",el);
|
||||
el.checkedByCssHelper=true;
|
||||
}
|
||||
},false);
|
||||
}else{
|
||||
setInterval(function(){
|
||||
var els=document.body.getElementsByTagName("*");
|
||||
for(var i=0;i<els.length;i++){
|
||||
if(!els[i].checkedByCssHelper){
|
||||
_a("DOMElementInserted",els[i]);
|
||||
els[i].checkedByCssHelper=true;
|
||||
}
|
||||
}
|
||||
},1000);
|
||||
}
|
||||
});
|
||||
var _2f=function(d){
|
||||
if(typeof window.innerWidth!="undefined"){
|
||||
return window["inner"+d];
|
||||
}else{
|
||||
if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){
|
||||
return document.documentElement["client"+d];
|
||||
}
|
||||
}
|
||||
};
|
||||
return {addStyle:function(s,_30){
|
||||
var el=document.createElement("style");
|
||||
el.setAttribute("type","text/css");
|
||||
document.getElementsByTagName("head")[0].appendChild(el);
|
||||
if(el.styleSheet){
|
||||
el.styleSheet.cssText=s;
|
||||
}else{
|
||||
el.appendChild(document.createTextNode(s));
|
||||
}
|
||||
el.addedWithCssHelper=true;
|
||||
if(typeof _30==="undefined"||_30===true){
|
||||
cssHelper.parsed(function(_31){
|
||||
var o=_1d(el,s);
|
||||
for(var n in o){
|
||||
if(o.hasOwnProperty(n)){
|
||||
_2b(n,o[n]);
|
||||
}
|
||||
}
|
||||
_a("newStyleParsed",el);
|
||||
});
|
||||
}else{
|
||||
el.parsingDisallowed=true;
|
||||
}
|
||||
return el;
|
||||
},removeStyle:function(el){
|
||||
return el.parentNode.removeChild(el);
|
||||
},parsed:function(fn){
|
||||
if(_5){
|
||||
_7(fn);
|
||||
}else{
|
||||
if(typeof _4!=="undefined"){
|
||||
if(typeof fn==="function"){
|
||||
fn(_4);
|
||||
}
|
||||
}else{
|
||||
_7(fn);
|
||||
_1e();
|
||||
}
|
||||
}
|
||||
},mediaQueryLists:function(fn){
|
||||
cssHelper.parsed(function(_32){
|
||||
fn(_2a.mediaQueryLists||_2d("mediaQueryLists"));
|
||||
});
|
||||
},rules:function(fn){
|
||||
cssHelper.parsed(function(_33){
|
||||
fn(_2a.rules||_2d("rules"));
|
||||
});
|
||||
},selectors:function(fn){
|
||||
cssHelper.parsed(function(_34){
|
||||
fn(_2a.selectors||_2d("selectors"));
|
||||
});
|
||||
},declarations:function(fn){
|
||||
cssHelper.parsed(function(_35){
|
||||
fn(_2a.declarations||_2d("declarations"));
|
||||
});
|
||||
},properties:function(fn){
|
||||
cssHelper.parsed(function(_36){
|
||||
fn(_2a.properties||_2d("properties"));
|
||||
});
|
||||
},broadcast:_a,addListener:function(n,fn){
|
||||
if(typeof fn==="function"){
|
||||
if(!_9[n]){
|
||||
_9[n]={listeners:[]};
|
||||
}
|
||||
_9[n].listeners[_9[n].listeners.length]=fn;
|
||||
}
|
||||
},removeListener:function(n,fn){
|
||||
if(typeof fn==="function"&&_9[n]){
|
||||
var ls=_9[n].listeners;
|
||||
for(var i=0;i<ls.length;i++){
|
||||
if(ls[i]===fn){
|
||||
ls.splice(i,1);
|
||||
i-=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
},getViewportWidth:function(){
|
||||
return _2f("Width");
|
||||
},getViewportHeight:function(){
|
||||
return _2f("Height");
|
||||
}};
|
||||
}();
|
||||
domReady(function enableCssMediaQueries(){
|
||||
var _37;
|
||||
var _38={LENGTH_UNIT:/[0-9]+(em|ex|px|in|cm|mm|pt|pc)$/,RESOLUTION_UNIT:/[0-9]+(dpi|dpcm)$/,ASPECT_RATIO:/^[0-9]+\/[0-9]+$/,ABSOLUTE_VALUE:/^[0-9]*(\.[0-9]+)*$/};
|
||||
var _39=[];
|
||||
var _3a=function(){
|
||||
var id="css3-mediaqueries-test";
|
||||
var el=document.createElement("div");
|
||||
el.id=id;
|
||||
var _3b=cssHelper.addStyle("@media all and (width) { #"+id+" { width: 1px !important; } }",false);
|
||||
document.body.appendChild(el);
|
||||
var ret=el.offsetWidth===1;
|
||||
_3b.parentNode.removeChild(_3b);
|
||||
el.parentNode.removeChild(el);
|
||||
_3a=function(){
|
||||
return ret;
|
||||
};
|
||||
return ret;
|
||||
};
|
||||
var _3c=function(){
|
||||
_37=document.createElement("div");
|
||||
_37.style.cssText="position:absolute;top:-9999em;left:-9999em;"+"margin:0;border:none;padding:0;width:1em;font-size:1em;";
|
||||
document.body.appendChild(_37);
|
||||
if(_37.offsetWidth!==16){
|
||||
_37.style.fontSize=16/_37.offsetWidth+"em";
|
||||
}
|
||||
_37.style.width="";
|
||||
};
|
||||
var _3d=function(_3e){
|
||||
_37.style.width=_3e;
|
||||
var _3f=_37.offsetWidth;
|
||||
_37.style.width="";
|
||||
return _3f;
|
||||
};
|
||||
var _40=function(_41,_42){
|
||||
var l=_41.length;
|
||||
var min=(_41.substring(0,4)==="min-");
|
||||
var max=(!min&&_41.substring(0,4)==="max-");
|
||||
if(_42!==null){
|
||||
var _43;
|
||||
var _44;
|
||||
if(_38.LENGTH_UNIT.exec(_42)){
|
||||
_43="length";
|
||||
_44=_3d(_42);
|
||||
}else{
|
||||
if(_38.RESOLUTION_UNIT.exec(_42)){
|
||||
_43="resolution";
|
||||
_44=parseInt(_42,10);
|
||||
var _45=_42.substring((_44+"").length);
|
||||
}else{
|
||||
if(_38.ASPECT_RATIO.exec(_42)){
|
||||
_43="aspect-ratio";
|
||||
_44=_42.split("/");
|
||||
}else{
|
||||
if(_38.ABSOLUTE_VALUE){
|
||||
_43="absolute";
|
||||
_44=_42;
|
||||
}else{
|
||||
_43="unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var _46,_47;
|
||||
if("device-width"===_41.substring(l-12,l)){
|
||||
_46=screen.width;
|
||||
if(_42!==null){
|
||||
if(_43==="length"){
|
||||
return ((min&&_46>=_44)||(max&&_46<_44)||(!min&&!max&&_46===_44));
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return _46>0;
|
||||
}
|
||||
}else{
|
||||
if("device-height"===_41.substring(l-13,l)){
|
||||
_47=screen.height;
|
||||
if(_42!==null){
|
||||
if(_43==="length"){
|
||||
return ((min&&_47>=_44)||(max&&_47<_44)||(!min&&!max&&_47===_44));
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return _47>0;
|
||||
}
|
||||
}else{
|
||||
if("width"===_41.substring(l-5,l)){
|
||||
_46=document.documentElement.clientWidth||document.body.clientWidth;
|
||||
if(_42!==null){
|
||||
if(_43==="length"){
|
||||
return ((min&&_46>=_44)||(max&&_46<_44)||(!min&&!max&&_46===_44));
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return _46>0;
|
||||
}
|
||||
}else{
|
||||
if("height"===_41.substring(l-6,l)){
|
||||
_47=document.documentElement.clientHeight||document.body.clientHeight;
|
||||
if(_42!==null){
|
||||
if(_43==="length"){
|
||||
return ((min&&_47>=_44)||(max&&_47<_44)||(!min&&!max&&_47===_44));
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return _47>0;
|
||||
}
|
||||
}else{
|
||||
if("device-aspect-ratio"===_41.substring(l-19,l)){
|
||||
return _43==="aspect-ratio"&&screen.width*_44[1]===screen.height*_44[0];
|
||||
}else{
|
||||
if("color-index"===_41.substring(l-11,l)){
|
||||
var _48=Math.pow(2,screen.colorDepth);
|
||||
if(_42!==null){
|
||||
if(_43==="absolute"){
|
||||
return ((min&&_48>=_44)||(max&&_48<_44)||(!min&&!max&&_48===_44));
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return _48>0;
|
||||
}
|
||||
}else{
|
||||
if("color"===_41.substring(l-5,l)){
|
||||
var _49=screen.colorDepth;
|
||||
if(_42!==null){
|
||||
if(_43==="absolute"){
|
||||
return ((min&&_49>=_44)||(max&&_49<_44)||(!min&&!max&&_49===_44));
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return _49>0;
|
||||
}
|
||||
}else{
|
||||
if("resolution"===_41.substring(l-10,l)){
|
||||
var res;
|
||||
if(_45==="dpcm"){
|
||||
res=_3d("1cm");
|
||||
}else{
|
||||
res=_3d("1in");
|
||||
}
|
||||
if(_42!==null){
|
||||
if(_43==="resolution"){
|
||||
return ((min&&res>=_44)||(max&&res<_44)||(!min&&!max&&res===_44));
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return res>0;
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
var _4a=function(mq){
|
||||
var _4b=mq.getValid();
|
||||
var _4c=mq.getExpressions();
|
||||
var l=_4c.length;
|
||||
if(l>0){
|
||||
for(var i=0;i<l&&_4b;i++){
|
||||
_4b=_40(_4c[i].mediaFeature,_4c[i].value);
|
||||
}
|
||||
var not=mq.getNot();
|
||||
return (_4b&&!not||not&&!_4b);
|
||||
}
|
||||
};
|
||||
var _4d=function(mql){
|
||||
var mqs=mql.getMediaQueries();
|
||||
var t={};
|
||||
for(var i=0;i<mqs.length;i++){
|
||||
if(_4a(mqs[i])){
|
||||
t[mqs[i].getMediaType()]=true;
|
||||
}
|
||||
}
|
||||
var s=[],c=0;
|
||||
for(var n in t){
|
||||
if(t.hasOwnProperty(n)){
|
||||
if(c>0){
|
||||
s[c++]=",";
|
||||
}
|
||||
s[c++]=n;
|
||||
}
|
||||
}
|
||||
if(s.length>0){
|
||||
_39[_39.length]=cssHelper.addStyle("@media "+s.join("")+"{"+mql.getCssText()+"}",false);
|
||||
}
|
||||
};
|
||||
var _4e=function(_4f){
|
||||
for(var i=0;i<_4f.length;i++){
|
||||
_4d(_4f[i]);
|
||||
}
|
||||
if(ua.ie){
|
||||
document.documentElement.style.display="block";
|
||||
setTimeout(function(){
|
||||
document.documentElement.style.display="";
|
||||
},0);
|
||||
setTimeout(function(){
|
||||
cssHelper.broadcast("cssMediaQueriesTested");
|
||||
},100);
|
||||
}else{
|
||||
cssHelper.broadcast("cssMediaQueriesTested");
|
||||
}
|
||||
};
|
||||
var _50=function(){
|
||||
for(var i=0;i<_39.length;i++){
|
||||
cssHelper.removeStyle(_39[i]);
|
||||
}
|
||||
_39=[];
|
||||
cssHelper.mediaQueryLists(_4e);
|
||||
};
|
||||
var _51=0;
|
||||
var _52=function(){
|
||||
var _53=cssHelper.getViewportWidth();
|
||||
var _54=cssHelper.getViewportHeight();
|
||||
if(ua.ie){
|
||||
var el=document.createElement("div");
|
||||
el.style.position="absolute";
|
||||
el.style.top="-9999em";
|
||||
el.style.overflow="scroll";
|
||||
document.body.appendChild(el);
|
||||
_51=el.offsetWidth-el.clientWidth;
|
||||
document.body.removeChild(el);
|
||||
}
|
||||
var _55;
|
||||
var _56=function(){
|
||||
var vpw=cssHelper.getViewportWidth();
|
||||
var vph=cssHelper.getViewportHeight();
|
||||
if(Math.abs(vpw-_53)>_51||Math.abs(vph-_54)>_51){
|
||||
_53=vpw;
|
||||
_54=vph;
|
||||
clearTimeout(_55);
|
||||
_55=setTimeout(function(){
|
||||
if(!_3a()){
|
||||
_50();
|
||||
}else{
|
||||
cssHelper.broadcast("cssMediaQueriesTested");
|
||||
}
|
||||
},500);
|
||||
}
|
||||
};
|
||||
window.onresize=function(){
|
||||
var x=window.onresize||function(){
|
||||
};
|
||||
return function(){
|
||||
x();
|
||||
_56();
|
||||
};
|
||||
}();
|
||||
};
|
||||
var _57=document.documentElement;
|
||||
_57.style.marginLeft="-32767px";
|
||||
setTimeout(function(){
|
||||
_57.style.marginTop="";
|
||||
},20000);
|
||||
return function(){
|
||||
if(!_3a()){
|
||||
cssHelper.addListener("newStyleParsed",function(el){
|
||||
_4e(el.cssHelperParsed.mediaQueryLists);
|
||||
});
|
||||
cssHelper.addListener("cssMediaQueriesTested",function(){
|
||||
if(ua.ie){
|
||||
_57.style.width="1px";
|
||||
}
|
||||
setTimeout(function(){
|
||||
_57.style.width="";
|
||||
_57.style.marginLeft="";
|
||||
},0);
|
||||
cssHelper.removeListener("cssMediaQueriesTested",arguments.callee);
|
||||
});
|
||||
_3c();
|
||||
_50();
|
||||
}else{
|
||||
_57.style.marginLeft="";
|
||||
}
|
||||
_52();
|
||||
};
|
||||
}());
|
||||
try{
|
||||
document.execCommand("BackgroundImageCache",false,true);
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
|
||||
1737
js/plugins.js
1737
js/plugins.js
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,7 @@
|
||||
/* Author:
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user