more refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-01-12 04:47:40 +03:00
parent af0754b3a6
commit 1f7553d39d
3 changed files with 16 additions and 7 deletions

View File

@ -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)

View File

@ -83,6 +83,7 @@ core.ImageGridFeatures.Feature('viewer-testing', [
'ui-fs-writer',
'metadata',
'fs-metadata',
'ui-metadata',
'external-editor',

View File

@ -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*$/