mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
added base path to export dialog...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
39754e2ec0
commit
5e00e7164c
@ -2238,6 +2238,7 @@ var FileSystemWriterUIActions = actions.Actions({
|
||||
alias: 'index',
|
||||
action: 'exportIndex',
|
||||
data: [
|
||||
'base_path',
|
||||
'target_dir',
|
||||
// XXX need to add options to size: 'none',
|
||||
// XXX use closest preview instead of hi-res when
|
||||
@ -2255,8 +2256,9 @@ var FileSystemWriterUIActions = actions.Actions({
|
||||
data: [
|
||||
'pattern',
|
||||
'size',
|
||||
'level_dir',
|
||||
'base_path',
|
||||
'target_dir',
|
||||
'level_dir',
|
||||
],
|
||||
},
|
||||
},
|
||||
@ -2448,11 +2450,27 @@ var FileSystemWriterUIActions = actions.Actions({
|
||||
return e != 'no limit' },
|
||||
}))
|
||||
},
|
||||
// XXX should this be editable???
|
||||
// XXX make this selectable...
|
||||
'base_path': function(actions, make, parent){
|
||||
var elem = make(['Current path: ', this.location.path],
|
||||
{
|
||||
events: {
|
||||
select: function(){
|
||||
elem.find('.text').last().selectText()
|
||||
},
|
||||
deselect: function(){
|
||||
elem.find('.text').last().selectText(null)
|
||||
},
|
||||
},
|
||||
})
|
||||
},
|
||||
// XXX BUG: history closing errors -- non-critical...
|
||||
'target_dir': function(actions, make, parent){
|
||||
var elem = make(['$To: ',
|
||||
function(){ return actions.config['export-path'] || './' }],
|
||||
{ buttons: [
|
||||
{
|
||||
buttons: [
|
||||
['browse', function(p){
|
||||
var e = this.filter('"'+p+'"', false)
|
||||
var path = e.find('.text').last().text()
|
||||
@ -2476,9 +2494,9 @@ var FileSystemWriterUIActions = actions.Actions({
|
||||
length_limit: 10,
|
||||
new_item: false,
|
||||
})],
|
||||
]})
|
||||
],
|
||||
// XXX make this editable???
|
||||
.on('open', function(){
|
||||
open: function(){
|
||||
event.preventDefault()
|
||||
|
||||
var path = elem.find('.text').last()
|
||||
@ -2501,6 +2519,7 @@ var FileSystemWriterUIActions = actions.Actions({
|
||||
parent.select(path)
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
'comment': function(actions, make, parent){
|
||||
@ -2532,6 +2551,7 @@ var FileSystemWriterUIActions = actions.Actions({
|
||||
})
|
||||
},
|
||||
},
|
||||
// XXX might be a good idea to show (editable?) base path???
|
||||
// XXX update export state: index, crop, image...
|
||||
// XXX should this be visible directly???
|
||||
exportDialog: ['- File/$Export/Export...',
|
||||
|
||||
@ -94,7 +94,7 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
}
|
||||
|
||||
|
||||
jQuery.fn.selectText = function(){
|
||||
jQuery.fn.selectText = function(mode){
|
||||
var range = document.createRange()
|
||||
|
||||
this.each(function(){
|
||||
@ -103,10 +103,13 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
|
||||
var sel = window.getSelection()
|
||||
sel.removeAllRanges()
|
||||
sel.addRange(range)
|
||||
|
||||
mode === null
|
||||
|| sel.addRange(range)
|
||||
|
||||
return this
|
||||
}
|
||||
jQuery.fn.deselectText = function(){ this.selectText(null) }
|
||||
jQuery.fn.caretOffset = function(){ return getCaretOffset(this) }
|
||||
jQuery.fn.selectionCollapsed = function(){ return selectionCollapsed(this) }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user