[Jifty-commit] r932 - in jifty/trunk: lib/Jifty/Web/Form share/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Apr 26 16:27:05 EDT 2006


Author: alexmv
Date: Wed Apr 26 16:26:54 2006
New Revision: 932

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Web/Form/Field.pm
   jifty/trunk/share/web/static/js/behaviour.js
   jifty/trunk/share/web/static/js/jifty.js

Log:
 r12633 at zoq-fot-pik:  chmrr | 2006-04-26 16:26:02 -0400
  * Fix class selection regex in behavior
  * Differentiate the automatically-added column name from the rest of
 the classes.  THIS MAY BREAK EXISTING CSS.  However, it's the only way
 to have columns named "date" not get the date popup widget
 automatically.


Modified: jifty/trunk/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Field.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/Form/Field.pm	Wed Apr 26 16:26:54 2006
@@ -316,7 +316,7 @@
 
 sub classes {
     my $self = shift;
-    return join(' ', ($self->class||''), ($self->name||''));
+    return join(' ', ($self->class||''), ($self->name ? "argument-".$self->name : ''));
 }
 
 

Modified: jifty/trunk/share/web/static/js/behaviour.js
==============================================================================
--- jifty/trunk/share/web/static/js/behaviour.js	(original)
+++ jifty/trunk/share/web/static/js/behaviour.js	Wed Apr 26 16:26:54 2006
@@ -161,7 +161,7 @@
       currentContext = new Array;
       var currentContextIndex = 0;
       for (var k = 0; k < found.length; k++) {
-        if (found[k].className && found[k].className.match(new RegExp('\\b'+className+'\\b'))) {
+        if (found[k].className && found[k].className.match(new RegExp('(^|\\s)'+className+'(\\s|$)'))) {
           currentContext[currentContextIndex++] = found[k];
         }
       }

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	Wed Apr 26 16:26:54 2006
@@ -250,7 +250,7 @@
             Form.Element.validate(this);
         } 
     },
-    'input[type="text"].date': function(e) {
+    'input.date': function(e) {
         if ( !Element.hasClassName( e, 'has-calendar-link' ) ) {
             createCalendarLink(e);
             Element.addClassName( e, 'has-calendar-link' );


More information about the Jifty-commit mailing list