Skip to content

Commit

Permalink
Merge branch 'release/5.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
w00fz committed Jul 13, 2015
2 parents 7a8d8c8 + 83b6ad2 commit 679b33e
Show file tree
Hide file tree
Showing 381 changed files with 10,545 additions and 4,840 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Thumbs.db
# Composer
bin/**/composer.lock
bin/**/vendor/**
src/composer.lock
src/vendor/**

# Symbolic links in admin
Expand All @@ -26,10 +25,6 @@ themes/*/*/common
themes/*/*/src
themes/*/*/cache
themes/*/*/custom
themes/*/magento/design/default/gantry/common
themes/*/magento/design/default/gantry/src
themes/*/magento/design/default/gantry/vendor
themes/*/magento/skin/default/common

# Compiled
**/.sass-cache
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ after_deploy:
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*";
git fetch --quiet;
cd $TRAVIS_BUILD_DIR/bin/build;
php build.php prod-versions -propertyfile release.ini -Dupdate_versions=true -Dxml.version=$TRAVIS_TAG;
php build.php prod-versions -Dupdate_versions=true -Dxml.version=$TRAVIS_TAG;
cd $TRAVIS_BUILD_DIR;
git commit -am "Release [$TRAVIS_TAG] - Automatic Version Number Updates";
git push --force --quiet --set-upstream https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git master:master &>/dev/null;
Expand Down
3 changes: 2 additions & 1 deletion assets/common/application/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
var ready = require('domready'),
menu = require('./menu'),
offcanvas = require('./offcanvas'),
totop = require('./totop'),
$ = require('./utils/dollar-extras'),

instances = {};
Expand All @@ -16,4 +17,4 @@ ready(function() {
module.exports = window.G5 = instances;
});

module.exports = window.G5 = instances;
module.exports = window.G5 = instances;
24 changes: 20 additions & 4 deletions assets/common/application/menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,19 +234,35 @@ var Menu = new prime({
if (!isGoingBack) {
// if from height is < than to height set the parent height else, set the target
if (heights.from.height < heights.to.height) { parent[0].style.height = height + 'px'; }
else { sublevel[0].style.height = height + 'px'; }
else if (isNavMenu) { sublevel[0].style.height = height + 'px'; }

// fix sublevels heights in side menu (offcanvas etc)
if (!isNavMenu) {
var maxHeight = height,
block = $(sublevel).parent('.g-block:not(.size-100)'),
column = block ? block.parent('.g-dropdown-column') : null;
(sublevel.parents('.g-slide-out, .g-dropdown-column') || parent).forEach(function(slideout) {
maxHeight = Math.max(height, parseInt(slideout.style.height, 10));
maxHeight = Math.max(height, parseInt(slideout.style.height || 0, 10));
});

if (column) { column[0].style.height = maxHeight + 'px'; }
sublevel[0].style.height = maxHeight + 'px';
if (column) {
column[0].style.height = maxHeight + 'px';

var blocks = column.search('> .g-grid > .g-block'),
diff = maxHeight;

blocks.forEach(function(block, i){
if ((i + 1) != blocks.length) {
diff -= block.getBoundingClientRect().height;
} else {
$(block).find('.g-sublevel')[0].style.height = diff + 'px';
}
});


} else {
sublevel[0].style.height = maxHeight + 'px';
}
}
}
},
Expand Down
23 changes: 13 additions & 10 deletions assets/common/application/offcanvas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ var ready = require('domready'),
// thanks David Walsh
var prefix = (function() {
var styles = window.getComputedStyle(document.documentElement, ''),
pre = (Array.prototype.slice.call(styles).join('')
.match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
pre = (Array.prototype.slice.call(styles).join('')
.match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
)[1],
dom = ('WebKit|Moz|MS|O').match(new RegExp('(' + pre + ')', 'i'))[1];
dom = ('WebKit|Moz|MS|O').match(new RegExp('(' + pre + ')', 'i'))[1];
return {
dom: dom,
lowercase: pre,
Expand Down Expand Up @@ -81,6 +81,9 @@ var Offcanvas = new prime({
this.panel = $('#g-page-surround');
this.offcanvas = $('#g-offcanvas');

var swipe = this.offcanvas.data('g-offcanvas-swipe');
this.setOptions({ touch: !!(swipe !== null ? parseInt(swipe) : 1) });

if (!this.panel || !this.offcanvas) { return false; }

if (!this.options.padding) {
Expand Down Expand Up @@ -124,7 +127,7 @@ var Offcanvas = new prime({

attachTouchEvents: function() {
var msPointerSupported = window.navigator.msPointerEnabled,
touch = {
touch = {
start: msPointerSupported ? 'MSPointerDown' : 'touchstart',
move: msPointerSupported ? 'MSPointerMove' : 'touchmove',
end: msPointerSupported ? 'MSPointerUp' : 'touchend'
Expand Down Expand Up @@ -162,7 +165,7 @@ var Offcanvas = new prime({

detachTouchEvents: function() {
var msPointerSupported = window.navigator.msPointerEnabled,
touch = {
touch = {
start: msPointerSupported ? 'MSPointerDown' : 'touchstart',
move: msPointerSupported ? 'MSPointerMove' : 'touchmove',
end: msPointerSupported ? 'MSPointerUp' : 'touchend'
Expand Down Expand Up @@ -245,7 +248,7 @@ var Offcanvas = new prime({
},

_translateXTo: function(x) {
var panel = this.panel[0],
var panel = this.panel[0],
placement = (this.bodyEl.hasClass('g-offcanvas-right') ? 'right' : 'left');

this.offset.x.current = x;
Expand Down Expand Up @@ -288,8 +291,8 @@ var Offcanvas = new prime({
_touchMove: function(event) {
if (isScrolling || this.preventOpen || !event.touches) { return; }

var placement = (this.bodyEl.hasClass('g-offcanvas-right') ? 'right' : 'left'),
diffX = clamp(event.touches[0].clientX - this.offset.x.start, -this.options.padding, this.options.padding),
var placement = (this.bodyEl.hasClass('g-offcanvas-right') ? 'right' : 'left'),
diffX = clamp(event.touches[0].clientX - this.offset.x.start, -this.options.padding, this.options.padding),
translateX = this.offset.x.current = diffX,
diffY = Math.abs(event.touches[0].pageY - this.offset.y.start),
overlayOpacity;
Expand Down Expand Up @@ -342,14 +345,14 @@ var Offcanvas = new prime({
},

_checkTogglers: function(mutator) {
var togglers = $('[data-offcanvas-toggle], [data-offcanvas-open], [data-offcanvas-close]'),
var togglers = $('[data-offcanvas-toggle], [data-offcanvas-open], [data-offcanvas-close]'),
mobileContainer = $('#g-mobilemenu-container'),
blocks, mCtext;

if (!togglers || (mutator && ((mutator.target || mutator.srcElement) !== mobileContainer[0]))) { return; }
if (this.opened) { this.close(); }

timeout(function(){
timeout(function() {
blocks = this.offcanvas.search('.g-block');
mCtext = mobileContainer ? mobileContainer.text().length : 0;
var shouldCollapse = (blocks && blocks.length == 1) && mobileContainer && !trim(this.offcanvas.text()).length;
Expand Down
26 changes: 26 additions & 0 deletions assets/common/application/totop/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"use strict";

var ready = require('domready'),
$ = require('../utils/dollar-extras');

var timeOut,
scrollToTop = function() {
if (document.body.scrollTop != 0 || document.documentElement.scrollTop != 0) {
window.scrollBy(0, -50);
timeOut = setTimeout(scrollToTop, 10);
} else {
clearTimeout(timeOut);
}
};

ready(function() {
var totop = $('#g-totop');
if (!totop) { return; }

totop.on('click', function(e) {
e.preventDefault();
scrollToTop();
});
});

module.exports = {};

0 comments on commit 679b33e

Please sign in to comment.