Skip to content
Snippets Groups Projects
Commit 404c48a2 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

dialog style imrpoved

parent 5428d6fe
No related branches found
No related tags found
1 merge request!31Resolve "Login"
......@@ -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");
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment