mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
tweaks and fixes to aliases...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
958cae1e1b
commit
dd8fc05f13
@ -184,7 +184,9 @@ var UIAliasActions = actions.Actions({
|
|||||||
// XXX should we set white-space: pre on doc here or in css???
|
// XXX should we set white-space: pre on doc here or in css???
|
||||||
// XXX multiline doc edit does not work...
|
// XXX multiline doc edit does not work...
|
||||||
// XXX edit key bindings (???)
|
// XXX edit key bindings (???)
|
||||||
// XXX BUG: doc not savable...
|
// XXX BUG: moving up/down out of a field will not save that field...
|
||||||
|
// XXX BUG: can't use multi-line fields...
|
||||||
|
// XXX BUG: renaming alias breaks .browseActions(..)
|
||||||
editAlias: ['- System/Edit alias...',
|
editAlias: ['- System/Edit alias...',
|
||||||
widgets.makeUIDialog(function(alias){
|
widgets.makeUIDialog(function(alias){
|
||||||
var that = this
|
var that = this
|
||||||
@ -199,8 +201,7 @@ var UIAliasActions = actions.Actions({
|
|||||||
edit_text: 'last',
|
edit_text: 'last',
|
||||||
clear_on_edit: false,
|
clear_on_edit: false,
|
||||||
reset_on_commit: false,
|
reset_on_commit: false,
|
||||||
// XXX bug -- error + clear field???
|
abort_on_deselect: false,
|
||||||
//abort_on_deselect: false,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// doc fields...
|
// doc fields...
|
||||||
|
|||||||
@ -543,7 +543,7 @@ if(typeof(jQuery) != typeof(undefined)){
|
|||||||
// make the element focusable and selectable...
|
// make the element focusable and selectable...
|
||||||
.attr('tabindex', '0')
|
.attr('tabindex', '0')
|
||||||
.addClass('editable-field')
|
.addClass('editable-field')
|
||||||
.keydown(events.keydown = function(jqevt){
|
.keydown(events.keydown = function(in_evt){
|
||||||
var evt = window.event || in_evt
|
var evt = window.event || in_evt
|
||||||
if(!that.prop('contenteditable')){
|
if(!that.prop('contenteditable')){
|
||||||
return
|
return
|
||||||
@ -576,7 +576,7 @@ if(typeof(jQuery) != typeof(undefined)){
|
|||||||
} else if(options.propagate_unhandled_keys !== false){
|
} else if(options.propagate_unhandled_keys !== false){
|
||||||
// NOTE: jQuery can't reuse browser events, this
|
// NOTE: jQuery can't reuse browser events, this
|
||||||
// we need to pass a jq event/proxy here...
|
// we need to pass a jq event/proxy here...
|
||||||
$(this).parent().trigger(in_evt)
|
$(this).parent().trigger(in_evt || evt)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.blur(events.blur = function(){
|
.blur(events.blur = function(){
|
||||||
|
|||||||
@ -356,9 +356,11 @@ function(text, options){
|
|||||||
})
|
})
|
||||||
.on('deselect', function(){
|
.on('deselect', function(){
|
||||||
//editable && editable.trigger(
|
//editable && editable.trigger(
|
||||||
getEditable()
|
var editable = getEditable()
|
||||||
|
// XXX need to pass the text....
|
||||||
|
editable
|
||||||
.trigger(
|
.trigger(
|
||||||
options.abort_on_deselect !== false ? 'edit-abort' : 'edit-commit')
|
options.abort_on_deselect !== false ? 'edit-abort' : 'edit-commit', editable.text())
|
||||||
})
|
})
|
||||||
|
|
||||||
stop_propagation
|
stop_propagation
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user