[isidorus-cvs] r87 - trunk/src/ajax/javascripts

Lukas Giessmann lgiessmann at common-lisp.net
Sat Jul 4 15:11:50 UTC 2009


Author: lgiessmann
Date: Sat Jul  4 11:11:44 2009
New Revision: 87

Log:
ajax-client: fixed a known problem by committing edited fragments - so there won't be requested a topicStub for current fragment's "main"-topic

Modified:
   trunk/src/ajax/javascripts/create.js

Modified: trunk/src/ajax/javascripts/create.js
==============================================================================
--- trunk/src/ajax/javascripts/create.js	(original)
+++ trunk/src/ajax/javascripts/create.js	Sat Jul  4 11:11:44 2009
@@ -137,7 +137,17 @@
 	else tPsis = tPsis.toJSON()
 	var referencedTopics = topic.getReferencedTopics();
 	if(associations){
-	    referencedTopics = referencedTopics.concat(associations.getReferencedTopics()).without(CURRENT_TOPIC).uniq();
+	    var ePsis = null;
+	    if(contents && contents.topic && contents.topic.subjectIdentifiers && contents.topic.subjectIdentifiers.length !== 0){
+		ePsis = contents.topic.subjectIdentifiers;
+	    }
+
+	    var aStubs = associations.getReferencedTopics();
+	    if(aStubs && aStubs.length !== 0){
+		aStubs = aStubs.without(CURRENT_TOPIC).uniq();
+		for(var i = 0; i !== ePsis.length; ++i) aStubs = aStubs.without(ePsis[i]);
+	    }
+	    referencedTopics = referencedTopics.concat(aStubs);
 	}
 	function onSuccessHandler(topicStubs){
 	    var tsStr = "null";




More information about the Isidorus-cvs mailing list