|
@@ -64,6 +64,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
+
|
|
|
+ <ul class="navbar-nav ml-2 ml-2">
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link px-2" href="/api/session/logOut" target="_top" role="button" logout>
|
|
|
+ <i class="fas fa-sign-out-alt"></i>
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
</nav>
|
|
|
<!-- /.navbar -->
|
|
|
|
|
@@ -176,7 +184,7 @@
|
|
|
$('#reload-icon').removeClass('loading-rotate');
|
|
|
});
|
|
|
}
|
|
|
- $(document).on('click', 'a:not([href="#"]):not([up-modal]):not([up-close])', function() {
|
|
|
+ $(document).on('click', 'a:not([href="#"]):not([up-modal]):not([up-close]):not([no-ajax]):not([logout])', function() {
|
|
|
$('#reload-icon').addClass('loading-rotate');
|
|
|
var target = this.href;
|
|
|
if(target.indexOf('//') !== -1) {
|
|
@@ -197,6 +205,11 @@
|
|
|
});
|
|
|
return false;
|
|
|
});
|
|
|
+ $(document).on('click', '[logout]', function() {
|
|
|
+ $.get('/api/session/logOut', function(_data) {
|
|
|
+ window.top.location = '/';
|
|
|
+ });
|
|
|
+ });
|
|
|
window.top.addEventListener('popstate', function(event) {
|
|
|
if(!!event.state) {
|
|
|
gotoTarget(event.state, false);
|