Skip to content
This repository has been archived by the owner on Aug 12, 2018. It is now read-only.

Commit

Permalink
working on login dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
slmyers committed Feb 10, 2016
1 parent ed384b2 commit 52c5327
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
22 changes: 16 additions & 6 deletions frontend/web/app/controllers/loginController.js
Original file line number Diff line number Diff line change
@@ -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);
});
};

}]);
12 changes: 8 additions & 4 deletions frontend/web/app/views/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
</span>
<span flex="10">
<div ng-controller="loginController" layout-align="center end">
<!-- this color needs to be changed -->
<md-button class="md-fab md-accent" aria-label="login">
<md-icon md-svg-src="/static/img/person.svg"></md-icon>
</md-button>
<md-menu>
<md-button class="md-fab md-accent" aria-label="login" ng-click="login($event)">
<md-icon md-svg-src="/static/img/person.svg"></md-icon>
</md-button>
<md-menu-content>
<md-menu-item><md-button>Login</md-button></md-menu-item>
</md-menu-content>
</md-menu>
</div>
</span>
</div>
Expand Down
3 changes: 0 additions & 3 deletions frontend/web/app/views/search.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<style>
body {
background-color: #FDF7EF;
}

#searchContainer {
display: -webkit-flex;
Expand Down

0 comments on commit 52c5327

Please sign in to comment.