embed from documents

This commit is contained in:
j 2017-06-01 17:00:57 +02:00
parent fbd94867fc
commit 304afad975

View file

@ -900,6 +900,8 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
options.view = 'info'; options.view = 'info';
} }
} }
} else if (ui.section == 'documents') {
options.view = 'document';
} else if (ui.section == 'edits') { } else if (ui.section == 'edits') {
options.view = 'edit'; options.view = 'edit';
} else { } else {
@ -907,9 +909,13 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
} }
options.mapMode = !ui.item ? 'find' : 'item'; options.mapMode = !ui.item ? 'find' : 'item';
options.item = ui.item; options.item = ui.item;
if (ui.section == 'documents') {
options.document = ui.document;
} else {
options.document = ui.documentsSelection[ui.item] && ui.documentsSelection[ui.item].length options.document = ui.documentsSelection[ui.item] && ui.documentsSelection[ui.item].length
? ui.documentsSelection[ui.item][0] ? ui.documentsSelection[ui.item][0]
: ''; : '';
}
options.list = ui._list; options.list = ui._list;
options.edit = ui.edit; options.edit = ui.edit;
options.text = ui.text; options.text = ui.text;