mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
bugfix + notes + help links...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
63bc65b3e5
commit
fa198967d7
@ -431,10 +431,6 @@ body {
|
|||||||
|
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
.help-dialog .comment {
|
|
||||||
color: gray;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* scrollbar setup... */
|
/* scrollbar setup... */
|
||||||
.help-dialog::-webkit-scrollbar {
|
.help-dialog::-webkit-scrollbar {
|
||||||
@ -464,6 +460,16 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.help-dialog .comment {
|
||||||
|
color: gray;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.help-dialog .warning {
|
||||||
|
color: blue;
|
||||||
|
background: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -113,9 +113,12 @@ var StatusBarActions = actions.Actions({
|
|||||||
: $('<span>')
|
: $('<span>')
|
||||||
.addClass('position editable')
|
.addClass('position editable')
|
||||||
.attr('info', 'Image number (click to edit)')
|
.attr('info', 'Image number (click to edit)')
|
||||||
.makeEditable()
|
.makeEditable({
|
||||||
|
propagate_unhandled_keys: false,
|
||||||
|
reset_on_done: false,
|
||||||
|
})
|
||||||
// select image when done...
|
// select image when done...
|
||||||
.on('edit-done', function(_, text){
|
.on('edit-commit', function(_, text){
|
||||||
var i = parseInt(text)
|
var i = parseInt(text)
|
||||||
i = i >= 1 ? i-1
|
i = i >= 1 ? i-1
|
||||||
: i == null ? 'current'
|
: i == null ? 'current'
|
||||||
@ -202,8 +205,11 @@ var StatusBarActions = actions.Actions({
|
|||||||
.append($('<span>')
|
.append($('<span>')
|
||||||
.addClass('ribbon-number')
|
.addClass('ribbon-number')
|
||||||
.attr('info', 'Current ribbon (click to edit)')
|
.attr('info', 'Current ribbon (click to edit)')
|
||||||
.makeEditable()
|
.makeEditable({
|
||||||
.on('edit-done', function(_, text){
|
propagate_unhandled_keys: false,
|
||||||
|
reset_on_done: false,
|
||||||
|
})
|
||||||
|
.on('edit-commit', function(_, text){
|
||||||
that.focusRibbon(text == '*' ? that.base : parseInt(text)-1)
|
that.focusRibbon(text == '*' ? that.base : parseInt(text)-1)
|
||||||
})
|
})
|
||||||
.focus(function(){
|
.focus(function(){
|
||||||
|
|||||||
@ -532,13 +532,22 @@ var DialogsActions = actions.Actions({
|
|||||||
return browse.makeList(null, list, options) })],
|
return browse.makeList(null, list, options) })],
|
||||||
|
|
||||||
|
|
||||||
|
// Show doc for action...
|
||||||
|
//
|
||||||
// XXX this needs to:
|
// XXX this needs to:
|
||||||
// - be a widget
|
// - be a widget
|
||||||
// - handle focus
|
// - handle focus
|
||||||
// - handle keyboard
|
// - handle keyboard
|
||||||
// - handle search...
|
// - handle search...
|
||||||
|
// - format action links/references...
|
||||||
|
// - markdown???
|
||||||
// - ...
|
// - ...
|
||||||
showDoc: ['- Interface/Action help',
|
// XXX use pWiki???
|
||||||
|
// XXX should we have navigation???
|
||||||
|
// ...i.e. opening links is done in the viewer and we have
|
||||||
|
// ability to go back and forth...
|
||||||
|
// XXX STUB...
|
||||||
|
showDoc: ['Help/Action help...',
|
||||||
makeUIDialog(function(actions){
|
makeUIDialog(function(actions){
|
||||||
actions = actions || this.actions
|
actions = actions || this.actions
|
||||||
actions = actions instanceof Array ? actions : [actions]
|
actions = actions instanceof Array ? actions : [actions]
|
||||||
@ -550,25 +559,38 @@ var DialogsActions = actions.Actions({
|
|||||||
actions.forEach(function(action){
|
actions.forEach(function(action){
|
||||||
res.append($('<div class="action">')
|
res.append($('<div class="action">')
|
||||||
.prop('tabindex', true)
|
.prop('tabindex', true)
|
||||||
.append($('<h2>').text(doc[action][2]))
|
.append($('<h2>')
|
||||||
.append($('<i>').text(doc[action][0]))
|
.text(doc[action][2]))
|
||||||
|
.append($('<i>')
|
||||||
|
.text(doc[action][0]))
|
||||||
.append($('<hr>'))
|
.append($('<hr>'))
|
||||||
.append($('<pre>').html((doc[action][1] || '')
|
.append($('<pre>')
|
||||||
|
.html((doc[action][1] || '')
|
||||||
|
// html stuff...
|
||||||
.replace(/&/g, '&')
|
.replace(/&/g, '&')
|
||||||
.replace(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>')
|
.replace(/>/g, '>')
|
||||||
// normalize tabs...
|
// normalize tabs -- convert tabs and tabbed
|
||||||
|
// spaces into 4 spaces...
|
||||||
|
// NOTE: the code internally uses only tabs,
|
||||||
|
// but this will help make the view
|
||||||
|
// consistent.
|
||||||
.replace(/ {0,3}\t/g, ' ')
|
.replace(/ {0,3}\t/g, ' ')
|
||||||
// comments...
|
// comments...
|
||||||
.replace(/(\/\/.*)\n/g, '<span class="comment">$1</span>\n')
|
.replace(/(\/\/.*)\n/g, '<span class="comment">$1</span>\n')
|
||||||
|
// notes...
|
||||||
.replace(/NOTE:/g, '<b>NOTE:</b>')
|
.replace(/NOTE:/g, '<b>NOTE:</b>')
|
||||||
|
.replace(/XXX/g, '<span class="warning">XXX</span>')
|
||||||
|
|
||||||
|
// action links...
|
||||||
|
.replace(/(\s)(\.([\w_]+[\w\d_]*)\([^)]*\))/g,
|
||||||
|
'$1<a href="#" onclick="ig.showDoc(\'$3\')">$2</a>')
|
||||||
)))
|
)))
|
||||||
})
|
})
|
||||||
|
|
||||||
return res
|
return res
|
||||||
})],
|
})],
|
||||||
|
|
||||||
|
|
||||||
listDialogs: ['Interface/Dialog/Dialog list...',
|
listDialogs: ['Interface/Dialog/Dialog list...',
|
||||||
makeUIDialog(function(){
|
makeUIDialog(function(){
|
||||||
var actions = this
|
var actions = this
|
||||||
|
|||||||
@ -392,6 +392,10 @@ if(typeof(jQuery) != typeof(undefined)){
|
|||||||
// clear_selection_on_abort: true,
|
// clear_selection_on_abort: true,
|
||||||
// clear_selection_on_commit: true,
|
// clear_selection_on_commit: true,
|
||||||
//
|
//
|
||||||
|
// propagate_unhandled_keys: true,
|
||||||
|
//
|
||||||
|
// reset_on_done: true,
|
||||||
|
//
|
||||||
// // Keys that will abort the edit...
|
// // Keys that will abort the edit...
|
||||||
// abort_keys: [
|
// abort_keys: [
|
||||||
// 'Esc',
|
// 'Esc',
|
||||||
@ -496,7 +500,7 @@ if(typeof(jQuery) != typeof(undefined)){
|
|||||||
that.trigger('edit-commit', that.text())
|
that.trigger('edit-commit', that.text())
|
||||||
|
|
||||||
// continue handling...
|
// continue handling...
|
||||||
} else {
|
} else if(options.propagate_unhandled_keys !== false){
|
||||||
$(this).parent().trigger(evt)
|
$(this).parent().trigger(evt)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -527,7 +531,8 @@ if(typeof(jQuery) != typeof(undefined)){
|
|||||||
options.keep_focus_on_parent !== false
|
options.keep_focus_on_parent !== false
|
||||||
&& that.parents('[tabindex]').first().focus()
|
&& that.parents('[tabindex]').first().focus()
|
||||||
|
|
||||||
that.makeEditable(false)
|
options.reset_on_done !== false
|
||||||
|
&& that.makeEditable(false)
|
||||||
})
|
})
|
||||||
.on('edit-commit', events['edit-commit'] = function(evt, text){
|
.on('edit-commit', events['edit-commit'] = function(evt, text){
|
||||||
that.trigger('edit-committing', text)
|
that.trigger('edit-committing', text)
|
||||||
@ -545,7 +550,8 @@ if(typeof(jQuery) != typeof(undefined)){
|
|||||||
options.keep_focus_on_parent !== false
|
options.keep_focus_on_parent !== false
|
||||||
&& that.parents('[tabindex]').first().focus()
|
&& that.parents('[tabindex]').first().focus()
|
||||||
|
|
||||||
that.makeEditable(false)
|
options.reset_on_done !== false
|
||||||
|
&& that.makeEditable(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
this.data('editable-field-events', events)
|
this.data('editable-field-events', events)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user