some bugfixes and more work on exif...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-01-09 04:59:57 +03:00
parent 339fcd250e
commit a322623934
4 changed files with 42 additions and 6 deletions

View File

@ -73,6 +73,7 @@ var EXIFActions = actions.Actions({
// XXX take image exif and write it to target...
setExif: ['- Image/Set exif data',
function(image, target){
// XXX
}]
})
@ -111,7 +112,34 @@ module.EXIF = core.ImageGridFeatures.Feature({
//
// ...need to think about this...
// XXX this should basically be platform independent...
var EXIFUIActions = actions.Actions({
showExif: ['Image/Show exif',
function(image, force){
image = this.data.getImage(image)
var exif = !force
&& this.images[image].metadata
|| this.getExif(image, force)
// XXX
}]
})
// XXX
var EXIFUI =
module.EXIFUI = core.ImageGridFeatures.Feature({
title: '',
doc: '',
tag: 'ui-exif',
depends: [
'ui',
'exif',
],
actions: EXIFUIActions,
})
/**********************************************************************

View File

@ -29,7 +29,7 @@ var core = require('features/core')
var overlay = require('lib/widget/overlay')
var browse = require('lib/widget/browse')
var browseWalk = requirejs('lib/widget/browse-walk')
var browseWalk = require('lib/widget/browse-walk')

View File

@ -766,6 +766,7 @@ var BrowserPrototype = {
return $()
}
// build list item...
var res = $('<div>')
// handle clicks ONLY when not disabled...
.click(function(){
@ -774,8 +775,8 @@ var BrowserPrototype = {
that.push($(this).find('.text').text())
}
})
//.text(p)
.append($('<div>')
// XXX add support for multiple .test blocks...
.append($('<span>')
.addClass('text')
.text(p))
@ -1145,9 +1146,15 @@ var BrowserPrototype = {
// NOTE: this will mess up (clear) any highlighting that was
// present before...
.each(function(_, e){
e = $(e).find('.text')
var t = e.text()
e.html(t.replace(p, '<b>$1</b>'))
e = $(e)
.find('.text')
// NOTE: here we support multiple text elements per
// list element...
.each(function(i, e){
e = $(e)
var t = e.text()
e.html(t.replace(p, '<b>$1</b>'))
})
})
}

View File

@ -13,6 +13,7 @@ var object = require('../object')
/*********************************************************************/
// helpers...