Author: brushed
Date: Sun Aug 24 05:37:54 2008
New Revision: 688501
URL: http://svn.apache.org/viewvc?rev=688501&view=rev
Log:
v2.7.0-alpha-28: [JSPWIKI-355] Section-editing bug fixes.
Modified:
incubator/jspwiki/trunk/ChangeLog
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-edit.js
incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp
Modified: incubator/jspwiki/trunk/ChangeLog
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=688501&r1=688500&r2=688501&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sun Aug 24 05:37:54 2008
@@ -1,3 +1,12 @@
+2008-08-24 Dirk Frederickx <[EMAIL PROTECTED]>
+
+ * 2.7.0-alpha-28
+
+ * [JSPWIKI-355] Fixing section-editing bug reported by Harry.
+
+ * Saving user-preferences was broken in PreferencesTab.jsp
+
+
2008-08-24 Harry Metske <[EMAIL PROTECTED]>
* 2.7.0-alpha-27
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=688501&r1=688500&r2=688501&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java Sun Aug 24
05:37:54 2008
@@ -77,7 +77,7 @@
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "27";
+ public static final String BUILD = "28";
/**
* This is the generic version string you should use
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=688501&r1=688500&r2=688501&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-edit.js (original)
+++ incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-edit.js Sun Aug 24
05:37:54 2008
@@ -176,25 +176,14 @@
this.wikisnippets = WikiSnippets.getSnippets();
this.wikismartpairs = WikiSnippets.getSmartPairs();
- this.textarea = $('editorarea');
+ this.mainarea = this.textarea = $('editorarea');
if(!this.textarea || !this.textarea.visible) return;
- /* section editing is only valid for edit context, not valid in
the comment context */
- if(Wiki.Context=='edit') {
- /* Duplicate the textarea into a main and work area.
- The workarea is used for actual editing.
- The mainarea reflects at all times the whole document
- */
- var m = this.mainarea = this.textarea;
- this.textarea = m.clone()
- .removeProperty('id')
- .removeProperty('name')
- .injectBefore( m.hide() );
-
- //this.ta = new TextArea( this.textarea );
- this.ta = TextArea.initialize( this.textarea );
- this.onPageLoadSectionToc();
- }
+ /* modifies this.textarea */
+ this.onPageLoadSectionToc( );
+
+ //this.ta = new TextArea( this.textarea );
+ //this.ta = TextArea.initialize( this.textarea );
this.onPageLoadResizeTextarea();
this.onPageLoadToolbar();
@@ -494,10 +483,21 @@
}).request();
},
- onPageLoadSectionToc : function(){
+ onPageLoadSectionToc : function( ){
- if(Wiki.prefs.get('SectionEditing') != 'on') return;
+ /* section editing is only valid for edit context, not valid in
the comment context */
+ if( (Wiki.Context!='edit')
+ ||(Wiki.prefs.get('SectionEditing') != 'on') ) return;
+ /* Duplicate the textarea into a main and work area.
+ The workarea is used for actual editing.
+ The mainarea reflects at all times the whole document
+ */
+ this.textarea = this.mainarea.clone()
+ .removeProperty('id')
+ .removeProperty('name')
+ .injectBefore( this.mainarea.hide() );
+
var tt = new Element('div',{'id':'toctoc'}).adopt(
new
Element('label').setHTML('sectionediting.label'.localize()),
this.selector = new Element('ul')
Modified:
incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp?rev=688501&r1=688500&r2=688501&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp
(original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp
Sun Aug 24 05:37:54 2008
@@ -37,7 +37,7 @@
class="wikiform"
id="setCookie"
method="post" accept-charset="<wiki:ContentEncoding />"
- onsubmit="Wiki.savePrefs(); return Wiki.submitOnce(this);" >
+ onsubmit="WikiPreferences.savePrefs(); return Wiki.submitOnce(this);" >
<table>
<tr>