added notifications
This commit is contained in:
parent
390273ecae
commit
648a69b25c
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue