diff --git a/ui (gen4)/css/experimenting.css b/ui (gen4)/css/experimenting.css index a584ff64..d9a0434a 100755 --- a/ui (gen4)/css/experimenting.css +++ b/ui (gen4)/css/experimenting.css @@ -279,6 +279,13 @@ body { font-style: italic; } +/* Feature list */ +.browse-widget.feature-list .list .item[root="true"] .text:after { + content: "*"; + margin-left: 0px; + opacity: 0.5; + font-style: italic; +} /* External Editor List */ .browse-widget.editor-list .list .item:first-child .text:after { diff --git a/ui (gen4)/features/base.js b/ui (gen4)/features/base.js index fb7b402f..a3150907 100755 --- a/ui (gen4)/features/base.js +++ b/ui (gen4)/features/base.js @@ -1801,11 +1801,6 @@ module.CropActions = actions.Actions({ }], // crop edit actions... - // XXX use this as undo for .removeFromCrop(..) - // ...after we remove images from a crop we lose their containing - // ribbon information and the order might get messed up by - // horizontal shifting if not undone correctly... - // ...add a way to store additional info in the journal... // XXX undo -- .removeFromCrop(..) but only the gids that were // actually added... (???) // XXX BUG? order does odd things... diff --git a/ui (gen4)/features/collections.js b/ui (gen4)/features/collections.js index ece80c13..f6412a22 100755 --- a/ui (gen4)/features/collections.js +++ b/ui (gen4)/features/collections.js @@ -226,7 +226,7 @@ var CollectionActions = actions.Actions({ // collectionLoading: ['- Collections/', core.doc`This is called by .loadCollection(..) or one of the - overloading actions when collection load is done... + overloading actions around the collection load... The .pre phase is called just before the load and the .post phase just after. @@ -1276,6 +1276,7 @@ module.Collection = core.ImageGridFeatures.Feature({ 'crop', ], suggested: [ + 'collections-local-config', 'collection-tags', 'auto-collections', @@ -1792,6 +1793,56 @@ module.Collection = core.ImageGridFeatures.Feature({ +//--------------------------------------------------------------------- + +var CollectionLocalConfig = actions.Actions({ + config: { + // XXX should this be user editable??? + // XXX should/can this be local to collection??? + 'collection-local-config': [ + ], + }, + + // handle collection .config + collectionConfigLoader: ['- Collections/', + {collectionFormat: 'config'}, + function(title, state, logger){ + // XXX save old config... + + // XXX load new config... + }], +}) + +var CollectionLocalConfig = +module.CollectionLocalConfig = core.ImageGridFeatures.Feature({ + title: '', + doc: '', + + tag: 'collections-local-config', + depends: [ + 'collections', + ], + + handlers: [ + /* XXX + ['collectionLoading.pre', + function(){ + var that = this + var state = {} + var opts = this.config['collection-local-config'] || [] + + // save outgoing collection state... + var cfg = {} + opts.forEach(function(n){ + cfg[n] = JSON.parse(JSON.stringify(that.config[n])) + }) + }], + //*/ + ], +}) + + + //--------------------------------------------------------------------- var CollectionTagsActions = actions.Actions({ @@ -2285,6 +2336,8 @@ var UICollectionActions = actions.Actions({ //'collection-last-used': null, }, + // UI... + // // XXX would be nice to make this nested (i.e. path list) -- collection grouping... (???) // XXX should we use options object??? browseCollections: ['Collections/$Collections...', @@ -2638,7 +2691,23 @@ var UICollectionActions = actions.Actions({ joinCollect: [ collectionGetterWrapper(function(title){ this.joinCollect(title) })], - cropOutImagesInCollection: ['Collections|Crop/Crop $out images in collection...', + // XXX do we need this??? + cropImagesInCollection: ['Collections|Crop/Crop images in collection...', + {browseMode: function(){ + return (!this.collections + || Object.keys(this.collections).length == 0) + && 'disabled' }}, + mixedModeCollectionAction(function(title){ + var that = this + this.ensureCollection(title) + .then(function(collection){ + var images = collection.data.getImages('all') + + that.crop(images, false) + }) + }, null, false)], + cropOutImagesInCollection: ['Collections|Crop/Crop $out images in collec$tion...', + {browseMode: 'cropImagesInCollection'}, mixedModeCollectionAction(function(title){ var that = this this.ensureCollection(title) @@ -2652,10 +2721,7 @@ var UICollectionActions = actions.Actions({ // XXX should these be here or in marks-specific feature??? markImagesInCollection: ['Collections|Mark/$Mark images in collection...', - {browseMode: function(){ - return (!this.collections - || Object.keys(this.collections).length == 0) - && 'disabled' }}, + {browseMode: 'cropImagesInCollection'}, mixedModeCollectionAction(function(title){ var that = this this.ensureCollection(title) diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index 1281a1cc..2757d0ef 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -1171,11 +1171,19 @@ var UIIntrospectionActions = actions.Actions({ make.Heading(heading) ;(list || []) .forEach(function(tag){ - make(tag) - .attr('feature', tag) - .on('open', function(){ that.showFeatureDoc(tag) }) + make(tag, { + attrs: { + feature: tag, + root: no_deps.indexOf(tag) >= 0 ? 'true' : '', + }, + open: function(){ that.showFeatureDoc(tag) }, + }) }) } + // features that have no direct dependencies... + var no_deps = that.features.features.filter(function(f){ + return (that.features.depends[f] || []).length == 0 }) + draw('Loaded (in order)', that.features.features) draw('Excluded', that.features.excluded) draw('Disabled', that.features.disabled) @@ -1190,6 +1198,8 @@ var UIIntrospectionActions = actions.Actions({ // XXX loops... // XXX conflicts... } + }, { + cls: 'feature-list', }) .run(function(){ // handle '?' button to browse path... diff --git a/ui (gen4)/features/ui.js b/ui (gen4)/features/ui.js index a3d25e28..1c0037d0 100755 --- a/ui (gen4)/features/ui.js +++ b/ui (gen4)/features/ui.js @@ -353,15 +353,14 @@ module.ViewerActions = actions.Actions({ now = true target = null } - var mode = this.config['ribbon-align-mode'] - || this.config['ribbon-focus-mode'] + var mode = this.config['ribbon-align-mode'] || 'none' + mode = mode == 'none' ? this.config['ribbon-focus-mode'] : mode var modes = this.config['ribbon-align-modes'] - if(mode in modes && mode != 'manual'){ + if(mode in modes && mode != 'manual' && mode != 'none'){ this[modes[mode]](target, scale, now) // manual... - // XXX is this correct??? } else { this .centerRibbon(target)