Skip to content

Commit

Permalink
Merge github.com:kyan/foundation-rails - ( PULLING IN 5.5.0 )
Browse files Browse the repository at this point in the history
# By Arthur (17) and others
# Via Arthur (2) and others
* github.com:kyan/foundation-rails:
  Updating version rb file
  Updating to Foundation 5.5.0 uses Sass 3.4.9
  Updating
  Added coffeescript support for the foundation initializer
  Updating version
  Updating to Version 5.4.5
  Updating Version
  New Version
  Don't allow sass 3.4+ in the gemspec
  Updating version
  Updating 5.4.3
  5.4.3
  Fix
  Updating to 5.4.2
  Updating Bower.json
  Updating to 5.4.1
  Changing back to 5.4.0
  Bumping Version #s
  Updating to 5.4.0
  Moving application `javascript_include_tag` to the HTML <head>.

Conflicts:
	bower.json
	lib/foundation/rails/version.rb
	vendor/assets/_settings.scss
	vendor/assets/javascripts/foundation/foundation.abide.js
	vendor/assets/javascripts/foundation/foundation.accordion.js
	vendor/assets/javascripts/foundation/foundation.alert.js
	vendor/assets/javascripts/foundation/foundation.clearing.js
	vendor/assets/javascripts/foundation/foundation.dropdown.js
	vendor/assets/javascripts/foundation/foundation.equalizer.js
	vendor/assets/javascripts/foundation/foundation.interchange.js
	vendor/assets/javascripts/foundation/foundation.joyride.js
	vendor/assets/javascripts/foundation/foundation.js
	vendor/assets/javascripts/foundation/foundation.magellan.js
	vendor/assets/javascripts/foundation/foundation.offcanvas.js
	vendor/assets/javascripts/foundation/foundation.orbit.js
	vendor/assets/javascripts/foundation/foundation.reveal.js
	vendor/assets/javascripts/foundation/foundation.slider.js
	vendor/assets/javascripts/foundation/foundation.tab.js
	vendor/assets/javascripts/foundation/foundation.tooltip.js
	vendor/assets/javascripts/foundation/foundation.topbar.js
	vendor/assets/stylesheets/foundation/_functions.scss
	vendor/assets/stylesheets/foundation/_settings.scss
	vendor/assets/stylesheets/foundation/components/_accordion.scss
	vendor/assets/stylesheets/foundation/components/_button-groups.scss
	vendor/assets/stylesheets/foundation/components/_forms.scss
	vendor/assets/stylesheets/foundation/components/_global.scss
	vendor/assets/stylesheets/foundation/components/_icon-bar.scss
	vendor/assets/stylesheets/foundation/components/_offcanvas.scss
	vendor/assets/stylesheets/foundation/components/_orbit.scss
	vendor/assets/stylesheets/foundation/components/_reveal.scss
	vendor/assets/stylesheets/foundation/components/_switches.scss
	vendor/assets/stylesheets/foundation/components/_tabs.scss
	vendor/assets/stylesheets/foundation/components/_top-bar.scss
  • Loading branch information
robertkyan committed Dec 23, 2014
2 parents 1fda47a + 5adc95e commit e19113c
Show file tree
Hide file tree
Showing 48 changed files with 856 additions and 442 deletions.
4 changes: 2 additions & 2 deletions bower.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "foundation-rails",
"version": "5.4.6.0",
"version": "5.5.0.0",
"dependencies": {
"foundation": "5.4.6"
"foundation": "5.5.0"
}
}
2 changes: 1 addition & 1 deletion foundation-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_dependency "sass", [">= 3.2.0"]
spec.add_dependency "sass", [">= 3.2.0", "< 3.4"]
spec.add_dependency "railties", [">= 3.1.0"]
spec.add_development_dependency "rake"
end
5 changes: 3 additions & 2 deletions lib/foundation/rails/templates/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

<%%= stylesheet_link_tag "application" %>
<%%= javascript_include_tag "vendor/modernizr" %>
<%%= javascript_include_tag "application" 'data-turbolinks-track' => true %>
<%%= csrf_meta_tags %>
</head>

<body>

<%%= yield %>
<%%= javascript_include_tag "application" %>

</body>
</html>
</html>
2 changes: 1 addition & 1 deletion lib/foundation/rails/templates/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

= stylesheet_link_tag "application"
= javascript_include_tag "vendor/modernizr"
= javascript_include_tag "application", 'data-turbolinks-track' => true
= csrf_meta_tag

%body

= yield

= javascript_include_tag "application"
2 changes: 1 addition & 1 deletion lib/foundation/rails/templates/application.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ html lang="en"

= stylesheet_link_tag "application"
= javascript_include_tag "vendor/modernizr"
= javascript_include_tag "application", 'data-turbolinks-track' => true
= csrf_meta_tag

body

== yield

= javascript_include_tag "application"
2 changes: 1 addition & 1 deletion lib/foundation/rails/version.rb
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Foundation
module Rails
VERSION = "5.4.5.0"
VERSION = "5.5.0.0"
end
end
46 changes: 25 additions & 21 deletions vendor/assets/_settings.scss
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,6 @@ $include-html-global-classes: $include-html-classes;
// $font-weight-normal: normal !default;
// $font-weight-bold: bold !default;

// We use these as default colors throughout
// $primary-color: #008CBA;
// $secondary-color: #e7e7e7;
// $alert-color: #f04124;
// $success-color: #43AC6A;
// $warning-color: #f08a24;
// $info-color: #a0d3e8;

// $white : #FFFFFF;
// $ghost : #FAFAFA;
// $snow : #F9F9F9;
Expand All @@ -123,6 +115,14 @@ $include-html-global-classes: $include-html-classes;
// $jet : #222222;
// $black : #000000;

// We use these as default colors throughout
// $primary-color: #008CBA;
// $secondary-color: #e7e7e7;
// $alert-color: #f04124;
// $success-color: #43AC6A;
// $warning-color: #f08a24;
// $info-color: #a0d3e8;

// We use these to control various global styles
// $body-bg: $white;
// $body-font-color: $jet;
Expand Down Expand Up @@ -318,14 +318,14 @@ $include-html-global-classes: $include-html-classes;
// $include-html-accordion-classes: $include-html-classes;

// $accordion-navigation-padding: rem-calc(16);
// $accordion-navigation-bg-color: $silver ;
// $accordion-navigation-bg-color: $silver;
// $accordion-navigation-hover-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -5%);
// $accordion-navigation-active-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -3%);
// $accordion-navigation-font-color: $jet;
// $accordion-navigation-font-size: rem-calc(16);
// $accordion-navigation-font-family: $body-font-family;

// $accordion-content-padding: $column-gutter/2;
// $accordion-content-padding: ($column-gutter/2);
// $accordion-content-active-bg-color: $white;

// 02. Alert Boxes
Expand Down Expand Up @@ -545,7 +545,7 @@ $include-html-global-classes: $include-html-classes;
// $f-dropdown-font-size: rem-calc(14);
// $f-dropdown-list-padding: rem-calc(5, 10);
// $f-dropdown-line-height: rem-calc(18);
// $f-dropdown-list-hover-bg: $smoke ;
// $f-dropdown-list-hover-bg: $smoke;
// $dropdown-mobile-default-float: 0;

// We use this to control the styles for when the dropdown has custom content.
Expand Down Expand Up @@ -573,25 +573,25 @@ $include-html-global-classes: $include-html-classes;
// $dropdown-button-padding-tny: $button-pip-tny * 7;
// $dropdown-button-pip-size-tny: $button-pip-tny;
// $dropdown-button-pip-opposite-tny: $button-pip-tny * 3;
// $dropdown-button-pip-top-tny: -$button-pip-tny / 2 + rem-calc(1);
// $dropdown-button-pip-top-tny: (-$button-pip-tny / 2) + rem-calc(1);

// We use these to style small dropdown buttons
// $dropdown-button-padding-sml: $button-pip-sml * 7;
// $dropdown-button-pip-size-sml: $button-pip-sml;
// $dropdown-button-pip-opposite-sml: $button-pip-sml * 3;
// $dropdown-button-pip-top-sml: -$button-pip-sml / 2 + rem-calc(1);
// $dropdown-button-pip-top-sml: (-$button-pip-sml / 2) + rem-calc(1);

// We use these to style medium dropdown buttons
// $dropdown-button-padding-med: $button-pip-med * 6 + rem-calc(3);
// $dropdown-button-pip-size-med: $button-pip-med - rem-calc(3);
// $dropdown-button-pip-opposite-med: $button-pip-med * 2.5;
// $dropdown-button-pip-top-med: -$button-pip-med / 2 + rem-calc(2);
// $dropdown-button-pip-top-med: (-$button-pip-med / 2) + rem-calc(2);

// We use these to style large dropdown buttons
// $dropdown-button-padding-lrg: $button-pip-lrg * 5 + rem-calc(3);
// $dropdown-button-pip-size-lrg: $button-pip-lrg - rem-calc(6);
// $dropdown-button-pip-opposite-lrg: $button-pip-lrg * 2.5;
// $dropdown-button-pip-top-lrg: -$button-pip-lrg / 2 + rem-calc(3);
// $dropdown-button-pip-top-lrg: (-$button-pip-lrg / 2) + rem-calc(3);

// 10. Flex Video
// - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down Expand Up @@ -667,6 +667,7 @@ $include-html-global-classes: $include-html-classes;
// $input-error-message-font-weight: $font-weight-normal;
// $input-error-message-font-style: italic;
// $input-error-message-font-color: $white;
// $input-error-message-bg-color: $alert-color;
// $input-error-message-font-color-alt: $oil;

// We use this to style the glowing effect of inputs when focused
Expand All @@ -685,9 +686,11 @@ $include-html-global-classes: $include-html-classes;
// $include-html-icon-bar-classes: $include-html-classes;
// $icon-bar-bg: $oil;
// $icon-bar-font-color: $white;
// $icon-bar-font-color-hover: $icon-bar-font-color;
// $icon-bar-font-size: 1rem;
// $icon-bar-hover-color: $primary-color;
// $icon-bar-icon-color: $white;
// $icon-bar-icon-color-hover: $icon-bar-icon-color;
// $icon-bar-icon-size: 1.875rem;
// $icon-bar-image-width: 1.875rem;
// $icon-bar-image-height: 1.875rem;
Expand Down Expand Up @@ -991,7 +994,7 @@ $include-html-global-classes: $include-html-classes;
// $price-title-font-family: $body-font-family;

// We use these to control the price styles
// $price-money-bg: $vapor ;
// $price-money-bg: $vapor;
// $price-money-padding: rem-calc(15 20);
// $price-money-align: center;
// $price-money-color: $oil;
Expand Down Expand Up @@ -1268,7 +1271,7 @@ $include-html-global-classes: $include-html-classes;

// These control the background color for the table and even rows
// $table-bg: $white;
// $table-even-row-bg: $snow ;
// $table-even-row-bg: $snow;

// These control the table cell border style
// $table-border-style: solid;
Expand Down Expand Up @@ -1308,7 +1311,7 @@ $include-html-global-classes: $include-html-classes;
// $tabs-navigation-font-family: $body-font-family;

// $tabs-content-margin-bottom: rem-calc(24);
// $tabs-content-padding: $column-gutter/2;
// $tabs-content-padding: ($column-gutter/2);

// $tabs-vertical-navigation-margin-bottom: 1.25rem;

Expand Down Expand Up @@ -1365,7 +1368,7 @@ $include-html-global-classes: $include-html-classes;
// $topbar-bg: $topbar-bg-color;

// Height and margin
// $topbar-height: 45px;
// $topbar-height: rem-calc(45);
// $topbar-margin-bottom: 0;

// Controlling the styles for the title in the top bar
Expand All @@ -1376,6 +1379,7 @@ $include-html-global-classes: $include-html-classes;
// $topbar-dropdown-bg: $oil;
// $topbar-dropdown-link-color: $white;
// $topbar-dropdown-link-bg: $oil;
// $topbar-dropdown-link-bg-hover: $oil;
// $topbar-dropdown-link-weight: $font-weight-normal;
// $topbar-dropdown-toggle-size: 5px;
// $topbar-dropdown-toggle-color: $white;
Expand All @@ -1391,12 +1395,12 @@ $include-html-global-classes: $include-html-classes;
// $topbar-link-hover-lightness: -10%; // Darken by 10%
// $topbar-link-bg: $topbar-bg;
// $topbar-link-bg-color-hover: $charcoal;
// $topbar-link-bg-hover: #272727;
// $topbar-link-bg-hover: $oil;
// $topbar-link-bg-active: $primary-color;
// $topbar-link-bg-active-hover: scale-color($primary-color, $lightness: -14%);
// $topbar-link-font-family: $body-font-family;
// $topbar-link-text-transform: none;
// $topbar-link-padding: $topbar-height / 3;
// $topbar-link-padding: ($topbar-height / 3);
// $topbar-back-link-size: $h5-font-size;
// $topbar-link-dropdown-padding: 20px;

Expand Down
51 changes: 28 additions & 23 deletions vendor/assets/javascripts/foundation/foundation.abide.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
Foundation.libs.abide = {
name : 'abide',

version : '5.4.5',
version : '5.5.0',

settings : {
live_validate : true,
validate_on_blur: true,
focus_on_invalid : true,
error_labels: true, // labels with a for="inputId" will recieve an `error` class
error_class: 'error',
timeout : 1000,
patterns : {
alpha: /^[a-zA-Z]+$/,
Expand All @@ -26,7 +28,7 @@

url: /^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d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-Z0-9])?\.)+[a-zA-Z]{2,6}$/,
domain: /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,

datetime: /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,
// YYYY-MM-DD
Expand Down Expand Up @@ -78,10 +80,12 @@
.find('input, textarea, select')
.off('.abide')
.on('blur.fndtn.abide change.fndtn.abide', function (e) {
self.validate([this], e);
if (settings.validate_on_blur === true) {
self.validate([this], e);
}
})
.on('keydown.fndtn.abide', function (e) {
if (settings.live_validate === true) {
if (settings.live_validate === true && e.which != 9) {
clearTimeout(self.timer);
self.timer = setTimeout(function () {
self.validate([this], e);
Expand All @@ -93,7 +97,7 @@
reset : function (form) {
form.removeAttr(this.invalid_attr);
$(this.invalid_attr, form).removeAttr(this.invalid_attr);
$('.error', form).not('small').removeClass('error');
$('.' + this.settings.error_class, form).not('small').removeClass(this.settings.error_class);
},

validate : function (els, e, is_ajax) {
Expand All @@ -106,14 +110,14 @@
for (var i=0; i < validation_count; i++) {
if (!validations[i] && (submit_event || is_ajax)) {
if (this.settings.focus_on_invalid) els[i].focus();
form.trigger('invalid');
form.trigger('invalid').trigger('invalid.fndtn.abide');
this.S(els[i]).closest('form').attr(this.invalid_attr, '');
return false;
}
}

if (submit_event || is_ajax) {
form.trigger('valid');
form.trigger('valid').trigger('valid.fndtn.abide');
}

form.removeAttr(this.invalid_attr);
Expand Down Expand Up @@ -155,6 +159,7 @@
return [el, pattern, required];
},

// TODO: Break this up into smaller methods, getting hard to read.
check_validation_and_apply_styles : function (el_patterns) {
var i = el_patterns.length,
validations = [],
Expand Down Expand Up @@ -207,29 +212,29 @@
this.S(el).removeAttr(this.invalid_attr);
el.setAttribute('aria-invalid', 'false');
el.removeAttribute('aria-describedby');
parent.removeClass('error');
parent.removeClass(this.settings.error_class);
if (label.length > 0 && this.settings.error_labels) {
label.removeClass('error').removeAttr('role');
label.removeClass(this.settings.error_class).removeAttr('role');
}
$(el).triggerHandler('valid');
} else {
this.S(el).attr(this.invalid_attr, '');
el.setAttribute('aria-invalid', 'true');

// Try to find the error associated with the input
var errorElem = parent.find('small.error, span.error');
var errorElem = parent.find('small.'+this.settings.error_class, 'span.'+this.settings.error_class);
var errorID = errorElem.length > 0 ? errorElem[0].id : "";
if (errorID.length > 0) el.setAttribute('aria-describedby', errorID);

// el.setAttribute('aria-describedby', $(el).find('.error')[0].id);
parent.addClass('error');
parent.addClass(this.settings.error_class);
if (label.length > 0 && this.settings.error_labels) {
label.addClass('error').attr('role', 'alert');
label.addClass(this.settings.error_class).attr('role', 'alert');
}
$(el).triggerHandler('invalid');
}
validations.push(el_validations[0]);
}
validations.push(el_validations[0]);
}
validations = [validations.every(function(valid){return valid;})];
return validations;
Expand All @@ -240,9 +245,9 @@
valid = (el.is(':checked') || !required);

if (valid) {
el.removeAttr(this.invalid_attr).parent().removeClass('error');
el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
} else {
el.attr(this.invalid_attr, '').parent().addClass('error');
el.attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
}

return valid;
Expand All @@ -262,9 +267,9 @@
// Has to count up to make sure the focus gets applied to the top error
for (var i=0; i < count; i++) {
if (valid) {
this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass('error');
this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
} else {
this.S(group[i]).attr(this.invalid_attr, '').parent().addClass('error');
this.S(group[i]).attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
}
}

Expand All @@ -278,12 +283,12 @@

if (valid) {
this.S(el).removeAttr(this.invalid_attr);
parent.removeClass('error');
if (label.length > 0 && settings.error_labels) label.removeClass('error');
parent.removeClass(this.settings.error_class);
if (label.length > 0 && settings.error_labels) label.removeClass(this.settings.error_class);
} else {
this.S(el).attr(this.invalid_attr, '');
parent.addClass('error');
if (label.length > 0 && settings.error_labels) label.addClass('error');
parent.addClass(this.settings.error_class);
if (label.length > 0 && settings.error_labels) label.addClass(this.settings.error_class);
}

return valid;
Expand All @@ -295,9 +300,9 @@
valid = others.filter(':checked').length > 0;

if (valid) {
el.removeAttr(this.invalid_attr).parent().removeClass('error');
el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
} else {
el.attr(this.invalid_attr, '').parent().addClass('error');
el.attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
}

if (!doNotValidateOthers) {
Expand Down
Loading

0 comments on commit e19113c

Please sign in to comment.