X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/05a64b9314fac5f613133332d7d0b5b568ab8afc..25e7ab3df1f48cf819df12c5642df6ccf3c7500e:/src/redakcja/static/js/wiki/wikiapi.js?ds=inline

diff --git a/src/redakcja/static/js/wiki/wikiapi.js b/src/redakcja/static/js/wiki/wikiapi.js
index 2f1bceb5..4e3cd2c6 100644
--- a/src/redakcja/static/js/wiki/wikiapi.js
+++ b/src/redakcja/static/js/wiki/wikiapi.js
@@ -227,30 +227,18 @@
 		});
 	};
 
-	/*
-	 * Set document's text
-	 */
-	WikiDocument.prototype.setText = function(text) {
-		return this.setDocumentProperty('text', text);
-	};
-
-	/*
-	 * Set document's gallery link
-	 */
-	WikiDocument.prototype.setGalleryLink = function(gallery) {
-		return this.setDocumentProperty('galleryLink', gallery);
-	};
+    /*
+     * Set document's text
+     */
+    WikiDocument.prototype.setText = function(text, setter) {
+        if (text == this.text) return;
+        
+        this.text = text;
+        this.has_local_changes = true;
 
-	/*
-	 * Set document's property
-	 */
-	WikiDocument.prototype.setDocumentProperty = function(property, value) {
-		if(this[property] !== value) {
-			this[property] = value;
-			this.has_local_changes = true;
-		}
-	};
+    };
 
+    
 	/*
 	 * Save text back to the server
 	 */