[Jifty-commit] r1309 - in jifty/trunk: share/web/static/js share/web/templates/_elements

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Jun 16 21:45:11 EDT 2006


Author: trs
Date: Fri Jun 16 21:45:10 2006
New Revision: 1309

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/share/web/static/js/jifty.js
   jifty/trunk/share/web/templates/_elements/javascript

Log:
 r12939 at zot:  tom | 2006-06-16 21:44:20 -0400
 * Fix the notifications reporting "undefined" in Safari
 * Modify the javascript component to allow the caller to append its own libs


Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js	(original)
+++ jifty/trunk/share/web/static/js/jifty.js	Fri Jun 16 21:45:10 2006
@@ -738,7 +738,12 @@
     var moniker = arguments[0];
     var result = arguments[1];
     var status = result.nodeName;
-    var text = result.textContent;
+
+    /* This is a workaround for Safari, which does not support textContent */
+    var text = result.textContent
+                    ? result.textContent
+                    : result.firstChild.nodeValue;
+                    
     if(status != 'message' && status != 'error') return;
 
     var node = document.createElement('div');

Modified: jifty/trunk/share/web/templates/_elements/javascript
==============================================================================
--- jifty/trunk/share/web/templates/_elements/javascript	(original)
+++ jifty/trunk/share/web/templates/_elements/javascript	Fri Jun 16 21:45:10 2006
@@ -1,3 +1,6 @@
+<%args>
+$include => undef
+</%args>
 <%init>
 # XXX TODO: stick this into libs
 
@@ -13,10 +16,10 @@
   /static/js/scriptaculous/effects.js
   /static/js/scriptaculous/controls.js
   /static/js/jifty.js
+  /static/js/jifty_utils.js
   /static/js/dom-drag.js
   /static/js/halo.js
   /static/js/combobox.js
-  /static/js/jifty_utils.js
   /static/js/key_bindings.js
   /static/js/context_menu.js
   /static/js/bps_util.js
@@ -25,6 +28,10 @@
   /static/js/app_behaviour.js
 );
 
+if (defined $include and @$include) {
+    push @libs, @$include;
+}
+
 </%init>
    <script type="text/javascript" src="/static/js/jsan/JSAN.js"></script>
    <script type="text/javascript">


More information about the Jifty-commit mailing list