mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
some refactoring and cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
5e4000715b
commit
adc727c75d
@ -231,12 +231,12 @@ body {
|
|||||||
|
|
||||||
/* Metadata viewer */
|
/* Metadata viewer */
|
||||||
.item-value-view .text:first-child,
|
.item-value-view .text:first-child,
|
||||||
.browse-widget.metadata-view .list .item .text:first-child {
|
.browse-widget.table-view .list .item .text:first-child {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.item-value-view .text:nth-child(2),
|
.item-value-view .text:nth-child(2),
|
||||||
.browse-widget.metadata-view .list .item .text:nth-child(2) {
|
.browse-widget.table-view .list .item .text:nth-child(2) {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
|
||||||
-moz-user-select: auto;
|
-moz-user-select: auto;
|
||||||
|
|||||||
@ -254,7 +254,7 @@ var ExternalEditorUIActions = actions.Actions({
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
dialog.dom.addClass('metadata-view tail-action')
|
dialog.dom.addClass('table-view tail-action')
|
||||||
|
|
||||||
return dialog
|
return dialog
|
||||||
})],
|
})],
|
||||||
|
|||||||
@ -2404,7 +2404,7 @@ var FileSystemWriterUIActions = actions.Actions({
|
|||||||
make.done()
|
make.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
o.dom.addClass('metadata-view tail-action')
|
o.dom.addClass('table-view tail-action')
|
||||||
|
|
||||||
return o
|
return o
|
||||||
})],
|
})],
|
||||||
|
|||||||
@ -1333,7 +1333,7 @@ var KeyboardUIActions = actions.Actions({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
cls: 'metadata-view',
|
cls: 'table-view',
|
||||||
})
|
})
|
||||||
// save the keys...
|
// save the keys...
|
||||||
// XXX for some reason when Esc this is called twice...
|
// XXX for some reason when Esc this is called twice...
|
||||||
@ -1439,7 +1439,7 @@ var KeyboardUIActions = actions.Actions({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
cls: 'metadata-view',
|
cls: 'table-view',
|
||||||
})
|
})
|
||||||
.on('close', function(){
|
.on('close', function(){
|
||||||
if(abort){
|
if(abort){
|
||||||
|
|||||||
@ -517,7 +517,7 @@ var MetadataUIActions = actions.Actions({
|
|||||||
// XXX
|
// XXX
|
||||||
})
|
})
|
||||||
|
|
||||||
o.dom.addClass('metadata-view')
|
o.dom.addClass('table-view')
|
||||||
|
|
||||||
o.updateMetadata = function(metadata){
|
o.updateMetadata = function(metadata){
|
||||||
metadata = metadata || that.getMetadata()
|
metadata = metadata || that.getMetadata()
|
||||||
|
|||||||
@ -486,15 +486,15 @@ object.makeConstructor('VirtualDOMRibbons',
|
|||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
// XXX TODO:
|
// XXX TODO:
|
||||||
// - image update (try and avoid external edits and do it in .virtualdom)
|
|
||||||
// - image size/proportions (single image view)...
|
|
||||||
// - preview update...
|
|
||||||
// - shifting images/ribbons
|
// - shifting images/ribbons
|
||||||
// - use .virtualdom.sync() + shadow animation instead of .ribbons.*
|
// - use .virtualdom.sync() + shadow animation instead of .ribbons.*
|
||||||
// ...the added marker div messes up virtual-dom...
|
// ...the added marker div messes up virtual-dom...
|
||||||
// - would be nice to make this an alternative feature...
|
// - would be nice to make this an alternative feature...
|
||||||
// ...split out ribbon editing into a feature and do two
|
// ...split out ribbon editing into a feature and do two
|
||||||
// implementations, the original and virtualdom...
|
// implementations, the original and virtualdom...
|
||||||
|
// - image update (try and avoid external edits and do it in .virtualdom)
|
||||||
|
// - image size/proportions (single image view)...
|
||||||
|
// - preview update...
|
||||||
// - make marks more modular...
|
// - make marks more modular...
|
||||||
// - ranges
|
// - ranges
|
||||||
//
|
//
|
||||||
|
|||||||
@ -127,7 +127,7 @@ var SlideshowActions = actions.Actions({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: that.toggleSlideshow('?') == 'on' ? 'Stop' : 'Start',
|
path: that.toggleSlideshow('?') == 'on' ? 'Stop' : 'Start',
|
||||||
cls: 'metadata-view tail-action',
|
cls: 'table-view tail-action',
|
||||||
})
|
})
|
||||||
.on('close', function(){
|
.on('close', function(){
|
||||||
// reset the timer if it was not suspended outside...
|
// reset the timer if it was not suspended outside...
|
||||||
|
|||||||
@ -792,9 +792,13 @@ module.Dialogs = core.ImageGridFeatures.Feature({
|
|||||||
if(res instanceof widget.Widget){
|
if(res instanceof widget.Widget){
|
||||||
var elem = res.dom
|
var elem = res.dom
|
||||||
|
|
||||||
!elem.attr('keep-dialog-title')
|
var title = this.getActionAttr(action, 'dialogTitle')
|
||||||
&& !this.getActionAttr(action, 'keepDialogTitle')
|
|
||||||
&& elem.attr('dialog-title', this.getDocTitle(action))
|
title ?
|
||||||
|
elem.attr('dialog-title', title)
|
||||||
|
: !elem.attr('keep-dialog-title')
|
||||||
|
&& !this.getActionAttr(action, 'keepDialogTitle')
|
||||||
|
&& elem.attr('dialog-title', this.getDocTitle(action))
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
@ -1316,6 +1320,32 @@ var BrowseActionsActions = actions.Actions({
|
|||||||
this.modal.client.dom.hasClass('browse-actions')
|
this.modal.client.dom.hasClass('browse-actions')
|
||||||
&& this.modal.client.dom[state == 'on' ? 'addClass' : 'removeClass']('show-keys')
|
&& this.modal.client.dom[state == 'on' ? 'addClass' : 'removeClass']('show-keys')
|
||||||
})],
|
})],
|
||||||
|
|
||||||
|
// XXX is this the right way to go???
|
||||||
|
about: ['Help/About...',
|
||||||
|
{'dialogTitle': 'ImageGrid.Viewer'},
|
||||||
|
makeUIDialog(function(path, options){
|
||||||
|
return browse.makeList(
|
||||||
|
null,
|
||||||
|
[
|
||||||
|
// XXX get this from package.json...
|
||||||
|
['Version:', '4.0.0a'],
|
||||||
|
|
||||||
|
// XXX build date...
|
||||||
|
|
||||||
|
'---',
|
||||||
|
|
||||||
|
['License:', 'Pre Release'],
|
||||||
|
|
||||||
|
// XXX include other lib list and license info...
|
||||||
|
// XXX
|
||||||
|
|
||||||
|
// XXX include nw credits.html...
|
||||||
|
// XXX
|
||||||
|
], {
|
||||||
|
cls: 'table-view'
|
||||||
|
})
|
||||||
|
})],
|
||||||
})
|
})
|
||||||
|
|
||||||
var BrowseActions =
|
var BrowseActions =
|
||||||
|
|||||||
@ -17,6 +17,9 @@ requirejs.config({
|
|||||||
//urlArgs: 'bust='+Date.now(),
|
//urlArgs: 'bust='+Date.now(),
|
||||||
|
|
||||||
paths: {
|
paths: {
|
||||||
|
//text: 'node_modules/requirejs-plugins/lib/text',
|
||||||
|
//json: 'node_modules/requirejs-plugins/src/json',
|
||||||
|
|
||||||
'lib/object': 'node_modules/ig-object/object',
|
'lib/object': 'node_modules/ig-object/object',
|
||||||
'lib/actions': 'node_modules/ig-actions/actions',
|
'lib/actions': 'node_modules/ig-actions/actions',
|
||||||
'lib/features': 'node_modules/ig-features/features',
|
'lib/features': 'node_modules/ig-features/features',
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
"ig-object": "^1.0.1",
|
"ig-object": "^1.0.1",
|
||||||
"openseadragon": "^2.1.0",
|
"openseadragon": "^2.1.0",
|
||||||
"requirejs": "^2.1.23",
|
"requirejs": "^2.1.23",
|
||||||
|
"requirejs-plugins": "^1.0.2",
|
||||||
"sharp": "^0.17.0",
|
"sharp": "^0.17.0",
|
||||||
"wildglob": "^0.1.1"
|
"wildglob": "^0.1.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -24,6 +24,9 @@ if((typeof(process) != 'undefined' ? process : {}).__nwjs){
|
|||||||
// a way of organizing things without so much manual hoop jumping...
|
// a way of organizing things without so much manual hoop jumping...
|
||||||
var requirejs_cfg = {
|
var requirejs_cfg = {
|
||||||
paths: {
|
paths: {
|
||||||
|
//text: 'node_modules/requirejs-plugins/lib/text',
|
||||||
|
//json: 'node_modules/requirejs-plugins/src/json',
|
||||||
|
|
||||||
// XXX one approach to avoid at least this section is to copy the
|
// XXX one approach to avoid at least this section is to copy the
|
||||||
// modules to lib/*, this way we'll need the map section below
|
// modules to lib/*, this way we'll need the map section below
|
||||||
// only... (without automation this also sounds bad)
|
// only... (without automation this also sounds bad)
|
||||||
@ -114,12 +117,6 @@ $(function(){
|
|||||||
|
|
||||||
//'-commandline',
|
//'-commandline',
|
||||||
//'-ui-partial-ribbons',
|
//'-ui-partial-ribbons',
|
||||||
|
|
||||||
// XXX BUG: disabling features on this level does not
|
|
||||||
// work, yet works deeper down...
|
|
||||||
// Example:
|
|
||||||
// '-ui' // will throw an error:
|
|
||||||
// // Feature "-ui" not loaded...
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@ -144,6 +141,8 @@ $(function(){
|
|||||||
ig.features.features.length,
|
ig.features.features.length,
|
||||||
ig.features.features)
|
ig.features.features)
|
||||||
|
|
||||||
|
|
||||||
|
// setup logger...
|
||||||
// XXX STUB...
|
// XXX STUB...
|
||||||
ig.logger = ig.logger || {
|
ig.logger = ig.logger || {
|
||||||
root: true,
|
root: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user