Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki-CVS

SVN: [24565] trunk/phase3

 

 

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded


robchurch at svn

Aug 3, 2007, 10:40 AM

Post #1 of 1 (57 views)
Permalink
SVN: [24565] trunk/phase3

Revision: 24565
Author: robchurch
Date: 2007-08-03 17:40:21 +0000 (Fri, 03 Aug 2007)

Log Message:
-----------
(bug 9437) Don't overwrite edit form submission handler when setting up edit box scroll position preserve/restore behaviour

Modified Paths:
--------------
trunk/phase3/RELEASE-NOTES
trunk/phase3/includes/DefaultSettings.php
trunk/phase3/skins/common/wikibits.js

Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES 2007-08-03 12:08:50 UTC (rev 24564)
+++ trunk/phase3/RELEASE-NOTES 2007-08-03 17:40:21 UTC (rev 24565)
@@ -348,8 +348,9 @@
cases.
* Fix RTL display of the upload form.
* Fixed regression in blocking of username '0'
+* (bug 9437) Don't overwrite edit form submission handler when setting up
+ edit box scroll position preserve/restore behaviour

-
== API changes since 1.10 ==

Full API documentation is available at http://www.mediawiki.org/wiki/API

Modified: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php 2007-08-03 12:08:50 UTC (rev 24564)
+++ trunk/phase3/includes/DefaultSettings.php 2007-08-03 17:40:21 UTC (rev 24565)
@@ -1195,7 +1195,7 @@
* to ensure that client-side caches don't keep obsolete copies of global
* styles.
*/
-$wgStyleVersion = '95';
+$wgStyleVersion = '96';


# Server-side caching:

Modified: trunk/phase3/skins/common/wikibits.js
===================================================================
--- trunk/phase3/skins/common/wikibits.js 2007-08-03 12:08:50 UTC (rev 24564)
+++ trunk/phase3/skins/common/wikibits.js 2007-08-03 17:40:21 UTC (rev 24565)
@@ -778,21 +778,24 @@
document.getElementById(idb).checked=false;
}

+/**
+ * Restore the edit box scroll state following a preview operation,
+ * and set up a form submission handler to remember this state
+ */
function scrollEditBox() {
- var editBoxEl = document.getElementById("wpTextbox1");
- var scrollTopEl = document.getElementById("wpScrolltop");
- var editFormEl = document.getElementById("editform");
-
- if (editBoxEl && scrollTopEl) {
- if (scrollTopEl.value) { editBoxEl.scrollTop = scrollTopEl.value; }
- editFormEl.onsubmit = function() {
- document.getElementById("wpScrolltop").value = document.getElementById("wpTextbox1").scrollTop;
- };
+ var editBox = document.getElementById( 'wpTextbox1' );
+ var scrollTop = document.getElementById( 'wpScrolltop' );
+ var editForm = document.getElementById( 'editform' );
+ if( editBox && scrollTop ) {
+ if( scrollTop.value )
+ editBox.scrollTop = scrollTop.value;
+ addHandler( editForm, 'submit', function() {
+ document.getElementById( 'wpScrolltop' ).value = document.getElementById( 'wpTextbox1' ).scrollTop;
+ } );
}
}
+hookEvent( 'load', scrollEditBox );

-hookEvent("load", scrollEditBox);
-
var allmessages_nodelist = false;
var allmessages_modified = false;
var allmessages_timeout = false;



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS[at]lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.