added timeout to alerts
This commit is contained in:
		
							parent
							
								
									8f987882d2
								
							
						
					
					
						commit
						e9d0ce0846
					
				@ -617,13 +617,20 @@ app.controller('websiteCtrl', [
 | 
				
			|||||||
    return pkg.acceptInvite({
 | 
					    return pkg.acceptInvite({
 | 
				
			||||||
      token: vm.Shares.inviteToken
 | 
					      token: vm.Shares.inviteToken
 | 
				
			||||||
    }).then(function (result) {
 | 
					    }).then(function (result) {
 | 
				
			||||||
      var person = result.data.comment;
 | 
					      if (result.data.error) {
 | 
				
			||||||
      var path = result.data.path;
 | 
					        debugger;
 | 
				
			||||||
      var shareMode = result.data.mode;
 | 
					        var msg = result.data.error.message + '.';
 | 
				
			||||||
      var domain = result.data.domain;
 | 
					        vm.buildNotification(result, msg);
 | 
				
			||||||
      var msg = 'You accepted a share ' + "'" + domain + "'" + ' from ' + person + '. Take a look at your vefrified websites below.';
 | 
					      } else {
 | 
				
			||||||
      vm.buildNotification(result, msg);
 | 
					        debugger;
 | 
				
			||||||
      vm.listSites();
 | 
					        var person = result.data.comment;
 | 
				
			||||||
 | 
					        var path = result.data.path;
 | 
				
			||||||
 | 
					        var shareMode = result.data.mode;
 | 
				
			||||||
 | 
					        var domain = result.data.domain;
 | 
				
			||||||
 | 
					        var msg = 'You accepted a share ' + "'" + domain + "'" + ' from ' + person + '. Take a look at your verified websites below.';
 | 
				
			||||||
 | 
					        vm.buildNotification(result, msg);
 | 
				
			||||||
 | 
					        vm.listSites();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
@ -861,6 +868,15 @@ app.controller('websiteCtrl', [
 | 
				
			|||||||
        message: msg
 | 
					        message: msg
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    //Hide notification
 | 
				
			||||||
 | 
					    $timeout(function() {
 | 
				
			||||||
 | 
					      vm.alertNotification = {
 | 
				
			||||||
 | 
					        className: '',
 | 
				
			||||||
 | 
					        title: '',
 | 
				
			||||||
 | 
					        hidden: 'hidden',
 | 
				
			||||||
 | 
					        message: ''
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    }, 7000);
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vm.closeAllOpenActions = function () {
 | 
					  vm.closeAllOpenActions = function () {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user