foundation
Advanced tools
Comparing version 4.1.5 to 4.1.6-1
@@ -0,4 +1,14 @@ | ||
### 4.1.6- May 6, 2013 | ||
* Improved performance for custom select boxes. | ||
* Bug fix for switches contained within custom forms. | ||
* Bug fix for directly clicking on checkbox to toggle it | ||
* Sections are now semantic. | ||
You can compare the commits [here](https://github.com/zurb/foundation/compare/v4.1.5...v4.1.6). | ||
### 4.1.5- April 26, 2013 | ||
* Add support for `indexOf` in legacy browsers | ||
You can compare the commits [here](https://github.com/zurb/foundation/compare/v4.1.4...v4.1.5). | ||
### 4.1.4- April 26, 2013 | ||
@@ -5,0 +15,0 @@ * Fixes invalid Rails generator path |
@@ -1,17 +0,17 @@ | ||
/*jslint unparam: true, browser: true, indent: 2 */ | ||
;(function ($, window, document, undefined) { | ||
(function ($, window, document, undefined) { | ||
'use strict'; | ||
Foundation.libs.forms = { | ||
name : 'forms', | ||
name: 'forms', | ||
version : '4.0.4', | ||
version: '4.1.6', | ||
settings : { | ||
disable_class: 'no-custom' | ||
cache: {}, | ||
settings: { | ||
disable_class: 'no-custom', | ||
last_combo : null | ||
}, | ||
init : function (scope, method, options) { | ||
this.scope = scope || this.scope; | ||
init: function (scope, method, options) { | ||
@@ -35,3 +35,3 @@ if (typeof method === 'object') { | ||
assemble : function () { | ||
assemble: function () { | ||
$('form.custom input[type="radio"]', $(this.scope)).not('[data-customforms="disabled"]') | ||
@@ -42,8 +42,8 @@ .each(this.append_custom_markup); | ||
$('form.custom select', $(this.scope)) | ||
.not('[data-customforms="disabled"]') | ||
.not('[multiple=multiple]') | ||
.not('[data-customforms="disabled"]') | ||
.not('[multiple=multiple]') | ||
.each(this.append_custom_select); | ||
}, | ||
events : function () { | ||
events: function () { | ||
var self = this; | ||
@@ -62,26 +62,29 @@ | ||
}) | ||
.on('change.fndtn.forms', 'form.custom select:not([data-customforms="disabled"])', function (e) { | ||
self.refresh_custom_select($(this)); | ||
.on('change.fndtn.forms', 'form.custom select:not([data-customforms="disabled"])', function (e, force_refresh) { | ||
self.refresh_custom_select($(this), force_refresh); | ||
}) | ||
.on('click.fndtn.forms', 'form.custom label', function (e) { | ||
var $associatedElement = $('#' + self.escape($(this).attr('for')) + ':not([data-customforms="disabled"])'), | ||
if ($(e.target).is('label')) { | ||
var $associatedElement = $('#' + self.escape($(this).attr('for')) + ':not([data-customforms="disabled"])'), | ||
$customCheckbox, | ||
$customRadio; | ||
if ($associatedElement.length !== 0) { | ||
if ($associatedElement.attr('type') === 'checkbox') { | ||
e.preventDefault(); | ||
$customCheckbox = $(this).find('span.custom.checkbox'); | ||
//the checkbox might be outside after the label or inside of another element | ||
if ($customCheckbox.length == 0) { | ||
$customCheckbox = $associatedElement.add(this).siblings('span.custom.checkbox').first(); | ||
if ($associatedElement.length !== 0) { | ||
if ($associatedElement.attr('type') === 'checkbox') { | ||
e.preventDefault(); | ||
$customCheckbox = $(this).find('span.custom.checkbox'); | ||
//the checkbox might be outside after the label or inside of another element | ||
if ($customCheckbox.length == 0) { | ||
$customCheckbox = $associatedElement.add(this).siblings('span.custom.checkbox').first(); | ||
} | ||
self.toggle_checkbox($customCheckbox); | ||
} else if ($associatedElement.attr('type') === 'radio') { | ||
e.preventDefault(); | ||
$customRadio = $(this).find('span.custom.radio'); | ||
//the radio might be outside after the label or inside of another element | ||
if ($customRadio.length == 0) { | ||
$customRadio = $associatedElement.add(this).siblings('span.custom.radio').first(); | ||
} | ||
self.toggle_radio($customRadio); | ||
} | ||
self.toggle_checkbox($customCheckbox); | ||
} else if ($associatedElement.attr('type') === 'radio') { | ||
e.preventDefault(); | ||
$customRadio = $(this).find('span.custom.radio'); | ||
//the radio might be outside after the label or inside of another element | ||
if ($customRadio.length == 0) { | ||
$customRadio = $associatedElement.add(this).siblings('span.custom.radio').first(); | ||
} | ||
self.toggle_radio($customRadio); | ||
} | ||
@@ -93,7 +96,6 @@ } | ||
$dropdown = $this.closest('div.custom.dropdown'), | ||
$select = $dropdown.prev(); | ||
$select = getFirstPrevSibling($dropdown, 'select'); | ||
// make sure other dropdowns close | ||
if(!$dropdown.hasClass('open')) | ||
$(self.scope).trigger('click'); | ||
if (!$dropdown.hasClass('open')) $(self.scope).trigger('click'); | ||
@@ -118,3 +120,3 @@ e.preventDefault(); | ||
$customDropdown = $this.closest('div.custom.dropdown'), | ||
$select = $customDropdown.prev(), | ||
$select = getFirstPrevSibling($customDropdown, 'select'), | ||
selectedIndex = 0; | ||
@@ -125,7 +127,6 @@ | ||
if ( ! $(this).hasClass('disabled')) { | ||
if (!$(this).hasClass('disabled')) { | ||
$('div.dropdown').not($customDropdown).removeClass('open'); | ||
var $oldThis= $this | ||
.closest('ul') | ||
var $oldThis = $this.closest('ul') | ||
.find('li.selected'); | ||
@@ -136,6 +137,5 @@ $oldThis.removeClass('selected'); | ||
$customDropdown | ||
.removeClass('open') | ||
$customDropdown.removeClass('open') | ||
.find('a.current') | ||
.html($this.html()); | ||
.text($this.text()); | ||
@@ -146,3 +146,2 @@ $this.closest('ul').find('li').each(function (index) { | ||
} | ||
}); | ||
@@ -155,6 +154,7 @@ $select[0].selectedIndex = selectedIndex; | ||
} | ||
}); | ||
}); | ||
$(window).on('keydown', function (e) { | ||
var focus = document.activeElement, | ||
self = Foundation.libs.forms, | ||
dropdown = $('.custom.dropdown.open'); | ||
@@ -168,3 +168,17 @@ | ||
} | ||
if (e.which === 27) { | ||
dropdown.removeClass('open'); | ||
} | ||
if (e.which >= 65 && e.which <= 90) { | ||
var next = self.go_to(dropdown, e.which), | ||
current = dropdown.find('li.selected'); | ||
if (next) { | ||
current.removeClass('selected'); | ||
self.scrollTo(next.addClass('selected'), 300); | ||
} | ||
} | ||
if (e.which === 38) { | ||
@@ -175,2 +189,3 @@ var current = dropdown.find('li.selected'), | ||
if (prev.length > 0) { | ||
prev.parent()[0].scrollTop = prev.parent().scrollTop() - self.outerHeight(prev); | ||
current.removeClass('selected'); | ||
@@ -184,2 +199,3 @@ prev.addClass('selected'); | ||
if (next.length > 0) { | ||
next.parent()[0].scrollTop = next.parent().scrollTop() + self.outerHeight(next); | ||
current.removeClass('selected'); | ||
@@ -195,7 +211,38 @@ next.addClass('selected'); | ||
append_custom_markup : function (idx, sel) { | ||
var $this = $(sel).addClass('hidden-field'), | ||
type = $this.attr('type'), | ||
go_to: function (dropdown, char) { | ||
var lis = dropdown.find('li'), | ||
count = lis.length; | ||
if (count > 0) { | ||
for (var i = 0; i < count; i++) { | ||
var first_letter = lis.eq(i).text().charAt(0).toLowerCase(); | ||
if (first_letter === String.fromCharCode(char).toLowerCase()) return lis.eq(i); | ||
} | ||
} | ||
}, | ||
scrollTo: function (el, duration) { | ||
if (duration < 0) return; | ||
var parent = el.parent(); | ||
var li_height = this.outerHeight(el); | ||
var difference = (li_height * (el.index())) - parent.scrollTop(); | ||
var perTick = difference / duration * 10; | ||
this.scrollToTimerCache = setTimeout(function () { | ||
if (!isNaN(parseInt(perTick, 10))) { | ||
parent[0].scrollTop = parent.scrollTop() + perTick; | ||
this.scrollTo(el, duration - 10); | ||
} | ||
}.bind(this), 10); | ||
}, | ||
append_custom_markup: function (idx, sel) { | ||
var $this = $(sel), | ||
type = $this.attr('type'), | ||
$span = $this.next('span.custom.' + type); | ||
if (!$this.parent().hasClass('switch')) { | ||
$this.addClass('hidden-field'); | ||
} | ||
if ($span.length === 0) { | ||
@@ -209,130 +256,154 @@ $span = $('<span class="custom ' + type + '"></span>').insertAfter($this); | ||
append_custom_select : function (idx, sel) { | ||
var self = Foundation.libs.forms, | ||
$this = $( sel ), | ||
$customSelect = $this.next( 'div.custom.dropdown' ), | ||
$customList = $customSelect.find( 'ul' ), | ||
$selectCurrent = $customSelect.find( ".current" ), | ||
$selector = $customSelect.find( ".selector" ), | ||
$options = $this.find( 'option' ), | ||
$selectedOption = $options.filter( ':selected' ), | ||
copyClasses = $this.attr('class') ? $this.attr('class').split(' ') : [], | ||
maxWidth = 0, | ||
liHtml = '', | ||
$listItems, | ||
$currentSelect = false; | ||
append_custom_select: function (idx, sel) { | ||
var self = Foundation.libs.forms, | ||
$this = $(sel), | ||
$customSelect = $this.next('div.custom.dropdown'), | ||
$customList = $customSelect.find('ul'), | ||
$selectCurrent = $customSelect.find(".current"), | ||
$selector = $customSelect.find(".selector"), | ||
$options = $this.find('option'), | ||
$selectedOption = $options.filter(':selected'), | ||
copyClasses = $this.attr('class') ? $this.attr('class').split(' ') : [], | ||
maxWidth = 0, | ||
liHtml = '', | ||
$listItems, | ||
$currentSelect = false; | ||
if ($this.hasClass(self.settings.disable_class)) return; | ||
if ($this.hasClass(self.settings.disable_class)) return; | ||
if ($customSelect.length === 0) { | ||
var customSelectSize = $this.hasClass( 'small' ) ? 'small' : | ||
$this.hasClass( 'medium' ) ? 'medium' : | ||
$this.hasClass( 'large' ) ? 'large' : | ||
$this.hasClass( 'expand' ) ? 'expand' : ''; | ||
if ($customSelect.length === 0) { | ||
var customSelectSize = $this.hasClass('small') ? 'small' : $this.hasClass('medium') ? 'medium' : $this.hasClass('large') ? 'large' : $this.hasClass('expand') ? 'expand' : ''; | ||
$customSelect = $('<div class="' + ['custom', 'dropdown', customSelectSize ].concat(copyClasses).filter(function(item, idx,arr){ if(item == '') return false; return arr.indexOf(item) == idx; }).join( ' ' ) + '"><a href="#" class="selector"></a><ul /></div>'); | ||
$selector = $customSelect.find(".selector"); | ||
$customList = $customSelect.find("ul"); | ||
liHtml = $options.map(function() { return "<li>" + $( this ).html() + "</li>"; } ).get().join( '' ); | ||
$customList.append(liHtml); | ||
$currentSelect = $customSelect.prepend('<a href="#" class="current">' + $selectedOption.html() + '</a>' ).find( ".current" ); | ||
$this | ||
.after( $customSelect ) | ||
.addClass('hidden-field'); | ||
$customSelect = $('<div class="' + ['custom', 'dropdown', customSelectSize].concat(copyClasses).filter(function (item, idx, arr) { | ||
if (item == '') return false; | ||
return arr.indexOf(item) == idx; | ||
}).join(' ') + '"><a href="#" class="selector"></a><ul /></div>'); | ||
} else { | ||
liHtml = $options.map(function() { | ||
return "<li>" + $( this ).html() + "</li>"; | ||
}) | ||
.get().join(''); | ||
$customList | ||
.html('') | ||
.append(liHtml); | ||
$selector = $customSelect.find(".selector"); | ||
$customList = $customSelect.find("ul"); | ||
} // endif $customSelect.length === 0 | ||
$customSelect.toggleClass('disabled', $this.is( ':disabled' ) ); | ||
$listItems = $customList.find( 'li' ); | ||
liHtml = $options.map(function () { | ||
return "<li>" + $(this).html() + "</li>"; | ||
}).get().join(''); | ||
$options.each( function ( index ) { | ||
if ( this.selected ) { | ||
$listItems.eq( index ).addClass( 'selected' ); | ||
$customList.append(liHtml); | ||
if ($currentSelect) { | ||
$currentSelect.html( $( this ).html() ); | ||
} | ||
$currentSelect = $customSelect | ||
.prepend('<a href="#" class="current">' + $selectedOption.html() + '</a>') | ||
.find(".current"); | ||
} | ||
if ($(this).is(':disabled')) { | ||
$listItems.eq( index ).addClass( 'disabled' ); | ||
} | ||
}); | ||
$this.after($customSelect) | ||
.addClass('hidden-field'); | ||
} else { | ||
liHtml = $options.map(function () { | ||
return "<li>" + $(this).html() + "</li>"; | ||
}) | ||
.get().join(''); | ||
// | ||
// If we're not specifying a predetermined form size. | ||
// | ||
if (!$customSelect.is('.small, .medium, .large, .expand')) { | ||
$customList.html('') | ||
.append(liHtml); | ||
// ------------------------------------------------------------------------------------ | ||
// This is a work-around for when elements are contained within hidden parents. | ||
// For example, when custom-form elements are inside of a hidden reveal modal. | ||
// | ||
// We need to display the current custom list element as well as hidden parent elements | ||
// in order to properly calculate the list item element's width property. | ||
// ------------------------------------------------------------------------------------- | ||
} // endif $customSelect.length === 0 | ||
$customSelect.addClass( 'open' ); | ||
self.assign_id($this, $customSelect); | ||
$customSelect.toggleClass('disabled', $this.is(':disabled')); | ||
$listItems = $customList.find('li'); | ||
// cache list length | ||
self.cache[$customSelect.data('id')] = $listItems.length; | ||
$options.each(function (index) { | ||
if (this.selected) { | ||
$listItems.eq(index).addClass('selected'); | ||
if ($currentSelect) { | ||
$currentSelect.html($(this).html()); | ||
} | ||
} | ||
if ($(this).is(':disabled')) { | ||
$listItems.eq(index).addClass('disabled'); | ||
} | ||
}); | ||
// | ||
// Quickly, display all parent elements. | ||
// This should help us calcualate the width of the list item's within the drop down. | ||
// If we're not specifying a predetermined form size. | ||
// | ||
var self = Foundation.libs.forms; | ||
self.hidden_fix.adjust( $customList ); | ||
if (!$customSelect.is('.small, .medium, .large, .expand')) { | ||
maxWidth = ( self.outerWidth($listItems) > maxWidth ) ? self.outerWidth($listItems) : maxWidth; | ||
// ------------------------------------------------------------------------------------ | ||
// This is a work-around for when elements are contained within hidden parents. | ||
// For example, when custom-form elements are inside of a hidden reveal modal. | ||
// | ||
// We need to display the current custom list element as well as hidden parent elements | ||
// in order to properly calculate the list item element's width property. | ||
// ------------------------------------------------------------------------------------- | ||
Foundation.libs.forms.hidden_fix.reset(); | ||
$customSelect.addClass('open'); | ||
// | ||
// Quickly, display all parent elements. | ||
// This should help us calcualate the width of the list item's within the drop down. | ||
// | ||
var self = Foundation.libs.forms; | ||
self.hidden_fix.adjust($customList); | ||
$customSelect.removeClass( 'open' ); | ||
maxWidth = (self.outerWidth($listItems) > maxWidth) ? self.outerWidth($listItems) : maxWidth; | ||
} // endif | ||
Foundation.libs.forms.hidden_fix.reset(); | ||
$customSelect.removeClass('open'); | ||
} // endif | ||
}, | ||
refresh_custom_select : function ($select) { | ||
assign_id: function ($select, $customSelect) { | ||
var id = [+new Date(), Foundation.random_str(5)].join('-'); | ||
$select.attr('data-id', id); | ||
$customSelect.attr('data-id', id); | ||
}, | ||
refresh_custom_select: function ($select, force_refresh) { | ||
var self = this; | ||
var maxWidth = 0, | ||
$customSelect = $select.next(), | ||
$options = $select.find('option'); | ||
$customSelect = $select.next(), | ||
$options = $select.find('option'), | ||
$listItems = $customSelect.find('li'); | ||
$customSelect.find('ul').html(''); | ||
if ($listItems.length != this.cache[$customSelect.data('id')] || force_refresh) { | ||
$customSelect.find('ul').html(''); | ||
$options.each(function () { | ||
var $li = $('<li>' + $(this).html() + '</li>'); | ||
$customSelect.find('ul').append($li); | ||
}); | ||
$options.each(function () { | ||
var $li = $('<li>' + $(this).html() + '</li>'); | ||
$customSelect.find('ul').append($li); | ||
}); | ||
// re-populate | ||
$options.each(function (index) { | ||
if (this.selected) { | ||
$customSelect.find('li').eq(index).addClass('selected'); | ||
$customSelect.find('.current').html($(this).html()); | ||
} | ||
if ($(this).is(':disabled')) { | ||
$customSelect.find('li').eq(index).addClass('disabled'); | ||
} | ||
}); | ||
// re-populate | ||
$options.each(function (index) { | ||
if (this.selected) { | ||
$customSelect.find('li').eq(index).addClass('selected'); | ||
$customSelect.find('.current').html($(this).html()); | ||
} | ||
if ($(this).is(':disabled')) { | ||
$customSelect.find('li').eq(index).addClass('disabled'); | ||
} | ||
}); | ||
// fix width | ||
$customSelect.removeAttr('style') | ||
.find('ul').removeAttr('style'); | ||
$customSelect.find('li').each(function () { | ||
$customSelect.addClass('open'); | ||
if (self.outerWidth($(this)) > maxWidth) { | ||
maxWidth = self.outerWidth($(this)); | ||
} | ||
$customSelect.removeClass('open'); | ||
}); | ||
// fix width | ||
$customSelect.removeAttr('style') | ||
.find('ul').removeAttr('style'); | ||
$customSelect.find('li').each(function () { | ||
$customSelect.addClass('open'); | ||
if (self.outerWidth($(this)) > maxWidth) { | ||
maxWidth = self.outerWidth($(this)); | ||
} | ||
$customSelect.removeClass('open'); | ||
}); | ||
$listItems = $customSelect.find('li'); | ||
// cache list length | ||
this.cache[$customSelect.data('id')] = $listItems.length; | ||
} | ||
}, | ||
toggle_checkbox : function ($element) { | ||
toggle_checkbox: function ($element) { | ||
var $input = $element.prev(), | ||
@@ -349,96 +420,109 @@ input = $input[0]; | ||
toggle_radio : function ($element) { | ||
var $input = $element.prev(), | ||
$form = $input.closest('form.custom'), | ||
input = $input[0]; | ||
toggle_radio: function ($element) { | ||
var $input = $element.prev(), | ||
$form = $input.closest('form.custom'), | ||
input = $input[0]; | ||
if (false === $input.is(':disabled')) { | ||
$form.find('input[type="radio"][name="' + this.escape($input.attr('name')) + '"]').next().not($element).removeClass('checked'); | ||
if ( !$element.hasClass('checked') ) { | ||
$element.toggleClass('checked'); | ||
if (false === $input.is(':disabled')) { | ||
$form.find('input[type="radio"][name="' + this.escape($input.attr('name')) + '"]') | ||
.next().not($element).removeClass('checked'); | ||
if (!$element.hasClass('checked')) { | ||
$element.toggleClass('checked'); | ||
} | ||
input.checked = $element.hasClass('checked'); | ||
$input.trigger('change'); | ||
} | ||
input.checked = $element.hasClass('checked'); | ||
$input.trigger('change'); | ||
} | ||
}, | ||
escape : function (text) { | ||
escape: function (text) { | ||
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); | ||
}, | ||
hidden_fix : { | ||
/** | ||
* Sets all hidden parent elements and self to visibile. | ||
* | ||
* @method adjust | ||
* @param {jQuery Object} $child | ||
*/ | ||
hidden_fix: { | ||
/** | ||
* Sets all hidden parent elements and self to visibile. | ||
* | ||
* @method adjust | ||
* @param {jQuery Object} $child | ||
*/ | ||
// We'll use this to temporarily store style properties. | ||
tmp : [], | ||
// We'll use this to temporarily store style properties. | ||
tmp: [], | ||
// We'll use this to set hidden parent elements. | ||
hidden : null, | ||
// We'll use this to set hidden parent elements. | ||
hidden: null, | ||
adjust : function( $child ) { | ||
// Internal reference. | ||
var _self = this; | ||
adjust: function ($child) { | ||
// Internal reference. | ||
var _self = this; | ||
// Set all hidden parent elements, including this element. | ||
_self.hidden = $child.parents().andSelf().filter( ":hidden" ); | ||
// Set all hidden parent elements, including this element. | ||
_self.hidden = $child.parents().andSelf().filter(":hidden"); | ||
// Loop through all hidden elements. | ||
_self.hidden.each( function() { | ||
// Loop through all hidden elements. | ||
_self.hidden.each(function () { | ||
// Cache the element. | ||
var $elem = $( this ); | ||
// Cache the element. | ||
var $elem = $(this); | ||
// Store the style attribute. | ||
// Undefined if element doesn't have a style attribute. | ||
_self.tmp.push( $elem.attr( 'style' ) ); | ||
// Store the style attribute. | ||
// Undefined if element doesn't have a style attribute. | ||
_self.tmp.push($elem.attr('style')); | ||
// Set the element's display property to block, | ||
// but ensure it's visibility is hidden. | ||
$elem.css( { 'visibility' : 'hidden', 'display' : 'block' } ); | ||
}); | ||
// Set the element's display property to block, | ||
// but ensure it's visibility is hidden. | ||
$elem.css({ | ||
'visibility': 'hidden', | ||
'display': 'block' | ||
}); | ||
}); | ||
}, // end adjust | ||
}, // end adjust | ||
/** | ||
* Resets the elements previous state. | ||
* | ||
* @method reset | ||
*/ | ||
reset : function() { | ||
// Internal reference. | ||
var _self = this; | ||
// Loop through our hidden element collection. | ||
_self.hidden.each( function( i ) { | ||
// Cache this element. | ||
var $elem = $( this ), | ||
_tmp = _self.tmp[ i ]; // Get the stored 'style' value for this element. | ||
/** | ||
* Resets the elements previous state. | ||
* | ||
* @method reset | ||
*/ | ||
reset: function () { | ||
// Internal reference. | ||
var _self = this; | ||
// Loop through our hidden element collection. | ||
_self.hidden.each(function (i) { | ||
// Cache this element. | ||
var $elem = $(this), | ||
_tmp = _self.tmp[i]; // Get the stored 'style' value for this element. | ||
// If the stored value is undefined. | ||
if( _tmp === undefined ) | ||
// If the stored value is undefined. | ||
if (_tmp === undefined) | ||
// Remove the style attribute. | ||
$elem.removeAttr( 'style' ); | ||
else | ||
$elem.removeAttr('style'); | ||
else | ||
// Otherwise, reset the element style attribute. | ||
$elem.attr( 'style', _tmp ); | ||
$elem.attr('style', _tmp); | ||
}); | ||
// Reset the tmp array. | ||
_self.tmp = []; | ||
// Reset the hidden elements variable. | ||
_self.hidden = null; | ||
}); | ||
// Reset the tmp array. | ||
_self.tmp = []; | ||
// Reset the hidden elements variable. | ||
_self.hidden = null; | ||
} // end reset | ||
} // end reset | ||
}, | ||
off : function () { | ||
off: function () { | ||
$(this.scope).off('.fndtn.forms'); | ||
} | ||
}; | ||
var getFirstPrevSibling = function($el, selector) { | ||
var $el = $el.prev(); | ||
while ($el.length) { | ||
if ($el.is(selector)) return $el; | ||
$el = $el.prev(); | ||
} | ||
return $(); | ||
}; | ||
}(Foundation.zj, this, this.document)); |
/*jslint unparam: true, browser: true, indent: 2 */ | ||
;(function ($, window, document, undefined) { | ||
(function ($, window, document, undefined) { | ||
'use strict'; | ||
@@ -124,3 +124,3 @@ | ||
if (!this.settings.init) this.init(); | ||
// non configureable settings | ||
@@ -551,3 +551,4 @@ this.settings.$content_el = $this; | ||
if (!this.settings.$next_tip.data('closed')) { | ||
if ($('.joyride-modal-bg').length < 1) { | ||
var joyridemodalbg = $('.joyride-modal-bg'); | ||
if (joyridemodalbg.length < 1) { | ||
$('body').append(this.settings.template.modal).show(); | ||
@@ -557,5 +558,5 @@ } | ||
if (/pop/i.test(this.settings.tipAnimation)) { | ||
$('.joyride-modal-bg').show(); | ||
joyridemodalbg.show(); | ||
} else { | ||
$('.joyride-modal-bg').fadeIn(this.settings.tipAnimationFadeSpeed); | ||
joyridemodalbg.fadeIn(this.settings.tipAnimationFadeSpeed); | ||
} | ||
@@ -595,3 +596,3 @@ } | ||
}); | ||
exposeCover = $(this.settings.template.exposeCover); | ||
@@ -604,3 +605,3 @@ | ||
el.css('z-index',expose.css('z-index')*1+1); | ||
el.css('z-index',parseInt(expose.css('z-index'))+1); | ||
@@ -818,2 +819,3 @@ if (origCSS.position == 'static') { | ||
this.settings.postRideCallback(this.settings.$li.index(), this.settings.$current_tip); | ||
$('.joyride-tip-guide').remove(); | ||
}, | ||
@@ -835,2 +837,2 @@ | ||
}; | ||
}(Foundation.zj, this, this.document)); | ||
}(Foundation.zj, this, this.document)); |
@@ -401,2 +401,2 @@ /* | ||
}(libFuncName, this, this.document)); | ||
}(libFuncName, this, this.document)); |
@@ -98,3 +98,3 @@ /*jslint unparam: true, browser: true, indent: 2 */ | ||
|| self.is_accordion(parent)) { | ||
if (prev_active_section[0] !== region[0] | ||
if (prev_active_section[0] !== region[0] | ||
|| (prev_active_section[0] === region[0] && !settings.one_up)) { | ||
@@ -117,3 +117,3 @@ region | ||
} else { | ||
prev_active_section.attr('style', | ||
prev_active_section.attr('style', | ||
'visibility: hidden; padding-top: '+title_height+'px;'); | ||
@@ -350,7 +350,7 @@ } | ||
content | ||
.css({left: title.position().left - 1, | ||
.css({left: title.position().left - 1, | ||
top: self.outerHeight(title) - 2}); | ||
} else { | ||
content | ||
.css({right: self.position_right(title) + 1, | ||
.css({right: self.position_right(title) + 1, | ||
top: self.outerHeight(title) - 2}); | ||
@@ -357,0 +357,0 @@ } |
{ | ||
"name": "foundation", | ||
"version": "4.1.5", | ||
"version": "4.1.6-1", | ||
"main": "stylus/foundation", | ||
@@ -5,0 +5,0 @@ "devDependencies": { |
@@ -88,2 +88,6 @@ | ||
Shopify | ||
* [Foundationify Shopify Theme](https://github.com/lukebussey/foundationify) by Luke Bussey | ||
Other Implementations | ||
@@ -90,0 +94,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2224144
15698
139
2