Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehenderson committed Nov 11, 2013
2 parents 81f91c3 + 427b8f9 commit 3f55928
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Changed in 2.3.1 and 2.3.2
======
* Patches for onTapLink

Changed in 2.3.0
======
* Moved all client-side dependencies to use bower and restructured project to make sense of this change
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lavaca",
"main": "lavaca.js",
"version": "2.3.0",
"version": "2.3.2",
"homepage": "https://github.com/mutualmobile/lavaca",
"authors": [
"Mutual Mobile <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lavaca",
"description": "A curated collection of tools built for mobile.",
"version": "2.3.0",
"version": "2.3.2",
"homepage": "https://github.com/mutualmobile/lavaca",
"author": {
"name": "mutualmobile",
Expand Down
20 changes: 8 additions & 12 deletions src/mvc/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,19 @@ define(function(require) {
          rel = link.attr('rel'),
          target = link.attr('target'),
          isExternal = link.is('[data-external]') || _isExternal(url),
preventClick = function() {
if ($(document.body).hammer) {
link.one('click', _stopEvent);
}
};

metaKey = e.type === 'tap' ? (e.gesture.srcEvent.ctrlKey || e.gesture.srcEvent.metaKey) : (e.ctrlKey || e.metaKey);
if (metaKey) {
target = metaKey ? '_blank' : (target ? target : '_self');
}
      if (!defaultPrevented) {
if (Device.isCordova() && target) {
e.preventDefault();
preventClick();
window.open(url, target || '_blank');
} else if (isExternal || target || (e.ctrlKey || e.metaKey)) {
} else if (isExternal || target) {
window.open(url, target);
          return true;
        } else {
          e.preventDefault();
preventClick();
          if (rel === 'back') {
            History.back();
          } else if (rel === 'force-back' && url) {
Expand All @@ -151,9 +148,7 @@ define(function(require) {
            this.router.exec(url).error(this.onInvalidRoute);
          }
        }
      } else {
preventClick();
}
      }
    },
/**
* Makes an AJAX request if the user is online. If the user is offline, the returned
Expand Down Expand Up @@ -233,6 +228,7 @@ define(function(require) {
if ($body.hammer) {
$body = $body.hammer();
type = 'tap';
$body.on('click', 'a', _stopEvent);
}
$body
.on(type, '.ui-blocker', _stopEvent)
Expand Down

0 comments on commit 3f55928

Please sign in to comment.