tree: add "Show in session" context menu action
This commit is contained in:
parent
9470aba0ec
commit
ac2f0d9950
5 changed files with 44 additions and 1 deletions
|
|
@ -88,12 +88,35 @@ var handleClick = function(event) {
|
|||
},
|
||||
shortcut: 't'
|
||||
})
|
||||
|
||||
} else {
|
||||
|
||||
actions.push({
|
||||
separator: true
|
||||
label: icon('eye') + ' ' + locales('editor_show_in_session'),
|
||||
action: ()=>{
|
||||
for (let w of editor.selectedWidgets) {
|
||||
var parent = w
|
||||
while (parent !== widgetManager) {
|
||||
if (parent.getProp('type') === 'tab') parent.parent.setValue(parent.parent.children.indexOf(parent), {sync: true, send: true})
|
||||
else if (parent.getProp('type') === 'modal') parent.setValue(1, {sync: true, send: true})
|
||||
parent = parent.parent
|
||||
}
|
||||
w.container.classList.add('editor-blink')
|
||||
w.container.scrollIntoView({block: 'center'})
|
||||
setTimeout(()=>{
|
||||
w.container.classList.remove('editor-blink')
|
||||
}, 800)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
actions.push({
|
||||
separator: true
|
||||
})
|
||||
|
||||
actions.push({
|
||||
label: icon('copy') + ' ' + locales('editor_copy'),
|
||||
action: editor.copyWidget.bind(editor),
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ module.exports = {
|
|||
|
||||
// editor context-menu
|
||||
editor_show_in_tree: 'Show in tree',
|
||||
editor_show_in_session: 'Show in session',
|
||||
editor_front: 'Bring to front',
|
||||
editor_closer: 'Bring closer',
|
||||
editor_back: 'Send to back',
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ module.exports = {
|
|||
|
||||
// editor context-menu
|
||||
editor_show_in_tree: 'Voir dans l\'arborescence',
|
||||
editor_show_in_session: 'Voir dans la session',
|
||||
editor_front: 'Amener devant',
|
||||
editor_closer: 'Amener plus près',
|
||||
editor_back: 'Envoyer à l\'arrière',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue