From 9777ca74294748fe6351092c03b31fd4d42a60f5 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 28 Dec 2015 07:23:28 +0300 Subject: [PATCH] added .current to location, still not used for loading... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/location.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ui (gen4)/features/location.js b/ui (gen4)/features/location.js index 253eb6be..88a7efdb 100755 --- a/ui (gen4)/features/location.js +++ b/ui (gen4)/features/location.js @@ -19,6 +19,8 @@ var core = require('features/core') /*********************************************************************/ +// XXX add .hash support for in-location .current setting when no index +// available... // XXX should this or LocationLocalStorage save/load location (now it's // done by history) // XXX this should provide mechaincs to define location handlers, i.e. @@ -32,6 +34,9 @@ var LocationActions = actions.Actions({ // { // path: , // method: , + // // XXX current or hash??? + // // XXX not yet supported... + // current: , // } // // NOTE: these will remove the trailing '/' (or '\') from .path @@ -61,11 +66,13 @@ var LocationActions = actions.Actions({ var method = this.__location && this.__location.method || undefined + var cur = this.current // got an object... } else { var path = value.path var method = value.method + var cur = value.current } // normalize path if it's not root... @@ -76,9 +83,13 @@ var LocationActions = actions.Actions({ this.__location = { path: path, method: method, + current: cur, } this[value.method || 'loadIndex'](path) + + // XXX load current... + // XXX }, })