myslice.js - myslice.get_user() different from myslice.user = {}
authorLoic Baron <loic.baron@lip6.fr>
Fri, 17 Apr 2015 15:07:47 +0000 (17:07 +0200)
committerLoic Baron <loic.baron@lip6.fr>
Fri, 17 Apr 2015 15:07:47 +0000 (17:07 +0200)
portal/static/js/myslice.js
portal/templates/base.html

index 548d5da..80b4d17 100644 (file)
@@ -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();
             }
         }
-
        },
 
 
index 27c17ea..c83c2bd 100644 (file)
@@ -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);