From 8ad216dedf017f3d6de047a25d08db3b98e16361 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Wed, 9 Mar 2016 15:33:52 +0100 Subject: test --- client/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/index.html') diff --git a/client/index.html b/client/index.html index a06994c..7ff859d 100644 --- a/client/index.html +++ b/client/index.html @@ -66,7 +66,7 @@ - + -- cgit v1.2.3 From 0ce2b2fa301dde1c5b9c50c826d3ed44b00a5c44 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Wed, 16 Mar 2016 18:01:03 +0100 Subject: Add overlay upload --- client/index.html | 2 +- client/partials/image/image.html | 8 ++++---- client/partials/image/upload.html | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 client/partials/image/upload.html (limited to 'client/index.html') diff --git a/client/index.html b/client/index.html index 7ff859d..08be038 100644 --- a/client/index.html +++ b/client/index.html @@ -23,7 +23,7 @@
- +
diff --git a/client/partials/image/image.html b/client/partials/image/image.html index c90cbe0..886a11d 100644 --- a/client/partials/image/image.html +++ b/client/partials/image/image.html @@ -1,14 +1,14 @@ -
+ + +
Image Manager
- -
- +

diff --git a/client/partials/image/upload.html b/client/partials/image/upload.html new file mode 100644 index 0000000..9049abf --- /dev/null +++ b/client/partials/image/upload.html @@ -0,0 +1,25 @@ + -
+
- - + + - + - + - + - + - + - - + + + + - - diff --git a/client/js/controllers/login.js b/client/js/controllers/login.js index fed358d..93a373e 100644 --- a/client/js/controllers/login.js +++ b/client/js/controllers/login.js @@ -5,62 +5,61 @@ * @param {$sce} $sce The $sce angular service * @param {$http} $http The $http angular service * @param {Identity} The Identity service - + */ -mainApp.controller('loginCtrl', ['$scope','$sce','Identity', function ($scope,$sce, Identity) -{ - // Check for login and define default states - if(!Identity.isAlreadyLogin()){ - $('#loginModal').modal({backdrop: 'static', keyboard: false}); - } +mainApp.controller('loginCtrl', ['$scope', '$sce', 'Identity', function ($scope, $sce, Identity) + { + // Check for login and define default states + if (!Identity.isAlreadyLogin()) { + $('#loginModal').modal({backdrop: 'static', keyboard: false}); + } - // Manager logout event - $scope.$on('logoutEvent', function(){ - $('#loginModal').modal({backdrop: 'static', keyboard: false}); - }); + // Manager logout event + $scope.$on('logoutEvent', function () { + $('#loginModal').modal({backdrop: 'static', keyboard: false}); + }); - - // Hide loading button and message alert - $('#loadingLoginButton').hide(); - $('#failedToLoginAlert').hide(); - - // Defined function for login - $scope.loginAction=function(){ - - // Begin login state for template - $('#loginButton').hide(); - $('#loadingLoginButton').show(); + // Hide loading button and message alert + $('#loadingLoginButton').hide(); $('#failedToLoginAlert').hide(); - // Get data from templates - var username=$("#loginFormUsername").val(); - var password=$("#loginFormPassword").val(); - var projectname=$("#loginFormProjectname").val(); - // Function to call to handle result - var responseCallback=function(response){ + // Defined function for login + $scope.loginAction = function () { - if(response.status!==0){ - // Set reason of fail - $scope.failReason=response.failReason; + // Begin login state for template + $('#loginButton').hide(); + $('#loadingLoginButton').show(); + $('#failedToLoginAlert').hide(); - // Display the error - $('#failedToLoginAlert').show(); - } - else { - // Else the user is online ! - $('#loginModal').modal('hide'); + // Get data from templates + var username = $("#loginFormUsername").val(); + var password = $("#loginFormPassword").val(); + var projectname = $("#loginFormProjectname").val(); + + // Function to call to handle result + var responseCallback = function (response) { + + if (response.status !== 0) { + // Set reason of fail + $scope.failReason = response.failReason; + + // Display the error + $('#failedToLoginAlert').show(); + } else { + // Else the user is online ! + $('#loginModal').modal('hide'); + } + + // Reset button state + $('#loginButton').show(); + $('#loadingLoginButton').hide(); } - // Reset button state - $('#loginButton').show(); - $('#loadingLoginButton').hide(); - } - - // Try to login - Identity.login(username, password, projectname, responseCallback); - }; - -}]); + // Try to login + Identity.login(username, password, projectname, responseCallback); + }; + + }]); -- cgit v1.2.3