[Rt-commit] r14786 - in rt/3.8/branches/3.8.1-releng: . share/html/Elements
falcone at bestpractical.com
falcone at bestpractical.com
Tue Aug 5 12:54:32 EDT 2008
Author: falcone
Date: Tue Aug 5 12:54:32 2008
New Revision: 14786
Modified:
rt/3.8/branches/3.8.1-releng/ (props changed)
rt/3.8/branches/3.8.1-releng/share/html/Elements/HeaderJavascript
rt/3.8/branches/3.8.1-releng/share/html/NoAuth/js/util.js
Log:
- Merge //mirror/bps-public/rt/3.8/trunk to //mirror/bps-public/rt/3.8/branches/3.8.1-releng
Modified: rt/3.8/branches/3.8.1-releng/share/html/Elements/HeaderJavascript
==============================================================================
--- rt/3.8/branches/3.8.1-releng/share/html/Elements/HeaderJavascript (original)
+++ rt/3.8/branches/3.8.1-releng/share/html/Elements/HeaderJavascript Tue Aug 5 12:54:32 2008
@@ -58,9 +58,9 @@
<script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/RichText/fckeditor.js"></script>
% }
<script type="text/javascript"><!--
- onLoadHook("loadTitleBoxStates()");
+ doOnLoad(loadTitleBoxStates);
% if ( $focus ) {
- onLoadHook("focusElementById('<% $focus %>')");
+ doOnLoad(function () { focusElementById('<% $focus %>') });
% }
% if ( RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'})) {
@@ -110,9 +110,9 @@
}
}
}
- onLoadHook("ReplaceAllTextareas()");
+ doOnLoad(ReplaceAllTextareas);
% }
% if ( $onload ) {
- onLoadHook("<% $onload |n %>");
+ doOnLoad(<% $onload |n %>);
% }
--></script>
Modified: rt/3.8/branches/3.8.1-releng/share/html/NoAuth/js/util.js
==============================================================================
--- rt/3.8/branches/3.8.1-releng/share/html/NoAuth/js/util.js (original)
+++ rt/3.8/branches/3.8.1-releng/share/html/NoAuth/js/util.js Tue Aug 5 12:54:32 2008
@@ -143,6 +143,9 @@
/* onload handlers */
+/* New code should be using doOnLoad which makes use of prototype
+ instead. See HeaderJavascript. It works better than clobbering
+ window.onload. Left around in case other code is using them */
var onLoadStack = new Array();
var onLoadLastStack = new Array();
@@ -180,6 +183,12 @@
window.onload = doOnLoadHooks;
+/* new onLoad code */
+
+function doOnLoad(handler) {
+ Event.observe(window, 'load', handler);
+}
+
/* calendar functions */
function openCalWindow(field) {
More information about the Rt-commit
mailing list