Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
[myslice.git] / portal / static / js / myslice.js
index 548d5da..ba3512c 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'){
@@ -186,7 +186,6 @@ var myslice = {
                             // What are the projects under this authority?
                             $.post("/rest/myslice:authority/",{'fields':['authority_hrn'],'filters':{'authority_hrn':'CONTAINS'+auth}}, function( data ) {
                                        $.each(data, function(idx, project) {
-                                    console.log(project.authority_hrn);
                                     if($.inArray(project.authority_hrn,projects) == -1){
                                         projects.push(project.authority_hrn);
                                     }
@@ -208,7 +207,6 @@ var myslice = {
                 fn();
             }
         }
-
        },