jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brus...@apache.org
Subject svn commit: r646795 - in /incubator/jspwiki/trunk: ChangeLog src/com/ecyrd/jspwiki/Release.java src/webdocs/scripts/jspwiki-common.js src/webdocs/scripts/jspwiki-edit.js src/webdocs/templates/default/jspwiki.css
Date Thu, 10 Apr 2008 13:32:39 GMT
Author: brushed
Date: Thu Apr 10 06:32:23 2008
New Revision: 646795

URL: http://svn.apache.org/viewvc?rev=646795&view=rev
Log:
2.7.0-svn-10: [JSPWIKI-235] Javscript bugfixes for IE (Section Edit, sliding Favorites menu)


Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
    incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-common.js
    incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-edit.js
    incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=646795&r1=646794&r2=646795&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Thu Apr 10 06:32:23 2008
@@ -1,3 +1,12 @@
+2007-04-10  Dirk Frederickx <dirk.frederickx@gmail.com>
+
+        * 2.7.0-svn-10 - Javascript fixes for IE
+        
+        * [JSPWIKI-235] Bugfixes for Section edit handling in IE
+        
+        * Bugfixes for hide/show Favorites menu on mouse-click/hover.
+        
+
 2007-04-09  Dirk Frederickx <dirk.frederickx@gmail.com>
 
         * 2.7.0-svn-9

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java?rev=646795&r1=646794&r2=646795&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java Thu Apr 10 06:32:23 2008
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "9";
+    public static final String     BUILD         = "10";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-common.js
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-common.js?rev=646795&r1=646794&r2=646795&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-common.js (original)
+++ incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-common.js Thu Apr 10 06:32:23 2008
@@ -214,7 +214,7 @@
 var Wiki = {
 
 	onPageLoad: function(){
-
+		if(this.prefs) return; //already initialised
 		var meta = ['wikiPageName','wikiJsonUrl','wikiPageUrl','wikiEditUrl','wikiBaseUrl','wikiUserName','wikiTemplateUrl']
 		$$('meta').each(function(el){
 			var n = el.getProperty('name');
@@ -407,17 +407,19 @@
 					toggleFavs();					
 				},
 				'mouseenter': function(e){
+					e = new Event(e);
 					this.addClass('hover');
 					var ppx = toggler.getPosition().x+"px";
-					pointer.setStyles({ left: ppx, top: e.client.y+"px" }).show();
+					pointer.setStyles({ left: ppx, top: e.page.y+"px" }).show();
 					if( body.hasClass('fav-slide') ){
 						favsWrapper.inject(toggler).show();
 						favsFx.start(favsShow);
 					}
 				},
 				'mousemove': function(e){
+					e = new Event(e);
 					var ppx = toggler.getPosition().x+"px";
-					pointer.setStyles({	left: ppx, top: e.client.y+"px" });
+					pointer.setStyles({	left: ppx, top: e.page.y+"px" });
 				},
 				'mouseleave': function(){
 					this.removeClass('hover');

Modified: incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-edit.js
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-edit.js?rev=646795&r1=646794&r2=646795&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-edit.js (original)
+++ incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-edit.js Thu Apr 10 06:32:23 2008
@@ -37,6 +37,7 @@
 {
 	onPageLoad: function(){
 
+		Wiki.onPageLoad(); //should be run first, nog guaranteed on ie
 		this.textarea = $('editorarea'); 
 		if(!this.textarea || !this.textarea.visible) return;
 
@@ -373,7 +374,7 @@
 			
 		var	suggestID = 'findSuggestionMenu', fav = $('favorites'),
 			suggest = $(suggestID) || new Element('div',{
-				'id':suggestID, 
+				'id':suggestID 
 			}).injectTop(fav);
 
 		/* find a partial jspwiki-link 'searchword' */
@@ -444,16 +445,16 @@
 	 */  
 	 onSelectorLoad : function(){
 		var mainarea = this.mainarea.value,
-			excursor = this.selector.cursor || 0; //remember previous cursor
-		var DELIM = "\u00a4",
+			excursor = this.selector.cursor || 0, //remember previous cursor
+			DELIM = "\u00a4";
 		 
 		/* mask all headers inside a {{{ ... }}} but keep length unchanged! */
 		mainarea = mainarea.replace(/\{\{\{([\s\S]*?)\}\}\}/g, function(match){
-			return match.replace( /^!/mg, DELIM );
+			return match.replace( /^!/mg, ' ' );
 		});
 
-		var tt = mainarea.split( /^(!{1,3}.*?)/m);
-
+		var tt = mainarea.replace( /^([!]{1,3})/mg, DELIM+"$1"+DELIM ).split(DELIM);
+		
 		this.newSelector();
 		this.textarea.sop = (tt.length>1) && (tt[0] != ''); //start of page section
has no !!!header 
 		if(this.textarea.sop) this.addSelector("edit.startOfPage".localize(), 0, 0);
@@ -469,10 +470,8 @@
 			this.addSelector(title, pos, indent);
 			pos += hlen + ttlen[i+1];
 		}
-		//alert(this.selector.offsets);
-		//this.selector.cursor = (oldindex < cursor) ? oldindex, ; 
-		//if( oldIndex < cursor ) this.selector.options[oldIndex].selected = true;
 	},
+
 	setSelector: function( newcursor ){
 		var els = this.selector.getChildren();
 		
@@ -484,7 +483,7 @@
 	newSelector: function(){
 		this.selector.empty();
 		this.selector.offsets = [];
-		this.addSelector("edit.allsections".localize(),-1);
+		this.addSelector("edit.allsections".localize(),-1,0);
 	},
 	addSelector: function(text,offset,indent){
 		text = text.replace(/~([^~])/g, '$1'); /*remove wiki-markup escape char ~ */

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css?rev=646795&r1=646794&r2=646795&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css Thu Apr 10 06:32:23
2008
@@ -124,7 +124,7 @@
 	margin:0;
 	padding:0;
 	border:0;
-	outline:0;
+	outline:none;
 	vertical-align:baseline;
 }
 /* remember to define focus styles! */



Mime
View raw message