]> jfr.im git - z_archive/KronOS.git/blobdiff - public/js/application.js
Updating to work when not based at http://server/
[z_archive/KronOS.git] / public / js / application.js
index fc4fd4cc476beb9f7b167422a4b91ce472791761..092fc6e8006dcb5912d4e8c006c8e1c7820ddc34 100644 (file)
@@ -9,7 +9,7 @@
 
                this.loadDefaults = function() {
                        var self = this;
-//                     $.getJSON("/backend/logged_in", function(resp) {
+//                     $.getJSON("backend/logged_in", function(resp) {
 //                             if (!resp.contents) {
                                        self.hideMenu();
                                        self.hideBackground();
@@ -48,7 +48,7 @@
                };
 
                this.loadMenuItems = function() {
-                       $.getJSON("/backend/get_menu", function(resp) {
+                       $.getJSON("backend/get_menu", function(resp) {
                                if (resp.success) {
                                        navStr = '<ul class="nav">';
                                        $.each(resp.contents, function(key, val) {
@@ -82,7 +82,7 @@
 
                this.loadLogin = function() {
                        $.ajax({
-                               url: "/backend/login_modal",
+                               url: "backend/login_modal",
                                success: function (data) {
                                        $('body').append(data);
                                        $('#loginModal').modal({
                                'password': $('#inputPassword').val()
                        };
                        self = this;
-                       $.post('/account/login', loginData, function(resp) {
+                       $.post('account/login', loginData, function(resp) {
                                if (resp.success) {
                                        document.cookie = "session_id="+resp.data.sid+";expires=0";
                                        self.setUsername(resp.data.name);
                }
 
                this.openApp = function(appid) {
-                       $.getJSON("/control/open/"+appid, function(resp) {
+                       $.getJSON("control/open/"+appid, function(resp) {
                                if (resp.success) {
                                        var repl = resp.contents
                                        var target = 'div#'+repl.name+repl.id;