mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
v-block menues and some tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e1bc176567
commit
739fe4972c
@ -128,7 +128,7 @@ var VirtualBlocksActions = actions.Actions({
|
|||||||
// XXX this is enabled only in collection view as there is no way
|
// XXX this is enabled only in collection view as there is no way
|
||||||
// to delete a block but possible to create one...
|
// to delete a block but possible to create one...
|
||||||
// ...should we add a .removeBlock(..) action???
|
// ...should we add a .removeBlock(..) action???
|
||||||
makeVirtualBlank: ['Virtual block/50:Add blank $after',
|
makeVirtualBlank: ['Virtual block/80:Add blank $after',
|
||||||
core.doc`
|
core.doc`
|
||||||
|
|
||||||
`,
|
`,
|
||||||
@ -138,11 +138,12 @@ var VirtualBlocksActions = actions.Actions({
|
|||||||
type: 'virtual',
|
type: 'virtual',
|
||||||
path: null,
|
path: null,
|
||||||
}) }],
|
}) }],
|
||||||
makeVirtualBlankBefore: ['Virtual block/51:Add blank $before',
|
makeVirtualBlankBefore: ['Virtual block/81:Add blank $before',
|
||||||
{ browseMode: 'makeVirtualBlank', },
|
{ browseMode: 'makeVirtualBlank', },
|
||||||
'makeVirtualBlank: $0 "before"'],
|
'makeVirtualBlank: $0 "before"'],
|
||||||
|
|
||||||
cloneVirtualBlock: ['Virtual block/Clone block...',
|
cloneVirtualBlock: ['Virtual block/80:$Clone block...',
|
||||||
|
{ browseMode: 'editVirtualBlock' },
|
||||||
function(ref, offset, img){
|
function(ref, offset, img){
|
||||||
var img = Object.assign({},
|
var img = Object.assign({},
|
||||||
this.images[this.data.getImage(ref)] || {},
|
this.images[this.data.getImage(ref)] || {},
|
||||||
@ -272,9 +273,9 @@ var VirtualBlocksUIActions = actions.Actions({
|
|||||||
return }
|
return }
|
||||||
|
|
||||||
make.Separator()
|
make.Separator()
|
||||||
this.editVirtualBlockText ?
|
this.editVirtualBlock ?
|
||||||
// editable...
|
// editable...
|
||||||
this.editVirtualBlockText(make, gid, image)
|
this.editVirtualBlock(make, gid, image)
|
||||||
// view only...
|
// view only...
|
||||||
: Object.entries(this.config['virtual-text-fields'] || {})
|
: Object.entries(this.config['virtual-text-fields'] || {})
|
||||||
.forEach(function([title, attr]){
|
.forEach(function([title, attr]){
|
||||||
@ -324,7 +325,7 @@ var VirtualBlocksEditUIActions = actions.Actions({
|
|||||||
// XXX this is a good candidate for inlineing (browse2)
|
// XXX this is a good candidate for inlineing (browse2)
|
||||||
// XXX should we also add a preview (preview constructor from features/metadata.js)???
|
// XXX should we also add a preview (preview constructor from features/metadata.js)???
|
||||||
// XXX should we do a sanity check for image type???
|
// XXX should we do a sanity check for image type???
|
||||||
editVirtualBlockText: ['Virtual block/$Edit...',
|
editVirtualBlock: ['Virtual block/$Edit...',
|
||||||
{ browseMode: function(){
|
{ browseMode: function(){
|
||||||
return (this.image || {}).type != 'virtual' && 'disabled' }, },
|
return (this.image || {}).type != 'virtual' && 'disabled' }, },
|
||||||
widgets.makeUIDialog(function(gid){
|
widgets.makeUIDialog(function(gid){
|
||||||
@ -375,17 +376,19 @@ var VirtualBlocksEditUIActions = actions.Actions({
|
|||||||
that.refresh(gid) }) })],
|
that.refresh(gid) }) })],
|
||||||
|
|
||||||
// XXX virtual block templates...
|
// XXX virtual block templates...
|
||||||
cloneVirtualBlockFromTemplate: ['Virtual block/Clone from...',
|
cloneVirtualBlockFromTemplate: ['- Virtual block/Clone from...',
|
||||||
function(){
|
function(){
|
||||||
}],
|
}],
|
||||||
saveVirtualBlockAsTemplate: ['Virtual block/Save as template',
|
saveVirtualBlockAsTemplate: ['- Virtual block/Save as template',
|
||||||
function(gid){
|
function(gid){
|
||||||
}],
|
}],
|
||||||
|
|
||||||
// XXX list existing non-blank v-blocks...
|
// XXX list existing non-blank v-blocks...
|
||||||
cloneVirtualBlockFrom: ['Virtual block/Clone from...',
|
cloneVirtualBlockFrom: ['- Virtual block/Clone...',
|
||||||
function(){
|
function(){
|
||||||
}],
|
}],
|
||||||
|
|
||||||
|
// XXX add alias to remove virtual block...
|
||||||
})
|
})
|
||||||
|
|
||||||
// NOTE: this is independent of 'virtual-blocks'...
|
// NOTE: this is independent of 'virtual-blocks'...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user