diff --git a/frontend/web/app/controllers/loginController.js b/frontend/web/app/controllers/loginController.js index a2c136e..f83cfdf 100644 --- a/frontend/web/app/controllers/loginController.js +++ b/frontend/web/app/controllers/loginController.js @@ -1,11 +1,21 @@ // web token stuff not done yet angular.module('chemGeno') -.controller('loginController', ['$scope', '$mdDialog', function($scope, $mdDialog) { - var originatorEv; - this.openMenu = function($mdOpenMenu, ev) { - originatorEv = ev; - $mdOpenMenu(ev); +.controller('loginController', ['$scope','$mdMedia', '$mdDialog', function($scope, $mdMedia, $mdDialog) { + $scope.login = function($event) { + var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && $scope.customFullscreen; + $mdDialog.show({ + controller: loginController, + templateUrl: 'dialog1.tmpl.html', + parent: angular.element(document.body), + targetEvent: ev, + clickOutsideToClose:true, + fullscreen: useFullScreen + }); + $scope.$watch(function() { + return $mdMedia('xs') || $mdMedia('sm'); + }, function(wantsFullScreen) { + $scope.customFullscreen = (wantsFullScreen === true); + }); }; - }]); diff --git a/frontend/web/app/views/main.html b/frontend/web/app/views/main.html index 8b93d60..2972c94 100644 --- a/frontend/web/app/views/main.html +++ b/frontend/web/app/views/main.html @@ -9,10 +9,14 @@
- - - - + + + + + + Login + +
diff --git a/frontend/web/app/views/search.html b/frontend/web/app/views/search.html index 9c46496..5e8d737 100644 --- a/frontend/web/app/views/search.html +++ b/frontend/web/app/views/search.html @@ -1,7 +1,4 @@