From 1f7553d39d697e7c8e601cd8ecb245eca2419d2a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 12 Jan 2016 04:47:40 +0300 Subject: [PATCH] more refactoring... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/exif.js | 18 +++++++++++------- ui (gen4)/features/meta.js | 1 + ui (gen4)/lib/widget/browse.js | 4 ++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ui (gen4)/features/exif.js b/ui (gen4)/features/exif.js index 14e68f39..a8e0b229 100755 --- a/ui (gen4)/features/exif.js +++ b/ui (gen4)/features/exif.js @@ -24,7 +24,9 @@ var core = require('features/core') /*********************************************************************/ -// XXX make metadata a prop of image... +// XXX make metadata a prop of image... (???) +// XXX Q: should we standardise metadata field names and adapt them to +// lib??? var MetadataActions = actions.Actions({ getMetadata: ['- Image/Get metadata data', @@ -65,9 +67,6 @@ module.Metadata = core.ImageGridFeatures.Feature({ 'base', ], - isApplicable: function(){ - return this.runtime == 'nw' || this.runtime == 'node' }, - actions: MetadataActions, }) @@ -130,13 +129,13 @@ var MetadataReaderActions = actions.Actions({ }) var MetadataReader = -module.Metadata = core.ImageGridFeatures.Feature({ +module.MetadataReader = core.ImageGridFeatures.Feature({ title: '', doc: '', - tag: 'metadata-reader', + tag: 'fs-metadata', depends: [ - 'base', + 'metadata', ], isApplicable: function(){ @@ -164,9 +163,14 @@ module.Metadata = core.ImageGridFeatures.Feature({ // - script layout tweaking (post-update) // // ...need to think about this... +// XXX add a way to sort fields... // XXX this should basically be platform independent... var MetadataUIActions = actions.Actions({ + config: { + 'metadata-field-order': [ + ], + } showMetadata: ['Image/Show metadata', function(image, force){ image = this.data.getImage(image) diff --git a/ui (gen4)/features/meta.js b/ui (gen4)/features/meta.js index e46c1def..0afb397b 100755 --- a/ui (gen4)/features/meta.js +++ b/ui (gen4)/features/meta.js @@ -83,6 +83,7 @@ core.ImageGridFeatures.Feature('viewer-testing', [ 'ui-fs-writer', 'metadata', + 'fs-metadata', 'ui-metadata', 'external-editor', diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index f082ead0..59e66444 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -750,6 +750,10 @@ var BrowserPrototype = { // NOTE: this will be set to true if make(..) is called at least once... var interactive = false + // XXX p should be understood as: + // - str (done) + // - [str, ...] + // - DOM/jQuery var make = function(p, traversable, disabled){ p = p + '' var dir = /[\\\/]\s*$/