diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js index 5ce071d9..f4a060f3 100755 --- a/ui (gen4)/features/filesystem.js +++ b/ui (gen4)/features/filesystem.js @@ -104,6 +104,8 @@ var FileSystemLoaderActions = actions.Actions({ }], // NOTE: when passed no path this will not do anything... + // NOTE: this will add a .from field to .location, this will indicate + // the date starting from which saves are loaded. // // XXX how should .location be handled when merging indexes or // viewing multiple/clustered indexes??? @@ -221,7 +223,10 @@ var FileSystemLoaderActions = actions.Actions({ that.__location = { path: loaded.length == 1 ? loaded[0] : path, method: 'loadIndex', - from: from_date || 'all', + } + + if(from_date){ + that.__location.from = from_date } }) }], @@ -554,7 +559,9 @@ var FileSystemLoaderUIActions = actions.Actions({ // XXX handle named saves... // XXX add ability to name a save... // XXX need to handle saves when loaded a specific history position... - listSaveHistoryDialog: ['File/List save history...', + // XXX should this also list journal stuff or have the ability for + // extending??? + listSaveHistoryDialog: ['File/History...', widgets.makeUIDialog(function(){ var that = this @@ -570,7 +577,7 @@ var FileSystemLoaderUIActions = actions.Actions({ var from = that.location.from from = from && Date.fromTimeStamp(from).toShortDate() - make('Load all') + make('Latest') .on('open', function(){ that.reloadState() }) @@ -603,8 +610,16 @@ var FileSystemLoaderUIActions = actions.Actions({ that.loadIndex(that.location.path, d) }) // mark the current loaded position... - .addClass(txt == from ? 'highlighted selected' : '') + .addClass(txt == from ? 'selected' : '') }) + + // loading may take a some time so we'll need to + // update selection our selves... + // + // NOTE: here we will select 'Latest' if nothing + // was selected... + o.select() + .addClass('highlighted') }) }) .on('open', function(){ diff --git a/ui (gen4)/features/history.js b/ui (gen4)/features/history.js index a2e05fe4..f805cd50 100755 --- a/ui (gen4)/features/history.js +++ b/ui (gen4)/features/history.js @@ -399,7 +399,7 @@ var URLHistoryUIActions = actions.Actions({ // XXX make availabilyty checking live (now on open dialog)... // XXX need to check items... // XXX use svg icons for buttons... - listURLHistory: ['History|File/Show history...', + listURLHistory: ['History|File/Location history...', widgets.makeUIDialog(function(){ var that = this var parent = this.preventClosing ? this.preventClosing() : null diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index 0b3a9117..2512e9cd 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -554,6 +554,9 @@ var BrowserPrototype = { .toArray() }, set path(value){ + this.update(value) + + /* // XXX check if path has changed... value = this.path2list(value) var cur = this.path @@ -563,6 +566,7 @@ var BrowserPrototype = { && cur .filter(function(e, i){ return e == value[i] }).length != cur.length && this.update(value) + */ }, // String path... @@ -2004,7 +2008,12 @@ var BrowserPrototype = { if(path && (path.constructor == Array || /[\\\/]/.test(path))){ path = this.path2list(path) var elem = path.slice(-1)[0] - this.path = path.slice(0, -1) + + // only update path if it has changed... + if(this.path.filter(function(e, i){ return e == path[i] }).length != path.length - 1){ + this.path = path.slice(0, -1) + } + elem = this.select('"'+ elem +'"') // get path + selection...