[Jifty-commit] r933 - in jifty/branches/jifty-jsan: lib/Jifty/Model
lib/Jifty/Web/Form share/web/static/js
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Apr 26 18:21:56 EDT 2006
Author: trs
Date: Wed Apr 26 18:21:53 2006
New Revision: 933
Added:
jifty/branches/jifty-jsan/lib/Jifty/Model/Session.pm
Modified:
jifty/branches/jifty-jsan/ (props changed)
jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Field.pm
jifty/branches/jifty-jsan/share/web/static/js/behaviour.js
jifty/branches/jifty-jsan/share/web/static/js/jifty.js
Log:
r10037 at zot (orig r927): jesse | 2006-04-25 16:52:43 -0400
r11872 at hualien: jesse | 2006-04-25 16:49:57 -0400
Stub!
r10042 at zot (orig r932): alexmv | 2006-04-26 16:26:54 -0400
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.
Added: jifty/branches/jifty-jsan/lib/Jifty/Model/Session.pm
==============================================================================
--- (empty file)
+++ jifty/branches/jifty-jsan/lib/Jifty/Model/Session.pm Wed Apr 26 18:21:53 2006
@@ -0,0 +1,51 @@
+use warnings;
+use strict;
+
+=head1 NAME
+
+Jifty::Model::Session - Tracks in-db session version
+
+=head1 SYNOPSIS
+
+ my $app = Jifty->new(config_file => "$ProjectRoot/etc/config.yml");
+ my $session = Jifty::Model::Session->new;
+ my $db_version = $session->in_db;
+
+=head1 DESCRIPTION
+
+Every Jifty application automatically inherits this table, which
+describes what version of the session is in the database currently.
+This allows Jifty to smartly upgrade between session versions.
+
+=cut
+
+package Jifty::Model::Session::Session;
+use Jifty::DBI::Session;
+
+
+column session_id => type is 'varchar(32)';
+column key => type is 'text';
+column value => type is 'text';
+column created => type is 'date';
+column updated => type is 'date';
+column key_type => type is varchar('32');
+
+package Jifty::Model::Session;
+use version;
+
+use base qw( Jifty::Record );
+
+=head2 table
+
+Sessions are stored in the table C<_jifty_sessions>.
+
+=cut
+
+sub table { '_jifty_sessions' }
+
+sub _init { } # we really don't need a current_user for this
+
+
+sub
+
+1;
Modified: jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Field.pm (original)
+++ jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Field.pm Wed Apr 26 18:21:53 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/branches/jifty-jsan/share/web/static/js/behaviour.js
==============================================================================
Modified: jifty/branches/jifty-jsan/share/web/static/js/jifty.js
==============================================================================
--- jifty/branches/jifty-jsan/share/web/static/js/jifty.js (original)
+++ jifty/branches/jifty-jsan/share/web/static/js/jifty.js Wed Apr 26 18:21:53 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