From 26709c1cd29b40ac2e617a075a085e18da35e87c Mon Sep 17 00:00:00 2001 From: Loic Baron Date: Fri, 17 Apr 2015 17:07:47 +0200 Subject: [PATCH 1/1] myslice.js - myslice.get_user() different from myslice.user = {} --- portal/static/js/myslice.js | 5 ++--- portal/templates/base.html | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/portal/static/js/myslice.js b/portal/static/js/myslice.js index 548d5dab..80b4d170 100644 --- a/portal/static/js/myslice.js +++ b/portal/static/js/myslice.js @@ -107,7 +107,7 @@ user.prototype.list = function() { var myslice = { user: {}, - user: function() { + get_user: function() { if ($.isEmptyObject(this.user)) { //this.login(function() { return this.user; }); if(localStorage.getItem('user')!='undefined'){ @@ -120,7 +120,7 @@ var myslice = { }, projects: {}, - projects: function() { + get_projects: function() { if ($.isEmptyObject(this.projects)) { //this.login(function() { return this.user; }); if(localStorage.getItem('projects')!='undefined'){ @@ -208,7 +208,6 @@ var myslice = { fn(); } } - }, diff --git a/portal/templates/base.html b/portal/templates/base.html index 27c17ea7..c83c2bdc 100644 --- a/portal/templates/base.html +++ b/portal/templates/base.html @@ -66,7 +66,7 @@ This list of slices should go into SESSION ! $(document).ready(function() { {% if username %} myslice.login(function(){ - user = myslice.user(); + user = myslice.get_user(); var slices = []; if($.isEmptyObject(user)){ @@ -79,7 +79,7 @@ $(document).ready(function() { //drawSlices(slices); } {% if theme == "fed4fire" %} - p = myslice.projects(); + p = myslice.get_projects(); if(p != null){ //drawProjects(p); drawProjectsTree(p,slices); -- 2.43.0