[pLog-svn] r1212 - plog/trunk/js/editor

mark at devel.plogworld.net mark at devel.plogworld.net
Sat Feb 26 14:13:57 GMT 2005


Author: mark
Date: 2005-02-26 14:13:56 +0000 (Sat, 26 Feb 2005)
New Revision: 1212

Modified:
   plog/trunk/js/editor/plogeditor.js
Log:
Fix button toggole error in edButton, edButtonLink and edButtonImage.

Modified: plog/trunk/js/editor/plogeditor.js
===================================================================
--- plog/trunk/js/editor/plogeditor.js	2005-02-25 18:00:09 UTC (rev 1211)
+++ plog/trunk/js/editor/plogeditor.js	2005-02-26 14:13:56 UTC (rev 1212)
@@ -171,7 +171,9 @@
 		}
 		
 		// change the look of the button
-		this.toggle();
+		if( this.open != -1 ) {
+		    this.toggle();
+		}
 
 		// return the text to be added
 		return text;
@@ -260,12 +262,12 @@
 			this.toggle();
 			return '';
 		}
-		
+
+		this.toggle();		
+
 		// if everything went fine, add the link and return
 		var linkTag = '<a href="' + linkDest + '">' + linkDest + '</a>'; 
 		return linkTag;
-		
-		this.toggle();
 	}
 	
 	/**
@@ -372,11 +374,11 @@
 			return '';
 		}
 		
+		this.toggle();
+
 		// if everything went fine, add the link and return
 		var imgTag = '<img src="' + imgSrc + '" alt="' + imgAlt + '" />';
 		return imgTag;
-		
-		this.toggle();
 	}
 }
 




More information about the pLog-svn mailing list