added notifications

This commit is contained in:
Jon Lambson 2017-08-15 10:14:27 -06:00
부모 390273ecae
커밋 648a69b25c
7개의 변경된 파일35개의 추가작업 그리고 22개의 파일을 삭제

파일 보기

@ -46,6 +46,7 @@
<script src="/js/controllers/dns-controller.js" charset="utf-8"></script>
<script src="/js/controllers/email-controller.js" charset="utf-8"></script>
<!-- Divrectives -->
<script src="/js/directives/achievement-directive.js" charset="utf-8"></script>
<script src="/js/directives/notification-directive.js" charset="utf-8"></script>
<script src="/js/directives/todo-directive.js" charset="utf-8"></script>
<script src="/js/directives/upload-directive.js" charset="utf-8"></script>

파일 보기

@ -1,16 +1,13 @@
app.controller('homeCtrl', [
'$rootScope', '$scope', 'Auth', 'localStorageService', '$location', 'azp@oauth3.org'
, function ($rootScope, $scope, Auth, localStorageService, $location, Oauth3) {
'$rootScope', '$scope', 'Auth', 'localStorageService', '$location', 'azp@oauth3.org',
function ($rootScope, $scope, Auth, localStorageService, $location, Oauth3) {
var vm = this;
vm.oauth3 = Oauth3.oauth3;
vm.notification = true;
vm.achievement = true;
vm.userName = function(profile){
profile = Auth.getProfile();
return profile.email;
};
vm.notificationMessage = "testing stuff...";
throw new Error('loaded home controller');
}]);

파일 보기

@ -0,0 +1,7 @@
app.directive('achievementDirective', function() {
return {
templateUrl: "templates/widgets/achievement-widget.html",
controller: 'homeCtrl',
controllerAs: 'vm'
};
});

파일 보기

@ -1,5 +1,7 @@
app.directive('notificationDirective', function() {
return {
templateUrl: "templates/widgets/notification-widget.html"
templateUrl: "templates/widgets/notification-widget.html",
controller: 'homeCtrl',
controllerAs: 'vm'
};
});

파일 보기

@ -1,5 +1,7 @@
<div notification-directive></div>
<div achievement-directive></div>
<div upload-directive></div>
<div class="panel panel-default">

파일 보기

@ -0,0 +1,14 @@
<div ng-show="vm.achievement" class="panel panel-default">
<div class="panel-heading frsa">
<span class="align-left">Congratulations: Award Unlocked (just for fun)</span>
<span ng-click="vm.achievement = false" class="achievement-close cp"><i class="fa fa-times-circle"></i></span>
</div>
<div class="panel-body achievement-body">
<i class="fa fa-trophy fa-4x"></i>
<div class="achievement-text">
<!-- <p><strong ng-bind="vm.achievement.name">Achievement Name</strong>: <span ng-bind="vm.achievement.desc">Achievement Text</span></p> -->
<p><strong>Welcome</strong>:</p>
</div>
</div>
</div>

파일 보기

@ -1,14 +1,4 @@
<div ng-show="vm.notification" class="panel panel-default">
<div class="panel-heading frsa">
<span class="align-left">Congratulations: Award Unlocked (just for fun)</span>
<span ng-click="vm.notification = false" class="achievement-close cp"><i class="fa fa-times-circle"></i></span>
</div>
<div class="panel-body achievement-body">
<i class="fa fa-trophy fa-4x"></i>
<div class="achievement-text">
<!-- <p><strong ng-bind="vm.achievement.name">Achievement Name</strong>: <span ng-bind="vm.achievement.desc">Achievement Text</span></p> -->
<p><strong>Welcome</strong>: {{ vm.userName() }}</p>
</div>
</div>
</div>
<div class="alert alert-success" role="alert">{{ vm.notificationMessage }}</div>
<div class="alert alert-info" role="alert">{{ vm.notificationMessage }}</div>
<div class="alert alert-warning" role="alert">{{ vm.notificationMessage }}</div>
<div class="alert alert-danger" role="alert">{{ vm.notificationMessage }}</div>