From e6b5dcb34667c0957f3cb93a09ef74f2595f2ffc Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 19 Nov 2014 18:30:58 +0000 Subject: [PATCH] add link from documents dialog to entities dialog --- static/js/documentsDialog.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/static/js/documentsDialog.js b/static/js/documentsDialog.js index db77ef9a..0438d004 100644 --- a/static/js/documentsDialog.js +++ b/static/js/documentsDialog.js @@ -7,6 +7,19 @@ pandora.ui.documentsDialog = function() { var dialogHeight = Math.round((window.innerHeight - 48) * 0.9), dialogWidth = Math.round(window.innerWidth * 0.9), + // FIXME: user may not have the manage entites capability + $switchButton = Ox.Button({ + title: Ox._('Manage Entities...') + }) + .bindEvent({ + click: function() { + that.close(); + (pandora.$ui.entitiesDialog || ( + pandora.$ui.entitiesDialog = pandora.ui.entitiesDialog() + )).open(); + } + }), + $doneButton = Ox.Button({ id: 'done', title: Ox._('Done'), @@ -23,7 +36,7 @@ pandora.ui.documentsDialog = function() { }), that = Ox.Dialog({ - buttons: [$doneButton], + buttons: [$switchButton, {}, $doneButton], closeButton: true, content: $content, height: dialogHeight,