Skip to content

Commit

Permalink
Rename sectioned to sections.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Humphreys committed Feb 9, 2013
1 parent 1e57be5 commit 6df77cf
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 51 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rdoc
spec/reports
test/tmp
test/version_tmp
test/stylesheets
tmp
*.DS_Store
marketing/.sass-cache/*
Expand Down
4 changes: 1 addition & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ PATH
remote: .
specs:
zurb-foundation (3.2.2)
compass (>= 0.12.2)
modular-scale (= 1.0.4)
rake
sass (>= 3.2.0)

GEM
remote: https://rubygems.org/
Expand All @@ -15,7 +13,7 @@ GEM
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
fssm (0.2.9)
fssm (0.2.10)
modular-scale (1.0.4)
compass (>= 0.11.5)
sassy-math (>= 1.2)
Expand Down
2 changes: 1 addition & 1 deletion lib/assets/js/foundation/foundation.clearing.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
return el.outerHTML || new XMLSerializer().serializeToString(el);
},

unbind : function () {
off : function () {
$(this.scope).off('.fndtn.clearing');
$(window).off('.fndtn.clearing');
this.remove_data(); // empty settings cache
Expand Down
4 changes: 3 additions & 1 deletion lib/assets/js/foundation/foundation.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
}
},

libs : {},

// methods that can be inherited in libraries
lib_methods: {
set_data : function (node, data) {
Expand Down Expand Up @@ -179,7 +181,7 @@
return jQuery;
}
}()
};
},

$.fn.foundation = function () {
var args = [this].concat(Array.prototype.slice.call(arguments, 0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
;(function ($, window, document, undefined) {
'use strict';

Foundation.libs = Foundation.libs || {};

Foundation.libs.sectioned = {
name: 'sectioned',
Foundation.libs.sections = {
name: 'sections',

version : '4.0.0.alpha',

Expand Down Expand Up @@ -36,13 +34,12 @@

events : function () {
var self = this;
$(this.scope).on('click.fndtn.sectioned', '.sectioned .title', function (e) {
console.log(self.data_options($(this).closest('.sectioned')))
$.extend(true, self.settings, self.data_options($(this).closest('.sectioned')));
$(this.scope).on('click.fndtn.sections', '[data-sections] .title', function (e) {
$.extend(true, self.settings, self.data_options($(this).closest('[data-sections]')));
self.toggle_active.call(this, e, self);
});

$(window).on('resize.fndtn.sectioned', self.throttle(function () {
$(window).on('resize.fndtn.sections', self.throttle(function () {
self.resize.call(this);
}, 100)).trigger('resize');

Expand All @@ -61,7 +58,10 @@
}
} else {
if ($(window).width() > 768 || self.settings.one_up) {
$('.sectioned').find('section, .section').removeClass('active');
$this
.closest('[data-sections]')
.find('section, .section')
.removeClass('active');
}
section.addClass('active');
}
Expand All @@ -70,7 +70,7 @@
},

resize : function () {
var sections = $('.sectioned');
var sections = $('[data-sections]');

if ($(this).width() > 768) {
sections.each(function() {
Expand All @@ -80,11 +80,11 @@
} else if (active_section.length < 1) {
$(this).find('section, .section').first().addClass('active');
}
Foundation.libs.sectioned.position_titles($(this));
Foundation.libs.sections.position_titles($(this));
});
} else {
sections.each(function() {
Foundation.libs.sectioned.position_titles($(this), false);
Foundation.libs.sections.position_titles($(this), false);
});
}
},
Expand All @@ -94,7 +94,7 @@

if (hash.length > 0 && this.settings.deep_linking) {
$(this.scope)
.find('.sectioned')
.find('[data-sections]')
.find('.content[data-slug=' + hash + ']')
.closest('section, .section')
.addClass('active');
Expand All @@ -115,9 +115,9 @@
}
},

unbind : function () {
$(this.scope).off('.fndtn.sectioned');
$(window).off('.fndtn.sectioned');
off : function () {
$(this.scope).off('.fndtn.sections');
$(window).off('.fndtn.sections');
}
};
}(Foundation.zj, this, this.document));
2 changes: 1 addition & 1 deletion scss/foundation/components/large-screen/_all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import "buttons";
@import "switch";
@import "navbar";
@import "sectioned";
@import "sections";
// @import "topbar";
// @import "orbit";
// @import "reveal";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
$tabPadding: 15px !default;

@media only screen and (min-width: emCalc(768px)) {
.sectioned {
[data-sections] {
border: 1px solid #eee;
border-top: 0;
position: relative;

section, .section {
padding-top: 0;
border-top: 0;
position: static;

.title {
top: 1px;
width: auto;
border-right: 1px solid #ccc;

&:hover {
background-color: #ddd;
}

}
.content {
border-top: 1px solid #efefef;
Expand Down
2 changes: 1 addition & 1 deletion scss/foundation/components/small-screen/_sections.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$tabPadding: emCalc(15px) !default;

.sectioned {
[data-sections] {
width: 100%;
display: block;
border: 1px solid #eee;
Expand Down
48 changes: 24 additions & 24 deletions test/css/buttons-test.css
Original file line number Diff line number Diff line change
Expand Up @@ -1595,36 +1595,36 @@ form.custom .custom.disabled {
height: 1.875em;
}

.sectioned {
[data-sections] {
width: 100%;
display: block;
border: 1px solid #eeeeee;
}
.sectioned section, .sectioned .section {
[data-sections] section, [data-sections] .section {
padding-top: 2.8125em;
border-top: 1px solid #cccccc;
position: relative;
}
.sectioned section .title, .sectioned .section .title {
[data-sections] section .title, [data-sections] .section .title {
position: absolute;
top: 0;
cursor: pointer;
width: 100%;
margin: 0;
background-color: #efefef;
}
.sectioned section .title a, .sectioned .section .title a {
[data-sections] section .title a, [data-sections] .section .title a {
padding: -0.0625em 0.9375em;
display: inline-block;
}
.sectioned section .title:hover, .sectioned .section .title:hover {
[data-sections] section .title:hover, [data-sections] .section .title:hover {
background-color: #ddd;
}
.sectioned section .content, .sectioned .section .content {
[data-sections] section .content, [data-sections] .section .content {
display: none;
padding: 0.9375em;
}
.sectioned section.active .content, .sectioned .section.active .content {
[data-sections] section.active .content, [data-sections] .section.active .content {
display: block;
}

Expand Down Expand Up @@ -2259,7 +2259,7 @@ ul.flyout li.active a,
position: absolute;
top: 0;
left: -20px;
background: url('../../lib/assets/img/foundation/orbit/rotator-black.png?1360019124') no-repeat;
background: url('../../lib/assets/img/foundation/orbit/rotator-black.png?1360427718') no-repeat;
z-index: 3;
}
.orbit-wrapper .rotator.move {
Expand All @@ -2278,7 +2278,7 @@ ul.flyout li.active a,
.orbit-wrapper .mask.move {
width: 40px;
left: 0;
background: url('../../lib/assets/img/foundation/orbit/timer-black.png?1360019124') repeat 0 0;
background: url('../../lib/assets/img/foundation/orbit/timer-black.png?1360427718') repeat 0 0;
}
.orbit-wrapper .pause {
display: block;
Expand All @@ -2287,12 +2287,12 @@ ul.flyout li.active a,
position: absolute;
top: 0;
left: 0;
background: url('../../lib/assets/img/foundation/orbit/pause-black.png?1360019124') no-repeat;
background: url('../../lib/assets/img/foundation/orbit/pause-black.png?1360427718') no-repeat;
z-index: 4;
opacity: 0;
}
.orbit-wrapper .pause.active {
background: url('../../lib/assets/img/foundation/orbit/pause-black.png?1360019124') no-repeat 0 -40px;
background: url('../../lib/assets/img/foundation/orbit/pause-black.png?1360427718') no-repeat 0 -40px;
}
.orbit-wrapper .timer:hover .pause,
.orbit-wrapper .timer:focus .pause,
Expand Down Expand Up @@ -2333,21 +2333,21 @@ ul.flyout li.active a,
cursor: pointer;
}
.orbit-wrapper .slider-nav span.right {
background: url('../../lib/assets/img/foundation/orbit/right-arrow.png?1360019124');
background: url('../../lib/assets/img/foundation/orbit/right-arrow.png?1360427718');
background-size: 100%;
right: 0;
}
.orbit-wrapper .slider-nav span.left {
background: url('../../lib/assets/img/foundation/orbit/left-arrow.png?1360019124');
background: url('../../lib/assets/img/foundation/orbit/left-arrow.png?1360427718');
background-size: 100%;
left: 0;
}

.lt-ie9 .orbit-wrapper .slider-nav span.right {
background: url('../../lib/assets/img/foundation/orbit/right-arrow-small.png?1360019124');
background: url('../../lib/assets/img/foundation/orbit/right-arrow-small.png?1360427718');
}
.lt-ie9 .orbit-wrapper .slider-nav span.left {
background: url('../../lib/assets/img/foundation/orbit/left-arrow-small.png?1360019124');
background: url('../../lib/assets/img/foundation/orbit/left-arrow-small.png?1360427718');
}

.orbit-bullets {
Expand All @@ -2365,7 +2365,7 @@ ul.flyout li.active a,
cursor: pointer;
color: #999999;
text-indent: -9999px;
background: url('../../lib/assets/img/foundation/orbit/bullets.jpg?1360019124') no-repeat 4px 0;
background: url('../../lib/assets/img/foundation/orbit/bullets.jpg?1360427718') no-repeat 4px 0;
width: 13px;
height: 12px;
overflow: hidden;
Expand Down Expand Up @@ -3977,38 +3977,38 @@ table tfoot tr td {
}
}
@media only screen and (min-width: 48em) {
.sectioned {
[data-sections] {
border: 1px solid #eeeeee;
border-top: 0;
position: relative;
}
.sectioned section, .sectioned .section {
[data-sections] section, [data-sections] .section {
padding-top: 0;
border-top: 0;
position: static;
}
.sectioned section .title, .sectioned .section .title {
[data-sections] section .title, [data-sections] .section .title {
top: 1px;
width: auto;
border-right: 1px solid #cccccc;
}
.sectioned section .title:hover, .sectioned .section .title:hover {
[data-sections] section .title:hover, [data-sections] .section .title:hover {
background-color: #ddd;
}
.sectioned section .content, .sectioned .section .content {
[data-sections] section .content, [data-sections] .section .content {
border-top: 1px solid #efefef;
background-color: white;
position: absolute;
}
.sectioned section.active, .sectioned .section.active {
[data-sections] section.active, [data-sections] .section.active {
padding-top: 2.8125em;
border-top: 1px solid #cccccc;
}
.sectioned section.active .title, .sectioned .section.active .title {
[data-sections] section.active .title, [data-sections] .section.active .title {
background-color: white;
z-index: 1;
}
.sectioned section.active .content, .sectioned .section.active .content {
[data-sections] section.active .content, [data-sections] .section.active .content {
position: relative;
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h5>Available Testing Pages:</h5>
<li><a href="topbar.html">Top Bar</a></li>
<li><a href="navigation.html">Navigation</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="sectioned.html">Sectioned</a></li>
<li><a href="sections.html">Sectioned</a></li>
<li><a href="elements.html">Elements</a></li>
<li><a href="magellan.html">Magellan</a></li>
<li><a href="orbit.html">Orbit</a></li>
Expand Down
4 changes: 2 additions & 2 deletions test/sectioned.html → test/sections.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h4>Secioned Content</h4>
</div>
<br>
<div class="eight columns">
<div class="sectioned" data-options="deep_linking: true; one_up: true">
<div data-sections data-options="deep_linking: true; one_up: true">
<section>
<h5 class="title"><a href="#panel1">Panel 1</a></h5>
<div class="content" data-slug="panel1">
Expand Down Expand Up @@ -65,7 +65,7 @@ <h5 class="title"><a href="#panel3">Panel 3</a></h5>
<!-- Included JS Files -->
<script src="../lib/assets/js/foundation/zepto.js"></script>
<script src="../lib/assets/js/foundation/foundation.js"></script>
<script src="../lib/assets/js/foundation/foundation.sectioned.js"></script>
<script src="../lib/assets/js/foundation/foundation.sections.js"></script>
<script type="text/javascript">
$(document).foundation();
</script>
Expand Down

0 comments on commit 6df77cf

Please sign in to comment.