mirror of
https://github.com/danog/sass-site.git
synced 2025-01-21 21:31:34 +01:00
update js
This commit is contained in:
parent
1314aad37c
commit
1a2bf6a2a0
@ -52,7 +52,7 @@
|
||||
|
||||
@import
|
||||
"vendor/html5boilerplate/browsehappy"
|
||||
, "vendor/jquery-ui-1.10.4.custom"
|
||||
, "vendor/jquery-ui/jquery-ui-1.11.0.custom"
|
||||
, "components/pop-stripe"
|
||||
, "components/type"
|
||||
, "components/page-header"
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*! jQuery UI - v1.10.4 - 2014-03-13
|
||||
/*! jQuery UI - v1.11.0 - 2014-07-27
|
||||
* http://jqueryui.com
|
||||
* Includes: jquery.ui.core.css, jquery.ui.tabs.css
|
||||
* Includes: core.css, tabs.css
|
||||
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
/* Layout helpers
|
128
source/assets/css/vendor/jquery-ui/jquery-ui-1.11.0.custom.scss
vendored
Normal file
128
source/assets/css/vendor/jquery-ui/jquery-ui-1.11.0.custom.scss
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
/*! jQuery UI - v1.11.0 - 2014-07-27
|
||||
* http://jqueryui.com
|
||||
* Includes: core.css, tabs.css
|
||||
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden {
|
||||
display: none;
|
||||
}
|
||||
.ui-helper-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
.ui-helper-reset {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
line-height: 1.3;
|
||||
text-decoration: none;
|
||||
font-size: 100%;
|
||||
list-style: none;
|
||||
}
|
||||
.ui-helper-clearfix:before,
|
||||
.ui-helper-clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.ui-helper-clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
.ui-helper-clearfix {
|
||||
min-height: 0; /* support: IE7 */
|
||||
}
|
||||
.ui-helper-zfix {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
filter:Alpha(Opacity=0);
|
||||
}
|
||||
|
||||
.ui-front {
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled {
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon {
|
||||
display: block;
|
||||
text-indent: -99999px;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.ui-tabs {
|
||||
position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
padding: .2em;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav {
|
||||
margin: 0;
|
||||
padding: .2em .2em 0;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li {
|
||||
list-style: none;
|
||||
float: left;
|
||||
position: relative;
|
||||
top: 0;
|
||||
margin: 1px .2em 0 0;
|
||||
border-bottom-width: 0;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
|
||||
float: left;
|
||||
padding: .5em 1em;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
|
||||
margin-bottom: -1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
|
||||
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
|
||||
cursor: text;
|
||||
}
|
||||
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
|
||||
cursor: pointer;
|
||||
}
|
||||
.ui-tabs .ui-tabs-panel {
|
||||
display: block;
|
||||
border-width: 0;
|
||||
padding: 1em 1.4em;
|
||||
background: none;
|
||||
}
|
134
source/assets/css/vendor/jquery-ui/jquery-ui.structure-1.11.0.custom.scss
vendored
Normal file
134
source/assets/css/vendor/jquery-ui/jquery-ui.structure-1.11.0.custom.scss
vendored
Normal file
@ -0,0 +1,134 @@
|
||||
/*!
|
||||
* jQuery UI CSS Framework 1.11.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/category/theming/
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden {
|
||||
display: none;
|
||||
}
|
||||
.ui-helper-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
.ui-helper-reset {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
line-height: 1.3;
|
||||
text-decoration: none;
|
||||
font-size: 100%;
|
||||
list-style: none;
|
||||
}
|
||||
.ui-helper-clearfix:before,
|
||||
.ui-helper-clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.ui-helper-clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
.ui-helper-clearfix {
|
||||
min-height: 0; /* support: IE7 */
|
||||
}
|
||||
.ui-helper-zfix {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
filter:Alpha(Opacity=0);
|
||||
}
|
||||
|
||||
.ui-front {
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled {
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon {
|
||||
display: block;
|
||||
text-indent: -99999px;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.ui-tabs {
|
||||
position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
padding: .2em;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav {
|
||||
margin: 0;
|
||||
padding: .2em .2em 0;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li {
|
||||
list-style: none;
|
||||
float: left;
|
||||
position: relative;
|
||||
top: 0;
|
||||
margin: 1px .2em 0 0;
|
||||
border-bottom-width: 0;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
|
||||
float: left;
|
||||
padding: .5em 1em;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
|
||||
margin-bottom: -1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
|
||||
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
|
||||
cursor: text;
|
||||
}
|
||||
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
|
||||
cursor: pointer;
|
||||
}
|
||||
.ui-tabs .ui-tabs-panel {
|
||||
display: block;
|
||||
border-width: 0;
|
||||
padding: 1em 1.4em;
|
||||
background: none;
|
||||
}
|
@ -1,5 +1,9 @@
|
||||
//= require ./vendor/jquery-2.1.1
|
||||
//= require ./vendor/jquery-ui-1.11.0.custom
|
||||
//= require ./vendor/plugins
|
||||
//= require_tree ./vendor/bootstrap
|
||||
//= require ./vendor/bootstrap/collapse
|
||||
//= require ./vendor/bootstrap/transition
|
||||
|
||||
|
||||
//= require_tree ./components
|
||||
//= require_tree ./styleguide
|
||||
|
67
source/assets/js/vendor/bootstrap/collapse.js
vendored
67
source/assets/js/vendor/bootstrap/collapse.js
vendored
@ -1,24 +1,14 @@
|
||||
/* ========================================================================
|
||||
* Bootstrap: collapse.js v3.0.0
|
||||
* http://twbs.github.com/bootstrap/javascript.html#collapse
|
||||
* Bootstrap: collapse.js v3.2.0
|
||||
* http://getbootstrap.com/javascript/#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.
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
+function ($) { "use strict";
|
||||
+function ($) {
|
||||
'use strict';
|
||||
|
||||
// COLLAPSE PUBLIC CLASS DEFINITION
|
||||
// ================================
|
||||
@ -32,6 +22,8 @@
|
||||
if (this.options.toggle) this.toggle()
|
||||
}
|
||||
|
||||
Collapse.VERSION = '3.2.0'
|
||||
|
||||
Collapse.DEFAULTS = {
|
||||
toggle: true
|
||||
}
|
||||
@ -53,7 +45,7 @@
|
||||
if (actives && actives.length) {
|
||||
var hasData = actives.data('bs.collapse')
|
||||
if (hasData && hasData.transitioning) return
|
||||
actives.collapse('hide')
|
||||
Plugin.call(actives, 'hide')
|
||||
hasData || actives.data('bs.collapse', null)
|
||||
}
|
||||
|
||||
@ -61,18 +53,17 @@
|
||||
|
||||
this.$element
|
||||
.removeClass('collapse')
|
||||
.addClass('collapsing')
|
||||
[dimension](0)
|
||||
.addClass('collapsing')[dimension](0)
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
var complete = function () {
|
||||
this.$element
|
||||
.removeClass('collapsing')
|
||||
.addClass('in')
|
||||
[dimension]('auto')
|
||||
.addClass('collapse in')[dimension]('')
|
||||
this.transitioning = 0
|
||||
this.$element.trigger('shown.bs.collapse')
|
||||
this.$element
|
||||
.trigger('shown.bs.collapse')
|
||||
}
|
||||
|
||||
if (!$.support.transition) return complete.call(this)
|
||||
@ -80,9 +71,8 @@
|
||||
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
|
||||
|
||||
this.$element
|
||||
.one($.support.transition.end, $.proxy(complete, this))
|
||||
.emulateTransitionEnd(350)
|
||||
[dimension](this.$element[0][scrollSize])
|
||||
.one('bsTransitionEnd', $.proxy(complete, this))
|
||||
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
|
||||
}
|
||||
|
||||
Collapse.prototype.hide = function () {
|
||||
@ -94,9 +84,7 @@
|
||||
|
||||
var dimension = this.dimension()
|
||||
|
||||
this.$element
|
||||
[dimension](this.$element[dimension]())
|
||||
[0].offsetHeight
|
||||
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
|
||||
|
||||
this.$element
|
||||
.addClass('collapsing')
|
||||
@ -117,7 +105,7 @@
|
||||
|
||||
this.$element
|
||||
[dimension](0)
|
||||
.one($.support.transition.end, $.proxy(complete, this))
|
||||
.one('bsTransitionEnd', $.proxy(complete, this))
|
||||
.emulateTransitionEnd(350)
|
||||
}
|
||||
|
||||
@ -129,19 +117,21 @@
|
||||
// COLLAPSE PLUGIN DEFINITION
|
||||
// ==========================
|
||||
|
||||
var old = $.fn.collapse
|
||||
|
||||
$.fn.collapse = function (option) {
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('bs.collapse')
|
||||
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||
|
||||
if (!data && options.toggle && option == 'show') option = !option
|
||||
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
var old = $.fn.collapse
|
||||
|
||||
$.fn.collapse = Plugin
|
||||
$.fn.collapse.Constructor = Collapse
|
||||
|
||||
|
||||
@ -157,11 +147,12 @@
|
||||
// COLLAPSE DATA-API
|
||||
// =================
|
||||
|
||||
$(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
||||
var $this = $(this), href
|
||||
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
|
||||
var href
|
||||
var $this = $(this)
|
||||
var target = $this.attr('data-target')
|
||||
|| e.preventDefault()
|
||||
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
||||
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
|
||||
var $target = $(target)
|
||||
var data = $target.data('bs.collapse')
|
||||
var option = data ? 'toggle' : $this.data()
|
||||
@ -169,11 +160,11 @@
|
||||
var $parent = parent && $(parent)
|
||||
|
||||
if (!data || !data.transitioning) {
|
||||
if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
||||
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
||||
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
||||
}
|
||||
|
||||
$target.collapse(option)
|
||||
Plugin.call($target, option)
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
}(jQuery);
|
||||
|
49
source/assets/js/vendor/bootstrap/transition.js
vendored
49
source/assets/js/vendor/bootstrap/transition.js
vendored
@ -1,24 +1,14 @@
|
||||
/* ========================================================================
|
||||
* Bootstrap: transition.js v3.0.0
|
||||
* http://twbs.github.com/bootstrap/javascript.html#transitions
|
||||
* Bootstrap: transition.js v3.2.0
|
||||
* http://getbootstrap.com/javascript/#transitions
|
||||
* ========================================================================
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
+function ($) { "use strict";
|
||||
+function ($) {
|
||||
'use strict';
|
||||
|
||||
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
|
||||
// ============================================================
|
||||
@ -27,10 +17,10 @@
|
||||
var el = document.createElement('bootstrap')
|
||||
|
||||
var transEndEventNames = {
|
||||
'WebkitTransition' : 'webkitTransitionEnd'
|
||||
, 'MozTransition' : 'transitionend'
|
||||
, 'OTransition' : 'oTransitionEnd otransitionend'
|
||||
, 'transition' : 'transitionend'
|
||||
WebkitTransition : 'webkitTransitionEnd',
|
||||
MozTransition : 'transitionend',
|
||||
OTransition : 'oTransitionEnd otransitionend',
|
||||
transition : 'transitionend'
|
||||
}
|
||||
|
||||
for (var name in transEndEventNames) {
|
||||
@ -38,12 +28,15 @@
|
||||
return { end: transEndEventNames[name] }
|
||||
}
|
||||
}
|
||||
|
||||
return false // explicit for ie8 ( ._.)
|
||||
}
|
||||
|
||||
// http://blog.alexmaccaw.com/css-transitions
|
||||
$.fn.emulateTransitionEnd = function (duration) {
|
||||
var called = false, $el = this
|
||||
$(this).one($.support.transition.end, function () { called = true })
|
||||
var called = false
|
||||
var $el = this
|
||||
$(this).one('bsTransitionEnd', function () { called = true })
|
||||
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
|
||||
setTimeout(callback, duration)
|
||||
return this
|
||||
@ -51,6 +44,16 @@
|
||||
|
||||
$(function () {
|
||||
$.support.transition = transitionEnd()
|
||||
|
||||
if (!$.support.transition) return
|
||||
|
||||
$.event.special.bsTransitionEnd = {
|
||||
bindType: $.support.transition.end,
|
||||
delegateType: $.support.transition.end,
|
||||
handle: function (e) {
|
||||
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
}(jQuery);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,36 @@
|
||||
/*! jQuery UI - v1.10.4 - 2014-03-13
|
||||
/*! jQuery UI - v1.11.0 - 2014-07-27
|
||||
* http://jqueryui.com
|
||||
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.tabs.js
|
||||
* Includes: core.js, widget.js, tabs.js
|
||||
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
(function( $, undefined ) {
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([ "jquery" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
/*!
|
||||
* jQuery UI Core 1.11.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/category/ui-core/
|
||||
*/
|
||||
|
||||
var uuid = 0,
|
||||
runiqueId = /^ui-id-\d+$/;
|
||||
|
||||
// $.ui might exist from components with no dependencies, e.g., $.ui.position
|
||||
$.ui = $.ui || {};
|
||||
|
||||
$.extend( $.ui, {
|
||||
version: "1.10.4",
|
||||
version: "1.11.0",
|
||||
|
||||
keyCode: {
|
||||
BACKSPACE: 8,
|
||||
@ -24,12 +42,6 @@ $.extend( $.ui, {
|
||||
ESCAPE: 27,
|
||||
HOME: 36,
|
||||
LEFT: 37,
|
||||
NUMPAD_ADD: 107,
|
||||
NUMPAD_DECIMAL: 110,
|
||||
NUMPAD_DIVIDE: 111,
|
||||
NUMPAD_ENTER: 108,
|
||||
NUMPAD_MULTIPLY: 106,
|
||||
NUMPAD_SUBTRACT: 109,
|
||||
PAGE_DOWN: 34,
|
||||
PAGE_UP: 33,
|
||||
PERIOD: 190,
|
||||
@ -42,77 +54,35 @@ $.extend( $.ui, {
|
||||
|
||||
// plugins
|
||||
$.fn.extend({
|
||||
focus: (function( orig ) {
|
||||
return function( delay, fn ) {
|
||||
return typeof delay === "number" ?
|
||||
this.each(function() {
|
||||
var elem = this;
|
||||
setTimeout(function() {
|
||||
$( elem ).focus();
|
||||
if ( fn ) {
|
||||
fn.call( elem );
|
||||
}
|
||||
}, delay );
|
||||
}) :
|
||||
orig.apply( this, arguments );
|
||||
};
|
||||
})( $.fn.focus ),
|
||||
|
||||
scrollParent: function() {
|
||||
var scrollParent;
|
||||
if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
|
||||
scrollParent = this.parents().filter(function() {
|
||||
return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
|
||||
}).eq(0);
|
||||
} else {
|
||||
scrollParent = this.parents().filter(function() {
|
||||
return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
|
||||
}).eq(0);
|
||||
}
|
||||
|
||||
return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
|
||||
},
|
||||
|
||||
zIndex: function( zIndex ) {
|
||||
if ( zIndex !== undefined ) {
|
||||
return this.css( "zIndex", zIndex );
|
||||
}
|
||||
|
||||
if ( this.length ) {
|
||||
var elem = $( this[ 0 ] ), position, value;
|
||||
while ( elem.length && elem[ 0 ] !== document ) {
|
||||
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
||||
// This makes behavior of this function consistent across browsers
|
||||
// WebKit always returns auto if the element is positioned
|
||||
position = elem.css( "position" );
|
||||
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
|
||||
// IE returns 0 when zIndex is not specified
|
||||
// other browsers return a string
|
||||
// we ignore the case of nested elements with an explicit value of 0
|
||||
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
||||
value = parseInt( elem.css( "zIndex" ), 10 );
|
||||
if ( !isNaN( value ) && value !== 0 ) {
|
||||
return value;
|
||||
}
|
||||
var position = this.css( "position" ),
|
||||
excludeStaticParent = position === "absolute",
|
||||
scrollParent = this.parents().filter( function() {
|
||||
var parent = $( this );
|
||||
if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
|
||||
return false;
|
||||
}
|
||||
elem = elem.parent();
|
||||
}
|
||||
}
|
||||
return (/(auto|scroll)/).test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
|
||||
}).eq( 0 );
|
||||
|
||||
return 0;
|
||||
return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
|
||||
},
|
||||
|
||||
uniqueId: function() {
|
||||
return this.each(function() {
|
||||
if ( !this.id ) {
|
||||
this.id = "ui-id-" + (++uuid);
|
||||
}
|
||||
});
|
||||
},
|
||||
uniqueId: (function() {
|
||||
var uuid = 0;
|
||||
|
||||
return function() {
|
||||
return this.each(function() {
|
||||
if ( !this.id ) {
|
||||
this.id = "ui-id-" + ( ++uuid );
|
||||
}
|
||||
});
|
||||
};
|
||||
})(),
|
||||
|
||||
removeUniqueId: function() {
|
||||
return this.each(function() {
|
||||
if ( runiqueId.test( this.id ) ) {
|
||||
if ( /^ui-id-\d+$/.test( this.id ) ) {
|
||||
$( this ).removeAttr( "id" );
|
||||
}
|
||||
});
|
||||
@ -240,94 +210,130 @@ if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
|
||||
})( $.fn.removeData );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// deprecated
|
||||
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
|
||||
|
||||
$.support.selectstart = "onselectstart" in document.createElement( "div" );
|
||||
$.fn.extend({
|
||||
disableSelection: function() {
|
||||
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
|
||||
".ui-disableSelection", function( event ) {
|
||||
focus: (function( orig ) {
|
||||
return function( delay, fn ) {
|
||||
return typeof delay === "number" ?
|
||||
this.each(function() {
|
||||
var elem = this;
|
||||
setTimeout(function() {
|
||||
$( elem ).focus();
|
||||
if ( fn ) {
|
||||
fn.call( elem );
|
||||
}
|
||||
}, delay );
|
||||
}) :
|
||||
orig.apply( this, arguments );
|
||||
};
|
||||
})( $.fn.focus ),
|
||||
|
||||
disableSelection: (function() {
|
||||
var eventType = "onselectstart" in document.createElement( "div" ) ?
|
||||
"selectstart" :
|
||||
"mousedown";
|
||||
|
||||
return function() {
|
||||
return this.bind( eventType + ".ui-disableSelection", function( event ) {
|
||||
event.preventDefault();
|
||||
});
|
||||
},
|
||||
};
|
||||
})(),
|
||||
|
||||
enableSelection: function() {
|
||||
return this.unbind( ".ui-disableSelection" );
|
||||
}
|
||||
});
|
||||
|
||||
$.extend( $.ui, {
|
||||
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
|
||||
plugin: {
|
||||
add: function( module, option, set ) {
|
||||
var i,
|
||||
proto = $.ui[ module ].prototype;
|
||||
for ( i in set ) {
|
||||
proto.plugins[ i ] = proto.plugins[ i ] || [];
|
||||
proto.plugins[ i ].push( [ option, set[ i ] ] );
|
||||
}
|
||||
},
|
||||
call: function( instance, name, args ) {
|
||||
var i,
|
||||
set = instance.plugins[ name ];
|
||||
if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
for ( i = 0; i < set.length; i++ ) {
|
||||
if ( instance.options[ set[ i ][ 0 ] ] ) {
|
||||
set[ i ][ 1 ].apply( instance.element, args );
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// only used by resizable
|
||||
hasScroll: function( el, a ) {
|
||||
|
||||
//If overflow is hidden, the element might have extra content, but the user wants to hide it
|
||||
if ( $( el ).css( "overflow" ) === "hidden") {
|
||||
return false;
|
||||
zIndex: function( zIndex ) {
|
||||
if ( zIndex !== undefined ) {
|
||||
return this.css( "zIndex", zIndex );
|
||||
}
|
||||
|
||||
var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
|
||||
has = false;
|
||||
|
||||
if ( el[ scroll ] > 0 ) {
|
||||
return true;
|
||||
if ( this.length ) {
|
||||
var elem = $( this[ 0 ] ), position, value;
|
||||
while ( elem.length && elem[ 0 ] !== document ) {
|
||||
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
||||
// This makes behavior of this function consistent across browsers
|
||||
// WebKit always returns auto if the element is positioned
|
||||
position = elem.css( "position" );
|
||||
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
|
||||
// IE returns 0 when zIndex is not specified
|
||||
// other browsers return a string
|
||||
// we ignore the case of nested elements with an explicit value of 0
|
||||
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
||||
value = parseInt( elem.css( "zIndex" ), 10 );
|
||||
if ( !isNaN( value ) && value !== 0 ) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
elem = elem.parent();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: determine which cases actually cause this to happen
|
||||
// if the element doesn't have the scroll set, see if it's possible to
|
||||
// set the scroll
|
||||
el[ scroll ] = 1;
|
||||
has = ( el[ scroll ] > 0 );
|
||||
el[ scroll ] = 0;
|
||||
return has;
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
(function( $, undefined ) {
|
||||
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
|
||||
$.ui.plugin = {
|
||||
add: function( module, option, set ) {
|
||||
var i,
|
||||
proto = $.ui[ module ].prototype;
|
||||
for ( i in set ) {
|
||||
proto.plugins[ i ] = proto.plugins[ i ] || [];
|
||||
proto.plugins[ i ].push( [ option, set[ i ] ] );
|
||||
}
|
||||
},
|
||||
call: function( instance, name, args, allowDisconnected ) {
|
||||
var i,
|
||||
set = instance.plugins[ name ];
|
||||
|
||||
var uuid = 0,
|
||||
slice = Array.prototype.slice,
|
||||
_cleanData = $.cleanData;
|
||||
$.cleanData = function( elems ) {
|
||||
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
||||
try {
|
||||
$( elem ).triggerHandler( "remove" );
|
||||
// http://bugs.jquery.com/ticket/8235
|
||||
} catch( e ) {}
|
||||
if ( !set ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
for ( i = 0; i < set.length; i++ ) {
|
||||
if ( instance.options[ set[ i ][ 0 ] ] ) {
|
||||
set[ i ][ 1 ].apply( instance.element, args );
|
||||
}
|
||||
}
|
||||
}
|
||||
_cleanData( elems );
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* jQuery UI Widget 1.11.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/jQuery.widget/
|
||||
*/
|
||||
|
||||
|
||||
var widget_uuid = 0,
|
||||
widget_slice = Array.prototype.slice;
|
||||
|
||||
$.cleanData = (function( orig ) {
|
||||
return function( elems ) {
|
||||
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
||||
try {
|
||||
$( elem ).triggerHandler( "remove" );
|
||||
// http://bugs.jquery.com/ticket/8235
|
||||
} catch( e ) {}
|
||||
}
|
||||
orig( elems );
|
||||
};
|
||||
})( $.cleanData );
|
||||
|
||||
$.widget = function( name, base, prototype ) {
|
||||
var fullName, existingConstructor, constructor, basePrototype,
|
||||
// proxiedPrototype allows the provided prototype to remain unmodified
|
||||
@ -439,10 +445,12 @@ $.widget = function( name, base, prototype ) {
|
||||
}
|
||||
|
||||
$.widget.bridge( name, constructor );
|
||||
|
||||
return constructor;
|
||||
};
|
||||
|
||||
$.widget.extend = function( target ) {
|
||||
var input = slice.call( arguments, 1 ),
|
||||
var input = widget_slice.call( arguments, 1 ),
|
||||
inputIndex = 0,
|
||||
inputLength = input.length,
|
||||
key,
|
||||
@ -471,7 +479,7 @@ $.widget.bridge = function( name, object ) {
|
||||
var fullName = object.prototype.widgetFullName || name;
|
||||
$.fn[ name ] = function( options ) {
|
||||
var isMethodCall = typeof options === "string",
|
||||
args = slice.call( arguments, 1 ),
|
||||
args = widget_slice.call( arguments, 1 ),
|
||||
returnValue = this;
|
||||
|
||||
// allow multiple hashes to be passed on init
|
||||
@ -483,6 +491,10 @@ $.widget.bridge = function( name, object ) {
|
||||
this.each(function() {
|
||||
var methodValue,
|
||||
instance = $.data( this, fullName );
|
||||
if ( options === "instance" ) {
|
||||
returnValue = instance;
|
||||
return false;
|
||||
}
|
||||
if ( !instance ) {
|
||||
return $.error( "cannot call methods on " + name + " prior to initialization; " +
|
||||
"attempted to call method '" + options + "'" );
|
||||
@ -502,7 +514,10 @@ $.widget.bridge = function( name, object ) {
|
||||
this.each(function() {
|
||||
var instance = $.data( this, fullName );
|
||||
if ( instance ) {
|
||||
instance.option( options || {} )._init();
|
||||
instance.option( options || {} );
|
||||
if ( instance._init ) {
|
||||
instance._init();
|
||||
}
|
||||
} else {
|
||||
$.data( this, fullName, new object( options, this ) );
|
||||
}
|
||||
@ -529,7 +544,7 @@ $.Widget.prototype = {
|
||||
_createWidget: function( options, element ) {
|
||||
element = $( element || this.defaultElement || this )[ 0 ];
|
||||
this.element = $( element );
|
||||
this.uuid = uuid++;
|
||||
this.uuid = widget_uuid++;
|
||||
this.eventNamespace = "." + this.widgetName + this.uuid;
|
||||
this.options = $.widget.extend( {},
|
||||
this.options,
|
||||
@ -572,9 +587,6 @@ $.Widget.prototype = {
|
||||
// all event bindings should go through this._on()
|
||||
this.element
|
||||
.unbind( this.eventNamespace )
|
||||
// 1.9 BC for #7810
|
||||
// TODO remove dual storage
|
||||
.removeData( this.widgetName )
|
||||
.removeData( this.widgetFullName )
|
||||
// support: jquery <1.6.3
|
||||
// http://bugs.jquery.com/ticket/9413
|
||||
@ -650,20 +662,23 @@ $.Widget.prototype = {
|
||||
|
||||
if ( key === "disabled" ) {
|
||||
this.widget()
|
||||
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
|
||||
.attr( "aria-disabled", value );
|
||||
this.hoverable.removeClass( "ui-state-hover" );
|
||||
this.focusable.removeClass( "ui-state-focus" );
|
||||
.toggleClass( this.widgetFullName + "-disabled", !!value );
|
||||
|
||||
// If the widget is becoming disabled, then nothing is interactive
|
||||
if ( value ) {
|
||||
this.hoverable.removeClass( "ui-state-hover" );
|
||||
this.focusable.removeClass( "ui-state-focus" );
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
enable: function() {
|
||||
return this._setOption( "disabled", false );
|
||||
return this._setOptions({ disabled: false });
|
||||
},
|
||||
disable: function() {
|
||||
return this._setOption( "disabled", true );
|
||||
return this._setOptions({ disabled: true });
|
||||
},
|
||||
|
||||
_on: function( suppressDisabledCheck, element, handlers ) {
|
||||
@ -683,7 +698,6 @@ $.Widget.prototype = {
|
||||
element = this.element;
|
||||
delegateElement = this.widget();
|
||||
} else {
|
||||
// accept selectors, DOM elements
|
||||
element = delegateElement = $( element );
|
||||
this.bindings = this.bindings.add( element );
|
||||
}
|
||||
@ -708,7 +722,7 @@ $.Widget.prototype = {
|
||||
handler.guid || handlerProxy.guid || $.guid++;
|
||||
}
|
||||
|
||||
var match = event.match( /^(\w+)\s*(.*)$/ ),
|
||||
var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
|
||||
eventName = match[1] + instance.eventNamespace,
|
||||
selector = match[2];
|
||||
if ( selector ) {
|
||||
@ -823,28 +837,23 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
|
||||
};
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
(function( $, undefined ) {
|
||||
var widget = $.widget;
|
||||
|
||||
var tabId = 0,
|
||||
rhash = /#.*$/;
|
||||
|
||||
function getNextTabId() {
|
||||
return ++tabId;
|
||||
}
|
||||
/*!
|
||||
* jQuery UI Tabs 1.11.0
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/tabs/
|
||||
*/
|
||||
|
||||
function isLocal( anchor ) {
|
||||
// support: IE7
|
||||
// IE7 doesn't normalize the href property when set via script (#9317)
|
||||
anchor = anchor.cloneNode( false );
|
||||
|
||||
return anchor.hash.length > 1 &&
|
||||
decodeURIComponent( anchor.href.replace( rhash, "" ) ) ===
|
||||
decodeURIComponent( location.href.replace( rhash, "" ) );
|
||||
}
|
||||
|
||||
$.widget( "ui.tabs", {
|
||||
version: "1.10.4",
|
||||
var tabs = $.widget( "ui.tabs", {
|
||||
version: "1.11.0",
|
||||
delay: 300,
|
||||
options: {
|
||||
active: null,
|
||||
@ -861,6 +870,31 @@ $.widget( "ui.tabs", {
|
||||
load: null
|
||||
},
|
||||
|
||||
_isLocal: (function() {
|
||||
var rhash = /#.*$/;
|
||||
|
||||
return function( anchor ) {
|
||||
var anchorUrl, locationUrl;
|
||||
|
||||
// support: IE7
|
||||
// IE7 doesn't normalize the href property when set via script (#9317)
|
||||
anchor = anchor.cloneNode( false );
|
||||
|
||||
anchorUrl = anchor.href.replace( rhash, "" );
|
||||
locationUrl = location.href.replace( rhash, "" );
|
||||
|
||||
// decoding may throw an error if the URL isn't UTF-8 (#9518)
|
||||
try {
|
||||
anchorUrl = decodeURIComponent( anchorUrl );
|
||||
} catch ( error ) {}
|
||||
try {
|
||||
locationUrl = decodeURIComponent( locationUrl );
|
||||
} catch ( error ) {}
|
||||
|
||||
return anchor.hash.length > 1 && anchorUrl === locationUrl;
|
||||
};
|
||||
})(),
|
||||
|
||||
_create: function() {
|
||||
var that = this,
|
||||
options = this.options;
|
||||
@ -1108,10 +1142,6 @@ $.widget( "ui.tabs", {
|
||||
}
|
||||
},
|
||||
|
||||
_tabId: function( tab ) {
|
||||
return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId();
|
||||
},
|
||||
|
||||
_sanitizeSelector: function( hash ) {
|
||||
return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
|
||||
},
|
||||
@ -1158,12 +1188,12 @@ $.widget( "ui.tabs", {
|
||||
|
||||
this.tabs.not( this.active ).attr({
|
||||
"aria-selected": "false",
|
||||
"aria-expanded": "false",
|
||||
tabIndex: -1
|
||||
});
|
||||
this.panels.not( this._getPanelForTab( this.active ) )
|
||||
.hide()
|
||||
.attr({
|
||||
"aria-expanded": "false",
|
||||
"aria-hidden": "true"
|
||||
});
|
||||
|
||||
@ -1175,12 +1205,12 @@ $.widget( "ui.tabs", {
|
||||
.addClass( "ui-tabs-active ui-state-active" )
|
||||
.attr({
|
||||
"aria-selected": "true",
|
||||
"aria-expanded": "true",
|
||||
tabIndex: 0
|
||||
});
|
||||
this._getPanelForTab( this.active )
|
||||
.show()
|
||||
.attr({
|
||||
"aria-expanded": "true",
|
||||
"aria-hidden": "false"
|
||||
});
|
||||
}
|
||||
@ -1218,12 +1248,15 @@ $.widget( "ui.tabs", {
|
||||
originalAriaControls = tab.attr( "aria-controls" );
|
||||
|
||||
// inline tab
|
||||
if ( isLocal( anchor ) ) {
|
||||
if ( that._isLocal( anchor ) ) {
|
||||
selector = anchor.hash;
|
||||
panelId = selector.substring( 1 );
|
||||
panel = that.element.find( that._sanitizeSelector( selector ) );
|
||||
// remote tab
|
||||
} else {
|
||||
panelId = that._tabId( tab );
|
||||
// If the tab doesn't already have aria-controls,
|
||||
// generate an id by using a throw-away element
|
||||
panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
|
||||
selector = "#" + panelId;
|
||||
panel = that.element.find( selector );
|
||||
if ( !panel.length ) {
|
||||
@ -1240,7 +1273,7 @@ $.widget( "ui.tabs", {
|
||||
tab.data( "ui-tabs-aria-controls", originalAriaControls );
|
||||
}
|
||||
tab.attr({
|
||||
"aria-controls": selector.substring( 1 ),
|
||||
"aria-controls": panelId,
|
||||
"aria-labelledby": anchorId
|
||||
});
|
||||
panel.attr( "aria-labelledby", anchorId );
|
||||
@ -1289,11 +1322,7 @@ $.widget( "ui.tabs", {
|
||||
},
|
||||
|
||||
_setupEvents: function( event ) {
|
||||
var events = {
|
||||
click: function( event ) {
|
||||
event.preventDefault();
|
||||
}
|
||||
};
|
||||
var events = {};
|
||||
if ( event ) {
|
||||
$.each( event.split(" "), function( index, eventName ) {
|
||||
events[ eventName ] = "_eventHandler";
|
||||
@ -1301,6 +1330,12 @@ $.widget( "ui.tabs", {
|
||||
}
|
||||
|
||||
this._off( this.anchors.add( this.tabs ).add( this.panels ) );
|
||||
// Always prevent the default action, even when disabled
|
||||
this._on( true, this.anchors, {
|
||||
click: function( event ) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
this._on( this.anchors, events );
|
||||
this._on( this.tabs, { keydown: "_tabKeydown" } );
|
||||
this._on( this.panels, { keydown: "_panelKeydown" } );
|
||||
@ -1427,11 +1462,11 @@ $.widget( "ui.tabs", {
|
||||
show();
|
||||
}
|
||||
|
||||
toHide.attr({
|
||||
"aria-expanded": "false",
|
||||
"aria-hidden": "true"
|
||||
toHide.attr( "aria-hidden", "true" );
|
||||
eventData.oldTab.attr({
|
||||
"aria-selected": "false",
|
||||
"aria-expanded": "false"
|
||||
});
|
||||
eventData.oldTab.attr( "aria-selected", "false" );
|
||||
// If we're switching tabs, remove the old tab from the tab order.
|
||||
// If we're opening from collapsed state, remove the previous tab from the tab order.
|
||||
// If we're collapsing, then keep the collapsing tab in the tab order.
|
||||
@ -1444,12 +1479,10 @@ $.widget( "ui.tabs", {
|
||||
.attr( "tabIndex", -1 );
|
||||
}
|
||||
|
||||
toShow.attr({
|
||||
"aria-expanded": "true",
|
||||
"aria-hidden": "false"
|
||||
});
|
||||
toShow.attr( "aria-hidden", "false" );
|
||||
eventData.newTab.attr({
|
||||
"aria-selected": "true",
|
||||
"aria-expanded": "true",
|
||||
tabIndex: 0
|
||||
});
|
||||
},
|
||||
@ -1600,7 +1633,7 @@ $.widget( "ui.tabs", {
|
||||
};
|
||||
|
||||
// not remote
|
||||
if ( isLocal( anchor[ 0 ] ) ) {
|
||||
if ( this._isLocal( anchor[ 0 ] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1647,7 +1680,7 @@ $.widget( "ui.tabs", {
|
||||
url: anchor.attr( "href" ),
|
||||
beforeSend: function( jqXHR, settings ) {
|
||||
return that._trigger( "beforeLoad", event,
|
||||
$.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
|
||||
$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -1658,4 +1691,6 @@ $.widget( "ui.tabs", {
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
||||
|
||||
}));
|
360
source/assets/js/vendor/modernizr-2.8.3.custom.js
vendored
Normal file
360
source/assets/js/vendor/modernizr-2.8.3.custom.js
vendored
Normal file
@ -0,0 +1,360 @@
|
||||
/* Modernizr 2.8.3 (Custom Build) | MIT & BSD
|
||||
* Build: http://modernizr.com/download/#-shiv-cssclasses-load
|
||||
*/
|
||||
;
|
||||
|
||||
|
||||
|
||||
window.Modernizr = (function( window, document, undefined ) {
|
||||
|
||||
var version = '2.8.3',
|
||||
|
||||
Modernizr = {},
|
||||
|
||||
enableClasses = true,
|
||||
|
||||
docElement = document.documentElement,
|
||||
|
||||
mod = 'modernizr',
|
||||
modElem = document.createElement(mod),
|
||||
mStyle = modElem.style,
|
||||
|
||||
inputElem ,
|
||||
|
||||
|
||||
toString = {}.toString, tests = {},
|
||||
inputs = {},
|
||||
attrs = {},
|
||||
|
||||
classes = [],
|
||||
|
||||
slice = classes.slice,
|
||||
|
||||
featureName,
|
||||
|
||||
|
||||
|
||||
_hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
|
||||
|
||||
if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
|
||||
hasOwnProp = function (object, property) {
|
||||
return _hasOwnProperty.call(object, property);
|
||||
};
|
||||
}
|
||||
else {
|
||||
hasOwnProp = function (object, property) {
|
||||
return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function bind(that) {
|
||||
|
||||
var target = this;
|
||||
|
||||
if (typeof target != "function") {
|
||||
throw new TypeError();
|
||||
}
|
||||
|
||||
var args = slice.call(arguments, 1),
|
||||
bound = function () {
|
||||
|
||||
if (this instanceof bound) {
|
||||
|
||||
var F = function(){};
|
||||
F.prototype = target.prototype;
|
||||
var self = new F();
|
||||
|
||||
var result = target.apply(
|
||||
self,
|
||||
args.concat(slice.call(arguments))
|
||||
);
|
||||
if (Object(result) === result) {
|
||||
return result;
|
||||
}
|
||||
return self;
|
||||
|
||||
} else {
|
||||
|
||||
return target.apply(
|
||||
that,
|
||||
args.concat(slice.call(arguments))
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return bound;
|
||||
};
|
||||
}
|
||||
|
||||
function setCss( str ) {
|
||||
mStyle.cssText = str;
|
||||
}
|
||||
|
||||
function setCssAll( str1, str2 ) {
|
||||
return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
|
||||
}
|
||||
|
||||
function is( obj, type ) {
|
||||
return typeof obj === type;
|
||||
}
|
||||
|
||||
function contains( str, substr ) {
|
||||
return !!~('' + str).indexOf(substr);
|
||||
}
|
||||
|
||||
|
||||
function testDOMProps( props, obj, elem ) {
|
||||
for ( var i in props ) {
|
||||
var item = obj[props[i]];
|
||||
if ( item !== undefined) {
|
||||
|
||||
if (elem === false) return props[i];
|
||||
|
||||
if (is(item, 'function')){
|
||||
return item.bind(elem || obj);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
for ( var feature in tests ) {
|
||||
if ( hasOwnProp(tests, feature) ) {
|
||||
featureName = feature.toLowerCase();
|
||||
Modernizr[featureName] = tests[feature]();
|
||||
|
||||
classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Modernizr.addTest = function ( feature, test ) {
|
||||
if ( typeof feature == 'object' ) {
|
||||
for ( var key in feature ) {
|
||||
if ( hasOwnProp( feature, key ) ) {
|
||||
Modernizr.addTest( key, feature[ key ] );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
feature = feature.toLowerCase();
|
||||
|
||||
if ( Modernizr[feature] !== undefined ) {
|
||||
return Modernizr;
|
||||
}
|
||||
|
||||
test = typeof test == 'function' ? test() : test;
|
||||
|
||||
if (typeof enableClasses !== "undefined" && enableClasses) {
|
||||
docElement.className += ' ' + (test ? '' : 'no-') + feature;
|
||||
}
|
||||
Modernizr[feature] = test;
|
||||
|
||||
}
|
||||
|
||||
return Modernizr;
|
||||
};
|
||||
|
||||
|
||||
setCss('');
|
||||
modElem = inputElem = null;
|
||||
|
||||
;(function(window, document) {
|
||||
var version = '3.7.0';
|
||||
|
||||
var options = window.html5 || {};
|
||||
|
||||
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
|
||||
|
||||
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
|
||||
|
||||
var supportsHtml5Styles;
|
||||
|
||||
var expando = '_html5shiv';
|
||||
|
||||
var expanID = 0;
|
||||
|
||||
var expandoData = {};
|
||||
|
||||
var supportsUnknownElements;
|
||||
|
||||
(function() {
|
||||
try {
|
||||
var a = document.createElement('a');
|
||||
a.innerHTML = '<xyz></xyz>';
|
||||
supportsHtml5Styles = ('hidden' in a);
|
||||
|
||||
supportsUnknownElements = a.childNodes.length == 1 || (function() {
|
||||
(document.createElement)('a');
|
||||
var frag = document.createDocumentFragment();
|
||||
return (
|
||||
typeof frag.cloneNode == 'undefined' ||
|
||||
typeof frag.createDocumentFragment == 'undefined' ||
|
||||
typeof frag.createElement == 'undefined'
|
||||
);
|
||||
}());
|
||||
} catch(e) {
|
||||
supportsHtml5Styles = true;
|
||||
supportsUnknownElements = true;
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
function addStyleSheet(ownerDocument, cssText) {
|
||||
var p = ownerDocument.createElement('p'),
|
||||
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
|
||||
|
||||
p.innerHTML = 'x<style>' + cssText + '</style>';
|
||||
return parent.insertBefore(p.lastChild, parent.firstChild);
|
||||
}
|
||||
|
||||
function getElements() {
|
||||
var elements = html5.elements;
|
||||
return typeof elements == 'string' ? elements.split(' ') : elements;
|
||||
}
|
||||
|
||||
function getExpandoData(ownerDocument) {
|
||||
var data = expandoData[ownerDocument[expando]];
|
||||
if (!data) {
|
||||
data = {};
|
||||
expanID++;
|
||||
ownerDocument[expando] = expanID;
|
||||
expandoData[expanID] = data;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
function createElement(nodeName, ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createElement(nodeName);
|
||||
}
|
||||
if (!data) {
|
||||
data = getExpandoData(ownerDocument);
|
||||
}
|
||||
var node;
|
||||
|
||||
if (data.cache[nodeName]) {
|
||||
node = data.cache[nodeName].cloneNode();
|
||||
} else if (saveClones.test(nodeName)) {
|
||||
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
|
||||
} else {
|
||||
node = data.createElem(nodeName);
|
||||
}
|
||||
|
||||
return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
|
||||
}
|
||||
|
||||
function createDocumentFragment(ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createDocumentFragment();
|
||||
}
|
||||
data = data || getExpandoData(ownerDocument);
|
||||
var clone = data.frag.cloneNode(),
|
||||
i = 0,
|
||||
elems = getElements(),
|
||||
l = elems.length;
|
||||
for(;i<l;i++){
|
||||
clone.createElement(elems[i]);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
function shivMethods(ownerDocument, data) {
|
||||
if (!data.cache) {
|
||||
data.cache = {};
|
||||
data.createElem = ownerDocument.createElement;
|
||||
data.createFrag = ownerDocument.createDocumentFragment;
|
||||
data.frag = data.createFrag();
|
||||
}
|
||||
|
||||
|
||||
ownerDocument.createElement = function(nodeName) {
|
||||
if (!html5.shivMethods) {
|
||||
return data.createElem(nodeName);
|
||||
}
|
||||
return createElement(nodeName, ownerDocument, data);
|
||||
};
|
||||
|
||||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
|
||||
'var n=f.cloneNode(),c=n.createElement;' +
|
||||
'h.shivMethods&&(' +
|
||||
getElements().join().replace(/[\w\-]+/g, function(nodeName) {
|
||||
data.createElem(nodeName);
|
||||
data.frag.createElement(nodeName);
|
||||
return 'c("' + nodeName + '")';
|
||||
}) +
|
||||
');return n}'
|
||||
)(html5, data.frag);
|
||||
}
|
||||
|
||||
function shivDocument(ownerDocument) {
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
var data = getExpandoData(ownerDocument);
|
||||
|
||||
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
|
||||
data.hasCSS = !!addStyleSheet(ownerDocument,
|
||||
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
|
||||
'mark{background:#FF0;color:#000}' +
|
||||
'template{display:none}'
|
||||
);
|
||||
}
|
||||
if (!supportsUnknownElements) {
|
||||
shivMethods(ownerDocument, data);
|
||||
}
|
||||
return ownerDocument;
|
||||
}
|
||||
|
||||
var html5 = {
|
||||
|
||||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
|
||||
|
||||
'version': version,
|
||||
|
||||
'shivCSS': (options.shivCSS !== false),
|
||||
|
||||
'supportsUnknownElements': supportsUnknownElements,
|
||||
|
||||
'shivMethods': (options.shivMethods !== false),
|
||||
|
||||
'type': 'default',
|
||||
|
||||
'shivDocument': shivDocument,
|
||||
|
||||
createElement: createElement,
|
||||
|
||||
createDocumentFragment: createDocumentFragment
|
||||
};
|
||||
|
||||
window.html5 = html5;
|
||||
|
||||
shivDocument(document);
|
||||
|
||||
}(this, document));
|
||||
|
||||
Modernizr._version = version;
|
||||
|
||||
docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
|
||||
|
||||
(enableClasses ? ' js ' + classes.join(' ') : '');
|
||||
|
||||
return Modernizr;
|
||||
|
||||
})(this, this.document);
|
||||
/*yepnope1.5.4|WTFPL*/
|
||||
(function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}})(this,document);
|
||||
Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0));};
|
||||
;
|
815
source/assets/js/vendor/modernizr.custom.36606.js
vendored
815
source/assets/js/vendor/modernizr.custom.36606.js
vendored
@ -1,815 +0,0 @@
|
||||
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
|
||||
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
|
||||
*/
|
||||
;
|
||||
|
||||
|
||||
|
||||
window.Modernizr = (function( window, document, undefined ) {
|
||||
|
||||
var version = '2.6.2',
|
||||
|
||||
Modernizr = {},
|
||||
|
||||
enableClasses = true,
|
||||
|
||||
docElement = document.documentElement,
|
||||
|
||||
mod = 'modernizr',
|
||||
modElem = document.createElement(mod),
|
||||
mStyle = modElem.style,
|
||||
|
||||
inputElem = document.createElement('input') ,
|
||||
|
||||
smile = ':)',
|
||||
|
||||
toString = {}.toString,
|
||||
|
||||
prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),
|
||||
|
||||
|
||||
|
||||
omPrefixes = 'Webkit Moz O ms',
|
||||
|
||||
cssomPrefixes = omPrefixes.split(' '),
|
||||
|
||||
domPrefixes = omPrefixes.toLowerCase().split(' '),
|
||||
|
||||
ns = {'svg': 'http://www.w3.org/2000/svg'},
|
||||
|
||||
tests = {},
|
||||
inputs = {},
|
||||
attrs = {},
|
||||
|
||||
classes = [],
|
||||
|
||||
slice = classes.slice,
|
||||
|
||||
featureName,
|
||||
|
||||
|
||||
injectElementWithStyles = function( rule, callback, nodes, testnames ) {
|
||||
|
||||
var style, ret, node, docOverflow,
|
||||
div = document.createElement('div'),
|
||||
body = document.body,
|
||||
fakeBody = body || document.createElement('body');
|
||||
|
||||
if ( parseInt(nodes, 10) ) {
|
||||
while ( nodes-- ) {
|
||||
node = document.createElement('div');
|
||||
node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
|
||||
div.appendChild(node);
|
||||
}
|
||||
}
|
||||
|
||||
style = ['­','<style id="s', mod, '">', rule, '</style>'].join('');
|
||||
div.id = mod;
|
||||
(body ? div : fakeBody).innerHTML += style;
|
||||
fakeBody.appendChild(div);
|
||||
if ( !body ) {
|
||||
fakeBody.style.background = '';
|
||||
fakeBody.style.overflow = 'hidden';
|
||||
docOverflow = docElement.style.overflow;
|
||||
docElement.style.overflow = 'hidden';
|
||||
docElement.appendChild(fakeBody);
|
||||
}
|
||||
|
||||
ret = callback(div, rule);
|
||||
if ( !body ) {
|
||||
fakeBody.parentNode.removeChild(fakeBody);
|
||||
docElement.style.overflow = docOverflow;
|
||||
} else {
|
||||
div.parentNode.removeChild(div);
|
||||
}
|
||||
|
||||
return !!ret;
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
isEventSupported = (function() {
|
||||
|
||||
var TAGNAMES = {
|
||||
'select': 'input', 'change': 'input',
|
||||
'submit': 'form', 'reset': 'form',
|
||||
'error': 'img', 'load': 'img', 'abort': 'img'
|
||||
};
|
||||
|
||||
function isEventSupported( eventName, element ) {
|
||||
|
||||
element = element || document.createElement(TAGNAMES[eventName] || 'div');
|
||||
eventName = 'on' + eventName;
|
||||
|
||||
var isSupported = eventName in element;
|
||||
|
||||
if ( !isSupported ) {
|
||||
if ( !element.setAttribute ) {
|
||||
element = document.createElement('div');
|
||||
}
|
||||
if ( element.setAttribute && element.removeAttribute ) {
|
||||
element.setAttribute(eventName, '');
|
||||
isSupported = is(element[eventName], 'function');
|
||||
|
||||
if ( !is(element[eventName], 'undefined') ) {
|
||||
element[eventName] = undefined;
|
||||
}
|
||||
element.removeAttribute(eventName);
|
||||
}
|
||||
}
|
||||
|
||||
element = null;
|
||||
return isSupported;
|
||||
}
|
||||
return isEventSupported;
|
||||
})(),
|
||||
|
||||
|
||||
_hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
|
||||
|
||||
if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
|
||||
hasOwnProp = function (object, property) {
|
||||
return _hasOwnProperty.call(object, property);
|
||||
};
|
||||
}
|
||||
else {
|
||||
hasOwnProp = function (object, property) {
|
||||
return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function bind(that) {
|
||||
|
||||
var target = this;
|
||||
|
||||
if (typeof target != "function") {
|
||||
throw new TypeError();
|
||||
}
|
||||
|
||||
var args = slice.call(arguments, 1),
|
||||
bound = function () {
|
||||
|
||||
if (this instanceof bound) {
|
||||
|
||||
var F = function(){};
|
||||
F.prototype = target.prototype;
|
||||
var self = new F();
|
||||
|
||||
var result = target.apply(
|
||||
self,
|
||||
args.concat(slice.call(arguments))
|
||||
);
|
||||
if (Object(result) === result) {
|
||||
return result;
|
||||
}
|
||||
return self;
|
||||
|
||||
} else {
|
||||
|
||||
return target.apply(
|
||||
that,
|
||||
args.concat(slice.call(arguments))
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return bound;
|
||||
};
|
||||
}
|
||||
|
||||
function setCss( str ) {
|
||||
mStyle.cssText = str;
|
||||
}
|
||||
|
||||
function setCssAll( str1, str2 ) {
|
||||
return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
|
||||
}
|
||||
|
||||
function is( obj, type ) {
|
||||
return typeof obj === type;
|
||||
}
|
||||
|
||||
function contains( str, substr ) {
|
||||
return !!~('' + str).indexOf(substr);
|
||||
}
|
||||
|
||||
function testProps( props, prefixed ) {
|
||||
for ( var i in props ) {
|
||||
var prop = props[i];
|
||||
if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
|
||||
return prefixed == 'pfx' ? prop : true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function testDOMProps( props, obj, elem ) {
|
||||
for ( var i in props ) {
|
||||
var item = obj[props[i]];
|
||||
if ( item !== undefined) {
|
||||
|
||||
if (elem === false) return props[i];
|
||||
|
||||
if (is(item, 'function')){
|
||||
return item.bind(elem || obj);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function testPropsAll( prop, prefixed, elem ) {
|
||||
|
||||
var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
|
||||
props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
|
||||
|
||||
if(is(prefixed, "string") || is(prefixed, "undefined")) {
|
||||
return testProps(props, prefixed);
|
||||
|
||||
} else {
|
||||
props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
|
||||
return testDOMProps(props, prefixed, elem);
|
||||
}
|
||||
} tests['flexbox'] = function() {
|
||||
return testPropsAll('flexWrap');
|
||||
}; tests['canvas'] = function() {
|
||||
var elem = document.createElement('canvas');
|
||||
return !!(elem.getContext && elem.getContext('2d'));
|
||||
};
|
||||
|
||||
tests['canvastext'] = function() {
|
||||
return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
|
||||
};
|
||||
|
||||
|
||||
|
||||
tests['webgl'] = function() {
|
||||
return !!window.WebGLRenderingContext;
|
||||
};
|
||||
|
||||
|
||||
tests['touch'] = function() {
|
||||
var bool;
|
||||
|
||||
if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
|
||||
bool = true;
|
||||
} else {
|
||||
injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) {
|
||||
bool = node.offsetTop === 9;
|
||||
});
|
||||
}
|
||||
|
||||
return bool;
|
||||
};
|
||||
|
||||
|
||||
|
||||
tests['geolocation'] = function() {
|
||||
return 'geolocation' in navigator;
|
||||
};
|
||||
|
||||
|
||||
tests['postmessage'] = function() {
|
||||
return !!window.postMessage;
|
||||
};
|
||||
|
||||
|
||||
tests['websqldatabase'] = function() {
|
||||
return !!window.openDatabase;
|
||||
};
|
||||
|
||||
tests['indexedDB'] = function() {
|
||||
return !!testPropsAll("indexedDB", window);
|
||||
};
|
||||
|
||||
tests['hashchange'] = function() {
|
||||
return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);
|
||||
};
|
||||
|
||||
tests['history'] = function() {
|
||||
return !!(window.history && history.pushState);
|
||||
};
|
||||
|
||||
tests['draganddrop'] = function() {
|
||||
var div = document.createElement('div');
|
||||
return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
|
||||
};
|
||||
|
||||
tests['websockets'] = function() {
|
||||
return 'WebSocket' in window || 'MozWebSocket' in window;
|
||||
};
|
||||
|
||||
|
||||
tests['rgba'] = function() {
|
||||
setCss('background-color:rgba(150,255,150,.5)');
|
||||
|
||||
return contains(mStyle.backgroundColor, 'rgba');
|
||||
};
|
||||
|
||||
tests['hsla'] = function() {
|
||||
setCss('background-color:hsla(120,40%,100%,.5)');
|
||||
|
||||
return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
|
||||
};
|
||||
|
||||
tests['multiplebgs'] = function() {
|
||||
setCss('background:url(https://),url(https://),red url(https://)');
|
||||
|
||||
return (/(url\s*\(.*?){3}/).test(mStyle.background);
|
||||
}; tests['backgroundsize'] = function() {
|
||||
return testPropsAll('backgroundSize');
|
||||
};
|
||||
|
||||
tests['borderimage'] = function() {
|
||||
return testPropsAll('borderImage');
|
||||
};
|
||||
|
||||
|
||||
|
||||
tests['borderradius'] = function() {
|
||||
return testPropsAll('borderRadius');
|
||||
};
|
||||
|
||||
tests['boxshadow'] = function() {
|
||||
return testPropsAll('boxShadow');
|
||||
};
|
||||
|
||||
tests['textshadow'] = function() {
|
||||
return document.createElement('div').style.textShadow === '';
|
||||
};
|
||||
|
||||
|
||||
tests['opacity'] = function() {
|
||||
setCssAll('opacity:.55');
|
||||
|
||||
return (/^0.55$/).test(mStyle.opacity);
|
||||
};
|
||||
|
||||
|
||||
tests['cssanimations'] = function() {
|
||||
return testPropsAll('animationName');
|
||||
};
|
||||
|
||||
|
||||
tests['csscolumns'] = function() {
|
||||
return testPropsAll('columnCount');
|
||||
};
|
||||
|
||||
|
||||
tests['cssgradients'] = function() {
|
||||
var str1 = 'background-image:',
|
||||
str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
|
||||
str3 = 'linear-gradient(left top,#9f9, white);';
|
||||
|
||||
setCss(
|
||||
(str1 + '-webkit- '.split(' ').join(str2 + str1) +
|
||||
prefixes.join(str3 + str1)).slice(0, -str1.length)
|
||||
);
|
||||
|
||||
return contains(mStyle.backgroundImage, 'gradient');
|
||||
};
|
||||
|
||||
|
||||
tests['cssreflections'] = function() {
|
||||
return testPropsAll('boxReflect');
|
||||
};
|
||||
|
||||
|
||||
tests['csstransforms'] = function() {
|
||||
return !!testPropsAll('transform');
|
||||
};
|
||||
|
||||
|
||||
tests['csstransforms3d'] = function() {
|
||||
|
||||
var ret = !!testPropsAll('perspective');
|
||||
|
||||
if ( ret && 'webkitPerspective' in docElement.style ) {
|
||||
|
||||
injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
|
||||
ret = node.offsetLeft === 9 && node.offsetHeight === 3;
|
||||
});
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
|
||||
|
||||
tests['csstransitions'] = function() {
|
||||
return testPropsAll('transition');
|
||||
};
|
||||
|
||||
|
||||
|
||||
tests['fontface'] = function() {
|
||||
var bool;
|
||||
|
||||
injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) {
|
||||
var style = document.getElementById('smodernizr'),
|
||||
sheet = style.sheet || style.styleSheet,
|
||||
cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
|
||||
|
||||
bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
|
||||
});
|
||||
|
||||
return bool;
|
||||
};
|
||||
|
||||
tests['generatedcontent'] = function() {
|
||||
var bool;
|
||||
|
||||
injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) {
|
||||
bool = node.offsetHeight >= 3;
|
||||
});
|
||||
|
||||
return bool;
|
||||
};
|
||||
tests['video'] = function() {
|
||||
var elem = document.createElement('video'),
|
||||
bool = false;
|
||||
|
||||
try {
|
||||
if ( bool = !!elem.canPlayType ) {
|
||||
bool = new Boolean(bool);
|
||||
bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,'');
|
||||
|
||||
bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
|
||||
|
||||
bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
|
||||
}
|
||||
|
||||
} catch(e) { }
|
||||
|
||||
return bool;
|
||||
};
|
||||
|
||||
tests['audio'] = function() {
|
||||
var elem = document.createElement('audio'),
|
||||
bool = false;
|
||||
|
||||
try {
|
||||
if ( bool = !!elem.canPlayType ) {
|
||||
bool = new Boolean(bool);
|
||||
bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
|
||||
bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,'');
|
||||
|
||||
bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,'');
|
||||
bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
|
||||
elem.canPlayType('audio/aac;')) .replace(/^no$/,'');
|
||||
}
|
||||
} catch(e) { }
|
||||
|
||||
return bool;
|
||||
};
|
||||
|
||||
|
||||
tests['localstorage'] = function() {
|
||||
try {
|
||||
localStorage.setItem(mod, mod);
|
||||
localStorage.removeItem(mod);
|
||||
return true;
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
tests['sessionstorage'] = function() {
|
||||
try {
|
||||
sessionStorage.setItem(mod, mod);
|
||||
sessionStorage.removeItem(mod);
|
||||
return true;
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
tests['webworkers'] = function() {
|
||||
return !!window.Worker;
|
||||
};
|
||||
|
||||
|
||||
tests['applicationcache'] = function() {
|
||||
return !!window.applicationCache;
|
||||
};
|
||||
|
||||
|
||||
tests['svg'] = function() {
|
||||
return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;
|
||||
};
|
||||
|
||||
tests['inlinesvg'] = function() {
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = '<svg/>';
|
||||
return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
|
||||
};
|
||||
|
||||
tests['smil'] = function() {
|
||||
return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
|
||||
};
|
||||
|
||||
|
||||
tests['svgclippaths'] = function() {
|
||||
return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
|
||||
};
|
||||
|
||||
function webforms() {
|
||||
Modernizr['input'] = (function( props ) {
|
||||
for ( var i = 0, len = props.length; i < len; i++ ) {
|
||||
attrs[ props[i] ] = !!(props[i] in inputElem);
|
||||
}
|
||||
if (attrs.list){
|
||||
attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
|
||||
}
|
||||
return attrs;
|
||||
})('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
|
||||
Modernizr['inputtypes'] = (function(props) {
|
||||
|
||||
for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {
|
||||
|
||||
inputElem.setAttribute('type', inputElemType = props[i]);
|
||||
bool = inputElem.type !== 'text';
|
||||
|
||||
if ( bool ) {
|
||||
|
||||
inputElem.value = smile;
|
||||
inputElem.style.cssText = 'position:absolute;visibility:hidden;';
|
||||
|
||||
if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {
|
||||
|
||||
docElement.appendChild(inputElem);
|
||||
defaultView = document.defaultView;
|
||||
|
||||
bool = defaultView.getComputedStyle &&
|
||||
defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
|
||||
(inputElem.offsetHeight !== 0);
|
||||
|
||||
docElement.removeChild(inputElem);
|
||||
|
||||
} else if ( /^(search|tel)$/.test(inputElemType) ){
|
||||
} else if ( /^(url|email)$/.test(inputElemType) ) {
|
||||
bool = inputElem.checkValidity && inputElem.checkValidity() === false;
|
||||
|
||||
} else {
|
||||
bool = inputElem.value != smile;
|
||||
}
|
||||
}
|
||||
|
||||
inputs[ props[i] ] = !!bool;
|
||||
}
|
||||
return inputs;
|
||||
})('search tel url email datetime date month week time datetime-local number range color'.split(' '));
|
||||
}
|
||||
for ( var feature in tests ) {
|
||||
if ( hasOwnProp(tests, feature) ) {
|
||||
featureName = feature.toLowerCase();
|
||||
Modernizr[featureName] = tests[feature]();
|
||||
|
||||
classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
|
||||
}
|
||||
}
|
||||
|
||||
Modernizr.input || webforms();
|
||||
|
||||
|
||||
Modernizr.addTest = function ( feature, test ) {
|
||||
if ( typeof feature == 'object' ) {
|
||||
for ( var key in feature ) {
|
||||
if ( hasOwnProp( feature, key ) ) {
|
||||
Modernizr.addTest( key, feature[ key ] );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
feature = feature.toLowerCase();
|
||||
|
||||
if ( Modernizr[feature] !== undefined ) {
|
||||
return Modernizr;
|
||||
}
|
||||
|
||||
test = typeof test == 'function' ? test() : test;
|
||||
|
||||
if (typeof enableClasses !== "undefined" && enableClasses) {
|
||||
docElement.className += ' ' + (test ? '' : 'no-') + feature;
|
||||
}
|
||||
Modernizr[feature] = test;
|
||||
|
||||
}
|
||||
|
||||
return Modernizr;
|
||||
};
|
||||
|
||||
|
||||
setCss('');
|
||||
modElem = inputElem = null;
|
||||
|
||||
;(function(window, document) {
|
||||
var options = window.html5 || {};
|
||||
|
||||
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
|
||||
|
||||
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
|
||||
|
||||
var supportsHtml5Styles;
|
||||
|
||||
var expando = '_html5shiv';
|
||||
|
||||
var expanID = 0;
|
||||
|
||||
var expandoData = {};
|
||||
|
||||
var supportsUnknownElements;
|
||||
|
||||
(function() {
|
||||
try {
|
||||
var a = document.createElement('a');
|
||||
a.innerHTML = '<xyz></xyz>';
|
||||
supportsHtml5Styles = ('hidden' in a);
|
||||
|
||||
supportsUnknownElements = a.childNodes.length == 1 || (function() {
|
||||
(document.createElement)('a');
|
||||
var frag = document.createDocumentFragment();
|
||||
return (
|
||||
typeof frag.cloneNode == 'undefined' ||
|
||||
typeof frag.createDocumentFragment == 'undefined' ||
|
||||
typeof frag.createElement == 'undefined'
|
||||
);
|
||||
}());
|
||||
} catch(e) {
|
||||
supportsHtml5Styles = true;
|
||||
supportsUnknownElements = true;
|
||||
}
|
||||
|
||||
}()); function addStyleSheet(ownerDocument, cssText) {
|
||||
var p = ownerDocument.createElement('p'),
|
||||
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
|
||||
|
||||
p.innerHTML = 'x<style>' + cssText + '</style>';
|
||||
return parent.insertBefore(p.lastChild, parent.firstChild);
|
||||
}
|
||||
|
||||
function getElements() {
|
||||
var elements = html5.elements;
|
||||
return typeof elements == 'string' ? elements.split(' ') : elements;
|
||||
}
|
||||
|
||||
function getExpandoData(ownerDocument) {
|
||||
var data = expandoData[ownerDocument[expando]];
|
||||
if (!data) {
|
||||
data = {};
|
||||
expanID++;
|
||||
ownerDocument[expando] = expanID;
|
||||
expandoData[expanID] = data;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
function createElement(nodeName, ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createElement(nodeName);
|
||||
}
|
||||
if (!data) {
|
||||
data = getExpandoData(ownerDocument);
|
||||
}
|
||||
var node;
|
||||
|
||||
if (data.cache[nodeName]) {
|
||||
node = data.cache[nodeName].cloneNode();
|
||||
} else if (saveClones.test(nodeName)) {
|
||||
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
|
||||
} else {
|
||||
node = data.createElem(nodeName);
|
||||
}
|
||||
|
||||
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
|
||||
}
|
||||
|
||||
function createDocumentFragment(ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createDocumentFragment();
|
||||
}
|
||||
data = data || getExpandoData(ownerDocument);
|
||||
var clone = data.frag.cloneNode(),
|
||||
i = 0,
|
||||
elems = getElements(),
|
||||
l = elems.length;
|
||||
for(;i<l;i++){
|
||||
clone.createElement(elems[i]);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
function shivMethods(ownerDocument, data) {
|
||||
if (!data.cache) {
|
||||
data.cache = {};
|
||||
data.createElem = ownerDocument.createElement;
|
||||
data.createFrag = ownerDocument.createDocumentFragment;
|
||||
data.frag = data.createFrag();
|
||||
}
|
||||
|
||||
|
||||
ownerDocument.createElement = function(nodeName) {
|
||||
if (!html5.shivMethods) {
|
||||
return data.createElem(nodeName);
|
||||
}
|
||||
return createElement(nodeName, ownerDocument, data);
|
||||
};
|
||||
|
||||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
|
||||
'var n=f.cloneNode(),c=n.createElement;' +
|
||||
'h.shivMethods&&(' +
|
||||
getElements().join().replace(/\w+/g, function(nodeName) {
|
||||
data.createElem(nodeName);
|
||||
data.frag.createElement(nodeName);
|
||||
return 'c("' + nodeName + '")';
|
||||
}) +
|
||||
');return n}'
|
||||
)(html5, data.frag);
|
||||
} function shivDocument(ownerDocument) {
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
var data = getExpandoData(ownerDocument);
|
||||
|
||||
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
|
||||
data.hasCSS = !!addStyleSheet(ownerDocument,
|
||||
'article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +
|
||||
'mark{background:#FF0;color:#000}'
|
||||
);
|
||||
}
|
||||
if (!supportsUnknownElements) {
|
||||
shivMethods(ownerDocument, data);
|
||||
}
|
||||
return ownerDocument;
|
||||
} var html5 = {
|
||||
|
||||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video',
|
||||
|
||||
'shivCSS': (options.shivCSS !== false),
|
||||
|
||||
'supportsUnknownElements': supportsUnknownElements,
|
||||
|
||||
'shivMethods': (options.shivMethods !== false),
|
||||
|
||||
'type': 'default',
|
||||
|
||||
'shivDocument': shivDocument,
|
||||
|
||||
createElement: createElement,
|
||||
|
||||
createDocumentFragment: createDocumentFragment
|
||||
}; window.html5 = html5;
|
||||
|
||||
shivDocument(document);
|
||||
|
||||
}(this, document));
|
||||
|
||||
Modernizr._version = version;
|
||||
|
||||
Modernizr._prefixes = prefixes;
|
||||
Modernizr._domPrefixes = domPrefixes;
|
||||
Modernizr._cssomPrefixes = cssomPrefixes;
|
||||
|
||||
|
||||
Modernizr.hasEvent = isEventSupported;
|
||||
|
||||
Modernizr.testProp = function(prop){
|
||||
return testProps([prop]);
|
||||
};
|
||||
|
||||
Modernizr.testAllProps = testPropsAll;
|
||||
|
||||
|
||||
Modernizr.testStyles = injectElementWithStyles;
|
||||
Modernizr.prefixed = function(prop, obj, elem){
|
||||
if(!obj) {
|
||||
return testPropsAll(prop, 'pfx');
|
||||
} else {
|
||||
return testPropsAll(prop, obj, elem);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
|
||||
|
||||
(enableClasses ? ' js ' + classes.join(' ') : '');
|
||||
|
||||
return Modernizr;
|
||||
|
||||
})(this, this.document);
|
||||
/*yepnope1.5.4|WTFPL*/
|
||||
(function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}})(this,document);
|
||||
Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0));};
|
||||
;
|
2
source/assets/js/vendor/plugins.js
vendored
2
source/assets/js/vendor/plugins.js
vendored
@ -6,7 +6,7 @@
|
||||
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
|
||||
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
|
||||
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
|
||||
'timeStamp', 'trace', 'warn'
|
||||
'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn'
|
||||
];
|
||||
var length = methods.length;
|
||||
var console = (window.console = window.console || {});
|
||||
|
342
source/assets/js/vendor/respond.src.js
vendored
342
source/assets/js/vendor/respond.src.js
vendored
@ -1,342 +0,0 @@
|
||||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||
|
||||
window.matchMedia = window.matchMedia || (function( doc, undefined ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var bool,
|
||||
docElem = doc.documentElement,
|
||||
refNode = docElem.firstElementChild || docElem.firstChild,
|
||||
// fakeBody required for <FF4 when executed in <head>
|
||||
fakeBody = doc.createElement( "body" ),
|
||||
div = doc.createElement( "div" );
|
||||
|
||||
div.id = "mq-test-1";
|
||||
div.style.cssText = "position:absolute;top:-100em";
|
||||
fakeBody.style.background = "none";
|
||||
fakeBody.appendChild(div);
|
||||
|
||||
return function(q){
|
||||
|
||||
div.innerHTML = "­<style media=\"" + q + "\"> #mq-test-1 { width: 42px; }</style>";
|
||||
|
||||
docElem.insertBefore( fakeBody, refNode );
|
||||
bool = div.offsetWidth === 42;
|
||||
docElem.removeChild( fakeBody );
|
||||
|
||||
return {
|
||||
matches: bool,
|
||||
media: q
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}( document ));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*! Respond.js v1.3.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
|
||||
(function( win ){
|
||||
|
||||
"use strict";
|
||||
|
||||
//exposed namespace
|
||||
var respond = {};
|
||||
win.respond = respond;
|
||||
|
||||
//define update even in native-mq-supporting browsers, to avoid errors
|
||||
respond.update = function(){};
|
||||
|
||||
//expose media query support flag for external use
|
||||
respond.mediaQueriesSupported = win.matchMedia && win.matchMedia( "only all" ).matches;
|
||||
|
||||
//if media queries are supported, exit here
|
||||
if( respond.mediaQueriesSupported ){
|
||||
return;
|
||||
}
|
||||
|
||||
//define vars
|
||||
var doc = win.document,
|
||||
docElem = doc.documentElement,
|
||||
mediastyles = [],
|
||||
rules = [],
|
||||
appendedEls = [],
|
||||
parsedSheets = {},
|
||||
resizeThrottle = 30,
|
||||
head = doc.getElementsByTagName( "head" )[0] || docElem,
|
||||
base = doc.getElementsByTagName( "base" )[0],
|
||||
links = head.getElementsByTagName( "link" ),
|
||||
requestQueue = [],
|
||||
|
||||
//loop stylesheets, send text content to translate
|
||||
ripCSS = function(){
|
||||
|
||||
for( var i = 0; i < links.length; i++ ){
|
||||
var sheet = links[ i ],
|
||||
href = sheet.href,
|
||||
media = sheet.media,
|
||||
isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
|
||||
|
||||
//only links plz and prevent re-parsing
|
||||
if( !!href && isCSS && !parsedSheets[ href ] ){
|
||||
// selectivizr exposes css through the rawCssText expando
|
||||
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
|
||||
translate( sheet.styleSheet.rawCssText, href, media );
|
||||
parsedSheets[ href ] = true;
|
||||
} else {
|
||||
if( (!/^([a-zA-Z:]*\/\/)/.test( href ) && !base) ||
|
||||
href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){
|
||||
requestQueue.push( {
|
||||
href: href,
|
||||
media: media
|
||||
} );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
makeRequests();
|
||||
},
|
||||
|
||||
//recurse through request queue, get css text
|
||||
makeRequests = function(){
|
||||
if( requestQueue.length ){
|
||||
var thisRequest = requestQueue.shift();
|
||||
|
||||
ajax( thisRequest.href, function( styles ){
|
||||
translate( styles, thisRequest.href, thisRequest.media );
|
||||
parsedSheets[ thisRequest.href ] = true;
|
||||
|
||||
// by wrapping recursive function call in setTimeout
|
||||
// we prevent "Stack overflow" error in IE7
|
||||
win.setTimeout(function(){ makeRequests(); },0);
|
||||
} );
|
||||
}
|
||||
},
|
||||
|
||||
//find media blocks in css text, convert to style blocks
|
||||
translate = function( styles, href, media ){
|
||||
var qs = styles.match( /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi ),
|
||||
ql = qs && qs.length || 0;
|
||||
|
||||
//try to get CSS path
|
||||
href = href.substring( 0, href.lastIndexOf( "/" ) );
|
||||
|
||||
var repUrls = function( css ){
|
||||
return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" );
|
||||
},
|
||||
useMedia = !ql && media;
|
||||
|
||||
//if path exists, tack on trailing slash
|
||||
if( href.length ){ href += "/"; }
|
||||
|
||||
//if no internal queries exist, but media attr does, use that
|
||||
//note: this currently lacks support for situations where a media attr is specified on a link AND
|
||||
//its associated stylesheet has internal CSS media queries.
|
||||
//In those cases, the media attribute will currently be ignored.
|
||||
if( useMedia ){
|
||||
ql = 1;
|
||||
}
|
||||
|
||||
for( var i = 0; i < ql; i++ ){
|
||||
var fullq, thisq, eachq, eql;
|
||||
|
||||
//media attr
|
||||
if( useMedia ){
|
||||
fullq = media;
|
||||
rules.push( repUrls( styles ) );
|
||||
}
|
||||
//parse for styles
|
||||
else{
|
||||
fullq = qs[ i ].match( /@media *([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1;
|
||||
rules.push( RegExp.$2 && repUrls( RegExp.$2 ) );
|
||||
}
|
||||
|
||||
eachq = fullq.split( "," );
|
||||
eql = eachq.length;
|
||||
|
||||
for( var j = 0; j < eql; j++ ){
|
||||
thisq = eachq[ j ];
|
||||
mediastyles.push( {
|
||||
media : thisq.split( "(" )[ 0 ].match( /(only\s+)?([a-zA-Z]+)\s?/ ) && RegExp.$2 || "all",
|
||||
rules : rules.length - 1,
|
||||
hasquery : thisq.indexOf("(") > -1,
|
||||
minw : thisq.match( /\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ),
|
||||
maxw : thisq.match( /\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" )
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
applyMedia();
|
||||
},
|
||||
|
||||
lastCall,
|
||||
|
||||
resizeDefer,
|
||||
|
||||
// returns the value of 1em in pixels
|
||||
getEmValue = function() {
|
||||
var ret,
|
||||
div = doc.createElement('div'),
|
||||
body = doc.body,
|
||||
fakeUsed = false;
|
||||
|
||||
div.style.cssText = "position:absolute;font-size:1em;width:1em";
|
||||
|
||||
if( !body ){
|
||||
body = fakeUsed = doc.createElement( "body" );
|
||||
body.style.background = "none";
|
||||
}
|
||||
|
||||
body.appendChild( div );
|
||||
|
||||
docElem.insertBefore( body, docElem.firstChild );
|
||||
|
||||
ret = div.offsetWidth;
|
||||
|
||||
if( fakeUsed ){
|
||||
docElem.removeChild( body );
|
||||
}
|
||||
else {
|
||||
body.removeChild( div );
|
||||
}
|
||||
|
||||
//also update eminpx before returning
|
||||
ret = eminpx = parseFloat(ret);
|
||||
|
||||
return ret;
|
||||
},
|
||||
|
||||
//cached container for 1em value, populated the first time it's needed
|
||||
eminpx,
|
||||
|
||||
//enable/disable styles
|
||||
applyMedia = function( fromResize ){
|
||||
var name = "clientWidth",
|
||||
docElemProp = docElem[ name ],
|
||||
currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp,
|
||||
styleBlocks = {},
|
||||
lastLink = links[ links.length-1 ],
|
||||
now = (new Date()).getTime();
|
||||
|
||||
//throttle resize calls
|
||||
if( fromResize && lastCall && now - lastCall < resizeThrottle ){
|
||||
win.clearTimeout( resizeDefer );
|
||||
resizeDefer = win.setTimeout( applyMedia, resizeThrottle );
|
||||
return;
|
||||
}
|
||||
else {
|
||||
lastCall = now;
|
||||
}
|
||||
|
||||
for( var i in mediastyles ){
|
||||
if( mediastyles.hasOwnProperty( i ) ){
|
||||
var thisstyle = mediastyles[ i ],
|
||||
min = thisstyle.minw,
|
||||
max = thisstyle.maxw,
|
||||
minnull = min === null,
|
||||
maxnull = max === null,
|
||||
em = "em";
|
||||
|
||||
if( !!min ){
|
||||
min = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
|
||||
}
|
||||
if( !!max ){
|
||||
max = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
|
||||
}
|
||||
|
||||
// if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true
|
||||
if( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){
|
||||
if( !styleBlocks[ thisstyle.media ] ){
|
||||
styleBlocks[ thisstyle.media ] = [];
|
||||
}
|
||||
styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//remove any existing respond style element(s)
|
||||
for( var j in appendedEls ){
|
||||
if( appendedEls.hasOwnProperty( j ) ){
|
||||
if( appendedEls[ j ] && appendedEls[ j ].parentNode === head ){
|
||||
head.removeChild( appendedEls[ j ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//inject active styles, grouped by media type
|
||||
for( var k in styleBlocks ){
|
||||
if( styleBlocks.hasOwnProperty( k ) ){
|
||||
var ss = doc.createElement( "style" ),
|
||||
css = styleBlocks[ k ].join( "\n" );
|
||||
|
||||
ss.type = "text/css";
|
||||
ss.media = k;
|
||||
|
||||
//originally, ss was appended to a documentFragment and sheets were appended in bulk.
|
||||
//this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one!
|
||||
head.insertBefore( ss, lastLink.nextSibling );
|
||||
|
||||
if ( ss.styleSheet ){
|
||||
ss.styleSheet.cssText = css;
|
||||
}
|
||||
else {
|
||||
ss.appendChild( doc.createTextNode( css ) );
|
||||
}
|
||||
|
||||
//push to appendedEls to track for later removal
|
||||
appendedEls.push( ss );
|
||||
}
|
||||
}
|
||||
},
|
||||
//tweaked Ajax functions from Quirksmode
|
||||
ajax = function( url, callback ) {
|
||||
var req = xmlHttp();
|
||||
if (!req){
|
||||
return;
|
||||
}
|
||||
req.open( "GET", url, true );
|
||||
req.onreadystatechange = function () {
|
||||
if ( req.readyState !== 4 || req.status !== 200 && req.status !== 304 ){
|
||||
return;
|
||||
}
|
||||
callback( req.responseText );
|
||||
};
|
||||
if ( req.readyState === 4 ){
|
||||
return;
|
||||
}
|
||||
req.send( null );
|
||||
},
|
||||
//define ajax obj
|
||||
xmlHttp = (function() {
|
||||
var xmlhttpmethod = false;
|
||||
try {
|
||||
xmlhttpmethod = new win.XMLHttpRequest();
|
||||
}
|
||||
catch( e ){
|
||||
xmlhttpmethod = new win.ActiveXObject( "Microsoft.XMLHTTP" );
|
||||
}
|
||||
return function(){
|
||||
return xmlhttpmethod;
|
||||
};
|
||||
})();
|
||||
|
||||
//translate CSS
|
||||
ripCSS();
|
||||
|
||||
//expose update for re-running respond later on
|
||||
respond.update = ripCSS;
|
||||
|
||||
//adjust on resize
|
||||
function callMedia(){
|
||||
applyMedia( true );
|
||||
}
|
||||
if( win.addEventListener ){
|
||||
win.addEventListener( "resize", callMedia, false );
|
||||
}
|
||||
else if( win.attachEvent ){
|
||||
win.attachEvent( "onresize", callMedia );
|
||||
}
|
||||
})(this);
|
@ -1,7 +1,2 @@
|
||||
= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"
|
||||
:javascript
|
||||
window.jQuery || document.write('<script src="/assets/javascripts/vendor/jquery-2.0.3.js"><\/script>')
|
||||
|
||||
= javascript_include_tag "vendor/jquery-ui-1.10.4.custom", "sass"
|
||||
|
||||
= javascript_include_tag "sass"
|
||||
= yield_content :scripts_footer
|
||||
|
@ -1,7 +1,4 @@
|
||||
= javascript_include_tag "vendor/modernizr.custom.36606"
|
||||
|
||||
/[if lt IE 9]
|
||||
= javascript_include_tag "vendor/respond.src"
|
||||
= javascript_include_tag "vendor/modernizr-2.8.3.custom"
|
||||
|
||||
= javascript_include_tag "//use.typekit.net/pya1hgl.js"
|
||||
:javascript
|
||||
|
Loading…
x
Reference in New Issue
Block a user