diff --git a/html/header.html b/html/header.html
index 7cfa3516..21b4cc16 100644
--- a/html/header.html
+++ b/html/header.html
@@ -1,8 +1,15 @@
-
+
+
+
+
diff --git a/js/loader.js b/js/loader.js
index da7030d4..91dfe1d2 100644
--- a/js/loader.js
+++ b/js/loader.js
@@ -39,7 +39,6 @@
if (!test) {
angular.bootstrap(document, ["MifosX_Application"]);
}
- // require([], 'test/test_realtime_demo');
});
});
}());
diff --git a/js/models/User.js b/js/models/User.js
index cbf97108..fce1ecee 100644
--- a/js/models/User.js
+++ b/js/models/User.js
@@ -1,6 +1,8 @@
(function(module) {
mifosX.models = _.extend(module, {
User: function(data) {
+ this.name = data.username;
+
this.getHomePageIdentifier = function() {
var role = _.first(data.selectedRoles || data.roles);
return mifosX.models.roleMap[role.id];
diff --git a/stylesheets/mifosX.css b/stylesheets/mifosX.css
index 99e51b6f..c8791e12 100644
--- a/stylesheets/mifosX.css
+++ b/stylesheets/mifosX.css
@@ -10,3 +10,15 @@ nav a:hover {
nav a:active {
color: #000000;
}
+
+.menu-links {
+ float: left;
+}
+.menu-user {
+ margin-right: 20px;
+ float: right;
+}
+
+.menu-user a {
+ cursor: pointer;
+}
diff --git a/test/spec/services/AuthenticationServiceSpec.js b/test/spec/services/AuthenticationServiceSpec.js
index 7469ec5a..0e7aff5f 100644
--- a/test/spec/services/AuthenticationServiceSpec.js
+++ b/test/spec/services/AuthenticationServiceSpec.js
@@ -1,26 +1,26 @@
describe("AuthenticationService", function() {
- var scope, http, callbacks;
+ var scope, httpService, callbacks;
beforeEach(function() {
callbacks = {};
scope = jasmine.createSpyObj("$rootScope", ['$broadcast']);
- http = jasmine.createSpyObj("$http", ['post', 'success', 'error']);
- http.post.andReturn(http);
+ httpService = jasmine.createSpyObj("httpService", ['post', 'success', 'error']);
+ httpService.post.andReturn(httpService);
_.each(['success', 'error'], function(method) {
- http[method].andCallFake(function(callback) {
+ httpService[method].andCallFake(function(callback) {
callbacks[method] = callback;
return this;
});
});
- new mifosX.services.AuthenticationService(scope, http).authenticateWithUsernamePassword({
+ new mifosX.services.AuthenticationService(scope, httpService).authenticateWithUsernamePassword({
username: "test_username",
password: "test_password",
});
});
it("should pass the correct parameters to the post method", function() {
- expect(http.post).toHaveBeenCalledWith("/authentication?username=test_username&password=test_password");
+ expect(httpService.post).toHaveBeenCalledWith("/authentication?username=test_username&password=test_password");
});
describe("On successful authentication", function() {