From f0cfe83e3725f9a3928da97a6e3085e79cb25309 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 18 Mar 2013 10:26:24 +0400 Subject: upgrade dojo to 1.8.3 (refs #570) --- lib/dojo/router/RouterBase.js.uncompressed.js | 350 ++++++++++++++++++++++++++ 1 file changed, 350 insertions(+) create mode 100644 lib/dojo/router/RouterBase.js.uncompressed.js (limited to 'lib/dojo/router/RouterBase.js.uncompressed.js') diff --git a/lib/dojo/router/RouterBase.js.uncompressed.js b/lib/dojo/router/RouterBase.js.uncompressed.js new file mode 100644 index 000000000..821d74499 --- /dev/null +++ b/lib/dojo/router/RouterBase.js.uncompressed.js @@ -0,0 +1,350 @@ +define("dojo/router/RouterBase", [ + "dojo/_base/declare", + "dojo/hash", + "dojo/topic" +], function(declare, hash, topic){ + + // module: + // dojo/router/RouterBase + + // Creating a basic trim to avoid needing the full dojo/string module + // similarly to dojo/_base/lang's trim + var trim; + if(String.prototype.trim){ + trim = function(str){ return str.trim(); }; + }else{ + trim = function(str){ return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); }; + } + + // Firing of routes on the route object is always the same, + // no clean way to expose this on the prototype since it's for the + // internal router objects. + function fireRoute(params, currentPath, newPath){ + var queue, isStopped, isPrevented, eventObj, i, l; + + queue = this.callbackQueue; + isStopped = false; + isPrevented = false; + eventObj = { + stopImmediatePropagation: function(){ isStopped = true; }, + preventDefault: function(){ isPrevented = true; }, + oldPath: currentPath, + newPath: newPath, + params: params + }; + + for(i=0, l=queue.length; i 0 ? parameterNames : null; + }, + + _indexRoutes: function(){ + var i, l, route, routeIndex, routes = this._routes; + + // Start a new route index + routeIndex = this._routeIndex = {}; + + // Set it up again + for(i=0, l=routes.length; i