diff --git a/modules/mod_ginger_base/lib/js/content-group-nav.js b/modules/mod_ginger_base/lib/js/content-group-nav.js index 6027bc3a3..4e0749d60 100644 --- a/modules/mod_ginger_base/lib/js/content-group-nav.js +++ b/modules/mod_ginger_base/lib/js/content-group-nav.js @@ -17,7 +17,7 @@ $.widget( "ui.content_group_nav", { $(window).scroll($.proxy(me._scrolled, me)); - if(me.banner.size() > 0) { + if(me.banner.length > 0) { me.body.addClass('has-content-group'); } @@ -29,7 +29,7 @@ $.widget( "ui.content_group_nav", { }, _scrolled: function(event) { - + var me = this, scrollTop = $(window).scrollTop(), minPoint = me.subnav.outerHeight() + 20, diff --git a/modules/mod_ginger_base/lib/js/map-location.js b/modules/mod_ginger_base/lib/js/map-location.js index 52f84ce47..469107930 100644 --- a/modules/mod_ginger_base/lib/js/map-location.js +++ b/modules/mod_ginger_base/lib/js/map-location.js @@ -183,7 +183,7 @@ var me = this, mainContentEl = $('.' + me.element.data('main-content-class')); - if (mainContentEl.size() == 0) return false; + if (mainContentEl.length == 0) return false; var masthead = $(me.element), mastheadHeight = masthead[0].clientHeight, diff --git a/modules/mod_ginger_base/lib/js/search/expand-items.js b/modules/mod_ginger_base/lib/js/search/expand-items.js index 43edb56a1..d93f27900 100644 --- a/modules/mod_ginger_base/lib/js/search/expand-items.js +++ b/modules/mod_ginger_base/lib/js/search/expand-items.js @@ -21,7 +21,7 @@ $.widget("ui.expanditems", { button.hide(); - if (inputs.size() > showMax) { + if (inputs.length > showMax) { button.show(); diff --git a/modules/mod_ginger_nav/lib/js/src/mod_ginger_nav.js b/modules/mod_ginger_nav/lib/js/src/mod_ginger_nav.js index fb4b8681b..f7d5e9beb 100644 --- a/modules/mod_ginger_nav/lib/js/src/mod_ginger_nav.js +++ b/modules/mod_ginger_nav/lib/js/src/mod_ginger_nav.js @@ -19,7 +19,7 @@ $.widget( "ui.mod_ginger_nav", { me.mainMenu = $(widgetElement.find('.mod_ginger_nav__main-nav__container__menu')[0]), me.menuButton = $(widgetElement.find('.mod_ginger_nav__main-nav__toggle-menu')[0]), me.themeBanner = $(widgetElement.find('.mod_ginger_nav__theme-banner')[0]), - + //listeners me.searchButton.on('click', $.proxy(me._toggleSearch, me)); me.document.on('click', $.proxy(me._documentClick, me)); @@ -28,17 +28,17 @@ $.widget( "ui.mod_ginger_nav", { me.themeBanner.on('click', $.proxy(me._scrollToTop, me)); //init - if(me.themeBanner.size() > 0) { + if(me.themeBanner.length > 0) { me.body.addClass('has-theme'); } - + }, _documentClick: function(event) { var me = this; - + if (!$(event.target).closest('.mod_ginger_nav__main-nav').length) { if (me.searchForm.hasClass('is-visible')) { me._toggleSearch(); @@ -49,7 +49,7 @@ $.widget( "ui.mod_ginger_nav", { _toggleSearch: function() { var me = this; - + me.searchButton.toggleClass('is-active'); if(me.searchButton.hasClass('is-active')) { diff --git a/modules/mod_ginger_remark/lib/js/remark_widget.js b/modules/mod_ginger_remark/lib/js/remark_widget.js index 42e6b990d..4500d0c92 100644 --- a/modules/mod_ginger_remark/lib/js/remark_widget.js +++ b/modules/mod_ginger_remark/lib/js/remark_widget.js @@ -120,7 +120,7 @@ valid = false; } - if (anonymousName.size() > 0) { + if (anonymousName.length > 0) { if (!re.test(anonymousName.val())) { anonymousName.parent().addClass('has-error is-error'); valid = false; diff --git a/modules/mod_ginger_search/lib/js/ginger-search.js b/modules/mod_ginger_search/lib/js/ginger-search.js index ca0f779ab..cd079b071 100644 --- a/modules/mod_ginger_search/lib/js/ginger-search.js +++ b/modules/mod_ginger_search/lib/js/ginger-search.js @@ -65,7 +65,7 @@ closest = $(e.target).closest(container); if (!container.is(e.target) // if the target of the click isn't the container... - && closest.size() == 0) + && closest.length == 0) { $('.ginger-search').removeClass('is-visible'); diff --git a/modules/mod_ginger_timeline/lib/js/timeline.js b/modules/mod_ginger_timeline/lib/js/timeline.js index 965834d01..178fc00a5 100755 --- a/modules/mod_ginger_timeline/lib/js/timeline.js +++ b/modules/mod_ginger_timeline/lib/js/timeline.js @@ -65,7 +65,7 @@ function TL_Error(message_key, detail) { this.message = message_key || 'error'; this.message_key = this.message; this.detail = detail || ''; - + // Grab stack? var e = new Error(); if(e.hasOwnProperty('stack')) { @@ -1251,7 +1251,7 @@ TL.Util = { return this.filter(function(){ return isObject(selector) ? $.contains(this, selector) : - $(this).find(selector).size() + $(this).find(selector).length }) }, eq: function(idx){ @@ -2357,22 +2357,22 @@ TL.Util = { Copyright (c) 2010-2012 Thomas Fuchs http://zeptojs.com -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ @@ -2387,7 +2387,7 @@ SOFTWARE. TL.Class = function () {}; TL.Class.extend = function (/*Object*/ props) /*-> Class*/ { - + // extended class with the new prototype var NewClass = function () { if (this.initialize) { @@ -2612,29 +2612,29 @@ TL.Events.fire = TL.Events.fireEvent; TL.Load = (function (doc) { var loaded = []; - + function isLoaded(url) { - + var i = 0, has_loaded = false; - + for (i = 0; i < loaded.length; i++) { if (loaded[i] == url) { has_loaded = true; } } - + if (has_loaded) { return true; } else { loaded.push(url); return false; } - + } - + return { - + css: function (urls, callback, obj, context) { if (!isLoaded(urls)) { TL.LoadIt.css(urls, callback, obj, context); @@ -2651,7 +2651,7 @@ TL.Load = (function (doc) { } } }; - + })(this.document); @@ -3588,7 +3588,7 @@ TL.TimelineConfig = TL.Class.extend({ tc = new TL.TimelineConfig(data); } catch(e) { tc = new TL.TimelineConfig(); - tc.logError(e); + tc.logError(e); } callback(tc); }); @@ -3945,7 +3945,7 @@ TL.Language.fallback = new TL.Language(); ********************************************** */ /* TL.I18NMixins - assumes that its class has an options object with a TL.Language instance + assumes that its class has an options object with a TL.Language instance ================================================== */ TL.I18NMixins = { getLanguage: function() { @@ -3977,17 +3977,17 @@ TL.I18NMixins = { * * KeySpline - use bezier curve for transition easing function * Copyright (c) 2012 Gaetan Renaudeau - * + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -4005,7 +4005,7 @@ TL.I18NMixins = { */ TL.Easings = { - ease: [0.25, 0.1, 0.25, 1.0], + ease: [0.25, 0.1, 0.25, 1.0], linear: [0.00, 0.0, 1.00, 1.0], easein: [0.42, 0.0, 1.00, 1.0], easeout: [0.00, 0.0, 0.58, 1.0], @@ -4056,17 +4056,17 @@ TL.Ease = { return aGuessT; } }, - + easeInSpline: function(t) { var spline = new TL.Ease.KeySpline(TL.Easings.easein); return spline.get(t); }, - + easeInOutExpo: function(t) { var spline = new TL.Ease.KeySpline(TL.Easings.easein); return spline.get(t); }, - + easeOut: function(t) { return Math.sin(t * Math.PI / 2); }, @@ -4161,15 +4161,15 @@ TL.Ease = { easeOutQuad: function (t) { return t*(2-t) }, // acceleration until halfway, then deceleration easeInOutQuad: function (t) { return t<.5 ? 2*t*t : -1+(4-2*t)*t }, - // accelerating from zero velocity + // accelerating from zero velocity easeInCubic: function (t) { return t*t*t }, - // decelerating to zero velocity + // decelerating to zero velocity easeOutCubic: function (t) { return (--t)*t*t+1 }, - // acceleration until halfway, then deceleration + // acceleration until halfway, then deceleration easeInOutCubic: function (t) { return t<.5 ? 4*t*t*t : (t-1)*(2*t-2)*(2*t-2)+1 }, - // accelerating from zero velocity + // accelerating from zero velocity easeInQuart: function (t) { return t*t*t*t }, - // decelerating to zero velocity + // decelerating to zero velocity easeOutQuart: function (t) { return 1-(--t)*t*t*t }, // acceleration until halfway, then deceleration easeInOutQuart: function (t) { return t<.5 ? 8*t*t*t*t : 1-8*(--t)*t*t*t }, @@ -4177,7 +4177,7 @@ TL.Ease = { easeInQuint: function (t) { return t*t*t*t*t }, // decelerating to zero velocity easeOutQuint: function (t) { return 1+(--t)*t*t*t*t }, - // acceleration until halfway, then deceleration + // acceleration until halfway, then deceleration easeInOutQuint: function (t) { return t<.5 ? 16*t*t*t*t*t : 1+16*(--t)*t*t*t*t } }; @@ -4186,7 +4186,7 @@ Math.easeInExpo = function (t, b, c, d) { return c * Math.pow( 2, 10 * (t/d - 1) ) + b; }; - + // exponential easing out - decelerating to zero velocity @@ -4195,7 +4195,7 @@ Math.easeOutExpo = function (t, b, c, d) { return c * ( -Math.pow( 2, -10 * t/d ) + 1 ) + b; }; - + // exponential easing in/out - accelerating until halfway, then decelerating @@ -4725,7 +4725,7 @@ TL.Point.prototype = { Assumes there is a _el.container and animator ================================================== */ TL.DomMixins = { - + /* Adding, Hiding, Showing etc ================================================== */ show: function(animate) { @@ -4741,21 +4741,21 @@ TL.DomMixins = { this._el.container.style.display = "block"; } }, - + hide: function(animate) { this._el.container.style.display = "none"; }, - + addTo: function(container) { container.appendChild(this._el.container); this.onAdd(); }, - + removeFrom: function(container) { container.removeChild(this._el.container); this.onRemove(); }, - + /* Animate to Position ================================================== */ animatePosition: function(pos, el) { @@ -4768,20 +4768,20 @@ TL.DomMixins = { ani[name] = pos[name] + "px"; } } - + if (this.animator) { this.animator.stop(); } this.animator = TL.Animate(el, ani); }, - + /* Events ================================================== */ - + onLoaded: function() { this.fire("loaded", this.data); }, - + onAdd: function() { this.fire("added", this.data); }, @@ -4789,7 +4789,7 @@ TL.DomMixins = { onRemove: function() { this.fire("removed", this.data); }, - + /* Set the Position ================================================== */ setPosition: function(pos, el) { @@ -4803,11 +4803,11 @@ TL.DomMixins = { } } }, - + getPosition: function() { return TL.Dom.getPosition(this._el.container); } - + }; @@ -5068,7 +5068,7 @@ TL.DomUtil = { ********************************************** */ /* TL.DomEvent - Inspired by Leaflet + Inspired by Leaflet DomEvent contains functions for working with DOM events. ================================================== */ // TODO stamp @@ -5181,7 +5181,7 @@ TL.DomEvent = { e.cancelBubble = true; } }, - + // TODO TL.Draggable.START disableClickPropagation: function (/*HTMLElement*/ el) { TL.DomEvent.addListener(el, TL.Draggable.START, TL.DomEvent.stopPropagation); @@ -5227,34 +5227,34 @@ TL.DomEvent = { ================================================== */ TL.StyleSheet = TL.Class.extend({ - + includes: [TL.Events], - + _el: {}, - + /* Constructor ================================================== */ initialize: function() { // Borrowed from: http://davidwalsh.name/add-rules-stylesheets this.style = document.createElement("style"); - + // WebKit hack :( this.style.appendChild(document.createTextNode("")); - + // Add the