server/src/main/webapp/static/js/corenkan.js
changeset 126 4479369ff9f1
parent 124 c04232f8cc53
parent 112 70c5d6efd68d
child 140 4ed1664b6087
--- a/server/src/main/webapp/static/js/corenkan.js	Wed Apr 03 16:17:36 2013 +0200
+++ b/server/src/main/webapp/static/js/corenkan.js	Tue Mar 26 08:27:58 2013 +0100
@@ -39,6 +39,7 @@
 
 	    	sess.onStatusChange = function(status) {
 	    	    console.log(status);
+	    	    that.onInternalStatusChange(status);
 	    	    if(typeof that.onStatusChange === "function") {
 	    	    	that.onStatusChange(status);
 	    	    }
@@ -117,6 +118,17 @@
     	this.project.set(obj, {validate: true});
     };
     
+    proto.onInternalStatusChange = function(status) {
+    	if(status == "ready") {
+    	    this.renkan.read_only = false;
+    		this.renkan.onStatusChange();
+    	}
+    	else {
+            this.renkan.read_only = true;
+            this.renkan.onStatusChange();                    		
+    	}
+    };
+    
     function prepareValues(obj,c) {
 		values = {};
 		for(var fieldname in c.changes) {