')
+ .addClass('button')
+ .html('□')
+ .click(function(){ that.toggleFullScreen() }))
+ // close...
+ .append($('
')
+ .addClass('button close')
+ .html('×')
+ .click(function(){ that.close() }))
+ .appendTo(this.ribbons.viewer)
+ }
+ })],
+})
+
+var FullScreenControlls =
+module.FullScreenControlls = core.ImageGridFeatures.Feature({
+ title: '',
+ doc: '',
+
+ tag: 'ui-fullscreen-controls',
+ depends: [
+ 'ui-app-control',
+ ],
+
+ actions: FullScreenControllsActions,
+
+ handlers: [
+ ['toggleFullScreen',
+ function(){
+ this.toggleFullScreenControls(this.toggleFullScreen('?'))
+ }],
+ ],
+})
+
+
+
/**********************************************************************
* vim:set ts=4 sw=4 : */
return module })
diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js
index 6440e993..ddd0d8f6 100755
--- a/ui (gen4)/features/filesystem.js
+++ b/ui (gen4)/features/filesystem.js
@@ -132,6 +132,10 @@ var FileSystemLoaderActions = actions.Actions({
// a-la glob)....
//file.loadIndex(path, this.config['index-dir'], logger)
return file.loadIndex(path, this.config['index-dir'], from_date, logger)
+ .catch(function(err){
+ // XXX
+ console.error(err)
+ })
.then(function(res){
// XXX if res is empty load raw...
@@ -543,9 +547,6 @@ var FileSystemLoaderUIActions = actions.Actions({
// the given path (no UI) while .browsePath(..) will load the
// UI in all cases but will treat the given path as a base path
// to start from.
- // XXX should passing no path to this start browsing from the current
- // path or from the root?
- // XXX should these be dialog objects???
browseIndex: ['File/Load index...', makeBrowseProxy('loadIndex')],
browseImages: ['File/Load images...', makeBrowseProxy('loadImages')],
@@ -570,6 +571,9 @@ var FileSystemLoaderUIActions = actions.Actions({
//file.loadIndex(path, that.config['index-dir'], this.logger)
// XXX we need to prune the indexes -- avoid loading nested indexes...
file.listIndexes(path, index_dir)
+ .on('error', function(err){
+ console.error(err)
+ })
.on('end', function(res){
// we got the data, we can now remove the spinner...
@@ -599,8 +603,10 @@ var FileSystemLoaderUIActions = actions.Actions({
// and selecting a postion will load all the participating
// indexes to that date.
// NOTE: this will show nothing if .location.method is not loadIndex..
+ // NOTE: this will drop all unsaved changes
+ // NOTE: this will set changes to all when loading a different state
+ // that the latest and to non otherwise....
//
- // XXX should this affect .changes ???
// XXX handle named saves...
// XXX add ability to name a save...
// XXX need to handle saves (saveIndex(..) and friends) when loaded
@@ -627,12 +633,11 @@ var FileSystemLoaderUIActions = actions.Actions({
var from = that.location.from
from = from && Date.fromTimeStamp(from).toShortDate()
- make('Latest')
- .on('open', function(){
- that.reloadState()
- })
+ if(that.changes !== false){
+ make('Unsaved state')
- make('---')
+ make('---')
+ }
// indicate that we are working...
var spinner = make($('
'))
@@ -657,6 +662,16 @@ var FileSystemLoaderUIActions = actions.Actions({
list
.sort()
.reverse()
+
+ // Special case: top save state is the default,
+ // no need to mark anything for change...
+ var first = list.shift()
+ first && make(Date.fromTimeStamp(first).toShortDate())
+ .on('open', function(){
+ that.loadIndex(that.location.path, first)
+ })
+
+ list
.forEach(function(d){
var txt = Date.fromTimeStamp(d).toShortDate()
@@ -664,6 +679,9 @@ var FileSystemLoaderUIActions = actions.Actions({
make(txt)
.on('open', function(){
that.loadIndex(that.location.path, d)
+ .then(function(){
+ that.markChanged('all')
+ })
})
// mark the current loaded position...
.addClass(txt == from ? 'selected highlighted' : '')
diff --git a/ui (gen4)/features/meta.js b/ui (gen4)/features/meta.js
index e23e7651..7b28f5c9 100755
--- a/ui (gen4)/features/meta.js
+++ b/ui (gen4)/features/meta.js
@@ -54,6 +54,8 @@ core.ImageGridFeatures.Feature('viewer-testing', [
'ui-ribbons-placement',
+ 'ui-fullscreen-controls',
+
// features...
'ui-ribbon-auto-align',
//'ui-ribbon-align-to-order',
diff --git a/ui (gen4)/features/ui.js b/ui (gen4)/features/ui.js
index 234fdfbc..70e4a5ba 100755
--- a/ui (gen4)/features/ui.js
+++ b/ui (gen4)/features/ui.js
@@ -921,6 +921,7 @@ module.Viewer = core.ImageGridFeatures.Feature({
/*********************************************************************/
// User interfaces for different base features...
+
// XXX tag dialogs...
// XXX
diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js
index c0c8bac2..e4561a87 100755
--- a/ui (gen4)/lib/widget/browse.js
+++ b/ui (gen4)/lib/widget/browse.js
@@ -1816,8 +1816,9 @@ var BrowserPrototype = {
var cur = this.select('!')
var elem = this.select(!pattern ? '!'
: /-?[0-9]+/.test(pattern) ? pattern
- // avoid keywords that .select(..) understands...
- : '"'+pattern+'"' )
+ // XXX avoid keywords that .select(..) understands...
+ //: '"'+pattern+'"' )
+ : pattern)
// item not found...
if(elem.length == 0 && pattern != null){