From cce2b4c7aebf1a51db33aa9df33b7eedde83ffdf Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Mon, 10 Apr 2017 16:22:14 +0200
Subject: [PATCH] opening window with stub list of publications

---
 .../src/main/js/gui/ProjectInfoPanel.js       | 21 ++++++++++++++-----
 .../src/main/js/gui/PublicationListDialog.js  |  4 ++++
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/frontend-js/src/main/js/gui/ProjectInfoPanel.js b/frontend-js/src/main/js/gui/ProjectInfoPanel.js
index df964c3835..8767f7ba0f 100644
--- a/frontend-js/src/main/js/gui/ProjectInfoPanel.js
+++ b/frontend-js/src/main/js/gui/ProjectInfoPanel.js
@@ -4,6 +4,7 @@
 
 var Panel = require('./Panel');
 var PanelControlElementType = require('./PanelControlElementType');
+var PublicationListDialog = require('./PublicationListDialog');
 
 var logger = require('../logger');
 var Functions = require('../Functions');
@@ -78,7 +79,7 @@ ProjectInfoPanel.prototype._createInfoPanelGui = function() {
   dataTab.appendChild(self.createTableRow([ projectDescriptionLabel, projectDescriptionText ]));
 
   var projectPublicationsLabel = Functions.createElement({
-    type : "label",
+    type : "div",
     content : "Publications:"
   });
 
@@ -86,9 +87,8 @@ ProjectInfoPanel.prototype._createInfoPanelGui = function() {
     type : "div"
   });
   var projectPublicationsText = Functions.createElement({
-    type : "div",
-    style : "width:100%",
-    name : "projectPublicationsText"
+    type : "label",
+    name : "projectPublicationsText",
   });
   this.setControlElement(PanelControlElementType.INFO_PROJECT_PUBLICATIONS_TEXT, projectPublicationsText);
 
@@ -114,6 +114,17 @@ ProjectInfoPanel.prototype._createInfoPanelGui = function() {
   });
   this.setControlElement(PanelControlElementType.INFO_PROJECT_GET_ORIGINAL_FILE_BUTTON, projectOriginalFileButton);
   dataTab.appendChild(self.createTableRow([ projectOriginalFileLabel, projectOriginalFileButton ]));
+  
+  
+  var dialogDiv = Functions.createElement({
+    type : "div",
+  });
+  
+  this.publicationListDialog = new PublicationListDialog({
+    customMap: self.getMap(),
+    element: dialogDiv,
+  });
+  
 };
 
 ProjectInfoPanel.prototype._createInfoPanelLogic = function() {
@@ -138,7 +149,7 @@ ProjectInfoPanel.prototype.downloadSourceFile = function() {
 };
 
 ProjectInfoPanel.prototype.showPublicationListDialog = function() {
-  throw new Error("Not implemented");
+  return this.publicationListDialog.show();
 };
 
 ProjectInfoPanel.prototype.refresh = function() {
diff --git a/frontend-js/src/main/js/gui/PublicationListDialog.js b/frontend-js/src/main/js/gui/PublicationListDialog.js
index 3e135a0220..71f8b2eaa0 100644
--- a/frontend-js/src/main/js/gui/PublicationListDialog.js
+++ b/frontend-js/src/main/js/gui/PublicationListDialog.js
@@ -20,6 +20,10 @@ function PublicationListDialog(params) {
 PublicationListDialog.prototype = Object.create(AbstractGuiElement.prototype);
 PublicationListDialog.prototype.constructor = PublicationListDialog;
 
+PublicationListDialog.prototype.show = function() {
+  var self = this;
+  $(self.getElement()).dialog("open");
+};
 
 PublicationListDialog.prototype.destroy = function() {
   $(this.getElement()).dialog("destroy");
-- 
GitLab