mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Added login form
This commit is contained in:
parent
3020abc4bf
commit
e04326c9f3
@ -1,13 +0,0 @@
|
||||
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||
require('../../js/transition.js')
|
||||
require('../../js/alert.js')
|
||||
require('../../js/button.js')
|
||||
require('../../js/carousel.js')
|
||||
require('../../js/collapse.js')
|
||||
require('../../js/dropdown.js')
|
||||
require('../../js/modal.js')
|
||||
require('../../js/tooltip.js')
|
||||
require('../../js/popover.js')
|
||||
require('../../js/scrollspy.js')
|
||||
require('../../js/tab.js')
|
||||
require('../../js/affix.js')
|
12
assets/css/components/menuBar.css
Normal file
12
assets/css/components/menuBar.css
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Menubar stylesheet
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
/**
|
||||
* Login form
|
||||
*/
|
||||
.menubar-loginForm .form-control {
|
||||
margin-right: 1px;
|
||||
}
|
5
assets/js/components/mailCachingController.js
Normal file
5
assets/js/components/mailCachingController.js
Normal file
@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Mail caching controller
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
@ -70,6 +70,17 @@ ComunicWeb.components.menuBar.common = {
|
||||
ComunicWeb.common.page.openPage("home");
|
||||
});
|
||||
|
||||
//Create navbar collapsed button
|
||||
var navbarCollapsedButton = createElem("button", navbarHeader);
|
||||
navbarCollapsedButton.type = "button";
|
||||
navbarCollapsedButton.className = "navbar-toggle collapsed";
|
||||
navbarCollapsedButton.setAttribute("data-toggle", "collapse");
|
||||
navbarCollapsedButton.setAttribute("data-target", "#navbar-collapse");
|
||||
|
||||
//Create navbar icon
|
||||
var navbarCollapsIcon = createElem("i", navbarCollapsedButton);
|
||||
navbarCollapsIcon.className = "fa fa-bars";
|
||||
|
||||
//Now we need to know if user is logged in or not
|
||||
var userLoggedIn = ComunicWeb.user.userLogin.getUserLoginState();
|
||||
|
||||
|
@ -8,9 +8,52 @@ ComunicWeb.components.menuBar.notAuthenticated = {
|
||||
/**
|
||||
* Add not-authenticated user specific elements
|
||||
*
|
||||
* @param {HTMLElement} addElements The container element of the Menubar
|
||||
* @param {HTMLElement} container The container element of the Menubar
|
||||
*/
|
||||
addElements: function(addElements){
|
||||
addElements: function(container){
|
||||
|
||||
//Create an auto-collapsed element
|
||||
var navbarCollapse = createElem("div", container);
|
||||
navbarCollapse.id = "navbar-collapse";
|
||||
navbarCollapse.className = "navbar-collapse pull-right collapse";
|
||||
|
||||
//Create login form
|
||||
var loginForm = createElem("form", navbarCollapse);
|
||||
loginForm.className = "navbar-form navbar-left menubar-loginForm";
|
||||
loginForm.setAttribute("role", "login");
|
||||
|
||||
loginForm.onsubmit = function(){
|
||||
//Try to login user; in case of failure redirect
|
||||
}
|
||||
|
||||
//Add email address formGroup
|
||||
var emailFormGroup = createElem("div", loginForm);
|
||||
emailFormGroup.className = "form-group";
|
||||
|
||||
//Add email input
|
||||
var emailInput = createElem("input", emailFormGroup);
|
||||
emailInput.className = "form-control";
|
||||
emailInput.placeholder = "Email address";
|
||||
emailInput.type = "email";
|
||||
|
||||
//Add password formGroup
|
||||
var passwordFormGroup = createElem("div", loginForm);
|
||||
passwordFormGroup.className = "form-group";
|
||||
|
||||
//Add password input
|
||||
var passwordInput = createElem("input", passwordFormGroup);
|
||||
passwordInput.className = "form-control";
|
||||
passwordInput.placeholder = "Password";
|
||||
passwordInput.type = "password";
|
||||
|
||||
//Add submit button formGroup
|
||||
var submitFromGroup = createElem("div", loginForm);
|
||||
submitFromGroup.className = "form-group";
|
||||
|
||||
//Add submit input
|
||||
var submitInput = createElem("input", submitFromGroup);
|
||||
submitInput.className = "form-control";
|
||||
submitInput.value = "Login";
|
||||
submitInput.type = "submit";
|
||||
}
|
||||
}
|
@ -21,14 +21,19 @@ $config['CSSfiles'] = array(
|
||||
//App stylesheets
|
||||
"%PATH_ASSETS%css/common/global.css",
|
||||
"%PATH_ASSETS%css/common/page/waitSplashScreen.css",
|
||||
|
||||
//Components stylesheets
|
||||
"%PATH_ASSETS%css/components/menuBar.css",
|
||||
);
|
||||
|
||||
//JS files to include (at the end of the page)
|
||||
$config['JSfiles'] = array(
|
||||
//Framewokr inclusions
|
||||
"%PATH_ASSETS%adminLTE/plugins/jQuery/jquery-2.2.3.min.js",
|
||||
"%PATH_ASSETS%adminLTE/bootstrap/js/bootstrap.min.js",
|
||||
"%PATH_ASSETS%adminLTE/plugins/jquery-ui/jquery-ui.min.js",
|
||||
"%PATH_ASSETS%adminLTE/plugins/iCheck/icheck.min.js",
|
||||
"%PATH_ASSETS%adminLTE/dist/js/app.min.js",
|
||||
|
||||
//Utilities
|
||||
"%PATH_ASSETS%js/common/utils.js",
|
||||
|
Loading…
Reference in New Issue
Block a user