Skip to content

Commit

Permalink
chore(all): prepare release 0.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Feb 3, 2015
1 parent 80b219c commit 2d23bac
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-router",
"version": "0.5.3",
"version": "0.5.4",
"description": "A powerful client-side router.",
"keywords": [
"aurelia",
Expand Down
15 changes: 11 additions & 4 deletions dist/amd/app-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ define(["exports", "aurelia-dependency-injection", "aurelia-history", "./router"

if (isNavigationCommand(result.output)) {
result.output.navigate(_this);
} else if (!result.completed && _this.history.previousFragment) {
_this.navigate(_this.history.previousFragment, false);
} else if (!result.completed) {
_this.navigate(_this.history.previousFragment || "", false);
}

instruction.resolve(result);
Expand Down Expand Up @@ -161,13 +161,20 @@ define(["exports", "aurelia-dependency-injection", "aurelia-history", "./router"
})(Router);


function findAnchor(el) {
while (el) {
if (el.tagName === "A") return el;
el = el.parentNode;
}
}

function handleLinkClick(evt) {
if (!this.isActive) {
return;
}

var target = evt.target;
if (target.tagName != "A") {
var target = findAnchor(evt.target);
if (!target) {
return;
}

Expand Down
1 change: 1 addition & 0 deletions dist/amd/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ define(["exports", "aurelia-route-recognizer", "aurelia-path", "./navigation-con
navigate: {
value: function navigate(fragment, options) {
fragment = join(this.baseUrl, fragment);
if (fragment === "") fragment = "/";
return this.history.navigate(fragment, options);
},
writable: true,
Expand Down
15 changes: 11 additions & 4 deletions dist/commonjs/app-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ var AppRouter = exports.AppRouter = (function (Router) {

if (isNavigationCommand(result.output)) {
result.output.navigate(_this);
} else if (!result.completed && _this.history.previousFragment) {
_this.navigate(_this.history.previousFragment, false);
} else if (!result.completed) {
_this.navigate(_this.history.previousFragment || "", false);
}

instruction.resolve(result);
Expand Down Expand Up @@ -160,13 +160,20 @@ var AppRouter = exports.AppRouter = (function (Router) {
})(Router);


function findAnchor(el) {
while (el) {
if (el.tagName === "A") return el;
el = el.parentNode;
}
}

function handleLinkClick(evt) {
if (!this.isActive) {
return;
}

var target = evt.target;
if (target.tagName != "A") {
var target = findAnchor(evt.target);
if (!target) {
return;
}

Expand Down
1 change: 1 addition & 0 deletions dist/commonjs/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ var Router = exports.Router = (function () {
navigate: {
value: function navigate(fragment, options) {
fragment = join(this.baseUrl, fragment);
if (fragment === "") fragment = "/";
return this.history.navigate(fragment, options);
},
writable: true,
Expand Down
15 changes: 11 additions & 4 deletions dist/es6/app-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export class AppRouter extends Router {

if (isNavigationCommand(result.output)) {
result.output.navigate(this);
} else if (!result.completed && this.history.previousFragment) {
this.navigate(this.history.previousFragment, false);
} else if (!result.completed) {
this.navigate(this.history.previousFragment || '', false);
}

instruction.resolve(result);
Expand Down Expand Up @@ -111,13 +111,20 @@ export class AppRouter extends Router {
}
}

function findAnchor(el) {
while (el) {
if (el.tagName === "A") return el;
el = el.parentNode;
}
}

function handleLinkClick(evt) {
if (!this.isActive) {
return;
}

var target = evt.target;
if (target.tagName != 'A') {
var target = findAnchor(evt.target);
if (!target) {
return;
}

Expand Down
1 change: 1 addition & 0 deletions dist/es6/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class Router {

navigate(fragment, options) {
fragment = join(this.baseUrl, fragment);
if(fragment === '') fragment = '/';
return this.history.navigate(fragment, options);
}

Expand Down
15 changes: 11 additions & 4 deletions dist/system/app-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@ System.register(["aurelia-dependency-injection", "aurelia-history", "./router",
var Container, History, Router, PipelineProvider, isNavigationCommand, _prototypeProperties, _get, _inherits, AppRouter;


function findAnchor(el) {
while (el) {
if (el.tagName === "A") return el;
el = el.parentNode;
}
}

function handleLinkClick(evt) {
if (!this.isActive) {
return;
}

var target = evt.target;
if (target.tagName != "A") {
var target = findAnchor(evt.target);
if (!target) {
return;
}

Expand Down Expand Up @@ -128,8 +135,8 @@ System.register(["aurelia-dependency-injection", "aurelia-history", "./router",

if (isNavigationCommand(result.output)) {
result.output.navigate(_this);
} else if (!result.completed && _this.history.previousFragment) {
_this.navigate(_this.history.previousFragment, false);
} else if (!result.completed) {
_this.navigate(_this.history.previousFragment || "", false);
}

instruction.resolve(result);
Expand Down
1 change: 1 addition & 0 deletions dist/system/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ System.register(["aurelia-route-recognizer", "aurelia-path", "./navigation-conte
navigate: {
value: function navigate(fragment, options) {
fragment = join(this.baseUrl, fragment);
if (fragment === "") fragment = "/";
return this.history.navigate(fragment, options);
},
writable: true,
Expand Down
10 changes: 10 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### 0.5.4 (2015-02-03)


#### Bug Fixes

* **router:**
* canActivate = false doesn't change back route ([80b219cc](http://github.com/aurelia/router/commit/80b219cc81c5e3d0c82dc35745aafcd2910f9214))
* link click handler not triggering when clicking on a nested element inside an an ([a08ee477](http://github.com/aurelia/router/commit/a08ee477177773fee0e6845b0eeb183cd238793c))


### 0.5.3 (2015-01-30)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-router",
"version": "0.5.3",
"version": "0.5.4",
"description": "A powerful client-side router.",
"keywords": [
"aurelia",
Expand Down

0 comments on commit 2d23bac

Please sign in to comment.