From: Conny Sjöblom Date: Thu, 11 Oct 2012 11:57:26 +0000 (+0300) Subject: Made minor changes to the login window X-Git-Url: https://jfr.im/git/z_archive/KronOS.git/commitdiff_plain/90b2985ca9f9fb42f1938d78bfc1a3b07d88466d Made minor changes to the login window --- diff --git a/video/public/js/application.js b/video/public/js/application.js index e952c77..c37e6de 100644 --- a/video/public/js/application.js +++ b/video/public/js/application.js @@ -1,30 +1,42 @@ jQuery.noConflict(); -jQuery(document).ready(function () { +function loadDefaults() { jQuery.getJSON("/backend/logged_in", function(data) { if (!data) { - jQuery.ajax({ - url: "/backend/login_modal", - success: function (data) { jQuery('body').append(data); }, - dataType: 'html' - }).done(function() { - jQuery('#loginModal').modal({ - backdrop: 'static', - keyboard: false - }); - jQuery('#loginModal').modal('show'); - }); + loadLoginModal(); } else { - jQuery.getJSON("/backend/get_menu", function(data) { - var menuitems = [] - jQuery.each(data, function(key, val) { - menuitems.push('
  • ' + key + '
  • '); - }); - jQuery('