From 7bee47abee614bd02e8f039901bc6a7513d3728d Mon Sep 17 00:00:00 2001 From: bartes Date: Tue, 4 Oct 2011 09:32:59 +0200 Subject: [PATCH 1/3] stopped using 'short' word directly --- src/service/locale.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/locale.js b/src/service/locale.js index 069a691ed268..bd178a4821b7 100644 --- a/src/service/locale.js +++ b/src/service/locale.js @@ -51,7 +51,7 @@ angularServiceInject('$locale', function() { SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','), AMPMS: ['AM','PM'], medium: 'MMM d, y h:mm:ss a', - short: 'M/d/yy h:mm a', + 'short': 'M/d/yy h:mm a', fullDate: 'EEEE, MMMM d, y', longDate: 'MMMM d, y', mediumDate: 'MMM d, y', From 5f1d052025d540fd3bebe9c858947ac848f96c09 Mon Sep 17 00:00:00 2001 From: bartes Date: Tue, 4 Oct 2011 09:51:26 +0200 Subject: [PATCH 2/3] added possibility to stop updating routes in beforeRouteChange --- src/service/route.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/service/route.js b/src/service/route.js index 73c73b04f1b2..da4238a226e2 100644 --- a/src/service/route.js +++ b/src/service/route.js @@ -120,6 +120,7 @@ angularServiceInject('$route', function($location, $routeParams) { rootScope = this, dirty = 0, forceReload = false, + stopUpdate = false, $route = { routes: routes, @@ -258,6 +259,14 @@ angularServiceInject('$route', function($location, $routeParams) { return match ? dst : null; } + function stopUpdateCallback() { + stopUpdate = true; + } + + function refreshUpdateState() { + stopUpdate = false; + } + function updateRoute() { var next = parseRoute(), last = $route.current; @@ -269,7 +278,11 @@ angularServiceInject('$route', function($location, $routeParams) { last.scope && last.scope.$emit('$routeUpdate'); } else { forceReload = false; - rootScope.$broadcast('$beforeRouteChange', next, last); + rootScope.$broadcast('$beforeRouteChange', next, last, stopUpdateCallback); + if(stopUpdate) { + refreshUpdateState(); + return; + } last && last.scope && last.scope.$destroy(); $route.current = next; if (next) { From 087a0b37e1a487e9537b38ff7f41c158440c5415 Mon Sep 17 00:00:00 2001 From: bartes Date: Mon, 10 Oct 2011 11:45:26 +0200 Subject: [PATCH 3/3] Revert "stopped using 'short' word directly" This reverts commit 7bee47abee614bd02e8f039901bc6a7513d3728d. --- src/service/locale.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/locale.js b/src/service/locale.js index bd178a4821b7..069a691ed268 100644 --- a/src/service/locale.js +++ b/src/service/locale.js @@ -51,7 +51,7 @@ angularServiceInject('$locale', function() { SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','), AMPMS: ['AM','PM'], medium: 'MMM d, y h:mm:ss a', - 'short': 'M/d/yy h:mm a', + short: 'M/d/yy h:mm a', fullDate: 'EEEE, MMMM d, y', longDate: 'MMMM d, y', mediumDate: 'MMM d, y',