added notifications
This commit is contained in:
		
							부모
							
								
									390273ecae
								
							
						
					
					
						커밋
						648a69b25c
					
				@ -46,6 +46,7 @@
 | 
				
			|||||||
    <script src="/js/controllers/dns-controller.js" charset="utf-8"></script>
 | 
					    <script src="/js/controllers/dns-controller.js" charset="utf-8"></script>
 | 
				
			||||||
    <script src="/js/controllers/email-controller.js" charset="utf-8"></script>
 | 
					    <script src="/js/controllers/email-controller.js" charset="utf-8"></script>
 | 
				
			||||||
    <!-- Divrectives -->
 | 
					    <!-- 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/notification-directive.js" charset="utf-8"></script>
 | 
				
			||||||
    <script src="/js/directives/todo-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>
 | 
					    <script src="/js/directives/upload-directive.js" charset="utf-8"></script>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,16 +1,13 @@
 | 
				
			|||||||
app.controller('homeCtrl', [
 | 
					app.controller('homeCtrl', [
 | 
				
			||||||
  '$rootScope', '$scope', 'Auth', 'localStorageService', '$location', 'azp@oauth3.org'
 | 
					  '$rootScope', '$scope', 'Auth', 'localStorageService', '$location', 'azp@oauth3.org',
 | 
				
			||||||
, function ($rootScope, $scope, Auth, localStorageService, $location, Oauth3) {
 | 
					  function ($rootScope, $scope, Auth, localStorageService, $location, Oauth3) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  var vm = this;
 | 
					  var vm = this;
 | 
				
			||||||
  vm.oauth3 = Oauth3.oauth3;
 | 
					  vm.oauth3 = Oauth3.oauth3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vm.notification = true;
 | 
					  vm.achievement = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vm.userName = function(profile){
 | 
					  vm.notificationMessage = "testing stuff...";
 | 
				
			||||||
    profile = Auth.getProfile();
 | 
					 | 
				
			||||||
    return profile.email;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  throw new Error('loaded home controller');
 | 
					  throw new Error('loaded home controller');
 | 
				
			||||||
}]);
 | 
					}]);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										7
									
								
								js/directives/achievement-directive.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								js/directives/achievement-directive.js
									
									
									
									
									
										Normal file
									
								
							@ -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() {
 | 
					app.directive('notificationDirective', function() {
 | 
				
			||||||
  return {
 | 
					  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 notification-directive></div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div achievement-directive></div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div upload-directive></div>
 | 
					<div upload-directive></div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="panel panel-default">
 | 
					<div class="panel panel-default">
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										14
									
								
								templates/widgets/achievement-widget.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								templates/widgets/achievement-widget.html
									
									
									
									
									
										Normal file
									
								
							@ -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="alert alert-success" role="alert">{{ vm.notificationMessage }}</div>
 | 
				
			||||||
  <div class="panel-heading frsa">
 | 
					<div class="alert alert-info" role="alert">{{ vm.notificationMessage }}</div>
 | 
				
			||||||
    <span class="align-left">Congratulations: Award Unlocked (just for fun)</span>
 | 
					<div class="alert alert-warning" role="alert">{{ vm.notificationMessage }}</div>
 | 
				
			||||||
    <span ng-click="vm.notification = false" class="achievement-close cp"><i class="fa fa-times-circle"></i></span>
 | 
					<div class="alert alert-danger" role="alert">{{ vm.notificationMessage }}</div>
 | 
				
			||||||
  </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>
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		불러오는 중...
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user