-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit garbage - delete login because IT DOES NOT WORK.
YES. YOU READ RIGHT : THIS SIMPLE LITTLE THING JUST DOES NOT WORK AND IS DRIVING ME MAD. lol. 👎
- Loading branch information
Showing
13 changed files
with
95 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
|
||
var app = angular.module('ecoknowledgeApp'); | ||
|
||
var loginBasePath = 'http://localhost:3000/login/'; | ||
|
||
app.service('ServiceLogin', ['$http', function ServiceLogin($http) { | ||
|
||
this.login = function (name, successFunc, failFunc) { | ||
var path = loginBasePath + ''; | ||
console.log('ServiceLogin : login', path); | ||
|
||
$http.post(path, name) | ||
.success(function (data) { | ||
successFunc(data); | ||
}) | ||
.error(function (data) { | ||
failFunc(data); | ||
}); | ||
}; | ||
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
var app = angular.module('ecoknowledgeApp'); | ||
|
||
app.controller('LoginCtrl', ['ServiceLogin', function (ServiceLogin) { | ||
|
||
var self = this; | ||
|
||
this.username = '' | ||
this.password = ''; | ||
this.debug = ''; | ||
|
||
this.connect = function () { | ||
self.debug = 'ID:' + self.username + ', passwd:' + self.password; | ||
ServiceLogin.login(self.username, | ||
function (data) { | ||
console.log('Login success: data received', data); | ||
}, | ||
function (data) { | ||
console.log('Login fail: data received', data); | ||
|
||
}); | ||
}; | ||
|
||
}]); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
.navbar { | ||
margin-bottom:0px; | ||
border : 0px solid white; | ||
} | ||
|
||
.browsehappy { | ||
margin: 0.2em 0; | ||
background: #ccc; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<link rel="stylesheet" href="styles/login.css"> | ||
|
||
<div class="container jumbotron"> | ||
|
||
<div class="page-header text-center"> | ||
<h1>Connexion</h1> | ||
</div> | ||
{{loginCtrl.username}} | ||
{{loginCtrl.password}} | ||
{{loginCtrl.debug}} | ||
<form name="loginForm" role="form" class="form-horizontal" accept-charset="utf-8" ng-submit="loginForm.$valid && loginCtrl.connect()" novalidate> | ||
<div class="form-group"> | ||
<div class="col-md-8"><input placeholder="Idenfiant" class="form-control" type="text" ng-model="loginCtrl.username" required/></div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<div class="col-md-8"><input placeholder="Mot de passe" class="form-control" type="password" ng-model="loginCtrl.password" required/></div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<div class="col-md-offset-0 col-md-8"> | ||
<input type="submit" class="btn btn-success" ng-disabled="!loginForm.$valid" value="Connexion"/> | ||
</div> | ||
</div> | ||
|
||
</form> | ||
</div> |