// This file is part of the Shapy project.
// Licensing information can be found in the LICENSE file.
// (C) 2015 The Shapy Team. All rights reserved.
goog.provide('shapy.LoginController');



/**
 * Login controller.
 *
 * @constructor
 * @ngInject
 *
 * @param {!angular.$state} $state Angular state.
 * @param {!shapy.AuthService} shUser Authentication service.
 */
shapy.LoginController = function($state, shUser) {
  /** @public {string} */
  this.password = '';
  /** @public {string} */
  this.username = '';
  /** @private {!shapy.AuthService} @const */
  this.shUser_ = shUser;
  /** @private {!angular.$state} @const */
  this.state_ = $state;
};


/**
 * Login action.
 */
shapy.LoginController.prototype.login = function() {
  this.shUser_.login(this.username, this.password).then(goog.bind(function() {
    this.state_.go('main', null, { reload: true });
  }, this));
};

@@ -277,16 +277,23 @@
 ate%7D
+       
  $state 
 Angu
@@ -288,16 +288,19 @@
  $state 
+   
 Angular 
@@ -340,16 +340,20 @@
 ice%7D
+    
  shUser 
 Auth
@@ -348,16 +348,19 @@
  shUser 
+   
 Authenti
@@ -375,16 +375,82 @@
 ervice.%0A
+ * @param %7B!shapy.browser.Service%7D shBrowser The browser service.%0A
  */%0Ashap
@@ -492,16 +492,27 @@
 , shUser
+, shBrowser
 ) %7B%0A  /*
@@ -674,16 +674,97 @@
 shUser;%0A
+  /** @private %7B!shapy.browser.Service%7D @const */%0A  this.shBrowser_ = shBrowser;%0A
   /** @p
@@ -984,16 +984,53 @@
 ion() %7B%0A
+    this.shBrowser_.clearAllCache();%0A
     this

Clean cache on login, fixes blocked assets page bug