From 404c48a25b2b69260efe4a3d91929a188363a2aa Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Thu, 22 Jun 2017 11:17:34 +0200
Subject: [PATCH] dialog style imrpoved

---
 frontend-js/src/main/js/gui/LoginDialog.js | 27 ++++++----------------
 1 file changed, 7 insertions(+), 20 deletions(-)

diff --git a/frontend-js/src/main/js/gui/LoginDialog.js b/frontend-js/src/main/js/gui/LoginDialog.js
index aa506f71f3..51c4bbae09 100644
--- a/frontend-js/src/main/js/gui/LoginDialog.js
+++ b/frontend-js/src/main/js/gui/LoginDialog.js
@@ -18,7 +18,7 @@ function LoginDialog(params) {
     autoOpen : false,
     resizable : false,
   });
-  
+
   var loginButton = self.getControlElement(PanelControlElementType.USER_TAB_LOGIN_BUTTON);
   loginButton.onclick = function() {
     var login = self.getControlElement(PanelControlElementType.USER_TAB_LOGIN_INPUT_TEXT).value;
@@ -26,7 +26,7 @@ function LoginDialog(params) {
 
     return ServerConnector.login(login, password).then(function() {
       window.location.reload(false);
-    }).then(null, function(error){
+    }).then(null, function(error) {
       if (error instanceof InvalidCredentialsError) {
         GuiConnector.alert("invalid credentials");
       } else {
@@ -34,7 +34,7 @@ function LoginDialog(params) {
       }
     });
   };
-  
+
 }
 
 LoginDialog.prototype = Object.create(AbstractGuiElement.prototype);
@@ -59,25 +59,12 @@ LoginDialog.prototype.createTableRow = function(elements) {
 
 LoginDialog.prototype._createLoginTab = function() {
   var self = this;
-  var loginTabDiv = Functions.createElement({
-    type : "div",
-    name : "userLoginTab",
-    className : "searchPanel"
-  });
-  this.getElement().appendChild(loginTabDiv);
-  this.setControlElement(PanelControlElementType.USER_TAB_LOGIN_DIV, loginTabDiv);
-
-  var authirizationTitle = Functions.createElement({
-    type : "h5",
-    content : "AUTHORIZATION FORM:"
-  });
-  loginTabDiv.appendChild(authirizationTitle);
 
   var authorizationFormTab = Functions.createElement({
     type : "div",
     style : "width:100%;display: table;border-spacing: 10px;"
   });
-  loginTabDiv.appendChild(authorizationFormTab);
+  this.getElement().appendChild(authorizationFormTab);
 
   var loginLabel = Functions.createElement({
     type : "div",
@@ -95,7 +82,7 @@ LoginDialog.prototype._createLoginTab = function() {
 
   var passwordLabel = Functions.createElement({
     type : "div",
-    content : "LOGIN:"
+    content : "PASSWORD:"
   });
   var passwordInput = Functions.createElement({
     type : "input",
@@ -110,7 +97,7 @@ LoginDialog.prototype._createLoginTab = function() {
   var centerTag = Functions.createElement({
     type : "center"
   });
-  loginTabDiv.appendChild(centerTag);
+  this.getElement().appendChild(centerTag);
 
   var loginButton = Functions.createElement({
     type : "button",
@@ -124,7 +111,7 @@ LoginDialog.prototype._createLoginTab = function() {
 
 LoginDialog.prototype.open = function() {
   var self = this;
-
+  $(self.getElement()).dialog('option', 'title', 'AUTHORIZATION FORM');
   $(self.getElement()).dialog("open");
 };
 
-- 
GitLab