From jifty-commit at lists.jifty.org Sun Apr 1 08:41:41 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 1 08:42:30 2007
Subject: [Jifty-commit] r3078 - jifty/trunk/lib/Jifty
Message-ID: <20070401124141.C65664D803F@diesel.bestpractical.com>
Author: dpavlin
Date: Sun Apr 1 08:41:39 2007
New Revision: 3078
Modified:
jifty/trunk/lib/Jifty/JSON.pm
Log:
fix handling of multi-line data when encoded in JSON -- they should never
wrap over multiple lines in generated output
Modified: jifty/trunk/lib/Jifty/JSON.pm
==============================================================================
--- jifty/trunk/lib/Jifty/JSON.pm (original)
+++ jifty/trunk/lib/Jifty/JSON.pm Sun Apr 1 08:41:39 2007
@@ -73,7 +73,13 @@
local $JSON::Syck::SingleQuote = $args->{singlequote};
local $JSON::Syck::ImplicitUnicode = 1;
- JSON::Syck::Dump($obj);
+ my $json = JSON::Syck::Dump($obj);
+ if (! $args->{singlequte}) {
+ $json =~ s/\n\n\n/\\n/gs; # fix syck bug
+ $json =~ s/\n/\\n/gs; # just to be safe
+ $json =~ s/\r/\\r/gs;
+ }
+ return $json;
}
# We should escape double-quotes somehow, so that we can guarantee
@@ -101,7 +107,7 @@
local *JSON::Converter::_stringfy = sub {
my $arg = shift;
$arg =~ s/([\\\n'\r\t\f\b])/$esc{$1}/eg;
- $arg =~ s/([\x00-\x07\x0b\x0e-\x1f])/'\\u00' . unpack('H2',$1)/eg;
+ $arg =~ s/([\x00-\x07\x0b\x0e-\x1f])/'\\u00' . unpack('H2',$1)/egs;
return "'" . $arg ."'";
};
return JSON::objToJson($obj, $args);
From jifty-commit at lists.jifty.org Sun Apr 1 14:32:16 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 1 14:32:21 2007
Subject: [Jifty-commit] r3079 - in
jifty/trunk/plugins/DumpDispatcher/lib/Jifty/Plugin: .
Message-ID: <20070401183216.2E55E4D803F@diesel.bestpractical.com>
Author: dpavlin
Date: Sun Apr 1 14:32:15 2007
New Revision: 3079
Removed:
jifty/trunk/plugins/DumpDispatcher/lib/Jifty/Plugin/DumpDispatcher/
Modified:
jifty/trunk/plugins/DumpDispatcher/lib/Jifty/Plugin/DumpDispatcher.pm
Log:
remove extra skeleton files, configuration example in pod
Modified: jifty/trunk/plugins/DumpDispatcher/lib/Jifty/Plugin/DumpDispatcher.pm
==============================================================================
--- jifty/trunk/plugins/DumpDispatcher/lib/Jifty/Plugin/DumpDispatcher.pm (original)
+++ jifty/trunk/plugins/DumpDispatcher/lib/Jifty/Plugin/DumpDispatcher.pm Sun Apr 1 14:32:15 2007
@@ -4,12 +4,22 @@
package Jifty::Plugin::DumpDispatcher;
use base qw/Jifty::Plugin/;
-# Your plugin goes here. If takes any configuration or arguments, you
-# probably want to override L.
+=head1 NAME
+
+Jifty::Plugin::DumpDispatcher
+
+=head1 DESCRIPTION
+
+When activated in C with:
+
+ Plugins:
+ - DumpDispatcher: {}
+
+it will dump all dispatcher rules in debug log.
=head2 dump_rules
-Dump all defined rules in debug log. It should be called by Jifty, after
+Dump all defined rules in debug log. It is called by Jifty, after
C<< Jifty->dispatcher->import_plugins >> on startup.
=cut
From jifty-commit at lists.jifty.org Mon Apr 2 01:22:09 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 2 01:22:16 2007
Subject: [Jifty-commit] r3080 - in jifty/trunk: .
Message-ID: <20070402052209.A17D54D803F@diesel.bestpractical.com>
Author: trs
Date: Mon Apr 2 01:22:07 2007
New Revision: 3080
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Manual/Cookbook.pod
Log:
r20560@zot: tom | 2007-04-02 01:21:31 -0400
* Make =head2 sections consistently titled
* Add section on using models/actions outside of a Jifty app
Modified: jifty/trunk/lib/Jifty/Manual/Cookbook.pod
==============================================================================
--- jifty/trunk/lib/Jifty/Manual/Cookbook.pod (original)
+++ jifty/trunk/lib/Jifty/Manual/Cookbook.pod Mon Apr 2 01:22:07 2007
@@ -125,7 +125,7 @@
zone appropriately. All dates are stored in UTC in the database, to
ensure consistency.
-=head2 How do I emulate 'created_on' field like Rails ?
+=head2 Emulate 'created_on' field like Rails ?
In Rails, if you have a field named 'created_on', it's automatically
set to the creation time of the record. How can I emulate this
@@ -154,7 +154,7 @@
$attr->{'created_on'} = DateTime->now;
};
-=head2 How do I emulate 'updated_on' ?
+=head2 Emulate 'updated_on' ?
If a lot of column could change, you can override C<_set> method:
@@ -254,7 +254,7 @@
pluralise or pluralises differently.
-=head2 How do I perform ajax canonicalization on a given field ?
+=head2 Perform ajax canonicalization on a given field ?
Asking user to input something in a form is really common in a web
app. For some certain form fields you want them to have a certain
@@ -371,3 +371,20 @@
};
Otherwise, everything should work as expected.
+
+=head2 Reuse Jifty models and actions outside of a Jifty app
+
+ use lib '/path/to/MyApp/lib';
+
+ use Jifty::Everything;
+ BEGIN { Jifty->new; }
+
+ use MyApp::Model::Foo;
+ use MyApp::Action::FrobFoo;
+
+From there you can use the model and action to access your data and run your
+actions like you normally would.
+
+If you've actually installed your app into C<@INC>, you can skip the
+C line.
+
From jifty-commit at lists.jifty.org Tue Apr 3 02:25:59 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 02:26:15 2007
Subject: [Jifty-commit] r3081 - in jifty/trunk: .
Message-ID: <20070403062559.592A14D80CE@diesel.bestpractical.com>
Author: jesse
Date: Tue Apr 3 02:25:58 2007
New Revision: 3081
Added:
jifty/trunk/doc/talks/present-slides
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54413@dhcp207: jesse | 2007-04-03 15:25:32 +0900
* Next slides draft (and the tool to render them)
Added: jifty/trunk/doc/talks/present-slides
==============================================================================
--- (empty file)
+++ jifty/trunk/doc/talks/present-slides Tue Apr 3 02:25:58 2007
@@ -0,0 +1,95 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+use Term::ANSIScreen qw/:color :cursor :screen :keyboard/;
+use Term::ReadKey;
+use Text::Autoformat;
+
+my $file = shift @ARGV;
+my $handle;
+open( $handle, "<$file" ) || die $!;
+
+my $datadata = join( '', <$handle> );
+
+my @slides = split( /^----?\s*$/mi, $datadata );
+my $counter = 0;
+my $slides_played = {};
+ my $title;
+while ( $counter <= $#slides ) {
+ my $mode = 'text';
+ my ( $cols, $rows, undef, undef ) = GetTerminalSize();
+ my $slide = $slides[$counter];
+ my $console = Term::ANSIScreen->new;
+ $console->Cls;
+ $console->Cursor(1,1);
+ if ( $slide =~ s/^!\!\s*?(.*?)$//gm ) {
+ $title = $1;
+ }
+ if ($title) {
+ my $start = int ( ( $cols / 2 ) - ( length($title) / 2 ) );
+ $console->Cursor($start,0);
+ chomp $title;
+ print "$title\n";
+ }
+
+ if ($slide =~ s/#\s*`(.*?)`//m) {
+ #my $cmd = $1;
+ #if(!$slides_played->{$counter} && ($slides_played->{$counter} = fork() )) {
+ #`$cmd>/dev/null 2>/dev/null`;
+ #}
+ }
+ if ( $slide =~ s/#\s*mode.*?perl.*?$//gms ) {
+ $mode = 'perl';
+ }
+ if ( $mode eq 'text' and $slide ) {
+ $slide = autoformat $slide, { left => 1, right => ($cols), all => 1 };
+ }
+ elsif ($mode eq 'perl') {
+ my $tidycols = $cols - 2; # squeeze for display
+ open my $out , ">/tmp/output.$$" || die $!;
+ print $out $slide || die $!;
+ close $out || die $!;
+ $slide = ` cat /tmp/output.$$ | source-highlight -s perl -f esc`;
+ #$slide = ` cat /tmp/output.$$ | perltidy -q -l $tidycols| source-highlight -s perl -f esc`;
+ }
+
+ if ( $slide =~ /(\S+)\s*\n\s*(\S+)/m ) {
+
+ print $slide;
+ } else {
+ chomp $slide;
+ $slide =~ s/(?:\n|\r)//g;
+ my $left = int ( ( $cols / 2 ) - ( length($slide) / 2 ) );
+ if ($left < 0 ){
+ $left = 0;
+ }
+ $console->Cursor(
+ $left,
+ int($rows/2)-1,
+
+);
+ print $slide."\n";
+ }
+
+
+ $console->Cursor( 0, ( $rows - 1 ) );
+ print "$counter/" . $#slides;
+ ReadMode 4;
+ my $key = ReadKey(0);
+ ReadMode 0;
+ if ( $key eq 'q' ) {
+ exit;
+ }
+ if ( $key =~ /^(?: |\n|n)/ ) {
+ $counter++;
+ } elsif ( $key eq 'r' ) {
+ next;
+ } else {
+ $counter--;
+ if ( $counter < 0 ) {
+ $counter = 0;
+ }
+ }
+}
+
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Tue Apr 3 02:25:58 2007
@@ -1,44 +1,88 @@
-* What are Domain Specific Languages
-
-* How did I get here?
-
- - Airplane, then Subway
-
- - All started at OSCON 2005
- - DHH demonstrated Rails migrations
- - Looked very sexy
- - Was very jealous
- - "You can't do this in any other language"
- - Never tell that to a Perl Hacker
-
- - Started sketching Jifty::DBI columns
-
- - Started with searchbuilder
- - It was a big hash
- - It was a big mess
- - It was ugly
-
- - Spent about a month playing with syntaxes.
-
-
+!!Jesse Vincent - Best Practical
+Domain Specific Languages in Perl
---
-
+!!DSLs in Perl
+DSLs are 'little languages' for specific programming tasks
+---
+DSLs are easier to read
+---
+DSLs are more expressive
+---
+DSLs let you optimize your code for coding
+---
+Mostly, I'm going to talk about "Englishy" DSLs
+---
+Not all DSLs are Englishy
+---
+- Excel Macros
+- XML config files
+- XSL-T
+- GraphViz
+---
+...but I've been on an Englishy DSL kick
+---
+DSLs can be implemented in your 'host' language
+---
+(These get called "internal" DSLs)
+---
+DSLs can be implemented outside your 'host' langauge
+---
+(External DSLs)
+---
+Everything I'm going to talk about is Pure Perl (Internal)
+---
+The Ruby community is big on DSLs
+---
+You can make DSLs in Perl, too.
+---
+(but it does take more work in Perl)
+---
+!!How did I get here?
+- Airplane
+- Narita Express
+- Subway
+---
+- All started at OSCON 2005
+- DHH demonstrated Rails migrations
+- Looked very sexy
+- Was very jealous
+- "You can't do this in any other language"
+---
+Never say that to a Perl Hacker
+---
+!!Jifty::DBI::Schema - The design process
+- Started sketching Jifty::DBI columns
+- Started with DBIx::SearchBuilder
+- Columns were defined as a hash
+- Hashes are ugly
+---
+We spent about a month playing with syntax.
+---
+Our first goal was "feels right"
+---
+Our second goal was "we can implement this"
+---
+I'm going to show you some of our design process
+---
+(It's a mix of code and IRC)
+---
+#mode perl
$x = Jifty::DBI::SchemaBuilder->new;
$x->define_blablalb
$x->bla bla
-
-
---
-
+#mode perl
our db_table 'addresses';
-our field name => { has_type 'varchar'; has_default 'frank' };
-
-# (by the way, i'm pretty sure we don't get to do the sub-at-t-end thing
-# either... I tried lots of hacky ways to get it working and failed.)
-
-# yeah, I think we're going to end up having a pseudo-sub that's really a hash behind the scenes
+our field name => {
+ has_type 'varchar';
+ has_default 'frank'
+};
+---
+ (by the way, i'm pretty sure we don't get to do the sub-at-the-end thing either... I tried lots of hacky ways to get it working and failed.)
+ yeah, I think we're going to end up having a pseudo-sub that's really a hash behind the scenes
---
+#mode perl
{
my $s = Jifty::DBI::SG->import_functions;
@@ -47,27 +91,33 @@
field bar;
} # $s.DESTROY gets called and unimports db_table/field/...
---
-
+(This was astonishingly close to what we do today.)
+---
+#mode perl
my $schema = Jifty::DBI::RecordSchema->new;
-$schema->for_class(__PACKAGE__); #just riffing
+$schema->for_class(__PACKAGE__);
-$schema->field name => { has_type 'varchar'; has_default 'Frank'}
+$schema->field name => {
+ has_type 'varchar';
+ has_default 'Frank'
+}
---
+#mode perl
+
BEGIN { @ISA = 'Jifty::DBI::Record' }
use Jifty::DBI::Record; # but this sucks!
use base qw/Jifty::DBI::Record/;
-__PACKAGE__->schema_version (0.0001) # or some other method that
-# does two thing evilly.
+__PACKAGE__->schema_version (0.0001)
+# (or some other method that does two thing evily).
---
+ we could tie @ISA
-# we could tie @ISA
-
-# I'm kidding
+ ...I'm kidding
---
-
+#mode perl
use base 'Jifty::DBI::Record';
Jifty::DBI::Record->___from_code();
@@ -75,59 +125,67 @@
field {
called 'name'; # ?
----
- # but yeah, falls into the "works" category"
- # and
- has_type 'string'
- # is definitely better than
- type => 'string'
- # in your book?
----
- # how would you do:
-
- refers_to_many RT::Tickets by 'owner';
+}
+---
+ is
+
+ "has_type 'string'"
+
+definitely better than
+
+ "type => 'string'"
+
+in your book?
---
-
- # hmm. i thought about this before. we can do like simon and
- refers_to_many "RT::Tickets by owner";
- # but I don't really like that. parsing is lame.
+ how would you do:
+
+ refers_to_many RT::Tickets by 'owner';
+
+ hmm. i thought about this before. we can do like simon and
+
+ refers_to_many "RT::Tickets by owner";
+
+ but I don't really like that. parsing is lame.
+
+ I'm *pretty* sure that we can't get the line you've written to compile.
---
- # I'm *pretty* sure that we can't get the line you've written to compile.
+ I've got a bad perl5 idea for you. Robert claims it's impossible
+
+ I'm trying to make the syntax "refers_to_many 'BTDT::Model::Tasks' by 'owner';" valid perl5 syntax.
---
- # oh no, autrijus gave me the one line I needed.
-
- # don't forget that RT::Tickets is a class/package.
-
- # shit! it actually works!!!
+ well, that may be true but you don't want that.
+
+ refers_to_many BTDT::Model::Tasks by 'owner'
+
+ is more readable and easily implemented.
+
+ sub by ($) { by => @_ }
+
+ done!
+
+ stop thinking classes as strings :)
---
-
- # the idea is that it just returns a key, val pair. so it doesn't matter.
-
- # well, right, but refers_to_many is being called in RT::Tickets
- # instead of in the current package. but that's ok.
----
- 23:46 I've got a bad perl5 idea for you. Robert claims it's impossible
-23:47 I'm trying to make the syntax "refers_to_many 'BTDT::Model::Tasks' by 'owner';" valid perl5 syntax.
----
-03:57 well, that may be true but you don't want that.
-03:57 refers_to_many BTDT::Model::Tasks by 'owner'
-03:57 is more readable and easily implemented.
-03:58 sub by ($) { by => @_ }
-03:58 done!
-03:58 stop thinking classes as strings :)
+ shit! it actually works!
---
- # so, now we're just still on the
+
+What we had left:
- field foo => sub {}; issue
- # let's see what the hash syntax looks like with my weird keys.
-
+the field foo => sub {}; issue
---
+#mode perl
+
+ # We wanted something that acted like this
+ # But without the ugly 'sub' keyword
field email => sub {
has_type 'varchar';
has_default 'Frank';
};
+---
+#mode perl
+# We cculd do this, but it used a hash
+# not a block
field phone => {
has_type 'varchar';
@@ -137,6 +195,10 @@
refers_to_a Sample::Employee;
}
---
+#mode perl
+
+# This is ugly and verbose
+
package Sample::Employee;
use base qw/Jifty::DBI::Record/;
@@ -147,61 +209,418 @@
__PACKAGE__->field dexterity => { has_type 'integer'};
-1;
---
-
- - Do we have notes from these?
+!!In the end...
+We ended up with Jifty::DBI columns
+---
+#mode perl
+use Jifty::DBI::Record schema {
+column
+ auth_token => type is 'text',
+ render as 'Unrendered';
+
+column score => type is 'int',
+ is immutable,
+ default is '0',
+ label is 'Score',
+ since is '0.0.7';
+
+column time_zone =>
+ label is 'Time zone',
+ since '0.0.12',
+ default is 'America/New_York',
+ valid are formatted_timezones();
+};
+---
+Implemented it twice
+---
+!!
+Take 1
+---
+!!Take 1:
+Jifty::DBI::Schema
+---
+Our first DSL in Perl
+---
+We beat the parser into submission using:
+- Clever function prototypes
+- Injection of functions
+---
+#mode perl
+score => type is 'int',
+ is immutable,
+ default is '0',
+ render as 'text',
+ label is 'Score',
+ since is '0.0.7';
+---
+Prototype hacking
+---
+#mode perl
+sub is ($) { return shift };
+sub as ($) { return shift };
+sub since ($) { }
+sub type ($) { }
+sub render ($) {}
+sub label ($) {}
+sub default ($) {}
+---
+#mode perl
+score => type is 'int',
+ is immutable,
+ default is '0',
+ render as 'text',
+ label is 'Score',
+ since is '0.0.7';
- - Ended up with Jifty::DBI columns
+# parses to:
+ type(is('int')), is('immutable'), default(is('0')), render(as('text')), label(is('Score')), since(is('0.0.7'));
+---
+TODO: function injection
+---
+!!Take 2:
+Object::Declare
+---
+#`mpg123 ~/katamari.mp3`
+Katamari for Code
+---
+#mode perl
+use Jifty::DBI::Record schema {
-* Object::Declare
- - Sample usage
- - Explanation of the sample usage's meaning
- - Comparison with traditional code
- - Why we like it
- - Tricks we use to make it go
- - Katamari Damacy Video
- - Localized symbols
- - copula
-
- - Explanation of how it works
-* Template::Declare
- - Sample usage
- - Explanation of the sample usage's meaning
- - Comparison with traditional code
- - Why we like it
- - perlish
- - refactorable
- - templates with class (inheritance)
- - readable
- - can balance parens
- - if it doesn't have matched tags, it doesn't compile
+ column score => type is 'int',
+ is immutable,
+ render as 'text',
+ default is '0',
+ label is 'Score',
+ since is '0.0.7';
+};
- - Tricks we use to make it go
-
- - Our own method dispatch and inheritance tree
- - $self hacking
- - throwing insane things into the symbol table
- - generating "tags" that take closures
- - buffers
- - Explanation of how it works
+# parses as:
+
+'is'->type('int',
+ 'immutable'->is,
+ 'is'->default('0',
+ 'as'->render('text',
+ 'is'->label('Score',
+ 'is'->since('0.0.7')))));
+---
+What actually happens at compile time:
+
+- The 'schema' function in our baseclass takes a code block
+- ...and returns a closure
+- Jifty::DBI::Record::import takes over:
+- it takes the closure
+- it installs some methods...
+- ...is::AUTOLOAD and UNIVERSAL::is and as::AUTOLOAD
+- it runs the closure
+- it removes its magic symbols
+
+---
+Template::Declare
+---
+!!Template::Declare
+Sample usage
+---
+#mode perl
+template '/pages/mypage.html' => sub {
+ html {
+ head {};
+ body {
+ h1 {'Hey, this is text'};
+ }
+ }
+};
+---
+But!
+Content! Templates!
+Design! Code!
+---
+OMGWTF!? THAT'S WRONG!
+---
+The person who told you it's wrong was lying to you.
+---
+We're perl hackers
+---
+Why are we putting a minilanguage in our templates?
+---
+This is not 1997
+---
+It's 2007.
+---
+People use CSS for design now.
+---
+Programmers still have to make templates
+---
+Templates run like CODE
+---
+Because they ARE code
+---
+Let's use our PROGRAMMING tools to work with them.
+---
+#mode perl
+!!Refactoring
+
+template 'mypage.html' => page {
+ h1 { 'Two choices' };
+ div { attr { class => 'item' };
+ h2 { 'Item 1'};
+ };
+ div { attr { class => 'item' };
+ h2 { 'Item 2'};
+ };
+};
+---
+!!Refactoring
+#mode perl
+
+template 'mypage.html' => page {
+ h1 { 'Two choices' };
+ for ("Item 1", "Item 2") { item($_); }
+};
+
+sub item {
+ my $content = shift;
+ return
+ div { attr { class => 'item' };
+ h2 {$content};
+ };
+
+}
+---
+We can refactor templates!
+---
+Have you ever tried to refactor HTML?
+---
+Our HTML is magically valid.
+(Syntax errors are...Syntax Errors)
+---
+Inheritance
+---
+Mixins
+---
+Tricks we use
+---
+!!Stashing our templates
+#mode perl
+template '/foo/index.html' => sub {... };
+---
+'sub template' takes a name and a coderef.
+---
+But where do we put these?
+---
+We need a global stash.
+---
+It needs to be per package
+(Don't want to mix things together)
+---
+Basically, we need a symbol table.
+---
+It's Perl.
+---
+We have THE symbol table.
+---
+But you can have characters in URLS you can't have in sub names. Oh no!
+---
+Actually, Perl doesn't care.
+---
+#mode perl
+ no strict 'refs';
+ *{ $class . '::' . $subname } = $coderef;}
+---
+That just works.
+---
+Even if your subroutine is named './\\foo!!<>'
+---
+But how do you call it?
+---
+# perldoc UNIVERSAL
+
+CLASS->can( METHOD )
+"can" checks if the object or class has a method called "METHOD".
+If it does then a reference to the sub is returned.
+---
+!!Closures
+Now, about that syntax.
+---
+HTML tags take blocks
+of content.
+---
+Our tag methods take
+blocks. (Of perl)
+---
+#mode perl
+sub h1 (&;$) {
+ my $code = shift;
+
+ ...
+
+ if (defined wantarray) {
+ return $closure_around_$code;
+ } else {
+ # Actually do our work and run $code
+ }
+}
+---
+!!Not everything is roses
+(Here's where it all goes wrong)
+---
+HTML Attributes
+---
+# mode perl
+# What we've got:
+
+div {
+ attr { id => 'my-div'};
+ ...
+};
+
+# and
+
+with ( id => 'my-div'), div {
+...
+};
+---
+# mode perl
+# What I think I'd like:
+div ( id => 'my-div' ), {
+...
+}
+---
+So, what's the big problem?
+---
+Just change the prototype.
+---
+In Perl, the (&) in a prototype
+may ONLY come first.
+---
+ORZ
+---
+Not covering:
+
+- Our own method dispatch and inheritance tree
+- $self hacking
+- buffers
-* Test::WWW::Declare
- - Sample usage
+---
+Test::WWW::Declare
+---
+!!Test::WWW::Declare
+Web test scripts are UGLY
+---
+- Simple, declarative web testing
+- Easy to read
+- Easy to write
+- Looks more like what users do
+---
+#mode perl
+my $server=Jifty::Test->make_server;
+isa_ok($server, 'Jifty::Server');
+my $URL = $server->started_ok;
+my $mech = Jifty::Test::WWW::Mechanize->new;
+$mech->get_html_ok($URL);
+like($mech->uri, qr{splash}, 'Redirected to splash page');
+---
+The insides are great
+---
+The syntax ain't
+---
+We built on Test::More and WWW::Mechanize
+---
+#mode perl
+session "check logins" => run {
+ flow "basic connectivity" => check {
+ get 'http://fsck.com';
+ content should match qr{fsck.com};
+ click href qr{book};
+ content should match qr{RT Essentials}i;
+ };
+};
+---
+In early development
+---
+- Sample usage
- Explanation of the sample usage's meaning
- Comparison with traditional code
- Why we like it
- - Tricks we use to make it go
+---
+- Tricks we use to make it go
+---
+
+session "check logins" => run {
+ flow "basic connectivity" => check {
+ get 'http://fsck.com';
+ content should match qr{fsck.com};
+ click href qr{book};
+ content should match qr{RT Essentials}i;
+
+
+ };
+};
+
+---
+Why do we make this valid syntax?
+ content should match qr{RT Essentials}i;
+---
+Readability
+---
+Understandability
+---
+It feels English-y.
+---
+
+content should match qr{RT Essentials}i;
+
+ vs
+
+ok($req->content =~ /RT Essentials/i);
+
+---
+
+How do we make this valid perl?
+ content should match qr{RT Essentials}i;
+---
+
- Prototypes
- - eval
- - custom test functions
- - Explanation of how it works
-
+---
+sub match ($) {
+ return shift;
+}
+---
+sub should ($) {
+ my $item = shift;
+ return $item;
+}
+---
+sub content ($) {
+ my $regex = shift;
+ unless ( mech()->content =~ /$regex/ ) {
+ die "Content did not match $regex";
+ }
+}
+---
+ - eval, the (&) prototype and custom test functions
+---
+ check {
+ # do stuff that won't fail
+ };
+---
* Other interesting usages of DSLs in Perl
+
+
+---
+Problems with DSLs
+---
+Debugging can get harder
+---
+Editors can get confused
+---
+Hackers can get confused
+---
+
From jifty-commit at lists.jifty.org Tue Apr 3 02:51:00 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 02:51:02 2007
Subject: [Jifty-commit] r3082 - in wifty/trunk: lib/Wifty
Message-ID: <20070403065100.A14EE4D815B@diesel.bestpractical.com>
Author: clkao
Date: Tue Apr 3 02:50:59 2007
New Revision: 3082
Added:
wifty/trunk/lib/Wifty/View-not-ready-yet.pm
- copied unchanged from r2306, /wifty/trunk/lib/Wifty/View.pm
Removed:
wifty/trunk/lib/Wifty/View.pm
Modified:
wifty/trunk/ (props changed)
Log:
merge from trs' local
r20558@ubuntu: tom | 2007-04-02 06:51:03 +0900
Move Wifty::View so that it isn't automatically loaded. It's not ready for use yet (still contains much early TD syntax).
From jifty-commit at lists.jifty.org Tue Apr 3 03:52:08 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 03:52:12 2007
Subject: [Jifty-commit] r3083 - in jifty/trunk: .
Message-ID: <20070403075208.C48C54D8004@diesel.bestpractical.com>
Author: jesse
Date: Tue Apr 3 03:52:07 2007
New Revision: 3083
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/present-slides
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54417@dhcp207: jesse | 2007-04-03 16:51:42 +0900
* ok. mostly ready
Modified: jifty/trunk/doc/talks/present-slides
==============================================================================
--- jifty/trunk/doc/talks/present-slides (original)
+++ jifty/trunk/doc/talks/present-slides Tue Apr 3 03:52:07 2007
@@ -5,21 +5,16 @@
use Term::ANSIScreen qw/:color :cursor :screen :keyboard/;
use Term::ReadKey;
use Text::Autoformat;
+our @SLIDES;
-my $file = shift @ARGV;
-my $handle;
-open( $handle, "<$file" ) || die $!;
-
-my $datadata = join( '', <$handle> );
-
-my @slides = split( /^----?\s*$/mi, $datadata );
+load_slides();
my $counter = 0;
my $slides_played = {};
my $title;
-while ( $counter <= $#slides ) {
+while ( $counter <= $#SLIDES ) {
my $mode = 'text';
my ( $cols, $rows, undef, undef ) = GetTerminalSize();
- my $slide = $slides[$counter];
+ my $slide = $SLIDES[$counter];
my $console = Term::ANSIScreen->new;
$console->Cls;
$console->Cursor(1,1);
@@ -34,10 +29,10 @@
}
if ($slide =~ s/#\s*`(.*?)`//m) {
- #my $cmd = $1;
- #if(!$slides_played->{$counter} && ($slides_played->{$counter} = fork() )) {
- #`$cmd>/dev/null 2>/dev/null`;
- #}
+ my $cmd = $1;
+ if(!$slides_played->{$counter}) {
+ `$cmd>/dev/null 2>/dev/null &`;
+ $slides_played->{$counter}++}
}
if ( $slide =~ s/#\s*mode.*?perl.*?$//gms ) {
$mode = 'perl';
@@ -55,7 +50,8 @@
}
if ( $slide =~ /(\S+)\s*\n\s*(\S+)/m ) {
-
+ my $lines = scalar split(/\n/,$slide);
+ $console->Cursor(0, int(($rows/2)-($lines/2))-1);
print $slide;
} else {
chomp $slide;
@@ -64,17 +60,13 @@
if ($left < 0 ){
$left = 0;
}
- $console->Cursor(
- $left,
- int($rows/2)-1,
-
-);
+ $console->Cursor( $left, int($rows/2)-1, );
print $slide."\n";
}
$console->Cursor( 0, ( $rows - 1 ) );
- print "$counter/" . $#slides;
+ print "$counter/" . $#SLIDES;
ReadMode 4;
my $key = ReadKey(0);
ReadMode 0;
@@ -84,7 +76,9 @@
if ( $key =~ /^(?: |\n|n)/ ) {
$counter++;
} elsif ( $key eq 'r' ) {
+ load_slides();
next;
+
} else {
$counter--;
if ( $counter < 0 ) {
@@ -93,3 +87,12 @@
}
}
+sub load_slides {
+my $file = $ARGV[0];
+my $handle;
+open( $handle, "<$file" ) || die $!;
+
+my $datadata = join( '', <$handle> );
+
+ @SLIDES = split( /^----?\s*$/mi, $datadata );
+}
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Tue Apr 3 03:52:07 2007
@@ -1,7 +1,7 @@
!!Jesse Vincent - Best Practical
Domain Specific Languages in Perl
---
-!!DSLs in Perl
+!!A bit about DSLs
DSLs are 'little languages' for specific programming tasks
---
DSLs are easier to read
@@ -249,6 +249,7 @@
- Injection of functions
---
#mode perl
+# The syntax we wanted
score => type is 'int',
is immutable,
default is '0',
@@ -256,7 +257,18 @@
label is 'Score',
since is '0.0.7';
---
-Prototype hacking
+#mode perl
+How it parsed
+'is'->type('int',
+ 'immutable'->is,
+ 'is'->default('0',
+ 'as'->render('text',
+ 'is'->label('Score',
+ 'is'->since('0.0.7')))));
+---
+How can we fix that?
+---
+Prototype hacking!
---
#mode perl
sub is ($) { return shift };
@@ -276,11 +288,18 @@
label is 'Score',
since is '0.0.7';
-# parses to:
+# Now this parses like this:
- type(is('int')), is('immutable'), default(is('0')), render(as('text')), label(is('Score')), since(is('0.0.7'));
----
-TODO: function injection
+ type(is('int')),
+ is('immutable'),
+ default(is('0')),
+ render(as('text')),
+ label(is('Score')),
+ since(is('0.0.7'));
+---
+Downsides
+- Limited flexibility
+- Needs new functions for every attribute
---
!!Take 2:
Object::Declare
@@ -317,6 +336,7 @@
- it installs some methods...
- ...is::AUTOLOAD and UNIVERSAL::is and as::AUTOLOAD
- it runs the closure
+- it hands the result off to a method of your choice
- it removes its magic symbols
---
@@ -384,9 +404,9 @@
sub item {
my $content = shift;
- return
- div { attr { class => 'item' };
- h2 {$content};
+ div {
+ attr { class => 'item' };
+ h2 {$content};
};
}
@@ -398,12 +418,6 @@
Our HTML is magically valid.
(Syntax errors are...Syntax Errors)
---
-Inheritance
----
-Mixins
----
-Tricks we use
----
!!Stashing our templates
#mode perl
template '/foo/index.html' => sub {... };
@@ -446,11 +460,11 @@
!!Closures
Now, about that syntax.
---
-HTML tags take blocks
-of content.
+HTML tags take blocks of content.
+---
+Our tag methods take blocks of perl.
---
-Our tag methods take
-blocks. (Of perl)
+They return closures when you want them to
---
#mode perl
sub h1 (&;$) {
@@ -465,6 +479,14 @@
}
}
---
+We install methods for all the HTML tags
+---
+#mode perl
+use CGI ();
+install_tag($_) for ( @CGI::EXPORT_TAGS{
+ qw/:html2 :html3 :html4 :netscape :form/}
+);
+---
!!Not everything is roses
(Here's where it all goes wrong)
---
@@ -500,24 +522,28 @@
---
ORZ
---
-Not covering:
-
-- Our own method dispatch and inheritance tree
-- $self hacking
-- buffers
-
+Can anybody help me?
---
+!!
Test::WWW::Declare
---
!!Test::WWW::Declare
+In early development
+---
+It might change
+---
Web test scripts are UGLY
---
+Test::WWW::Declare is PRETTY
+---
- Simple, declarative web testing
- Easy to read
- Easy to write
- Looks more like what users do
---
#mode perl
+# Test::WWW::Mechanize
+
my $server=Jifty::Test->make_server;
isa_ok($server, 'Jifty::Server');
my $URL = $server->started_ok;
@@ -532,70 +558,68 @@
We built on Test::More and WWW::Mechanize
---
#mode perl
-session "check logins" => run {
- flow "basic connectivity" => check {
- get 'http://fsck.com';
- content should match qr{fsck.com};
- click href qr{book};
- content should match qr{RT Essentials}i;
- };
+
+# Test::WWW::Declare
+
+session "search" => run {
+ flow "google searches work" => check {
+ get 'http://google.com/ncr';
+ fill form 'f' => { q => 'Squeamish ossifrage' };
+ click button 'Google Search';
+ }
};
---
-In early development
+Regular tests keep running on failure
---
-- Sample usage
- - Explanation of the sample usage's meaning
- - Comparison with traditional code
- - Why we like it
+Makes no sense when a failure means you lose context
---
-- Tricks we use to make it go
+Every 'check' block aborts on failure
---
-
+Abort means 'failing test'
+---
+Every named 'session' gets its own cookie jar and WWW::Mechanize
+---
+#mode perl
session "check logins" => run {
flow "basic connectivity" => check {
get 'http://fsck.com';
content should match qr{fsck.com};
click href qr{book};
content should match qr{RT Essentials}i;
-
-
};
};
-
----
-Why do we make this valid syntax?
- content should match qr{RT Essentials}i;
----
-Readability
---
-Understandability
+What's the weird syntax?
---
-It feels English-y.
+# mode perl
+content should match qr{RT Essentials}i;
---
-
+#mode perl
content should match qr{RT Essentials}i;
- vs
+# vs
ok($req->content =~ /RT Essentials/i);
-
---
+# mode perl
+# How do we make this valid perl?
-How do we make this valid perl?
- content should match qr{RT Essentials}i;
+content should match qr{RT Essentials}i;
---
-
- - Prototypes
+Prototypes
---
+#mode perl
sub match ($) {
return shift;
}
---
+#mode perl
sub should ($) {
my $item = shift;
return $item;
}
---
+#mode perl
sub content ($) {
my $regex = shift;
unless ( mech()->content =~ /$regex/ ) {
@@ -603,24 +627,18 @@
}
}
---
- - eval, the (&) prototype and custom test functions
+!!Conclusion
+Creating DSLs is lots of fun
---
- check {
- # do stuff that won't fail
- };
+Creating DSLs can be a lot of work
---
-
-
-* Other interesting usages of DSLs in Perl
-
-
+Creating DSLs helps you learn Perl internals
---
-Problems with DSLs
+Creating DSLs helps find bugs in Perl
---
-Debugging can get harder
+DSLs can make coding more fun
---
-Editors can get confused
+Challenge: CPAN some Japanese DSLs
---
-Hackers can get confused
+Thanks
---
-
From jifty-commit at lists.jifty.org Tue Apr 3 04:23:04 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 04:23:06 2007
Subject: [Jifty-commit] r3084 - in jifty/trunk: .
Message-ID: <20070403082304.600F34D8004@diesel.bestpractical.com>
Author: jesse
Date: Tue Apr 3 04:23:03 2007
New Revision: 3084
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/present-slides
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54420@dhcp207: jesse | 2007-04-03 17:22:40 +0900
* tidy
Modified: jifty/trunk/doc/talks/present-slides
==============================================================================
--- jifty/trunk/doc/talks/present-slides (original)
+++ jifty/trunk/doc/talks/present-slides Tue Apr 3 04:23:03 2007
@@ -38,7 +38,7 @@
$mode = 'perl';
}
if ( $mode eq 'text' and $slide ) {
- $slide = autoformat $slide, { left => 1, right => ($cols), all => 1 };
+ $slide = autoformat $slide, { left => 1, right => ($cols-3), all => 1 };
}
elsif ($mode eq 'perl') {
my $tidycols = $cols - 2; # squeeze for display
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Tue Apr 3 04:23:03 2007
@@ -117,6 +117,10 @@
...I'm kidding
---
+ we could tie the symbol table
+
+ ...It just doesn't work
+---
#mode perl
use base 'Jifty::DBI::Record';
Jifty::DBI::Record->___from_code();
@@ -281,14 +285,7 @@
---
#mode perl
-score => type is 'int',
- is immutable,
- default is '0',
- render as 'text',
- label is 'Score',
- since is '0.0.7';
-
-# Now this parses like this:
+# Now it parses like this:
type(is('int')),
is('immutable'),
@@ -317,7 +314,8 @@
label is 'Score',
since is '0.0.7';
};
-
+---
+# mode perl
# parses as:
'is'->type('int',
@@ -327,6 +325,12 @@
'is'->label('Score',
'is'->since('0.0.7')))));
---
+Why fight the parser?
+---
+Perl gives us all the rope we need
+---
+UNIVERSAL:: and ::AUTOLOAD
+---
What actually happens at compile time:
- The 'schema' function in our baseclass takes a code block
@@ -343,7 +347,7 @@
Template::Declare
---
!!Template::Declare
-Sample usage
+What it looks like
---
#mode perl
template '/pages/mypage.html' => sub {
@@ -369,7 +373,7 @@
---
This is not 1997
---
-It's 2007.
+It's 2007
---
People use CSS for design now.
---
From jifty-commit at lists.jifty.org Tue Apr 3 04:45:09 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 04:45:12 2007
Subject: [Jifty-commit] r3085 - in jifty/trunk: .
Message-ID: <20070403084509.2B38F4D80CE@diesel.bestpractical.com>
Author: jesse
Date: Tue Apr 3 04:45:09 2007
New Revision: 3085
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54422@dhcp207: jesse | 2007-04-03 17:44:46 +0900
intro slides
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Tue Apr 3 04:45:09 2007
@@ -50,7 +50,11 @@
---
Never say that to a Perl Hacker
---
+Jifty::DBI::Schema
+---
!!Jifty::DBI::Schema - The design process
+Delarative Syntax for an Object Relational Mapper
+---
- Started sketching Jifty::DBI columns
- Started with DBIx::SearchBuilder
- Columns were defined as a hash
@@ -347,6 +351,8 @@
Template::Declare
---
!!Template::Declare
+A pure Perl Templating Language
+---
What it looks like
---
#mode perl
@@ -532,6 +538,9 @@
Test::WWW::Declare
---
!!Test::WWW::Declare
+---
+A language for testing web applications
+---
In early development
---
It might change
From jifty-commit at lists.jifty.org Tue Apr 3 04:47:08 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 04:47:09 2007
Subject: [Jifty-commit] r3086 -
jifty/trunk/lib/Jifty/Plugin/Authentication/Password
Message-ID: <20070403084708.0D5BC4D80E6@diesel.bestpractical.com>
Author: audreyt
Date: Tue Apr 3 04:47:07 2007
New Revision: 3086
Modified:
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm
Log:
* dedebugbug.
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm Tue Apr 3 04:47:07 2007
@@ -96,7 +96,6 @@
h2 { _('Send a link to reset your password') };
outs( _( "You lost your password. A link to reset it will be sent to the following email address:"));
- outs($next);
my $focused = 0;
Jifty->web->form->start( call => $next );
render_param( $action => $_, focus => $focused++ ? 0 : 1 ) for ( $action->argument_names );
From jifty-commit at lists.jifty.org Tue Apr 3 05:11:01 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 05:11:05 2007
Subject: [Jifty-commit] r3087 - in jifty/trunk: lib/Jifty
Message-ID: <20070403091101.E05BF4D80CE@diesel.bestpractical.com>
Author: jesse
Date: Tue Apr 3 05:10:58 2007
New Revision: 3087
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Config.pm
jifty/trunk/lib/Jifty/Record.pm
Log:
r54424@dhcp207: jesse | 2007-04-03 18:09:49 +0900
* added a "SkipAccessControl" framework directive
Modified: jifty/trunk/lib/Jifty/Config.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Config.pm (original)
+++ jifty/trunk/lib/Jifty/Config.pm Tue Apr 3 05:10:58 2007
@@ -239,6 +239,7 @@
framework => {
AdminMode => 1,
DevelMode => 1,
+ SkipAccessControl => 0,
ApplicationClass => $app_class,
TemplateClass => $app_class."::View",
ApplicationName => $app_name,
Modified: jifty/trunk/lib/Jifty/Record.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Record.pm (original)
+++ jifty/trunk/lib/Jifty/Record.pm Tue Apr 3 05:10:58 2007
@@ -197,6 +197,11 @@
sub current_user_can {
my $self = shift;
my $right = shift;
+
+ if (Jifty->config->framework('SkipAccessControl')) {
+ return 1;
+ }
+
if ( $self->current_user->is_bootstrap_user
or $self->current_user->is_superuser )
From jifty-commit at lists.jifty.org Tue Apr 3 05:50:54 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 05:50:57 2007
Subject: [Jifty-commit] r3088 - in jifty/trunk/lib: . Jifty
Message-ID: <20070403095054.324B94D80E5@diesel.bestpractical.com>
Author: audreyt
Date: Tue Apr 3 05:50:52 2007
New Revision: 3088
Modified:
jifty/trunk/lib/Jifty.pm
jifty/trunk/lib/Jifty/Plugin.pm
jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm
Log:
* Jifty::Plugin - Authentication::Password now auto-loads LetMe and User.
Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm (original)
+++ jifty/trunk/lib/Jifty.pm Tue Apr 3 05:50:52 2007
@@ -164,12 +164,18 @@
# Set up plugins
my @plugins;
- for my $plugin (@{Jifty->config->framework('Plugins')}) {
+ my @plugins_to_load = @{Jifty->config->framework('Plugins')};
+ for (my $i = 0; my $plugin = $plugins_to_load[$i]; $i++) {
my $class = "Jifty::Plugin::".(keys %{$plugin})[0];
my %options = %{ $plugin->{(keys %{$plugin})[0]} };
Jifty::Util->require($class);
Jifty::ClassLoader->new(base => $class)->require;
- push @plugins, $class->new(%options);
+ my $plugin_obj = $class->new(%options);
+ push @plugins, $plugin_obj;
+ foreach my $name ($plugin_obj->prereq_plugins) {
+ next if grep { $_ eq $name } @plugins_to_load;
+ push @plugins_to_load, {$name => {}};
+ }
}
Jifty->plugins(@plugins);
Modified: jifty/trunk/lib/Jifty/Plugin.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin.pm Tue Apr 3 05:50:52 2007
@@ -174,4 +174,14 @@
return $class."::Dispatcher";
}
+=head2 prereq_plugins
+
+Returns an array of plugin module names that this plugin depends on.
+
+=cut
+
+sub prereq_plugins {
+ return ();
+}
+
1;
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm Tue Apr 3 05:50:52 2007
@@ -21,4 +21,8 @@
=cut
+sub prereq_plugins {
+ return ('User', 'LetMe');
+}
+
1;
From jifty-commit at lists.jifty.org Tue Apr 3 06:13:18 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 06:13:54 2007
Subject: [Jifty-commit] r3089 - in jifty/trunk:
lib/Jifty/Plugin/Authentication t/TestApp-Plugin-PasswordAuth/etc
Message-ID: <20070403101318.F36BA4D8166@diesel.bestpractical.com>
Author: jesse
Date: Tue Apr 3 06:12:52 2007
New Revision: 3089
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm
jifty/trunk/t/TestApp-Plugin-PasswordAuth/etc/config.yml
Log:
r54430@dhcp207: jesse | 2007-04-03 19:11:02 +0900
* pod fixes
* update tests to take advantage of audrey's new feature (plugin deps)
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm Tue Apr 3 06:12:52 2007
@@ -21,6 +21,14 @@
=cut
+
+=head2 prereq_plugins
+
+This plugin depends on the C and C plugins.
+
+=cut
+
+
sub prereq_plugins {
return ('User', 'LetMe');
}
Modified: jifty/trunk/t/TestApp-Plugin-PasswordAuth/etc/config.yml
==============================================================================
--- jifty/trunk/t/TestApp-Plugin-PasswordAuth/etc/config.yml (original)
+++ jifty/trunk/t/TestApp-Plugin-PasswordAuth/etc/config.yml Tue Apr 3 06:12:52 2007
@@ -22,7 +22,6 @@
- %log/mail.log%
Plugins:
- - User: {}
- Authentication::Password: {}
-
REST: {}
From jifty-commit at lists.jifty.org Tue Apr 3 21:31:59 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 21:32:30 2007
Subject: [Jifty-commit] r3090 - in jifty/trunk: .
Message-ID: <20070404013159.5F6284D8004@diesel.bestpractical.com>
Author: jesse
Date: Tue Apr 3 21:31:57 2007
New Revision: 3090
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/present-slides
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54432@pinglin-2: jesse | 2007-04-04 10:10:29 +0900
* More tweaking
Modified: jifty/trunk/doc/talks/present-slides
==============================================================================
--- jifty/trunk/doc/talks/present-slides (original)
+++ jifty/trunk/doc/talks/present-slides Tue Apr 3 21:31:57 2007
@@ -18,7 +18,7 @@
my $console = Term::ANSIScreen->new;
$console->Cls;
$console->Cursor(1,1);
- if ( $slide =~ s/^!\!\s*?(.*?)$//gm ) {
+ if ( $slide =~ s/^#\s*title\s*?(.*?)$//gm ) {
$title = $1;
}
if ($title) {
@@ -38,7 +38,7 @@
$mode = 'perl';
}
if ( $mode eq 'text' and $slide ) {
- $slide = autoformat $slide, { left => 1, right => ($cols-3), all => 1 };
+ $slide = autoformat $slide, { left => 1, right => ($cols-1), all => 1 };
}
elsif ($mode eq 'perl') {
my $tidycols = $cols - 2; # squeeze for display
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Tue Apr 3 21:31:57 2007
@@ -1,7 +1,7 @@
-!!Jesse Vincent - Best Practical
+#title Jesse Vincent - Best Practical
Domain Specific Languages in Perl
---
-!!A bit about DSLs
+#title A bit about DSLs
DSLs are 'little languages' for specific programming tasks
---
DSLs are easier to read
@@ -14,10 +14,13 @@
---
Not all DSLs are Englishy
---
-- Excel Macros
-- XML config files
-- XSL-T
-- GraphViz
+Excel Macros
+---
+XML config files
+---
+XSL-T
+---
+GraphViz
---
...but I've been on an Englishy DSL kick
---
@@ -33,32 +36,67 @@
---
The Ruby community is big on DSLs
---
-You can make DSLs in Perl, too.
+You can make DSLs in Perl, too
---
(but it does take more work in Perl)
---
-!!How did I get here?
-- Airplane
-- Narita Express
-- Subway
----
-- All started at OSCON 2005
-- DHH demonstrated Rails migrations
-- Looked very sexy
-- Was very jealous
-- "You can't do this in any other language"
+#title How did I get here?
+Airplane
+---
+Narita Express
+---
+Subway
+---
+Ok, How'd I really get here?
+---
+All started at OSCON 2005
+---
+DHH demonstrated Rails migrations
+---
+Looked very sexy
+---
+Was very jealous
+---
+"You can't do this in any other language"
---
Never say that to a Perl Hacker
---
+#title agenda
+We've made some DSLs
+---
+One for declaring database schema
+---
+(I thought Rails did more. But I never read the manual)
+---
+(It does a lot more than Rails migrations)
+---
+One for web templating
+---
+(Yes, another web templating system)
+---
+(Hopefully, this one will provide some closure)
+---
+(You'll see)
+---
+One for making web testing easier
+---
+(It's VERY beta)
+---
+(Perfect for Web 2.0)
+---
+#title
Jifty::DBI::Schema
---
-!!Jifty::DBI::Schema - The design process
+#title Jifty::DBI::Schema - The design process
Delarative Syntax for an Object Relational Mapper
---
-- Started sketching Jifty::DBI columns
-- Started with DBIx::SearchBuilder
-- Columns were defined as a hash
-- Hashes are ugly
+Started sketching Jifty::DBI columns
+---
+Started with DBIx::SearchBuilder
+---
+Columns were defined as a hash
+---
+Hashes are ugly
---
We spent about a month playing with syntax.
---
@@ -218,7 +256,7 @@
__PACKAGE__->field dexterity => { has_type 'integer'};
---
-!!In the end...
+#title In the end...
We ended up with Jifty::DBI columns
---
@@ -244,10 +282,10 @@
---
Implemented it twice
---
-!!
+#title
Take 1
---
-!!Take 1:
+#title Take 1:
Jifty::DBI::Schema
---
Our first DSL in Perl
@@ -258,6 +296,7 @@
---
#mode perl
# The syntax we wanted
+
score => type is 'int',
is immutable,
default is '0',
@@ -266,7 +305,8 @@
since is '0.0.7';
---
#mode perl
-How it parsed
+# perl -MO=Deparse parses that as:
+
'is'->type('int',
'immutable'->is,
'is'->default('0',
@@ -289,7 +329,7 @@
---
#mode perl
-# Now it parses like this:
+# Now, perl -MO=Deparse parses that as:
type(is('int')),
is('immutable'),
@@ -302,7 +342,7 @@
- Limited flexibility
- Needs new functions for every attribute
---
-!!Take 2:
+#title Take 2:
Object::Declare
---
#`mpg123 ~/katamari.mp3`
@@ -320,7 +360,7 @@
};
---
# mode perl
-# parses as:
+# perl -MO=Deparse parses that as:
'is'->type('int',
'immutable'->is,
@@ -337,20 +377,33 @@
---
What actually happens at compile time:
-- The 'schema' function in our baseclass takes a code block
-- ...and returns a closure
-- Jifty::DBI::Record::import takes over:
-- it takes the closure
-- it installs some methods...
-- ...is::AUTOLOAD and UNIVERSAL::is and as::AUTOLOAD
-- it runs the closure
-- it hands the result off to a method of your choice
-- it removes its magic symbols
-
---
+The 'schema' function in our baseclass takes a code block
+---
+...and returns a closure
+---
+Jifty::DBI::Record::import takes over:
+---
+it takes the closure
+---
+it installs some methods...
+---
+...is::AUTOLOAD and UNIVERSAL::is and as::AUTOLOAD
+---
+it runs the closure
+---
+it hands the result off to a method of your choice
+---
+it removes its magic symbols
+---
+...and then your program gets control back
+---
+That's Jifty::DBI::Schema.
+---
+#title
Template::Declare
---
-!!Template::Declare
+#title Template::Declare
A pure Perl Templating Language
---
What it looks like
@@ -366,7 +419,9 @@
};
---
But!
+---
Content! Templates!
+---
Design! Code!
---
OMGWTF!? THAT'S WRONG!
@@ -375,7 +430,7 @@
---
We're perl hackers
---
-Why are we putting a minilanguage in our templates?
+Why are we writing our templates in another language?
---
This is not 1997
---
@@ -389,10 +444,10 @@
---
Because they ARE code
---
-Let's use our PROGRAMMING tools to work with them.
+Let's use our CODING tools to work with them.
---
#mode perl
-!!Refactoring
+#title Refactoring
template 'mypage.html' => page {
h1 { 'Two choices' };
@@ -404,7 +459,7 @@
};
};
---
-!!Refactoring
+#title Refactoring
#mode perl
template 'mypage.html' => page {
@@ -428,11 +483,11 @@
Our HTML is magically valid.
(Syntax errors are...Syntax Errors)
---
-!!Stashing our templates
+#title Stashing our templates
#mode perl
template '/foo/index.html' => sub {... };
---
-'sub template' takes a name and a coderef.
+'sub template' takes a name and a coderef
---
But where do we put these?
---
@@ -441,15 +496,15 @@
It needs to be per package
(Don't want to mix things together)
---
-Basically, we need a symbol table.
+Basically, we need a symbol table
---
-It's Perl.
+It's Perl
---
-We have THE symbol table.
+We have THE symbol table
---
-But you can have characters in URLS you can't have in sub names. Oh no!
+But URLs can have characters that are illegal in sub names. :/
---
-Actually, Perl doesn't care.
+Actually, Perl doesn't care
---
#mode perl
no strict 'refs';
@@ -457,7 +512,7 @@
---
That just works.
---
-Even if your subroutine is named './\\foo!!<>'
+Even if your sub is named './\\foo#title <>'
---
But how do you call it?
---
@@ -467,7 +522,7 @@
"can" checks if the object or class has a method called "METHOD".
If it does then a reference to the sub is returned.
---
-!!Closures
+#title Closures
Now, about that syntax.
---
HTML tags take blocks of content.
@@ -489,15 +544,19 @@
}
}
---
-We install methods for all the HTML tags
+We install methods for ever HTML tag
+---
+(Except 'tr'. Anybody know why?)
---
#mode perl
use CGI ();
-install_tag($_) for ( @CGI::EXPORT_TAGS{
- qw/:html2 :html3 :html4 :netscape :form/}
+install_tag($_)
+ for ( @CGI::EXPORT_TAGS{
+ qw/:html2 :html3 :html4
+ :netscape :form/}
);
---
-!!Not everything is roses
+#title Not everything is roses
(Here's where it all goes wrong)
---
HTML Attributes
@@ -534,10 +593,12 @@
---
Can anybody help me?
---
-!!
+That's Template::Declare
+---
+#title
Test::WWW::Declare
---
-!!Test::WWW::Declare
+#title Test::WWW::Declare
---
A language for testing web applications
---
@@ -549,10 +610,13 @@
---
Test::WWW::Declare is PRETTY
---
-- Simple, declarative web testing
-- Easy to read
-- Easy to write
-- Looks more like what users do
+Simple, declarative web testing
+---
+Easy to read
+---
+Easy to write
+---
+Looks more like what users do
---
#mode perl
# Test::WWW::Mechanize
@@ -562,7 +626,8 @@
my $URL = $server->started_ok;
my $mech = Jifty::Test::WWW::Mechanize->new;
$mech->get_html_ok($URL);
-like($mech->uri, qr{splash}, 'Redirected to splash page');
+like($mech->uri, qr{splash},
+ 'Redirected to splash page');
---
The insides are great
---
@@ -577,7 +642,8 @@
session "search" => run {
flow "google searches work" => check {
get 'http://google.com/ncr';
- fill form 'f' => { q => 'Squeamish ossifrage' };
+ fill form 'f' => {
+ q => 'Squeamish ossifrage' };
click button 'Google Search';
}
};
@@ -590,7 +656,7 @@
---
Abort means 'failing test'
---
-Every named 'session' gets its own cookie jar and WWW::Mechanize
+Every 'session' has a cookie jar and WWW::Mechanize
---
#mode perl
session "check logins" => run {
@@ -640,7 +706,9 @@
}
}
---
-!!Conclusion
+That's Test::WWW::Declare
+---
+#title Conclusion
Creating DSLs is lots of fun
---
Creating DSLs can be a lot of work
From jifty-commit at lists.jifty.org Tue Apr 3 22:29:36 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 22:29:38 2007
Subject: [Jifty-commit] r3091 - in jifty/trunk: .
Message-ID: <20070404022936.7DBBE4D8004@diesel.bestpractical.com>
Author: jesse
Date: Tue Apr 3 22:29:30 2007
New Revision: 3091
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/present-slides
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54434@pinglin-2: jesse | 2007-04-04 11:08:47 +0900
* tweaky
Modified: jifty/trunk/doc/talks/present-slides
==============================================================================
--- jifty/trunk/doc/talks/present-slides (original)
+++ jifty/trunk/doc/talks/present-slides Tue Apr 3 22:29:30 2007
@@ -75,6 +75,10 @@
}
if ( $key =~ /^(?: |\n|n)/ ) {
$counter++;
+ } elsif ( $key eq 'e' ) {
+ system("vim", $ARGV[0]);
+ load_slides();
+ next;
} elsif ( $key eq 'r' ) {
load_slides();
next;
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Tue Apr 3 22:29:30 2007
@@ -2,7 +2,7 @@
Domain Specific Languages in Perl
---
#title A bit about DSLs
-DSLs are 'little languages' for specific programming tasks
+DSLs are little languages for specific programming tasks
---
DSLs are easier to read
---
@@ -61,7 +61,7 @@
---
Never say that to a Perl Hacker
---
-#title agenda
+#title Agenda
We've made some DSLs
---
One for declaring database schema
@@ -261,17 +261,13 @@
We ended up with Jifty::DBI columns
---
#mode perl
-
use Jifty::DBI::Record schema {
-column
- auth_token => type is 'text',
+column auth_token => type is 'text',
render as 'Unrendered';
column score => type is 'int',
is immutable,
- default is '0',
- label is 'Score',
- since is '0.0.7';
+ label is 'Score';
column time_zone =>
label is 'Time zone',
@@ -285,14 +281,21 @@
#title
Take 1
---
-#title Take 1:
+#title Take 1
Jifty::DBI::Schema
---
+#title Take 1: Jifty::DBI::Schema
Our first DSL in Perl
---
-We beat the parser into submission using:
-- Clever function prototypes
-- Injection of functions
+We beat the parser into submission with a few tricks
+---
+Injection of functions
+---
+We saw that a moment ago
+---
+Clever function prototypes
+---
+Let's have a look at that
---
#mode perl
# The syntax we wanted
@@ -342,9 +345,10 @@
- Limited flexibility
- Needs new functions for every attribute
---
-#title Take 2:
+#title Take 2
Object::Declare
---
+#title Take 2: Object::Declare
#`mpg123 ~/katamari.mp3`
Katamari for Code
---
@@ -398,6 +402,7 @@
---
...and then your program gets control back
---
+#title Jifty::DBI::Schema - end
That's Jifty::DBI::Schema.
---
#title
@@ -593,6 +598,7 @@
---
Can anybody help me?
---
+#title Template::Declare - end
That's Template::Declare
---
#title
@@ -706,6 +712,7 @@
}
}
---
+#title Test::WWW::Declare - end
That's Test::WWW::Declare
---
#title Conclusion
From jifty-commit at lists.jifty.org Tue Apr 3 22:30:15 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Tue Apr 3 22:30:17 2007
Subject: [Jifty-commit] r3092 - in jifty/trunk: .
Message-ID: <20070404023015.234534D8004@diesel.bestpractical.com>
Author: jesse
Date: Tue Apr 3 22:30:07 2007
New Revision: 3092
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/present-slides
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54435@pinglin-2: jesse | 2007-04-04 11:29:04 +0900
more slides
Modified: jifty/trunk/doc/talks/present-slides
==============================================================================
--- jifty/trunk/doc/talks/present-slides (original)
+++ jifty/trunk/doc/talks/present-slides Tue Apr 3 22:30:07 2007
@@ -38,9 +38,10 @@
$mode = 'perl';
}
if ( $mode eq 'text' and $slide ) {
- $slide = autoformat $slide, { left => 1, right => ($cols-1), all => 1 };
+ $slide = autoformat $slide, { left => 2, right => ($cols-1), all => 1 };
}
elsif ($mode eq 'perl') {
+ $slide =~ s/^/ /gsm;
my $tidycols = $cols - 2; # squeeze for display
open my $out , ">/tmp/output.$$" || die $!;
print $out $slide || die $!;
@@ -61,12 +62,12 @@
$left = 0;
}
$console->Cursor( $left, int($rows/2)-1, );
- print $slide."\n";
+ print colored($slide." \n",'bold blue on white');
}
$console->Cursor( 0, ( $rows - 1 ) );
- print "$counter/" . $#SLIDES;
+ print colored("$counter/" . $#SLIDES, "bold white");
ReadMode 4;
my $key = ReadKey(0);
ReadMode 0;
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Tue Apr 3 22:30:07 2007
@@ -53,9 +53,9 @@
---
DHH demonstrated Rails migrations
---
-Looked very sexy
+they looked very sexy
---
-Was very jealous
+I was very jealous
---
"You can't do this in any other language"
---
@@ -543,9 +543,9 @@
...
if (defined wantarray) {
- return $closure_around_$code;
+ return sub { ...closure around $code...};
} else {
- # Actually do our work and run $code
+ # Actually do our work, run $code and return the output
}
}
---
From jifty-commit at lists.jifty.org Wed Apr 4 01:05:49 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Wed Apr 4 01:06:25 2007
Subject: [Jifty-commit] r3093 - in jifty/trunk: .
Message-ID: <20070404050549.3A0EB4D80B0@diesel.bestpractical.com>
Author: jesse
Date: Wed Apr 4 01:05:43 2007
New Revision: 3093
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/present-slides
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54438@pinglin-2: jesse | 2007-04-04 14:04:04 +0900
* Slides system now has a presenter view
Modified: jifty/trunk/doc/talks/present-slides
==============================================================================
--- jifty/trunk/doc/talks/present-slides (original)
+++ jifty/trunk/doc/talks/present-slides Wed Apr 4 01:05:43 2007
@@ -11,10 +11,27 @@
my $counter = 0;
my $slides_played = {};
my $title;
+
+open(my $next_slide, ">/tmp/next_slide");
+select($next_slide);
+$| = 1;
+select(STDOUT);
while ( $counter <= $#SLIDES ) {
my $mode = 'text';
my ( $cols, $rows, undef, undef ) = GetTerminalSize();
my $slide = $SLIDES[$counter];
+
+ print $next_slide Term::ANSIScreen::cls;
+ print $next_slide locate(1,1);
+ print $next_slide colored("Time: ".scalar localtime ."\n", 'blue');
+ print $next_slide colored("Back 1\n", 'red');
+ print $next_slide $SLIDES[$counter-1] ."\n\n";
+ print $next_slide colored("This slide, $counter/".$#SLIDES."\n", 'blue');
+ print $next_slide $SLIDES[$counter] ."\n\n";
+ print $next_slide colored("Next slide\n", 'red');
+ print $next_slide $SLIDES[$counter+1];
+ print $next_slide "\n";
+
my $console = Term::ANSIScreen->new;
$console->Cls;
$console->Cursor(1,1);
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Wed Apr 4 01:05:43 2007
@@ -346,10 +346,10 @@
- Needs new functions for every attribute
---
#title Take 2
+#`mpg123 ~/katamari.mp3`
Object::Declare
---
#title Take 2: Object::Declare
-#`mpg123 ~/katamari.mp3`
Katamari for Code
---
#mode perl
@@ -507,7 +507,7 @@
---
We have THE symbol table
---
-But URLs can have characters that are illegal in sub names. :/
+But URLs have characters that are illegal in sub names. :/
---
Actually, Perl doesn't care
---
@@ -605,7 +605,6 @@
Test::WWW::Declare
---
#title Test::WWW::Declare
----
A language for testing web applications
---
In early development
From jifty-commit at lists.jifty.org Wed Apr 4 01:59:51 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Wed Apr 4 02:00:48 2007
Subject: [Jifty-commit] r3094 - in jifty/trunk: .
Message-ID: <20070404055951.E502C4D80FB@diesel.bestpractical.com>
Author: jesse
Date: Wed Apr 4 01:59:46 2007
New Revision: 3094
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/present-slides
Log:
r54440@pinglin-2: jesse | 2007-04-04 14:56:43 +0900
* Autoopen the presenter tools
Modified: jifty/trunk/doc/talks/present-slides
==============================================================================
--- jifty/trunk/doc/talks/present-slides (original)
+++ jifty/trunk/doc/talks/present-slides Wed Apr 4 01:59:46 2007
@@ -16,6 +16,9 @@
select($next_slide);
$| = 1;
select(STDOUT);
+
+my $cmd = q{ osascript -e ' tell application "Terminal"' -e ' do script "tail -f /tmp/next_slide"' -e 'end tell' };
+system($cmd);
while ( $counter <= $#SLIDES ) {
my $mode = 'text';
my ( $cols, $rows, undef, undef ) = GetTerminalSize();
@@ -23,7 +26,7 @@
print $next_slide Term::ANSIScreen::cls;
print $next_slide locate(1,1);
- print $next_slide colored("Time: ".scalar localtime ."\n", 'blue');
+ print $next_slide colored("Time: ".scalar localtime() ."\n", 'blue');
print $next_slide colored("Back 1\n", 'red');
print $next_slide $SLIDES[$counter-1] ."\n\n";
print $next_slide colored("This slide, $counter/".$#SLIDES."\n", 'blue');
From jifty-commit at lists.jifty.org Wed Apr 4 02:04:02 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Wed Apr 4 02:04:07 2007
Subject: [Jifty-commit] r3095 - jifty/trunk/lib/Jifty/Web
Message-ID: <20070404060402.D1D3C4D80FB@diesel.bestpractical.com>
Author: hlb
Date: Wed Apr 4 02:03:58 2007
New Revision: 3095
Modified:
jifty/trunk/lib/Jifty/Web/Menu.pm
Log:
* fix "open" class in menu - active menu item doesn't imply current open item
Modified: jifty/trunk/lib/Jifty/Web/Menu.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Menu.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Menu.pm Wed Apr 4 02:03:58 2007
@@ -226,7 +226,7 @@
my @kids = $self->children;
my $id = Jifty->web->serial;
Jifty->web->out( qq{}
+ . ( $self->active ? 'active' : 'closed' ) . qq{">}
. qq{} );
Jifty->web->out( $self->as_link );
Jifty->web->out(qq{ });
From jifty-commit at lists.jifty.org Wed Apr 4 14:18:25 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Wed Apr 4 14:18:29 2007
Subject: [Jifty-commit] r3096 - jifty/trunk/doc/talks
Message-ID: <20070404181825.05AA44D8084@diesel.bestpractical.com>
Author: audreyt
Date: Wed Apr 4 14:18:24 2007
New Revision: 3096
Added:
jifty/trunk/doc/talks/yapcasia2007-doxory.key.tbz2 (contents, props changed)
Log:
* Snapshot of doxory slides.
Added: jifty/trunk/doc/talks/yapcasia2007-doxory.key.tbz2
==============================================================================
Binary file. No diff available.
From jifty-commit at lists.jifty.org Wed Apr 4 19:53:34 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Wed Apr 4 19:53:37 2007
Subject: [Jifty-commit] r3097 - in jifty/trunk: lib/Jifty lib/auto
Message-ID: <20070404235334.D4AB14D8084@diesel.bestpractical.com>
Author: alexmv
Date: Wed Apr 4 19:53:33 2007
New Revision: 3097
Removed:
jifty/trunk/lib/auto/
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Action.pm
Log:
r18733@zoq-fot-pik: chmrr | 2007-04-04 19:53:06 -0400
* Typo fix in example in POD
* Remove old, unused empty directory
Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm (original)
+++ jifty/trunk/lib/Jifty/Action.pm Wed Apr 4 19:53:33 2007
@@ -1185,7 +1185,7 @@
value => '%$value%',
);
- return map { $_->name } @{ $foos->item_array_ref };
+ return map { $_->name } @{ $foos->items_array_ref };
}
In this example, the "foo" field is autocompleted from names matched from the C table. The match, in this case, matches any substring found in the database. I could have matched any item that starts with the string, ends with the string, matches other fields than the one returned, etc. It's up to you to decide.
@@ -1195,7 +1195,7 @@
If you need a more complicated solution, you can return the autocompletion values as a list of hash references containing the keys C and (optionally) C:
return map { { value => $_->name, label => $_->label } }
- @{ $foos->item_array_ref };
+ @{ $foos->items_array_ref };
In this case, the labels will be shown to the client, but the selected value would be returned to your application.
From jifty-commit at lists.jifty.org Thu Apr 5 01:28:45 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Thu Apr 5 01:28:48 2007
Subject: [Jifty-commit] r3098 - jifty/trunk/doc/talks
Message-ID: <20070405052845.D3FDE4D8070@diesel.bestpractical.com>
Author: audreyt
Date: Thu Apr 5 01:28:43 2007
New Revision: 3098
Added:
jifty/trunk/doc/talks/DoxoryDemo.tgz (contents, props changed)
Modified:
jifty/trunk/doc/talks/yapcasia2007-doxory.key.tbz2
Log:
* YAPC::Asia 2007, "Jifty Now!", slides and demo.
Added: jifty/trunk/doc/talks/DoxoryDemo.tgz
==============================================================================
Binary file. No diff available.
Modified: jifty/trunk/doc/talks/yapcasia2007-doxory.key.tbz2
==============================================================================
Binary files. No diff available.
From jifty-commit at lists.jifty.org Thu Apr 5 01:35:09 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Thu Apr 5 01:35:14 2007
Subject: [Jifty-commit] r3099 - jifty/trunk/doc/talks
Message-ID: <20070405053509.2D6FE4D810D@diesel.bestpractical.com>
Author: audreyt
Date: Thu Apr 5 01:35:04 2007
New Revision: 3099
Added:
jifty/trunk/doc/talks/yapcasia2007-doxory.pdf
Log:
* Add PDF version of the slides.
Added: jifty/trunk/doc/talks/yapcasia2007-doxory.pdf
==============================================================================
Binary files (empty file) and jifty/trunk/doc/talks/yapcasia2007-doxory.pdf Thu Apr 5 01:35:04 2007 differ
From jifty-commit at lists.jifty.org Fri Apr 6 06:36:36 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 6 06:41:08 2007
Subject: [Jifty-commit] r3100 - in Template-Declare: lib/Template
lib/Template/Declare t
Message-ID: <20070406103636.1643E4D80BD@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 6 06:36:26 2007
New Revision: 3100
Modified:
Template-Declare/ (props changed)
Template-Declare/lib/Template/Declare.pm
Template-Declare/lib/Template/Declare/Tags.pm
Template-Declare/t/private.t
Template-Declare/t/subclassing.t
Template-Declare/t/trivial.t
Log:
r54517@dhcp207: jesse | 2007-04-06 19:36:06 +0900
* Better handling of 'private' templates for gugod
Modified: Template-Declare/lib/Template/Declare.pm
==============================================================================
--- Template-Declare/lib/Template/Declare.pm (original)
+++ Template-Declare/lib/Template/Declare.pm Fri Apr 6 06:36:26 2007
@@ -201,7 +201,7 @@
sub show {
my $class = shift;
my $template = shift;
- return Template::Declare::Tags::show($template);
+ return Template::Declare::Tags::show_page($template);
}
Modified: Template-Declare/lib/Template/Declare/Tags.pm
==============================================================================
--- Template-Declare/lib/Template/Declare/Tags.pm (original)
+++ Template-Declare/lib/Template/Declare/Tags.pm Fri Apr 6 06:36:26 2007
@@ -403,40 +403,66 @@
templates are accessible and visible. If called from something that
isn't a Template::Declare, only public templates wil be visible.
+From the outside world, users can either call "Template::Declare->show()" or Template::Declare::tags::show()" to render a publicly visible template.
+
+"private" templates may only be called from within the C
+package.
+
+
=cut
sub show {
my $template = shift;
-
my $INSIDE_TEMPLATE = 0;
+ # if we're inside a template, we should show private templates
+ if ( caller->isa('Template::Declare') ) {
+ $INSIDE_TEMPLATE = 1;
+ } else {
+ Template::Declare->new_buffer_frame;
+ }
+ _show_template($template, $INSIDE_TEMPLATE);
+ my $data = Template::Declare->buffer->data;
+ unless ($INSIDE_TEMPLATE) { Template::Declare->end_buffer_frame }
+ return $data;
+}
+sub show_page {
+ my $template = shift;
+ my $INSIDE_TEMPLATE = 0;
# if we're inside a template, we should show private templates
- if ( caller()->isa('Template::Declare') ) { $INSIDE_TEMPLATE = 1; }
- else { Template::Declare->new_buffer_frame }
+ Template::Declare->new_buffer_frame;
+ _show_template($template, 0);
+ my $data = Template::Declare->buffer->data;
+ Template::Declare->end_buffer_frame;
+ Template::Declare->buffer->append($data);
+ return $data;
+
+}
+
+sub _show_template {
+ my $template = shift;
+ my $INSIDE_TEMPLATE = shift;
my $callable =
- (ref($template) && $template->isa('Template::Declare::Tag'))
+ ( ref($template) && $template->isa('Template::Declare::Tag') )
? $template
: Template::Declare->has_template( $template, $INSIDE_TEMPLATE );
# If the template was not found let the user know.
- unless ( $callable ) {
+ unless ($callable) {
my $msg = "The template '$template' could not be found";
$msg .= " (it might be private)" if !$INSIDE_TEMPLATE;
carp $msg;
return '';
}
- Template::Declare->new_buffer_frame;
- &$callable($self);
- my $content = Template::Declare->buffer->data;
- Template::Declare->end_buffer_frame;
- Template::Declare->buffer->append( $content);
- my $data = Template::Declare->buffer->data;
- unless ($INSIDE_TEMPLATE) { Template::Declare->end_buffer_frame }
- return $data;
-}
+ Template::Declare->new_buffer_frame;
+ &$callable($self);
+ my $content = Template::Declare->buffer->data;
+ Template::Declare->end_buffer_frame;
+ Template::Declare->buffer->append($content);
+}
sub _escape_utf8 {
my $val = shift;
use bytes;
Modified: Template-Declare/t/private.t
==============================================================================
--- Template-Declare/t/private.t (original)
+++ Template-Declare/t/private.t Fri Apr 6 06:36:26 2007
@@ -40,7 +40,7 @@
use Template::Declare::Tags;
Template::Declare->init(roots => ['Wifty::UI']);
-use Test::More tests => 12;
+use Test::More tests => 15;
use Test::Warn;
require "t/utils.pl";
@@ -78,5 +78,16 @@
ok_lint($simple);
}
+{
+ my $simple;
+ $simple = ( Template::Declare->show('private-content') );
+ warning_like
+ { $simple = ( Template::Declare->show('private-content') ); }
+ qr/could not be found.*private/,
+ "got warning";
+ unlike( $simple , qr'This is my content', "Can't call private templates" );
+ is($simple, undef);
+}
+
1;
Modified: Template-Declare/t/subclassing.t
==============================================================================
--- Template-Declare/t/subclassing.t (original)
+++ Template-Declare/t/subclassing.t Fri Apr 6 06:36:26 2007
@@ -79,7 +79,7 @@
qr/could not be found.*private/,
"got warning";
unlike( $simple , qr'This is my content' );
- ok_lint($simple);
+ is ($simple, undef);
}
{
Modified: Template-Declare/t/trivial.t
==============================================================================
--- Template-Declare/t/trivial.t (original)
+++ Template-Declare/t/trivial.t Fri Apr 6 06:36:26 2007
@@ -159,7 +159,9 @@
}
{
Template::Declare->buffer->clear;
-Template::Declare->show('simple');
+my $ret = Template::Declare->show('simple');
+#diag $ret;
+#diag (Template::Declare->buffer->data());
ok(Template::Declare->buffer->data() =~ 'This is my content', "show simple filled the buffer");
#diag ($simple);
ok_lint(Template::Declare->buffer->data());
From jifty-commit at lists.jifty.org Fri Apr 6 10:04:36 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 6 10:04:43 2007
Subject: [Jifty-commit] r3101 - in Template-Declare: lib/Template
lib/Template/Declare t
Message-ID: <20070406140436.886364D8238@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 6 10:04:34 2007
New Revision: 3101
Modified:
Template-Declare/ (props changed)
Template-Declare/lib/Template/Declare.pm
Template-Declare/lib/Template/Declare/Tags.pm
Template-Declare/t/closures.t
Template-Declare/t/private.t
Template-Declare/t/subclassing.t
Log:
r54523@dhcp207: jesse | 2007-04-06 23:04:19 +0900
* Patch from gugod++ to perform detection of duplicate html id elements
Modified: Template-Declare/lib/Template/Declare.pm
==============================================================================
--- Template-Declare/lib/Template/Declare.pm (original)
+++ Template-Declare/lib/Template/Declare.pm Fri Apr 6 10:04:34 2007
@@ -201,6 +201,7 @@
sub show {
my $class = shift;
my $template = shift;
+ local %Template::Declare::Tags::ELEMENT_ID_CACHE = () ;
return Template::Declare::Tags::show_page($template);
}
Modified: Template-Declare/lib/Template/Declare/Tags.pm
==============================================================================
--- Template-Declare/lib/Template/Declare/Tags.pm (original)
+++ Template-Declare/lib/Template/Declare/Tags.pm Fri Apr 6 10:04:34 2007
@@ -12,9 +12,9 @@
push @EXPORT, qw(Tr td ); # these two warns the user to use row/cell instead
our %ATTRIBUTES = ();
+our %ELEMENT_ID_CACHE = ();
our $DEPTH = 0;
-
=head1 NAME
Template::Declare::Tags
@@ -236,11 +236,19 @@
=cut
+
sub with (@) {
%ATTRIBUTES = ();
while ( my ( $key, $val ) = splice( @_, 0, 2 ) ) {
no warnings 'uninitialized';
$ATTRIBUTES{$key} = $val;
+
+ if ( lc($key) eq 'id' ) {
+ if ( $ELEMENT_ID_CACHE{$val}++) {
+ warn "HTML appears to contain illegal duplicate element id: $val";
+ }
+ }
+
}
wantarray ? () : '';
}
@@ -391,52 +399,59 @@
C displays templates.
-Do not call templates with arguments. That's not supported.
-XXX TODO: This makes jesse cry. Audrey/cl: sanity check?
+Do not call templates with arguments. That's not supported.
+XXX TODO: This makes jesse cry. Audrey/cl: sanity check?
-C can either be called with a template name or a package/object and
-a template. (It's both functional and OO.)
-
+C can either be called with a template name or a package/object
+and a template. (It's both functional and OO.)
If called from within a Template::Declare subclass, then private
templates are accessible and visible. If called from something that
isn't a Template::Declare, only public templates wil be visible.
-From the outside world, users can either call "Template::Declare->show()" or Template::Declare::tags::show()" to render a publicly visible template.
-
-"private" templates may only be called from within the C
-package.
+From the outside world, users can either call
+Cshow()> or C to
+render a publicly visible template.
+"private" templates may only be called from within the
+C package.
=cut
sub show {
- my $template = shift;
+ my $template = shift;
my $INSIDE_TEMPLATE = 0;
+
# if we're inside a template, we should show private templates
if ( caller->isa('Template::Declare') ) {
$INSIDE_TEMPLATE = 1;
- } else {
+ }
+ else {
Template::Declare->new_buffer_frame;
}
- _show_template($template, $INSIDE_TEMPLATE);
+ _show_template( $template, $INSIDE_TEMPLATE );
my $data = Template::Declare->buffer->data;
- unless ($INSIDE_TEMPLATE) { Template::Declare->end_buffer_frame }
+ unless ($INSIDE_TEMPLATE) {
+ Template::Declare->end_buffer_frame;
+ %ELEMENT_ID_CACHE = ();
+ }
return $data;
+
}
sub show_page {
my $template = shift;
my $INSIDE_TEMPLATE = 0;
+
# if we're inside a template, we should show private templates
- Template::Declare->new_buffer_frame;
- _show_template($template, 0);
+ Template::Declare->new_buffer_frame;
+ _show_template( $template, 0 );
my $data = Template::Declare->buffer->data;
- Template::Declare->end_buffer_frame;
- Template::Declare->buffer->append($data);
+ Template::Declare->end_buffer_frame;
+ Template::Declare->buffer->append($data);
+ %ELEMENT_ID_CACHE = (); # We're done. we can clear the cache
return $data;
-
}
sub _show_template {
Modified: Template-Declare/t/closures.t
==============================================================================
--- Template-Declare/t/closures.t (original)
+++ Template-Declare/t/closures.t Fri Apr 6 10:04:34 2007
@@ -93,7 +93,7 @@
for (qw(closure_1 closure_2 closure_3)) {
Template::Declare->buffer->clear;
my $simple = Template::Declare->show($_);
-diag ($simple);
+#diag ($simple);
ok($simple =~ /\s*\s*Bolded\s*<\/b>\s*<\/i>/ms);
ok_lint($simple);
}
@@ -103,7 +103,7 @@
Template::Declare->buffer->clear;
my $simple = Template::Declare->show($_);
ok($simple =~ /My\s*Bolded\s*<\/b>\s*<\/i>/ms);
-diag ($simple);
+#diag ($simple);
ok_lint(Template::Declare->buffer->data());
}
Modified: Template-Declare/t/private.t
==============================================================================
--- Template-Declare/t/private.t (original)
+++ Template-Declare/t/private.t Fri Apr 6 10:04:34 2007
@@ -40,7 +40,7 @@
use Template::Declare::Tags;
Template::Declare->init(roots => ['Wifty::UI']);
-use Test::More tests => 15;
+use Test::More tests => 14;
use Test::Warn;
require "t/utils.pl";
@@ -53,7 +53,7 @@
{
my $simple;
warning_like
- { $simple = ( show('does_not_exist') ); }
+ { $simple = ( show('does_not_exist') )||''; }
qr/could not be found.*private/,
"got warning";
unlike( $simple , qr'This is my content' );
@@ -71,7 +71,7 @@
{
my $simple;
warning_like
- { $simple = ( show('private-content') ); }
+ { $simple = ( show('private-content') ||''); }
qr/could not be found.*private/,
"got warning";
unlike( $simple , qr'This is my content', "Can't call private templates" );
@@ -85,7 +85,6 @@
{ $simple = ( Template::Declare->show('private-content') ); }
qr/could not be found.*private/,
"got warning";
- unlike( $simple , qr'This is my content', "Can't call private templates" );
is($simple, undef);
}
Modified: Template-Declare/t/subclassing.t
==============================================================================
--- Template-Declare/t/subclassing.t (original)
+++ Template-Declare/t/subclassing.t Fri Apr 6 10:04:34 2007
@@ -85,7 +85,7 @@
{
my $simple;
warning_like
- { $simple = ( show('private-content') ); }
+ { $simple = ( show('private-content')||'' ); }
qr/could not be found.*private/,
"got warning";
unlike( $simple , qr'This is my content', "Can't call private templates" );
From jifty-commit at lists.jifty.org Fri Apr 6 10:07:57 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 6 10:08:08 2007
Subject: [Jifty-commit] r3102 - in Template-Declare: t
Message-ID: <20070406140757.8622D4D8238@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 6 10:07:35 2007
New Revision: 3102
Added:
Template-Declare/t/duplicate_element_ids.t
Modified:
Template-Declare/ (props changed)
Log:
r54525@dhcp207: jesse | 2007-04-06 23:07:11 +0900
* duplicate id tests.
Added: Template-Declare/t/duplicate_element_ids.t
==============================================================================
--- (empty file)
+++ Template-Declare/t/duplicate_element_ids.t Fri Apr 6 10:07:35 2007
@@ -0,0 +1,102 @@
+
+use warnings;
+use strict;
+
+package Template::FarAway;
+use base qw/Template::Declare/;
+use Template::Declare::Tags;
+
+template with_no_dup_id => sub {
+ with( id => 'id' ), div {
+ p {'This is my content'}
+ }
+};
+
+template with_with_two_blocks => sub {
+ with( id => 'id' ), div {
+ p {'This is my content'}
+ }
+ div {
+ p {'another paragraph'}
+ }
+};
+
+template with_dup_id => sub {
+ with( id => 'foo' ), p {'This is my content'};
+ with( id => 'id' ), p {'another paragraph'};
+ show('with_with_two_blocks');
+ with( id => 'foo' ), p {'This is also my content'};
+};
+
+template with_dup_id_in_uppercase => sub {
+ with( ID => 'id' ), p {'another paragraph'};
+ show('with_with_two_blocks');
+};
+
+template with_dup_id2 => sub {
+ show('with_with_two_blocks');
+ show('with_with_two_blocks');
+};
+
+1;
+
+package main;
+use Test::More tests => 8;
+use Test::Warn;
+
+Template::Declare->init(roots => ['Template::FarAway']);
+
+
+
+{
+ warnings_like { Template::Declare->show('with_dup_id') }
+ [ qr/duplicate\b/i, qr/duplicate\b/i ], "Duplicate id should be warned";
+ Template::Declare->buffer->clear;
+}
+
+{
+ warnings_like { Template::Declare->show('with_dup_id2') }
+ [ qr/duplicate\b/i ], "Duplicate id should be warned";
+ Template::Declare->buffer->clear;
+}
+
+{
+ warning_like { Template::Declare->show('with_dup_id_in_uppercase') }
+ qr/duplicate\b/i, "Duplicate id given in different case should be warned";
+
+ Template::Declare->buffer->clear;
+}
+
+{
+ warning_is { Template::Declare->show('with_no_dup_id') } "",
+ "Should not duplicate id warnings if there are none.";
+ Template::Declare->buffer->clear;
+}
+
+use Template::Declare::Tags;
+
+{
+ warnings_like { show('with_dup_id') }
+ [ qr/duplicate\b/i, qr/duplicate\b/i ], "Duplicate id should be warned";
+ Template::Declare->buffer->clear;
+}
+
+{
+ warnings_like { show('with_dup_id2') }
+ [ qr/duplicate\b/i ], "Duplicate id should be warned";
+ Template::Declare->buffer->clear;
+}
+
+{
+ warning_like { show('with_dup_id_in_uppercase') }
+ qr/duplicate\b/i, "Duplicate id given in different case should be warned";
+
+ Template::Declare->buffer->clear;
+}
+
+{
+ warning_is { show('with_no_dup_id') } "",
+ "Should not duplicate id warnings if there are none.";
+ Template::Declare->buffer->clear;
+}
+
From jifty-commit at lists.jifty.org Fri Apr 6 12:09:00 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 6 12:09:03 2007
Subject: [Jifty-commit] r3103 - in jifty/trunk: .
Message-ID: <20070406160900.B6A084D8259@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 6 12:08:59 2007
New Revision: 3103
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54442@dhcp207: jesse | 2007-04-04 17:50:57 +0900
tweaking
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Fri Apr 6 12:08:59 2007
@@ -14,6 +14,10 @@
---
Not all DSLs are Englishy
---
+SQL
+---
+Regexes
+---
Excel Macros
---
XML config files
@@ -53,7 +57,7 @@
---
DHH demonstrated Rails migrations
---
-they looked very sexy
+They looked very sexy
---
I was very jealous
---
@@ -433,7 +437,7 @@
---
The person who told you it's wrong was lying to you.
---
-We're perl hackers
+We're Perl hackers
---
Why are we writing our templates in another language?
---
@@ -449,7 +453,7 @@
---
Because they ARE code
---
-Let's use our CODING tools to work with them.
+Let's use our CODING tools to work with them
---
#mode perl
#title Refactoring
@@ -485,7 +489,8 @@
---
Have you ever tried to refactor HTML?
---
-Our HTML is magically valid.
+Our HTML is magically valid
+---
(Syntax errors are...Syntax Errors)
---
#title Stashing our templates
From jifty-commit at lists.jifty.org Fri Apr 6 12:09:18 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 6 12:09:20 2007
Subject: [Jifty-commit] r3104 - in jifty/trunk: .
Message-ID: <20070406160918.C4EE54D8259@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 6 12:09:18 2007
New Revision: 3104
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/present-slides
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54443@dhcp207: jesse | 2007-04-04 23:33:32 +0900
* now with support for I18N (japanese)
Modified: jifty/trunk/doc/talks/present-slides
==============================================================================
--- jifty/trunk/doc/talks/present-slides (original)
+++ jifty/trunk/doc/talks/present-slides Fri Apr 6 12:09:18 2007
@@ -20,6 +20,8 @@
my $cmd = q{ osascript -e ' tell application "Terminal"' -e ' do script "tail -f /tmp/next_slide"' -e 'end tell' };
system($cmd);
while ( $counter <= $#SLIDES ) {
+ my $translation = '';
+
my $mode = 'text';
my ( $cols, $rows, undef, undef ) = GetTerminalSize();
my $slide = $SLIDES[$counter];
@@ -48,6 +50,9 @@
print "$title\n";
}
+ if ($slide =~ s/#\s*loc-ja\s*(.*?)$//sm) {
+ $translation = $1;
+ }
if ($slide =~ s/#\s*`(.*?)`//m) {
my $cmd = $1;
if(!$slides_played->{$counter}) {
@@ -88,6 +93,10 @@
$console->Cursor( 0, ( $rows - 1 ) );
print colored("$counter/" . $#SLIDES, "bold white");
+ if ($translation) {
+ $console->Cursor( 10 , ( $rows - 1 ) );
+ print colored($translation, "bold yellow on black");
+ }
ReadMode 4;
my $key = ReadKey(0);
ReadMode 0;
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Fri Apr 6 12:09:18 2007
@@ -3,6 +3,7 @@
---
#title A bit about DSLs
DSLs are little languages for specific programming tasks
+# loc-ja This is a test
---
DSLs are easier to read
---
@@ -44,6 +45,8 @@
---
(but it does take more work in Perl)
---
+How did I get here?
+---
#title How did I get here?
Airplane
---
@@ -75,6 +78,7 @@
(It does a lot more than Rails migrations)
---
One for web templating
+# loc-ja ?????????????
---
(Yes, another web templating system)
---
From jifty-commit at lists.jifty.org Fri Apr 6 12:10:26 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 6 12:10:27 2007
Subject: [Jifty-commit] r3105 - in jifty/trunk:
lib/Jifty/Plugin/User/Mixin/Model
Message-ID: <20070406161026.12E234D8259@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 6 12:10:25 2007
New Revision: 3105
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/User/Mixin/Model/User.pm
Log:
r54521@dhcp207: jesse | 2007-04-06 21:37:18 +0900
* let the "email confirmed" field be visible from the admin ui
Modified: jifty/trunk/lib/Jifty/Plugin/User/Mixin/Model/User.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/User/Mixin/Model/User.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/User/Mixin/Model/User.pm Fri Apr 6 12:10:25 2007
@@ -33,7 +33,7 @@
label is 'Email address', default is '', is immutable, is distinct;
column
email_confirmed => label is 'Email address confirmed?',
- type is 'boolean', render_as 'Unrendered';
+ type is 'boolean';
};
From jifty-commit at lists.jifty.org Fri Apr 6 12:10:56 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 6 12:10:59 2007
Subject: [Jifty-commit] r3106 - in jifty/trunk: .
Message-ID: <20070406161056.153E94D825A@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 6 12:10:56 2007
New Revision: 3106
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/present-slides
jifty/trunk/doc/talks/yapc.asia.2007.txt
Log:
r54522@dhcp207: jesse | 2007-04-06 21:37:27 +0900
* Talk updates
Modified: jifty/trunk/doc/talks/present-slides
==============================================================================
--- jifty/trunk/doc/talks/present-slides (original)
+++ jifty/trunk/doc/talks/present-slides Fri Apr 6 12:10:56 2007
@@ -59,19 +59,19 @@
`$cmd>/dev/null 2>/dev/null &`;
$slides_played->{$counter}++}
}
- if ( $slide =~ s/#\s*mode.*?perl.*?$//gms ) {
- $mode = 'perl';
+ if ( $slide =~ s/#\s*mode.*?(perl|ruby).*?$//gms ) {
+ $mode = $1;
}
if ( $mode eq 'text' and $slide ) {
$slide = autoformat $slide, { left => 2, right => ($cols-1), all => 1 };
}
- elsif ($mode eq 'perl') {
+ elsif ($mode =~ /(?:perl|ruby)/) {
$slide =~ s/^/ /gsm;
my $tidycols = $cols - 2; # squeeze for display
open my $out , ">/tmp/output.$$" || die $!;
print $out $slide || die $!;
close $out || die $!;
- $slide = ` cat /tmp/output.$$ | source-highlight -s perl -f esc`;
+ $slide = ` cat /tmp/output.$$ | source-highlight -s $mode -f esc`;
#$slide = ` cat /tmp/output.$$ | perltidy -q -l $tidycols| source-highlight -s perl -f esc`;
}
@@ -94,7 +94,8 @@
$console->Cursor( 0, ( $rows - 1 ) );
print colored("$counter/" . $#SLIDES, "bold white");
if ($translation) {
- $console->Cursor( 10 , ( $rows - 1 ) );
+ my $start = int ( ( $cols / 2 ) - ( length($translation) / 2 ) );
+ $console->Cursor( $start , ( $rows - 1 ) );
print colored($translation, "bold yellow on black");
}
ReadMode 4;
Modified: jifty/trunk/doc/talks/yapc.asia.2007.txt
==============================================================================
--- jifty/trunk/doc/talks/yapc.asia.2007.txt (original)
+++ jifty/trunk/doc/talks/yapc.asia.2007.txt Fri Apr 6 12:10:56 2007
@@ -3,7 +3,6 @@
---
#title A bit about DSLs
DSLs are little languages for specific programming tasks
-# loc-ja This is a test
---
DSLs are easier to read
---
@@ -221,10 +220,9 @@
---
shit! it actually works!
---
-
What we had left:
-
-the field foo => sub {}; issue
+---
+the "field foo => sub {};" issue
---
#mode perl
@@ -265,7 +263,6 @@
---
#title In the end...
-
We ended up with Jifty::DBI columns
---
#mode perl
@@ -284,7 +281,7 @@
valid are formatted_timezones();
};
---
-Implemented it twice
+We implemented the DSL twice
---
#title
Take 1
@@ -350,8 +347,10 @@
since(is('0.0.7'));
---
Downsides
-- Limited flexibility
-- Needs new functions for every attribute
+---
+Limited flexibility
+---
+Needs new functions for every attribute
---
#title Take 2
#`mpg123 ~/katamari.mp3`
@@ -431,6 +430,22 @@
}
};
---
+#mode perl
+template choices => page {
+ h1 { 'My Choices' }
+ dl {
+ my $choices = Doxory::Model::ChoiceCollection->new;
+ $choices->limit(
+ column => 'asked_by',
+ value => Jifty->web->current_user->id,
+ );
+ while (my $c = $choices->next) {
+ dt { $c->name, ' (', $c->asked_by->name, ')' }
+ dd { b { $c->a } em { 'vs' } b { $c->b } }
+ }
+ }
+};
+---
But!
---
Content! Templates!
@@ -449,7 +464,7 @@
---
It's 2007
---
-People use CSS for design now.
+People use CSS for design now
---
Programmers still have to make templates
---
@@ -505,7 +520,7 @@
---
But where do we put these?
---
-We need a global stash.
+We need a global stash
---
It needs to be per package
(Don't want to mix things together)
@@ -521,8 +536,8 @@
Actually, Perl doesn't care
---
#mode perl
- no strict 'refs';
- *{ $class . '::' . $subname } = $coderef;}
+no strict 'refs';
+*{ $class . '::' . $subname } = $coderef;
---
That just works.
---
@@ -530,8 +545,9 @@
---
But how do you call it?
---
+#mode perl
# perldoc UNIVERSAL
-
+---
CLASS->can( METHOD )
"can" checks if the object or class has a method called "METHOD".
If it does then a reference to the sub is returned.
@@ -539,12 +555,14 @@
#title Closures
Now, about that syntax.
---
-HTML tags take blocks of content.
+HTML tags take blocks of content
---
-Our tag methods take blocks of perl.
+Our tag methods take blocks of Perl
---
They return closures when you want them to
---
+They run and output their content when you want them to
+---
#mode perl
sub h1 (&;$) {
my $code = shift;
@@ -555,10 +573,11 @@
return sub { ...closure around $code...};
} else {
# Actually do our work, run $code and return the output
+ return $code->();
}
}
---
-We install methods for ever HTML tag
+We install methods for every HTML tag
---
(Except 'tr'. Anybody know why?)
---
@@ -578,9 +597,8 @@
# mode perl
# What we've got:
-div {
- attr { id => 'my-div'};
- ...
+div { attr { id => 'my-div'};
+ ...
};
# and
@@ -598,10 +616,9 @@
---
So, what's the big problem?
---
-Just change the prototype.
+Just change the prototype
---
-In Perl, the (&) in a prototype
-may ONLY come first.
+In Perl, the (&) in a prototype MUST come first
---
ORZ
---
From jifty-commit at lists.jifty.org Fri Apr 6 12:11:14 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 6 12:11:17 2007
Subject: [Jifty-commit] r3107 - in jifty/trunk: lib/Jifty
lib/Jifty/View/Mason
Message-ID: <20070406161114.E64014D8259@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 6 12:11:14 2007
New Revision: 3107
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Dispatcher.pm
jifty/trunk/lib/Jifty/View/Mason/Handler.pm
Log:
r54527@dhcp207: jesse | 2007-04-07 00:33:45 +0900
* Refactoring to support more template engines
Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm Fri Apr 6 12:11:14 2007
@@ -1115,6 +1115,9 @@
return $text;
}
+sub _template_handlers { qw(declare_handler mason) }
+sub _fallback_template_handler { 'mason' }
+
=head2 template_exists PATH
Returns true if PATH is a valid template inside your template root. This checks
@@ -1123,11 +1126,15 @@
=cut
sub template_exists {
- my $self = shift;
+ my $self = shift;
my $template = shift;
- return Jifty->handler->declare_handler->template_exists($template)
- || Jifty->handler->mason->interp->comp_exists( $template);
+ foreach my $handler ( $self->_template_handlers) {
+ if ( Jifty->handler->$handler->template_exists($template) ) {
+ return 1;
+ }
+ }
+ return undef;
}
@@ -1143,17 +1150,21 @@
sub render_template {
my $self = shift;
my $template = shift;
-
+ my $showed = 0;
eval {
- my( $val) = Jifty->handler->declare_handler->template_exists($template);
- if ($val) {
- Jifty->handler->declare_handler->show($template);
- } else {
- Jifty->handler->mason->handle_comp( $template );
- }
-
+ foreach my $handler ( $self->_template_handlers ) {
+ if (Jifty->handler->$handler->template_exists($template) ) {
+ $showed = 1;
+ Jifty->handler->$handler->show($template);
+ last;
+ }
+ }
+ if (not $showed and my $fallback_handler = $self->_fallback_template_handler) {
+ Jifty->handler->$fallback_handler->show($template);
+ }
};
+
my $err = $@;
# Handle parse errors
Modified: jifty/trunk/lib/Jifty/View/Mason/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Mason/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/View/Mason/Handler.pm Fri Apr 6 12:11:14 2007
@@ -139,14 +139,35 @@
}
-=head2 handle_comp COMPONENT
+=head2 template_exists COMPONENT
+
+A convenience method for $self->interp->comp_exists().
+(Jifty uses this method as part of its standard Templating system API).
+
+=cut
+
+sub template_exists {
+ my $self = shift;
+ return $self->interp->comp_exists(@_);
+}
+
+
+=head2 show COMPONENT
Takes a component path to render. Deals with setting up a global
L and Request object, and calling the
component.
+=head2 handle_comp
+
+A synonym for show
+
=cut
+sub show {
+ shift->handle_comp(@_);
+}
+
sub handle_comp {
my ($self, $comp) = (shift, shift);
From jifty-commit at lists.jifty.org Fri Apr 6 12:11:45 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 6 12:11:47 2007
Subject: [Jifty-commit] r3108 - in jifty/trunk: lib/Jifty
lib/Jifty/View/Declare lib/Jifty/View/Mason
plugins/EditInPlace/lib/Jifty/Plugin/EditInPlace/Action
Message-ID: <20070406161145.8D0EC4D8259@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 6 12:11:45 2007
New Revision: 3108
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Handler.pm
jifty/trunk/lib/Jifty/View/Declare/Handler.pm
jifty/trunk/lib/Jifty/View/Mason/Handler.pm
jifty/trunk/plugins/EditInPlace/lib/Jifty/Plugin/EditInPlace/Action/FileEditor.pm
Log:
r54528@dhcp207: jesse | 2007-04-07 00:49:58 +0900
*more refactorign to extract templating stuff
Modified: jifty/trunk/lib/Jifty/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/Handler.pm Fri Apr 6 12:11:45 2007
@@ -83,8 +83,8 @@
sub setup_view_handlers {
my $self = shift;
- $self->declare_handler( Jifty::View::Declare::Handler->new( $self->templatedeclare_config));
- $self->mason( Jifty::View::Mason::Handler->new( $self->mason_config ) );
+ $self->declare_handler( Jifty::View::Declare::Handler->new());
+ $self->mason( Jifty::View::Mason::Handler->new());
$self->static_handler(Jifty::View::Static::Handler->new());
}
@@ -104,84 +104,6 @@
}
-=head2 mason_config
-
-Returns our Mason config. We use the component root specified in the
-C framework configuration variable (or C by
-default). Additionally, we set up a C component root, as
-specified by the C configuration. All
-interpolations are HTML-escaped by default, and we use the fatal error
-mode.
-
-=cut
-
-sub mason_config {
- my %config = (
- static_source => 1,
- use_object_files => 1,
- preprocess => sub {
- # Force UTF-8 semantics on all our components by
- # prepending this block to all components as Mason
- # components defaults to parse the text as Latin-1
- ${$_[0]} =~ s!^!<\%INIT>use utf8;\%INIT>\n!;
- },
- data_dir => Jifty::Util->absolute_path( Jifty->config->framework('Web')->{'DataDir'} ),
- allow_globals => [
- qw[ $JiftyWeb ],
- @{Jifty->config->framework('Web')->{'Globals'} || []},
- ],
- comp_root => [
- [application => Jifty::Util->absolute_path( Jifty->config->framework('Web')->{'TemplateRoot'} )],
- ],
- %{ Jifty->config->framework('Web')->{'MasonConfig'} },
- );
-
- for my $plugin (Jifty->plugins) {
- my $comp_root = $plugin->template_root;
- unless ( $comp_root and -d $comp_root) {
- next;
- }
- Jifty->log->debug( "Plugin @{[ref($plugin)]} mason component root added: (@{[$comp_root ||'']})");
- push @{ $config{comp_root} }, [ ref($plugin)."-".Jifty->web->serial => $comp_root ];
- }
- push @{$config{comp_root}}, [jifty => Jifty->config->framework('Web')->{'DefaultTemplateRoot'}];
-
- # In developer mode, we want halos, refreshing and all that other good stuff.
- if (Jifty->config->framework('DevelMode') ) {
- push @{$config{'plugins'}}, 'Jifty::Mason::Halo';
- $config{static_source} = 0;
- $config{use_object_files} = 0;
- }
- return %config;
-
-}
-
-
-=head2 templatedeclare_config
-
-=cut
-
-sub templatedeclare_config {
-
- my %config = (
- %{ Jifty->config->framework('Web')->{'TemplateDeclareConfig'} ||{}},
- );
-
- for my $plugin ( Jifty->plugins ) {
- my $comp_root = $plugin->template_class;
- Jifty::Util->require($comp_root);
- unless (defined $comp_root and $comp_root->isa('Template::Declare') ){
- next;
- }
- Jifty->log->debug( "Plugin @{[ref($plugin)]}::View added as a Template::Declare root");
- push @{ $config{roots} }, $comp_root ;
- }
-
- push @{$config{roots}}, Jifty->config->framework('TemplateClass');
-
- return %config;
-}
-
=head2 cgi
Returns the L object for the current request, or C if
Modified: jifty/trunk/lib/Jifty/View/Declare/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/View/Declare/Handler.pm Fri Apr 6 12:11:45 2007
@@ -28,11 +28,37 @@
my $class = shift;
my $self = {};
bless $self,$class;
- Template::Declare->init(@_);
+
+ Template::Declare->init(@_ || $self->config());
return $self;
}
+=head2 config
+
+=cut
+
+sub config {
+
+ my %config = (
+ %{ Jifty->config->framework('Web')->{'TemplateDeclareConfig'} ||{}},
+ );
+
+ for my $plugin ( Jifty->plugins ) {
+ my $comp_root = $plugin->template_class;
+ Jifty::Util->require($comp_root);
+ unless (defined $comp_root and $comp_root->isa('Template::Declare') ){
+ next;
+ }
+ Jifty->log->debug( "Plugin @{[ref($plugin)]}::View added as a Template::Declare root");
+ push @{ $config{roots} }, $comp_root ;
+ }
+
+ push @{$config{roots}}, Jifty->config->framework('TemplateClass');
+
+ return %config;
+}
+
=head2 show TEMPLATENAME
Render a template. Expects that the template and any jifty methods called internally will end up being returned as a scalar, which we then print to STDOUT
Modified: jifty/trunk/lib/Jifty/View/Mason/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Mason/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/View/Mason/Handler.pm Fri Apr 6 12:11:45 2007
@@ -54,7 +54,7 @@
sub new {
my $package = shift;
- my %p = @_;
+ my %p = @_ || $package->config;
my $self = $package->SUPER::new( request_class => 'HTML::Mason::Request::Jifty',
out_method => \&out_method,
%p );
@@ -66,6 +66,57 @@
}
+=head2 config
+
+Returns our Mason config. We use the component root specified in the
+C framework configuration variable (or C by
+default). Additionally, we set up a C component root, as
+specified by the C configuration. All
+interpolations are HTML-escaped by default, and we use the fatal error
+mode.
+
+=cut
+
+sub config {
+ my %config = (
+ static_source => 1,
+ use_object_files => 1,
+ preprocess => sub {
+ # Force UTF-8 semantics on all our components by
+ # prepending this block to all components as Mason
+ # components defaults to parse the text as Latin-1
+ ${$_[0]} =~ s!^!<\%INIT>use utf8;\%INIT>\n!;
+ },
+ data_dir => Jifty::Util->absolute_path( Jifty->config->framework('Web')->{'DataDir'} ),
+ allow_globals => [
+ qw[ $JiftyWeb ],
+ @{Jifty->config->framework('Web')->{'Globals'} || []},
+ ],
+ comp_root => [
+ [application => Jifty::Util->absolute_path( Jifty->config->framework('Web')->{'TemplateRoot'} )],
+ ],
+ %{ Jifty->config->framework('Web')->{'MasonConfig'} },
+ );
+
+ for my $plugin (Jifty->plugins) {
+ my $comp_root = $plugin->template_root;
+ unless ( $comp_root and -d $comp_root) {
+ next;
+ }
+ Jifty->log->debug( "Plugin @{[ref($plugin)]} mason component root added: (@{[$comp_root ||'']})");
+ push @{ $config{comp_root} }, [ ref($plugin)."-".Jifty->web->serial => $comp_root ];
+ }
+ push @{$config{comp_root}}, [jifty => Jifty->config->framework('Web')->{'DefaultTemplateRoot'}];
+
+ # In developer mode, we want halos, refreshing and all that other good stuff.
+ if (Jifty->config->framework('DevelMode') ) {
+ push @{$config{'plugins'}}, 'Jifty::Mason::Halo';
+ $config{static_source} = 0;
+ $config{use_object_files} = 0;
+ }
+ return %config;
+}
+
=head2 out_method
The default output method. Sets the content-type to Cargument_value('source_path');
my $type = $self->argument_value('file_type');
my $out = '';
- my %cfg = Jifty->handler->mason_config;
+ my %cfg = Jifty->handler->mason->config;
my($local_template_base, $qualified_path);
if ($type eq "mason_component") {
From jifty-commit at lists.jifty.org Fri Apr 6 12:12:03 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 6 12:12:05 2007
Subject: [Jifty-commit] r3109 - in jifty/trunk: lib/Jifty
Message-ID: <20070406161203.C24824D8259@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 6 12:12:03 2007
New Revision: 3109
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Dispatcher.pm
jifty/trunk/lib/Jifty/Handler.pm
Log:
r54529@dhcp207: jesse | 2007-04-07 01:08:43 +0900
* Refactor and extract
Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm Fri Apr 6 12:12:03 2007
@@ -1115,8 +1115,6 @@
return $text;
}
-sub _template_handlers { qw(declare_handler mason) }
-sub _fallback_template_handler { 'mason' }
=head2 template_exists PATH
@@ -1129,7 +1127,7 @@
my $self = shift;
my $template = shift;
- foreach my $handler ( $self->_template_handlers) {
+ foreach my $handler ( Jifty->handler->_template_handlers) {
if ( Jifty->handler->$handler->template_exists($template) ) {
return 1;
}
@@ -1152,14 +1150,14 @@
my $template = shift;
my $showed = 0;
eval {
- foreach my $handler ( $self->_template_handlers ) {
+ foreach my $handler (Jifty->handler->_template_handlers ) {
if (Jifty->handler->$handler->template_exists($template) ) {
$showed = 1;
Jifty->handler->$handler->show($template);
last;
}
}
- if (not $showed and my $fallback_handler = $self->_fallback_template_handler) {
+ if (not $showed and my $fallback_handler = Jifty->handler->_fallback_template_handler) {
Jifty->handler->$fallback_handler->show($template);
}
Modified: jifty/trunk/lib/Jifty/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/Handler.pm Fri Apr 6 12:12:03 2007
@@ -72,6 +72,9 @@
return $self;
}
+sub _template_handlers { qw(declare_handler mason) }
+sub _fallback_template_handler { 'mason' }
+
=head2 setup_view_handlers
Initialize all of our view handlers.
From jifty-commit at lists.jifty.org Sat Apr 7 00:22:37 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sat Apr 7 00:22:48 2007
Subject: [Jifty-commit] r3110 - in jifty/trunk: lib/Jifty/Server
lib/Jifty/Server/Prefork
Message-ID: <20070407042237.8C37E4D807D@diesel.bestpractical.com>
Author: jesse
Date: Sat Apr 7 00:22:29 2007
New Revision: 3110
Added:
jifty/trunk/lib/Jifty/Server/Prefork/
jifty/trunk/lib/Jifty/Server/Prefork.pm
jifty/trunk/lib/Jifty/Server/Prefork/NetServer.pm
Modified:
jifty/trunk/ (props changed)
Log:
r54553@dhcp207: jesse | 2007-04-07 00:22:09 -0400
* Preforking server support for Jifty::Server
Added: jifty/trunk/lib/Jifty/Server/Prefork.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Server/Prefork.pm Sat Apr 7 00:22:29 2007
@@ -0,0 +1,29 @@
+package Jifty::Server::Prefork;
+use Net::Server::Prefork ();
+use base 'Jifty::Server';
+
+=head1 NAME
+
+Jifty::Server::Prefork - Jifty::Server that supports multiple connections
+
+=head1 SYNOPSIS
+
+In your F:
+
+ framework:
+ Web:
+ ServerClass: Jifty::Server::Prefork
+
+=head1 METHODS
+
+=head2 net_server
+
+This module depends on the L module, which is part of
+the L CPAN distribution.
+
+=cut
+
+sub net_server { 'Jifty::Server::Prefork::NetServer' }
+
+
+1;
Added: jifty/trunk/lib/Jifty/Server/Prefork/NetServer.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Server/Prefork/NetServer.pm Sat Apr 7 00:22:29 2007
@@ -0,0 +1,10 @@
+
+package Jifty::Server::Prefork::NetServer;
+
+use base 'Net::Server::PreFork';
+
+sub child_init_hook {
+ Jifty->setup_database_connection();
+}
+
+1;
From jifty-commit at lists.jifty.org Sun Apr 8 10:18:59 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 8 10:19:10 2007
Subject: [Jifty-commit] r3111 - jifty/trunk/doc/talks
Message-ID: <20070408141859.AA62D4D801A@diesel.bestpractical.com>
Author: ishigaki
Date: Sun Apr 8 10:18:58 2007
New Revision: 3111
Added:
jifty/trunk/doc/talks/yapc.asia.2007.ja.txt
Log:
added Japanese translation of Jesse's talk at YAPC::Asia 2007
Added: jifty/trunk/doc/talks/yapc.asia.2007.ja.txt
==============================================================================
--- (empty file)
+++ jifty/trunk/doc/talks/yapc.asia.2007.ja.txt Sun Apr 8 10:18:58 2007
@@ -0,0 +1,934 @@
+#title Jesse Vincent - Best Practical
+Domain Specific Languages in Perl
+# loc-ja: Perl?DSL
+---
+#title A bit about DSLs
+# loc-ja: DSL?????
+DSLs are little languages for specific programming tasks
+# loc-ja: ??????????????????????
+---
+DSLs are easier to read
+# loc-ja: DSL?????????
+---
+DSLs are more expressive
+# loc-ja: ??????
+---
+DSLs let you optimize your code for coding
+# loc-ja: ???????????????????????
+---
+Mostly, I'm going to talk about "Englishy" DSLs
+# loc-ja: ??????????????????DSL???????
+---
+Not all DSLs are Englishy
+# loc-ja: DSL???????????????????????
+---
+Excel Macros
+# loc-ja: Excel????
+---
+XML config files
+# loc-ja: XML???????
+---
+XSL-T
+---
+GraphViz
+---
+...but I've been on an Englishy DSL kick
+# loc-ja: ?????????????????????DSL??????
+---
+DSLs can be implemented in your 'host' language
+# loc-ja: DSL??????????????????????
+---
+(These get called "internal" DSLs)
+# loc-ja: ??????????DSL?????
+---
+DSLs can be implemented outside your 'host' langauge
+# loc-ja: ???????????????????????
+---
+(External DSLs)
+# loc-ja: ????????DSL?
+---
+Everything I'm going to talk about is Pure Perl (Internal)
+# loc-ja: ??????Pure Perl?????????DSL???
+---
+The Ruby community is big on DSLs
+# loc-ja: DSL???????Ruby??????????
+---
+You can make DSLs in Perl, too
+# loc-ja: Perl?DSL??????????
+---
+(but it does take more work in Perl)
+# loc-ja: Perl???????????????
+---
+#title How did I get here?
+# loc-ja: ????????????
+Airplane
+# loc-ja: ???
+---
+Narita Express
+# loc-ja: ????????????
+---
+Subway
+# loc-ja: ???????
+---
+Ok, How'd I really get here?
+# loc-ja: ???????
+---
+All started at OSCON 2005
+# loc-ja: ???OSCON 2005???
+---
+DHH demonstrated Rails migrations
+# loc-ja: DHH?Rails???????????????????????
+---
+they looked very sexy
+# loc-ja: ??????????????
+---
+I was very jealous
+# loc-ja: ??????????????????
+---
+"You can't do this in any other language"
+# loc-ja: ?????????????????????
+---
+Never say that to a Perl Hacker
+# loc-ja: Perl?????????????????????
+---
+#title Agenda
+# loc-ja: ?????
+We've made some DSLs
+# loc-ja: Best Practical???????DSL???????
+---
+One for declaring database schema
+# loc-ja: ?????????????????????????
+---
+(I thought Rails did more. But I never read the manual)
+# loc-ja: Rails??????????????????Rails????????????????
+---
+(It does a lot more than Rails migrations)
+# loc-ja: ???Rails????????????????????????????
+---
+One for web templating
+# loc-ja: ????????????????
+---
+(Yes, another web templating system)
+# loc-ja: ???????????????????????????????
+---
+(Hopefully, this one will provide some closure)
+# loc-ja: ?????????????????????????
+---
+(You'll see)
+# loc-ja: ?????
+---
+One for making web testing easier
+# loc-ja: ??????????????????????????
+---
+(It's VERY beta)
+# loc-ja: ???????????????
+---
+(Perfect for Web 2.0)
+# loc-ja: Web 2.0???????
+---
+#title
+Jifty::DBI::Schema
+---
+#title Jifty::DBI::Schema - The design process
+# loc-ja: Jifty::DBI::Schema ??????
+Delarative Syntax for an Object Relational Mapper
+# loc-ja: ?????????????????????????????
+---
+Started sketching Jifty::DBI columns
+# loc-ja: Jifty::DBI???????????????????
+---
+Started with DBIx::SearchBuilder
+# loc-ja: ?????DBIx::SearchBuilder?
+---
+Columns were defined as a hash
+# loc-ja: ???????????
+---
+Hashes are ugly
+# loc-ja: ???????????
+---
+We spent about a month playing with syntax.
+# loc-ja: ?????????????????????
+---
+Our first goal was "feels right"
+# loc-ja: ????????????????????????????
+---
+Our second goal was "we can implement this"
+# loc-ja: ???????????????????????????
+---
+I'm going to show you some of our design process
+# loc-ja: ????????????????
+---
+(It's a mix of code and IRC)
+# loc-ja: ????IRC???????????
+---
+#mode perl
+$x = Jifty::DBI::SchemaBuilder->new;
+$x->define_blablalb
+$x->bla bla
+---
+#mode perl
+our db_table 'addresses';
+our field name => {
+ has_type 'varchar';
+ has_default 'frank'
+};
+---
+ (by the way, i'm pretty sure we don't get to do the sub-at-the-end thing either... I tried lots of hacky ways to get it working and failed.)
+# loc-ja: ?????????????????????????????????????????????????????
+
+ yeah, I think we're going to end up having a pseudo-sub that's really a hash behind the scenes
+# loc-ja: ???????sub???????????????????????????
+---
+#mode perl
+{
+ my $s = Jifty::DBI::SG->import_functions;
+
+ db_table bla bla bla;
+ field bla;
+ field bar;
+} # $s.DESTROY gets called and unimports db_table/field/...
+# loc-ja: ???$s.DESTROY?????db_table/field/...????????????
+---
+(This was astonishingly close to what we do today.)
+# loc-ja: ??????????????????
+---
+#mode perl
+my $schema = Jifty::DBI::RecordSchema->new;
+$schema->for_class(__PACKAGE__);
+
+$schema->field name => {
+ has_type 'varchar';
+ has_default 'Frank'
+}
+---
+#mode perl
+
+BEGIN { @ISA = 'Jifty::DBI::Record' }
+use Jifty::DBI::Record; # but this sucks!
+
+use base qw/Jifty::DBI::Record/;
+
+__PACKAGE__->schema_version (0.0001)
+# (or some other method that does two thing evily).
+# loc-ja: ??2??????????????????????
+---
+ we could tie @ISA
+# loc-ja: @ISA?tie???????????
+
+ ...I'm kidding
+# loc-ja: ?????????
+---
+ we could tie the symbol table
+# loc-ja: ?????????tie??????????
+
+ ...It just doesn't work
+# loc-ja: ??????
+---
+#mode perl
+use base 'Jifty::DBI::Record';
+Jifty::DBI::Record->___from_code();
+
+db_table 'addresses';
+
+field {
+ called 'name'; # ?
+}
+---
+ is
+
+ "has_type 'string'"
+
+definitely better than
+
+ "type => 'string'"
+
+in your book?
+# loc-ja: "has_type 'string'" ?? "type => 'string'" ??????????????
+---
+ how would you do:
+# loc-ja: ??????????????
+
+ refers_to_many RT::Tickets by 'owner';
+
+ hmm. i thought about this before. we can do like simon and
+# loc-ja: ????????????simon???????????
+
+ refers_to_many "RT::Tickets by owner";
+
+ but I don't really like that. parsing is lame.
+# loc-ja: ?????????????????????????
+
+ I'm *pretty* sure that we can't get the line you've written to compile.
+# loc-ja: ???Jesse????????????????????????????
+---
+ I've got a bad perl5 idea for you. Robert claims it's impossible
+# loc-ja: ?????????????Robert????????????????
+
+ I'm trying to make the syntax "refers_to_many 'BTDT::Model::Tasks' by 'owner';" valid perl5 syntax.
+# loc-ja: ??? "refers_to_many 'BTDT::Model::Tasks' by 'owner';" ?????perl5???????????????????????
+---
+ well, that may be true but you don't want that.
+# loc-ja: ??????????????????????????
+
+ refers_to_many BTDT::Model::Tasks by 'owner'
+
+ is more readable and easily implemented.
+# loc-ja: ?????????????????
+
+ sub by ($) { by => @_ }
+
+ done!
+# loc-ja: ?????!
+
+ stop thinking classes as strings :)
+# loc-ja: ??????????????????? :)
+---
+ shit! it actually works!
+# loc-ja: ??????! ????????!
+---
+
+What we had left:
+# loc-ja: ?????????
+
+the field foo => sub {}; issue
+# loc-ja: field foo => sub {}; ????
+---
+#mode perl
+
+ # We wanted something that acted like this
+ # But without the ugly 'sub' keyword
+ field email => sub {
+
+ has_type 'varchar';
+ has_default 'Frank';
+};
+
+# loc-ja: ??????'sub'???????????????????
+---
+#mode perl
+# We could do this, but it used a hash
+# not a block
+
+field phone => {
+ has_type 'varchar';
+};
+
+field employee_id => {
+ refers_to_a Sample::Employee;
+}
+# loc-ja: ????????????????????????????????
+---
+#mode perl
+
+# This is ugly and verbose
+
+package Sample::Employee;
+
+use base qw/Jifty::DBI::Record/;
+
+__PACKAGE__->db_table 'employees';
+
+__PACKAGE__->field name => has_type 'varchar';
+
+__PACKAGE__->field dexterity => { has_type 'integer'};
+
+# loc-ja: ????????????????
+---
+#title In the end...
+# loc-ja: ???
+
+We ended up with Jifty::DBI columns
+# loc-ja: Jifty::DBI?????????????
+---
+#mode perl
+use Jifty::DBI::Record schema {
+column auth_token => type is 'text',
+ render as 'Unrendered';
+
+column score => type is 'int',
+ is immutable,
+ label is 'Score';
+
+column time_zone =>
+ label is 'Time zone',
+ since '0.0.12',
+ default is 'America/New_York',
+ valid are formatted_timezones();
+};
+---
+Implemented it twice
+# loc-ja: ?????2???????
+---
+#title
+Take 1
+# loc-ja: ????????
+---
+#title Take 1
+# loc-ja: ?????
+Jifty::DBI::Schema
+---
+#title Take 1: Jifty::DBI::Schema
+# loc-ja: ?????: Jifty::DBI::Schema
+Our first DSL in Perl
+# loc-ja: Best Practical??????Perl????DSL
+---
+We beat the parser into submission with a few tricks
+# loc-ja: ?????????????????????????????
+---
+Injection of functions
+# loc-ja: ???????
+---
+We saw that a moment ago
+# loc-ja: ??????????
+---
+Clever function prototypes
+# loc-ja: ???????????
+---
+Let's have a look at that
+# loc-ja: ?????????
+---
+#mode perl
+# The syntax we wanted
+
+score => type is 'int',
+ is immutable,
+ default is '0',
+ render as 'text',
+ label is 'Score',
+ since is '0.0.7';
+# loc-ja: ?????????????
+---
+#mode perl
+# perl -MO=Deparse parses that as:
+
+'is'->type('int',
+ 'immutable'->is,
+ 'is'->default('0',
+ 'as'->render('text',
+ 'is'->label('Score',
+ 'is'->since('0.0.7')))));
+# loc-ja: perl -MO=Deparse ??????????????????
+---
+How can we fix that?
+# loc-ja: ????????????
+---
+Prototype hacking!
+# loc-ja: ???????????????!
+---
+#mode perl
+sub is ($) { return shift };
+sub as ($) { return shift };
+sub since ($) { }
+sub type ($) { }
+sub render ($) {}
+sub label ($) {}
+sub default ($) {}
+---
+#mode perl
+
+# Now, perl -MO=Deparse parses that as:
+
+ type(is('int')),
+ is('immutable'),
+ default(is('0')),
+ render(as('text')),
+ label(is('Score')),
+ since(is('0.0.7'));
+# loc-ja: ??? perl -MO=Deparse ????????
+---
+Downsides
+# loc-ja: ?????
+- Limited flexibility
+# loc-ja: ???????
+- Needs new functions for every attribute
+# loc-ja: ????????????????????
+---
+#title Take 2
+# loc-ja: 2?????
+#`mpg123 ~/katamari.mp3`
+Object::Declare
+---
+#title Take 2: Object::Declare
+# loc-ja: 2?????: Object::Declare
+Katamari for Code
+# loc-ja: ?????
+---
+#mode perl
+use Jifty::DBI::Record schema {
+
+ column score => type is 'int',
+ is immutable,
+ render as 'text',
+ default is '0',
+ label is 'Score',
+ since is '0.0.7';
+};
+---
+# mode perl
+# perl -MO=Deparse parses that as:
+
+'is'->type('int',
+ 'immutable'->is,
+ 'is'->default('0',
+ 'as'->render('text',
+ 'is'->label('Score',
+ 'is'->since('0.0.7')))));
+# loc-ja: perl -MO=Deparse ??????????
+---
+Why fight the parser?
+# loc-ja: ??????????????????????
+---
+Perl gives us all the rope we need
+# loc-ja: Perl????????????????
+---
+UNIVERSAL:: and ::AUTOLOAD
+# loc-ja: UNIVERSAL:: ? ::AUTOLOAD ?
+---
+What actually happens at compile time:
+
+# loc-ja: ???????????????????????????
+---
+The 'schema' function in our baseclass takes a code block
+# loc-ja: ???????'schema'???????????????
+---
+...and returns a closure
+# loc-ja: ????????
+---
+Jifty::DBI::Record::import takes over:
+# loc-ja: ???Jifty::DBI::Record::import?
+---
+it takes the closure
+# loc-ja: ?????????????
+---
+it installs some methods...
+# loc-ja: ??????????????????
+---
+...is::AUTOLOAD and UNIVERSAL::is and as::AUTOLOAD
+# loc-ja: is::AUTOLOAD ?? UNIVERSAL::is ?? as::AUTOLOAD ???
+---
+it runs the closure
+# loc-ja: ??????????
+---
+it hands the result off to a method of your choice
+# loc-ja: ??????????????
+---
+it removes its magic symbols
+# loc-ja: ?????????????????
+---
+...and then your program gets control back
+# loc-ja: ???????????????
+---
+#title Jifty::DBI::Schema - end
+# loc-ja: Jifty::DBI::Schema - ????
+That's Jifty::DBI::Schema.
+# loc-ja: Jifty::DBI::Schema ??????
+---
+#title
+Template::Declare
+---
+#title Template::Declare
+A pure Perl Templating Language
+# loc-ja: pure Perl?????????
+---
+What it looks like
+# loc-ja: ????
+---
+#mode perl
+template '/pages/mypage.html' => sub {
+ html {
+ head {};
+ body {
+ h1 {'Hey, this is text'};
+ }
+ }
+};
+---
+But!
+# loc-ja: ???!
+---
+Content! Templates!
+# loc-ja: ?????! ??????!
+---
+Design! Code!
+# loc-ja: ????! ???!
+---
+OMGWTF!? THAT'S WRONG!
+# loc-ja: ?????!? ??????!
+---
+The person who told you it's wrong was lying to you.
+# loc-ja: ???????????????????????????
+---
+We're perl hackers
+# loc-ja: ????perl?????????
+---
+Why are we writing our templates in another language?
+# loc-ja: ????????????????????????????
+---
+This is not 1997
+# loc-ja: 1997????????
+---
+It's 2007
+# loc-ja: 2007??????
+---
+People use CSS for design now.
+# loc-ja: CSS?????????????
+---
+Programmers still have to make templates
+# loc-ja: ?????????????????????????????
+---
+Templates run like CODE
+# loc-ja: ?????????????????????
+---
+Because they ARE code
+# loc-ja: ?????????????
+---
+Let's use our CODING tools to work with them.
+# loc-ja: ?????????????????????????
+---
+#mode perl
+#title Refactoring
+# loc-ja: ????????
+
+template 'mypage.html' => page {
+ h1 { 'Two choices' };
+ div { attr { class => 'item' };
+ h2 { 'Item 1'};
+ };
+ div { attr { class => 'item' };
+ h2 { 'Item 2'};
+ };
+};
+---
+#title Refactoring
+# loc-ja: ????????
+#mode perl
+
+template 'mypage.html' => page {
+ h1 { 'Two choices' };
+ for ("Item 1", "Item 2") { item($_); }
+};
+
+sub item {
+ my $content = shift;
+ div {
+ attr { class => 'item' };
+ h2 {$content};
+ };
+
+}
+---
+We can refactor templates!
+# loc-ja: ????????????????????!
+---
+Have you ever tried to refactor HTML?
+# loc-ja: HTML???????????????????
+---
+Our HTML is magically valid.
+# loc-ja: ???HTML???????????????????
+(Syntax errors are...Syntax Errors)
+# loc-ja: ???????????????????????
+---
+#title Stashing our templates
+# loc-ja: ?????????????????
+#mode perl
+template '/foo/index.html' => sub {... };
+---
+'sub template' takes a name and a coderef
+# loc-ja: 'sub template'?????????????????????
+---
+But where do we put these?
+# loc-ja: ??????????????
+---
+We need a global stash.
+# loc-ja: ???????????????
+---
+It needs to be per package
+# loc-ja: ????????????????
+(Don't want to mix things together)
+# loc-ja: ??????????????
+---
+Basically, we need a symbol table
+# loc-ja: ?????????????????????????
+---
+It's Perl
+# loc-ja: Perl?????
+---
+We have THE symbol table
+# loc-ja: ???????????????
+---
+But URLs have characters that are illegal in sub names. :/
+# loc-ja: ???URL?????????????????????????? :/
+---
+Actually, Perl doesn't care
+# loc-ja: ????????Perl??????
+---
+#mode perl
+ no strict 'refs';
+ *{ $class . '::' . $subname } = $coderef;}
+---
+That just works.
+# loc-ja: ?????????????
+---
+Even if your sub is named './\\foo#title <>'
+# loc-ja: ??????????'./\\foo#title <>'????????
+---
+But how do you call it?
+# loc-ja: ????????????????????
+---
+# perldoc UNIVERSAL
+
+CLASS->can( METHOD )
+"can" checks if the object or class has a method called "METHOD".
+If it does then a reference to the sub is returned.
+# loc-ja: "can"??????????????"METHOD"??????????????????????????????????????????????????
+---
+#title Closures
+# loc-ja: ?????
+Now, about that syntax.
+# loc-ja: ?????????????
+---
+HTML tags take blocks of content.
+# loc-ja: HTML????????????????
+---
+Our tag methods take blocks of perl.
+# loc-ja: ??????????perl????????
+---
+They return closures when you want them to
+# loc-ja: ???????????????????????
+---
+#mode perl
+sub h1 (&;$) {
+ my $code = shift;
+
+ ...
+
+ if (defined wantarray) {
+ return sub { ...closure around $code...};
+ } else {
+ # Actually do our work, run $code and return the output
+ }
+}
+---
+We install methods for every HTML tag
+# loc-ja: ????????HTML????????????????
+---
+(Except 'tr'. Anybody know why?)
+# loc-ja: 'tr' ???????????
+---
+#mode perl
+use CGI ();
+install_tag($_)
+ for ( @CGI::EXPORT_TAGS{
+ qw/:html2 :html3 :html4
+ :netscape :form/}
+);
+---
+#title Not everything is roses
+# loc-ja: ????????????????
+(Here's where it all goes wrong)
+# loc-ja: ?????????????
+---
+HTML Attributes
+# loc-ja: HTML???????
+---
+# mode perl
+# What we've got:
+
+div {
+ attr { id => 'my-div'};
+ ...
+};
+
+# and
+
+with ( id => 'my-div'), div {
+...
+};
+# loc-ja: ???????????
+---
+# mode perl
+# What I think I'd like:
+
+div ( id => 'my-div' ), {
+...
+}
+# loc-ja: ??????
+---
+So, what's the big problem?
+# loc-ja: ??????????????
+---
+Just change the prototype.
+# loc-ja: ????????????????
+---
+In Perl, the (&) in a prototype
+may ONLY come first.
+# loc-ja: Perl???????????(&)??????????????????
+---
+ORZ
+---
+Can anybody help me?
+# loc-ja: ???????
+---
+#title Template::Declare - end
+# loc-ja: Template::Declare - ????
+That's Template::Declare
+# loc-ja: Template::Declare?????????
+---
+#title
+Test::WWW::Declare
+---
+#title Test::WWW::Declare
+A language for testing web applications
+# loc-ja: ??????????????????
+---
+In early development
+# loc-ja: ?????????????
+---
+It might change
+# loc-ja: ????????
+---
+Web test scripts are UGLY
+# loc-ja: ?????????????????????
+---
+Test::WWW::Declare is PRETTY
+# loc-ja: Test::WWW::Declare?????
+---
+Simple, declarative web testing
+# loc-ja: ?????????????????
+---
+Easy to read
+# loc-ja: ?????
+---
+Easy to write
+# loc-ja: ?????
+---
+Looks more like what users do
+# loc-ja: ??????????????
+---
+#mode perl
+# Test::WWW::Mechanize
+
+my $server=Jifty::Test->make_server;
+isa_ok($server, 'Jifty::Server');
+my $URL = $server->started_ok;
+my $mech = Jifty::Test::WWW::Mechanize->new;
+$mech->get_html_ok($URL);
+like($mech->uri, qr{splash},
+ 'Redirected to splash page');
+---
+The insides are great
+# loc-ja: ???????
+---
+The syntax ain't
+# loc-ja: ?????????????
+---
+We built on Test::More and WWW::Mechanize
+# loc-ja: ???Test::More ? WWW::Mechanize ??????????
+---
+#mode perl
+
+# Test::WWW::Declare
+
+session "search" => run {
+ flow "google searches work" => check {
+ get 'http://google.com/ncr';
+ fill form 'f' => {
+ q => 'Squeamish ossifrage' };
+ click button 'Google Search';
+ }
+};
+---
+Regular tests keep running on failure
+# loc-ja: ????????????????????
+---
+Makes no sense when a failure means you lose context
+# loc-ja: ???????????????????????????????
+---
+Every 'check' block aborts on failure
+# loc-ja: 'check'?????????????????
+---
+Abort means 'failing test'
+# loc-ja: ?????????????????????????????????
+---
+Every 'session' has a cookie jar and WWW::Mechanize
+# loc-ja: 'session'?????????????? WWW::Mechanize ???????
+---
+#mode perl
+session "check logins" => run {
+ flow "basic connectivity" => check {
+ get 'http://fsck.com';
+ content should match qr{fsck.com};
+ click href qr{book};
+ content should match qr{RT Essentials}i;
+ };
+};
+---
+What's the weird syntax?
+# loc-ja: ??????????????
+---
+# mode perl
+content should match qr{RT Essentials}i;
+---
+#mode perl
+content should match qr{RT Essentials}i;
+
+# vs
+
+ok($req->content =~ /RT Essentials/i);
+---
+# mode perl
+# How do we make this valid perl?
+# loc-ja: ???????????perl????????????
+
+content should match qr{RT Essentials}i;
+---
+Prototypes
+# loc-ja: ???????
+---
+#mode perl
+sub match ($) {
+ return shift;
+}
+---
+#mode perl
+sub should ($) {
+ my $item = shift;
+ return $item;
+}
+---
+#mode perl
+sub content ($) {
+ my $regex = shift;
+ unless ( mech()->content =~ /$regex/ ) {
+ die "Content did not match $regex";
+ }
+}
+---
+#title Test::WWW::Declare - end
+# loc-ja: Test::WWW::Declare - ????
+That's Test::WWW::Declare
+# loc-ja: Test::WWW::Declare ?????
+---
+#title Conclusion
+# loc-ja: ??
+Creating DSLs is lots of fun
+# loc-ja: DSL???????????????
+---
+Creating DSLs can be a lot of work
+# loc-ja: DSL????????????????????
+---
+Creating DSLs helps you learn Perl internals
+# loc-ja: DSL?????Perl?????????
+---
+Creating DSLs helps find bugs in Perl
+# loc-ja: DSL?????Perl?????????????
+---
+DSLs can make coding more fun
+# loc-ja: DSL????????????????
+---
+Challenge: CPAN some Japanese DSLs
+# loc-ja: ??: CPAN?????DSL???????????
+---
+Thanks
+# loc-ja: ????????
+---
From jifty-commit at lists.jifty.org Sun Apr 8 11:37:07 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 8 11:37:10 2007
Subject: [Jifty-commit] r3112 - jifty/trunk/doc/talks
Message-ID: <20070408153707.6C1E84D801A@diesel.bestpractical.com>
Author: audreyt
Date: Sun Apr 8 11:37:06 2007
New Revision: 3112
Modified:
jifty/trunk/doc/talks/present-slides
Log:
* present-slides: Avoid a "splitting to @_ is deprecated" warning.
Modified: jifty/trunk/doc/talks/present-slides
==============================================================================
--- jifty/trunk/doc/talks/present-slides (original)
+++ jifty/trunk/doc/talks/present-slides Sun Apr 8 11:37:06 2007
@@ -76,7 +76,7 @@
}
if ( $slide =~ /(\S+)\s*\n\s*(\S+)/m ) {
- my $lines = scalar split(/\n/,$slide);
+ my $lines = ($slide =~ tr/\n//);
$console->Cursor(0, int(($rows/2)-($lines/2))-1);
print $slide;
} else {
From jifty-commit at lists.jifty.org Sun Apr 8 15:17:54 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 8 15:17:57 2007
Subject: [Jifty-commit] r3113 - in jifty/trunk: lib/Jifty/Server
lib/Jifty/Server/Prefork
Message-ID: <20070408191754.895674D80C7@diesel.bestpractical.com>
Author: trs
Date: Sun Apr 8 15:17:53 2007
New Revision: 3113
Modified:
jifty/trunk/ (props changed)
jifty/trunk/Makefile.PL
jifty/trunk/lib/Jifty/Server/Prefork.pm
jifty/trunk/lib/Jifty/Server/Prefork/NetServer.pm
Log:
r20646@zot: tom | 2007-04-08 15:17:04 -0400
Add doc and prefork dependency so the doc and dep tests pass
Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL (original)
+++ jifty/trunk/Makefile.PL Sun Apr 8 15:17:53 2007
@@ -113,6 +113,10 @@
-default => 0,
recommends('Net::Server::Fork'),
],
+ 'Pre-forking jifty server' => [
+ -default => 0,
+ recommends('Net::Server::PreFork'),
+ ],
'Apache2/ModPerl2 handler' => [
-default => 0,
recommends('Apache2::Const'),
Modified: jifty/trunk/lib/Jifty/Server/Prefork.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Server/Prefork.pm (original)
+++ jifty/trunk/lib/Jifty/Server/Prefork.pm Sun Apr 8 15:17:53 2007
@@ -1,5 +1,5 @@
package Jifty::Server::Prefork;
-use Net::Server::Prefork ();
+use Net::Server::PreFork ();
use base 'Jifty::Server';
=head1 NAME
Modified: jifty/trunk/lib/Jifty/Server/Prefork/NetServer.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Server/Prefork/NetServer.pm (original)
+++ jifty/trunk/lib/Jifty/Server/Prefork/NetServer.pm Sun Apr 8 15:17:53 2007
@@ -1,8 +1,19 @@
-
package Jifty::Server::Prefork::NetServer;
use base 'Net::Server::PreFork';
+=head1 NAME
+
+Jifty::Server::Prefork::NetServer - Sets up children for Jifty::Server::Prefork
+
+=head1 METHODS
+
+=head2 child_init_hook
+
+Sets up the database connection when spawning a new child
+
+=cut
+
sub child_init_hook {
Jifty->setup_database_connection();
}
From jifty-commit at lists.jifty.org Sun Apr 8 15:49:37 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 8 15:49:41 2007
Subject: [Jifty-commit] r3114 - in jifty/trunk/examples/Doxory: . bin doc
etc lib lib/Doxory lib/Doxory/Action lib/Doxory/Model log
share share/po share/web share/web/static share/web/templates t var
Message-ID: <20070408194937.F2B8E4D80A9@diesel.bestpractical.com>
Author: dpavlin
Date: Sun Apr 8 15:49:35 2007
New Revision: 3114
Added:
jifty/trunk/examples/Doxory/
jifty/trunk/examples/Doxory/Makefile.PL
jifty/trunk/examples/Doxory/bin/
jifty/trunk/examples/Doxory/bin/jifty (contents, props changed)
jifty/trunk/examples/Doxory/doc/
jifty/trunk/examples/Doxory/doxory (contents, props changed)
jifty/trunk/examples/Doxory/etc/
jifty/trunk/examples/Doxory/etc/config.yml
jifty/trunk/examples/Doxory/lib/
jifty/trunk/examples/Doxory/lib/Doxory/
jifty/trunk/examples/Doxory/lib/Doxory/Action/
jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm
jifty/trunk/examples/Doxory/lib/Doxory/Model/
jifty/trunk/examples/Doxory/lib/Doxory/Model/Choice.pm
jifty/trunk/examples/Doxory/lib/Doxory/Model/User.pm
jifty/trunk/examples/Doxory/lib/Doxory/Model/Vote.pm
jifty/trunk/examples/Doxory/lib/Doxory/View.pm
jifty/trunk/examples/Doxory/log/
jifty/trunk/examples/Doxory/share/
jifty/trunk/examples/Doxory/share/po/
jifty/trunk/examples/Doxory/share/web/
jifty/trunk/examples/Doxory/share/web/static/
jifty/trunk/examples/Doxory/share/web/templates/
jifty/trunk/examples/Doxory/t/
jifty/trunk/examples/Doxory/t/00-model-User.t
jifty/trunk/examples/Doxory/var/
jifty/trunk/examples/Doxory/var/jifty-server.pid
jifty/trunk/examples/Doxory/var/mason/
Log:
added audryt Doxory from doc/talks/yapcasia2007-doxory.pdf
Added: jifty/trunk/examples/Doxory/Makefile.PL
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/Makefile.PL Sun Apr 8 15:49:35 2007
@@ -0,0 +1,8 @@
+use inc::Module::Install;
+
+name 'Doxory';
+version '0.01';
+requires 'Jifty' => '0.70117';
+requires 'Regexp::Common::profanity_us';
+
+WriteAll;
Added: jifty/trunk/examples/Doxory/bin/jifty
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/bin/jifty Sun Apr 8 15:49:35 2007
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+use File::Basename qw(dirname);
+use UNIVERSAL::require;
+
+BEGIN {
+ Jifty::Util->require or die $UNIVERSAL::require::ERROR;
+ my $root = Jifty::Util->app_root;
+ unshift @INC, "$root/lib" if ($root);
+}
+
+use Jifty::Script;
+local $SIG{INT} = sub { warn "Stopped\n"; exit; };
+Jifty::Script->dispatch();
Added: jifty/trunk/examples/Doxory/doxory
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/examples/Doxory/etc/config.yml
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/etc/config.yml Sun Apr 8 15:49:35 2007
@@ -0,0 +1,51 @@
+---
+framework:
+ SkipAccessControl: 1
+ AdminMode: 0
+ ApplicationClass: Doxory
+ ApplicationName: Doxory
+ ApplicationUUID: 181049AC-E029-11DB-A5EB-227D19064FA1
+ Database:
+ CheckSchema: 1
+ Database: doxory
+ Driver: SQLite
+ Host: localhost
+ Password: ''
+ RecordBaseClass: Jifty::DBI::Record::Cachable
+ User: ''
+ Version: 0.0.1
+ DevelMode: 1
+ L10N:
+ PoDir: share/po
+ Lang: en
+ LogLevel: INFO
+ Mailer: Sendmail
+ MailerArgs: []
+
+ Plugins:
+ - SkeletonApp: {}
+ - REST: {}
+ - Halo: {}
+ - ErrorTemplates: {}
+ - CompressedCSSandJS: {}
+ - Authentication::Password: {}
+
+ PubSub:
+ Backend: Memcached
+ Enable: ~
+ TemplateClass: Doxory::View
+ SkipAccessControl: 1
+ Web:
+ BaseURL: http://localhost
+ DataDir: var/mason
+ Globals: []
+
+ MasonConfig:
+ autoflush: 0
+ default_escape_flags: h
+ error_format: text
+ error_mode: fatal
+ Port: 8888
+ ServeStaticFiles: 1
+ StaticRoot: share/web/static
+ TemplateRoot: share/web/templates
Added: jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm Sun Apr 8 15:49:35 2007
@@ -0,0 +1,43 @@
+package Doxory::Dispatcher;
+use strict;
+use warnings;
+use Jifty::Dispatcher -base;
+
+before '*' => run {
+ if (Jifty->web->current_user->id) {
+ my $top = Jifty->web->navigation;
+ $top->child( 'Pick!' => url => '/pick' );
+ $top->child( 'Choices' => url => '/choices' );
+ }
+ elsif ($1 !~ /^login|^signup/) {
+ tangent 'login';
+ }
+};
+
+#on '/' => show 'new_choice';
+
+on pick => run {
+ my $choices = Doxory::Model::ChoiceCollection->new;
+ my $votes = $choices->join(
+ type => 'left',
+ alias1 => 'main', column1 => 'id',
+ table2 => 'votes', column2 => 'choice',
+ );
+ $choices->limit(
+ leftjoin => $votes, column => 'voter',
+ value => Jifty->web->current_user->id,
+ );
+ $choices->limit(
+ alias => $votes, column => 'voter',
+ operator => 'IS', value => 'NULL',
+ );
+
+ if (my $c = $choices->first) {
+ set choice => $c;
+ }
+ else {
+ show 'nothing_to_pick';
+ }
+};
+
+1;
Added: jifty/trunk/examples/Doxory/lib/Doxory/Model/Choice.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/lib/Doxory/Model/Choice.pm Sun Apr 8 15:49:35 2007
@@ -0,0 +1,64 @@
+use strict;
+use warnings;
+
+package Doxory::Model::Choice;
+use Jifty::DBI::Schema;
+
+use Doxory::Record schema {
+ column name =>
+ label is 'I need help deciding...',
+ render as 'textarea';
+
+ column a =>
+ label is 'On the one hand',
+ render as 'textarea',
+ is mandatory;
+
+ column b =>
+ label is 'On the other hand',
+ render as 'textarea',
+ is mandatory;
+
+ column asked_by =>
+ label is 'Asked by',
+ default is defer { Jifty->web->current_user->id },
+ references Doxory::Model::User;
+};
+use Regexp::Common 'profanity_us';
+
+sub validate_name {
+ my ($self, $name) = @_;
+ if ($name =~ /$RE{profanity}/i) {
+ return (0, 'Would you speak like that in front of your mother? *cough*');
+ }
+ return 1;
+}
+
+sub canonicalize_name {
+ my ($self, $name) = @_;
+
+ $name =~ s/$RE{profanity}/**expletives**/gi;
+ return $name;
+}
+
+sub in_favor_of_a {
+ my $self = shift;
+ $self->in_favor_of('a');
+}
+
+sub in_favor_of_b {
+ my $self = shift;
+ $self->in_favor_of('b');
+}
+
+sub in_favor_of {
+ my $self = shift;
+ my $suggestion = shift;
+ my $votes = Doxory::Model::VoteCollection->new();
+ Carp::cluck unless ($self->id);
+ $votes->limit(column => 'choice', value => $self->id);
+ $votes->limit(column => 'suggestion' => value => $suggestion);
+ return $votes;
+}
+
+1;
Added: jifty/trunk/examples/Doxory/lib/Doxory/Model/User.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/lib/Doxory/Model/User.pm Sun Apr 8 15:49:35 2007
@@ -0,0 +1,27 @@
+use strict;
+use warnings;
+
+package Doxory::Model::User;
+use Jifty::DBI::Schema;
+
+use Doxory::Record schema {
+
+column name =>
+ label is 'Username',
+ hints is 'Other people see this when you ask questions.',
+ is distinct, is mandatory;
+
+column email =>
+ label is 'Email',
+ hints is 'We will not sell it to anybody. Honest.',
+ default is '',
+ is distinct, is immutable;
+
+};
+
+use Jifty::Plugin::User::Mixin::Model::User;
+use Jifty::Plugin::Authentication::Password::Mixin::Model::User;
+
+# Your model-specific methods go here.
+1;
+
Added: jifty/trunk/examples/Doxory/lib/Doxory/Model/Vote.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/lib/Doxory/Model/Vote.pm Sun Apr 8 15:49:35 2007
@@ -0,0 +1,22 @@
+use strict;
+use warnings;
+
+package Doxory::Model::Vote;
+use Jifty::DBI::Schema;
+
+use Doxory::Record schema {
+ column choice =>
+ references Doxory::Model::Choice;
+
+ column voter =>
+ references Doxory::Model::User;
+
+ column suggestion =>
+ valid are qw( a b skip );
+
+ column comments =>
+ label is 'Comments?',
+ render as 'textarea';
+};
+
+1;
Added: jifty/trunk/examples/Doxory/lib/Doxory/View.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/lib/Doxory/View.pm Sun Apr 8 15:49:35 2007
@@ -0,0 +1,84 @@
+package Doxory::View;
+use utf8;
+use strict;
+use warnings;
+use Jifty::View::Declare -base;
+
+template '/' => page {
+ h1 { 'Ask a question!' }
+ div { show 'new_choice' }
+};
+
+private template new_choice => sub {
+ form {
+ my $action = new_action( class => 'CreateChoice' );
+ render_action( $action => ['name', 'a', 'b'] );
+ form_submit( label => 'Ask the crowd!' );
+ }
+};
+
+template choices => page {
+ h1 { 'My Choices' }
+ dl {
+ my $choices = Doxory::Model::ChoiceCollection->new;
+ $choices->limit(
+ column => 'asked_by',
+ value => Jifty->web->current_user->id,
+ );
+ while (my $c = $choices->next) {
+ dt { $c->name, ' (', $c->asked_by->name, ')' }
+ dd {
+ b { $c->a, ' (', $c->in_favor_of_a->count, ')' }
+ em { 'vs' }
+ b { $c->b, ' (', $c->in_favor_of_b->count, ')' }
+ }
+ }
+ }
+};
+
+template pick => page {
+ my $choice = get('choice');
+ my $action = new_action( class => 'CreateVote' );
+ my $redir = new_action(
+ class => "Jifty::Action::Redirect",
+ arguments => { url => '/pick' },
+ );
+ # XXX - For some reason passing it in on the previous line doesn't work.
+ my %args = (
+ choice => $choice->id,
+ voter => Jifty->web->current_user->id,
+ );
+
+ h1 { $choice->asked_by->name, ': ', $choice->name }
+ div { form {
+ my ($x, $y) = map { $action->button(
+ submit => [ $action, $redir ],
+ label => $choice->$_,
+ arguments => { suggestion => $_, %args },
+ ) } ((rand > 0.5) ? ('a', 'b') : ('b', 'a'));
+
+ span { $x } em { 'or' } span { $y } em { 'or' } span {
+ $action->button(
+ submit => [ $action, $redir ],
+ label => 'None of the above',
+ arguments => { suggestion => 'skip', %args },
+ );
+ }
+
+ p { render_param( $action => 'comments' ) }
+ } }
+};
+
+template nothing_to_pick => page {
+ h1 { "There's nothing for you to pick." }
+
+ p { "No one you know is angsting about anything. Everybody knows where
+ they're going to dinner, what to do on their next date and whether to
+ drop that class. You have such lovely and well adjusted friends." }
+
+ h2 { "Maybe it's time to ask for some advice..." };
+
+ show 'new_choice';
+};
+
+1;
Added: jifty/trunk/examples/Doxory/t/00-model-User.t
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/t/00-model-User.t Sun Apr 8 15:49:35 2007
@@ -0,0 +1,49 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+
+=head1 DESCRIPTION
+
+A basic test harness for the User model.
+
+=cut
+
+use Jifty::Test tests => 11;
+
+# Make sure we can load the model
+use_ok('Doxory::Model::User');
+
+# Grab a system user
+my $system_user = Doxory::CurrentUser->superuser;
+ok($system_user, "Found a system user");
+
+# Try testing a create
+my $o = Doxory::Model::User->new(current_user => $system_user);
+my ($id) = $o->create();
+ok($id, "User create returned success");
+ok($o->id, "New User has valid id set");
+is($o->id, $id, "Create returned the right id");
+
+# And another
+$o->create();
+ok($o->id, "User create returned another value");
+isnt($o->id, $id, "And it is different from the previous one");
+
+# Searches in general
+my $collection = Doxory::Model::UserCollection->new(current_user => $system_user);
+$collection->unlimit;
+is($collection->count, 2, "Finds two records");
+
+# Searches in specific
+$collection->limit(column => 'id', value => $o->id);
+is($collection->count, 1, "Finds one record with specific id");
+
+# Delete one of them
+$o->delete;
+$collection->redo_search;
+is($collection->count, 0, "Deleted row is gone");
+
+# And the other one is still there
+$collection->unlimit;
+is($collection->count, 1, "Still one left");
+
Added: jifty/trunk/examples/Doxory/var/jifty-server.pid
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/var/jifty-server.pid Sun Apr 8 15:49:35 2007
@@ -0,0 +1 @@
+8972
\ No newline at end of file
From jifty-commit at lists.jifty.org Sun Apr 8 15:59:08 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 8 15:59:12 2007
Subject: [Jifty-commit] r3115 - in jifty/trunk/examples/Doxory: lib/Doxory
Message-ID: <20070408195908.E648E4D806E@diesel.bestpractical.com>
Author: dpavlin
Date: Sun Apr 8 15:59:08 2007
New Revision: 3115
Modified:
jifty/trunk/examples/Doxory/etc/config.yml
jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm
Log:
Turn on AdminMode and don't require login for it in dispatcher
Modified: jifty/trunk/examples/Doxory/etc/config.yml
==============================================================================
--- jifty/trunk/examples/Doxory/etc/config.yml (original)
+++ jifty/trunk/examples/Doxory/etc/config.yml Sun Apr 8 15:59:08 2007
@@ -1,7 +1,7 @@
---
framework:
SkipAccessControl: 1
- AdminMode: 0
+ AdminMode: 1
ApplicationClass: Doxory
ApplicationName: Doxory
ApplicationUUID: 181049AC-E029-11DB-A5EB-227D19064FA1
Modified: jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm
==============================================================================
--- jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm (original)
+++ jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm Sun Apr 8 15:59:08 2007
@@ -9,7 +9,7 @@
$top->child( 'Pick!' => url => '/pick' );
$top->child( 'Choices' => url => '/choices' );
}
- elsif ($1 !~ /^login|^signup/) {
+ elsif ($1 !~ /^login|^signup|^__jifty/) {
tangent 'login';
}
};
From jifty-commit at lists.jifty.org Wed Apr 11 11:47:31 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Wed Apr 11 11:47:34 2007
Subject: [Jifty-commit] r3116 - Jifty-DBI/trunk/lib/Jifty/DBI
Message-ID: <20070411154731.82FD54D818F@diesel.bestpractical.com>
Author: evdb
Date: Wed Apr 11 11:47:27 2007
New Revision: 3116
Modified:
Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
Log:
Added sample code to POD for 'before_create' and 'after_create' to make it easier for users to implement by copy and pasting.
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm Wed Apr 11 11:47:27 2007
@@ -1019,6 +1019,17 @@
=item before_create
+ sub before_create {
+ my $self = shift;
+ my $args = shift;
+
+ # Do any checks and changes on $args here.
+ $args->{first_name} = ucfirst $args->{first_name};
+
+ return; # false return vallue will abort the create
+ return 1; # true return value will allow create to continue
+ }
+
This method is called before trying to create our row in the
database. It's handed a reference to your paramhash. (That means it
can modify your parameters on the fly). C returns a
@@ -1026,6 +1037,18 @@
=item after_create
+ sub after_create {
+ my $self = shift;
+ my $insert_return_value_ref = shift;
+
+ return unless $$insert_return_value_ref; # bail if insert failed
+ $self->load($$insert_return_value_ref); # load ourselves from db
+
+ # Do whatever needs to be done here
+
+ return; # return value is ignored
+ }
+
This method is called after attempting to insert the record into the
database. It gets handed a reference to the return value of the
insert. That'll either be a true value or a L
From jifty-commit at lists.jifty.org Wed Apr 11 11:50:42 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Wed Apr 11 11:50:46 2007
Subject: [Jifty-commit] r3117 - jifty/trunk/lib/Jifty
Message-ID: <20070411155042.378014D80F9@diesel.bestpractical.com>
Author: evdb
Date: Wed Apr 11 11:50:41 2007
New Revision: 3117
Modified:
jifty/trunk/lib/Jifty/CurrentUser.pm
Log:
Allow '->superuser' to be both an object and class method.
Modified: jifty/trunk/lib/Jifty/CurrentUser.pm
==============================================================================
--- jifty/trunk/lib/Jifty/CurrentUser.pm (original)
+++ jifty/trunk/lib/Jifty/CurrentUser.pm Wed Apr 11 11:50:41 2007
@@ -65,12 +65,13 @@
=head2 superuser
A convenience constructor that returns a new CurrentUser object that's
-marked as a superuser.
+marked as a superuser. Can be called either as a class or object method.
=cut
sub superuser {
my $class = shift;
+ $class = ref( $class ) if ref $class;
my $self = $class->new();
$self->is_superuser(1);
return $self;
From jifty-commit at lists.jifty.org Thu Apr 12 03:36:00 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Thu Apr 12 03:36:06 2007
Subject: [Jifty-commit] r3119 - in jifty/trunk: share/web/static/js/yui
Message-ID: <20070412073600.BCCAE4D8013@diesel.bestpractical.com>
Author: hlb
Date: Thu Apr 12 03:36:00 2007
New Revision: 3119
Added:
jifty/trunk/share/web/static/js/yui/menu.js
Modified:
jifty/trunk/lib/Jifty/Web/Menu.pm
Log:
* Added render_as_yui_menubar in Menu.pm
Modified: jifty/trunk/lib/Jifty/Web/Menu.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Menu.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Menu.pm Thu Apr 12 03:36:00 2007
@@ -193,7 +193,6 @@
'';
}
-
=head2 render_as_context_menu
Render this menu with html markup as an inline dropdown menu.
@@ -254,6 +253,45 @@
}
+=head2 render_as_yui_menubar
+
+Render menubar with YUI menu, suitable for an application's menu.
+It can support arbitary levels of submenu.
+
+=cut
+
+sub render_as_yui_menubar {
+ my $self = shift;
+ my $id = Jifty->web->serial;
+ $self->_render_as_yui_menu_item("yuimenubar", $id);
+ Jifty->web->out(qq||
+ );
+ '';
+}
+
+sub _render_as_yui_menu_item {
+ my ($self, $class, $id) = @_;
+ my @kids = $self->children
+ or return;
+
+ Jifty->web->out(
+ qq{}
+ );
+ for (@kids) {
+ Jifty->web->out( qq{});
+ Jifty->web->out( $_->as_link );
+ $_->_render_as_yui_menu_item("yuimenu");
+ Jifty->web->out( qq{ });
+ }
+ Jifty->web->out(qq{ });
+}
+
=head2 as_link
Return this menu item as a C, either the one we were
Added: jifty/trunk/share/web/static/js/yui/menu.js
==============================================================================
--- (empty file)
+++ jifty/trunk/share/web/static/js/yui/menu.js Thu Apr 12 03:36:00 2007
@@ -0,0 +1,8675 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+
+
+/**
+* @module menu
+* @description The Menu family of components features a collection of
+* controls that make it easy to add menus to your website or web application.
+* With the Menu Controls you can create website fly-out menus, customized
+* context menus, or application-style menu bars with just a small amount of
+* scripting.
The Menu family of controls features:
+*
+* Screen-reader accessibility.
+* Keyboard and mouse navigation.
+* A rich event model that provides access to all of a menu's
+* interesting moments.
+* Support for
+* Progressive
+* Enhancement ; Menus can be created from simple,
+* semantic markup on the page or purely through JavaScript.
+*
+* @title Menu
+* @namespace YAHOO.widget
+* @requires Event, Dom, Container
+*/
+(function() {
+
+var Dom = YAHOO.util.Dom,
+ Event = YAHOO.util.Event;
+
+
+/**
+* Singleton that manages a collection of all menus and menu items. Listens for
+* DOM events at the document level and dispatches the events to the
+* corresponding menu or menu item.
+*
+* @namespace YAHOO.widget
+* @class MenuManager
+* @static
+*/
+YAHOO.widget.MenuManager = function() {
+
+ // Private member variables
+
+
+ // Flag indicating if the DOM event handlers have been attached
+
+ var m_bInitializedEventHandlers = false,
+
+
+ // Collection of menus
+
+ m_oMenus = {},
+
+
+ // Collection of menu items
+
+ m_oItems = {},
+
+
+ // Collection of visible menus
+
+ m_oVisibleMenus = {},
+
+
+ // Map of DOM event types to their equivalent CustomEvent types
+
+ m_oEventTypes = {
+ "click": "clickEvent",
+ "mousedown": "mouseDownEvent",
+ "mouseup": "mouseUpEvent",
+ "mouseover": "mouseOverEvent",
+ "mouseout": "mouseOutEvent",
+ "keydown": "keyDownEvent",
+ "keyup": "keyUpEvent",
+ "keypress": "keyPressEvent"
+ },
+
+
+ m_oFocusedMenuItem = null;
+
+
+
+
+ // Private methods
+
+
+ /**
+ * @method addItem
+ * @description Adds an item to the collection of known menu items.
+ * @private
+ * @param {YAHOO.widget.MenuItem} p_oItem Object specifying the MenuItem
+ * instance to be added.
+ */
+ function addItem(p_oItem) {
+
+ var sId = p_oItem.id;
+
+ if(p_oItem && m_oItems[sId] != p_oItem) {
+
+ m_oItems[sId] = p_oItem;
+
+ p_oItem.destroyEvent.subscribe(onItemDestroy);
+
+
+ }
+
+ }
+
+
+ /**
+ * @method removeItem
+ * @description Removes an item from the collection of known menu items.
+ * @private
+ * @param {YAHOO.widget.MenuItem} p_oItem Object specifying the MenuItem
+ * instance to be removed.
+ */
+ function removeItem(p_oItem) {
+
+ var sId = p_oItem.id;
+
+ if(sId && m_oItems[sId]) {
+
+ delete m_oItems[sId];
+
+
+ }
+
+ }
+
+
+ /**
+ * @method getMenuRootElement
+ * @description Finds the root DIV node of a menu or the root LI node of a
+ * menu item.
+ * @private
+ * @param {HTMLElement } p_oElement Object specifying
+ * an HTML element.
+ */
+ function getMenuRootElement(p_oElement) {
+
+ var oParentNode;
+
+ if(p_oElement && p_oElement.tagName) {
+
+ switch(p_oElement.tagName.toUpperCase()) {
+
+ case "DIV":
+
+ oParentNode = p_oElement.parentNode;
+
+ // Check if the DIV is the inner "body" node of a menu
+
+ if(
+ (
+ Dom.hasClass(p_oElement, "hd") ||
+ Dom.hasClass(p_oElement, "bd") ||
+ Dom.hasClass(p_oElement, "ft")
+ )
+ &&
+ oParentNode &&
+ oParentNode.tagName &&
+ oParentNode.tagName.toUpperCase() == "DIV"
+ ) {
+
+ return oParentNode;
+
+ }
+ else {
+
+ return p_oElement;
+
+ }
+
+ break;
+
+ case "LI":
+
+ return p_oElement;
+
+ default:
+
+ oParentNode = p_oElement.parentNode;
+
+ if(oParentNode) {
+
+ return getMenuRootElement(oParentNode);
+
+ }
+
+ break;
+
+ }
+
+ }
+
+ }
+
+
+
+ // Private event handlers
+
+
+ /**
+ * @method onDOMEvent
+ * @description Generic, global event handler for all of a menu's DOM-based
+ * events. This listens for events against the document object. If the
+ * target of a given event is a member of a menu or menu item's DOM, the
+ * instance's corresponding Custom Event is fired.
+ * @private
+ * @param {Event} p_oEvent Object representing the DOM event object passed
+ * back by the event utility (YAHOO.util.Event).
+ */
+ function onDOMEvent(p_oEvent) {
+
+ // Get the target node of the DOM event
+
+ var oTarget = Event.getTarget(p_oEvent),
+
+
+ // See if the target of the event was a menu, or a menu item
+
+ oElement = getMenuRootElement(oTarget),
+ oMenuItem,
+ oMenu;
+
+
+ if(oElement) {
+
+ var sTagName = oElement.tagName.toUpperCase();
+
+ if(sTagName == "LI") {
+
+ var sId = oElement.id;
+
+ if(sId && m_oItems[sId]) {
+
+ oMenuItem = m_oItems[sId];
+ oMenu = oMenuItem.parent;
+
+ }
+
+ }
+ else if(sTagName == "DIV") {
+
+ if(oElement.id) {
+
+ oMenu = m_oMenus[oElement.id];
+
+ }
+
+ }
+
+ }
+
+
+ if(oMenu) {
+
+ var sCustomEventType = m_oEventTypes[p_oEvent.type];
+
+
+ // Fire the Custom Event that corresponds the current DOM event
+
+ if(oMenuItem && !oMenuItem.cfg.getProperty("disabled")) {
+
+ oMenuItem[sCustomEventType].fire(p_oEvent);
+
+
+ if (p_oEvent.type == "keyup" || p_oEvent.type == "mousedown") {
+
+ if (m_oFocusedMenuItem != oMenuItem) {
+
+ if(m_oFocusedMenuItem) {
+
+ m_oFocusedMenuItem.blurEvent.fire();
+
+ }
+
+ oMenuItem.focusEvent.fire();
+
+ }
+
+ }
+
+ }
+
+ oMenu[sCustomEventType].fire(p_oEvent, oMenuItem);
+
+ }
+ else if(p_oEvent.type == "mousedown") {
+
+ if(m_oFocusedMenuItem) {
+
+ m_oFocusedMenuItem.blurEvent.fire();
+
+ m_oFocusedMenuItem = null;
+
+ }
+
+
+ /*
+ If the target of the event wasn't a menu, hide all
+ dynamically positioned menus
+ */
+
+ for(var i in m_oMenus) {
+
+ if(YAHOO.lang.hasOwnProperty(m_oMenus,i)) {
+
+ oMenu = m_oMenus[i];
+
+ if(
+ oMenu.cfg.getProperty("clicktohide") &&
+ oMenu.cfg.getProperty("position") == "dynamic"
+ ) {
+
+ oMenu.hide();
+
+ }
+ else {
+
+ oMenu.clearActiveItem(true);
+
+ }
+
+ }
+
+ }
+
+ }
+ else if(p_oEvent.type == "keyup") {
+
+ if(m_oFocusedMenuItem) {
+
+ m_oFocusedMenuItem.blurEvent.fire();
+
+ m_oFocusedMenuItem = null;
+
+ }
+
+ }
+
+ }
+
+
+ /**
+ * @method onMenuDestroy
+ * @description "destroy" event handler for a menu.
+ * @private
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ */
+ function onMenuDestroy(p_sType, p_aArgs) {
+
+ if(m_oMenus[this.id]) {
+
+ delete m_oMenus[this.id];
+
+
+ }
+
+ }
+
+
+ /**
+ * @method onMenuFocus
+ * @description "focus" event handler for a MenuItem instance.
+ * @private
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ */
+ function onMenuFocus(p_sType, p_aArgs) {
+
+ var oItem = p_aArgs[0];
+
+ if (oItem) {
+
+ m_oFocusedMenuItem = oItem;
+
+ }
+
+ }
+
+
+ /**
+ * @method onMenuBlur
+ * @description "blur" event handler for a MenuItem instance.
+ * @private
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ */
+ function onMenuBlur(p_sType, p_aArgs) {
+
+ m_oFocusedMenuItem = null;
+
+ }
+
+
+ /**
+ * @method onItemDestroy
+ * @description "destroy" event handler for a MenuItem instance.
+ * @private
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ */
+ function onItemDestroy(p_sType, p_aArgs) {
+
+ var sId = this.id;
+
+ if(sId && m_oItems[sId]) {
+
+ delete m_oItems[sId];
+
+ }
+
+ }
+
+
+ /**
+ * @method onMenuVisibleConfigChange
+ * @description Event handler for when the "visible" configuration property
+ * of a Menu instance changes.
+ * @private
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ */
+ function onMenuVisibleConfigChange(p_sType, p_aArgs) {
+
+ var bVisible = p_aArgs[0];
+
+ if(bVisible) {
+
+ m_oVisibleMenus[this.id] = this;
+
+
+ }
+ else if(m_oVisibleMenus[this.id]) {
+
+ delete m_oVisibleMenus[this.id];
+
+
+ }
+
+ }
+
+
+ /**
+ * @method onItemAdded
+ * @description "itemadded" event handler for a Menu instance.
+ * @private
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ */
+ function onItemAdded(p_sType, p_aArgs) {
+
+ addItem(p_aArgs[0]);
+
+ }
+
+
+ /**
+ * @method onItemRemoved
+ * @description "itemremoved" event handler for a Menu instance.
+ * @private
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ */
+ function onItemRemoved(p_sType, p_aArgs) {
+
+ removeItem(p_aArgs[0]);
+
+ }
+
+
+
+ return {
+
+ // Privileged methods
+
+
+ /**
+ * @method addMenu
+ * @description Adds a menu to the collection of known menus.
+ * @param {YAHOO.widget.Menu} p_oMenu Object specifying the Menu
+ * instance to be added.
+ */
+ addMenu: function(p_oMenu) {
+
+ if(p_oMenu && p_oMenu.id && !m_oMenus[p_oMenu.id]) {
+
+ m_oMenus[p_oMenu.id] = p_oMenu;
+
+
+ if(!m_bInitializedEventHandlers) {
+
+ var oDoc = document;
+
+ Event.on(oDoc, "mouseover", onDOMEvent, this, true);
+ Event.on(oDoc, "mouseout", onDOMEvent, this, true);
+ Event.on(oDoc, "mousedown", onDOMEvent, this, true);
+ Event.on(oDoc, "mouseup", onDOMEvent, this, true);
+ Event.on(oDoc, "click", onDOMEvent, this, true);
+ Event.on(oDoc, "keydown", onDOMEvent, this, true);
+ Event.on(oDoc, "keyup", onDOMEvent, this, true);
+ Event.on(oDoc, "keypress", onDOMEvent, this, true);
+
+
+ m_bInitializedEventHandlers = true;
+
+
+ }
+
+ p_oMenu.destroyEvent.subscribe(onMenuDestroy);
+
+ p_oMenu.cfg.subscribeToConfigEvent(
+ "visible",
+ onMenuVisibleConfigChange
+ );
+
+ p_oMenu.itemAddedEvent.subscribe(onItemAdded);
+ p_oMenu.itemRemovedEvent.subscribe(onItemRemoved);
+ p_oMenu.focusEvent.subscribe(onMenuFocus);
+ p_oMenu.blurEvent.subscribe(onMenuBlur);
+
+
+ }
+
+ },
+
+
+ /**
+ * @method removeMenu
+ * @description Removes a menu from the collection of known menus.
+ * @param {YAHOO.widget.Menu} p_oMenu Object specifying the Menu
+ * instance to be removed.
+ */
+ removeMenu: function(p_oMenu) {
+
+ if(p_oMenu && m_oMenus[p_oMenu.id]) {
+
+ delete m_oMenus[p_oMenu.id];
+
+
+ }
+
+ },
+
+
+ /**
+ * @method hideVisible
+ * @description Hides all visible, dynamically positioned menus.
+ */
+ hideVisible: function() {
+
+ var oMenu;
+
+ for(var i in m_oVisibleMenus) {
+
+ if(YAHOO.lang.hasOwnProperty(m_oVisibleMenus,i)) {
+
+ oMenu = m_oVisibleMenus[i];
+
+ if(oMenu.cfg.getProperty("position") == "dynamic") {
+
+ oMenu.hide();
+
+ }
+
+ }
+
+ }
+
+ },
+
+
+ /**
+ * @method getMenus
+ * @description Returns an array of all menus registered with the
+ * menu manger.
+ * @return {Array}
+ */
+ getMenus: function() {
+
+ return m_oMenus;
+
+ },
+
+
+ /**
+ * @method getMenu
+ * @description Returns a menu with the specified id.
+ * @param {String} p_sId String specifying the id of the menu to
+ * be retrieved.
+ * @return {YAHOO.widget.Menu}
+ */
+ getMenu: function(p_sId) {
+
+ if(m_oMenus[p_sId]) {
+
+ return m_oMenus[p_sId];
+
+ }
+
+ },
+
+
+ /**
+ * @method getFocusedMenuItem
+ * @description Returns a reference to the menu item that currently
+ * has focus.
+ * @return {YAHOO.widget.MenuItem}
+ */
+ getFocusedMenuItem: function() {
+
+ return m_oFocusedMenuItem;
+
+ },
+
+
+ /**
+ * @method getFocusedMenu
+ * @description Returns a reference to the menu that currently has focus.
+ * @return {YAHOO.widget.Menu}
+ */
+ getFocusedMenu: function() {
+
+ if(m_oFocusedMenuItem) {
+
+ return (m_oFocusedMenuItem.parent.getRoot());
+
+ }
+
+ },
+
+
+ /**
+ * @method toString
+ * @description Returns a string representing the menu manager.
+ * @return {String}
+ */
+ toString: function() {
+
+ return ("MenuManager");
+
+ }
+
+ };
+
+}();
+
+})();
+
+
+
+/**
+* The Menu class creates a container that holds a vertical list representing
+* a set of options or commands. Menu is the base class for all
+* menu containers.
+* @param {String} p_oElement String specifying the id attribute of the
+* <div> element of the menu.
+* @param {String} p_oElement String specifying the id attribute of the
+* <select> element to be used as the data source
+* for the menu.
+* @param {HTMLDivElement } p_oElement Object
+* specifying the <div> element of the menu.
+* @param {HTMLSelectElement } p_oElement
+* Object specifying the <select> element to be used as
+* the data source for the menu.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the menu. See configuration class documentation for
+* more details.
+* @namespace YAHOO.widget
+* @class Menu
+* @constructor
+* @extends YAHOO.widget.Overlay
+*/
+(function() {
+
+var Dom = YAHOO.util.Dom,
+ Event = YAHOO.util.Event,
+ CustomEvent = YAHOO.util.CustomEvent,
+ Lang = YAHOO.lang;
+
+
+YAHOO.widget.Menu = function(p_oElement, p_oConfig) {
+
+ if(p_oConfig) {
+
+ this.parent = p_oConfig.parent;
+ this.lazyLoad = p_oConfig.lazyLoad || p_oConfig.lazyload;
+ this.itemData = p_oConfig.itemData || p_oConfig.itemdata;
+
+ }
+
+
+ YAHOO.widget.Menu.superclass.constructor.call(
+ this,
+ p_oElement,
+ p_oConfig
+ );
+
+};
+
+
+/**
+* Constant representing the name of the Menu's events
+* @property YAHOO.widget.Menu._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Menu._EVENT_TYPES = {
+
+ "MOUSE_OVER": "mouseover",
+ "MOUSE_OUT": "mouseout",
+ "MOUSE_DOWN": "mousedown",
+ "MOUSE_UP": "mouseup",
+ "CLICK": "click",
+ "KEY_PRESS": "keypress",
+ "KEY_DOWN": "keydown",
+ "KEY_UP": "keyup",
+ "FOCUS": "focus",
+ "BLUR": "blur",
+ "ITEM_ADDED": "itemAdded",
+ "ITEM_REMOVED": "itemRemoved"
+
+};
+
+
+
+/**
+* @method _checkPosition
+* @description Checks to make sure that the value of the "position" property
+* is one of the supported strings. Returns true if the position is supported.
+* @private
+* @param {Object} p_sPosition String specifying the position of the menu.
+* @return {Boolean}
+*/
+YAHOO.widget.Menu._checkPosition = function(p_sPosition) {
+
+ if(typeof p_sPosition == "string") {
+
+ var sPosition = p_sPosition.toLowerCase();
+
+ return ("dynamic,static".indexOf(sPosition) != -1);
+
+ }
+
+};
+
+
+
+/**
+* Constant representing the Menu's configuration properties
+* @property YAHOO.widget.Menu._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Menu._DEFAULT_CONFIG = {
+
+ "VISIBLE": {
+ key: "visible",
+ value: false,
+ validator: Lang.isBoolean
+ },
+
+ "CONSTRAIN_TO_VIEWPORT": {
+ key: "constraintoviewport",
+ value: true,
+ validator: Lang.isBoolean,
+ supercedes: ["iframe","x","y","xy"]
+ },
+
+ "POSITION": {
+ key: "position",
+ value: "dynamic",
+ validator: YAHOO.widget.Menu._checkPosition,
+ supercedes: ["visible"]
+ },
+
+ "SUBMENU_ALIGNMENT": {
+ key: "submenualignment",
+ value: ["tl","tr"]
+ },
+
+ "AUTO_SUBMENU_DISPLAY": {
+ key: "autosubmenudisplay",
+ value: true,
+ validator: Lang.isBoolean
+ },
+
+ "SHOW_DELAY": {
+ key: "showdelay",
+ value: 250,
+ validator: Lang.isNumber
+ },
+
+ "HIDE_DELAY": {
+ key: "hidedelay",
+ value: 0,
+ validator: Lang.isNumber,
+ suppressEvent: true
+ },
+
+ "SUBMENU_HIDE_DELAY": {
+ key: "submenuhidedelay",
+ value: 250,
+ validator: Lang.isNumber
+ },
+
+ "CLICK_TO_HIDE": {
+ key: "clicktohide",
+ value: true,
+ validator: Lang.isBoolean
+ },
+
+ "CONTAINER": {
+ key: "container"
+ },
+
+ "MAX_HEIGHT": {
+ key: "maxheight",
+ value: 0,
+ validator: Lang.isNumber
+ },
+
+ "CLASS_NAME": {
+ key: "classname",
+ value: null,
+ validator: Lang.isString
+ }
+
+};
+
+
+YAHOO.lang.extend(YAHOO.widget.Menu, YAHOO.widget.Overlay, {
+
+
+// Constants
+
+
+/**
+* @property CSS_CLASS_NAME
+* @description String representing the CSS class(es) to be applied to the
+* menu's <div> element.
+* @default "yuimenu"
+* @final
+* @type String
+*/
+CSS_CLASS_NAME: "yuimenu",
+
+
+/**
+* @property ITEM_TYPE
+* @description Object representing the type of menu item to instantiate and
+* add when parsing the child nodes (either <li> element,
+* <optgroup> element or <option>)
+* of the menu's source HTML element.
+* @default YAHOO.widget.MenuItem
+* @final
+* @type YAHOO.widget.MenuItem
+*/
+ITEM_TYPE: null,
+
+
+/**
+* @property GROUP_TITLE_TAG_NAME
+* @description String representing the tagname of the HTML element used to
+* title the menu's item groups.
+* @default H6
+* @final
+* @type String
+*/
+GROUP_TITLE_TAG_NAME: "h6",
+
+
+
+// Private properties
+
+
+/**
+* @property _nHideDelayId
+* @description Number representing the time-out setting used to cancel the
+* hiding of a menu.
+* @default null
+* @private
+* @type Number
+*/
+_nHideDelayId: null,
+
+
+/**
+* @property _nShowDelayId
+* @description Number representing the time-out setting used to cancel the
+* showing of a menu.
+* @default null
+* @private
+* @type Number
+*/
+_nShowDelayId: null,
+
+
+/**
+* @property _nSubmenuHideDelayId
+* @description Number representing the time-out setting used to cancel the
+* hiding of a submenu.
+* @default null
+* @private
+* @type Number
+*/
+_nSubmenuHideDelayId: null,
+
+
+/**
+* @property _nBodyScrollId
+* @description Number representing the time-out setting used to cancel the
+* scrolling of the menu's body element.
+* @default null
+* @private
+* @type Number
+*/
+_nBodyScrollId: null,
+
+
+/**
+* @property _bHideDelayEventHandlersAssigned
+* @description Boolean indicating if the "mouseover" and "mouseout" event
+* handlers used for hiding the menu via a call to "window.setTimeout" have
+* already been assigned.
+* @default false
+* @private
+* @type Boolean
+*/
+_bHideDelayEventHandlersAssigned: false,
+
+
+/**
+* @property _bHandledMouseOverEvent
+* @description Boolean indicating the current state of the menu's
+* "mouseover" event.
+* @default false
+* @private
+* @type Boolean
+*/
+_bHandledMouseOverEvent: false,
+
+
+/**
+* @property _bHandledMouseOutEvent
+* @description Boolean indicating the current state of the menu's
+* "mouseout" event.
+* @default false
+* @private
+* @type Boolean
+*/
+_bHandledMouseOutEvent: false,
+
+
+/**
+* @property _aGroupTitleElements
+* @description Array of HTML element used to title groups of menu items.
+* @default []
+* @private
+* @type Array
+*/
+_aGroupTitleElements: null,
+
+
+/**
+* @property _aItemGroups
+* @description Multi-dimensional Array representing the menu items as they
+* are grouped in the menu.
+* @default []
+* @private
+* @type Array
+*/
+_aItemGroups: null,
+
+
+/**
+* @property _aListElements
+* @description Array of <ul> elements, each of which is
+* the parent node for each item's <li> element.
+* @default []
+* @private
+* @type Array
+*/
+_aListElements: null,
+
+
+/**
+* @property _nCurrentMouseX
+* @description The current x coordinate of the mouse inside the area of
+* the menu.
+* @default 0
+* @private
+* @type Number
+*/
+_nCurrentMouseX: 0,
+
+
+/**
+* @property _nMaxHeight
+* @description The original value of the "maxheight" configuration property
+* as set by the user.
+* @default -1
+* @private
+* @type Number
+*/
+_nMaxHeight: -1,
+
+
+/**
+* @property _bStopMouseEventHandlers
+* @description Stops "mouseover," "mouseout," and "mousemove" event handlers
+* from executing.
+* @default false
+* @private
+* @type Boolean
+*/
+_bStopMouseEventHandlers: false,
+
+
+/**
+* @property _sClassName
+* @description The current value of the "classname" configuration attribute.
+* @default null
+* @private
+* @type String
+*/
+_sClassName: null,
+
+
+
+// Public properties
+
+
+/**
+* @property lazyLoad
+* @description Boolean indicating if the menu's "lazy load" feature is
+* enabled. If set to "true," initialization and rendering of the menu's
+* items will be deferred until the first time it is made visible. This
+* property should be set via the constructor using the configuration
+* object literal.
+* @default false
+* @type Boolean
+*/
+lazyLoad: false,
+
+
+/**
+* @property itemData
+* @description Array of items to be added to the menu. The array can contain
+* strings representing the text for each item to be created, object literals
+* representing the menu item configuration properties, or MenuItem instances.
+* This property should be set via the constructor using the configuration
+* object literal.
+* @default null
+* @type Array
+*/
+itemData: null,
+
+
+/**
+* @property activeItem
+* @description Object reference to the item in the menu that has is selected.
+* @default null
+* @type YAHOO.widget.MenuItem
+*/
+activeItem: null,
+
+
+/**
+* @property parent
+* @description Object reference to the menu's parent menu or menu item.
+* This property can be set via the constructor using the configuration
+* object literal.
+* @default null
+* @type YAHOO.widget.MenuItem
+*/
+parent: null,
+
+
+/**
+* @property srcElement
+* @description Object reference to the HTML element (either
+* <select> or <div>) used to
+* create the menu.
+* @default null
+* @type HTMLSelectElement |HTMLDivElement
+*/
+srcElement: null,
+
+
+
+// Events
+
+
+/**
+* @event mouseOverEvent
+* @description Fires when the mouse has entered the menu. Passes back
+* the DOM Event object as an argument.
+*/
+mouseOverEvent: null,
+
+
+/**
+* @event mouseOutEvent
+* @description Fires when the mouse has left the menu. Passes back the DOM
+* Event object as an argument.
+* @type YAHOO.util.CustomEvent
+*/
+mouseOutEvent: null,
+
+
+/**
+* @event mouseDownEvent
+* @description Fires when the user mouses down on the menu. Passes back the
+* DOM Event object as an argument.
+* @type YAHOO.util.CustomEvent
+*/
+mouseDownEvent: null,
+
+
+/**
+* @event mouseUpEvent
+* @description Fires when the user releases a mouse button while the mouse is
+* over the menu. Passes back the DOM Event object as an argument.
+* @type YAHOO.util.CustomEvent
+*/
+mouseUpEvent: null,
+
+
+/**
+* @event clickEvent
+* @description Fires when the user clicks the on the menu. Passes back the
+* DOM Event object as an argument.
+* @type YAHOO.util.CustomEvent
+*/
+clickEvent: null,
+
+
+/**
+* @event keyPressEvent
+* @description Fires when the user presses an alphanumeric key when one of the
+* menu's items has focus. Passes back the DOM Event object as an argument.
+* @type YAHOO.util.CustomEvent
+*/
+keyPressEvent: null,
+
+
+/**
+* @event keyDownEvent
+* @description Fires when the user presses a key when one of the menu's items
+* has focus. Passes back the DOM Event object as an argument.
+* @type YAHOO.util.CustomEvent
+*/
+keyDownEvent: null,
+
+
+/**
+* @event keyUpEvent
+* @description Fires when the user releases a key when one of the menu's items
+* has focus. Passes back the DOM Event object as an argument.
+* @type YAHOO.util.CustomEvent
+*/
+keyUpEvent: null,
+
+
+/**
+* @event itemAddedEvent
+* @description Fires when an item is added to the menu.
+* @type YAHOO.util.CustomEvent
+*/
+itemAddedEvent: null,
+
+
+/**
+* @event itemRemovedEvent
+* @description Fires when an item is removed to the menu.
+* @type YAHOO.util.CustomEvent
+*/
+itemRemovedEvent: null,
+
+
+/**
+* @method init
+* @description The Menu class's initialization method. This method is
+* automatically called by the constructor, and sets up all DOM references
+* for pre-existing markup, and creates required markup if it is not
+* already present.
+* @param {String} p_oElement String specifying the id attribute of the
+* <div> element of the menu.
+* @param {String} p_oElement String specifying the id attribute of the
+* <select> element to be used as the data source
+* for the menu.
+* @param {HTMLDivElement } p_oElement Object
+* specifying the <div> element of the menu.
+* @param {HTMLSelectElement } p_oElement
+* Object specifying the <select> element to be used as
+* the data source for the menu.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the menu. See configuration class documentation for
+* more details.
+*/
+init: function(p_oElement, p_oConfig) {
+
+ this._aItemGroups = [];
+ this._aListElements = [];
+ this._aGroupTitleElements = [];
+
+ if(!this.ITEM_TYPE) {
+
+ this.ITEM_TYPE = YAHOO.widget.MenuItem;
+
+ }
+
+
+ var oElement;
+
+ if(typeof p_oElement == "string") {
+
+ oElement = document.getElementById(p_oElement);
+
+ }
+ else if(p_oElement.tagName) {
+
+ oElement = p_oElement;
+
+ }
+
+
+ if(oElement && oElement.tagName) {
+
+ switch(oElement.tagName.toUpperCase()) {
+
+ case "DIV":
+
+ this.srcElement = oElement;
+
+ if(!oElement.id) {
+
+ oElement.setAttribute("id", Dom.generateId());
+
+ }
+
+
+ /*
+ Note: we don't pass the user config in here yet
+ because we only want it executed once, at the lowest
+ subclass level.
+ */
+
+ YAHOO.widget.Menu.superclass.init.call(this, oElement);
+
+ this.beforeInitEvent.fire(YAHOO.widget.Menu);
+
+
+
+ break;
+
+ case "SELECT":
+
+ this.srcElement = oElement;
+
+
+ /*
+ The source element is not something that we can use
+ outright, so we need to create a new Overlay
+
+ Note: we don't pass the user config in here yet
+ because we only want it executed once, at the lowest
+ subclass level.
+ */
+
+ YAHOO.widget.Menu.superclass.init.call(this, Dom.generateId());
+
+ this.beforeInitEvent.fire(YAHOO.widget.Menu);
+
+
+
+ break;
+
+ }
+
+ }
+ else {
+
+ /*
+ Note: we don't pass the user config in here yet
+ because we only want it executed once, at the lowest
+ subclass level.
+ */
+
+ YAHOO.widget.Menu.superclass.init.call(this, p_oElement);
+
+ this.beforeInitEvent.fire(YAHOO.widget.Menu);
+
+
+
+ }
+
+
+ if(this.element) {
+
+ var oEl = this.element;
+
+ Dom.addClass(oEl, this.CSS_CLASS_NAME);
+
+
+ // Subscribe to Custom Events
+
+ this.initEvent.subscribe(this._onInit, this, true);
+ this.beforeRenderEvent.subscribe(this._onBeforeRender, this, true);
+ this.renderEvent.subscribe(this._onRender);
+ this.beforeShowEvent.subscribe(this._onBeforeShow, this, true);
+ this.showEvent.subscribe(this._onShow, this, true);
+ this.beforeHideEvent.subscribe(this._onBeforeHide, this, true);
+ this.hideEvent.subscribe(this._onHide, this, true);
+ this.mouseOverEvent.subscribe(this._onMouseOver, this, true);
+ this.mouseOutEvent.subscribe(this._onMouseOut, this, true);
+ this.clickEvent.subscribe(this._onClick, this, true);
+ this.keyDownEvent.subscribe(this._onKeyDown, this, true);
+ this.keyPressEvent.subscribe(this._onKeyPress, this, true);
+
+ YAHOO.widget.Module.textResizeEvent.subscribe(
+ this._onTextResize,
+ this,
+ true
+ );
+
+
+ if(p_oConfig) {
+
+ this.cfg.applyConfig(p_oConfig, true);
+
+ }
+
+
+ // Register the Menu instance with the MenuManager
+
+ YAHOO.widget.MenuManager.addMenu(this);
+
+
+ this.initEvent.fire(YAHOO.widget.Menu);
+
+ }
+
+},
+
+
+
+// Private methods
+
+
+/**
+* @method _initSubTree
+* @description Iterates the childNodes of the source element to find nodes
+* used to instantiate menu and menu items.
+* @private
+*/
+_initSubTree: function() {
+
+ var oNode;
+
+ if(this.srcElement.tagName.toUpperCase() == "DIV") {
+
+ /*
+ Populate the collection of item groups and item
+ group titles
+ */
+
+ oNode = this.body.firstChild;
+
+ var nGroup = 0,
+ sGroupTitleTagName = this.GROUP_TITLE_TAG_NAME.toUpperCase();
+
+ do {
+
+ if(oNode && oNode.tagName) {
+
+ switch(oNode.tagName.toUpperCase()) {
+
+ case sGroupTitleTagName:
+
+ this._aGroupTitleElements[nGroup] = oNode;
+
+ break;
+
+ case "UL":
+
+ this._aListElements[nGroup] = oNode;
+ this._aItemGroups[nGroup] = [];
+ nGroup++;
+
+ break;
+
+ }
+
+ }
+
+ }
+ while((oNode = oNode.nextSibling));
+
+
+ /*
+ Apply the "first-of-type" class to the first UL to mimic
+ the "first-of-type" CSS3 psuedo class.
+ */
+
+ if(this._aListElements[0]) {
+
+ Dom.addClass(this._aListElements[0], "first-of-type");
+
+ }
+
+ }
+
+
+ oNode = null;
+
+
+ if(this.srcElement.tagName) {
+
+ var sSrcElementTagName = this.srcElement.tagName.toUpperCase();
+
+
+ switch(sSrcElementTagName) {
+
+ case "DIV":
+
+ if(this._aListElements.length > 0) {
+
+
+ var i = this._aListElements.length - 1;
+
+ do {
+
+ oNode = this._aListElements[i].firstChild;
+
+
+ do {
+
+ if(
+ oNode &&
+ oNode.tagName &&
+ oNode.tagName.toUpperCase() == "LI"
+ ) {
+
+
+ this.addItem(
+ new this.ITEM_TYPE(
+ oNode,
+ { parent: this }
+ ),
+ i
+ );
+
+ }
+
+ }
+ while((oNode = oNode.nextSibling));
+
+ }
+ while(i--);
+
+ }
+
+ break;
+
+ case "SELECT":
+
+
+ oNode = this.srcElement.firstChild;
+
+ do {
+
+ if(oNode && oNode.tagName) {
+
+ switch(oNode.tagName.toUpperCase()) {
+
+ case "OPTGROUP":
+ case "OPTION":
+
+
+ this.addItem(
+ new this.ITEM_TYPE(
+ oNode,
+ { parent: this }
+ )
+ );
+
+ break;
+
+ }
+
+ }
+
+ }
+ while((oNode = oNode.nextSibling));
+
+ break;
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method _getFirstEnabledItem
+* @description Returns the first enabled item in the menu.
+* @return {YAHOO.widget.MenuItem}
+* @private
+*/
+_getFirstEnabledItem: function() {
+
+ var aItems = this.getItems(),
+ nItems = aItems.length,
+ oItem;
+
+ for(var i=0; i= aGroup.length);
+
+
+ if(aGroup[p_nItemIndex]) {
+
+ aGroup.splice(p_nItemIndex, 0, oItem);
+
+ }
+ else {
+
+ aGroup[p_nItemIndex] = oItem;
+
+ }
+
+
+ oGroupItem = aGroup[p_nItemIndex];
+
+ if(oGroupItem) {
+
+ if(
+ bAppend &&
+ (
+ !oGroupItem.element.parentNode ||
+ oGroupItem.element.parentNode.nodeType == 11
+ )
+ ) {
+
+ this._aListElements[nGroupIndex].appendChild(
+ oGroupItem.element
+ );
+
+ }
+ else {
+
+ function getNextItemSibling(p_aArray, p_nStartIndex) {
+
+ return (
+ p_aArray[p_nStartIndex] ||
+ getNextItemSibling(
+ p_aArray,
+ (p_nStartIndex+1)
+ )
+ );
+
+ }
+
+
+ var oNextItemSibling =
+ getNextItemSibling(aGroup, (p_nItemIndex+1));
+
+ if(
+ oNextItemSibling &&
+ (
+ !oGroupItem.element.parentNode ||
+ oGroupItem.element.parentNode.nodeType == 11
+ )
+ ) {
+
+ this._aListElements[nGroupIndex].insertBefore(
+ oGroupItem.element,
+ oNextItemSibling.element
+ );
+
+ }
+
+ }
+
+
+ oGroupItem.parent = this;
+
+ this._subscribeToItemEvents(oGroupItem);
+
+ this._configureSubmenu(oGroupItem);
+
+ this._updateItemProperties(nGroupIndex);
+
+
+ this.itemAddedEvent.fire(oGroupItem);
+
+ return oGroupItem;
+
+ }
+
+ }
+ else {
+
+ var nItemIndex = aGroup.length;
+
+ aGroup[nItemIndex] = oItem;
+
+ oGroupItem = aGroup[nItemIndex];
+
+
+ if(oGroupItem) {
+
+ if(
+ !Dom.isAncestor(
+ this._aListElements[nGroupIndex],
+ oGroupItem.element
+ )
+ ) {
+
+ this._aListElements[nGroupIndex].appendChild(
+ oGroupItem.element
+ );
+
+ }
+
+ oGroupItem.element.setAttribute("groupindex", nGroupIndex);
+ oGroupItem.element.setAttribute("index", nItemIndex);
+
+ oGroupItem.parent = this;
+
+ oGroupItem.index = nItemIndex;
+ oGroupItem.groupIndex = nGroupIndex;
+
+ this._subscribeToItemEvents(oGroupItem);
+
+ this._configureSubmenu(oGroupItem);
+
+ if(nItemIndex === 0) {
+
+ Dom.addClass(oGroupItem.element, "first-of-type");
+
+ }
+
+
+
+ this.itemAddedEvent.fire(oGroupItem);
+
+ return oGroupItem;
+
+ }
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method _removeItemFromGroupByIndex
+* @description Removes a menu item from a group by index. Returns the menu
+* item that was removed.
+* @private
+* @param {Number} p_nGroupIndex Number indicating the group to which the menu
+* item belongs.
+* @param {Number} p_nItemIndex Number indicating the index of the menu item
+* to be removed.
+* @return {YAHOO.widget.MenuItem}
+*/
+_removeItemFromGroupByIndex: function(p_nGroupIndex, p_nItemIndex) {
+
+ var nGroupIndex = typeof p_nGroupIndex == "number" ? p_nGroupIndex : 0,
+ aGroup = this._getItemGroup(nGroupIndex);
+
+ if(aGroup) {
+
+ var aArray = aGroup.splice(p_nItemIndex, 1),
+ oItem = aArray[0];
+
+ if(oItem) {
+
+ // Update the index and className properties of each member
+
+ this._updateItemProperties(nGroupIndex);
+
+ if(aGroup.length === 0) {
+
+ // Remove the UL
+
+ var oUL = this._aListElements[nGroupIndex];
+
+ if(this.body && oUL) {
+
+ this.body.removeChild(oUL);
+
+ }
+
+ // Remove the group from the array of items
+
+ this._aItemGroups.splice(nGroupIndex, 1);
+
+
+ // Remove the UL from the array of ULs
+
+ this._aListElements.splice(nGroupIndex, 1);
+
+
+ /*
+ Assign the "first-of-type" class to the new first UL
+ in the collection
+ */
+
+ oUL = this._aListElements[0];
+
+ if(oUL) {
+
+ Dom.addClass(oUL, "first-of-type");
+
+ }
+
+ }
+
+
+ this.itemRemovedEvent.fire(oItem);
+
+
+ // Return a reference to the item that was removed
+
+ return oItem;
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method _removeItemFromGroupByValue
+* @description Removes a menu item from a group by reference. Returns the
+* menu item that was removed.
+* @private
+* @param {Number} p_nGroupIndex Number indicating the group to which the
+* menu item belongs.
+* @param {YAHOO.widget.MenuItem} p_oItem Object reference for the MenuItem
+* instance to be removed.
+* @return {YAHOO.widget.MenuItem}
+*/
+_removeItemFromGroupByValue: function(p_nGroupIndex, p_oItem) {
+
+ var aGroup = this._getItemGroup(p_nGroupIndex);
+
+ if(aGroup) {
+
+ var nItems = aGroup.length,
+ nItemIndex = -1;
+
+ if(nItems > 0) {
+
+ var i = nItems-1;
+
+ do {
+
+ if(aGroup[i] == p_oItem) {
+
+ nItemIndex = i;
+ break;
+
+ }
+
+ }
+ while(i--);
+
+ if(nItemIndex > -1) {
+
+ return this._removeItemFromGroupByIndex(
+ p_nGroupIndex,
+ nItemIndex
+ );
+
+ }
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method _updateItemProperties
+* @description Updates the "index," "groupindex," and "className" properties
+* of the menu items in the specified group.
+* @private
+* @param {Number} p_nGroupIndex Number indicating the group of items to update.
+*/
+_updateItemProperties: function(p_nGroupIndex) {
+
+ var aGroup = this._getItemGroup(p_nGroupIndex),
+ nItems = aGroup.length;
+
+ if(nItems > 0) {
+
+ var i = nItems - 1,
+ oItem,
+ oLI;
+
+ // Update the index and className properties of each member
+
+ do {
+
+ oItem = aGroup[i];
+
+ if(oItem) {
+
+ oLI = oItem.element;
+
+ oItem.index = i;
+ oItem.groupIndex = p_nGroupIndex;
+
+ oLI.setAttribute("groupindex", p_nGroupIndex);
+ oLI.setAttribute("index", i);
+
+ Dom.removeClass(oLI, "first-of-type");
+
+ }
+
+ }
+ while(i--);
+
+
+ if(oLI) {
+
+ Dom.addClass(oLI, "first-of-type");
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method _createItemGroup
+* @description Creates a new menu item group (array) and its associated
+* <ul> element. Returns an aray of menu item groups.
+* @private
+* @param {Number} p_nIndex Number indicating the group to create.
+* @return {Array}
+*/
+_createItemGroup: function(p_nIndex) {
+
+ if(!this._aItemGroups[p_nIndex]) {
+
+ this._aItemGroups[p_nIndex] = [];
+
+ var oUL = document.createElement("ul");
+
+ this._aListElements[p_nIndex] = oUL;
+
+ return this._aItemGroups[p_nIndex];
+
+ }
+
+},
+
+
+/**
+* @method _getItemGroup
+* @description Returns the menu item group at the specified index.
+* @private
+* @param {Number} p_nIndex Number indicating the index of the menu item group
+* to be retrieved.
+* @return {Array}
+*/
+_getItemGroup: function(p_nIndex) {
+
+ var nIndex = ((typeof p_nIndex == "number") ? p_nIndex : 0);
+
+ return this._aItemGroups[nIndex];
+
+},
+
+
+/**
+* @method _configureSubmenu
+* @description Subscribes the menu item's submenu to its parent menu's events.
+* @private
+* @param {YAHOO.widget.MenuItem} p_oItem Object reference for the MenuItem
+* instance with the submenu to be configured.
+*/
+_configureSubmenu: function(p_oItem) {
+
+ var oSubmenu = p_oItem.cfg.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ /*
+ Listen for configuration changes to the parent menu
+ so they they can be applied to the submenu.
+ */
+
+ this.cfg.configChangedEvent.subscribe(
+ this._onParentMenuConfigChange,
+ oSubmenu,
+ true
+ );
+
+ this.renderEvent.subscribe(
+ this._onParentMenuRender,
+ oSubmenu,
+ true
+ );
+
+ oSubmenu.beforeShowEvent.subscribe(
+ this._onSubmenuBeforeShow,
+ oSubmenu,
+ true
+ );
+
+ oSubmenu.showEvent.subscribe(this._onSubmenuShow, null, p_oItem);
+ oSubmenu.hideEvent.subscribe(this._onSubmenuHide, null, p_oItem);
+
+ }
+
+},
+
+
+/**
+* @method _subscribeToItemEvents
+* @description Subscribes a menu to a menu item's event.
+* @private
+* @param {YAHOO.widget.MenuItem} p_oItem Object reference for the MenuItem
+* instance whose events should be subscribed to.
+*/
+_subscribeToItemEvents: function(p_oItem) {
+
+ p_oItem.focusEvent.subscribe(this._onMenuItemFocus);
+
+ p_oItem.blurEvent.subscribe(this._onMenuItemBlur);
+
+ p_oItem.cfg.configChangedEvent.subscribe(
+ this._onMenuItemConfigChange,
+ p_oItem,
+ this
+ );
+
+},
+
+
+/**
+* @method _getOffsetWidth
+* @description Returns the offset width of the menu's
+* <div> element.
+* @private
+*/
+_getOffsetWidth: function() {
+
+ var oClone = this.element.cloneNode(true);
+
+ Dom.setStyle(oClone, "width", "");
+
+ document.body.appendChild(oClone);
+
+ var sWidth = oClone.offsetWidth;
+
+ document.body.removeChild(oClone);
+
+ return sWidth;
+
+},
+
+
+/**
+* @method _setWidth
+* @description Sets the width of the menu's root <div>
+* element to its offsetWidth.
+* @private
+*/
+_setWidth: function() {
+
+ var sWidth;
+
+ if (this.element.parentNode.tagName.toUpperCase() == "BODY") {
+
+ if (this.browser == "opera") {
+
+ sWidth = this._getOffsetWidth();
+
+ }
+ else {
+
+ Dom.setStyle(this.element, "width", "auto");
+
+ sWidth = this.element.offsetWidth;
+
+ }
+
+ }
+ else {
+
+ sWidth = this._getOffsetWidth();
+
+ }
+
+ this.cfg.setProperty("width", (sWidth + "px"));
+
+},
+
+
+/**
+* @method _onWidthChange
+* @description Change event handler for the the menu's "width" configuration
+* property.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+*/
+_onWidthChange: function(p_sType, p_aArgs) {
+
+ var sWidth = p_aArgs[0];
+
+ if (sWidth && !this._hasSetWidthHandlers) {
+
+ this.itemAddedEvent.subscribe(this._setWidth);
+ this.itemRemovedEvent.subscribe(this._setWidth);
+
+ this._hasSetWidthHandlers = true;
+
+ }
+ else if (this._hasSetWidthHandlers) {
+
+ this.itemAddedEvent.unsubscribe(this._setWidth);
+ this.itemRemovedEvent.unsubscribe(this._setWidth);
+
+ this._hasSetWidthHandlers = false;
+
+ }
+
+},
+
+
+/**
+* @method _onVisibleChange
+* @description Change event handler for the the menu's "visible" configuration
+* property.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+*/
+_onVisibleChange: function(p_sType, p_aArgs) {
+
+ var bVisible = p_aArgs[0];
+
+ if (bVisible) {
+
+ Dom.addClass(this.element, "visible");
+
+ }
+ else {
+
+ Dom.removeClass(this.element, "visible");
+
+ }
+
+},
+
+
+/**
+* @method _cancelHideDelay
+* @description Cancels the call to "hideMenu."
+* @private
+*/
+_cancelHideDelay: function() {
+
+ var oRoot = this.getRoot();
+
+ if(oRoot._nHideDelayId) {
+
+ window.clearTimeout(oRoot._nHideDelayId);
+
+ }
+
+},
+
+
+/**
+* @method _execHideDelay
+* @description Hides the menu after the number of milliseconds specified by
+* the "hidedelay" configuration property.
+* @private
+*/
+_execHideDelay: function() {
+
+ this._cancelHideDelay();
+
+ var oRoot = this.getRoot(),
+ me = this;
+
+ function hideMenu() {
+
+ if(oRoot.activeItem) {
+
+ oRoot.clearActiveItem();
+
+ }
+
+ if(oRoot == me && me.cfg.getProperty("position") == "dynamic") {
+
+ me.hide();
+
+ }
+
+ }
+
+
+ oRoot._nHideDelayId =
+ window.setTimeout(hideMenu, oRoot.cfg.getProperty("hidedelay"));
+
+},
+
+
+/**
+* @method _cancelShowDelay
+* @description Cancels the call to the "showMenu."
+* @private
+*/
+_cancelShowDelay: function() {
+
+ var oRoot = this.getRoot();
+
+ if(oRoot._nShowDelayId) {
+
+ window.clearTimeout(oRoot._nShowDelayId);
+
+ }
+
+},
+
+
+/**
+* @method _execShowDelay
+* @description Shows the menu after the number of milliseconds specified by
+* the "showdelay" configuration property have ellapsed.
+* @private
+* @param {YAHOO.widget.Menu} p_oMenu Object specifying the menu that should
+* be made visible.
+*/
+_execShowDelay: function(p_oMenu) {
+
+ var oRoot = this.getRoot();
+
+ function showMenu() {
+
+ if(p_oMenu.parent.cfg.getProperty("selected")) {
+
+ p_oMenu.show();
+
+ }
+
+ }
+
+
+ oRoot._nShowDelayId =
+ window.setTimeout(showMenu, oRoot.cfg.getProperty("showdelay"));
+
+},
+
+
+/**
+* @method _execSubmenuHideDelay
+* @description Hides a submenu after the number of milliseconds specified by
+* the "submenuhidedelay" configuration property have ellapsed.
+* @private
+* @param {YAHOO.widget.Menu} p_oSubmenu Object specifying the submenu that
+* should be hidden.
+* @param {Number} p_nMouseX The x coordinate of the mouse when it left
+* the specified submenu's parent menu item.
+* @param {Number} p_nHideDelay The number of milliseconds that should ellapse
+* before the submenu is hidden.
+*/
+_execSubmenuHideDelay: function(p_oSubmenu, p_nMouseX, p_nHideDelay) {
+
+ var me = this;
+
+ p_oSubmenu._nSubmenuHideDelayId = window.setTimeout(function () {
+
+ if(me._nCurrentMouseX > (p_nMouseX + 10)) {
+
+ p_oSubmenu._nSubmenuHideDelayId = window.setTimeout(function () {
+
+ p_oSubmenu.hide();
+
+ }, p_nHideDelay);
+
+ }
+ else {
+
+ p_oSubmenu.hide();
+
+ }
+
+ }, 50);
+
+},
+
+
+
+// Protected methods
+
+
+/**
+* @method _disableScrollHeader
+* @description Disables the header used for scrolling the body of the menu.
+* @protected
+*/
+_disableScrollHeader: function() {
+
+ if(!this._bHeaderDisabled) {
+
+ Dom.addClass(this.header, "topscrollbar_disabled");
+ this._bHeaderDisabled = true;
+
+ }
+
+},
+
+
+/**
+* @method _disableScrollFooter
+* @description Disables the footer used for scrolling the body of the menu.
+* @protected
+*/
+_disableScrollFooter: function() {
+
+ if(!this._bFooterDisabled) {
+
+ Dom.addClass(this.footer, "bottomscrollbar_disabled");
+ this._bFooterDisabled = true;
+
+ }
+
+},
+
+
+/**
+* @method _enableScrollHeader
+* @description Enables the header used for scrolling the body of the menu.
+* @protected
+*/
+_enableScrollHeader: function() {
+
+ if(this._bHeaderDisabled) {
+
+ Dom.removeClass(this.header, "topscrollbar_disabled");
+ this._bHeaderDisabled = false;
+
+ }
+
+},
+
+
+/**
+* @method _enableScrollFooter
+* @description Enables the footer used for scrolling the body of the menu.
+* @protected
+*/
+_enableScrollFooter: function() {
+
+ if(this._bFooterDisabled) {
+
+ Dom.removeClass(this.footer, "bottomscrollbar_disabled");
+ this._bFooterDisabled = false;
+
+ }
+
+},
+
+
+/**
+* @method _onMouseOver
+* @description "mouseover" event handler for the menu.
+* @protected
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onMouseOver: function(p_sType, p_aArgs, p_oMenu) {
+
+ if(this._bStopMouseEventHandlers) {
+
+ return false;
+
+ }
+
+
+ var oEvent = p_aArgs[0],
+ oItem = p_aArgs[1],
+ oTarget = Event.getTarget(oEvent);
+
+
+ if(
+ !this._bHandledMouseOverEvent &&
+ (oTarget == this.element || Dom.isAncestor(this.element, oTarget))
+ ) {
+
+ // Menu mouseover logic
+
+ this._nCurrentMouseX = 0;
+
+ Event.on(
+ this.element,
+ "mousemove",
+ this._onMouseMove,
+ this,
+ true
+ );
+
+
+ this.clearActiveItem();
+
+
+ if(this.parent && this._nSubmenuHideDelayId) {
+
+ window.clearTimeout(this._nSubmenuHideDelayId);
+
+ this.parent.cfg.setProperty("selected", true);
+
+ var oParentMenu = this.parent.parent;
+
+ oParentMenu._bHandledMouseOutEvent = true;
+ oParentMenu._bHandledMouseOverEvent = false;
+
+ }
+
+
+ this._bHandledMouseOverEvent = true;
+ this._bHandledMouseOutEvent = false;
+
+ }
+
+
+ if(
+ oItem && !oItem.handledMouseOverEvent &&
+ !oItem.cfg.getProperty("disabled") &&
+ (oTarget == oItem.element || Dom.isAncestor(oItem.element, oTarget))
+ ) {
+
+ // Menu Item mouseover logic
+
+ var nShowDelay = this.cfg.getProperty("showdelay"),
+ bShowDelay = (nShowDelay > 0);
+
+
+ if(bShowDelay) {
+
+ this._cancelShowDelay();
+
+ }
+
+
+ var oActiveItem = this.activeItem;
+
+ if(oActiveItem) {
+
+ oActiveItem.cfg.setProperty("selected", false);
+
+ }
+
+
+ var oItemCfg = oItem.cfg;
+
+ // Select and focus the current menu item
+
+ oItemCfg.setProperty("selected", true);
+
+
+ if (this.hasFocus()) {
+
+ oItem.focus();
+
+ }
+
+
+ if(this.cfg.getProperty("autosubmenudisplay")) {
+
+ // Show the submenu this menu item
+
+ var oSubmenu = oItemCfg.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ if(bShowDelay) {
+
+ this._execShowDelay(oSubmenu);
+
+ }
+ else {
+
+ oSubmenu.show();
+
+ }
+
+ }
+
+ }
+
+ oItem.handledMouseOverEvent = true;
+ oItem.handledMouseOutEvent = false;
+
+ }
+
+},
+
+
+/**
+* @method _onMouseOut
+* @description "mouseout" event handler for the menu.
+* @protected
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onMouseOut: function(p_sType, p_aArgs, p_oMenu) {
+
+ if(this._bStopMouseEventHandlers) {
+
+ return false;
+
+ }
+
+
+ var oEvent = p_aArgs[0],
+ oItem = p_aArgs[1],
+ oRelatedTarget = Event.getRelatedTarget(oEvent),
+ bMovingToSubmenu = false;
+
+
+ if(oItem && !oItem.cfg.getProperty("disabled")) {
+
+ var oItemCfg = oItem.cfg,
+ oSubmenu = oItemCfg.getProperty("submenu");
+
+
+ if(
+ oSubmenu &&
+ (
+ oRelatedTarget == oSubmenu.element ||
+ Dom.isAncestor(oSubmenu.element, oRelatedTarget)
+ )
+ ) {
+
+ bMovingToSubmenu = true;
+
+ }
+
+
+ if(
+ !oItem.handledMouseOutEvent &&
+ (
+ (
+ oRelatedTarget != oItem.element &&
+ !Dom.isAncestor(oItem.element, oRelatedTarget)
+ ) || bMovingToSubmenu
+ )
+ ) {
+
+ // Menu Item mouseout logic
+
+ if(!bMovingToSubmenu) {
+
+ oItem.cfg.setProperty("selected", false);
+
+
+ if(oSubmenu) {
+
+ var nSubmenuHideDelay =
+ this.cfg.getProperty("submenuhidedelay"),
+
+ nShowDelay = this.cfg.getProperty("showdelay");
+
+ if(
+ !(this instanceof YAHOO.widget.MenuBar) &&
+ nSubmenuHideDelay > 0 &&
+ nShowDelay >= nSubmenuHideDelay
+ ) {
+
+ this._execSubmenuHideDelay(
+ oSubmenu,
+ Event.getPageX(oEvent),
+ nSubmenuHideDelay
+ );
+
+ }
+ else {
+
+ oSubmenu.hide();
+
+ }
+
+ }
+
+ }
+
+
+ oItem.handledMouseOutEvent = true;
+ oItem.handledMouseOverEvent = false;
+
+ }
+
+ }
+
+
+ if(
+ !this._bHandledMouseOutEvent &&
+ (
+ (
+ oRelatedTarget != this.element &&
+ !Dom.isAncestor(this.element, oRelatedTarget)
+ )
+ || bMovingToSubmenu
+ )
+ ) {
+
+ // Menu mouseout logic
+
+ Event.removeListener(this.element, "mousemove", this._onMouseMove);
+
+ this._nCurrentMouseX = Event.getPageX(oEvent);
+
+ this._bHandledMouseOutEvent = true;
+ this._bHandledMouseOverEvent = false;
+
+ }
+
+},
+
+
+/**
+* @method _onMouseMove
+* @description "click" event handler for the menu.
+* @protected
+* @param {Event} p_oEvent Object representing the DOM event object passed
+* back by the event utility (YAHOO.util.Event).
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onMouseMove: function(p_oEvent, p_oMenu) {
+
+ if(this._bStopMouseEventHandlers) {
+
+ return false;
+
+ }
+
+ this._nCurrentMouseX = Event.getPageX(p_oEvent);
+
+},
+
+
+/**
+* @method _onClick
+* @description "click" event handler for the menu.
+* @protected
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onClick: function(p_sType, p_aArgs, p_oMenu) {
+
+ var oEvent = p_aArgs[0],
+ oItem = p_aArgs[1],
+ oTarget = Event.getTarget(oEvent);
+
+ if(oItem && !oItem.cfg.getProperty("disabled")) {
+
+ var oItemCfg = oItem.cfg,
+ oSubmenu = oItemCfg.getProperty("submenu");
+
+
+ /*
+ ACCESSIBILITY FEATURE FOR SCREEN READERS:
+ Expand/collapse the submenu when the user clicks
+ on the submenu indicator image.
+ */
+
+ if(oTarget == oItem.submenuIndicator && oSubmenu) {
+
+ if(oSubmenu.cfg.getProperty("visible")) {
+
+ oSubmenu.hide();
+
+ oSubmenu.parent.focus();
+
+ }
+ else {
+
+ this.clearActiveItem();
+
+ oItem.cfg.setProperty("selected", true);
+
+ oSubmenu.show();
+
+ oSubmenu.setInitialFocus();
+
+ }
+
+ }
+ else {
+
+ var sURL = oItemCfg.getProperty("url"),
+ bCurrentPageURL = (sURL.substr((sURL.length-1),1) == "#"),
+ sTarget = oItemCfg.getProperty("target"),
+ bHasTarget = (sTarget && sTarget.length > 0);
+
+ /*
+ Prevent the browser from following links
+ equal to "#"
+ */
+
+ if(
+ oTarget.tagName.toUpperCase() == "A" &&
+ bCurrentPageURL && !bHasTarget
+ ) {
+
+ Event.preventDefault(oEvent);
+
+ oItem.focus();
+
+ }
+
+ if(
+ oTarget.tagName.toUpperCase() != "A" &&
+ !bCurrentPageURL && !bHasTarget
+ ) {
+
+ /*
+ Follow the URL of the item regardless of
+ whether or not the user clicked specifically
+ on the anchor element.
+ */
+
+ document.location = sURL;
+
+ }
+
+
+ /*
+ If the item doesn't navigate to a URL and it doesn't have
+ a submenu, then collapse the menu tree.
+ */
+
+ if(bCurrentPageURL && !oSubmenu) {
+
+ var oRoot = this.getRoot();
+
+ if(oRoot.cfg.getProperty("position") == "static") {
+
+ oRoot.clearActiveItem();
+
+ }
+ else if(oRoot.cfg.getProperty("clicktohide")) {
+
+ oRoot.hide();
+
+ }
+
+ }
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method _onKeyDown
+* @description "keydown" event handler for the menu.
+* @protected
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onKeyDown: function(p_sType, p_aArgs, p_oMenu) {
+
+ var oEvent = p_aArgs[0],
+ oItem = p_aArgs[1],
+ me = this,
+ oSubmenu;
+
+
+ /*
+ This function is called to prevent a bug in Firefox. In Firefox,
+ moving a DOM element into a stationary mouse pointer will cause the
+ browser to fire mouse events. This can result in the menu mouse
+ event handlers being called uncessarily, especially when menus are
+ moved into a stationary mouse pointer as a result of a
+ key event handler.
+ */
+ function stopMouseEventHandlers() {
+
+ me._bStopMouseEventHandlers = true;
+
+ window.setTimeout(function() {
+
+ me._bStopMouseEventHandlers = false;
+
+ }, 10);
+
+ }
+
+
+ if(oItem && !oItem.cfg.getProperty("disabled")) {
+
+ var oItemCfg = oItem.cfg,
+ oParentItem = this.parent,
+ oRoot,
+ oNextItem;
+
+
+ switch(oEvent.keyCode) {
+
+ case 38: // Up arrow
+ case 40: // Down arrow
+
+ oNextItem = (oEvent.keyCode == 38) ?
+ oItem.getPreviousEnabledSibling() :
+ oItem.getNextEnabledSibling();
+
+ if(oNextItem) {
+
+ this.clearActiveItem();
+
+ oNextItem.cfg.setProperty("selected", true);
+ oNextItem.focus();
+
+
+ if(this.cfg.getProperty("maxheight") > 0) {
+
+ var oBody = this.body;
+
+ oBody.scrollTop =
+
+ (
+ oNextItem.element.offsetTop +
+ oNextItem.element.offsetHeight
+ ) - oBody.offsetHeight;
+
+
+ var nScrollTop = oBody.scrollTop,
+ nScrollTarget =
+ oBody.scrollHeight - oBody.offsetHeight;
+
+ if(nScrollTop === 0) {
+
+ this._disableScrollHeader();
+ this._enableScrollFooter();
+
+ }
+ else if(nScrollTop == nScrollTarget) {
+
+ this._enableScrollHeader();
+ this._disableScrollFooter();
+
+ }
+ else {
+
+ this._enableScrollHeader();
+ this._enableScrollFooter();
+
+ }
+
+ }
+
+ }
+
+
+ Event.preventDefault(oEvent);
+
+ stopMouseEventHandlers();
+
+ break;
+
+
+ case 39: // Right arrow
+
+ oSubmenu = oItemCfg.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ if(!oItemCfg.getProperty("selected")) {
+
+ oItemCfg.setProperty("selected", true);
+
+ }
+
+ oSubmenu.show();
+ oSubmenu.setInitialFocus();
+ oSubmenu.setInitialSelection();
+
+ }
+ else {
+
+ oRoot = this.getRoot();
+
+ if(oRoot instanceof YAHOO.widget.MenuBar) {
+
+ oNextItem = oRoot.activeItem.getNextEnabledSibling();
+
+ if(oNextItem) {
+
+ oRoot.clearActiveItem();
+
+ oNextItem.cfg.setProperty("selected", true);
+
+ oSubmenu = oNextItem.cfg.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ oSubmenu.show();
+
+ }
+
+ oNextItem.focus();
+
+ }
+
+ }
+
+ }
+
+
+ Event.preventDefault(oEvent);
+
+ stopMouseEventHandlers();
+
+ break;
+
+
+ case 37: // Left arrow
+
+ if(oParentItem) {
+
+ var oParentMenu = oParentItem.parent;
+
+ if(oParentMenu instanceof YAHOO.widget.MenuBar) {
+
+ oNextItem =
+ oParentMenu.activeItem.getPreviousEnabledSibling();
+
+ if(oNextItem) {
+
+ oParentMenu.clearActiveItem();
+
+ oNextItem.cfg.setProperty("selected", true);
+
+ oSubmenu = oNextItem.cfg.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ oSubmenu.show();
+
+ }
+
+ oNextItem.focus();
+
+ }
+
+ }
+ else {
+
+ this.hide();
+
+ oParentItem.focus();
+
+ }
+
+ }
+
+ Event.preventDefault(oEvent);
+
+ stopMouseEventHandlers();
+
+ break;
+
+ }
+
+
+ }
+
+
+ if(oEvent.keyCode == 27) { // Esc key
+
+ if(this.cfg.getProperty("position") == "dynamic") {
+
+ this.hide();
+
+ if(this.parent) {
+
+ this.parent.focus();
+
+ }
+
+ }
+ else if(this.activeItem) {
+
+ oSubmenu = this.activeItem.cfg.getProperty("submenu");
+
+ if(oSubmenu && oSubmenu.cfg.getProperty("visible")) {
+
+ oSubmenu.hide();
+ this.activeItem.focus();
+
+ }
+ else {
+
+ this.activeItem.blur();
+ this.activeItem.cfg.setProperty("selected", false);
+
+ }
+
+ }
+
+
+ Event.preventDefault(oEvent);
+
+ }
+
+},
+
+
+/**
+* @method _onKeyPress
+* @description "keypress" event handler for a Menu instance.
+* @protected
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event
+* was fired.
+* @param {YAHOO.widget.Menu} p_oMenu The Menu instance that fired the event.
+*/
+_onKeyPress: function(p_sType, p_aArgs, p_oMenu) {
+
+ var oEvent = p_aArgs[0];
+
+
+ if(oEvent.keyCode == 40 || oEvent.keyCode == 38) {
+
+ YAHOO.util.Event.preventDefault(oEvent);
+
+ }
+
+},
+
+
+/**
+* @method _onTextResize
+* @description "textresize" event handler for the menu.
+* @protected
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onTextResize: function(p_sType, p_aArgs, p_oMenu) {
+
+ if(this.browser == "gecko" && !this._handleResize) {
+
+ this._handleResize = true;
+ return;
+
+ }
+
+
+ var oConfig = this.cfg;
+
+ if(oConfig.getProperty("position") == "dynamic") {
+
+ oConfig.setProperty("width", (this._getOffsetWidth() + "px"));
+
+ }
+
+},
+
+
+/**
+* @method _onScrollTargetMouseOver
+* @description "mouseover" event handler for the menu's "header" and "footer"
+* elements. Used to scroll the body of the menu up and down when the
+* menu's "maxheight" configuration property is set to a value greater than 0.
+* @protected
+* @param {Event} p_oEvent Object representing the DOM event object passed
+* back by the event utility (YAHOO.util.Event).
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onScrollTargetMouseOver: function(p_oEvent, p_oMenu) {
+
+ this._cancelHideDelay();
+
+ var oTarget = Event.getTarget(p_oEvent),
+ oBody = this.body,
+ me = this,
+ nScrollTarget,
+ fnScrollFunction;
+
+
+ function scrollBodyDown() {
+
+ var nScrollTop = oBody.scrollTop;
+
+
+ if(nScrollTop < nScrollTarget) {
+
+ oBody.scrollTop = (nScrollTop + 1);
+
+ me._enableScrollHeader();
+
+ }
+ else {
+
+ oBody.scrollTop = nScrollTarget;
+
+ window.clearInterval(me._nBodyScrollId);
+
+ me._disableScrollFooter();
+
+ }
+
+ }
+
+
+ function scrollBodyUp() {
+
+ var nScrollTop = oBody.scrollTop;
+
+
+ if(nScrollTop > 0) {
+
+ oBody.scrollTop = (nScrollTop - 1);
+
+ me._enableScrollFooter();
+
+ }
+ else {
+
+ oBody.scrollTop = 0;
+
+ window.clearInterval(me._nBodyScrollId);
+
+ me._disableScrollHeader();
+
+ }
+
+ }
+
+
+ if(Dom.hasClass(oTarget, "hd")) {
+
+ fnScrollFunction = scrollBodyUp;
+
+ }
+ else {
+
+ nScrollTarget = oBody.scrollHeight - oBody.offsetHeight;
+
+ fnScrollFunction = scrollBodyDown;
+
+ }
+
+
+ this._nBodyScrollId = window.setInterval(fnScrollFunction, 10);
+
+},
+
+
+/**
+* @method _onScrollTargetMouseOut
+* @description "mouseout" event handler for the menu's "header" and "footer"
+* elements. Used to stop scrolling the body of the menu up and down when the
+* menu's "maxheight" configuration property is set to a value greater than 0.
+* @protected
+* @param {Event} p_oEvent Object representing the DOM event object passed
+* back by the event utility (YAHOO.util.Event).
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onScrollTargetMouseOut: function(p_oEvent, p_oMenu) {
+
+ window.clearInterval(this._nBodyScrollId);
+
+ this._cancelHideDelay();
+
+},
+
+
+
+// Private methods
+
+
+/**
+* @method _onInit
+* @description "init" event handler for the menu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onInit: function(p_sType, p_aArgs, p_oMenu) {
+
+ this.cfg.subscribeToConfigEvent("width", this._onWidthChange);
+ this.cfg.subscribeToConfigEvent("visible", this._onVisibleChange);
+
+ if(
+ (
+ (this.parent && !this.lazyLoad) ||
+ (!this.parent && this.cfg.getProperty("position") == "static") ||
+ (
+ !this.parent &&
+ !this.lazyLoad &&
+ this.cfg.getProperty("position") == "dynamic"
+ )
+ ) &&
+ this.getItemGroups().length === 0
+ ) {
+
+ if(this.srcElement) {
+
+ this._initSubTree();
+
+ }
+
+
+ if(this.itemData) {
+
+ this.addItems(this.itemData);
+
+ }
+
+ }
+ else if(this.lazyLoad) {
+
+ this.cfg.fireQueue();
+
+ }
+
+},
+
+
+/**
+* @method _onBeforeRender
+* @description "beforerender" event handler for the menu. Appends all of the
+* <ul>, <li> and their accompanying
+* title elements to the body element of the menu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onBeforeRender: function(p_sType, p_aArgs, p_oMenu) {
+
+ var oConfig = this.cfg,
+ oEl = this.element,
+ nListElements = this._aListElements.length;
+
+
+ if(nListElements > 0) {
+
+ var i = 0,
+ bFirstList = true,
+ oUL,
+ oGroupTitle;
+
+
+ do {
+
+ oUL = this._aListElements[i];
+
+ if(oUL) {
+
+ if(bFirstList) {
+
+ Dom.addClass(oUL, "first-of-type");
+ bFirstList = false;
+
+ }
+
+
+ if(!Dom.isAncestor(oEl, oUL)) {
+
+ this.appendToBody(oUL);
+
+ }
+
+
+ oGroupTitle = this._aGroupTitleElements[i];
+
+ if(oGroupTitle) {
+
+ if(!Dom.isAncestor(oEl, oGroupTitle)) {
+
+ oUL.parentNode.insertBefore(oGroupTitle, oUL);
+
+ }
+
+
+ Dom.addClass(oUL, "hastitle");
+
+ }
+
+ }
+
+ i++;
+
+ }
+ while(i < nListElements);
+
+ }
+
+},
+
+
+/**
+* @method _onRender
+* @description "render" event handler for the menu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+*/
+_onRender: function(p_sType, p_aArgs) {
+
+ if (
+ this.cfg.getProperty("position") == "dynamic" &&
+ !this.cfg.getProperty("width")
+ ) {
+
+ this._setWidth();
+
+ }
+
+},
+
+
+/**
+* @method _onBeforeShow
+* @description "beforeshow" event handler for the menu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+_onBeforeShow: function(p_sType, p_aArgs, p_oMenu) {
+
+ if(this.lazyLoad && this.getItemGroups().length === 0) {
+
+ if(this.srcElement) {
+
+ this._initSubTree();
+
+ }
+
+
+ if(this.itemData) {
+
+ if(
+ this.parent && this.parent.parent &&
+ this.parent.parent.srcElement &&
+ this.parent.parent.srcElement.tagName.toUpperCase() == "SELECT"
+ ) {
+
+ var nOptions = this.itemData.length;
+
+ for(var n=0; n= nViewportHeight) {
+
+ var nMaxHeight = this.cfg.getProperty("maxheight");
+
+ /*
+ Cache the original value for the "maxheight" configuration
+ property so that we can set it back when the menu is hidden.
+ */
+
+ this._nMaxHeight = nMaxHeight;
+
+ this.cfg.setProperty("maxheight", (nViewportHeight - 20));
+
+ }
+
+
+ if(this.cfg.getProperty("maxheight") > 0) {
+
+ var oBody = this.body;
+
+ if(oBody.scrollTop > 0) {
+
+ oBody.scrollTop = 0;
+
+ }
+
+ this._disableScrollHeader();
+ this._enableScrollFooter();
+
+ }
+
+ }
+
+
+},
+
+
+/**
+* @method _onShow
+* @description "show" event handler for the menu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that fired
+* the event.
+*/
+_onShow: function(p_sType, p_aArgs, p_oMenu) {
+
+ var oParent = this.parent;
+
+ if(oParent) {
+
+ var oParentMenu = oParent.parent,
+ aParentAlignment = oParentMenu.cfg.getProperty("submenualignment"),
+ aAlignment = this.cfg.getProperty("submenualignment");
+
+
+ if(
+ (aParentAlignment[0] != aAlignment[0]) &&
+ (aParentAlignment[1] != aAlignment[1])
+ ) {
+
+ this.cfg.setProperty(
+ "submenualignment",
+ [ aParentAlignment[0], aParentAlignment[1] ]
+ );
+
+ }
+
+
+ if(
+ !oParentMenu.cfg.getProperty("autosubmenudisplay") &&
+ oParentMenu.cfg.getProperty("position") == "static"
+ ) {
+
+ oParentMenu.cfg.setProperty("autosubmenudisplay", true);
+
+
+ function disableAutoSubmenuDisplay(p_oEvent) {
+
+ if(
+ p_oEvent.type == "mousedown" ||
+ (p_oEvent.type == "keydown" && p_oEvent.keyCode == 27)
+ ) {
+
+ /*
+ Set the "autosubmenudisplay" to "false" if the user
+ clicks outside the menu bar.
+ */
+
+ var oTarget = Event.getTarget(p_oEvent);
+
+ if(
+ oTarget != oParentMenu.element ||
+ !YAHOO.util.Dom.isAncestor(oParentMenu.element, oTarget)
+ ) {
+
+ oParentMenu.cfg.setProperty(
+ "autosubmenudisplay",
+ false
+ );
+
+ Event.removeListener(
+ document,
+ "mousedown",
+ disableAutoSubmenuDisplay
+ );
+
+ Event.removeListener(
+ document,
+ "keydown",
+ disableAutoSubmenuDisplay
+ );
+
+ }
+
+ }
+
+ }
+
+ Event.on(document, "mousedown", disableAutoSubmenuDisplay);
+ Event.on(document, "keydown", disableAutoSubmenuDisplay);
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method _onBeforeHide
+* @description "beforehide" event handler for the menu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that fired
+* the event.
+*/
+_onBeforeHide: function(p_sType, p_aArgs, p_oMenu) {
+
+ var oActiveItem = this.activeItem;
+
+ if(oActiveItem) {
+
+ var oConfig = oActiveItem.cfg;
+
+ oConfig.setProperty("selected", false);
+
+ var oSubmenu = oConfig.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ oSubmenu.hide();
+
+ }
+
+ }
+
+ if (this == this.getRoot()) {
+
+ this.blur();
+
+ }
+
+},
+
+
+/**
+* @method _onHide
+* @description "hide" event handler for the menu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that fired
+* the event.
+*/
+_onHide: function(p_sType, p_aArgs, p_oMenu) {
+
+ if(this._nMaxHeight != -1) {
+
+ this.cfg.setProperty("maxheight", this._nMaxHeight);
+
+ this._nMaxHeight = -1;
+
+ }
+
+},
+
+
+/**
+* @method _onParentMenuConfigChange
+* @description "configchange" event handler for a submenu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oSubmenu Object representing the submenu that
+* subscribed to the event.
+*/
+_onParentMenuConfigChange: function(p_sType, p_aArgs, p_oSubmenu) {
+
+ var sPropertyName = p_aArgs[0][0],
+ oPropertyValue = p_aArgs[0][1];
+
+ switch(sPropertyName) {
+
+ case "iframe":
+ case "constraintoviewport":
+ case "hidedelay":
+ case "showdelay":
+ case "submenuhidedelay":
+ case "clicktohide":
+ case "effect":
+ case "classname":
+
+ p_oSubmenu.cfg.setProperty(sPropertyName, oPropertyValue);
+
+ break;
+
+ }
+
+},
+
+
+/**
+* @method _onParentMenuRender
+* @description "render" event handler for a submenu. Renders a
+* submenu in response to the firing of its parent's "render" event.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oSubmenu Object representing the submenu that
+* subscribed to the event.
+*/
+_onParentMenuRender: function(p_sType, p_aArgs, p_oSubmenu) {
+
+ var oParentMenu = p_oSubmenu.parent.parent,
+
+ oConfig = {
+
+ constraintoviewport:
+ oParentMenu.cfg.getProperty("constraintoviewport"),
+
+ xy: [0,0],
+
+ clicktohide: oParentMenu.cfg.getProperty("clicktohide"),
+
+ effect: oParentMenu.cfg.getProperty("effect"),
+
+ showdelay: oParentMenu.cfg.getProperty("showdelay"),
+
+ hidedelay: oParentMenu.cfg.getProperty("hidedelay"),
+
+ submenuhidedelay: oParentMenu.cfg.getProperty("submenuhidedelay"),
+
+ classname: oParentMenu.cfg.getProperty("classname")
+
+ };
+
+
+ /*
+ Only sync the "iframe" configuration property if the parent
+ menu's "position" configuration is the same.
+ */
+
+ if(
+ this.cfg.getProperty("position") ==
+ oParentMenu.cfg.getProperty("position")
+ ) {
+
+ oConfig.iframe = oParentMenu.cfg.getProperty("iframe");
+
+ }
+
+
+ p_oSubmenu.cfg.applyConfig(oConfig);
+
+
+ if(!this.lazyLoad) {
+
+ var oLI = this.parent.element;
+
+ if(this.element.parentNode == oLI) {
+
+ this.render();
+
+ }
+ else {
+
+ this.render(oLI);
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method _onSubmenuBeforeShow
+* @description "beforeshow" event handler for a submenu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oSubmenu Object representing the submenu that
+* subscribed to the event.
+*/
+_onSubmenuBeforeShow: function(p_sType, p_aArgs, p_oSubmenu) {
+
+ var oParent = this.parent,
+ aAlignment = oParent.parent.cfg.getProperty("submenualignment");
+
+ this.cfg.setProperty(
+ "context",
+ [oParent.element, aAlignment[0], aAlignment[1]]
+ );
+
+
+ var nScrollTop = oParent.parent.body.scrollTop;
+
+ if(
+ (this.browser == "gecko" || this.browser == "safari")
+ && nScrollTop > 0
+ ) {
+
+ this.cfg.setProperty("y", (this.cfg.getProperty("y") - nScrollTop));
+
+ }
+
+},
+
+
+/**
+* @method _onSubmenuShow
+* @description "show" event handler for a submenu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+*/
+_onSubmenuShow: function(p_sType, p_aArgs) {
+
+ this.submenuIndicator.firstChild.nodeValue =
+ this.EXPANDED_SUBMENU_INDICATOR_TEXT;
+
+},
+
+
+/**
+* @method _onSubmenuHide
+* @description "hide" Custom Event handler for a submenu.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+*/
+_onSubmenuHide: function(p_sType, p_aArgs) {
+
+ this.submenuIndicator.firstChild.nodeValue =
+ this.COLLAPSED_SUBMENU_INDICATOR_TEXT;
+
+},
+
+
+/**
+* @method _onMenuItemFocus
+* @description "focus" event handler for the menu's items.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+*/
+_onMenuItemFocus: function(p_sType, p_aArgs) {
+
+ this.parent.focusEvent.fire(this);
+
+},
+
+
+/**
+* @method _onMenuItemBlur
+* @description "blur" event handler for the menu's items.
+* @private
+* @param {String} p_sType String representing the name of the event
+* that was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+*/
+_onMenuItemBlur: function(p_sType, p_aArgs) {
+
+ this.parent.blurEvent.fire(this);
+
+},
+
+
+/**
+* @method _onMenuItemConfigChange
+* @description "configchange" event handler for the menu's items.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
+* that fired the event.
+*/
+_onMenuItemConfigChange: function(p_sType, p_aArgs, p_oItem) {
+
+ var sPropertyName = p_aArgs[0][0],
+ oPropertyValue = p_aArgs[0][1];
+
+ switch(sPropertyName) {
+
+ case "selected":
+
+ if (oPropertyValue === true) {
+
+ this.activeItem = p_oItem;
+
+ }
+
+ break;
+
+ case "submenu":
+
+ var oSubmenu = p_aArgs[0][1];
+
+ if(oSubmenu) {
+
+ this._configureSubmenu(p_oItem);
+
+ }
+
+ break;
+
+ case "text":
+ case "helptext":
+
+ /*
+ A change to an item's "text" or "helptext"
+ configuration properties requires the width of the parent
+ menu to be recalculated.
+ */
+
+ if(this.element.style.width) {
+
+ var sWidth = this._getOffsetWidth() + "px";
+
+ Dom.setStyle(this.element, "width", sWidth);
+
+ }
+
+ break;
+
+ }
+
+},
+
+
+
+// Public event handlers for configuration properties
+
+
+/**
+* @method enforceConstraints
+* @description The default event handler executed when the moveEvent is fired,
+* if the "constraintoviewport" configuration property is set to true.
+* @param {String} type The name of the event that was fired.
+* @param {Array} args Collection of arguments sent when the
+* event was fired.
+* @param {Array} obj Array containing the current Menu instance
+* and the item that fired the event.
+*/
+enforceConstraints: function(type, args, obj) {
+
+ if(this.parent && !(this.parent.parent instanceof YAHOO.widget.MenuBar)) {
+
+ var oConfig = this.cfg,
+ pos = args[0],
+
+ x = pos[0],
+ y = pos[1],
+
+ offsetHeight = this.element.offsetHeight,
+ offsetWidth = this.element.offsetWidth,
+
+ viewPortWidth = YAHOO.util.Dom.getViewportWidth(),
+ viewPortHeight = YAHOO.util.Dom.getViewportHeight(),
+
+ scrollX = Math.max(
+ document.documentElement.scrollLeft,
+ document.body.scrollLeft
+ ),
+
+ scrollY = Math.max(
+ document.documentElement.scrollTop,
+ document.body.scrollTop
+ ),
+
+ nPadding = (
+ this.parent &&
+ this.parent.parent instanceof YAHOO.widget.MenuBar
+ ) ? 0 : 10,
+
+ topConstraint = scrollY + nPadding,
+ leftConstraint = scrollX + nPadding,
+ bottomConstraint =
+ scrollY + viewPortHeight - offsetHeight - nPadding,
+ rightConstraint = scrollX + viewPortWidth - offsetWidth - nPadding,
+
+ aContext = oConfig.getProperty("context"),
+ oContextElement = aContext ? aContext[0] : null;
+
+
+ if (x < 10) {
+
+ x = leftConstraint;
+
+ } else if ((x + offsetWidth) > viewPortWidth) {
+
+ if(
+ oContextElement &&
+ ((x - oContextElement.offsetWidth) > offsetWidth)
+ ) {
+
+ x = (x - (oContextElement.offsetWidth + offsetWidth));
+
+ }
+ else {
+
+ x = rightConstraint;
+
+ }
+
+ }
+
+ if (y < 10) {
+
+ y = topConstraint;
+
+ } else if (y > bottomConstraint) {
+
+ if(oContextElement && (y > offsetHeight)) {
+
+ y = ((y + oContextElement.offsetHeight) - offsetHeight);
+
+ }
+ else {
+
+ y = bottomConstraint;
+
+ }
+
+ }
+
+ oConfig.setProperty("x", x, true);
+ oConfig.setProperty("y", y, true);
+ oConfig.setProperty("xy", [x,y], true);
+
+ }
+
+},
+
+
+/**
+* @method configVisible
+* @description Event handler for when the "visible" configuration property
+* the menu changes.
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+configVisible: function(p_sType, p_aArgs, p_oMenu) {
+
+ if(this.cfg.getProperty("position") == "dynamic") {
+
+ YAHOO.widget.Menu.superclass.configVisible.call(
+ this,
+ p_sType,
+ p_aArgs,
+ p_oMenu
+ );
+
+ }
+ else {
+
+ var bVisible = p_aArgs[0],
+ sDisplay = Dom.getStyle(this.element, "display");
+
+ if(bVisible) {
+
+ if(sDisplay != "block") {
+ this.beforeShowEvent.fire();
+ Dom.setStyle(this.element, "display", "block");
+ this.showEvent.fire();
+ }
+
+ }
+ else {
+
+ if(sDisplay == "block") {
+ this.beforeHideEvent.fire();
+ Dom.setStyle(this.element, "display", "none");
+ this.hideEvent.fire();
+ }
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method configPosition
+* @description Event handler for when the "position" configuration property
+* of the menu changes.
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+configPosition: function(p_sType, p_aArgs, p_oMenu) {
+
+ var sCSSPosition = p_aArgs[0] == "static" ? "static" : "absolute",
+ oCfg = this.cfg;
+
+ Dom.setStyle(this.element, "position", sCSSPosition);
+
+
+ if(sCSSPosition == "static") {
+
+ /*
+ Remove the iframe for statically positioned menus since it will
+ intercept mouse events.
+ */
+
+ oCfg.setProperty("iframe", false);
+
+
+ // Statically positioned menus are visible by default
+
+ Dom.setStyle(this.element, "display", "block");
+
+ oCfg.setProperty("visible", true);
+
+ }
+ else {
+
+ /*
+ Even though the "visible" property is queued to
+ "false" by default, we need to set the "visibility" property to
+ "hidden" since Overlay's "configVisible" implementation checks the
+ element's "visibility" style property before deciding whether
+ or not to show an Overlay instance.
+ */
+
+ Dom.setStyle(this.element, "visibility", "hidden");
+
+ }
+
+
+ if(sCSSPosition == "absolute") {
+
+ var nZIndex = oCfg.getProperty("zindex");
+
+ if(!nZIndex || nZIndex === 0) {
+
+ nZIndex = this.parent ?
+ (this.parent.parent.cfg.getProperty("zindex") + 1) : 1;
+
+ oCfg.setProperty("zindex", nZIndex);
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method configIframe
+* @description Event handler for when the "iframe" configuration property of
+* the menu changes.
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+configIframe: function(p_sType, p_aArgs, p_oMenu) {
+
+ if(this.cfg.getProperty("position") == "dynamic") {
+
+ YAHOO.widget.Menu.superclass.configIframe.call(
+ this,
+ p_sType,
+ p_aArgs,
+ p_oMenu
+ );
+
+ }
+
+},
+
+
+/**
+* @method configHideDelay
+* @description Event handler for when the "hidedelay" configuration property
+* of the menu changes.
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+configHideDelay: function(p_sType, p_aArgs, p_oMenu) {
+
+ var nHideDelay = p_aArgs[0],
+ oMouseOutEvent = this.mouseOutEvent,
+ oMouseOverEvent = this.mouseOverEvent,
+ oKeyDownEvent = this.keyDownEvent;
+
+ if(nHideDelay > 0) {
+
+ /*
+ Only assign event handlers once. This way the user change
+ the value for the hidedelay as many times as they want.
+ */
+
+ if(!this._bHideDelayEventHandlersAssigned) {
+
+ oMouseOutEvent.subscribe(this._execHideDelay, this);
+ oMouseOverEvent.subscribe(this._cancelHideDelay, this, true);
+ oKeyDownEvent.subscribe(this._cancelHideDelay, this, true);
+
+ this._bHideDelayEventHandlersAssigned = true;
+
+ }
+
+ }
+ else {
+
+ oMouseOutEvent.unsubscribe(this._execHideDelay, this);
+ oMouseOverEvent.unsubscribe(this._cancelHideDelay, this);
+ oKeyDownEvent.unsubscribe(this._cancelHideDelay, this);
+
+ this._bHideDelayEventHandlersAssigned = false;
+
+ }
+
+},
+
+
+/**
+* @method configContainer
+* @description Event handler for when the "container" configuration property
+of the menu changes.
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that
+* fired the event.
+*/
+configContainer: function(p_sType, p_aArgs, p_oMenu) {
+
+ var oElement = p_aArgs[0];
+
+ if(typeof oElement == 'string') {
+
+ this.cfg.setProperty(
+ "container",
+ document.getElementById(oElement),
+ true
+ );
+
+ }
+
+},
+
+
+/**
+* @method _setMaxHeight
+* @description "renderEvent" handler used to defer the setting of the
+* "maxheight" configuration property until the menu is rendered in lazy
+* load scenarios.
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event
+* was fired.
+* @param {Number} p_nMaxHeight Number representing the value to set for the
+* "maxheight" configuration property.
+* @private
+*/
+_setMaxHeight: function(p_sType, p_aArgs, p_nMaxHeight) {
+
+ this.cfg.setProperty("maxheight", p_nMaxHeight);
+ this.renderEvent.unsubscribe(this._setMaxHeight);
+
+},
+
+
+/**
+* @method configMaxHeight
+* @description Event handler for when the "maxheight" configuration property of
+* a Menu changes.
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event
+* was fired.
+* @param {YAHOO.widget.Menu} p_oMenu The Menu instance fired
+* the event.
+*/
+configMaxHeight: function(p_sType, p_aArgs, p_oMenu) {
+
+ var nMaxHeight = p_aArgs[0],
+ oBody = this.body;
+
+
+ if(this.lazyLoad && !oBody) {
+
+ this.renderEvent.unsubscribe(this._setMaxHeight);
+
+ if(nMaxHeight > 0) {
+
+ this.renderEvent.subscribe(this._setMaxHeight, nMaxHeight, this);
+
+ }
+
+ return;
+
+ }
+
+ Dom.setStyle(oBody, "height", "auto");
+ Dom.setStyle(oBody, "overflow", "visible");
+
+ var oHeader = this.header,
+ oFooter = this.footer,
+ fnMouseOver = this._onScrollTargetMouseOver,
+ fnMouseOut = this._onScrollTargetMouseOut;
+
+
+ if((nMaxHeight > 0) && (oBody.offsetHeight > nMaxHeight)) {
+
+ if(!this.cfg.getProperty("width")) {
+
+ this._setWidth();
+
+ }
+
+ if(!oHeader && !oFooter) {
+
+ this.setHeader(" ");
+ this.setFooter(" ");
+
+ oHeader = this.header;
+ oFooter = this.footer;
+
+ Dom.addClass(oHeader, "topscrollbar");
+ Dom.addClass(oFooter, "bottomscrollbar");
+
+ this.element.insertBefore(oHeader, oBody);
+ this.element.appendChild(oFooter);
+
+ Event.on(oHeader, "mouseover", fnMouseOver, this, true);
+ Event.on(oHeader, "mouseout", fnMouseOut, this, true);
+ Event.on(oFooter, "mouseover", fnMouseOver, this, true);
+ Event.on(oFooter, "mouseout", fnMouseOut, this, true);
+
+ }
+
+ var nHeight =
+
+ (
+ nMaxHeight -
+ (this.footer.offsetHeight + this.header.offsetHeight)
+ );
+
+ Dom.setStyle(oBody, "height", (nHeight + "px"));
+ Dom.setStyle(oBody, "overflow", "hidden");
+
+ }
+ else if(oHeader && oFooter) {
+
+ Dom.setStyle(oBody, "height", "auto");
+ Dom.setStyle(oBody, "overflow", "visible");
+
+ Event.removeListener(oHeader, "mouseover", fnMouseOver);
+ Event.removeListener(oHeader, "mouseout", fnMouseOut);
+ Event.removeListener(oFooter, "mouseover", fnMouseOver);
+ Event.removeListener(oFooter, "mouseout", fnMouseOut);
+
+ this.element.removeChild(oHeader);
+ this.element.removeChild(oFooter);
+
+ this.header = null;
+ this.footer = null;
+
+ }
+
+},
+
+
+/**
+* @method configClassName
+* @description Event handler for when the "classname" configuration property of
+* a menu changes.
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event was fired.
+* @param {YAHOO.widget.Menu} p_oMenu The Menu instance fired the event.
+*/
+configClassName: function(p_sType, p_aArgs, p_oMenu) {
+
+ var sClassName = p_aArgs[0];
+
+ if(this._sClassName) {
+
+ Dom.removeClass(this.element, this._sClassName);
+
+ }
+
+ Dom.addClass(this.element, sClassName);
+ this._sClassName = sClassName;
+
+},
+
+
+
+// Public methods
+
+
+
+/**
+* @method initEvents
+* @description Initializes the custom events for the menu.
+*/
+initEvents: function() {
+
+ YAHOO.widget.Menu.superclass.initEvents.call(this);
+
+ // Create custom events
+
+ var EVENT_TYPES = YAHOO.widget.Menu._EVENT_TYPES;
+
+ this.mouseOverEvent = new CustomEvent(EVENT_TYPES.MOUSE_OVER, this);
+ this.mouseOutEvent = new CustomEvent(EVENT_TYPES.MOUSE_OUT, this);
+ this.mouseDownEvent = new CustomEvent(EVENT_TYPES.MOUSE_DOWN, this);
+ this.mouseUpEvent = new CustomEvent(EVENT_TYPES.MOUSE_UP, this);
+ this.clickEvent = new CustomEvent(EVENT_TYPES.CLICK, this);
+ this.keyPressEvent = new CustomEvent(EVENT_TYPES.KEY_PRESS, this);
+ this.keyDownEvent = new CustomEvent(EVENT_TYPES.KEY_DOWN, this);
+ this.keyUpEvent = new CustomEvent(EVENT_TYPES.KEY_UP, this);
+ this.focusEvent = new CustomEvent(EVENT_TYPES.FOCUS, this);
+ this.blurEvent = new CustomEvent(EVENT_TYPES.BLUR, this);
+ this.itemAddedEvent = new CustomEvent(EVENT_TYPES.ITEM_ADDED, this);
+ this.itemRemovedEvent = new CustomEvent(EVENT_TYPES.ITEM_REMOVED, this);
+
+},
+
+
+/**
+* @method getRoot
+* @description Finds the menu's root menu.
+*/
+getRoot: function() {
+
+ var oItem = this.parent;
+
+ if(oItem) {
+
+ var oParentMenu = oItem.parent;
+
+ return oParentMenu ? oParentMenu.getRoot() : this;
+
+ }
+ else {
+
+ return this;
+
+ }
+
+},
+
+
+/**
+* @method toString
+* @description Returns a string representing the menu.
+* @return {String}
+*/
+toString: function() {
+
+ return ("Menu " + this.id);
+
+},
+
+
+/**
+* @method setItemGroupTitle
+* @description Sets the title of a group of menu items.
+* @param {String} p_sGroupTitle String specifying the title of the group.
+* @param {Number} p_nGroupIndex Optional. Number specifying the group to which
+* the title belongs.
+*/
+setItemGroupTitle: function(p_sGroupTitle, p_nGroupIndex) {
+
+ if(typeof p_sGroupTitle == "string" && p_sGroupTitle.length > 0) {
+
+ var nGroupIndex = typeof p_nGroupIndex == "number" ? p_nGroupIndex : 0,
+ oTitle = this._aGroupTitleElements[nGroupIndex];
+
+
+ if(oTitle) {
+
+ oTitle.innerHTML = p_sGroupTitle;
+
+ }
+ else {
+
+ oTitle = document.createElement(this.GROUP_TITLE_TAG_NAME);
+
+ oTitle.innerHTML = p_sGroupTitle;
+
+ this._aGroupTitleElements[nGroupIndex] = oTitle;
+
+ }
+
+
+ var i = this._aGroupTitleElements.length - 1,
+ nFirstIndex;
+
+ do {
+
+ if(this._aGroupTitleElements[i]) {
+
+ Dom.removeClass(this._aGroupTitleElements[i], "first-of-type");
+
+ nFirstIndex = i;
+
+ }
+
+ }
+ while(i--);
+
+
+ if(nFirstIndex !== null) {
+
+ Dom.addClass(
+ this._aGroupTitleElements[nFirstIndex],
+ "first-of-type"
+ );
+
+ }
+
+ }
+
+},
+
+
+
+/**
+* @method addItem
+* @description Appends an item to the menu.
+* @param {YAHOO.widget.MenuItem} p_oItem Object reference for the MenuItem
+* instance to be added to the menu.
+* @param {String} p_oItem String specifying the text of the item to be added
+* to the menu.
+* @param {Object} p_oItem Object literal containing a set of menu item
+* configuration properties.
+* @param {Number} p_nGroupIndex Optional. Number indicating the group to
+* which the item belongs.
+* @return {YAHOO.widget.MenuItem}
+*/
+addItem: function(p_oItem, p_nGroupIndex) {
+
+ if(p_oItem) {
+
+ return this._addItemToGroup(p_nGroupIndex, p_oItem);
+
+ }
+
+},
+
+
+/**
+* @method addItems
+* @description Adds an array of items to the menu.
+* @param {Array} p_aItems Array of items to be added to the menu. The array
+* can contain strings specifying the text for each item to be created, object
+* literals specifying each of the menu item configuration properties,
+* or MenuItem instances.
+* @param {Number} p_nGroupIndex Optional. Number specifying the group to
+* which the items belongs.
+* @return {Array}
+*/
+addItems: function(p_aItems, p_nGroupIndex) {
+
+ if(Lang.isArray(p_aItems)) {
+
+ var nItems = p_aItems.length,
+ aItems = [],
+ oItem;
+
+
+ for(var i=0; i 0) {
+
+ var i = nItems - 1,
+ oItem,
+ oSubmenu;
+
+ do {
+
+ oItem = aItems[i];
+
+ if(oItem) {
+
+ oSubmenu = oItem.cfg.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ this.cfg.configChangedEvent.unsubscribe(
+ this._onParentMenuConfigChange,
+ oSubmenu
+ );
+
+ this.renderEvent.unsubscribe(
+ this._onParentMenuRender,
+ oSubmenu
+ );
+
+ }
+
+ oItem.destroy();
+
+ }
+
+ }
+ while(i--);
+
+ }
+
+
+ if(oHeader) {
+
+ Event.purgeElement(oHeader);
+ oElement.removeChild(oHeader);
+
+ }
+
+
+ if(oFooter) {
+
+ Event.purgeElement(oFooter);
+ oElement.removeChild(oFooter);
+ }
+
+
+ if(oBody) {
+
+ Event.purgeElement(oBody);
+
+ oBody.innerHTML = "";
+
+ }
+
+
+ this._aItemGroups = [];
+ this._aListElements = [];
+ this._aGroupTitleElements = [];
+
+ this.cfg.setProperty("width", null);
+
+},
+
+
+/**
+* @method destroy
+* @description Removes the menu's <div> element
+* (and accompanying child nodes) from the document.
+*/
+destroy: function() {
+
+ // Remove all DOM event listeners
+
+ Event.purgeElement(this.element);
+
+
+ // Remove Custom Event listeners
+
+ this.mouseOverEvent.unsubscribeAll();
+ this.mouseOutEvent.unsubscribeAll();
+ this.mouseDownEvent.unsubscribeAll();
+ this.mouseUpEvent.unsubscribeAll();
+ this.clickEvent.unsubscribeAll();
+ this.keyPressEvent.unsubscribeAll();
+ this.keyDownEvent.unsubscribeAll();
+ this.keyUpEvent.unsubscribeAll();
+ this.focusEvent.unsubscribeAll();
+ this.blurEvent.unsubscribeAll();
+ this.itemAddedEvent.unsubscribeAll();
+ this.itemRemovedEvent.unsubscribeAll();
+ this.cfg.unsubscribeFromConfigEvent("width", this._onWidthChange);
+ this.cfg.unsubscribeFromConfigEvent("visible", this._onVisibleChange);
+
+ if (this._hasSetWidthHandlers) {
+
+ this.itemAddedEvent.unsubscribe(this._setWidth);
+ this.itemRemovedEvent.unsubscribe(this._setWidth);
+
+ this._hasSetWidthHandlers = false;
+
+ }
+
+ YAHOO.widget.Module.textResizeEvent.unsubscribe(this._onTextResize, this);
+
+
+ // Remove all items
+
+ this.clearContent();
+
+
+ this._aItemGroups = null;
+ this._aListElements = null;
+ this._aGroupTitleElements = null;
+
+
+ // Continue with the superclass implementation of this method
+
+ YAHOO.widget.Menu.superclass.destroy.call(this);
+
+
+},
+
+
+/**
+* @method setInitialFocus
+* @description Sets focus to the menu's first enabled item.
+*/
+setInitialFocus: function() {
+
+ var oItem = this._getFirstEnabledItem();
+
+ if (oItem) {
+
+ oItem.focus();
+
+ }
+
+},
+
+
+/**
+* @method setInitialSelection
+* @description Sets the "selected" configuration property of the menu's first
+* enabled item to "true."
+*/
+setInitialSelection: function() {
+
+ var oItem = this._getFirstEnabledItem();
+
+ if(oItem) {
+
+ oItem.cfg.setProperty("selected", true);
+ }
+
+},
+
+
+/**
+* @method clearActiveItem
+* @description Sets the "selected" configuration property of the menu's active
+* item to "false" and hides the item's submenu.
+* @param {Boolean} p_bBlur Boolean indicating if the menu's active item
+* should be blurred.
+*/
+clearActiveItem: function(p_bBlur) {
+
+ if(this.cfg.getProperty("showdelay") > 0) {
+
+ this._cancelShowDelay();
+
+ }
+
+
+ var oActiveItem = this.activeItem;
+
+ if(oActiveItem) {
+
+ var oConfig = oActiveItem.cfg;
+
+ if(p_bBlur) {
+
+ oActiveItem.blur();
+
+ }
+
+ oConfig.setProperty("selected", false);
+
+ var oSubmenu = oConfig.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ oSubmenu.hide();
+
+ }
+
+ this.activeItem = null;
+
+ }
+
+},
+
+
+/**
+* @method focus
+* @description Causes the menu to receive focus and fires the "focus" event.
+*/
+focus: function() {
+
+ if (!this.hasFocus()) {
+
+ this.setInitialFocus();
+
+ }
+
+},
+
+
+/**
+* @method blur
+* @description Causes the menu to lose focus and fires the "blur" event.
+*/
+blur: function() {
+
+ if (this.hasFocus()) {
+
+ var oItem = YAHOO.widget.MenuManager.getFocusedMenuItem();
+
+ if (oItem) {
+
+ oItem.blur();
+
+ }
+
+ }
+
+},
+
+
+/**
+* @method hasFocus
+* @description Returns a boolean indicating whether or not the menu has focus.
+* @return {Boolean}
+*/
+hasFocus: function() {
+
+ return (YAHOO.widget.MenuManager.getFocusedMenu() == this.getRoot());
+
+},
+
+
+/**
+* @description Initializes the class's configurable properties which can be
+* changed using the menu's Config object ("cfg").
+* @method initDefaultConfig
+*/
+initDefaultConfig: function() {
+
+ YAHOO.widget.Menu.superclass.initDefaultConfig.call(this);
+
+ var oConfig = this.cfg,
+ DEFAULT_CONFIG = YAHOO.widget.Menu._DEFAULT_CONFIG;
+
+ // Add configuration attributes
+
+ /*
+ Change the default value for the "visible" configuration
+ property to "false" by re-adding the property.
+ */
+
+ /**
+ * @config visible
+ * @description Boolean indicating whether or not the menu is visible. If
+ * the menu's "position" configuration property is set to "dynamic" (the
+ * default), this property toggles the menu's <div>
+ * element's "visibility" style property between "visible" (true) or
+ * "hidden" (false). If the menu's "position" configuration property is
+ * set to "static" this property toggles the menu's
+ * <div> element's "display" style property
+ * between "block" (true) or "none" (false).
+ * @default false
+ * @type Boolean
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.VISIBLE.key,
+ {
+ handler: this.configVisible,
+ value: DEFAULT_CONFIG.VISIBLE.value,
+ validator: DEFAULT_CONFIG.VISIBLE.validator
+ }
+ );
+
+
+ /*
+ Change the default value for the "constraintoviewport" configuration
+ property to "true" by re-adding the property.
+ */
+
+ /**
+ * @config constraintoviewport
+ * @description Boolean indicating if the menu will try to remain inside
+ * the boundaries of the size of viewport.
+ * @default true
+ * @type Boolean
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,
+ {
+ handler: this.configConstrainToViewport,
+ value: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,
+ validator: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,
+ supercedes: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes
+ }
+ );
+
+
+ /**
+ * @config position
+ * @description String indicating how a menu should be positioned on the
+ * screen. Possible values are "static" and "dynamic." Static menus are
+ * visible by default and reside in the normal flow of the document
+ * (CSS position: static). Dynamic menus are hidden by default, reside
+ * out of the normal flow of the document (CSS position: absolute), and
+ * can overlay other elements on the screen.
+ * @default dynamic
+ * @type String
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.POSITION.key,
+ {
+ handler: this.configPosition,
+ value: DEFAULT_CONFIG.POSITION.value,
+ validator: DEFAULT_CONFIG.POSITION.validator,
+ supercedes: DEFAULT_CONFIG.POSITION.supercedes
+ }
+ );
+
+
+ /**
+ * @config submenualignment
+ * @description Array defining how submenus should be aligned to their
+ * parent menu item. The format is: [itemCorner, submenuCorner]. By default
+ * a submenu's top left corner is aligned to its parent menu item's top
+ * right corner.
+ * @default ["tl","tr"]
+ * @type Array
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key,
+ {
+ value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value
+ }
+ );
+
+
+ /**
+ * @config autosubmenudisplay
+ * @description Boolean indicating if submenus are automatically made
+ * visible when the user mouses over the menu's items.
+ * @default true
+ * @type Boolean
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key,
+ {
+ value: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value,
+ validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator
+ }
+ );
+
+
+ /**
+ * @config showdelay
+ * @description Number indicating the time (in milliseconds) that should
+ * expire before a submenu is made visible when the user mouses over
+ * the menu's items.
+ * @default 250
+ * @type Number
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.SHOW_DELAY.key,
+ {
+ value: DEFAULT_CONFIG.SHOW_DELAY.value,
+ validator: DEFAULT_CONFIG.SHOW_DELAY.validator
+ }
+ );
+
+
+ /**
+ * @config hidedelay
+ * @description Number indicating the time (in milliseconds) that should
+ * expire before the menu is hidden.
+ * @default 0
+ * @type Number
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.HIDE_DELAY.key,
+ {
+ handler: this.configHideDelay,
+ value: DEFAULT_CONFIG.HIDE_DELAY.value,
+ validator: DEFAULT_CONFIG.HIDE_DELAY.validator,
+ suppressEvent: DEFAULT_CONFIG.HIDE_DELAY.suppressEvent
+ }
+ );
+
+
+ /**
+ * @config submenuhidedelay
+ * @description Number indicating the time (in milliseconds) that should
+ * expire before a submenu is hidden when the user mouses out of a menu item
+ * heading in the direction of a submenu. The value must be greater than or
+ * equal to the value specified for the "showdelay" configuration property.
+ * @default 250
+ * @type Number
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.key,
+ {
+ value: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.value,
+ validator: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.validator
+ }
+ );
+
+
+ /**
+ * @config clicktohide
+ * @description Boolean indicating if the menu will automatically be
+ * hidden if the user clicks outside of it.
+ * @default true
+ * @type Boolean
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.CLICK_TO_HIDE.key,
+ {
+ value: DEFAULT_CONFIG.CLICK_TO_HIDE.value,
+ validator: DEFAULT_CONFIG.CLICK_TO_HIDE.validator
+ }
+ );
+
+
+ /**
+ * @config container
+ * @description HTML element reference or string specifying the id
+ * attribute of the HTML element that the menu's markup should be
+ * rendered into.
+ * @type HTMLElement |String
+ * @default document.body
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.CONTAINER.key,
+ {
+ handler: this.configContainer,
+ value: document.body
+ }
+ );
+
+
+ /**
+ * @config maxheight
+ * @description Defines the maximum height (in pixels) for a menu before the
+ * contents of the body are scrolled.
+ * @default 0
+ * @type Number
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.MAX_HEIGHT.key,
+ {
+ handler: this.configMaxHeight,
+ value: DEFAULT_CONFIG.MAX_HEIGHT.value,
+ validator: DEFAULT_CONFIG.MAX_HEIGHT.validator
+ }
+ );
+
+
+ /**
+ * @config classname
+ * @description CSS class to be applied to the menu's root
+ * <div> element. The specified class(es) are
+ * appended in addition to the default class as specified by the menu's
+ * CSS_CLASS_NAME constant.
+ * @default null
+ * @type String
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.CLASS_NAME.key,
+ {
+ handler: this.configClassName,
+ value: DEFAULT_CONFIG.CLASS_NAME.value,
+ validator: DEFAULT_CONFIG.CLASS_NAME.validator
+ }
+ );
+
+}
+
+}); // END YAHOO.lang.extend
+
+})();
+
+
+
+(function() {
+
+var Dom = YAHOO.util.Dom,
+ Module = YAHOO.widget.Module,
+ Menu = YAHOO.widget.Menu,
+ CustomEvent = YAHOO.util.CustomEvent,
+ Lang = YAHOO.lang;
+
+/**
+* Creates an item for a menu.
+*
+* @param {String} p_oObject String specifying the text of the menu item.
+* @param {HTMLLIElement } p_oObject Object specifying
+* the <li> element of the menu item.
+* @param {HTMLOptGroupElement } p_oObject Object
+* specifying the <optgroup> element of the menu item.
+* @param {HTMLOptionElement } p_oObject Object
+* specifying the <option> element of the menu item.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the menu item. See configuration class documentation
+* for more details.
+* @class MenuItem
+* @constructor
+*/
+YAHOO.widget.MenuItem = function(p_oObject, p_oConfig) {
+
+ if(p_oObject) {
+
+ if(p_oConfig) {
+
+ this.parent = p_oConfig.parent;
+ this.value = p_oConfig.value;
+ this.id = p_oConfig.id;
+
+ }
+
+ this.init(p_oObject, p_oConfig);
+
+ }
+
+};
+
+
+/**
+* Constant representing the name of the MenuItem's events
+* @property YAHOO.widget.MenuItem._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.MenuItem._EVENT_TYPES = {
+
+ "MOUSE_OVER": "mouseover",
+ "MOUSE_OUT": "mouseout",
+ "MOUSE_DOWN": "mousedown",
+ "MOUSE_UP": "mouseup",
+ "CLICK": "click",
+ "KEY_PRESS": "keypress",
+ "KEY_DOWN": "keydown",
+ "KEY_UP": "keyup",
+ "ITEM_ADDED": "itemAdded",
+ "ITEM_REMOVED": "itemRemoved",
+ "FOCUS": "focus",
+ "BLUR": "blur",
+ "DESTROY": "destroy"
+
+};
+
+
+/**
+* Constant representing the MenuItem's configuration properties
+* @property YAHOO.widget.MenuItem._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.MenuItem._DEFAULT_CONFIG = {
+
+ "TEXT": {
+ key: "text",
+ value: "",
+ validator: Lang.isString,
+ suppressEvent: true
+ },
+
+ "HELP_TEXT": {
+ key: "helptext"
+ },
+
+ "URL": {
+ key: "url",
+ value: "#",
+ suppressEvent: true
+ },
+
+ "TARGET": {
+ key: "target",
+ suppressEvent: true
+ },
+
+ "EMPHASIS": {
+ key: "emphasis",
+ value: false,
+ validator: Lang.isBoolean,
+ suppressEvent: true
+ },
+
+ "STRONG_EMPHASIS": {
+ key: "strongemphasis",
+ value: false,
+ validator: Lang.isBoolean,
+ suppressEvent: true
+ },
+
+ "CHECKED": {
+ key: "checked",
+ value: false,
+ validator: Lang.isBoolean,
+ suppressEvent: true,
+ supercedes:["disabled"]
+ },
+
+ "DISABLED": {
+ key: "disabled",
+ value: false,
+ validator: Lang.isBoolean,
+ suppressEvent: true
+ },
+
+ "SELECTED": {
+ key: "selected",
+ value: false,
+ validator: Lang.isBoolean,
+ suppressEvent: true
+ },
+
+ "SUBMENU": {
+ key: "submenu"
+ },
+
+ "ONCLICK": {
+ key: "onclick"
+ },
+
+ "CLASS_NAME": {
+ key: "classname",
+ value: null,
+ validator: Lang.isString
+ }
+
+};
+
+
+YAHOO.widget.MenuItem.prototype = {
+
+ // Constants
+
+
+ /**
+ * @property COLLAPSED_SUBMENU_INDICATOR_TEXT
+ * @description String representing the text for the <em>
+ * element used for the submenu arrow indicator.
+ * @default "Submenu collapsed. Click to expand submenu."
+ * @final
+ * @type String
+ */
+ COLLAPSED_SUBMENU_INDICATOR_TEXT:
+ "Submenu collapsed. Click to expand submenu.",
+
+
+ /**
+ * @property EXPANDED_SUBMENU_INDICATOR_TEXT
+ * @description String representing the text for the submenu arrow indicator
+ * element (<em>) when the submenu is visible.
+ * @default "Submenu expanded. Click to collapse submenu."
+ * @final
+ * @type String
+ */
+ EXPANDED_SUBMENU_INDICATOR_TEXT:
+ "Submenu expanded. Click to collapse submenu.",
+
+
+ /**
+ * @property DISABLED_SUBMENU_INDICATOR_TEXT
+ * @description String representing the text for the submenu arrow indicator
+ * element (<em>) when the menu item is disabled.
+ * @default "Submenu collapsed. (Item disabled.)."
+ * @final
+ * @type String
+ */
+ DISABLED_SUBMENU_INDICATOR_TEXT: "Submenu collapsed. (Item disabled.)",
+
+
+ /**
+ * @property CHECKED_TEXT
+ * @description String representing the text to be used for the checked
+ * indicator element (<em>).
+ * @default "Checked."
+ * @final
+ * @type String
+ */
+ CHECKED_TEXT: "Menu item checked.",
+
+
+ /**
+ * @property DISABLED_CHECKED_TEXT
+ * @description String representing the text to be used for the checked
+ * indicator element (<em>) when the menu item
+ * is disabled.
+ * @default "Checked. (Item disabled.)"
+ * @final
+ * @type String
+ */
+ DISABLED_CHECKED_TEXT: "Checked. (Item disabled.)",
+
+
+ /**
+ * @property CSS_CLASS_NAME
+ * @description String representing the CSS class(es) to be applied to the
+ * <li> element of the menu item.
+ * @default "yuimenuitem"
+ * @final
+ * @type String
+ */
+ CSS_CLASS_NAME: "yuimenuitem",
+
+
+ /**
+ * @property SUBMENU_TYPE
+ * @description Object representing the type of menu to instantiate and
+ * add when parsing the child nodes of the menu item's source HTML element.
+ * @final
+ * @type YAHOO.widget.Menu
+ */
+ SUBMENU_TYPE: null,
+
+
+
+ // Private member variables
+
+
+ /**
+ * @property _oAnchor
+ * @description Object reference to the menu item's
+ * <a> element.
+ * @default null
+ * @private
+ * @type HTMLAnchorElement
+ */
+ _oAnchor: null,
+
+
+ /**
+ * @property _oText
+ * @description Object reference to the menu item's text node.
+ * @default null
+ * @private
+ * @type TextNode
+ */
+ _oText: null,
+
+
+ /**
+ * @property _oHelpTextEM
+ * @description Object reference to the menu item's help text
+ * <em> element.
+ * @default null
+ * @private
+ * @type HTMLElement
+ */
+ _oHelpTextEM: null,
+
+
+ /**
+ * @property _oSubmenu
+ * @description Object reference to the menu item's submenu.
+ * @default null
+ * @private
+ * @type YAHOO.widget.Menu
+ */
+ _oSubmenu: null,
+
+
+ /**
+ * @property _oCheckedIndicator
+ * @description Object reference to the menu item's checkmark image.
+ * @default HTMLElement
+ * @private
+ * @type HTMLElement
+ */
+ _oCheckedIndicator: null,
+
+
+ /**
+ * @property _oOnclickAttributeValue
+ * @description Object reference to the menu item's current value for the
+ * "onclick" configuration attribute.
+ * @default null
+ * @private
+ * @type Object
+ */
+ _oOnclickAttributeValue: null,
+
+
+ /**
+ * @property _sClassName
+ * @description The current value of the "classname" configuration attribute.
+ * @default null
+ * @private
+ * @type String
+ */
+ _sClassName: null,
+
+
+
+ // Public properties
+
+
+ /**
+ * @property constructor
+ * @description Object reference to the menu item's constructor function.
+ * @default YAHOO.widget.MenuItem
+ * @type YAHOO.widget.MenuItem
+ */
+ constructor: YAHOO.widget.MenuItem,
+
+
+ /**
+ * @property index
+ * @description Number indicating the ordinal position of the menu item in
+ * its group.
+ * @default null
+ * @type Number
+ */
+ index: null,
+
+
+ /**
+ * @property groupIndex
+ * @description Number indicating the index of the group to which the menu
+ * item belongs.
+ * @default null
+ * @type Number
+ */
+ groupIndex: null,
+
+
+ /**
+ * @property parent
+ * @description Object reference to the menu item's parent menu.
+ * @default null
+ * @type YAHOO.widget.Menu
+ */
+ parent: null,
+
+
+ /**
+ * @property element
+ * @description Object reference to the menu item's
+ * <li> element.
+ * @default HTMLLIElement
+ * @type HTMLLIElement
+ */
+ element: null,
+
+
+ /**
+ * @property srcElement
+ * @description Object reference to the HTML element (either
+ * <li>, <optgroup> or
+ * <option>) used create the menu item.
+ * @default HTMLLIElement |HTMLOptGroupElement |HTMLOptionElement
+ * @type HTMLLIElement |
+ * HTMLOptGroupElement |HTMLOptionElement
+ */
+ srcElement: null,
+
+
+ /**
+ * @property value
+ * @description Object reference to the menu item's value.
+ * @default null
+ * @type Object
+ */
+ value: null,
+
+
+ /**
+ * @property submenuIndicator
+ * @description Object reference to the <em> element
+ * used to create the submenu indicator for the menu item.
+ * @default HTMLElement
+ * @type HTMLElement
+ */
+ submenuIndicator: null,
+
+
+ /**
+ * @property browser
+ * @description String representing the browser.
+ * @type String
+ */
+ browser: Module.prototype.browser,
+
+
+ /**
+ * @property id
+ * @description Id of the menu item's root <li>
+ * element. This property should be set via the constructor using the
+ * configuration object literal. If an id is not specified, then one will
+ * be created using the "generateId" method of the Dom utility.
+ * @default null
+ * @type String
+ */
+ id: null,
+
+
+
+ // Events
+
+
+ /**
+ * @event destroyEvent
+ * @description Fires when the menu item's <li>
+ * element is removed from its parent <ul> element.
+ * @type YAHOO.util.CustomEvent
+ */
+ destroyEvent: null,
+
+
+ /**
+ * @event mouseOverEvent
+ * @description Fires when the mouse has entered the menu item. Passes
+ * back the DOM Event object as an argument.
+ * @type YAHOO.util.CustomEvent
+ */
+ mouseOverEvent: null,
+
+
+ /**
+ * @event mouseOutEvent
+ * @description Fires when the mouse has left the menu item. Passes back
+ * the DOM Event object as an argument.
+ * @type YAHOO.util.CustomEvent
+ */
+ mouseOutEvent: null,
+
+
+ /**
+ * @event mouseDownEvent
+ * @description Fires when the user mouses down on the menu item. Passes
+ * back the DOM Event object as an argument.
+ * @type YAHOO.util.CustomEvent
+ */
+ mouseDownEvent: null,
+
+
+ /**
+ * @event mouseUpEvent
+ * @description Fires when the user releases a mouse button while the mouse
+ * is over the menu item. Passes back the DOM Event object as an argument.
+ * @type YAHOO.util.CustomEvent
+ */
+ mouseUpEvent: null,
+
+
+ /**
+ * @event clickEvent
+ * @description Fires when the user clicks the on the menu item. Passes
+ * back the DOM Event object as an argument.
+ * @type YAHOO.util.CustomEvent
+ */
+ clickEvent: null,
+
+
+ /**
+ * @event keyPressEvent
+ * @description Fires when the user presses an alphanumeric key when the
+ * menu item has focus. Passes back the DOM Event object as an argument.
+ * @type YAHOO.util.CustomEvent
+ */
+ keyPressEvent: null,
+
+
+ /**
+ * @event keyDownEvent
+ * @description Fires when the user presses a key when the menu item has
+ * focus. Passes back the DOM Event object as an argument.
+ * @type YAHOO.util.CustomEvent
+ */
+ keyDownEvent: null,
+
+
+ /**
+ * @event keyUpEvent
+ * @description Fires when the user releases a key when the menu item has
+ * focus. Passes back the DOM Event object as an argument.
+ * @type YAHOO.util.CustomEvent
+ */
+ keyUpEvent: null,
+
+
+ /**
+ * @event focusEvent
+ * @description Fires when the menu item receives focus.
+ * @type YAHOO.util.CustomEvent
+ */
+ focusEvent: null,
+
+
+ /**
+ * @event blurEvent
+ * @description Fires when the menu item loses the input focus.
+ * @type YAHOO.util.CustomEvent
+ */
+ blurEvent: null,
+
+
+ /**
+ * @method init
+ * @description The MenuItem class's initialization method. This method is
+ * automatically called by the constructor, and sets up all DOM references
+ * for pre-existing markup, and creates required markup if it is not
+ * already present.
+ * @param {String} p_oObject String specifying the text of the menu item.
+ * @param {HTMLLIElement } p_oObject Object specifying
+ * the <li> element of the menu item.
+ * @param {HTMLOptGroupElement } p_oObject Object
+ * specifying the <optgroup> element of the menu item.
+ * @param {HTMLOptionElement } p_oObject Object
+ * specifying the <option> element of the menu item.
+ * @param {Object} p_oConfig Optional. Object literal specifying the
+ * configuration for the menu item. See configuration class documentation
+ * for more details.
+ */
+ init: function(p_oObject, p_oConfig) {
+
+
+ if(!this.SUBMENU_TYPE) {
+
+ this.SUBMENU_TYPE = Menu;
+
+ }
+
+
+ // Create the config object
+
+ this.cfg = new YAHOO.util.Config(this);
+
+ this.initDefaultConfig();
+
+ var oConfig = this.cfg;
+
+
+ if(Lang.isString(p_oObject)) {
+
+ this._createRootNodeStructure();
+
+ oConfig.setProperty("text", p_oObject);
+
+ }
+ else if(this._checkDOMNode(p_oObject)) {
+
+ switch(p_oObject.tagName.toUpperCase()) {
+
+ case "OPTION":
+
+ this._createRootNodeStructure();
+
+ oConfig.setProperty("text", p_oObject.text);
+
+ this.srcElement = p_oObject;
+
+ break;
+
+ case "OPTGROUP":
+
+ this._createRootNodeStructure();
+
+ oConfig.setProperty("text", p_oObject.label);
+
+ this.srcElement = p_oObject;
+
+ this._initSubTree();
+
+ break;
+
+ case "LI":
+
+ // Get the anchor node (if it exists)
+
+ var oAnchor = this._getFirstElement(p_oObject, "A"),
+ sURL = "#",
+ sTarget,
+ sText;
+
+
+ // Capture the "text" and/or the "URL"
+
+ if(oAnchor) {
+
+ sURL = oAnchor.getAttribute("href");
+ sTarget = oAnchor.getAttribute("target");
+
+ if(oAnchor.innerText) {
+
+ sText = oAnchor.innerText;
+
+ }
+ else {
+
+ var oRange = oAnchor.ownerDocument.createRange();
+
+ oRange.selectNodeContents(oAnchor);
+
+ sText = oRange.toString();
+
+ }
+
+ }
+ else {
+
+ var oText = p_oObject.firstChild;
+
+ sText = oText.nodeValue;
+
+ oAnchor = document.createElement("a");
+
+ oAnchor.setAttribute("href", sURL);
+
+ p_oObject.replaceChild(oAnchor, oText);
+
+ oAnchor.appendChild(oText);
+
+ }
+
+
+ this.srcElement = p_oObject;
+ this.element = p_oObject;
+ this._oAnchor = oAnchor;
+
+
+ // Check if emphasis has been applied to the MenuItem
+
+ var oEmphasisNode = this._getFirstElement(oAnchor),
+ bEmphasis = false,
+ bStrongEmphasis = false;
+
+ if(oEmphasisNode) {
+
+ // Set a reference to the text node
+
+ this._oText = oEmphasisNode.firstChild;
+
+ switch(oEmphasisNode.tagName.toUpperCase()) {
+
+ case "EM":
+
+ bEmphasis = true;
+
+ break;
+
+ case "STRONG":
+
+ bStrongEmphasis = true;
+
+ break;
+
+ }
+
+ }
+ else {
+
+ // Set a reference to the text node
+
+ this._oText = oAnchor.firstChild;
+
+ }
+
+
+ /*
+ Set these properties silently to sync up the
+ configuration object without making changes to the
+ element's DOM
+ */
+
+ oConfig.setProperty("text", sText, true);
+ oConfig.setProperty("url", sURL, true);
+ oConfig.setProperty("target", sTarget, true);
+ oConfig.setProperty("emphasis", bEmphasis, true);
+ oConfig.setProperty(
+ "strongemphasis",
+ bStrongEmphasis,
+ true
+ );
+
+ this._initSubTree();
+
+ break;
+
+ }
+
+ }
+
+
+ if(this.element) {
+
+ var sId = this.element.id;
+
+ if(!sId) {
+
+ sId = this.id || Dom.generateId();
+
+ this.element.id = sId;
+
+ }
+
+ this.id = sId;
+
+
+ Dom.addClass(this.element, this.CSS_CLASS_NAME);
+
+
+ // Create custom events
+
+ var EVENT_TYPES = YAHOO.widget.MenuItem._EVENT_TYPES;
+
+ this.mouseOverEvent = new CustomEvent(EVENT_TYPES.MOUSE_OVER, this);
+ this.mouseOutEvent = new CustomEvent(EVENT_TYPES.MOUSE_OUT, this);
+ this.mouseDownEvent = new CustomEvent(EVENT_TYPES.MOUSE_DOWN, this);
+ this.mouseUpEvent = new CustomEvent(EVENT_TYPES.MOUSE_UP, this);
+ this.clickEvent = new CustomEvent(EVENT_TYPES.CLICK, this);
+ this.keyPressEvent = new CustomEvent(EVENT_TYPES.KEY_PRESS, this);
+ this.keyDownEvent = new CustomEvent(EVENT_TYPES.KEY_DOWN, this);
+ this.keyUpEvent = new CustomEvent(EVENT_TYPES.KEY_UP, this);
+ this.focusEvent = new CustomEvent(EVENT_TYPES.FOCUS, this);
+ this.blurEvent = new CustomEvent(EVENT_TYPES.BLUR, this);
+ this.destroyEvent = new CustomEvent(EVENT_TYPES.DESTROY, this);
+
+ if(p_oConfig) {
+
+ oConfig.applyConfig(p_oConfig);
+
+ }
+
+ oConfig.fireQueue();
+
+ }
+
+ },
+
+
+
+ // Private methods
+
+
+ /**
+ * @method _getFirstElement
+ * @description Returns an HTML element's first HTML element node.
+ * @private
+ * @param {HTMLElement } p_oElement Object
+ * reference specifying the element to be evaluated.
+ * @param {String} p_sTagName Optional. String specifying the tagname of
+ * the element to be retrieved.
+ * @return {HTMLElement }
+ */
+ _getFirstElement: function(p_oElement, p_sTagName) {
+
+ var oFirstChild = p_oElement.firstChild,
+ oElement;
+
+ if(oFirstChild) {
+
+ if(oFirstChild.nodeType == 1) {
+
+ oElement = oFirstChild;
+
+ }
+ else {
+
+ var oNextSibling = oFirstChild.nextSibling;
+
+ if(oNextSibling && oNextSibling.nodeType == 1) {
+
+ oElement = oNextSibling;
+
+ }
+
+ }
+
+ }
+
+
+ if(p_sTagName) {
+
+ return (oElement && oElement.tagName.toUpperCase() == p_sTagName) ?
+ oElement : false;
+
+ }
+
+ return oElement;
+
+ },
+
+
+ /**
+ * @method _checkDOMNode
+ * @description Determines if an object is an HTML element.
+ * @private
+ * @param {Object} p_oObject Object to be evaluated.
+ * @return {Boolean}
+ */
+ _checkDOMNode: function(p_oObject) {
+
+ return (p_oObject && p_oObject.tagName);
+
+ },
+
+
+ /**
+ * @method _createRootNodeStructure
+ * @description Creates the core DOM structure for the menu item.
+ * @private
+ */
+ _createRootNodeStructure: function () {
+
+ var oTemplate = YAHOO.widget.MenuItem._MenuItemTemplate;
+
+ if(!oTemplate) {
+
+ oTemplate = document.createElement("li");
+ oTemplate.innerHTML = "s ";
+
+ YAHOO.widget.MenuItem._MenuItemTemplate = oTemplate;
+
+ }
+
+ this.element = oTemplate.cloneNode(true);
+ this._oAnchor = this.element.firstChild;
+ this._oText = this._oAnchor.firstChild;
+
+ this.element.appendChild(this._oAnchor);
+
+ },
+
+
+ /**
+ * @method _initSubTree
+ * @description Iterates the source element's childNodes collection and uses
+ * the child nodes to instantiate other menus.
+ * @private
+ */
+ _initSubTree: function() {
+
+ var oSrcEl = this.srcElement,
+ oConfig = this.cfg;
+
+
+ if(oSrcEl.childNodes.length > 0) {
+
+ if(
+ this.parent.lazyLoad &&
+ this.parent.srcElement &&
+ this.parent.srcElement.tagName.toUpperCase() == "SELECT"
+ ) {
+
+ oConfig.setProperty(
+ "submenu",
+ { id: Dom.generateId(), itemdata: oSrcEl.childNodes }
+ );
+
+ }
+ else {
+
+ var oNode = oSrcEl.firstChild,
+ aOptions = [];
+
+ do {
+
+ if(oNode && oNode.tagName) {
+
+ switch(oNode.tagName.toUpperCase()) {
+
+ case "DIV":
+
+ oConfig.setProperty("submenu", oNode);
+
+ break;
+
+ case "OPTION":
+
+ aOptions[aOptions.length] = oNode;
+
+ break;
+
+ }
+
+ }
+
+ }
+ while((oNode = oNode.nextSibling));
+
+
+ var nOptions = aOptions.length;
+
+ if(nOptions > 0) {
+
+ var oMenu = new this.SUBMENU_TYPE(Dom.generateId());
+
+ oConfig.setProperty("submenu", oMenu);
+
+ for(var n=0; n 0) {
+
+ oAnchor.setAttribute("target", sTarget);
+
+ }
+ else {
+
+ oAnchor.removeAttribute("target");
+
+ }
+
+ },
+
+
+ /**
+ * @method configEmphasis
+ * @description Event handler for when the "emphasis" configuration property
+ * of the menu item changes.
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
+ * that fired the event.
+ */
+ configEmphasis: function(p_sType, p_aArgs, p_oItem) {
+
+ var bEmphasis = p_aArgs[0],
+ oAnchor = this._oAnchor,
+ oText = this._oText,
+ oConfig = this.cfg,
+ oEM;
+
+
+ if(bEmphasis && oConfig.getProperty("strongemphasis")) {
+
+ oConfig.setProperty("strongemphasis", false);
+
+ }
+
+
+ if(oAnchor) {
+
+ if(bEmphasis) {
+
+ oEM = document.createElement("em");
+ oEM.appendChild(oText);
+
+ oAnchor.appendChild(oEM);
+
+ }
+ else {
+
+ oEM = this._getFirstElement(oAnchor, "EM");
+
+ if(oEM) {
+
+ oAnchor.removeChild(oEM);
+ oAnchor.appendChild(oText);
+
+ }
+
+ }
+
+ }
+
+ },
+
+
+ /**
+ * @method configStrongEmphasis
+ * @description Event handler for when the "strongemphasis" configuration
+ * property of the menu item changes.
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
+ * that fired the event.
+ */
+ configStrongEmphasis: function(p_sType, p_aArgs, p_oItem) {
+
+ var bStrongEmphasis = p_aArgs[0],
+ oAnchor = this._oAnchor,
+ oText = this._oText,
+ oConfig = this.cfg,
+ oStrong;
+
+ if(bStrongEmphasis && oConfig.getProperty("emphasis")) {
+
+ oConfig.setProperty("emphasis", false);
+
+ }
+
+ if(oAnchor) {
+
+ if(bStrongEmphasis) {
+
+ oStrong = document.createElement("strong");
+ oStrong.appendChild(oText);
+
+ oAnchor.appendChild(oStrong);
+
+ }
+ else {
+
+ oStrong = this._getFirstElement(oAnchor, "STRONG");
+
+ if(oStrong) {
+
+ oAnchor.removeChild(oStrong);
+ oAnchor.appendChild(oText);
+
+ }
+
+ }
+
+ }
+
+ },
+
+
+ /**
+ * @method configChecked
+ * @description Event handler for when the "checked" configuration property
+ * of the menu item changes.
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
+ * that fired the event.
+ */
+ configChecked: function(p_sType, p_aArgs, p_oItem) {
+
+ var bChecked = p_aArgs[0],
+ oEl = this.element,
+ oConfig = this.cfg,
+ oEM;
+
+
+ if(bChecked) {
+
+ var oTemplate = YAHOO.widget.MenuItem._CheckedIndicatorTemplate;
+
+ if(!oTemplate) {
+
+ oTemplate = document.createElement("em");
+ oTemplate.innerHTML = this.CHECKED_TEXT;
+ oTemplate.className = "checkedindicator";
+
+ YAHOO.widget.MenuItem._CheckedIndicatorTemplate = oTemplate;
+
+ }
+
+ oEM = oTemplate.cloneNode(true);
+
+ var oSubmenu = this.cfg.getProperty("submenu");
+
+ if(oSubmenu && oSubmenu.element) {
+
+ oEl.insertBefore(oEM, oSubmenu.element);
+
+ }
+ else {
+
+ oEl.appendChild(oEM);
+
+ }
+
+
+ Dom.addClass(oEl, "checked");
+
+ this._oCheckedIndicator = oEM;
+
+ if(oConfig.getProperty("disabled")) {
+
+ oConfig.refireEvent("disabled");
+
+ }
+
+ if(oConfig.getProperty("selected")) {
+
+ oConfig.refireEvent("selected");
+
+ }
+
+ }
+ else {
+
+ oEM = this._oCheckedIndicator;
+
+ Dom.removeClass(oEl, "checked");
+
+ if(oEM) {
+
+ oEl.removeChild(oEM);
+
+ }
+
+ this._oCheckedIndicator = null;
+
+ }
+
+ },
+
+
+
+ /**
+ * @method configDisabled
+ * @description Event handler for when the "disabled" configuration property
+ * of the menu item changes.
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
+ * that fired the event.
+ */
+ configDisabled: function(p_sType, p_aArgs, p_oItem) {
+
+ var bDisabled = p_aArgs[0],
+ oConfig = this.cfg,
+ oAnchor = this._oAnchor,
+ aNodes = [this.element, oAnchor],
+ oHelpText = this._oHelpTextEM,
+ oCheckedIndicator = this._oCheckedIndicator,
+ oSubmenuIndicator = this.submenuIndicator,
+ i = 1;
+
+
+ if(oHelpText) {
+
+ i++;
+ aNodes[i] = oHelpText;
+
+ }
+
+
+ if(oCheckedIndicator) {
+
+ oCheckedIndicator.firstChild.nodeValue = bDisabled ?
+ this.DISABLED_CHECKED_TEXT :
+ this.CHECKED_TEXT;
+
+ i++;
+ aNodes[i] = oCheckedIndicator;
+
+ }
+
+
+ if(oSubmenuIndicator) {
+
+ oSubmenuIndicator.firstChild.nodeValue = bDisabled ?
+ this.DISABLED_SUBMENU_INDICATOR_TEXT :
+ this.COLLAPSED_SUBMENU_INDICATOR_TEXT;
+
+ i++;
+ aNodes[i] = oSubmenuIndicator;
+
+ }
+
+
+ if(bDisabled) {
+
+ if(oConfig.getProperty("selected")) {
+
+ oConfig.setProperty("selected", false);
+
+ }
+
+ oAnchor.removeAttribute("href");
+
+ Dom.addClass(aNodes, "disabled");
+
+ }
+ else {
+
+ oAnchor.setAttribute("href", oConfig.getProperty("url"));
+
+ Dom.removeClass(aNodes, "disabled");
+
+ }
+
+ },
+
+
+ /**
+ * @method configSelected
+ * @description Event handler for when the "selected" configuration property
+ * of the menu item changes.
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
+ * that fired the event.
+ */
+ configSelected: function(p_sType, p_aArgs, p_oItem) {
+
+ if(!this.cfg.getProperty("disabled")) {
+
+ var bSelected = p_aArgs[0],
+ oHelpText = this._oHelpTextEM,
+ oSubmenuIndicator = this.submenuIndicator,
+ oCheckedIndicator = this._oCheckedIndicator,
+ aNodes = [this.element, this._oAnchor],
+ i = 1;
+
+
+ if(oHelpText) {
+
+ i++;
+ aNodes[i] = oHelpText;
+
+ }
+
+
+ if(oSubmenuIndicator) {
+
+ i++;
+ aNodes[i] = oSubmenuIndicator;
+
+ }
+
+
+ if(oCheckedIndicator) {
+
+ i++;
+ aNodes[i] = oCheckedIndicator;
+
+ }
+
+
+ if(bSelected) {
+
+ Dom.addClass(aNodes, "selected");
+
+ }
+ else {
+
+ Dom.removeClass(aNodes, "selected");
+
+ }
+
+ }
+
+ },
+
+
+ /**
+ * @method configSubmenu
+ * @description Event handler for when the "submenu" configuration property
+ * of the menu item changes.
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
+ * that fired the event.
+ */
+ configSubmenu: function(p_sType, p_aArgs, p_oItem) {
+
+ var oEl = this.element,
+ oSubmenu = p_aArgs[0],
+ oSubmenuIndicator = this.submenuIndicator,
+ oConfig = this.cfg,
+ aNodes = [this.element, this._oAnchor],
+ bLazyLoad = this.parent && this.parent.lazyLoad,
+ oMenu;
+
+
+ if(oSubmenu) {
+
+ if(oSubmenu instanceof Menu) {
+
+ oMenu = oSubmenu;
+ oMenu.parent = this;
+ oMenu.lazyLoad = bLazyLoad;
+
+ }
+ else if(
+ typeof oSubmenu == "object" &&
+ oSubmenu.id &&
+ !oSubmenu.nodeType
+ ) {
+
+ var sSubmenuId = oSubmenu.id,
+ oSubmenuConfig = oSubmenu;
+
+ oSubmenuConfig.lazyload = bLazyLoad;
+ oSubmenuConfig.parent = this;
+
+ oMenu = new this.SUBMENU_TYPE(sSubmenuId, oSubmenuConfig);
+
+
+ // Set the value of the property to the Menu instance
+
+ this.cfg.setProperty("submenu", oMenu, true);
+
+ }
+ else {
+
+ oMenu = new this.SUBMENU_TYPE(
+ oSubmenu,
+ { lazyload: bLazyLoad, parent: this }
+ );
+
+
+ // Set the value of the property to the Menu instance
+
+ this.cfg.setProperty("submenu", oMenu, true);
+
+ }
+
+
+ if(oMenu) {
+
+ this._oSubmenu = oMenu;
+
+
+ if(!oSubmenuIndicator) {
+
+ var oTemplate =
+ YAHOO.widget.MenuItem._oSubmenuIndicatorTemplate;
+
+ if(!oTemplate) {
+
+ oTemplate = document.createElement("em");
+ oTemplate.innerHTML =
+ this.COLLAPSED_SUBMENU_INDICATOR_TEXT;
+ oTemplate.className = "submenuindicator";
+
+ YAHOO.widget.MenuItem._oSubmenuIndicatorTemplate =
+ oTemplate;
+
+ }
+
+
+ oSubmenuIndicator = oTemplate.cloneNode(true);
+
+
+ if(oMenu.element.parentNode == oEl) {
+
+ if(this.browser == "opera") {
+
+ oEl.appendChild(oSubmenuIndicator);
+
+ oMenu.renderEvent.subscribe(function() {
+
+ oSubmenuIndicator.parentNode.insertBefore(
+ oSubmenuIndicator,
+ oMenu.element
+ );
+
+ });
+
+ }
+ else {
+
+ oEl.insertBefore(oSubmenuIndicator, oMenu.element);
+
+ }
+
+ }
+ else {
+
+ oEl.appendChild(oSubmenuIndicator);
+
+ }
+
+ this.submenuIndicator = oSubmenuIndicator;
+
+ }
+
+
+ Dom.addClass(aNodes, "hassubmenu");
+
+
+ if(oConfig.getProperty("disabled")) {
+
+ oConfig.refireEvent("disabled");
+
+ }
+
+ if(oConfig.getProperty("selected")) {
+
+ oConfig.refireEvent("selected");
+
+ }
+
+ }
+
+ }
+ else {
+
+ Dom.removeClass(aNodes, "hassubmenu");
+
+ if(oSubmenuIndicator) {
+
+ oEl.removeChild(oSubmenuIndicator);
+
+ }
+
+ if(this._oSubmenu) {
+
+ this._oSubmenu.destroy();
+
+ }
+
+ }
+
+ },
+
+
+ /**
+ * @method configOnClick
+ * @description Event handler for when the "onclick" configuration property
+ * of the menu item changes.
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
+ * that fired the event.
+ */
+ configOnClick: function(p_sType, p_aArgs, p_oItem) {
+
+ var oObject = p_aArgs[0];
+
+ /*
+ Remove any existing listeners if a "click" event handler has
+ already been specified.
+ */
+
+ if(
+ this._oOnclickAttributeValue &&
+ (this._oOnclickAttributeValue != oObject)
+ ) {
+
+ this.clickEvent.unsubscribe(
+ this._oOnclickAttributeValue.fn,
+ this._oOnclickAttributeValue.obj
+ );
+
+ this._oOnclickAttributeValue = null;
+
+ }
+
+
+ if(
+ !this._oOnclickAttributeValue &&
+ typeof oObject == "object" &&
+ typeof oObject.fn == "function"
+ ) {
+
+ this.clickEvent.subscribe(
+ oObject.fn,
+ (oObject.obj || this),
+ oObject.scope
+ );
+
+ this._oOnclickAttributeValue = oObject;
+
+ }
+
+ },
+
+
+ /**
+ * @method configClassName
+ * @description Event handler for when the "classname" configuration
+ * property of a menu item changes.
+ * @param {String} p_sType String representing the name of the event that
+ * was fired.
+ * @param {Array} p_aArgs Array of arguments sent when the event was fired.
+ * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
+ * that fired the event.
+ */
+ configClassName: function(p_sType, p_aArgs, p_oItem) {
+
+ var sClassName = p_aArgs[0];
+
+ if(this._sClassName) {
+
+ Dom.removeClass(this.element, this._sClassName);
+
+ }
+
+ Dom.addClass(this.element, sClassName);
+ this._sClassName = sClassName;
+
+ },
+
+
+
+ // Public methods
+
+
+ /**
+ * @method initDefaultConfig
+ * @description Initializes an item's configurable properties.
+ */
+ initDefaultConfig : function() {
+
+ var oConfig = this.cfg,
+ DEFAULT_CONFIG = YAHOO.widget.MenuItem._DEFAULT_CONFIG;
+
+
+ // Define the configuration attributes
+
+ /**
+ * @config text
+ * @description String specifying the text label for the menu item.
+ * When building a menu from existing HTML the value of this property
+ * will be interpreted from the menu's markup.
+ * @default ""
+ * @type String
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.TEXT.key,
+ {
+ handler: this.configText,
+ value: DEFAULT_CONFIG.TEXT.value,
+ validator: DEFAULT_CONFIG.TEXT.validator,
+ suppressEvent: DEFAULT_CONFIG.TEXT.suppressEvent
+ }
+ );
+
+
+ /**
+ * @config helptext
+ * @description String specifying additional instructional text to
+ * accompany the text for the nenu item.
+ * @default null
+ * @type String|
+ * HTMLElement
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.HELP_TEXT.key,
+ { handler: this.configHelpText }
+ );
+
+
+ /**
+ * @config url
+ * @description String specifying the URL for the menu item's anchor's
+ * "href" attribute. When building a menu from existing HTML the value
+ * of this property will be interpreted from the menu's markup.
+ * @default "#"
+ * @type String
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.URL.key,
+ {
+ handler: this.configURL,
+ value: DEFAULT_CONFIG.URL.value,
+ suppressEvent: DEFAULT_CONFIG.URL.suppressEvent
+ }
+ );
+
+
+ /**
+ * @config target
+ * @description String specifying the value for the "target" attribute
+ * of the menu item's anchor element. Specifying a target will
+ * require the user to click directly on the menu item's anchor node in
+ * order to cause the browser to navigate to the specified URL.
+ * When building a menu from existing HTML the value of this property
+ * will be interpreted from the menu's markup.
+ * @default null
+ * @type String
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.TARGET.key,
+ {
+ handler: this.configTarget,
+ suppressEvent: DEFAULT_CONFIG.TARGET.suppressEvent
+ }
+ );
+
+
+ /**
+ * @config emphasis
+ * @description Boolean indicating if the text of the menu item will be
+ * rendered with emphasis. When building a menu from existing HTML the
+ * value of this property will be interpreted from the menu's markup.
+ * @default false
+ * @type Boolean
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.EMPHASIS.key,
+ {
+ handler: this.configEmphasis,
+ value: DEFAULT_CONFIG.EMPHASIS.value,
+ validator: DEFAULT_CONFIG.EMPHASIS.validator,
+ suppressEvent: DEFAULT_CONFIG.EMPHASIS.suppressEvent
+ }
+ );
+
+
+ /**
+ * @config strongemphasis
+ * @description Boolean indicating if the text of the menu item will be
+ * rendered with strong emphasis. When building a menu from existing
+ * HTML the value of this property will be interpreted from the
+ * menu's markup.
+ * @default false
+ * @type Boolean
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.STRONG_EMPHASIS.key,
+ {
+ handler: this.configStrongEmphasis,
+ value: DEFAULT_CONFIG.STRONG_EMPHASIS.value,
+ validator: DEFAULT_CONFIG.STRONG_EMPHASIS.validator,
+ suppressEvent: DEFAULT_CONFIG.STRONG_EMPHASIS.suppressEvent
+ }
+ );
+
+
+ /**
+ * @config checked
+ * @description Boolean indicating if the menu item should be rendered
+ * with a checkmark.
+ * @default false
+ * @type Boolean
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.CHECKED.key,
+ {
+ handler: this.configChecked,
+ value: DEFAULT_CONFIG.CHECKED.value,
+ validator: DEFAULT_CONFIG.CHECKED.validator,
+ suppressEvent: DEFAULT_CONFIG.CHECKED.suppressEvent,
+ supercedes: DEFAULT_CONFIG.CHECKED.supercedes
+ }
+ );
+
+
+ /**
+ * @config disabled
+ * @description Boolean indicating if the menu item should be disabled.
+ * (Disabled menu items are dimmed and will not respond to user input
+ * or fire events.)
+ * @default false
+ * @type Boolean
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.DISABLED.key,
+ {
+ handler: this.configDisabled,
+ value: DEFAULT_CONFIG.DISABLED.value,
+ validator: DEFAULT_CONFIG.DISABLED.validator,
+ suppressEvent: DEFAULT_CONFIG.DISABLED.suppressEvent
+ }
+ );
+
+
+ /**
+ * @config selected
+ * @description Boolean indicating if the menu item should
+ * be highlighted.
+ * @default false
+ * @type Boolean
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.SELECTED.key,
+ {
+ handler: this.configSelected,
+ value: DEFAULT_CONFIG.SELECTED.value,
+ validator: DEFAULT_CONFIG.SELECTED.validator,
+ suppressEvent: DEFAULT_CONFIG.SELECTED.suppressEvent
+ }
+ );
+
+
+ /**
+ * @config submenu
+ * @description Object specifying the submenu to be appended to the
+ * menu item. The value can be one of the following: Object
+ * specifying a Menu instance. Object literal specifying the
+ * menu to be created. Format: { id: [menu id], itemdata:
+ * [array of values for
+ * items ] }. String specifying the id attribute
+ * of the <div> element of the menu.
+ * Object specifying the <div> element of the
+ * menu.
+ * @default null
+ * @type Menu|String|Object|
+ * HTMLElement
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.SUBMENU.key,
+ { handler: this.configSubmenu }
+ );
+
+
+ /**
+ * @config onclick
+ * @description Object literal representing the code to be executed when
+ * the button is clicked. Format: {
+ * fn: Function, // The handler to call when
+ * the event fires. obj: Object, // An
+ * object to pass back to the handler. scope:
+ * Object // The object to use for the scope of the handler.
+ * }
+ * @type Object
+ * @default null
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.ONCLICK.key,
+ { handler: this.configOnClick }
+ );
+
+
+ /**
+ * @config classname
+ * @description CSS class to be applied to the menu item's root
+ * <li> element. The specified class(es) are
+ * appended in addition to the default class as specified by the menu
+ * item's CSS_CLASS_NAME constant.
+ * @default null
+ * @type String
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.CLASS_NAME.key,
+ {
+ handler: this.configClassName,
+ value: DEFAULT_CONFIG.CLASS_NAME.value,
+ validator: DEFAULT_CONFIG.CLASS_NAME.validator
+ }
+ );
+
+ },
+
+
+ /**
+ * @method getNextEnabledSibling
+ * @description Finds the menu item's next enabled sibling.
+ * @return YAHOO.widget.MenuItem
+ */
+ getNextEnabledSibling: function() {
+
+ if(this.parent instanceof Menu) {
+
+ var nGroupIndex = this.groupIndex;
+
+ function getNextArrayItem(p_aArray, p_nStartIndex) {
+
+ return p_aArray[p_nStartIndex] ||
+ getNextArrayItem(p_aArray, (p_nStartIndex+1));
+
+ }
+
+
+ var aItemGroups = this.parent.getItemGroups(),
+ oNextItem;
+
+
+ if(this.index < (aItemGroups[nGroupIndex].length - 1)) {
+
+ oNextItem = getNextArrayItem(
+ aItemGroups[nGroupIndex],
+ (this.index+1)
+ );
+
+ }
+ else {
+
+ var nNextGroupIndex;
+
+ if(nGroupIndex < (aItemGroups.length - 1)) {
+
+ nNextGroupIndex = nGroupIndex + 1;
+
+ }
+ else {
+
+ nNextGroupIndex = 0;
+
+ }
+
+ var aNextGroup = getNextArrayItem(aItemGroups, nNextGroupIndex);
+
+ // Retrieve the first menu item in the next group
+
+ oNextItem = getNextArrayItem(aNextGroup, 0);
+
+ }
+
+ return (
+ oNextItem.cfg.getProperty("disabled") ||
+ oNextItem.element.style.display == "none"
+ ) ?
+ oNextItem.getNextEnabledSibling() : oNextItem;
+
+ }
+
+ },
+
+
+ /**
+ * @method getPreviousEnabledSibling
+ * @description Finds the menu item's previous enabled sibling.
+ * @return {YAHOO.widget.MenuItem}
+ */
+ getPreviousEnabledSibling: function() {
+
+ if(this.parent instanceof Menu) {
+
+ var nGroupIndex = this.groupIndex;
+
+ function getPreviousArrayItem(p_aArray, p_nStartIndex) {
+
+ return p_aArray[p_nStartIndex] ||
+ getPreviousArrayItem(p_aArray, (p_nStartIndex-1));
+
+ }
+
+ function getFirstItemIndex(p_aArray, p_nStartIndex) {
+
+ return p_aArray[p_nStartIndex] ?
+ p_nStartIndex :
+ getFirstItemIndex(p_aArray, (p_nStartIndex+1));
+
+ }
+
+ var aItemGroups = this.parent.getItemGroups(),
+ oPreviousItem;
+
+ if(
+ this.index > getFirstItemIndex(aItemGroups[nGroupIndex], 0)
+ ) {
+
+ oPreviousItem =
+ getPreviousArrayItem(
+ aItemGroups[nGroupIndex],
+ (this.index-1)
+ );
+
+ }
+ else {
+
+ var nPreviousGroupIndex;
+
+ if(nGroupIndex > getFirstItemIndex(aItemGroups, 0)) {
+
+ nPreviousGroupIndex = nGroupIndex - 1;
+
+ }
+ else {
+
+ nPreviousGroupIndex = aItemGroups.length - 1;
+
+ }
+
+ var aPreviousGroup =
+ getPreviousArrayItem(aItemGroups, nPreviousGroupIndex);
+
+ oPreviousItem =
+ getPreviousArrayItem(
+ aPreviousGroup,
+ (aPreviousGroup.length - 1)
+ );
+
+ }
+
+ return (
+ oPreviousItem.cfg.getProperty("disabled") ||
+ oPreviousItem.element.style.display == "none"
+ ) ?
+ oPreviousItem.getPreviousEnabledSibling() : oPreviousItem;
+
+ }
+
+ },
+
+
+ /**
+ * @method focus
+ * @description Causes the menu item to receive the focus and fires the
+ * focus event.
+ */
+ focus: function() {
+
+ var oParent = this.parent,
+ oAnchor = this._oAnchor,
+ oActiveItem = oParent.activeItem,
+ me = this;
+
+
+ function setFocus() {
+
+ try {
+
+ if (
+ (me.browser == "ie" || me.browser == "ie7") &&
+ !document.hasFocus()
+ ) {
+
+ return;
+
+ }
+
+ oAnchor.focus();
+
+ }
+ catch(e) {
+
+ }
+
+ }
+
+
+ if(
+ !this.cfg.getProperty("disabled") &&
+ oParent &&
+ oParent.cfg.getProperty("visible") &&
+ this.element.style.display != "none"
+ ) {
+
+ if(oActiveItem) {
+
+ oActiveItem.blur();
+
+ }
+
+
+ /*
+ Setting focus via a timer fixes a race condition in Firefox, IE
+ and Opera where the browser viewport jumps as it trys to
+ position and focus the menu.
+ */
+
+ window.setTimeout(setFocus, 0);
+
+ this.focusEvent.fire();
+
+ }
+
+ },
+
+
+ /**
+ * @method blur
+ * @description Causes the menu item to lose focus and fires the
+ * blur event.
+ */
+ blur: function() {
+
+ var oParent = this.parent;
+
+ if(
+ !this.cfg.getProperty("disabled") &&
+ oParent &&
+ Dom.getStyle(oParent.element, "visibility") == "visible"
+ ) {
+
+ this._oAnchor.blur();
+
+ this.blurEvent.fire();
+
+ }
+
+ },
+
+
+ /**
+ * @method hasFocus
+ * @description Returns a boolean indicating whether or not the menu item
+ * has focus.
+ * @return {Boolean}
+ */
+ hasFocus: function() {
+
+ return (YAHOO.widget.MenuManager.getFocusedMenuItem() == this);
+
+ },
+
+
+ /**
+ * @method destroy
+ * @description Removes the menu item's <li> element
+ * from its parent <ul> element.
+ */
+ destroy: function() {
+
+ var oEl = this.element;
+
+ if(oEl) {
+
+
+ // If the item has a submenu, destroy it first
+
+ var oSubmenu = this.cfg.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ oSubmenu.destroy();
+
+ }
+
+
+ // Remove CustomEvent listeners
+
+ this.mouseOverEvent.unsubscribeAll();
+ this.mouseOutEvent.unsubscribeAll();
+ this.mouseDownEvent.unsubscribeAll();
+ this.mouseUpEvent.unsubscribeAll();
+ this.clickEvent.unsubscribeAll();
+ this.keyPressEvent.unsubscribeAll();
+ this.keyDownEvent.unsubscribeAll();
+ this.keyUpEvent.unsubscribeAll();
+ this.focusEvent.unsubscribeAll();
+ this.blurEvent.unsubscribeAll();
+ this.cfg.configChangedEvent.unsubscribeAll();
+
+
+ // Remove the element from the parent node
+
+ var oParentNode = oEl.parentNode;
+
+ if(oParentNode) {
+
+ oParentNode.removeChild(oEl);
+
+ this.destroyEvent.fire();
+
+ }
+
+ this.destroyEvent.unsubscribeAll();
+
+ }
+
+ },
+
+
+ /**
+ * @method toString
+ * @description Returns a string representing the menu item.
+ * @return {String}
+ */
+ toString: function() {
+
+ return ("MenuItem: " + this.cfg.getProperty("text"));
+
+ }
+
+};
+
+})();
+
+
+
+/**
+* Creates a list of options or commands which are made visible in response to
+* an HTML element's "contextmenu" event ("mousedown" for Opera).
+*
+* @param {String} p_oElement String specifying the id attribute of the
+* <div> element of the context menu.
+* @param {String} p_oElement String specifying the id attribute of the
+* <select> element to be used as the data source for the
+* context menu.
+* @param {HTMLDivElement } p_oElement Object specifying the
+* <div> element of the context menu.
+* @param {HTMLSelectElement } p_oElement Object specifying
+* the <select> element to be used as the data source for
+* the context menu.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the context menu. See configuration class documentation
+* for more details.
+* @class ContextMenu
+* @constructor
+* @extends YAHOO.widget.Menu
+* @namespace YAHOO.widget
+*/
+YAHOO.widget.ContextMenu = function(p_oElement, p_oConfig) {
+
+ YAHOO.widget.ContextMenu.superclass.constructor.call(
+ this,
+ p_oElement,
+ p_oConfig
+ );
+
+};
+
+
+/**
+* Constant representing the name of the ContextMenu's events
+* @property YAHOO.widget.ContextMenu._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.ContextMenu._EVENT_TYPES = {
+
+ "TRIGGER_CONTEXT_MENU": "triggerContextMenu",
+
+ "CONTEXT_MENU": (
+ (YAHOO.widget.Module.prototype.browser == "opera" ?
+ "mousedown" : "contextmenu")
+ ),
+ "CLICK": "click"
+
+};
+
+
+/**
+* Constant representing the ContextMenu's configuration properties
+* @property YAHOO.widget.ContextMenu._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.ContextMenu._DEFAULT_CONFIG = {
+
+ "TRIGGER": {
+ key: "trigger"
+ }
+
+};
+
+
+YAHOO.lang.extend(YAHOO.widget.ContextMenu, YAHOO.widget.Menu, {
+
+
+
+// Private properties
+
+
+/**
+* @property _oTrigger
+* @description Object reference to the current value of the "trigger"
+* configuration property.
+* @default null
+* @private
+* @type String|HTMLElement |Array
+*/
+_oTrigger: null,
+
+
+/**
+* @property _bCancelled
+* @description Boolean indicating if the display of the context menu should
+* be cancelled.
+* @default false
+* @private
+* @type Boolean
+*/
+_bCancelled: false,
+
+
+
+// Public properties
+
+
+/**
+* @property contextEventTarget
+* @description Object reference for the HTML element that was the target of the
+* "contextmenu" DOM event ("mousedown" for Opera) that triggered the display of
+* the context menu.
+* @default null
+* @type HTMLElement
+*/
+contextEventTarget: null,
+
+
+
+// Events
+
+
+/**
+* @event triggerContextMenuEvent
+* @description Custom Event wrapper for the "contextmenu" DOM event
+* ("mousedown" for Opera) fired by the element(s) that trigger the display of
+* the context menu.
+*/
+triggerContextMenuEvent: null,
+
+
+
+/**
+* @method init
+* @description The ContextMenu class's initialization method. This method is
+* automatically called by the constructor, and sets up all DOM references for
+* pre-existing markup, and creates required markup if it is not already present.
+* @param {String} p_oElement String specifying the id attribute of the
+* <div> element of the context menu.
+* @param {String} p_oElement String specifying the id attribute of the
+* <select> element to be used as the data source for
+* the context menu.
+* @param {HTMLDivElement } p_oElement Object specifying the
+* <div> element of the context menu.
+* @param {HTMLSelectElement } p_oElement Object specifying
+* the <select> element to be used as the data source for
+* the context menu.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the context menu. See configuration class documentation
+* for more details.
+*/
+init: function(p_oElement, p_oConfig) {
+
+ if(!this.ITEM_TYPE) {
+
+ this.ITEM_TYPE = YAHOO.widget.ContextMenuItem;
+
+ }
+
+
+ // Call the init of the superclass (YAHOO.widget.Menu)
+
+ YAHOO.widget.ContextMenu.superclass.init.call(this, p_oElement);
+
+
+ this.beforeInitEvent.fire(YAHOO.widget.ContextMenu);
+
+
+ if(p_oConfig) {
+
+ this.cfg.applyConfig(p_oConfig, true);
+
+ }
+
+
+ this.initEvent.fire(YAHOO.widget.ContextMenu);
+
+},
+
+
+/**
+* @method initEvents
+* @description Initializes the custom events for the context menu.
+*/
+initEvents: function() {
+
+ YAHOO.widget.ContextMenu.superclass.initEvents.call(this);
+
+ // Create custom events
+
+ this.triggerContextMenuEvent =
+
+ new YAHOO.util.CustomEvent(
+ YAHOO.widget.ContextMenu._EVENT_TYPES.TRIGGER_CONTEXT_MENU,
+ this
+ );
+
+},
+
+
+/**
+* @method cancel
+* @description Cancels the display of the context menu.
+*/
+cancel: function() {
+
+ this._bCancelled = true;
+
+},
+
+
+
+// Private methods
+
+
+/**
+* @method _removeEventHandlers
+* @description Removes all of the DOM event handlers from the HTML element(s)
+* whose "context menu" event ("click" for Opera) trigger the display of
+* the context menu.
+* @private
+*/
+_removeEventHandlers: function() {
+
+ var Event = YAHOO.util.Event,
+ oTrigger = this._oTrigger;
+
+
+ // Remove the event handlers from the trigger(s)
+
+ if (oTrigger) {
+
+ Event.removeListener(
+ oTrigger,
+ YAHOO.widget.ContextMenu._EVENT_TYPES.CONTEXT_MENU,
+ this._onTriggerContextMenu
+ );
+
+ if(this.browser == "opera") {
+
+ Event.removeListener(
+ oTrigger,
+ YAHOO.widget.ContextMenu._EVENT_TYPES.CLICK,
+ this._onTriggerClick
+ );
+
+ }
+
+ }
+
+},
+
+
+
+// Private event handlers
+
+
+/**
+* @method _onTriggerClick
+* @description "click" event handler for the HTML element(s) identified as the
+* "trigger" for the context menu. Used to cancel default behaviors in Opera.
+* @private
+* @param {Event} p_oEvent Object representing the DOM event object passed back
+* by the event utility (YAHOO.util.Event).
+* @param {YAHOO.widget.ContextMenu} p_oMenu Object representing the context
+* menu that is handling the event.
+*/
+_onTriggerClick: function(p_oEvent, p_oMenu) {
+
+ if(p_oEvent.ctrlKey) {
+
+ YAHOO.util.Event.stopEvent(p_oEvent);
+
+ }
+
+},
+
+
+/**
+* @method _onTriggerContextMenu
+* @description "contextmenu" event handler ("mousedown" for Opera) for the HTML
+* element(s) that trigger the display of the context menu.
+* @private
+* @param {Event} p_oEvent Object representing the DOM event object passed back
+* by the event utility (YAHOO.util.Event).
+* @param {YAHOO.widget.ContextMenu} p_oMenu Object representing the context
+* menu that is handling the event.
+*/
+_onTriggerContextMenu: function(p_oEvent, p_oMenu) {
+
+ var Event = YAHOO.util.Event;
+
+ if(p_oEvent.type == "mousedown" && !p_oEvent.ctrlKey) {
+
+ return;
+
+ }
+
+
+ /*
+ Prevent the browser's default context menu from appearing and
+ stop the propagation of the "contextmenu" event so that
+ other ContextMenu instances are not displayed.
+ */
+
+ Event.stopEvent(p_oEvent);
+
+
+ // Hide any other ContextMenu instances that might be visible
+
+ YAHOO.widget.MenuManager.hideVisible();
+
+
+ this.contextEventTarget = Event.getTarget(p_oEvent);
+
+ this.triggerContextMenuEvent.fire(p_oEvent);
+
+
+ if(!this._bCancelled) {
+
+ // Position and display the context menu
+
+ this.cfg.setProperty("xy", Event.getXY(p_oEvent));
+
+ this.show();
+
+ }
+
+ this._bCancelled = false;
+
+},
+
+
+
+// Public methods
+
+
+/**
+* @method toString
+* @description Returns a string representing the context menu.
+* @return {String}
+*/
+toString: function() {
+
+ return ("ContextMenu " + this.id);
+
+},
+
+
+/**
+* @method initDefaultConfig
+* @description Initializes the class's configurable properties which can be
+* changed using the context menu's Config object ("cfg").
+*/
+initDefaultConfig: function() {
+
+ YAHOO.widget.ContextMenu.superclass.initDefaultConfig.call(this);
+
+ /**
+ * @config trigger
+ * @description The HTML element(s) whose "contextmenu" event ("mousedown"
+ * for Opera) trigger the display of the context menu. Can be a string
+ * representing the id attribute of the HTML element, an object reference
+ * for the HTML element, or an array of strings or HTML element references.
+ * @default null
+ * @type String|HTMLElement |Array
+ */
+ this.cfg.addProperty(
+ YAHOO.widget.ContextMenu._DEFAULT_CONFIG.TRIGGER.key,
+ { handler: this.configTrigger }
+ );
+
+},
+
+
+/**
+* @method destroy
+* @description Removes the context menu's <div> element
+* (and accompanying child nodes) from the document.
+*/
+destroy: function() {
+
+ // Remove the DOM event handlers from the current trigger(s)
+
+ this._removeEventHandlers();
+
+
+ // Continue with the superclass implementation of this method
+
+ YAHOO.widget.ContextMenu.superclass.destroy.call(this);
+
+},
+
+
+
+// Public event handlers for configuration properties
+
+
+/**
+* @method configTrigger
+* @description Event handler for when the value of the "trigger" configuration
+* property changes.
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.ContextMenu} p_oMenu Object representing the context
+* menu that fired the event.
+*/
+configTrigger: function(p_sType, p_aArgs, p_oMenu) {
+
+ var Event = YAHOO.util.Event,
+ oTrigger = p_aArgs[0];
+
+ if(oTrigger) {
+
+ /*
+ If there is a current "trigger" - remove the event handlers
+ from that element(s) before assigning new ones
+ */
+
+ if(this._oTrigger) {
+
+ this._removeEventHandlers();
+
+ }
+
+ this._oTrigger = oTrigger;
+
+
+ /*
+ Listen for the "mousedown" event in Opera b/c it does not
+ support the "contextmenu" event
+ */
+
+ Event.on(
+ oTrigger,
+ YAHOO.widget.ContextMenu._EVENT_TYPES.CONTEXT_MENU,
+ this._onTriggerContextMenu,
+ this,
+ true
+ );
+
+
+ /*
+ Assign a "click" event handler to the trigger element(s) for
+ Opera to prevent default browser behaviors.
+ */
+
+ if(this.browser == "opera") {
+
+ Event.on(
+ oTrigger,
+ YAHOO.widget.ContextMenu._EVENT_TYPES.CLICK,
+ this._onTriggerClick,
+ this,
+ true
+ );
+
+ }
+
+ }
+ else {
+
+ this._removeEventHandlers();
+
+ }
+
+}
+
+}); // END YAHOO.lang.extend
+
+
+
+/**
+* Creates an item for a context menu.
+*
+* @param {String} p_oObject String specifying the text of the context menu item.
+* @param {HTMLLIElement } p_oObject Object specifying the
+* <li> element of the context menu item.
+* @param {HTMLOptGroupElement } p_oObject Object
+* specifying the <optgroup> element of the context
+* menu item.
+* @param {HTMLOptionElement } p_oObject Object specifying
+* the <option> element of the context menu item.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the context menu item. See configuration class
+* documentation for more details.
+* @class ContextMenuItem
+* @constructor
+* @extends YAHOO.widget.MenuItem
+*/
+YAHOO.widget.ContextMenuItem = function(p_oObject, p_oConfig) {
+
+ YAHOO.widget.ContextMenuItem.superclass.constructor.call(
+ this,
+ p_oObject,
+ p_oConfig
+ );
+
+};
+
+YAHOO.lang.extend(YAHOO.widget.ContextMenuItem, YAHOO.widget.MenuItem, {
+
+
+/**
+* @method init
+* @description The ContextMenuItem class's initialization method. This method
+* is automatically called by the constructor, and sets up all DOM references
+* for pre-existing markup, and creates required markup if it is not
+* already present.
+* @param {String} p_oObject String specifying the text of the context menu item.
+* @param {HTMLLIElement } p_oObject Object specifying the
+* <li> element of the context menu item.
+* @param {HTMLOptGroupElement } p_oObject Object
+* specifying the <optgroup> element of the context
+* menu item.
+* @param {HTMLOptionElement } p_oObject Object specifying
+* the <option> element of the context menu item.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the context menu item. See configuration class
+* documentation for more details.
+*/
+init: function(p_oObject, p_oConfig) {
+
+ if(!this.SUBMENU_TYPE) {
+
+ this.SUBMENU_TYPE = YAHOO.widget.ContextMenu;
+
+ }
+
+
+ /*
+ Call the init of the superclass (YAHOO.widget.MenuItem)
+ Note: We don't pass the user config in here yet
+ because we only want it executed once, at the lowest
+ subclass level.
+ */
+
+ YAHOO.widget.ContextMenuItem.superclass.init.call(this, p_oObject);
+
+ var oConfig = this.cfg;
+
+ if(p_oConfig) {
+
+ oConfig.applyConfig(p_oConfig, true);
+
+ }
+
+ oConfig.fireQueue();
+
+},
+
+
+
+// Public methods
+
+
+/**
+* @method toString
+* @description Returns a string representing the context menu item.
+* @return {String}
+*/
+toString: function() {
+
+ return ("ContextMenuItem: " + this.cfg.getProperty("text"));
+
+}
+
+}); // END YAHOO.lang.extend
+
+
+
+/**
+* Horizontal collection of items, each of which can contain a submenu.
+*
+* @param {String} p_oElement String specifying the id attribute of the
+* <div> element of the menu bar.
+* @param {String} p_oElement String specifying the id attribute of the
+* <select> element to be used as the data source for the
+* menu bar.
+* @param {HTMLDivElement } p_oElement Object specifying
+* the <div> element of the menu bar.
+* @param {HTMLSelectElement } p_oElement Object
+* specifying the <select> element to be used as the data
+* source for the menu bar.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the menu bar. See configuration class documentation for
+* more details.
+* @class Menubar
+* @constructor
+* @extends YAHOO.widget.Menu
+* @namespace YAHOO.widget
+*/
+YAHOO.widget.MenuBar = function(p_oElement, p_oConfig) {
+
+ YAHOO.widget.MenuBar.superclass.constructor.call(
+ this,
+ p_oElement,
+ p_oConfig
+ );
+
+};
+
+
+/**
+* Constant representing the MenuBar's configuration properties
+* @property YAHOO.widget.MenuBar._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.MenuBar._DEFAULT_CONFIG = {
+
+ "POSITION": {
+ key: "position",
+ value: "static",
+ validator: YAHOO.widget.Menu._checkPosition,
+ supercedes: ["visible"]
+ },
+
+ "SUBMENU_ALIGNMENT": {
+ key: "submenualignment",
+ value: ["tl","bl"]
+ },
+
+ "AUTO_SUBMENU_DISPLAY": {
+ key: "autosubmenudisplay",
+ value: false,
+ validator: YAHOO.lang.isBoolean
+ }
+
+};
+
+
+
+YAHOO.lang.extend(YAHOO.widget.MenuBar, YAHOO.widget.Menu, {
+
+/**
+* @method init
+* @description The MenuBar class's initialization method. This method is
+* automatically called by the constructor, and sets up all DOM references for
+* pre-existing markup, and creates required markup if it is not already present.
+* @param {String} p_oElement String specifying the id attribute of the
+* <div> element of the menu bar.
+* @param {String} p_oElement String specifying the id attribute of the
+* <select> element to be used as the data source for the
+* menu bar.
+* @param {HTMLDivElement } p_oElement Object specifying
+* the <div> element of the menu bar.
+* @param {HTMLSelectElement } p_oElement Object
+* specifying the <select> element to be used as the data
+* source for the menu bar.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the menu bar. See configuration class documentation for
+* more details.
+*/
+init: function(p_oElement, p_oConfig) {
+
+ if(!this.ITEM_TYPE) {
+
+ this.ITEM_TYPE = YAHOO.widget.MenuBarItem;
+
+ }
+
+
+ // Call the init of the superclass (YAHOO.widget.Menu)
+
+ YAHOO.widget.MenuBar.superclass.init.call(this, p_oElement);
+
+
+ this.beforeInitEvent.fire(YAHOO.widget.MenuBar);
+
+
+ if(p_oConfig) {
+
+ this.cfg.applyConfig(p_oConfig, true);
+
+ }
+
+ this.initEvent.fire(YAHOO.widget.MenuBar);
+
+},
+
+
+
+// Constants
+
+
+/**
+* @property CSS_CLASS_NAME
+* @description String representing the CSS class(es) to be applied to the menu
+* bar's <div> element.
+* @default "yuimenubar"
+* @final
+* @type String
+*/
+CSS_CLASS_NAME: "yuimenubar",
+
+
+
+// Protected event handlers
+
+
+/**
+* @method _onKeyDown
+* @description "keydown" Custom Event handler for the menu bar.
+* @private
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.MenuBar} p_oMenuBar Object representing the menu bar
+* that fired the event.
+*/
+_onKeyDown: function(p_sType, p_aArgs, p_oMenuBar) {
+
+ var Event = YAHOO.util.Event,
+ oEvent = p_aArgs[0],
+ oItem = p_aArgs[1],
+ oSubmenu;
+
+
+ if(oItem && !oItem.cfg.getProperty("disabled")) {
+
+ var oItemCfg = oItem.cfg;
+
+ switch(oEvent.keyCode) {
+
+ case 37: // Left arrow
+ case 39: // Right arrow
+
+ if(
+ oItem == this.activeItem &&
+ !oItemCfg.getProperty("selected")
+ ) {
+
+ oItemCfg.setProperty("selected", true);
+
+ }
+ else {
+
+ var oNextItem = (oEvent.keyCode == 37) ?
+ oItem.getPreviousEnabledSibling() :
+ oItem.getNextEnabledSibling();
+
+ if(oNextItem) {
+
+ this.clearActiveItem();
+
+ oNextItem.cfg.setProperty("selected", true);
+
+
+ if(this.cfg.getProperty("autosubmenudisplay")) {
+
+ oSubmenu = oNextItem.cfg.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ oSubmenu.show();
+
+ }
+
+ }
+
+ oNextItem.focus();
+
+ }
+
+ }
+
+ Event.preventDefault(oEvent);
+
+ break;
+
+ case 40: // Down arrow
+
+ if(this.activeItem != oItem) {
+
+ this.clearActiveItem();
+
+ oItemCfg.setProperty("selected", true);
+ oItem.focus();
+
+ }
+
+ oSubmenu = oItemCfg.getProperty("submenu");
+
+ if(oSubmenu) {
+
+ if(oSubmenu.cfg.getProperty("visible")) {
+
+ oSubmenu.setInitialSelection();
+ oSubmenu.setInitialFocus();
+
+ }
+ else {
+
+ oSubmenu.show();
+
+ }
+
+ }
+
+ Event.preventDefault(oEvent);
+
+ break;
+
+ }
+
+ }
+
+
+ if(oEvent.keyCode == 27 && this.activeItem) { // Esc key
+
+ oSubmenu = this.activeItem.cfg.getProperty("submenu");
+
+ if(oSubmenu && oSubmenu.cfg.getProperty("visible")) {
+
+ oSubmenu.hide();
+ this.activeItem.focus();
+
+ }
+ else {
+
+ this.activeItem.cfg.setProperty("selected", false);
+ this.activeItem.blur();
+
+ }
+
+ Event.preventDefault(oEvent);
+
+ }
+
+},
+
+
+/**
+* @method _onClick
+* @description "click" event handler for the menu bar.
+* @protected
+* @param {String} p_sType String representing the name of the event that
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.MenuBar} p_oMenuBar Object representing the menu bar
+* that fired the event.
+*/
+_onClick: function(p_sType, p_aArgs, p_oMenuBar) {
+
+ YAHOO.widget.MenuBar.superclass._onClick.call(
+ this,
+ p_sType,
+ p_aArgs,
+ p_oMenuBar
+ );
+
+
+ var oItem = p_aArgs[1];
+
+ if(oItem && !oItem.cfg.getProperty("disabled")) {
+
+ var Event = YAHOO.util.Event,
+ Dom = YAHOO.util.Dom,
+
+ oEvent = p_aArgs[0],
+ oTarget = Event.getTarget(oEvent),
+
+ oActiveItem = this.activeItem,
+ oConfig = this.cfg;
+
+
+ // Hide any other submenus that might be visible
+
+ if(oActiveItem && oActiveItem != oItem) {
+
+ this.clearActiveItem();
+
+ }
+
+
+ oItem.cfg.setProperty("selected", true);
+
+
+ // Show the submenu for the item
+
+ var oSubmenu = oItem.cfg.getProperty("submenu");
+
+
+ if(oSubmenu && oTarget != oItem.submenuIndicator) {
+
+ if(oSubmenu.cfg.getProperty("visible")) {
+
+ oSubmenu.hide();
+
+ }
+ else {
+
+ oSubmenu.show();
+
+ }
+
+ }
+
+ }
+
+},
+
+
+
+// Public methods
+
+
+/**
+* @method toString
+* @description Returns a string representing the menu bar.
+* @return {String}
+*/
+toString: function() {
+
+ return ("MenuBar " + this.id);
+
+},
+
+
+/**
+* @description Initializes the class's configurable properties which can be
+* changed using the menu bar's Config object ("cfg").
+* @method initDefaultConfig
+*/
+initDefaultConfig: function() {
+
+ YAHOO.widget.MenuBar.superclass.initDefaultConfig.call(this);
+
+ var oConfig = this.cfg,
+ DEFAULT_CONFIG = YAHOO.widget.MenuBar._DEFAULT_CONFIG;
+
+ // Add configuration properties
+
+
+ /*
+ Set the default value for the "position" configuration property
+ to "static" by re-adding the property.
+ */
+
+
+ /**
+ * @config position
+ * @description String indicating how a menu bar should be positioned on the
+ * screen. Possible values are "static" and "dynamic." Static menu bars
+ * are visible by default and reside in the normal flow of the document
+ * (CSS position: static). Dynamic menu bars are hidden by default, reside
+ * out of the normal flow of the document (CSS position: absolute), and can
+ * overlay other elements on the screen.
+ * @default static
+ * @type String
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.POSITION.key,
+ {
+ handler: this.configPosition,
+ value: DEFAULT_CONFIG.POSITION.value,
+ validator: DEFAULT_CONFIG.POSITION.validator,
+ supercedes: DEFAULT_CONFIG.POSITION.supercedes
+ }
+ );
+
+
+ /*
+ Set the default value for the "submenualignment" configuration property
+ to ["tl","bl"] by re-adding the property.
+ */
+
+ /**
+ * @config submenualignment
+ * @description Array defining how submenus should be aligned to their
+ * parent menu bar item. The format is: [itemCorner, submenuCorner].
+ * @default ["tl","bl"]
+ * @type Array
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key,
+ {
+ value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value
+ }
+ );
+
+
+ /*
+ Change the default value for the "autosubmenudisplay" configuration
+ property to "false" by re-adding the property.
+ */
+
+ /**
+ * @config autosubmenudisplay
+ * @description Boolean indicating if submenus are automatically made
+ * visible when the user mouses over the menu bar's items.
+ * @default false
+ * @type Boolean
+ */
+ oConfig.addProperty(
+ DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key,
+ {
+ value: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value,
+ validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator
+ }
+ );
+
+}
+
+}); // END YAHOO.lang.extend
+
+
+
+/**
+* Creates an item for a menu bar.
+*
+* @param {String} p_oObject String specifying the text of the menu bar item.
+* @param {HTMLLIElement } p_oObject Object specifying the
+* <li> element of the menu bar item.
+* @param {HTMLOptGroupElement } p_oObject Object
+* specifying the <optgroup> element of the menu bar item.
+* @param {HTMLOptionElement } p_oObject Object specifying
+* the <option> element of the menu bar item.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the menu bar item. See configuration class documentation
+* for more details.
+* @class MenuBarItem
+* @constructor
+* @extends YAHOO.widget.MenuItem
+*/
+YAHOO.widget.MenuBarItem = function(p_oObject, p_oConfig) {
+
+ YAHOO.widget.MenuBarItem.superclass.constructor.call(
+ this,
+ p_oObject,
+ p_oConfig
+ );
+
+};
+
+YAHOO.lang.extend(YAHOO.widget.MenuBarItem, YAHOO.widget.MenuItem, {
+
+
+/**
+* @method init
+* @description The MenuBarItem class's initialization method. This method is
+* automatically called by the constructor, and sets up all DOM references for
+* pre-existing markup, and creates required markup if it is not already present.
+* @param {String} p_oObject String specifying the text of the menu bar item.
+* @param {HTMLLIElement } p_oObject Object specifying the
+* <li> element of the menu bar item.
+* @param {HTMLOptGroupElement } p_oObject Object
+* specifying the <optgroup> element of the menu bar item.
+* @param {HTMLOptionElement } p_oObject Object specifying
+* the <option> element of the menu bar item.
+* @param {Object} p_oConfig Optional. Object literal specifying the
+* configuration for the menu bar item. See configuration class documentation
+* for more details.
+*/
+init: function(p_oObject, p_oConfig) {
+
+ if(!this.SUBMENU_TYPE) {
+
+ this.SUBMENU_TYPE = YAHOO.widget.Menu;
+
+ }
+
+
+ /*
+ Call the init of the superclass (YAHOO.widget.MenuItem)
+ Note: We don't pass the user config in here yet
+ because we only want it executed once, at the lowest
+ subclass level.
+ */
+
+ YAHOO.widget.MenuBarItem.superclass.init.call(this, p_oObject);
+
+
+ var oConfig = this.cfg;
+
+ if(p_oConfig) {
+
+ oConfig.applyConfig(p_oConfig, true);
+
+ }
+
+ oConfig.fireQueue();
+
+},
+
+
+
+// Constants
+
+/**
+* @property CSS_CLASS_NAME
+* @description String representing the CSS class(es) to be applied to the
+* <li> element of the menu bar item.
+* @default "yuimenubaritem"
+* @final
+* @type String
+*/
+CSS_CLASS_NAME: "yuimenubaritem",
+
+
+
+// Public methods
+
+
+/**
+* @method toString
+* @description Returns a string representing the menu bar item.
+* @return {String}
+*/
+toString: function() {
+
+ return ("MenuBarItem: " + this.cfg.getProperty("text"));
+
+}
+
+}); // END YAHOO.lang.extend
+YAHOO.register("menu", YAHOO.widget.Menu, {version: "2.2.1", build: "193"});
From jifty-commit at lists.jifty.org Thu Apr 12 06:55:03 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Thu Apr 12 06:55:46 2007
Subject: [Jifty-commit] r3120 - jifty/trunk/lib/Jifty/Plugin/REST
Message-ID: <20070412105503.DEB514D81C6@diesel.bestpractical.com>
Author: audreyt
Date: Thu Apr 12 06:54:33 2007
New Revision: 3120
Modified:
jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm
Log:
* Jifty::Plugin::REST::Dispatcher - Gugod pointed out that we don't need to
stringify() the object-to-data output, because (esp for nested structures)
it's far more convenient to have the $accept-specific formatter (e.g.
YAML or JSON) to render it.
Modified: jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm Thu Apr 12 06:54:33 2007
@@ -123,8 +123,9 @@
}
}
- # Attempt to stringify as last resort
- return stringify( $obj );
+ # As the last resort, return the object itself and expect the $accept-specific
+ # renderer to format the object as e.g. YAML or JSON data.
+ return $obj;
}
sub _collection_to_data {
From jifty-commit at lists.jifty.org Thu Apr 12 03:32:45 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Thu Apr 12 14:59:48 2007
Subject: [Jifty-commit] r3118 - in jifty/trunk: share/web/static/css
share/web/static/css/yui/calendar share/web/static/css/yui/menu
share/web/static/css/yui/tabview share/web/static/js/yui
Message-ID: <20070412073245.D3F9D4D81C3@diesel.bestpractical.com>
Author: hlb
Date: Thu Apr 12 03:32:44 2007
New Revision: 3118
Added:
jifty/trunk/share/web/static/css/yui/menu/
jifty/trunk/share/web/static/css/yui/menu/map.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menu.css
jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_dim_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_hov_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_nrm_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menuarorght8_dim_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menuarorght8_hov_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menuarorght8_nrm_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menuaroup8_dim_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menuaroup8_nrm_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menuchk8_dim_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menuchk8_hov_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/menu/menuchk8_nrm_1.gif (contents, props changed)
jifty/trunk/share/web/static/css/yui/tabview/tabview.css
jifty/trunk/share/web/static/js/yui/element-beta.js
Modified:
jifty/trunk/lib/Jifty/Web.pm
jifty/trunk/share/web/static/css/forms.css
jifty/trunk/share/web/static/css/main.css
jifty/trunk/share/web/static/css/yui/calendar/calendar.css
jifty/trunk/share/web/static/css/yui/tabview/border_tabs.css
jifty/trunk/share/web/static/css/yui/tabview/tabs.css
jifty/trunk/share/web/static/js/yui/calendar.js
jifty/trunk/share/web/static/js/yui/container.js
jifty/trunk/share/web/static/js/yui/dom.js
jifty/trunk/share/web/static/js/yui/event.js
jifty/trunk/share/web/static/js/yui/tabview.js
jifty/trunk/share/web/static/js/yui/yahoo.js
Log:
* Upgraded YUI to 2.2.1
* NOTICE: if you are using yui tabview,
please use tabview.css instead of tabs.css
* Added yui/element-beta.js and yui/menu.js in Web.pm
Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm (original)
+++ jifty/trunk/lib/Jifty/Web.pm Thu Apr 12 03:32:44 2007
@@ -62,8 +62,10 @@
yui/dom.js
yui/event.js
yui/calendar.js
+ yui/element-beta.js
yui/tabview.js
yui/container.js
+ yui/menu.js
app.js
app_behaviour.js
css_browser_selector.js
Modified: jifty/trunk/share/web/static/css/forms.css
==============================================================================
--- jifty/trunk/share/web/static/css/forms.css (original)
+++ jifty/trunk/share/web/static/css/forms.css Thu Apr 12 03:32:44 2007
@@ -198,7 +198,7 @@
}
-.selected {
+option.selected {
background: #dddddd;
}
Modified: jifty/trunk/share/web/static/css/main.css
==============================================================================
--- jifty/trunk/share/web/static/css/main.css (original)
+++ jifty/trunk/share/web/static/css/main.css Thu Apr 12 03:32:44 2007
@@ -10,4 +10,5 @@
@import "app.css";
@import "autocomplete.css";
@import "yui/calendar/calendar.css";
+@import "yui/menu/menu.css";
@import "notices.css";
Modified: jifty/trunk/share/web/static/css/yui/calendar/calendar.css
==============================================================================
--- jifty/trunk/share/web/static/css/yui/calendar/calendar.css (original)
+++ jifty/trunk/share/web/static/css/yui/calendar/calendar.css Thu Apr 12 03:32:44 2007
@@ -1,191 +1,197 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-Version 0.12
-*/
-
-.yui-calcontainer {
- position:relative;
- padding:5px;
- background-color:#F7F9FB;
- border:1px solid #7B9EBD;
- float:left;
- overflow:hidden;
-}
-
-.yui-calcontainer iframe {
- position:absolute;
- border:none;
- margin:0;padding:0;
- left:-1px;
- top:-1px;
- z-index:0;
- width:50em;
- height:50em;
-}
-
-.yui-calcontainer.multi {
- padding:0;
-}
-
-.yui-calcontainer.multi .groupcal {
- padding:5px;
- background-color:transparent;
- z-index:1;
- float:left;
- position:relative;
- border:none;
-}
-
-.yui-calcontainer .title {
- font:100% sans-serif;
- color:#000;
- font-weight:bold;
- margin-bottom:5px;
- height:25px;
- position:absolute;
- top:3px;left:5px;
- z-index:1;
-}
-
-.yui-calcontainer .close-icon {
- position:absolute;
- right:3px;
- top:3px;
- border:none;
- z-index:1;
-}
-
-/* Calendar element styles */
-
-.yui-calendar {
- font:100% sans-serif;
- text-align:center;
- border-spacing:0;
- border-collapse:separate;
- position:relative;
-}
-
-.yui-calcontainer.withtitle {
- padding-top:1.5em;
-}
-
-.yui-calendar .calnavleft {
- position:absolute;
- background-repeat:no-repeat;
- cursor:pointer;
- top:2px;
- bottom:0;
- width:9px;
- height:12px;
- left:2px;
- z-index:1;
-}
-
-.yui-calendar .calnavright {
- position:absolute;
- background-repeat:no-repeat;
- cursor:pointer;
- top:2px;
- bottom:0;
- width:9px;
- height:12px;
- right:2px;
- z-index:1;
-}
-
-.yui-calendar td.calcell {
- padding:.1em .2em;
- border:1px solid #E0E0E0;
- text-align:center;
-}
-
-.yui-calendar td.calcell a {
- color:#003DB8;
- text-decoration:none;
-}
-
-.yui-calendar td.calcell.today {
- border:1px solid #000;
-}
-
-.yui-calendar td.calcell.oom {
- cursor:default;
- color:#999;
- background-color:#EEE;
- border:1px solid #E0E0E0;
-}
-
-.yui-calendar td.calcell.selected {
- color:#003DB8;
- background-color:#FFF19F;
- border:1px solid #FF9900;
-}
-
-.yui-calendar td.calcell.calcellhover {
- cursor:pointer;
- color:#FFF;
- background-color:#FF9900;
- border:1px solid #FF9900;
-}
-
-.yui-calendar td.calcell.calcellhover a {
- color:#FFF;
-}
-
-.yui-calendar td.calcell.restricted {
- text-decoration:line-through;
-}
-
-.yui-calendar td.calcell.previous {
- color:#CCC;
-}
-
-.yui-calendar td.calcell.highlight1 { background-color:#CCFF99; }
-.yui-calendar td.calcell.highlight2 { background-color:#99CCFF; }
-.yui-calendar td.calcell.highlight3 { background-color:#FFCCCC; }
-.yui-calendar td.calcell.highlight4 { background-color:#CCFF99; }
-
-.yui-calendar .calhead {
- border:1px solid #E0E0E0;
- vertical-align:middle;
- background-color:#FFF;
-}
-
-.yui-calendar .calheader {
- position:relative;
- width:100%;
- text-align:center;
-}
-
-.yui-calendar .calheader img {
- border:none;
-}
-
-.yui-calendar .calweekdaycell {
- color:#666;
- font-weight:normal;
- text-align:center;
- width:1.5em;
-}
-
-.yui-calendar .calfoot {
- background-color:#EEE;
-}
-
-.yui-calendar .calrowhead, .yui-calendar .calrowfoot {
- color:#666;
- font-size:9px;
- font-style:italic;
- font-weight:normal;
- width:15px;
-}
-
-.yui-calendar .calrowhead {
- border-right-width:2px;
-}
-
-/*Specific changes for calendar running under fonts/reset */
-.yui-calendar a:hover {background:inherit;}
-p#clear {clear:left; padding-top:10px;}
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+.yui-calcontainer {
+ position:relative;
+ padding:5px;
+ background-color:#F7F9FB;
+ border:1px solid #7B9EBD;
+ float:left;
+ overflow:hidden;
+}
+
+.yui-calcontainer iframe {
+ position:absolute;
+ border:none;
+ margin:0;padding:0;
+ left:-1px;
+ top:-1px;
+ z-index:0;
+ width:50em;
+ height:50em;
+}
+
+.yui-calcontainer.multi {
+ padding:0;
+}
+
+.yui-calcontainer.multi .groupcal {
+ padding:5px;
+ background-color:transparent;
+ z-index:1;
+ float:left;
+ position:relative;
+ border:none;
+}
+
+.yui-calcontainer .title {
+ font:100% sans-serif;
+ color:#000;
+ font-weight:bold;
+ margin-bottom:5px;
+ height:25px;
+ position:absolute;
+ top:3px;left:5px;
+ z-index:1;
+}
+
+.yui-calcontainer .close-icon {
+ position:absolute;
+ right:3px;
+ top:3px;
+ border:none;
+ z-index:1;
+}
+
+.yui-calcontainer .calclose {
+ background: url("calx.gif") no-repeat;
+ width:17px;
+ height:13px;
+ cursor:pointer;
+}
+
+/* Calendar element styles */
+
+.yui-calendar {
+ font:100% sans-serif;
+ text-align:center;
+ border-spacing:0;
+ border-collapse:separate;
+ position:relative;
+}
+
+.yui-calcontainer.withtitle {
+ padding-top:1.5em;
+}
+
+.yui-calendar .calnavleft {
+ position:absolute;
+ cursor:pointer;
+ top:2px;
+ bottom:0;
+ width:9px;
+ height:12px;
+ left:2px;
+ z-index:1;
+ background: url("callt.gif") no-repeat;
+}
+
+.yui-calendar .calnavright {
+ position:absolute;
+ cursor:pointer;
+ top:2px;
+ bottom:0;
+ width:9px;
+ height:12px;
+ right:2px;
+ z-index:1;
+ background: url("calrt.gif") no-repeat;
+}
+
+.yui-calendar td.calcell {
+ padding:.1em .2em;
+ border:1px solid #E0E0E0;
+ text-align:center;
+}
+
+.yui-calendar td.calcell a {
+ color:#003DB8;
+ text-decoration:none;
+}
+
+.yui-calendar td.calcell.today {
+ border:1px solid #000;
+}
+
+.yui-calendar td.calcell.oom {
+ cursor:default;
+ color:#999;
+ background-color:#EEE;
+ border:1px solid #E0E0E0;
+}
+
+.yui-calendar td.calcell.selected {
+ color:#003DB8;
+ background-color:#FFF19F;
+ border:1px solid #FF9900;
+}
+
+.yui-calendar td.calcell.calcellhover {
+ cursor:pointer;
+ color:#FFF;
+ background-color:#FF9900;
+ border:1px solid #FF9900;
+}
+
+.yui-calendar td.calcell.calcellhover a {
+ color:#FFF;
+}
+
+.yui-calendar td.calcell.restricted {
+ text-decoration:line-through;
+}
+
+.yui-calendar td.calcell.previous {
+ color:#CCC;
+}
+
+.yui-calendar td.calcell.highlight1 { background-color:#CCFF99; }
+.yui-calendar td.calcell.highlight2 { background-color:#99CCFF; }
+.yui-calendar td.calcell.highlight3 { background-color:#FFCCCC; }
+.yui-calendar td.calcell.highlight4 { background-color:#CCFF99; }
+
+.yui-calendar .calhead {
+ border:1px solid #E0E0E0;
+ vertical-align:middle;
+ background-color:#FFF;
+}
+
+.yui-calendar .calheader {
+ position:relative;
+ width:100%;
+ text-align:center;
+}
+
+.yui-calendar .calheader img {
+ border:none;
+}
+
+.yui-calendar .calweekdaycell {
+ color:#666;
+ font-weight:normal;
+ text-align:center;
+ width:1.5em;
+}
+
+.yui-calendar .calfoot {
+ background-color:#EEE;
+}
+
+.yui-calendar .calrowhead, .yui-calendar .calrowfoot {
+ color:#666;
+ font-size:9px;
+ font-style:italic;
+ font-weight:normal;
+ width:15px;
+}
+
+.yui-calendar .calrowhead {
+ border-right-width:2px;
+}
+
+/* Specific changes for calendar running under fonts/reset */
+.yui-calendar .calbody a:hover {background:inherit;}
+p#clear {clear:left; padding-top:10px;}
Added: jifty/trunk/share/web/static/css/yui/menu/map.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menu.css
==============================================================================
--- (empty file)
+++ jifty/trunk/share/web/static/css/yui/menu/menu.css Thu Apr 12 03:32:44 2007
@@ -0,0 +1,401 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/* Menu styles */
+
+div.yuimenu {
+
+ background-color:#f6f7ee;
+ border:solid 1px #c4c4be;
+ padding:1px;
+
+}
+
+/* Submenus are positioned absolute and hidden by default */
+
+div.yuimenu div.yuimenu,
+div.yuimenubar div.yuimenu {
+
+ position:absolute;
+ visibility:hidden;
+
+}
+
+/* MenuBar Styles */
+
+div.yuimenubar {
+
+ background-color:#f6f7ee;
+
+}
+
+/*
+ Applying a width triggers "haslayout" in IE so that the module's
+ body clears its floated elements
+*/
+div.yuimenubar div.bd {
+
+ width:100%;
+
+}
+
+/*
+ Clear the module body for other browsers
+*/
+div.yuimenubar div.bd:after {
+
+ content:'.';
+ display:block;
+ clear:both;
+ visibility:hidden;
+ height:0;
+
+}
+
+/* Matches the group title (H6) inside a Menu or MenuBar instance */
+
+div.yuimenu h6,
+div.yuimenubar h6 {
+
+ font-size:100%;
+ font-weight:normal;
+ margin:0;
+ border:solid 1px #c4c4be;
+ color:#b9b9b9;
+
+}
+
+div.yuimenubar h6 {
+
+ float:left;
+ display:inline; /* Prevent margin doubling in IE */
+ padding:4px 12px;
+ border-width:0 1px 0 0;
+
+}
+
+div.yuimenu h6 {
+
+ float:none;
+ display:block;
+ border-width:1px 0 0 0;
+ padding:5px 10px 0 10px;
+
+}
+
+/* Matches the UL inside a Menu or MenuBar instance */
+
+div.yuimenubar ul {
+
+ list-style-type:none;
+ margin:0;
+ padding:0;
+
+}
+
+div.yuimenu ul {
+
+ list-style-type:none;
+ border:solid 1px #c4c4be;
+ border-width:1px 0 0 0;
+ margin:0;
+ padding:10px 0;
+
+}
+
+div.yuimenu ul.first-of-type,
+div.yuimenu ul.hastitle,
+div.yuimenu h6.first-of-type {
+
+ border-width:0;
+
+}
+
+/*
+ Styles for the menu's header and footer elements that are used as controls
+ to scroll the menu's body element when the menu's height exceeds the
+ value of the "maxheight" configuration property.
+*/
+
+div.yuimenu div.topscrollbar,
+div.yuimenu div.bottomscrollbar {
+
+ height:16px;
+ background-image:url(map.gif);
+ background-repeat:no-repeat;
+
+}
+
+
+div.yuimenu div.topscrollbar {
+
+ background-image:url(map.gif);
+ background-position:center -72px;
+
+}
+
+
+div.yuimenu div.topscrollbar_disabled {
+
+ background-image:url(map.gif);
+ background-position:center -88px;
+
+}
+
+
+div.yuimenu div.bottomscrollbar {
+
+ background-image:url(map.gif);
+ background-position:center -104px;
+
+}
+
+
+div.yuimenu div.bottomscrollbar_disabled {
+
+ background-image:url(map.gif);
+ background-position:center -120px;
+
+}
+
+
+/* MenuItem and MenuBarItem styles */
+
+div.yuimenu li,
+div.yuimenubar li {
+
+ font-size:85%;
+ cursor:pointer;
+ cursor:hand;
+ white-space:nowrap;
+ text-align:left;
+
+}
+
+div.yuimenu li.yuimenuitem {
+
+ padding:2px 24px;
+
+}
+
+div.yuimenu li li,
+div.yuimenubar li li {
+
+ font-size:100%;
+
+}
+
+
+/* Matches the help text for a menu item */
+
+div.yuimenu li.hashelptext em.helptext {
+
+ font-style:normal;
+ margin:0 0 0 40px;
+
+}
+
+div.yuimenu li a,
+div.yuimenubar li a {
+
+ /*
+ "zoom:1" triggers "haslayout" in IE to ensure that the mouseover and
+ mouseout events bubble to the parent LI in IE.
+ */
+ zoom:1;
+ color:#000;
+ text-decoration:none;
+
+}
+
+div.yuimenu li.hassubmenu,
+div.yuimenu li.hashelptext {
+
+ text-align:right;
+
+}
+
+div.yuimenu li.hassubmenu a.hassubmenu,
+div.yuimenu li.hashelptext a.hashelptext {
+
+ /*
+ Need to apply float immediately for IE or help text will jump to the
+ next line
+ */
+
+ *float:left;
+ *display:inline; /* Prevent margin doubling in IE */
+ text-align:left;
+
+}
+
+div.yuimenu.visible li.hassubmenu a.hassubmenu,
+div.yuimenu.visible li.hashelptext a.hashelptext {
+
+ /*
+ Apply the float only when the menu is visible to prevent the help
+ text from wrapping to the next line in Opera.
+ */
+
+ float:left;
+
+}
+
+
+/* Matches selected menu items */
+
+div.yuimenu li.selected,
+div.yuimenubar li.selected {
+
+ background-color:#8c8ad0;
+
+}
+
+div.yuimenu li.selected a.selected,
+div.yuimenubar li.selected a.selected {
+
+ text-decoration:underline;
+
+}
+
+div.yuimenu li.selected a.selected,
+div.yuimenu li.selected em.selected,
+div.yuimenubar li.selected a.selected {
+
+ color:#fff;
+
+}
+
+
+/* Matches disabled menu items */
+
+div.yuimenu li.disabled,
+div.yuimenubar li.disabled {
+
+ cursor:default;
+
+}
+
+div.yuimenu li.disabled a.disabled,
+div.yuimenu li.disabled em.disabled,
+div.yuimenubar li.disabled a.disabled {
+
+ color:#b9b9b9;
+ cursor:default;
+
+}
+
+div.yuimenubar li.yuimenubaritem {
+
+ float:left;
+ display:inline; /* Prevent margin doubling in IE */
+ border-width:0 0 0 1px;
+ border-style:solid;
+ border-color:#c4c4be;
+ padding:4px 24px;
+ margin:0;
+
+}
+
+div.yuimenubar li.yuimenubaritem.first-of-type {
+
+ border-width:0;
+
+}
+
+
+/* Styles for the the submenu indicator for menu items */
+
+div.yuimenu li.hassubmenu em.submenuindicator,
+div.yuimenubar li.hassubmenu em.submenuindicator {
+
+ display:-moz-inline-box; /* Mozilla */
+ display:inline-block; /* IE, Opera and Safari */
+ vertical-align:middle;
+ height:8px;
+ width:8px;
+ text-indent:9px;
+ font:0/0 arial;
+ overflow:hidden;
+ background-image:url(map.gif);
+ background-repeat:no-repeat;
+
+}
+
+div.yuimenubar li.hassubmenu em.submenuindicator {
+
+ background-position:0 -24px;
+ margin:0 0 0 10px;
+
+}
+
+div.yuimenubar li.hassubmenu em.submenuindicator.selected {
+
+ background-position:0 -32px;
+
+}
+
+div.yuimenubar li.hassubmenu em.submenuindicator.disabled {
+
+ background-position:0 -40px;
+
+}
+
+div.yuimenu li.hassubmenu em.submenuindicator {
+
+ background-position:0 0;
+ margin:0 -16px 0 10px;
+
+}
+
+div.yuimenu li.hassubmenu em.submenuindicator.selected {
+
+ background-position:0 -8px;
+
+}
+
+div.yuimenu li.hassubmenu em.submenuindicator.disabled {
+
+ background-position:0 -16px;
+
+}
+
+
+/* Styles for a menu item's "checked" state */
+
+div.yuimenu li.checked {
+
+ position:relative;
+
+}
+
+div.yuimenu li.checked em.checkedindicator {
+
+ height:8px;
+ width:8px;
+ text-indent:9px;
+ overflow:hidden;
+ background-image:url(map.gif);
+ background-position:0 -48px;
+ background-repeat:no-repeat;
+ position:absolute;
+ left:6px;
+ _left:-16px; /* Underscore hack b/c this is for IE 6 only */
+ top:.5em;
+
+}
+
+div.yuimenu li.checked em.checkedindicator.selected {
+
+ background-position:0 -56px;
+
+}
+
+div.yuimenu li.checked em.checkedindicator.disabled {
+
+ background-position:0 -64px;
+
+}
\ No newline at end of file
Added: jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_dim_1.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_hov_1.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menuarodwn8_nrm_1.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menuarorght8_dim_1.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menuarorght8_hov_1.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menuarorght8_nrm_1.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menuaroup8_dim_1.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menuaroup8_nrm_1.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menuchk8_dim_1.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menuchk8_hov_1.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/share/web/static/css/yui/menu/menuchk8_nrm_1.gif
==============================================================================
Binary file. No diff available.
Modified: jifty/trunk/share/web/static/css/yui/tabview/border_tabs.css
==============================================================================
--- jifty/trunk/share/web/static/css/yui/tabview/border_tabs.css (original)
+++ jifty/trunk/share/web/static/css/yui/tabview/border_tabs.css Thu Apr 12 03:32:44 2007
@@ -1,44 +1,54 @@
-.yui-navset .yui-nav li a, .yui-navset .yui-content {
- border:1px solid #000; /* label and content borders */
-}
-
-.yui-navset .yui-nav .selected a, .yui-navset .yui-nav a:hover, .yui-navset .yui-content {
- background-color:#f6f7ee; /* active tab, tab hover, and content bgcolor */
-}
-
-.yui-navset-top .yui-nav .selected a {
- border-bottom:0; /* no bottom border for active tab */
- padding-bottom:1px; /* to match height of other tabs */
-}
-
-.yui-navset-top .yui-content {
- margin-top:-1px; /* for active tab overlap */
-}
-
-.yui-navset-bottom .yui-nav .selected a {
- border-top:0; /* no bottom border for active tab */
- padding-top:1px; /* to match height of other tabs */
-}
-
-.yui-navset-bottom .yui-content {
- margin-bottom:-1px; /* for active tab overlap */
-}
-
-.yui-navset-left .yui-nav li.selected a {
- border-right:0; /* no bottom border for active tab */
- padding-right:1px; /* to match height of other tabs */
-}
-
-.yui-navset-left .yui-content {
- margin-left:-1px; /* for active tab overlap */
-}
-
-.yui-navset-right .yui-nav li.selected a {
- border-left:0; /* no bottom border for active tab */
- padding-left:1px; /* to match height of other tabs */
-}
-
-.yui-navset-right .yui-content {
- margin-right:-1px; /* for active tab overlap */
- *margin-right:0; /* except IE */
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+.yui-navset .yui-nav li a, .yui-navset .yui-content {
+ border:1px solid #000; /* label and content borders */
+}
+
+.yui-navset .yui-nav .selected a, .yui-navset .yui-nav a:hover, .yui-navset .yui-content {
+ background-color:#f6f7ee; /* active tab, tab hover, and content bgcolor */
+}
+
+.yui-navset .yui-nav li em { padding:.5em; } /* tab padding */
+
+/* defaults to orientation "top" */
+.yui-navset .yui-nav .selected a {
+ border-bottom-width:0; /* no bottom border for active tab */
+ padding-bottom:1px; /* to match height of other tabs */
+}
+
+.yui-navset .yui-content {
+ margin-top:-1px; /* for active tab overlap */
+}
+
+/* overrides for other orientations */
+
+.yui-navset-bottom .yui-nav .selected a {
+ border-width:0 1px 1px; /* no top border for active tab */
+ padding:1px 0 0; /* to match height of other tabs */
+}
+
+.yui-navset-bottom .yui-content {
+ margin:0 0 -1px; /* for active tab overlap */
+}
+
+.yui-navset-left .yui-nav li.selected a {
+ border-width:1px 0 1px 1px; /* no right border for active tab */
+ padding:0 1px 0 0; /* to match width of other tabs */
+}
+
+.yui-navset-left .yui-content {
+ margin:0 0 0 -1px; /* for active tab overlap */
+}
+
+.yui-navset-right .yui-nav li.selected a {
+ border-width:1px 1px 1px 0; /* no left border for active tab */
+ padding:0 0 0 1px; /* to match width of other tabs */
+}
+
+.yui-navset-right .yui-content {
+ margin:0 -1px 0 0; /* for active tab overlap */
}
\ No newline at end of file
Modified: jifty/trunk/share/web/static/css/yui/tabview/tabs.css
==============================================================================
--- jifty/trunk/share/web/static/css/yui/tabview/tabs.css (original)
+++ jifty/trunk/share/web/static/css/yui/tabview/tabs.css Thu Apr 12 03:32:44 2007
@@ -1,3 +1,5 @@
+/* XXX: It is a older CSS file, please use tabview.css instead */
+
/* default space between tabs */
.yui-navset-top .yui-nav li, .yui-navset-bottom .yui-nav li {
margin-right:0.5em; /* horizontal tabs */
Added: jifty/trunk/share/web/static/css/yui/tabview/tabview.css
==============================================================================
--- (empty file)
+++ jifty/trunk/share/web/static/css/yui/tabview/tabview.css Thu Apr 12 03:32:44 2007
@@ -0,0 +1,75 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/* default space between tabs */
+.yui-navset .yui-nav li {
+ margin-right:0.5em; /* horizontal tabs */
+}
+.yui-navset-left .yui-nav li, .yui-navset-right .yui-nav li {
+ margin:0 0 0.5em; /* vertical tabs */
+}
+
+/* default width for side tabs */
+.yui-navset-left .yui-nav, .yui-navset-right .yui-nav { width:6em; }
+.yui-navset-left { padding-left:6em; } /* map to nav width */
+.yui-navset-right { padding-right:6em; } /* ditto */
+
+/* core */
+
+.yui-nav, .yui-nav li {
+ margin:0;
+ padding:0;
+ list-style:none;
+}
+.yui-navset li em { font-style:normal; }
+
+.yui-navset {
+ position:relative; /* contain absolute positioned tabs (left/right) */
+ zoom:1;
+}
+
+.yui-navset .yui-content { zoom:1; }
+
+.yui-navset .yui-nav li {
+ display:inline-block;
+ display:-moz-inline-stack;
+ *display:inline; /* IE */
+ vertical-align:bottom; /* safari: for overlap */
+ cursor:pointer; /* gecko: due to -moz-inline-stack on anchor */
+ zoom:1; /* IE: kill space between horizontal tabs */
+}
+
+.yui-navset-left .yui-nav li, .yui-navset-right .yui-nav li {
+ display:block;
+}
+
+.yui-navset .yui-nav a {
+ outline:0; /* gecko: keep from shifting */
+}
+
+.yui-navset .yui-nav a { position:relative; } /* IE: to allow overlap */
+
+.yui-navset .yui-nav li a {
+ display:block;
+ display:inline-block;
+ vertical-align:bottom; /* safari: for overlap */
+ zoom:1;
+}
+
+.yui-navset-left .yui-nav li a, .yui-navset-right .yui-nav li a {
+ display:block;
+}
+
+.yui-navset-bottom .yui-nav li a {
+ vertical-align:text-top; /* for inline overlap (reverse for Op border bug) */
+}
+
+.yui-navset .yui-nav li a em { display:block; }
+
+/* position left and right oriented tabs */
+.yui-navset-left .yui-nav, .yui-navset-right .yui-nav { position:absolute; z-index:1; }
+.yui-navset-left .yui-nav { left:0; }
+.yui-navset-right .yui-nav { right:0; }
Modified: jifty/trunk/share/web/static/js/yui/calendar.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/calendar.js (original)
+++ jifty/trunk/share/web/static/js/yui/calendar.js Thu Apr 12 03:32:44 2007
@@ -1,4255 +1,4547 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version 0.12.0
-*/
-
-/**
-* Config is a utility used within an Object to allow the implementer to maintain a list of local configuration properties and listen for changes to those properties dynamically using CustomEvent. The initial values are also maintained so that the configuration can be reset at any given point to its initial state.
-* @class YAHOO.util.Config
-* @constructor
-* @param {Object} owner The owner Object to which this Config Object belongs
-*/
-YAHOO.util.Config = function(owner) {
- if (owner) {
- this.init(owner);
- }
-};
-
-YAHOO.util.Config.prototype = {
-
- /**
- * Object reference to the owner of this Config Object
- * @property owner
- * @type Object
- */
- owner : null,
-
- /**
- * Boolean flag that specifies whether a queue is currently being executed
- * @property queueInProgress
- * @type Boolean
- */
- queueInProgress : false,
-
-
- /**
- * Validates that the value passed in is a Boolean.
- * @method checkBoolean
- * @param {Object} val The value to validate
- * @return {Boolean} true, if the value is valid
- */
- checkBoolean: function(val) {
- if (typeof val == 'boolean') {
- return true;
- } else {
- return false;
- }
- },
-
- /**
- * Validates that the value passed in is a number.
- * @method checkNumber
- * @param {Object} val The value to validate
- * @return {Boolean} true, if the value is valid
- */
- checkNumber: function(val) {
- if (isNaN(val)) {
- return false;
- } else {
- return true;
- }
- }
-};
-
-
-/**
-* Initializes the configuration Object and all of its local members.
-* @method init
-* @param {Object} owner The owner Object to which this Config Object belongs
-*/
-YAHOO.util.Config.prototype.init = function(owner) {
-
- this.owner = owner;
-
- /**
- * Object reference to the owner of this Config Object
- * @event configChangedEvent
- */
- this.configChangedEvent = new YAHOO.util.CustomEvent("configChanged");
-
- this.queueInProgress = false;
-
- /* Private Members */
-
- /**
- * Maintains the local collection of configuration property objects and their specified values
- * @property config
- * @private
- * @type Object
- */
- var config = {};
-
- /**
- * Maintains the local collection of configuration property objects as they were initially applied.
- * This object is used when resetting a property.
- * @property initialConfig
- * @private
- * @type Object
- */
- var initialConfig = {};
-
- /**
- * Maintains the local, normalized CustomEvent queue
- * @property eventQueue
- * @private
- * @type Object
- */
- var eventQueue = [];
-
- /**
- * Fires a configuration property event using the specified value.
- * @method fireEvent
- * @private
- * @param {String} key The configuration property's name
- * @param {value} Object The value of the correct type for the property
- */
- var fireEvent = function( key, value ) {
- key = key.toLowerCase();
-
- var property = config[key];
-
- if (typeof property != 'undefined' && property.event) {
- property.event.fire(value);
- }
- };
- /* End Private Members */
-
- /**
- * Adds a property to the Config Object's private config hash.
- * @method addProperty
- * @param {String} key The configuration property's name
- * @param {Object} propertyObject The Object containing all of this property's arguments
- */
- this.addProperty = function( key, propertyObject ) {
- key = key.toLowerCase();
-
- config[key] = propertyObject;
-
- propertyObject.event = new YAHOO.util.CustomEvent(key);
- propertyObject.key = key;
-
- if (propertyObject.handler) {
- propertyObject.event.subscribe(propertyObject.handler, this.owner, true);
- }
-
- this.setProperty(key, propertyObject.value, true);
-
- if (! propertyObject.suppressEvent) {
- this.queueProperty(key, propertyObject.value);
- }
- };
-
- /**
- * Returns a key-value configuration map of the values currently set in the Config Object.
- * @method getConfig
- * @return {Object} The current config, represented in a key-value map
- */
- this.getConfig = function() {
- var cfg = {};
-
- for (var prop in config) {
- var property = config[prop];
- if (typeof property != 'undefined' && property.event) {
- cfg[prop] = property.value;
- }
- }
-
- return cfg;
- };
-
- /**
- * Returns the value of specified property.
- * @method getProperty
- * @param {String} key The name of the property
- * @return {Object} The value of the specified property
- */
- this.getProperty = function(key) {
- key = key.toLowerCase();
-
- var property = config[key];
- if (typeof property != 'undefined' && property.event) {
- return property.value;
- } else {
- return undefined;
- }
- };
-
- /**
- * Resets the specified property's value to its initial value.
- * @method resetProperty
- * @param {String} key The name of the property
- * @return {Boolean} True is the property was reset, false if not
- */
- this.resetProperty = function(key) {
- key = key.toLowerCase();
-
- var property = config[key];
- if (typeof property != 'undefined' && property.event) {
- if (initialConfig[key] && initialConfig[key] != 'undefined') {
- this.setProperty(key, initialConfig[key]);
- }
- return true;
- } else {
- return false;
- }
- };
-
- /**
- * Sets the value of a property. If the silent property is passed as true, the property's event will not be fired.
- * @method setProperty
- * @param {String} key The name of the property
- * @param {String} value The value to set the property to
- * @param {Boolean} silent Whether the value should be set silently, without firing the property event.
- * @return {Boolean} True, if the set was successful, false if it failed.
- */
- this.setProperty = function(key, value, silent) {
- key = key.toLowerCase();
-
- if (this.queueInProgress && ! silent) {
- this.queueProperty(key,value); // Currently running through a queue...
- return true;
- } else {
- var property = config[key];
- if (typeof property != 'undefined' && property.event) {
- if (property.validator && ! property.validator(value)) { // validator
- return false;
- } else {
- property.value = value;
- if (! silent) {
- fireEvent(key, value);
- this.configChangedEvent.fire([key, value]);
- }
- return true;
- }
- } else {
- return false;
- }
- }
- };
-
- /**
- * Sets the value of a property and queues its event to execute. If the event is already scheduled to execute, it is
- * moved from its current position to the end of the queue.
- * @method queueProperty
- * @param {String} key The name of the property
- * @param {String} value The value to set the property to
- * @return {Boolean} true, if the set was successful, false if it failed.
- */
- this.queueProperty = function(key, value) {
- key = key.toLowerCase();
-
- var property = config[key];
-
- if (typeof property != 'undefined' && property.event) {
- if (typeof value != 'undefined' && property.validator && ! property.validator(value)) { // validator
- return false;
- } else {
-
- if (typeof value != 'undefined') {
- property.value = value;
- } else {
- value = property.value;
- }
-
- var foundDuplicate = false;
-
- for (var i=0;i 11) {
- while (newMonth > 11) {
- newMonth -= 12;
- years += 1;
- }
- }
-
- d.setMonth(newMonth);
- d.setFullYear(date.getFullYear() + years);
- break;
- case this.DAY:
- d.setDate(date.getDate() + amount);
- break;
- case this.YEAR:
- d.setFullYear(date.getFullYear() + amount);
- break;
- case this.WEEK:
- d.setDate(date.getDate() + (amount * 7));
- break;
- }
- return d;
- },
-
- /**
- * Subtracts the specified amount of time from the this instance.
- * @method subtract
- * @param {Date} date The JavaScript Date object to perform subtraction on
- * @param {Number} field The this field constant to be used for performing subtraction.
- * @param {Number} amount The number of units (measured in the field constant) to subtract from the date.
- * @return {Date} The resulting Date object
- */
- subtract : function(date, field, amount) {
- return this.add(date, field, (amount*-1));
- },
-
- /**
- * Determines whether a given date is before another date on the calendar.
- * @method before
- * @param {Date} date The Date object to compare with the compare argument
- * @param {Date} compareTo The Date object to use for the comparison
- * @return {Boolean} true if the date occurs before the compared date; false if not.
- */
- before : function(date, compareTo) {
- var ms = compareTo.getTime();
- if (date.getTime() < ms) {
- return true;
- } else {
- return false;
- }
- },
-
- /**
- * Determines whether a given date is after another date on the calendar.
- * @method after
- * @param {Date} date The Date object to compare with the compare argument
- * @param {Date} compareTo The Date object to use for the comparison
- * @return {Boolean} true if the date occurs after the compared date; false if not.
- */
- after : function(date, compareTo) {
- var ms = compareTo.getTime();
- if (date.getTime() > ms) {
- return true;
- } else {
- return false;
- }
- },
-
- /**
- * Determines whether a given date is between two other dates on the calendar.
- * @method between
- * @param {Date} date The date to check for
- * @param {Date} dateBegin The start of the range
- * @param {Date} dateEnd The end of the range
- * @return {Boolean} true if the date occurs between the compared dates; false if not.
- */
- between : function(date, dateBegin, dateEnd) {
- if (this.after(date, dateBegin) && this.before(date, dateEnd)) {
- return true;
- } else {
- return false;
- }
- },
-
- /**
- * Retrieves a JavaScript Date object representing January 1 of any given year.
- * @method getJan1
- * @param {Number} calendarYear The calendar year for which to retrieve January 1
- * @return {Date} January 1 of the calendar year specified.
- */
- getJan1 : function(calendarYear) {
- return new Date(calendarYear,0,1);
- },
-
- /**
- * Calculates the number of days the specified date is from January 1 of the specified calendar year.
- * Passing January 1 to this function would return an offset value of zero.
- * @method getDayOffset
- * @param {Date} date The JavaScript date for which to find the offset
- * @param {Number} calendarYear The calendar year to use for determining the offset
- * @return {Number} The number of days since January 1 of the given year
- */
- getDayOffset : function(date, calendarYear) {
- var beginYear = this.getJan1(calendarYear); // Find the start of the year. This will be in week 1.
-
- // Find the number of days the passed in date is away from the calendar year start
- var dayOffset = Math.ceil((date.getTime()-beginYear.getTime()) / this.ONE_DAY_MS);
- return dayOffset;
- },
-
- /**
- * Calculates the week number for the given date. This function assumes that week 1 is the
- * week in which January 1 appears, regardless of whether the week consists of a full 7 days.
- * The calendar year can be specified to help find what a the week number would be for a given
- * date if the date overlaps years. For instance, a week may be considered week 1 of 2005, or
- * week 53 of 2004. Specifying the optional calendarYear allows one to make this distinction
- * easily.
- * @method getWeekNumber
- * @param {Date} date The JavaScript date for which to find the week number
- * @param {Number} calendarYear OPTIONAL - The calendar year to use for determining the week number. Default is
- * the calendar year of parameter "date".
- * @param {Number} weekStartsOn OPTIONAL - The integer (0-6) representing which day a week begins on. Default is 0 (for Sunday).
- * @return {Number} The week number of the given date.
- */
- getWeekNumber : function(date, calendarYear) {
- date = this.clearTime(date);
- var nearestThurs = new Date(date.getTime() + (4 * this.ONE_DAY_MS) - ((date.getDay()) * this.ONE_DAY_MS));
-
- var jan1 = new Date(nearestThurs.getFullYear(),0,1);
- var dayOfYear = ((nearestThurs.getTime() - jan1.getTime()) / this.ONE_DAY_MS) - 1;
-
- var weekNum = Math.ceil((dayOfYear)/ 7);
- return weekNum;
- },
-
- /**
- * Determines if a given week overlaps two different years.
- * @method isYearOverlapWeek
- * @param {Date} weekBeginDate The JavaScript Date representing the first day of the week.
- * @return {Boolean} true if the date overlaps two different years.
- */
- isYearOverlapWeek : function(weekBeginDate) {
- var overlaps = false;
- var nextWeek = this.add(weekBeginDate, this.DAY, 6);
- if (nextWeek.getFullYear() != weekBeginDate.getFullYear()) {
- overlaps = true;
- }
- return overlaps;
- },
-
- /**
- * Determines if a given week overlaps two different months.
- * @method isMonthOverlapWeek
- * @param {Date} weekBeginDate The JavaScript Date representing the first day of the week.
- * @return {Boolean} true if the date overlaps two different months.
- */
- isMonthOverlapWeek : function(weekBeginDate) {
- var overlaps = false;
- var nextWeek = this.add(weekBeginDate, this.DAY, 6);
- if (nextWeek.getMonth() != weekBeginDate.getMonth()) {
- overlaps = true;
- }
- return overlaps;
- },
-
- /**
- * Gets the first day of a month containing a given date.
- * @method findMonthStart
- * @param {Date} date The JavaScript Date used to calculate the month start
- * @return {Date} The JavaScript Date representing the first day of the month
- */
- findMonthStart : function(date) {
- var start = new Date(date.getFullYear(), date.getMonth(), 1);
- return start;
- },
-
- /**
- * Gets the last day of a month containing a given date.
- * @method findMonthEnd
- * @param {Date} date The JavaScript Date used to calculate the month end
- * @return {Date} The JavaScript Date representing the last day of the month
- */
- findMonthEnd : function(date) {
- var start = this.findMonthStart(date);
- var nextMonth = this.add(start, this.MONTH, 1);
- var end = this.subtract(nextMonth, this.DAY, 1);
- return end;
- },
-
- /**
- * Clears the time fields from a given date, effectively setting the time to midnight.
- * @method clearTime
- * @param {Date} date The JavaScript Date for which the time fields will be cleared
- * @return {Date} The JavaScript Date cleared of all time fields
- */
- clearTime : function(date) {
- date.setHours(12,0,0,0);
- return date;
- }
-};
-
-/**
-* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month ("one-up") or two-month ("two-up") interface. Calendars are generated entirely via script and can be navigated without any page refreshes.
-* @module Calendar
-* @title Calendar Widget
-* @namespace YAHOO.widget
-* @requires yahoo,dom,event
-*/
-
-/**
-* Calendar is the base class for the Calendar widget. In its most basic
-* implementation, it has the ability to render a calendar widget on the page
-* that can be manipulated to select a single date, move back and forth between
-* months and years.
-* To construct the placeholder for the calendar widget, the code is as
-* follows:
-*
-*
-*
-* Note that the table can be replaced with any kind of element.
-*
-* @namespace YAHOO.widget
-* @class Calendar
-* @constructor
-* @param {String} id The id of the table element that will represent the calendar widget
-* @param {String} containerId The id of the container div element that will wrap the calendar table
-* @param {Object} config The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.Calendar = function(id, containerId, config) {
- this.init(id, containerId, config);
-};
-
-/**
-* The path to be used for images loaded for the Calendar
-* @property YAHOO.widget.Calendar.IMG_ROOT
-* @static
-* @type String
-*/
-YAHOO.widget.Calendar.IMG_ROOT = (window.location.href.toLowerCase().indexOf("https") === 0 ? "https://a248.e.akamai.net/sec.yimg.com/i/" : "http://us.i1.yimg.com/us.yimg.com/i/");
-
-/**
-* Type constant used for renderers to represent an individual date (M/D/Y)
-* @property YAHOO.widget.Calendar.DATE
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.DATE = "D";
-
-/**
-* Type constant used for renderers to represent an individual date across any year (M/D)
-* @property YAHOO.widget.Calendar.MONTH_DAY
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.MONTH_DAY = "MD";
-
-/**
-* Type constant used for renderers to represent a weekday
-* @property YAHOO.widget.Calendar.WEEKDAY
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.WEEKDAY = "WD";
-
-/**
-* Type constant used for renderers to represent a range of individual dates (M/D/Y-M/D/Y)
-* @property YAHOO.widget.Calendar.RANGE
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.RANGE = "R";
-
-/**
-* Type constant used for renderers to represent a month across any year
-* @property YAHOO.widget.Calendar.MONTH
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.MONTH = "M";
-
-/**
-* Constant that represents the total number of date cells that are displayed in a given month
-* @property YAHOO.widget.Calendar.DISPLAY_DAYS
-* @static
-* @final
-* @type Number
-*/
-YAHOO.widget.Calendar.DISPLAY_DAYS = 42;
-
-/**
-* Constant used for halting the execution of the remainder of the render stack
-* @property YAHOO.widget.Calendar.STOP_RENDER
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Calendar.STOP_RENDER = "S";
-
-YAHOO.widget.Calendar.prototype = {
-
- /**
- * The configuration object used to set up the calendars various locale and style options.
- * @property Config
- * @private
- * @deprecated Configuration properties should be set by calling Calendar.cfg.setProperty.
- * @type Object
- */
- Config : null,
-
- /**
- * The parent CalendarGroup, only to be set explicitly by the parent group
- * @property parent
- * @type CalendarGroup
- */
- parent : null,
-
- /**
- * The index of this item in the parent group
- * @property index
- * @type Number
- */
- index : -1,
-
- /**
- * The collection of calendar table cells
- * @property cells
- * @type HTMLTableCellElement[]
- */
- cells : null,
-
- /**
- * The collection of calendar cell dates that is parallel to the cells collection. The array contains dates field arrays in the format of [YYYY, M, D].
- * @property cellDates
- * @type Array[](Number[])
- */
- cellDates : null,
-
- /**
- * The id that uniquely identifies this calendar. This id should match the id of the placeholder element on the page.
- * @property id
- * @type String
- */
- id : null,
-
- /**
- * The DOM element reference that points to this calendar's container element. The calendar will be inserted into this element when the shell is rendered.
- * @property oDomContainer
- * @type HTMLElement
- */
- oDomContainer : null,
-
- /**
- * A Date object representing today's date.
- * @property today
- * @type Date
- */
- today : null,
-
- /**
- * The list of render functions, along with required parameters, used to render cells.
- * @property renderStack
- * @type Array[]
- */
- renderStack : null,
-
- /**
- * A copy of the initial render functions created before rendering.
- * @property _renderStack
- * @private
- * @type Array
- */
- _renderStack : null,
-
- /**
- * A Date object representing the month/year that the calendar is initially set to
- * @property _pageDate
- * @private
- * @type Date
- */
- _pageDate : null,
-
- /**
- * The private list of initially selected dates.
- * @property _selectedDates
- * @private
- * @type Array
- */
- _selectedDates : null,
-
- /**
- * A map of DOM event handlers to attach to cells associated with specific CSS class names
- * @property domEventMap
- * @type Object
- */
- domEventMap : null
-};
-
-
-
-/**
-* Initializes the Calendar widget.
-* @method init
-* @param {String} id The id of the table element that will represent the calendar widget
-* @param {String} containerId The id of the container div element that will wrap the calendar table
-* @param {Object} config The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.Calendar.prototype.init = function(id, containerId, config) {
- this.initEvents();
- this.today = new Date();
- YAHOO.widget.DateMath.clearTime(this.today);
-
- this.id = id;
- this.oDomContainer = document.getElementById(containerId);
-
- /**
- * The Config object used to hold the configuration variables for the Calendar
- * @property cfg
- * @type YAHOO.util.Config
- */
- this.cfg = new YAHOO.util.Config(this);
-
- /**
- * The local object which contains the Calendar's options
- * @property Options
- * @type Object
- */
- this.Options = {};
-
- /**
- * The local object which contains the Calendar's locale settings
- * @property Locale
- * @type Object
- */
- this.Locale = {};
-
- this.initStyles();
-
- YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER);
- YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE);
-
- this.cellDates = [];
- this.cells = [];
- this.renderStack = [];
- this._renderStack = [];
-
- this.setupConfig();
-
- if (config) {
- this.cfg.applyConfig(config, true);
- }
-
- this.cfg.fireQueue();
-};
-
-/**
-* Renders the built-in IFRAME shim for the IE6 and below
-* @method configIframe
-*/
-YAHOO.widget.Calendar.prototype.configIframe = function(type, args, obj) {
- var useIframe = args[0];
-
- if (YAHOO.util.Dom.inDocument(this.oDomContainer)) {
- if (useIframe) {
- var pos = YAHOO.util.Dom.getStyle(this.oDomContainer, "position");
-
- if (this.browser == "ie" && (pos == "absolute" || pos == "relative")) {
- if (! YAHOO.util.Dom.inDocument(this.iframe)) {
- this.iframe = document.createElement("iframe");
- this.iframe.src = "javascript:false;";
- YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
- this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
- }
- }
- } else {
- if (this.iframe) {
- if (this.iframe.parentNode) {
- this.iframe.parentNode.removeChild(this.iframe);
- }
- this.iframe = null;
- }
- }
- }
-};
-
-/**
-* Default handler for the "title" property
-* @method configTitle
-*/
-YAHOO.widget.Calendar.prototype.configTitle = function(type, args, obj) {
- var title = args[0];
- var close = this.cfg.getProperty("close");
-
- var titleDiv;
-
- if (title && title !== "") {
- titleDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div");
- titleDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE;
- titleDiv.innerHTML = title;
- this.oDomContainer.insertBefore(titleDiv, this.oDomContainer.firstChild);
- YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
- } else {
- titleDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null;
-
- if (titleDiv) {
- YAHOO.util.Event.purgeElement(titleDiv);
- this.oDomContainer.removeChild(titleDiv);
- }
- if (! close) {
- YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
- }
- }
-};
-
-/**
-* Default handler for the "close" property
-* @method configClose
-*/
-YAHOO.widget.Calendar.prototype.configClose = function(type, args, obj) {
- var close = args[0];
- var title = this.cfg.getProperty("title");
-
- var linkClose;
-
- if (close === true) {
- linkClose = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || document.createElement("a");
- linkClose.href = "javascript:void(null);";
- linkClose.className = "link-close";
- YAHOO.util.Event.addListener(linkClose, "click", this.hide, this, true);
- var imgClose = document.createElement("img");
- imgClose.src = YAHOO.widget.Calendar.IMG_ROOT + "us/my/bn/x_d.gif";
- imgClose.className = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE;
- linkClose.appendChild(imgClose);
- this.oDomContainer.appendChild(linkClose);
- YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
- } else {
- linkClose = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || null;
-
- if (linkClose) {
- YAHOO.util.Event.purgeElement(linkClose);
- this.oDomContainer.removeChild(linkClose);
- }
- if (! title || title === "") {
- YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
- }
- }
-};
-
-/**
-* Initializes Calendar's built-in CustomEvents
-* @method initEvents
-*/
-YAHOO.widget.Calendar.prototype.initEvents = function() {
-
- /**
- * Fired before a selection is made
- * @event beforeSelectEvent
- */
- this.beforeSelectEvent = new YAHOO.util.CustomEvent("beforeSelect");
-
- /**
- * Fired when a selection is made
- * @event selectEvent
- * @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
- */
- this.selectEvent = new YAHOO.util.CustomEvent("select");
-
- /**
- * Fired before a selection is made
- * @event beforeDeselectEvent
- */
- this.beforeDeselectEvent = new YAHOO.util.CustomEvent("beforeDeselect");
-
- /**
- * Fired when a selection is made
- * @event deselectEvent
- * @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
- */
- this.deselectEvent = new YAHOO.util.CustomEvent("deselect");
-
- /**
- * Fired when the Calendar page is changed
- * @event changePageEvent
- */
- this.changePageEvent = new YAHOO.util.CustomEvent("changePage");
-
- /**
- * Fired before the Calendar is rendered
- * @event beforeRenderEvent
- */
- this.beforeRenderEvent = new YAHOO.util.CustomEvent("beforeRender");
-
- /**
- * Fired when the Calendar is rendered
- * @event renderEvent
- */
- this.renderEvent = new YAHOO.util.CustomEvent("render");
-
- /**
- * Fired when the Calendar is reset
- * @event resetEvent
- */
- this.resetEvent = new YAHOO.util.CustomEvent("reset");
-
- /**
- * Fired when the Calendar is cleared
- * @event clearEvent
- */
- this.clearEvent = new YAHOO.util.CustomEvent("clear");
-
- this.beforeSelectEvent.subscribe(this.onBeforeSelect, this, true);
- this.selectEvent.subscribe(this.onSelect, this, true);
- this.beforeDeselectEvent.subscribe(this.onBeforeDeselect, this, true);
- this.deselectEvent.subscribe(this.onDeselect, this, true);
- this.changePageEvent.subscribe(this.onChangePage, this, true);
- this.renderEvent.subscribe(this.onRender, this, true);
- this.resetEvent.subscribe(this.onReset, this, true);
- this.clearEvent.subscribe(this.onClear, this, true);
-};
-
-
-/**
-* The default event function that is attached to a date link within a calendar cell
-* when the calendar is rendered.
-* @method doSelectCell
-* @param {DOMEvent} e The event
-* @param {Calendar} cal A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doSelectCell = function(e, cal) {
- var target = YAHOO.util.Event.getTarget(e);
-
- var cell,index,d,date;
-
- while (target.tagName.toLowerCase() != "td" && ! YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
- target = target.parentNode;
- if (target.tagName.toLowerCase() == "html") {
- return;
- }
- }
-
- cell = target;
-
- if (YAHOO.util.Dom.hasClass(cell, cal.Style.CSS_CELL_SELECTABLE)) {
- index = cell.id.split("cell")[1];
- d = cal.cellDates[index];
- date = new Date(d[0],d[1]-1,d[2]);
-
- var link;
-
- if (cal.Options.MULTI_SELECT) {
- link = cell.getElementsByTagName("a")[0];
- if (link) {
- link.blur();
- }
-
- var cellDate = cal.cellDates[index];
- var cellDateIndex = cal._indexOfSelectedFieldArray(cellDate);
-
- if (cellDateIndex > -1) {
- cal.deselectCell(index);
- } else {
- cal.selectCell(index);
- }
-
- } else {
- link = cell.getElementsByTagName("a")[0];
- if (link) {
- link.blur();
- }
- cal.selectCell(index);
- }
- }
-};
-
-/**
-* The event that is executed when the user hovers over a cell
-* @method doCellMouseOver
-* @param {DOMEvent} e The event
-* @param {Calendar} cal A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doCellMouseOver = function(e, cal) {
- var target;
- if (e) {
- target = YAHOO.util.Event.getTarget(e);
- } else {
- target = this;
- }
-
- while (target.tagName.toLowerCase() != "td") {
- target = target.parentNode;
- if (target.tagName.toLowerCase() == "html") {
- return;
- }
- }
-
- if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
- YAHOO.util.Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
- }
-};
-
-/**
-* The event that is executed when the user moves the mouse out of a cell
-* @method doCellMouseOut
-* @param {DOMEvent} e The event
-* @param {Calendar} cal A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doCellMouseOut = function(e, cal) {
- var target;
- if (e) {
- target = YAHOO.util.Event.getTarget(e);
- } else {
- target = this;
- }
-
- while (target.tagName.toLowerCase() != "td") {
- target = target.parentNode;
- if (target.tagName.toLowerCase() == "html") {
- return;
- }
- }
-
- if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
- YAHOO.util.Dom.removeClass(target, cal.Style.CSS_CELL_HOVER);
- }
-};
-
-YAHOO.widget.Calendar.prototype.setupConfig = function() {
-
- /**
- * The month/year representing the current visible Calendar date (mm/yyyy)
- * @config pagedate
- * @type String
- * @default today's date
- */
- this.cfg.addProperty("pagedate", { value:new Date(), handler:this.configPageDate } );
-
- /**
- * The date or range of dates representing the current Calendar selection
- * @config selected
- * @type String
- * @default []
- */
- this.cfg.addProperty("selected", { value:[], handler:this.configSelected } );
-
- /**
- * The title to display above the Calendar's month header
- * @config title
- * @type String
- * @default ""
- */
- this.cfg.addProperty("title", { value:"", handler:this.configTitle } );
-
- /**
- * Whether or not a close button should be displayed for this Calendar
- * @config close
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("close", { value:false, handler:this.configClose } );
-
- /**
- * Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
- * @config iframe
- * @type Boolean
- * @default true
- */
- this.cfg.addProperty("iframe", { value:true, handler:this.configIframe, validator:this.cfg.checkBoolean } );
-
- /**
- * The minimum selectable date in the current Calendar (mm/dd/yyyy)
- * @config mindate
- * @type String
- * @default null
- */
- this.cfg.addProperty("mindate", { value:null, handler:this.configMinDate } );
-
- /**
- * The maximum selectable date in the current Calendar (mm/dd/yyyy)
- * @config maxdate
- * @type String
- * @default null
- */
- this.cfg.addProperty("maxdate", { value:null, handler:this.configMaxDate } );
-
-
- // Options properties
-
- /**
- * True if the Calendar should allow multiple selections. False by default.
- * @config MULTI_SELECT
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("MULTI_SELECT", { value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
- /**
- * True if the Calendar should allow selection of out-of-month dates. False by default.
- * @config OOM_SELECT
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("OOM_SELECT", { value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
- /**
- * The weekday the week begins on. Default is 0 (Sunday).
- * @config START_WEEKDAY
- * @type number
- * @default 0
- */
- this.cfg.addProperty("START_WEEKDAY", { value:0, handler:this.configOptions, validator:this.cfg.checkNumber } );
-
- /**
- * True if the Calendar should show weekday labels. True by default.
- * @config SHOW_WEEKDAYS
- * @type Boolean
- * @default true
- */
- this.cfg.addProperty("SHOW_WEEKDAYS", { value:true, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
- /**
- * True if the Calendar should show week row headers. False by default.
- * @config SHOW_WEEK_HEADER
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("SHOW_WEEK_HEADER",{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
- /**
- * True if the Calendar should show week row footers. False by default.
- * @config SHOW_WEEK_FOOTER
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("SHOW_WEEK_FOOTER",{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
- /**
- * True if the Calendar should suppress weeks that are not a part of the current month. False by default.
- * @config HIDE_BLANK_WEEKS
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("HIDE_BLANK_WEEKS",{ value:false, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
- /**
- * The image that should be used for the left navigation arrow.
- * @config NAV_ARROW_LEFT
- * @type String
- * @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif"
- */
- this.cfg.addProperty("NAV_ARROW_LEFT", { value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif", handler:this.configOptions } );
-
- /**
- * The image that should be used for the left navigation arrow.
- * @config NAV_ARROW_RIGHT
- * @type String
- * @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif"
- */
- this.cfg.addProperty("NAV_ARROW_RIGHT", { value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif", handler:this.configOptions } );
-
- // Locale properties
-
- /**
- * The short month labels for the current locale.
- * @config MONTHS_SHORT
- * @type String[]
- * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
- */
- this.cfg.addProperty("MONTHS_SHORT", { value:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], handler:this.configLocale } );
-
- /**
- * The long month labels for the current locale.
- * @config MONTHS_LONG
- * @type String[]
- * @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
- */
- this.cfg.addProperty("MONTHS_LONG", { value:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], handler:this.configLocale } );
-
- /**
- * The 1-character weekday labels for the current locale.
- * @config WEEKDAYS_1CHAR
- * @type String[]
- * @default ["S", "M", "T", "W", "T", "F", "S"]
- */
- this.cfg.addProperty("WEEKDAYS_1CHAR", { value:["S", "M", "T", "W", "T", "F", "S"], handler:this.configLocale } );
-
- /**
- * The short weekday labels for the current locale.
- * @config WEEKDAYS_SHORT
- * @type String[]
- * @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
- */
- this.cfg.addProperty("WEEKDAYS_SHORT", { value:["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], handler:this.configLocale } );
-
- /**
- * The medium weekday labels for the current locale.
- * @config WEEKDAYS_MEDIUM
- * @type String[]
- * @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
- */
- this.cfg.addProperty("WEEKDAYS_MEDIUM", { value:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], handler:this.configLocale } );
-
- /**
- * The long weekday labels for the current locale.
- * @config WEEKDAYS_LONG
- * @type String[]
- * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
- */
- this.cfg.addProperty("WEEKDAYS_LONG", { value:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], handler:this.configLocale } );
-
- /**
- * Refreshes the locale values used to build the Calendar.
- * @method refreshLocale
- * @private
- */
- var refreshLocale = function() {
- this.cfg.refireEvent("LOCALE_MONTHS");
- this.cfg.refireEvent("LOCALE_WEEKDAYS");
- };
-
- this.cfg.subscribeToConfigEvent("START_WEEKDAY", refreshLocale, this, true);
- this.cfg.subscribeToConfigEvent("MONTHS_SHORT", refreshLocale, this, true);
- this.cfg.subscribeToConfigEvent("MONTHS_LONG", refreshLocale, this, true);
- this.cfg.subscribeToConfigEvent("WEEKDAYS_1CHAR", refreshLocale, this, true);
- this.cfg.subscribeToConfigEvent("WEEKDAYS_SHORT", refreshLocale, this, true);
- this.cfg.subscribeToConfigEvent("WEEKDAYS_MEDIUM", refreshLocale, this, true);
- this.cfg.subscribeToConfigEvent("WEEKDAYS_LONG", refreshLocale, this, true);
-
- /**
- * The setting that determines which length of month labels should be used. Possible values are "short" and "long".
- * @config LOCALE_MONTHS
- * @type String
- * @default "long"
- */
- this.cfg.addProperty("LOCALE_MONTHS", { value:"long", handler:this.configLocaleValues } );
-
- /**
- * The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
- * @config LOCALE_WEEKDAYS
- * @type String
- * @default "short"
- */
- this.cfg.addProperty("LOCALE_WEEKDAYS", { value:"short", handler:this.configLocaleValues } );
-
- /**
- * The value used to delimit individual dates in a date string passed to various Calendar functions.
- * @config DATE_DELIMITER
- * @type String
- * @default ","
- */
- this.cfg.addProperty("DATE_DELIMITER", { value:",", handler:this.configLocale } );
-
- /**
- * The value used to delimit date fields in a date string passed to various Calendar functions.
- * @config DATE_FIELD_DELIMITER
- * @type String
- * @default "/"
- */
- this.cfg.addProperty("DATE_FIELD_DELIMITER",{ value:"/", handler:this.configLocale } );
-
- /**
- * The value used to delimit date ranges in a date string passed to various Calendar functions.
- * @config DATE_RANGE_DELIMITER
- * @type String
- * @default "-"
- */
- this.cfg.addProperty("DATE_RANGE_DELIMITER",{ value:"-", handler:this.configLocale } );
-
- /**
- * The position of the month in a month/year date string
- * @config MY_MONTH_POSITION
- * @type Number
- * @default 1
- */
- this.cfg.addProperty("MY_MONTH_POSITION", { value:1, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the year in a month/year date string
- * @config MY_YEAR_POSITION
- * @type Number
- * @default 2
- */
- this.cfg.addProperty("MY_YEAR_POSITION", { value:2, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the month in a month/day date string
- * @config MD_MONTH_POSITION
- * @type Number
- * @default 1
- */
- this.cfg.addProperty("MD_MONTH_POSITION", { value:1, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the day in a month/year date string
- * @config MD_DAY_POSITION
- * @type Number
- * @default 2
- */
- this.cfg.addProperty("MD_DAY_POSITION", { value:2, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the month in a month/day/year date string
- * @config MDY_MONTH_POSITION
- * @type Number
- * @default 1
- */
- this.cfg.addProperty("MDY_MONTH_POSITION", { value:1, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the day in a month/day/year date string
- * @config MDY_DAY_POSITION
- * @type Number
- * @default 2
- */
- this.cfg.addProperty("MDY_DAY_POSITION", { value:2, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the year in a month/day/year date string
- * @config MDY_YEAR_POSITION
- * @type Number
- * @default 3
- */
- this.cfg.addProperty("MDY_YEAR_POSITION", { value:3, handler:this.configLocale, validator:this.cfg.checkNumber } );
-};
-
-/**
-* The default handler for the "pagedate" property
-* @method configPageDate
-*/
-YAHOO.widget.Calendar.prototype.configPageDate = function(type, args, obj) {
- var val = args[0];
- var month, year, aMonthYear;
-
- if (val) {
- if (val instanceof Date) {
- val = YAHOO.widget.DateMath.findMonthStart(val);
- this.cfg.setProperty("pagedate", val, true);
- if (! this._pageDate) {
- this._pageDate = this.cfg.getProperty("pagedate");
- }
- return;
- } else {
- aMonthYear = val.split(this.cfg.getProperty("DATE_FIELD_DELIMITER"));
- month = parseInt(aMonthYear[this.cfg.getProperty("MY_MONTH_POSITION")-1], 10)-1;
- year = parseInt(aMonthYear[this.cfg.getProperty("MY_YEAR_POSITION")-1], 10);
- }
- } else {
- month = this.today.getMonth();
- year = this.today.getFullYear();
- }
-
- this.cfg.setProperty("pagedate", new Date(year, month, 1), true);
- if (! this._pageDate) {
- this._pageDate = this.cfg.getProperty("pagedate");
- }
-};
-
-/**
-* The default handler for the "mindate" property
-* @method configMinDate
-*/
-YAHOO.widget.Calendar.prototype.configMinDate = function(type, args, obj) {
- var val = args[0];
- if (typeof val == 'string') {
- val = this._parseDate(val);
- this.cfg.setProperty("mindate", new Date(val[0],(val[1]-1),val[2]));
- }
-};
-
-/**
-* The default handler for the "maxdate" property
-* @method configMaxDate
-*/
-YAHOO.widget.Calendar.prototype.configMaxDate = function(type, args, obj) {
- var val = args[0];
- if (typeof val == 'string') {
- val = this._parseDate(val);
- this.cfg.setProperty("maxdate", new Date(val[0],(val[1]-1),val[2]));
- }
-};
-
-/**
-* The default handler for the "selected" property
-* @method configSelected
-*/
-YAHOO.widget.Calendar.prototype.configSelected = function(type, args, obj) {
- var selected = args[0];
-
- if (selected) {
- if (typeof selected == 'string') {
- this.cfg.setProperty("selected", this._parseDates(selected), true);
- }
- }
- if (! this._selectedDates) {
- this._selectedDates = this.cfg.getProperty("selected");
- }
-};
-
-/**
-* The default handler for all configuration options properties
-* @method configOptions
-*/
-YAHOO.widget.Calendar.prototype.configOptions = function(type, args, obj) {
- type = type.toUpperCase();
- var val = args[0];
- this.Options[type] = val;
-};
-
-/**
-* The default handler for all configuration locale properties
-* @method configLocale
-*/
-YAHOO.widget.Calendar.prototype.configLocale = function(type, args, obj) {
- type = type.toUpperCase();
- var val = args[0];
- this.Locale[type] = val;
-
- this.cfg.refireEvent("LOCALE_MONTHS");
- this.cfg.refireEvent("LOCALE_WEEKDAYS");
-
-};
-
-/**
-* The default handler for all configuration locale field length properties
-* @method configLocaleValues
-*/
-YAHOO.widget.Calendar.prototype.configLocaleValues = function(type, args, obj) {
- type = type.toUpperCase();
- var val = args[0];
-
- switch (type) {
- case "LOCALE_MONTHS":
- switch (val) {
- case "short":
- this.Locale.LOCALE_MONTHS = this.cfg.getProperty("MONTHS_SHORT").concat();
- break;
- case "long":
- this.Locale.LOCALE_MONTHS = this.cfg.getProperty("MONTHS_LONG").concat();
- break;
- }
- break;
- case "LOCALE_WEEKDAYS":
- switch (val) {
- case "1char":
- this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_1CHAR").concat();
- break;
- case "short":
- this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_SHORT").concat();
- break;
- case "medium":
- this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_MEDIUM").concat();
- break;
- case "long":
- this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty("WEEKDAYS_LONG").concat();
- break;
- }
-
- var START_WEEKDAY = this.cfg.getProperty("START_WEEKDAY");
-
- if (START_WEEKDAY > 0) {
- for (var w=0;w";
- html[html.length] = "";
- html[html.length] = '';
- html[html.length] = ' ';
-
- if (this.cfg.getProperty("SHOW_WEEKDAYS")) {
- html = this.buildWeekdays(html);
- }
-
- html[html.length] = '';
-
- return html;
-};
-
-/**
-* Renders the Calendar's weekday headers.
-* @method buildWeekdays
-* @param {Array} html The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.buildWeekdays = function(html) {
-
- html[html.length] = '';
-
- if (this.cfg.getProperty("SHOW_WEEK_HEADER")) {
- html[html.length] = ' ';
- }
-
- for(var i=0;i' + this.Locale.LOCALE_WEEKDAYS[i] + '';
- }
-
- if (this.cfg.getProperty("SHOW_WEEK_FOOTER")) {
- html[html.length] = ' ';
- }
-
- html[html.length] = ' ';
-
- return html;
-};
-
-/**
-* Renders the calendar body.
-* @method renderBody
-* @param {Date} workingDate The current working Date being used for the render process
-* @param {Array} html The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderBody = function(workingDate, html) {
-
- var startDay = this.cfg.getProperty("START_WEEKDAY");
-
- this.preMonthDays = workingDate.getDay();
- if (startDay > 0) {
- this.preMonthDays -= startDay;
- }
- if (this.preMonthDays < 0) {
- this.preMonthDays += 7;
- }
-
- this.monthDays = YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();
- this.postMonthDays = YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;
-
- workingDate = YAHOO.widget.DateMath.subtract(workingDate, YAHOO.widget.DateMath.DAY, this.preMonthDays);
-
- var useDate,weekNum,weekClass;
- useDate = this.cfg.getProperty("pagedate");
-
- html[html.length] = '';
-
- var i = 0;
-
- var tempDiv = document.createElement("div");
- var cell = document.createElement("td");
- tempDiv.appendChild(cell);
-
- var jan1 = new Date(useDate.getFullYear(),0,1);
-
- var cal = this.parent || this;
-
- for (var r=0;r<6;r++) {
-
- weekNum = YAHOO.widget.DateMath.getWeekNumber(workingDate, useDate.getFullYear(), startDay);
-
- weekClass = "w" + weekNum;
-
- if (r !== 0 && (this.isDateOOM(workingDate) && !this.cfg.getProperty("OOM_SELECT")) && this.cfg.getProperty("HIDE_BLANK_WEEKS") === true) {
- break;
- } else {
-
- html[html.length] = '';
-
- if (this.cfg.getProperty("SHOW_WEEK_HEADER")) { html = this.renderRowHeader(weekNum, html); }
-
- for (var d=0;d<7;d++){ // Render actual days
-
- var cellRenderers = [];
-
- this.clearElement(cell);
-
- YAHOO.util.Dom.addClass(cell, "calcell");
-
- cell.id = this.id + "_cell" + i;
-
- cell.innerHTML = i;
-
- var renderer = null;
-
- if (workingDate.getFullYear() == this.today.getFullYear() &&
- workingDate.getMonth() == this.today.getMonth() &&
- workingDate.getDate() == this.today.getDate()) {
- cellRenderers[cellRenderers.length]=cal.renderCellStyleToday;
- }
-
- this.cellDates[this.cellDates.length]=[workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()]; // Add this date to cellDates
-
- if (this.isDateOOM(workingDate) && !this.cfg.getProperty("OOM_SELECT")) {
- cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth;
- } else {
-
- YAHOO.util.Dom.addClass(cell, "wd" + workingDate.getDay());
- YAHOO.util.Dom.addClass(cell, "d" + workingDate.getDate());
-
- for (var s=0;s= d1.getTime() && workingDate.getTime() <= d2.getTime()) {
- renderer = rArray[2];
-
- if (workingDate.getTime()==d2.getTime()) {
- this.renderStack.splice(s,1);
- }
- }
- break;
- case YAHOO.widget.Calendar.WEEKDAY:
-
- var weekday = rArray[1][0];
- if (workingDate.getDay()+1 == weekday) {
- renderer = rArray[2];
- }
- break;
- case YAHOO.widget.Calendar.MONTH:
-
- month = rArray[1][0];
- if (workingDate.getMonth()+1 == month) {
- renderer = rArray[2];
- }
- break;
- }
-
- if (renderer) {
- cellRenderers[cellRenderers.length]=renderer;
- }
- }
-
- }
-
- if (this._indexOfSelectedFieldArray([workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()]) > -1) {
- cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected;
- }
-
- var mindate = this.cfg.getProperty("mindate");
- var maxdate = this.cfg.getProperty("maxdate");
-
- if (mindate) {
- mindate = YAHOO.widget.DateMath.clearTime(mindate);
- }
- if (maxdate) {
- maxdate = YAHOO.widget.DateMath.clearTime(maxdate);
- }
-
- if (
- (mindate && (workingDate.getTime() < mindate.getTime())) ||
- (maxdate && (workingDate.getTime() > maxdate.getTime()))
- ) {
- cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate;
- } else {
- cellRenderers[cellRenderers.length]=cal.styleCellDefault;
- cellRenderers[cellRenderers.length]=cal.renderCellDefault;
- }
-
-
-
- for (var x=0;x= 0 && i <= 6) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TOP);
- }
- if ((i % 7) === 0) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_LEFT);
- }
- if (((i+1) % 7) === 0) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RIGHT);
- }
-
- var postDays = this.postMonthDays;
- if (postDays >= 7 && this.cfg.getProperty("HIDE_BLANK_WEEKS")) {
- var blankWeeks = Math.floor(postDays/7);
- for (var p=0;p= ((this.preMonthDays+postDays+this.monthDays)-7)) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_BOTTOM);
- }
-
- html[html.length] = tempDiv.innerHTML;
-
- i++;
- }
-
- if (this.cfg.getProperty("SHOW_WEEK_FOOTER")) { html = this.renderRowFooter(weekNum, html); }
-
- html[html.length] = ' ';
- }
- }
-
- html[html.length] = ' ';
-
- return html;
-};
-
-/**
-* Renders the calendar footer. In the default implementation, there is
-* no footer.
-* @method renderFooter
-* @param {Array} html The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderFooter = function(html) { return html; };
-
-/**
-* Renders the calendar after it has been configured. The render() method has a specific call chain that will execute
-* when the method is called: renderHeader, renderBody, renderFooter.
-* Refer to the documentation for those methods for information on
-* individual render tasks.
-* @method render
-*/
-YAHOO.widget.Calendar.prototype.render = function() {
- this.beforeRenderEvent.fire();
-
- // Find starting day of the current month
- var workingDate = YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty("pagedate"));
-
- this.resetRenderers();
- this.cellDates.length = 0;
-
- YAHOO.util.Event.purgeElement(this.oDomContainer, true);
-
- var html = [];
-
- html[html.length] = '';
- html = this.renderHeader(html);
- html = this.renderBody(workingDate, html);
- html = this.renderFooter(html);
- html[html.length] = '
';
-
- this.oDomContainer.innerHTML = html.join("\n");
-
- this.applyListeners();
- this.cells = this.oDomContainer.getElementsByTagName("td");
-
- this.cfg.refireEvent("title");
- this.cfg.refireEvent("close");
- this.cfg.refireEvent("iframe");
-
- this.renderEvent.fire();
-};
-
-/**
-* Applies the Calendar's DOM listeners to applicable elements.
-* @method applyListeners
-*/
-YAHOO.widget.Calendar.prototype.applyListeners = function() {
-
- var root = this.oDomContainer;
- var cal = this.parent || this;
-
- var linkLeft, linkRight;
-
- linkLeft = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, "a", root);
- linkRight = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, "a", root);
-
- if (linkLeft) {
- this.linkLeft = linkLeft[0];
- YAHOO.util.Event.addListener(this.linkLeft, "mousedown", cal.previousMonth, cal, true);
- }
-
- if (linkRight) {
- this.linkRight = linkRight[0];
- YAHOO.util.Event.addListener(this.linkRight, "mousedown", cal.nextMonth, cal, true);
- }
-
- if (this.domEventMap) {
- var el,elements;
- for (var cls in this.domEventMap) {
- if (this.domEventMap.hasOwnProperty(cls)) {
- var items = this.domEventMap[cls];
-
- if (! (items instanceof Array)) {
- items = [items];
- }
-
- for (var i=0;i' + weekNum + '';
- return html;
-};
-
-/**
-* Renders the row footer for a week.
-* @method renderRowFooter
-* @param {Number} weekNum The week number of the current row
-* @param {Array} cell The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderRowFooter = function(weekNum, html) {
- html[html.length] = '';
- return html;
-};
-
-/**
-* Renders a single standard calendar cell in the calendar widget table.
-* All logic for determining how a standard default cell will be rendered is
-* encapsulated in this method, and must be accounted for when extending the
-* widget class.
-* @method renderCellDefault
-* @param {Date} workingDate The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement} cell The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellDefault = function(workingDate, cell) {
- cell.innerHTML = '' + this.buildDayLabel(workingDate) + " ";
-};
-
-/**
-* Styles a selectable cell.
-* @method styleCellDefault
-* @param {Date} workingDate The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement} cell The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.styleCellDefault = function(workingDate, cell) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTABLE);
-};
-
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight1 style
-* @method renderCellStyleHighlight1
-* @param {Date} workingDate The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement} cell The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1 = function(workingDate, cell) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT1);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight2 style
-* @method renderCellStyleHighlight2
-* @param {Date} workingDate The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement} cell The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2 = function(workingDate, cell) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT2);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight3 style
-* @method renderCellStyleHighlight3
-* @param {Date} workingDate The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement} cell The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3 = function(workingDate, cell) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT3);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight4 style
-* @method renderCellStyleHighlight4
-* @param {Date} workingDate The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement} cell The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4 = function(workingDate, cell) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT4);
-};
-
-/**
-* Applies the default style used for rendering today's date to the current calendar cell
-* @method renderCellStyleToday
-* @param {Date} workingDate The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement} cell The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleToday = function(workingDate, cell) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TODAY);
-};
-
-/**
-* Applies the default style used for rendering selected dates to the current calendar cell
-* @method renderCellStyleSelected
-* @param {Date} workingDate The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement} cell The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-* should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleSelected = function(workingDate, cell) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTED);
-};
-
-/**
-* Applies the default style used for rendering dates that are not a part of the current
-* month (preceding or trailing the cells for the current month)
-* @method renderCellNotThisMonth
-* @param {Date} workingDate The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement} cell The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-* should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderCellNotThisMonth = function(workingDate, cell) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOM);
- cell.innerHTML=workingDate.getDate();
- return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-/**
-* Renders the current calendar cell as a non-selectable "black-out" date using the default
-* restricted style.
-* @method renderBodyCellRestricted
-* @param {Date} workingDate The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement} cell The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-* should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderBodyCellRestricted = function(workingDate, cell) {
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL);
- YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED);
- cell.innerHTML=workingDate.getDate();
- return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-// END BUILT-IN TABLE CELL RENDERERS
-
-// BEGIN MONTH NAVIGATION METHODS
-
-/**
-* Adds the designated number of months to the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method addMonths
-* @param {Number} count The number of months to add to the current calendar
-*/
-YAHOO.widget.Calendar.prototype.addMonths = function(count) {
- this.cfg.setProperty("pagedate", YAHOO.widget.DateMath.add(this.cfg.getProperty("pagedate"), YAHOO.widget.DateMath.MONTH, count));
- this.resetRenderers();
- this.changePageEvent.fire();
-};
-
-/**
-* Subtracts the designated number of months from the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method subtractMonths
-* @param {Number} count The number of months to subtract from the current calendar
-*/
-YAHOO.widget.Calendar.prototype.subtractMonths = function(count) {
- this.cfg.setProperty("pagedate", YAHOO.widget.DateMath.subtract(this.cfg.getProperty("pagedate"), YAHOO.widget.DateMath.MONTH, count));
- this.resetRenderers();
- this.changePageEvent.fire();
-};
-
-/**
-* Adds the designated number of years to the current calendar, and sets the current
-* calendar page date to the new month.
-* @method addYears
-* @param {Number} count The number of years to add to the current calendar
-*/
-YAHOO.widget.Calendar.prototype.addYears = function(count) {
- this.cfg.setProperty("pagedate", YAHOO.widget.DateMath.add(this.cfg.getProperty("pagedate"), YAHOO.widget.DateMath.YEAR, count));
- this.resetRenderers();
- this.changePageEvent.fire();
-};
-
-/**
-* Subtcats the designated number of years from the current calendar, and sets the current
-* calendar page date to the new month.
-* @method subtractYears
-* @param {Number} count The number of years to subtract from the current calendar
-*/
-YAHOO.widget.Calendar.prototype.subtractYears = function(count) {
- this.cfg.setProperty("pagedate", YAHOO.widget.DateMath.subtract(this.cfg.getProperty("pagedate"), YAHOO.widget.DateMath.YEAR, count));
- this.resetRenderers();
- this.changePageEvent.fire();
-};
-
-/**
-* Navigates to the next month page in the calendar widget.
-* @method nextMonth
-*/
-YAHOO.widget.Calendar.prototype.nextMonth = function() {
- this.addMonths(1);
-};
-
-/**
-* Navigates to the previous month page in the calendar widget.
-* @method previousMonth
-*/
-YAHOO.widget.Calendar.prototype.previousMonth = function() {
- this.subtractMonths(1);
-};
-
-/**
-* Navigates to the next year in the currently selected month in the calendar widget.
-* @method nextYear
-*/
-YAHOO.widget.Calendar.prototype.nextYear = function() {
- this.addYears(1);
-};
-
-/**
-* Navigates to the previous year in the currently selected month in the calendar widget.
-* @method previousYear
-*/
-YAHOO.widget.Calendar.prototype.previousYear = function() {
- this.subtractYears(1);
-};
-
-// END MONTH NAVIGATION METHODS
-
-// BEGIN SELECTION METHODS
-
-/**
-* Resets the calendar widget to the originally selected month and year, and
-* sets the calendar to the initial selection(s).
-* @method reset
-*/
-YAHOO.widget.Calendar.prototype.reset = function() {
- this.cfg.resetProperty("selected");
- this.cfg.resetProperty("pagedate");
- this.resetEvent.fire();
-};
-
-/**
-* Clears the selected dates in the current calendar widget and sets the calendar
-* to the current month and year.
-* @method clear
-*/
-YAHOO.widget.Calendar.prototype.clear = function() {
- this.cfg.setProperty("selected", []);
- this.cfg.setProperty("pagedate", new Date(this.today.getTime()));
- this.clearEvent.fire();
-};
-
-/**
-* Selects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once selection has completed, render must be
-* called for the changes to be reflected visually.
-* @method select
-* @param {String/Date/Date[]} date The date string of dates to select in the current calendar. Valid formats are
-* individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-* Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-* This method can also take a JavaScript Date object or an array of Date objects.
-* @return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.select = function(date) {
- this.beforeSelectEvent.fire();
-
- var selected = this.cfg.getProperty("selected");
- var aToBeSelected = this._toFieldArray(date);
-
- for (var a=0;a -1) {
- if (this.cfg.getProperty("pagedate").getMonth() == dCellDate.getMonth() &&
- this.cfg.getProperty("pagedate").getFullYear() == dCellDate.getFullYear()) {
- YAHOO.util.Dom.removeClass(cell, this.Style.CSS_CELL_SELECTED);
- }
-
- selected.splice(cellDateIndex, 1);
- }
-
-
- if (this.parent) {
- this.parent.cfg.setProperty("selected", selected);
- } else {
- this.cfg.setProperty("selected", selected);
- }
-
- this.deselectEvent.fire(selectDate);
- return this.getSelectedDates();
-};
-
-/**
-* Deselects all dates on the current calendar.
-* @method deselectAll
-* @return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected.
-* Assuming that this function executes properly, the return value should be an empty array.
-* However, the empty array is returned for the sake of being able to check the selection status
-* of the calendar.
-*/
-YAHOO.widget.Calendar.prototype.deselectAll = function() {
- this.beforeDeselectEvent.fire();
-
- var selected = this.cfg.getProperty("selected");
- var count = selected.length;
- var sel = selected.concat();
-
- if (this.parent) {
- this.parent.cfg.setProperty("selected", []);
- } else {
- this.cfg.setProperty("selected", []);
- }
-
- if (count > 0) {
- this.deselectEvent.fire(sel);
- }
-
- return this.getSelectedDates();
-};
-
-// END SELECTION METHODS
-
-// BEGIN TYPE CONVERSION METHODS
-
-/**
-* Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
-* used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
-* @method _toFieldArray
-* @private
-* @param {String/Date/Date[]} date The date string of dates to deselect in the current calendar. Valid formats are
-* individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-* Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-* This method can also take a JavaScript Date object or an array of Date objects.
-* @return {Array[](Number[])} Array of date field arrays
-*/
-YAHOO.widget.Calendar.prototype._toFieldArray = function(date) {
- var returnDate = [];
-
- if (date instanceof Date) {
- returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]];
- } else if (typeof date == 'string') {
- returnDate = this._parseDates(date);
- } else if (date instanceof Array) {
- for (var i=0;i
-*
-*
-*
-* The tables for the calendars ("cal1_0" and "cal1_1") will be inserted into those containers.
-* @namespace YAHOO.widget
-* @class CalendarGroup
-* @constructor
-* @param {String} id The id of the table element that will represent the calendar widget
-* @param {String} containerId The id of the container div element that will wrap the calendar table
-* @param {Object} config The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.CalendarGroup = function(id, containerId, config) {
- if (arguments.length > 0) {
- this.init(id, containerId, config);
- }
-};
-
-/**
-* Initializes the calendar group. All subclasses must call this method in order for the
-* group to be initialized properly.
-* @method init
-* @param {String} id The id of the table element that will represent the calendar widget
-* @param {String} containerId The id of the container div element that will wrap the calendar table
-* @param {Object} config The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.CalendarGroup.prototype.init = function(id, containerId, config) {
- this.initEvents();
- this.initStyles();
-
- /**
- * The collection of Calendar pages contained within the CalendarGroup
- * @property pages
- * @type YAHOO.widget.Calendar[]
- */
- this.pages = [];
-
- /**
- * The unique id associated with the CalendarGroup
- * @property id
- * @type String
- */
- this.id = id;
-
- /**
- * The unique id associated with the CalendarGroup container
- * @property containerId
- * @type String
- */
- this.containerId = containerId;
-
- /**
- * The outer containing element for the CalendarGroup
- * @property oDomContainer
- * @type HTMLElement
- */
- this.oDomContainer = document.getElementById(containerId);
-
- YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_CONTAINER);
- YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_MULTI_UP);
-
- /**
- * The Config object used to hold the configuration variables for the CalendarGroup
- * @property cfg
- * @type YAHOO.util.Config
- */
- this.cfg = new YAHOO.util.Config(this);
-
- /**
- * The local object which contains the CalendarGroup's options
- * @property Options
- * @type Object
- */
- this.Options = {};
-
- /**
- * The local object which contains the CalendarGroup's locale settings
- * @property Locale
- * @type Object
- */
- this.Locale = {};
-
- this.setupConfig();
-
- if (config) {
- this.cfg.applyConfig(config, true);
- }
-
- this.cfg.fireQueue();
-
- // OPERA HACK FOR MISWRAPPED FLOATS
- if (this.browser == "opera"){
- var fixWidth = function() {
- var startW = this.oDomContainer.offsetWidth;
- var w = 0;
- for (var p=0;p 0) {
- this.oDomContainer.style.width = w + "px";
- }
- };
- this.renderEvent.subscribe(fixWidth,this,true);
- }
-};
-
-
-YAHOO.widget.CalendarGroup.prototype.setupConfig = function() {
- /**
- * The number of pages to include in the CalendarGroup. This value can only be set once, in the CalendarGroup's constructor arguments.
- * @config pages
- * @type Number
- * @default 2
- */
- this.cfg.addProperty("pages", { value:2, validator:this.cfg.checkNumber, handler:this.configPages } );
-
- /**
- * The month/year representing the current visible Calendar date (mm/yyyy)
- * @config pagedate
- * @type String
- * @default today's date
- */
- this.cfg.addProperty("pagedate", { value:new Date(), handler:this.configPageDate } );
-
- /**
- * The date or range of dates representing the current Calendar selection
- * @config selected
- * @type String
- * @default []
- */
- this.cfg.addProperty("selected", { value:[], handler:this.delegateConfig } );
-
- /**
- * The title to display above the CalendarGroup's month header
- * @config title
- * @type String
- * @default ""
- */
- this.cfg.addProperty("title", { value:"", handler:this.configTitle } );
-
- /**
- * Whether or not a close button should be displayed for this CalendarGroup
- * @config close
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("close", { value:false, handler:this.configClose } );
-
- /**
- * Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
- * @config iframe
- * @type Boolean
- * @default true
- */
- this.cfg.addProperty("iframe", { value:true, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
- /**
- * The minimum selectable date in the current Calendar (mm/dd/yyyy)
- * @config mindate
- * @type String
- * @default null
- */
- this.cfg.addProperty("mindate", { value:null, handler:this.delegateConfig } );
-
- /**
- * The maximum selectable date in the current Calendar (mm/dd/yyyy)
- * @config maxdate
- * @type String
- * @default null
- */
- this.cfg.addProperty("maxdate", { value:null, handler:this.delegateConfig } );
-
- // Options properties
-
- /**
- * True if the Calendar should allow multiple selections. False by default.
- * @config MULTI_SELECT
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("MULTI_SELECT", { value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
- /**
- * True if the Calendar should allow selection of out-of-month dates. False by default.
- * @config OOM_SELECT
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("OOM_SELECT", { value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
- /**
- * The weekday the week begins on. Default is 0 (Sunday).
- * @config START_WEEKDAY
- * @type number
- * @default 0
- */
- this.cfg.addProperty("START_WEEKDAY", { value:0, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
- /**
- * True if the Calendar should show weekday labels. True by default.
- * @config SHOW_WEEKDAYS
- * @type Boolean
- * @default true
- */
- this.cfg.addProperty("SHOW_WEEKDAYS", { value:true, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
- /**
- * True if the Calendar should show week row headers. False by default.
- * @config SHOW_WEEK_HEADER
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("SHOW_WEEK_HEADER",{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
- /**
- * True if the Calendar should show week row footers. False by default.
- * @config SHOW_WEEK_FOOTER
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("SHOW_WEEK_FOOTER",{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
- /**
- * True if the Calendar should suppress weeks that are not a part of the current month. False by default.
- * @config HIDE_BLANK_WEEKS
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("HIDE_BLANK_WEEKS",{ value:false, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
- /**
- * The image that should be used for the left navigation arrow.
- * @config NAV_ARROW_LEFT
- * @type String
- * @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif"
- */
- this.cfg.addProperty("NAV_ARROW_LEFT", { value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/callt.gif", handler:this.delegateConfig } );
-
- /**
- * The image that should be used for the left navigation arrow.
- * @config NAV_ARROW_RIGHT
- * @type String
- * @default YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif"
- */
- this.cfg.addProperty("NAV_ARROW_RIGHT", { value:YAHOO.widget.Calendar.IMG_ROOT + "us/tr/calrt.gif", handler:this.delegateConfig } );
-
- // Locale properties
-
- /**
- * The short month labels for the current locale.
- * @config MONTHS_SHORT
- * @type String[]
- * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
- */
- this.cfg.addProperty("MONTHS_SHORT", { value:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], handler:this.delegateConfig } );
-
- /**
- * The long month labels for the current locale.
- * @config MONTHS_LONG
- * @type String[]
- * @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
- */
- this.cfg.addProperty("MONTHS_LONG", { value:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], handler:this.delegateConfig } );
-
- /**
- * The 1-character weekday labels for the current locale.
- * @config WEEKDAYS_1CHAR
- * @type String[]
- * @default ["S", "M", "T", "W", "T", "F", "S"]
- */
- this.cfg.addProperty("WEEKDAYS_1CHAR", { value:["S", "M", "T", "W", "T", "F", "S"], handler:this.delegateConfig } );
-
- /**
- * The short weekday labels for the current locale.
- * @config WEEKDAYS_SHORT
- * @type String[]
- * @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
- */
- this.cfg.addProperty("WEEKDAYS_SHORT", { value:["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], handler:this.delegateConfig } );
-
- /**
- * The medium weekday labels for the current locale.
- * @config WEEKDAYS_MEDIUM
- * @type String[]
- * @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
- */
- this.cfg.addProperty("WEEKDAYS_MEDIUM", { value:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], handler:this.delegateConfig } );
-
- /**
- * The long weekday labels for the current locale.
- * @config WEEKDAYS_LONG
- * @type String[]
- * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
- */
- this.cfg.addProperty("WEEKDAYS_LONG", { value:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], handler:this.delegateConfig } );
-
- /**
- * The setting that determines which length of month labels should be used. Possible values are "short" and "long".
- * @config LOCALE_MONTHS
- * @type String
- * @default "long"
- */
- this.cfg.addProperty("LOCALE_MONTHS", { value:"long", handler:this.delegateConfig } );
-
- /**
- * The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
- * @config LOCALE_WEEKDAYS
- * @type String
- * @default "short"
- */
- this.cfg.addProperty("LOCALE_WEEKDAYS", { value:"short", handler:this.delegateConfig } );
-
- /**
- * The value used to delimit individual dates in a date string passed to various Calendar functions.
- * @config DATE_DELIMITER
- * @type String
- * @default ","
- */
- this.cfg.addProperty("DATE_DELIMITER", { value:",", handler:this.delegateConfig } );
-
- /**
- * The value used to delimit date fields in a date string passed to various Calendar functions.
- * @config DATE_FIELD_DELIMITER
- * @type String
- * @default "/"
- */
- this.cfg.addProperty("DATE_FIELD_DELIMITER",{ value:"/", handler:this.delegateConfig } );
-
- /**
- * The value used to delimit date ranges in a date string passed to various Calendar functions.
- * @config DATE_RANGE_DELIMITER
- * @type String
- * @default "-"
- */
- this.cfg.addProperty("DATE_RANGE_DELIMITER",{ value:"-", handler:this.delegateConfig } );
-
- /**
- * The position of the month in a month/year date string
- * @config MY_MONTH_POSITION
- * @type Number
- * @default 1
- */
- this.cfg.addProperty("MY_MONTH_POSITION", { value:1, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the year in a month/year date string
- * @config MY_YEAR_POSITION
- * @type Number
- * @default 2
- */
- this.cfg.addProperty("MY_YEAR_POSITION", { value:2, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the month in a month/day date string
- * @config MD_MONTH_POSITION
- * @type Number
- * @default 1
- */
- this.cfg.addProperty("MD_MONTH_POSITION", { value:1, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the day in a month/year date string
- * @config MD_DAY_POSITION
- * @type Number
- * @default 2
- */
- this.cfg.addProperty("MD_DAY_POSITION", { value:2, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the month in a month/day/year date string
- * @config MDY_MONTH_POSITION
- * @type Number
- * @default 1
- */
- this.cfg.addProperty("MDY_MONTH_POSITION", { value:1, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the day in a month/day/year date string
- * @config MDY_DAY_POSITION
- * @type Number
- * @default 2
- */
- this.cfg.addProperty("MDY_DAY_POSITION", { value:2, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
- /**
- * The position of the year in a month/day/year date string
- * @config MDY_YEAR_POSITION
- * @type Number
- * @default 3
- */
- this.cfg.addProperty("MDY_YEAR_POSITION", { value:3, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
-};
-
-/**
-* Initializes CalendarGroup's built-in CustomEvents
-* @method initEvents
-*/
-YAHOO.widget.CalendarGroup.prototype.initEvents = function() {
- var me = this;
-
- /**
- * Proxy subscriber to subscribe to the CalendarGroup's child Calendars' CustomEvents
- * @method sub
- * @private
- * @param {Function} fn The function to subscribe to this CustomEvent
- * @param {Object} obj The CustomEvent's scope object
- * @param {Boolean} bOverride Whether or not to apply scope correction
- */
- var sub = function(fn, obj, bOverride) {
- for (var p=0;p0) {
- year+=1;
- }
- cal.setYear(year);
- }
-};
-/**
-* Calls the render function of all child calendars within the group.
-* @method render
-*/
-YAHOO.widget.CalendarGroup.prototype.render = function() {
- this.renderHeader();
- for (var p=0;p=0;--p) {
- var cal = this.pages[p];
- cal.previousMonth();
- }
-};
-
-/**
-* Navigates to the next year in the currently selected month in the calendar widget.
-* @method nextYear
-*/
-YAHOO.widget.CalendarGroup.prototype.nextYear = function() {
- for (var p=0;p 11) {
+ while (newMonth > 11) {
+ newMonth -= 12;
+ years += 1;
+ }
+ }
+
+ d.setMonth(newMonth);
+ d.setFullYear(date.getFullYear() + years);
+ break;
+ case this.DAY:
+ d.setDate(date.getDate() + amount);
+ break;
+ case this.YEAR:
+ d.setFullYear(date.getFullYear() + amount);
+ break;
+ case this.WEEK:
+ d.setDate(date.getDate() + (amount * 7));
+ break;
+ }
+ return d;
+ },
+
+ /**
+ * Subtracts the specified amount of time from the this instance.
+ * @method subtract
+ * @param {Date} date The JavaScript Date object to perform subtraction on
+ * @param {Number} field The this field constant to be used for performing subtraction.
+ * @param {Number} amount The number of units (measured in the field constant) to subtract from the date.
+ * @return {Date} The resulting Date object
+ */
+ subtract : function(date, field, amount) {
+ return this.add(date, field, (amount*-1));
+ },
+
+ /**
+ * Determines whether a given date is before another date on the calendar.
+ * @method before
+ * @param {Date} date The Date object to compare with the compare argument
+ * @param {Date} compareTo The Date object to use for the comparison
+ * @return {Boolean} true if the date occurs before the compared date; false if not.
+ */
+ before : function(date, compareTo) {
+ var ms = compareTo.getTime();
+ if (date.getTime() < ms) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Determines whether a given date is after another date on the calendar.
+ * @method after
+ * @param {Date} date The Date object to compare with the compare argument
+ * @param {Date} compareTo The Date object to use for the comparison
+ * @return {Boolean} true if the date occurs after the compared date; false if not.
+ */
+ after : function(date, compareTo) {
+ var ms = compareTo.getTime();
+ if (date.getTime() > ms) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Determines whether a given date is between two other dates on the calendar.
+ * @method between
+ * @param {Date} date The date to check for
+ * @param {Date} dateBegin The start of the range
+ * @param {Date} dateEnd The end of the range
+ * @return {Boolean} true if the date occurs between the compared dates; false if not.
+ */
+ between : function(date, dateBegin, dateEnd) {
+ if (this.after(date, dateBegin) && this.before(date, dateEnd)) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Retrieves a JavaScript Date object representing January 1 of any given year.
+ * @method getJan1
+ * @param {Number} calendarYear The calendar year for which to retrieve January 1
+ * @return {Date} January 1 of the calendar year specified.
+ */
+ getJan1 : function(calendarYear) {
+ return new Date(calendarYear,0,1);
+ },
+
+ /**
+ * Calculates the number of days the specified date is from January 1 of the specified calendar year.
+ * Passing January 1 to this function would return an offset value of zero.
+ * @method getDayOffset
+ * @param {Date} date The JavaScript date for which to find the offset
+ * @param {Number} calendarYear The calendar year to use for determining the offset
+ * @return {Number} The number of days since January 1 of the given year
+ */
+ getDayOffset : function(date, calendarYear) {
+ var beginYear = this.getJan1(calendarYear); // Find the start of the year. This will be in week 1.
+
+ // Find the number of days the passed in date is away from the calendar year start
+ var dayOffset = Math.ceil((date.getTime()-beginYear.getTime()) / this.ONE_DAY_MS);
+ return dayOffset;
+ },
+
+ /**
+ * Calculates the week number for the given date. This function assumes that week 1 is the
+ * week in which January 1 appears, regardless of whether the week consists of a full 7 days.
+ * The calendar year can be specified to help find what a the week number would be for a given
+ * date if the date overlaps years. For instance, a week may be considered week 1 of 2005, or
+ * week 53 of 2004. Specifying the optional calendarYear allows one to make this distinction
+ * easily.
+ * @method getWeekNumber
+ * @param {Date} date The JavaScript date for which to find the week number
+ * @param {Number} calendarYear OPTIONAL - The calendar year to use for determining the week number. Default is
+ * the calendar year of parameter "date".
+ * @param {Number} weekStartsOn OPTIONAL - The integer (0-6) representing which day a week begins on. Default is 0 (for Sunday).
+ * @return {Number} The week number of the given date.
+ */
+ getWeekNumber : function(date, calendarYear) {
+ date = this.clearTime(date);
+ var nearestThurs = new Date(date.getTime() + (4 * this.ONE_DAY_MS) - ((date.getDay()) * this.ONE_DAY_MS));
+
+ var jan1 = new Date(nearestThurs.getFullYear(),0,1);
+ var dayOfYear = ((nearestThurs.getTime() - jan1.getTime()) / this.ONE_DAY_MS) - 1;
+
+ var weekNum = Math.ceil((dayOfYear)/ 7);
+ return weekNum;
+ },
+
+ /**
+ * Determines if a given week overlaps two different years.
+ * @method isYearOverlapWeek
+ * @param {Date} weekBeginDate The JavaScript Date representing the first day of the week.
+ * @return {Boolean} true if the date overlaps two different years.
+ */
+ isYearOverlapWeek : function(weekBeginDate) {
+ var overlaps = false;
+ var nextWeek = this.add(weekBeginDate, this.DAY, 6);
+ if (nextWeek.getFullYear() != weekBeginDate.getFullYear()) {
+ overlaps = true;
+ }
+ return overlaps;
+ },
+
+ /**
+ * Determines if a given week overlaps two different months.
+ * @method isMonthOverlapWeek
+ * @param {Date} weekBeginDate The JavaScript Date representing the first day of the week.
+ * @return {Boolean} true if the date overlaps two different months.
+ */
+ isMonthOverlapWeek : function(weekBeginDate) {
+ var overlaps = false;
+ var nextWeek = this.add(weekBeginDate, this.DAY, 6);
+ if (nextWeek.getMonth() != weekBeginDate.getMonth()) {
+ overlaps = true;
+ }
+ return overlaps;
+ },
+
+ /**
+ * Gets the first day of a month containing a given date.
+ * @method findMonthStart
+ * @param {Date} date The JavaScript Date used to calculate the month start
+ * @return {Date} The JavaScript Date representing the first day of the month
+ */
+ findMonthStart : function(date) {
+ var start = new Date(date.getFullYear(), date.getMonth(), 1);
+ return start;
+ },
+
+ /**
+ * Gets the last day of a month containing a given date.
+ * @method findMonthEnd
+ * @param {Date} date The JavaScript Date used to calculate the month end
+ * @return {Date} The JavaScript Date representing the last day of the month
+ */
+ findMonthEnd : function(date) {
+ var start = this.findMonthStart(date);
+ var nextMonth = this.add(start, this.MONTH, 1);
+ var end = this.subtract(nextMonth, this.DAY, 1);
+ return end;
+ },
+
+ /**
+ * Clears the time fields from a given date, effectively setting the time to 12 noon.
+ * @method clearTime
+ * @param {Date} date The JavaScript Date for which the time fields will be cleared
+ * @return {Date} The JavaScript Date cleared of all time fields
+ */
+ clearTime : function(date) {
+ date.setHours(12,0,0,0);
+ return date;
+ }
+};
+
+/**
+* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month ("one-up") or two-month ("two-up") interface. Calendars are generated entirely via script and can be navigated without any page refreshes.
+* @module calendar
+* @title Calendar
+* @namespace YAHOO.widget
+* @requires yahoo,dom,event
+*/
+
+/**
+* Calendar is the base class for the Calendar widget. In its most basic
+* implementation, it has the ability to render a calendar widget on the page
+* that can be manipulated to select a single date, move back and forth between
+* months and years.
+* To construct the placeholder for the calendar widget, the code is as
+* follows:
+*
+*
+*
+* Note that the table can be replaced with any kind of element.
+*
+* @namespace YAHOO.widget
+* @class Calendar
+* @constructor
+* @param {String} id The id of the table element that will represent the calendar widget
+* @param {String} containerId The id of the container div element that will wrap the calendar table
+* @param {Object} config The configuration object containing the Calendar's arguments
+*/
+YAHOO.widget.Calendar = function(id, containerId, config) {
+ this.init(id, containerId, config);
+};
+
+/**
+* The path to be used for images loaded for the Calendar
+* @property YAHOO.widget.Calendar.IMG_ROOT
+* @static
+* @deprecated You can now customize images by overriding the calclose, calnavleft and calnavright default CSS classes for the close icon, left arrow and right arrow respectively
+* @type String
+*/
+YAHOO.widget.Calendar.IMG_ROOT = null;
+
+/**
+* Type constant used for renderers to represent an individual date (M/D/Y)
+* @property YAHOO.widget.Calendar.DATE
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.DATE = "D";
+
+/**
+* Type constant used for renderers to represent an individual date across any year (M/D)
+* @property YAHOO.widget.Calendar.MONTH_DAY
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.MONTH_DAY = "MD";
+
+/**
+* Type constant used for renderers to represent a weekday
+* @property YAHOO.widget.Calendar.WEEKDAY
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.WEEKDAY = "WD";
+
+/**
+* Type constant used for renderers to represent a range of individual dates (M/D/Y-M/D/Y)
+* @property YAHOO.widget.Calendar.RANGE
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.RANGE = "R";
+
+/**
+* Type constant used for renderers to represent a month across any year
+* @property YAHOO.widget.Calendar.MONTH
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.MONTH = "M";
+
+/**
+* Constant that represents the total number of date cells that are displayed in a given month
+* @property YAHOO.widget.Calendar.DISPLAY_DAYS
+* @static
+* @final
+* @type Number
+*/
+YAHOO.widget.Calendar.DISPLAY_DAYS = 42;
+
+/**
+* Constant used for halting the execution of the remainder of the render stack
+* @property YAHOO.widget.Calendar.STOP_RENDER
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.STOP_RENDER = "S";
+
+/**
+* Constant used to represent short date field string formats (e.g. Tu or Feb)
+* @property YAHOO.widget.Calendar.SHORT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.SHORT = "short";
+
+/**
+* Constant used to represent long date field string formats (e.g. Monday or February)
+* @property YAHOO.widget.Calendar.LONG
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.LONG = "long";
+
+/**
+* Constant used to represent medium date field string formats (e.g. Mon)
+* @property YAHOO.widget.Calendar.MEDIUM
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.MEDIUM = "medium";
+
+/**
+* Constant used to represent single character date field string formats (e.g. M, T, W)
+* @property YAHOO.widget.Calendar.ONE_CHAR
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Calendar.ONE_CHAR = "1char";
+
+/**
+* The set of default Config property keys and values for the Calendar
+* @property YAHOO.widget.Calendar._DEFAULT_CONFIG
+* @final
+* @static
+* @private
+* @type Object
+*/
+YAHOO.widget.Calendar._DEFAULT_CONFIG = {
+ PAGEDATE : {key:"pagedate", value:new Date()},
+ SELECTED : {key:"selected", value:[]},
+ TITLE : {key:"title", value:""},
+ CLOSE : {key:"close", value:false},
+ IFRAME : {key:"iframe", value:true},
+ MINDATE : {key:"mindate", value:null},
+ MAXDATE : {key:"maxdate", value:null},
+ MULTI_SELECT : {key:"multi_select", value:false},
+ START_WEEKDAY : {key:"start_weekday", value:0},
+ SHOW_WEEKDAYS : {key:"show_weekdays", value:true},
+ SHOW_WEEK_HEADER : {key:"show_week_header", value:false},
+ SHOW_WEEK_FOOTER : {key:"show_week_footer", value:false},
+ HIDE_BLANK_WEEKS : {key:"hide_blank_weeks", value:false},
+ NAV_ARROW_LEFT: {key:"nav_arrow_left", value:null} ,
+ NAV_ARROW_RIGHT : {key:"nav_arrow_right", value:null} ,
+ MONTHS_SHORT : {key:"months_short", value:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]},
+ MONTHS_LONG: {key:"months_long", value:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]},
+ WEEKDAYS_1CHAR: {key:"weekdays_1char", value:["S", "M", "T", "W", "T", "F", "S"]},
+ WEEKDAYS_SHORT: {key:"weekdays_short", value:["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]},
+ WEEKDAYS_MEDIUM: {key:"weekdays_medium", value:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]},
+ WEEKDAYS_LONG: {key:"weekdays_long", value:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]},
+ LOCALE_MONTHS:{key:"locale_months", value:"long"},
+ LOCALE_WEEKDAYS:{key:"locale_weekdays", value:"short"},
+ DATE_DELIMITER:{key:"date_delimiter", value:","},
+ DATE_FIELD_DELIMITER:{key:"date_field_delimiter", value:"/"},
+ DATE_RANGE_DELIMITER:{key:"date_range_delimiter", value:"-"},
+ MY_MONTH_POSITION:{key:"my_month_position", value:1},
+ MY_YEAR_POSITION:{key:"my_year_position", value:2},
+ MD_MONTH_POSITION:{key:"md_month_position", value:1},
+ MD_DAY_POSITION:{key:"md_day_position", value:2},
+ MDY_MONTH_POSITION:{key:"mdy_month_position", value:1},
+ MDY_DAY_POSITION:{key:"mdy_day_position", value:2},
+ MDY_YEAR_POSITION:{key:"mdy_year_position", value:3}
+};
+
+/**
+* The set of Custom Event types supported by the Calendar
+* @property YAHOO.widget.Calendar._EVENT_TYPES
+* @final
+* @static
+* @private
+* @type Object
+*/
+YAHOO.widget.Calendar._EVENT_TYPES = {
+ BEFORE_SELECT : "beforeSelect",
+ SELECT : "select",
+ BEFORE_DESELECT : "beforeDeselect",
+ DESELECT : "deselect",
+ CHANGE_PAGE : "changePage",
+ BEFORE_RENDER : "beforeRender",
+ RENDER : "render",
+ RESET : "reset",
+ CLEAR : "clear"
+};
+
+/**
+* Collection of Default Style constants for the Calendar
+* @property YAHOO.widget.Calendar._STYLES
+* @final
+* @static
+* @private
+* @type Object
+*/
+YAHOO.widget.Calendar._STYLES = {
+ CSS_ROW_HEADER: "calrowhead",
+ CSS_ROW_FOOTER: "calrowfoot",
+ CSS_CELL : "calcell",
+ CSS_CELL_SELECTOR : "selector",
+ CSS_CELL_SELECTED : "selected",
+ CSS_CELL_SELECTABLE : "selectable",
+ CSS_CELL_RESTRICTED : "restricted",
+ CSS_CELL_TODAY : "today",
+ CSS_CELL_OOM : "oom",
+ CSS_CELL_OOB : "previous",
+ CSS_HEADER : "calheader",
+ CSS_HEADER_TEXT : "calhead",
+ CSS_BODY : "calbody",
+ CSS_WEEKDAY_CELL : "calweekdaycell",
+ CSS_WEEKDAY_ROW : "calweekdayrow",
+ CSS_FOOTER : "calfoot",
+ CSS_CALENDAR : "yui-calendar",
+ CSS_SINGLE : "single",
+ CSS_CONTAINER : "yui-calcontainer",
+ CSS_NAV_LEFT : "calnavleft",
+ CSS_NAV_RIGHT : "calnavright",
+ CSS_CLOSE : "calclose",
+ CSS_CELL_TOP : "calcelltop",
+ CSS_CELL_LEFT : "calcellleft",
+ CSS_CELL_RIGHT : "calcellright",
+ CSS_CELL_BOTTOM : "calcellbottom",
+ CSS_CELL_HOVER : "calcellhover",
+ CSS_CELL_HIGHLIGHT1 : "highlight1",
+ CSS_CELL_HIGHLIGHT2 : "highlight2",
+ CSS_CELL_HIGHLIGHT3 : "highlight3",
+ CSS_CELL_HIGHLIGHT4 : "highlight4"
+};
+
+YAHOO.widget.Calendar.prototype = {
+
+ /**
+ * The configuration object used to set up the calendars various locale and style options.
+ * @property Config
+ * @private
+ * @deprecated Configuration properties should be set by calling Calendar.cfg.setProperty.
+ * @type Object
+ */
+ Config : null,
+
+ /**
+ * The parent CalendarGroup, only to be set explicitly by the parent group
+ * @property parent
+ * @type CalendarGroup
+ */
+ parent : null,
+
+ /**
+ * The index of this item in the parent group
+ * @property index
+ * @type Number
+ */
+ index : -1,
+
+ /**
+ * The collection of calendar table cells
+ * @property cells
+ * @type HTMLTableCellElement[]
+ */
+ cells : null,
+
+ /**
+ * The collection of calendar cell dates that is parallel to the cells collection. The array contains dates field arrays in the format of [YYYY, M, D].
+ * @property cellDates
+ * @type Array[](Number[])
+ */
+ cellDates : null,
+
+ /**
+ * The id that uniquely identifies this calendar. This id should match the id of the placeholder element on the page.
+ * @property id
+ * @type String
+ */
+ id : null,
+
+ /**
+ * The DOM element reference that points to this calendar's container element. The calendar will be inserted into this element when the shell is rendered.
+ * @property oDomContainer
+ * @type HTMLElement
+ */
+ oDomContainer : null,
+
+ /**
+ * A Date object representing today's date.
+ * @property today
+ * @type Date
+ */
+ today : null,
+
+ /**
+ * The list of render functions, along with required parameters, used to render cells.
+ * @property renderStack
+ * @type Array[]
+ */
+ renderStack : null,
+
+ /**
+ * A copy of the initial render functions created before rendering.
+ * @property _renderStack
+ * @private
+ * @type Array
+ */
+ _renderStack : null,
+
+ /**
+ * The private list of initially selected dates.
+ * @property _selectedDates
+ * @private
+ * @type Array
+ */
+ _selectedDates : null,
+
+ /**
+ * A map of DOM event handlers to attach to cells associated with specific CSS class names
+ * @property domEventMap
+ * @type Object
+ */
+ domEventMap : null
+};
+
+
+
+/**
+* Initializes the Calendar widget.
+* @method init
+* @param {String} id The id of the table element that will represent the calendar widget
+* @param {String} containerId The id of the container div element that will wrap the calendar table
+* @param {Object} config The configuration object containing the Calendar's arguments
+*/
+YAHOO.widget.Calendar.prototype.init = function(id, containerId, config) {
+ this.initEvents();
+ this.today = new Date();
+ YAHOO.widget.DateMath.clearTime(this.today);
+
+ this.id = id;
+ this.oDomContainer = document.getElementById(containerId);
+
+ /**
+ * The Config object used to hold the configuration variables for the Calendar
+ * @property cfg
+ * @type YAHOO.util.Config
+ */
+ this.cfg = new YAHOO.util.Config(this);
+
+ /**
+ * The local object which contains the Calendar's options
+ * @property Options
+ * @type Object
+ */
+ this.Options = {};
+
+ /**
+ * The local object which contains the Calendar's locale settings
+ * @property Locale
+ * @type Object
+ */
+ this.Locale = {};
+
+ this.initStyles();
+
+ YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER);
+ YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE);
+
+ this.cellDates = [];
+ this.cells = [];
+ this.renderStack = [];
+ this._renderStack = [];
+
+ this.setupConfig();
+
+ if (config) {
+ this.cfg.applyConfig(config, true);
+ }
+
+ this.cfg.fireQueue();
+};
+
+/**
+* Renders the built-in IFRAME shim for the IE6 and below
+* @method configIframe
+*/
+YAHOO.widget.Calendar.prototype.configIframe = function(type, args, obj) {
+ var useIframe = args[0];
+
+ if (!this.parent) {
+ if (YAHOO.util.Dom.inDocument(this.oDomContainer)) {
+ if (useIframe) {
+ var pos = YAHOO.util.Dom.getStyle(this.oDomContainer, "position");
+
+ if (this.browser == "ie" && (pos == "absolute" || pos == "relative")) {
+ if (! YAHOO.util.Dom.inDocument(this.iframe)) {
+ this.iframe = document.createElement("iframe");
+ this.iframe.src = "javascript:false;";
+ YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
+ this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
+ }
+ }
+ } else {
+ if (this.iframe) {
+ if (this.iframe.parentNode) {
+ this.iframe.parentNode.removeChild(this.iframe);
+ }
+ this.iframe = null;
+ }
+ }
+ }
+ }
+};
+
+/**
+* Default handler for the "title" property
+* @method configTitle
+*/
+YAHOO.widget.Calendar.prototype.configTitle = function(type, args, obj) {
+ var title = args[0];
+ var close = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);
+
+ var titleDiv;
+
+ if (title && title !== "") {
+ titleDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div");
+ titleDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE;
+ titleDiv.innerHTML = title;
+ this.oDomContainer.insertBefore(titleDiv, this.oDomContainer.firstChild);
+ YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
+ } else {
+ titleDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null;
+
+ if (titleDiv) {
+ YAHOO.util.Event.purgeElement(titleDiv);
+ this.oDomContainer.removeChild(titleDiv);
+ }
+ if (! close) {
+ YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
+ }
+ }
+};
+
+/**
+* Default handler for the "close" property
+* @method configClose
+*/
+YAHOO.widget.Calendar.prototype.configClose = function(type, args, obj) {
+ var close = args[0];
+ var title = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);
+
+ var DEPR_CLOSE_PATH = "us/my/bn/x_d.gif";
+
+ var linkClose;
+
+ if (close === true) {
+ linkClose = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || document.createElement("a");
+ linkClose.href = "#";
+ linkClose.className = "link-close";
+ YAHOO.util.Event.addListener(linkClose, "click", function(e, cal) {cal.hide(); YAHOO.util.Event.preventDefault(e); }, this);
+
+ if (YAHOO.widget.Calendar.IMG_ROOT !== null) {
+ var imgClose = document.createElement("img");
+ imgClose.src = YAHOO.widget.Calendar.IMG_ROOT + DEPR_CLOSE_PATH;
+ imgClose.className = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE;
+ linkClose.appendChild(imgClose);
+ } else {
+ linkClose.innerHTML = ' ';
+ }
+
+ this.oDomContainer.appendChild(linkClose);
+ YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
+ } else {
+ linkClose = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || null;
+ if (linkClose) {
+ YAHOO.util.Event.purgeElement(linkClose);
+ this.oDomContainer.removeChild(linkClose);
+ }
+ if (! title || title === "") {
+ YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
+ }
+ }
+};
+
+/**
+* Initializes Calendar's built-in CustomEvents
+* @method initEvents
+*/
+YAHOO.widget.Calendar.prototype.initEvents = function() {
+
+ var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
+
+ /**
+ * Fired before a selection is made
+ * @event beforeSelectEvent
+ */
+ this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT);
+
+ /**
+ * Fired when a selection is made
+ * @event selectEvent
+ * @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
+ */
+ this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT);
+
+ /**
+ * Fired before a selection is made
+ * @event beforeDeselectEvent
+ */
+ this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT);
+
+ /**
+ * Fired when a selection is made
+ * @event deselectEvent
+ * @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
+ */
+ this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT);
+
+ /**
+ * Fired when the Calendar page is changed
+ * @event changePageEvent
+ */
+ this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);
+
+ /**
+ * Fired before the Calendar is rendered
+ * @event beforeRenderEvent
+ */
+ this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
+
+ /**
+ * Fired when the Calendar is rendered
+ * @event renderEvent
+ */
+ this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
+
+ /**
+ * Fired when the Calendar is reset
+ * @event resetEvent
+ */
+ this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET);
+
+ /**
+ * Fired when the Calendar is cleared
+ * @event clearEvent
+ */
+ this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
+
+ this.beforeSelectEvent.subscribe(this.onBeforeSelect, this, true);
+ this.selectEvent.subscribe(this.onSelect, this, true);
+ this.beforeDeselectEvent.subscribe(this.onBeforeDeselect, this, true);
+ this.deselectEvent.subscribe(this.onDeselect, this, true);
+ this.changePageEvent.subscribe(this.onChangePage, this, true);
+ this.renderEvent.subscribe(this.onRender, this, true);
+ this.resetEvent.subscribe(this.onReset, this, true);
+ this.clearEvent.subscribe(this.onClear, this, true);
+};
+
+/**
+* The default event function that is attached to a date link within a calendar cell
+* when the calendar is rendered.
+* @method doSelectCell
+* @param {DOMEvent} e The event
+* @param {Calendar} cal A reference to the calendar passed by the Event utility
+*/
+YAHOO.widget.Calendar.prototype.doSelectCell = function(e, cal) {
+ var cell,index,d,date;
+
+ var target = YAHOO.util.Event.getTarget(e);
+ var tagName = target.tagName.toLowerCase();
+ var defSelector = false;
+
+ while (tagName != "td" && ! YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
+
+ if (!defSelector && tagName == "a" && YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTOR)) {
+ defSelector = true;
+ }
+
+ target = target.parentNode;
+ tagName = target.tagName.toLowerCase();
+ if (tagName == "html") {
+ return;
+ }
+ }
+
+ if (defSelector) {
+ // Stop link href navigation for default renderer
+ YAHOO.util.Event.preventDefault(e);
+ }
+
+ cell = target;
+
+ if (YAHOO.util.Dom.hasClass(cell, cal.Style.CSS_CELL_SELECTABLE)) {
+ index = cell.id.split("cell")[1];
+ d = cal.cellDates[index];
+ date = new Date(d[0],d[1]-1,d[2]);
+
+ var link;
+
+ if (cal.Options.MULTI_SELECT) {
+ link = cell.getElementsByTagName("a")[0];
+ if (link) {
+ link.blur();
+ }
+
+ var cellDate = cal.cellDates[index];
+ var cellDateIndex = cal._indexOfSelectedFieldArray(cellDate);
+
+ if (cellDateIndex > -1) {
+ cal.deselectCell(index);
+ } else {
+ cal.selectCell(index);
+ }
+
+ } else {
+ link = cell.getElementsByTagName("a")[0];
+ if (link) {
+ link.blur();
+ }
+ cal.selectCell(index);
+ }
+ }
+};
+
+/**
+* The event that is executed when the user hovers over a cell
+* @method doCellMouseOver
+* @param {DOMEvent} e The event
+* @param {Calendar} cal A reference to the calendar passed by the Event utility
+*/
+YAHOO.widget.Calendar.prototype.doCellMouseOver = function(e, cal) {
+ var target;
+ if (e) {
+ target = YAHOO.util.Event.getTarget(e);
+ } else {
+ target = this;
+ }
+
+ while (target.tagName.toLowerCase() != "td") {
+ target = target.parentNode;
+ if (target.tagName.toLowerCase() == "html") {
+ return;
+ }
+ }
+
+ if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
+ YAHOO.util.Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
+ }
+};
+
+/**
+* The event that is executed when the user moves the mouse out of a cell
+* @method doCellMouseOut
+* @param {DOMEvent} e The event
+* @param {Calendar} cal A reference to the calendar passed by the Event utility
+*/
+YAHOO.widget.Calendar.prototype.doCellMouseOut = function(e, cal) {
+ var target;
+ if (e) {
+ target = YAHOO.util.Event.getTarget(e);
+ } else {
+ target = this;
+ }
+
+ while (target.tagName.toLowerCase() != "td") {
+ target = target.parentNode;
+ if (target.tagName.toLowerCase() == "html") {
+ return;
+ }
+ }
+
+ if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
+ YAHOO.util.Dom.removeClass(target, cal.Style.CSS_CELL_HOVER);
+ }
+};
+
+YAHOO.widget.Calendar.prototype.setupConfig = function() {
+
+ var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+ /**
+ * The month/year representing the current visible Calendar date (mm/yyyy)
+ * @config pagedate
+ * @type String
+ * @default today's date
+ */
+ this.cfg.addProperty(defCfg.PAGEDATE.key, { value:defCfg.PAGEDATE.value, handler:this.configPageDate } );
+
+ /**
+ * The date or range of dates representing the current Calendar selection
+ * @config selected
+ * @type String
+ * @default []
+ */
+ this.cfg.addProperty(defCfg.SELECTED.key, { value:defCfg.SELECTED.value, handler:this.configSelected } );
+
+ /**
+ * The title to display above the Calendar's month header
+ * @config title
+ * @type String
+ * @default ""
+ */
+ this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
+
+ /**
+ * Whether or not a close button should be displayed for this Calendar
+ * @config close
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
+
+ /**
+ * Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
+ * @config iframe
+ * @type Boolean
+ * @default true
+ */
+ this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
+
+ /**
+ * The minimum selectable date in the current Calendar (mm/dd/yyyy)
+ * @config mindate
+ * @type String
+ * @default null
+ */
+ this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.configMinDate } );
+
+ /**
+ * The maximum selectable date in the current Calendar (mm/dd/yyyy)
+ * @config maxdate
+ * @type String
+ * @default null
+ */
+ this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.configMaxDate } );
+
+
+ // Options properties
+
+ /**
+ * True if the Calendar should allow multiple selections. False by default.
+ * @config MULTI_SELECT
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(defCfg.MULTI_SELECT.key, { value:defCfg.MULTI_SELECT.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+
+ /**
+ * The weekday the week begins on. Default is 0 (Sunday).
+ * @config START_WEEKDAY
+ * @type number
+ * @default 0
+ */
+ this.cfg.addProperty(defCfg.START_WEEKDAY.key, { value:defCfg.START_WEEKDAY.value, handler:this.configOptions, validator:this.cfg.checkNumber } );
+
+ /**
+ * True if the Calendar should show weekday labels. True by default.
+ * @config SHOW_WEEKDAYS
+ * @type Boolean
+ * @default true
+ */
+ this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key, { value:defCfg.SHOW_WEEKDAYS.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+
+ /**
+ * True if the Calendar should show week row headers. False by default.
+ * @config SHOW_WEEK_HEADER
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key, { value:defCfg.SHOW_WEEK_HEADER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+
+ /**
+ * True if the Calendar should show week row footers. False by default.
+ * @config SHOW_WEEK_FOOTER
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+
+ /**
+ * True if the Calendar should suppress weeks that are not a part of the current month. False by default.
+ * @config HIDE_BLANK_WEEKS
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key, { value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+
+ /**
+ * The image that should be used for the left navigation arrow.
+ * @config NAV_ARROW_LEFT
+ * @type String
+ * @deprecated You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"
+ * @default null
+ */
+ this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key, { value:defCfg.NAV_ARROW_LEFT.value, handler:this.configOptions } );
+
+ /**
+ * The image that should be used for the right navigation arrow.
+ * @config NAV_ARROW_RIGHT
+ * @type String
+ * @deprecated You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
+ * @default null
+ */
+ this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key, { value:defCfg.NAV_ARROW_RIGHT.value, handler:this.configOptions } );
+
+ // Locale properties
+
+ /**
+ * The short month labels for the current locale.
+ * @config MONTHS_SHORT
+ * @type String[]
+ * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+ */
+ this.cfg.addProperty(defCfg.MONTHS_SHORT.key, { value:defCfg.MONTHS_SHORT.value, handler:this.configLocale } );
+
+ /**
+ * The long month labels for the current locale.
+ * @config MONTHS_LONG
+ * @type String[]
+ * @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ */
+ this.cfg.addProperty(defCfg.MONTHS_LONG.key, { value:defCfg.MONTHS_LONG.value, handler:this.configLocale } );
+
+ /**
+ * The 1-character weekday labels for the current locale.
+ * @config WEEKDAYS_1CHAR
+ * @type String[]
+ * @default ["S", "M", "T", "W", "T", "F", "S"]
+ */
+ this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key, { value:defCfg.WEEKDAYS_1CHAR.value, handler:this.configLocale } );
+
+ /**
+ * The short weekday labels for the current locale.
+ * @config WEEKDAYS_SHORT
+ * @type String[]
+ * @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
+ */
+ this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key, { value:defCfg.WEEKDAYS_SHORT.value, handler:this.configLocale } );
+
+ /**
+ * The medium weekday labels for the current locale.
+ * @config WEEKDAYS_MEDIUM
+ * @type String[]
+ * @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+ */
+ this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key, { value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.configLocale } );
+
+ /**
+ * The long weekday labels for the current locale.
+ * @config WEEKDAYS_LONG
+ * @type String[]
+ * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+ */
+ this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key, { value:defCfg.WEEKDAYS_LONG.value, handler:this.configLocale } );
+
+ /**
+ * Refreshes the locale values used to build the Calendar.
+ * @method refreshLocale
+ * @private
+ */
+ var refreshLocale = function() {
+ this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
+ this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
+ };
+
+ this.cfg.subscribeToConfigEvent(defCfg.START_WEEKDAY.key, refreshLocale, this, true);
+ this.cfg.subscribeToConfigEvent(defCfg.MONTHS_SHORT.key, refreshLocale, this, true);
+ this.cfg.subscribeToConfigEvent(defCfg.MONTHS_LONG.key, refreshLocale, this, true);
+ this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_1CHAR.key, refreshLocale, this, true);
+ this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_SHORT.key, refreshLocale, this, true);
+ this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_MEDIUM.key, refreshLocale, this, true);
+ this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_LONG.key, refreshLocale, this, true);
+
+ /**
+ * The setting that determines which length of month labels should be used. Possible values are "short" and "long".
+ * @config LOCALE_MONTHS
+ * @type String
+ * @default "long"
+ */
+ this.cfg.addProperty(defCfg.LOCALE_MONTHS.key, { value:defCfg.LOCALE_MONTHS.value, handler:this.configLocaleValues } );
+
+ /**
+ * The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
+ * @config LOCALE_WEEKDAYS
+ * @type String
+ * @default "short"
+ */
+ this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key, { value:defCfg.LOCALE_WEEKDAYS.value, handler:this.configLocaleValues } );
+
+ /**
+ * The value used to delimit individual dates in a date string passed to various Calendar functions.
+ * @config DATE_DELIMITER
+ * @type String
+ * @default ","
+ */
+ this.cfg.addProperty(defCfg.DATE_DELIMITER.key, { value:defCfg.DATE_DELIMITER.value, handler:this.configLocale } );
+
+ /**
+ * The value used to delimit date fields in a date string passed to various Calendar functions.
+ * @config DATE_FIELD_DELIMITER
+ * @type String
+ * @default "/"
+ */
+ this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key, { value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.configLocale } );
+
+ /**
+ * The value used to delimit date ranges in a date string passed to various Calendar functions.
+ * @config DATE_RANGE_DELIMITER
+ * @type String
+ * @default "-"
+ */
+ this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key, { value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.configLocale } );
+
+ /**
+ * The position of the month in a month/year date string
+ * @config MY_MONTH_POSITION
+ * @type Number
+ * @default 1
+ */
+ this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key, { value:defCfg.MY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the year in a month/year date string
+ * @config MY_YEAR_POSITION
+ * @type Number
+ * @default 2
+ */
+ this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key, { value:defCfg.MY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the month in a month/day date string
+ * @config MD_MONTH_POSITION
+ * @type Number
+ * @default 1
+ */
+ this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key, { value:defCfg.MD_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the day in a month/year date string
+ * @config MD_DAY_POSITION
+ * @type Number
+ * @default 2
+ */
+ this.cfg.addProperty(defCfg.MD_DAY_POSITION.key, { value:defCfg.MD_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the month in a month/day/year date string
+ * @config MDY_MONTH_POSITION
+ * @type Number
+ * @default 1
+ */
+ this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key, { value:defCfg.MDY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the day in a month/day/year date string
+ * @config MDY_DAY_POSITION
+ * @type Number
+ * @default 2
+ */
+ this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key, { value:defCfg.MDY_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the year in a month/day/year date string
+ * @config MDY_YEAR_POSITION
+ * @type Number
+ * @default 3
+ */
+ this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key, { value:defCfg.MDY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+};
+
+/**
+* The default handler for the "pagedate" property
+* @method configPageDate
+*/
+YAHOO.widget.Calendar.prototype.configPageDate = function(type, args, obj) {
+ this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key, this._parsePageDate(args[0]), true);
+};
+
+/**
+* The default handler for the "mindate" property
+* @method configMinDate
+*/
+YAHOO.widget.Calendar.prototype.configMinDate = function(type, args, obj) {
+ var val = args[0];
+ if (YAHOO.lang.isString(val)) {
+ val = this._parseDate(val);
+ this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key, new Date(val[0],(val[1]-1),val[2]));
+ }
+};
+
+/**
+* The default handler for the "maxdate" property
+* @method configMaxDate
+*/
+YAHOO.widget.Calendar.prototype.configMaxDate = function(type, args, obj) {
+ var val = args[0];
+ if (YAHOO.lang.isString(val)) {
+ val = this._parseDate(val);
+ this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key, new Date(val[0],(val[1]-1),val[2]));
+ }
+};
+
+/**
+* The default handler for the "selected" property
+* @method configSelected
+*/
+YAHOO.widget.Calendar.prototype.configSelected = function(type, args, obj) {
+ var selected = args[0];
+ var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+
+ if (selected) {
+ if (YAHOO.lang.isString(selected)) {
+ this.cfg.setProperty(cfgSelected, this._parseDates(selected), true);
+ }
+ }
+ if (! this._selectedDates) {
+ this._selectedDates = this.cfg.getProperty(cfgSelected);
+ }
+};
+
+/**
+* The default handler for all configuration options properties
+* @method configOptions
+*/
+YAHOO.widget.Calendar.prototype.configOptions = function(type, args, obj) {
+ this.Options[type.toUpperCase()] = args[0];
+};
+
+/**
+* The default handler for all configuration locale properties
+* @method configLocale
+*/
+YAHOO.widget.Calendar.prototype.configLocale = function(type, args, obj) {
+ var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+ this.Locale[type.toUpperCase()] = args[0];
+
+ this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
+ this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
+};
+
+/**
+* The default handler for all configuration locale field length properties
+* @method configLocaleValues
+*/
+YAHOO.widget.Calendar.prototype.configLocaleValues = function(type, args, obj) {
+ var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+ type = type.toLowerCase();
+ var val = args[0];
+
+ switch (type) {
+ case defCfg.LOCALE_MONTHS.key:
+ switch (val) {
+ case YAHOO.widget.Calendar.SHORT:
+ this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_SHORT.key).concat();
+ break;
+ case YAHOO.widget.Calendar.LONG:
+ this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_LONG.key).concat();
+ break;
+ }
+ break;
+ case defCfg.LOCALE_WEEKDAYS.key:
+ switch (val) {
+ case YAHOO.widget.Calendar.ONE_CHAR:
+ this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_1CHAR.key).concat();
+ break;
+ case YAHOO.widget.Calendar.SHORT:
+ this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_SHORT.key).concat();
+ break;
+ case YAHOO.widget.Calendar.MEDIUM:
+ this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_MEDIUM.key).concat();
+ break;
+ case YAHOO.widget.Calendar.LONG:
+ this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_LONG.key).concat();
+ break;
+ }
+
+ var START_WEEKDAY = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
+
+ if (START_WEEKDAY > 0) {
+ for (var w=0;w";
+ html[html.length] = "";
+ html[html.length] = '\n ';
+
+ if (this.cfg.getProperty(defCfg.SHOW_WEEKDAYS.key)) {
+ html = this.buildWeekdays(html);
+ }
+
+ html[html.length] = '';
+
+ return html;
+};
+
+/**
+* Renders the Calendar's weekday headers.
+* @method buildWeekdays
+* @param {Array} html The current working HTML array
+* @return {Array} The current working HTML array
+*/
+YAHOO.widget.Calendar.prototype.buildWeekdays = function(html) {
+
+ var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+ html[html.length] = '';
+
+ if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
+ html[html.length] = ' ';
+ }
+
+ for(var i=0;i' + this.Locale.LOCALE_WEEKDAYS[i] + '';
+ }
+
+ if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
+ html[html.length] = ' ';
+ }
+
+ html[html.length] = ' ';
+
+ return html;
+};
+
+/**
+* Renders the calendar body.
+* @method renderBody
+* @param {Date} workingDate The current working Date being used for the render process
+* @param {Array} html The current working HTML array
+* @return {Array} The current working HTML array
+*/
+YAHOO.widget.Calendar.prototype.renderBody = function(workingDate, html) {
+ var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+ var startDay = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
+
+ this.preMonthDays = workingDate.getDay();
+ if (startDay > 0) {
+ this.preMonthDays -= startDay;
+ }
+ if (this.preMonthDays < 0) {
+ this.preMonthDays += 7;
+ }
+
+ this.monthDays = YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();
+ this.postMonthDays = YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;
+
+ workingDate = YAHOO.widget.DateMath.subtract(workingDate, YAHOO.widget.DateMath.DAY, this.preMonthDays);
+
+ var weekNum,weekClass;
+ var weekPrefix = "w";
+ var cellPrefix = "_cell";
+ var workingDayPrefix = "wd";
+ var dayPrefix = "d";
+
+ var cellRenderers;
+ var renderer;
+
+ var todayYear = this.today.getFullYear();
+ var todayMonth = this.today.getMonth();
+ var todayDate = this.today.getDate();
+
+ var useDate = this.cfg.getProperty(defCfg.PAGEDATE.key);
+ var hideBlankWeeks = this.cfg.getProperty(defCfg.HIDE_BLANK_WEEKS.key);
+ var showWeekFooter = this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key);
+ var showWeekHeader = this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key);
+ var mindate = this.cfg.getProperty(defCfg.MINDATE.key);
+ var maxdate = this.cfg.getProperty(defCfg.MAXDATE.key);
+
+ if (mindate) {
+ mindate = YAHOO.widget.DateMath.clearTime(mindate);
+ }
+ if (maxdate) {
+ maxdate = YAHOO.widget.DateMath.clearTime(maxdate);
+ }
+
+ html[html.length] = '';
+
+ var i = 0;
+
+ var tempDiv = document.createElement("div");
+ var cell = document.createElement("td");
+ tempDiv.appendChild(cell);
+
+ var jan1 = new Date(useDate.getFullYear(),0,1);
+
+ var cal = this.parent || this;
+
+ for (var r=0;r<6;r++) {
+
+ weekNum = YAHOO.widget.DateMath.getWeekNumber(workingDate, useDate.getFullYear(), startDay);
+ weekClass = weekPrefix + weekNum;
+
+ // Local OOM check for performance, since we already have pagedate
+ if (r !== 0 && hideBlankWeeks === true && workingDate.getMonth() != useDate.getMonth()) {
+ break;
+ } else {
+
+ html[html.length] = '';
+
+ if (showWeekHeader) { html = this.renderRowHeader(weekNum, html); }
+
+ for (var d=0;d<7;d++){ // Render actual days
+
+ cellRenderers = [];
+ renderer = null;
+
+ this.clearElement(cell);
+ cell.className = this.Style.CSS_CELL;
+ cell.id = this.id + cellPrefix + i;
+
+ if (workingDate.getDate() == todayDate &&
+ workingDate.getMonth() == todayMonth &&
+ workingDate.getFullYear() == todayYear) {
+ cellRenderers[cellRenderers.length]=cal.renderCellStyleToday;
+ }
+
+ var workingArray = [workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];
+ this.cellDates[this.cellDates.length] = workingArray; // Add this date to cellDates
+
+ // Local OOM check for performance, since we already have pagedate
+ if (workingDate.getMonth() != useDate.getMonth()) {
+ cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth;
+ } else {
+ YAHOO.util.Dom.addClass(cell, workingDayPrefix + workingDate.getDay());
+ YAHOO.util.Dom.addClass(cell, dayPrefix + workingDate.getDate());
+
+ for (var s=0;s= d1.getTime() && workingDate.getTime() <= d2.getTime()) {
+ renderer = rArray[2];
+
+ if (workingDate.getTime()==d2.getTime()) {
+ this.renderStack.splice(s,1);
+ }
+ }
+ break;
+ case YAHOO.widget.Calendar.WEEKDAY:
+
+ var weekday = rArray[1][0];
+ if (workingDate.getDay()+1 == weekday) {
+ renderer = rArray[2];
+ }
+ break;
+ case YAHOO.widget.Calendar.MONTH:
+
+ month = rArray[1][0];
+ if (workingDate.getMonth()+1 == month) {
+ renderer = rArray[2];
+ }
+ break;
+ }
+
+ if (renderer) {
+ cellRenderers[cellRenderers.length]=renderer;
+ }
+ }
+
+ }
+
+ if (this._indexOfSelectedFieldArray(workingArray) > -1) {
+ cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected;
+ }
+
+ if ((mindate && (workingDate.getTime() < mindate.getTime())) ||
+ (maxdate && (workingDate.getTime() > maxdate.getTime()))
+ ) {
+ cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate;
+ } else {
+ cellRenderers[cellRenderers.length]=cal.styleCellDefault;
+ cellRenderers[cellRenderers.length]=cal.renderCellDefault;
+ }
+
+ for (var x=0; x < cellRenderers.length; ++x) {
+ if (cellRenderers[x].call(cal, workingDate, cell) == YAHOO.widget.Calendar.STOP_RENDER) {
+ break;
+ }
+ }
+
+ workingDate.setTime(workingDate.getTime() + YAHOO.widget.DateMath.ONE_DAY_MS);
+
+ if (i >= 0 && i <= 6) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TOP);
+ }
+ if ((i % 7) === 0) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_LEFT);
+ }
+ if (((i+1) % 7) === 0) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RIGHT);
+ }
+
+ var postDays = this.postMonthDays;
+ if (hideBlankWeeks && postDays >= 7) {
+ var blankWeeks = Math.floor(postDays/7);
+ for (var p=0;p= ((this.preMonthDays+postDays+this.monthDays)-7)) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_BOTTOM);
+ }
+
+ html[html.length] = tempDiv.innerHTML;
+ i++;
+ }
+
+ if (showWeekFooter) { html = this.renderRowFooter(weekNum, html); }
+
+ html[html.length] = ' ';
+ }
+ }
+
+ html[html.length] = ' ';
+
+ return html;
+};
+
+/**
+* Renders the calendar footer. In the default implementation, there is
+* no footer.
+* @method renderFooter
+* @param {Array} html The current working HTML array
+* @return {Array} The current working HTML array
+*/
+YAHOO.widget.Calendar.prototype.renderFooter = function(html) { return html; };
+
+/**
+* Renders the calendar after it has been configured. The render() method has a specific call chain that will execute
+* when the method is called: renderHeader, renderBody, renderFooter.
+* Refer to the documentation for those methods for information on
+* individual render tasks.
+* @method render
+*/
+YAHOO.widget.Calendar.prototype.render = function() {
+ this.beforeRenderEvent.fire();
+
+ var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+
+ // Find starting day of the current month
+ var workingDate = YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(defCfg.PAGEDATE.key));
+
+ this.resetRenderers();
+ this.cellDates.length = 0;
+
+ YAHOO.util.Event.purgeElement(this.oDomContainer, true);
+
+ var html = [];
+
+ html[html.length] = '';
+ html = this.renderHeader(html);
+ html = this.renderBody(workingDate, html);
+ html = this.renderFooter(html);
+ html[html.length] = '
';
+
+ this.oDomContainer.innerHTML = html.join("\n");
+
+ this.applyListeners();
+ this.cells = this.oDomContainer.getElementsByTagName("td");
+
+ this.cfg.refireEvent(defCfg.TITLE.key);
+ this.cfg.refireEvent(defCfg.CLOSE.key);
+ this.cfg.refireEvent(defCfg.IFRAME.key);
+
+ this.renderEvent.fire();
+};
+
+/**
+* Applies the Calendar's DOM listeners to applicable elements.
+* @method applyListeners
+*/
+YAHOO.widget.Calendar.prototype.applyListeners = function() {
+
+ var root = this.oDomContainer;
+ var cal = this.parent || this;
+
+ var anchor = "a";
+ var mousedown = "mousedown";
+
+ var linkLeft = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root);
+ var linkRight = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root);
+
+ if (linkLeft && linkLeft.length > 0) {
+ this.linkLeft = linkLeft[0];
+ YAHOO.util.Event.addListener(this.linkLeft, mousedown, cal.previousMonth, cal, true);
+ }
+
+ if (linkRight && linkRight.length > 0) {
+ this.linkRight = linkRight[0];
+ YAHOO.util.Event.addListener(this.linkRight, mousedown, cal.nextMonth, cal, true);
+ }
+
+ if (this.domEventMap) {
+ var el,elements;
+ for (var cls in this.domEventMap) {
+ if (YAHOO.lang.hasOwnProperty(this.domEventMap, cls)) {
+ var items = this.domEventMap[cls];
+
+ if (! (items instanceof Array)) {
+ items = [items];
+ }
+
+ for (var i=0;i' + weekNum + '';
+ return html;
+};
+
+/**
+* Renders the row footer for a week.
+* @method renderRowFooter
+* @param {Number} weekNum The week number of the current row
+* @param {Array} cell The current working HTML array
+*/
+YAHOO.widget.Calendar.prototype.renderRowFooter = function(weekNum, html) {
+ html[html.length] = '';
+ return html;
+};
+
+/**
+* Renders a single standard calendar cell in the calendar widget table.
+* All logic for determining how a standard default cell will be rendered is
+* encapsulated in this method, and must be accounted for when extending the
+* widget class.
+* @method renderCellDefault
+* @param {Date} workingDate The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement} cell The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellDefault = function(workingDate, cell) {
+ cell.innerHTML = '' + this.buildDayLabel(workingDate) + " ";
+};
+
+/**
+* Styles a selectable cell.
+* @method styleCellDefault
+* @param {Date} workingDate The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement} cell The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.styleCellDefault = function(workingDate, cell) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTABLE);
+};
+
+
+/**
+* Renders a single standard calendar cell using the CSS hightlight1 style
+* @method renderCellStyleHighlight1
+* @param {Date} workingDate The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement} cell The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1 = function(workingDate, cell) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT1);
+};
+
+/**
+* Renders a single standard calendar cell using the CSS hightlight2 style
+* @method renderCellStyleHighlight2
+* @param {Date} workingDate The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement} cell The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2 = function(workingDate, cell) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT2);
+};
+
+/**
+* Renders a single standard calendar cell using the CSS hightlight3 style
+* @method renderCellStyleHighlight3
+* @param {Date} workingDate The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement} cell The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3 = function(workingDate, cell) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT3);
+};
+
+/**
+* Renders a single standard calendar cell using the CSS hightlight4 style
+* @method renderCellStyleHighlight4
+* @param {Date} workingDate The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement} cell The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4 = function(workingDate, cell) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT4);
+};
+
+/**
+* Applies the default style used for rendering today's date to the current calendar cell
+* @method renderCellStyleToday
+* @param {Date} workingDate The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement} cell The current working cell in the calendar
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleToday = function(workingDate, cell) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TODAY);
+};
+
+/**
+* Applies the default style used for rendering selected dates to the current calendar cell
+* @method renderCellStyleSelected
+* @param {Date} workingDate The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement} cell The current working cell in the calendar
+* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+* should not be terminated
+*/
+YAHOO.widget.Calendar.prototype.renderCellStyleSelected = function(workingDate, cell) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTED);
+};
+
+/**
+* Applies the default style used for rendering dates that are not a part of the current
+* month (preceding or trailing the cells for the current month)
+* @method renderCellNotThisMonth
+* @param {Date} workingDate The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement} cell The current working cell in the calendar
+* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+* should not be terminated
+*/
+YAHOO.widget.Calendar.prototype.renderCellNotThisMonth = function(workingDate, cell) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOM);
+ cell.innerHTML=workingDate.getDate();
+ return YAHOO.widget.Calendar.STOP_RENDER;
+};
+
+/**
+* Renders the current calendar cell as a non-selectable "black-out" date using the default
+* restricted style.
+* @method renderBodyCellRestricted
+* @param {Date} workingDate The current working Date object being used to generate the calendar
+* @param {HTMLTableCellElement} cell The current working cell in the calendar
+* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+* should not be terminated
+*/
+YAHOO.widget.Calendar.prototype.renderBodyCellRestricted = function(workingDate, cell) {
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL);
+ YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED);
+ cell.innerHTML=workingDate.getDate();
+ return YAHOO.widget.Calendar.STOP_RENDER;
+};
+
+// END BUILT-IN TABLE CELL RENDERERS
+
+// BEGIN MONTH NAVIGATION METHODS
+
+/**
+* Adds the designated number of months to the current calendar month, and sets the current
+* calendar page date to the new month.
+* @method addMonths
+* @param {Number} count The number of months to add to the current calendar
+*/
+YAHOO.widget.Calendar.prototype.addMonths = function(count) {
+ var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+ this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
+ this.resetRenderers();
+ this.changePageEvent.fire();
+};
+
+/**
+* Subtracts the designated number of months from the current calendar month, and sets the current
+* calendar page date to the new month.
+* @method subtractMonths
+* @param {Number} count The number of months to subtract from the current calendar
+*/
+YAHOO.widget.Calendar.prototype.subtractMonths = function(count) {
+ var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+ this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
+ this.resetRenderers();
+ this.changePageEvent.fire();
+};
+
+/**
+* Adds the designated number of years to the current calendar, and sets the current
+* calendar page date to the new month.
+* @method addYears
+* @param {Number} count The number of years to add to the current calendar
+*/
+YAHOO.widget.Calendar.prototype.addYears = function(count) {
+ var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+ this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
+ this.resetRenderers();
+ this.changePageEvent.fire();
+};
+
+/**
+* Subtcats the designated number of years from the current calendar, and sets the current
+* calendar page date to the new month.
+* @method subtractYears
+* @param {Number} count The number of years to subtract from the current calendar
+*/
+YAHOO.widget.Calendar.prototype.subtractYears = function(count) {
+ var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+ this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
+ this.resetRenderers();
+ this.changePageEvent.fire();
+};
+
+/**
+* Navigates to the next month page in the calendar widget.
+* @method nextMonth
+*/
+YAHOO.widget.Calendar.prototype.nextMonth = function() {
+ this.addMonths(1);
+};
+
+/**
+* Navigates to the previous month page in the calendar widget.
+* @method previousMonth
+*/
+YAHOO.widget.Calendar.prototype.previousMonth = function() {
+ this.subtractMonths(1);
+};
+
+/**
+* Navigates to the next year in the currently selected month in the calendar widget.
+* @method nextYear
+*/
+YAHOO.widget.Calendar.prototype.nextYear = function() {
+ this.addYears(1);
+};
+
+/**
+* Navigates to the previous year in the currently selected month in the calendar widget.
+* @method previousYear
+*/
+YAHOO.widget.Calendar.prototype.previousYear = function() {
+ this.subtractYears(1);
+};
+
+// END MONTH NAVIGATION METHODS
+
+// BEGIN SELECTION METHODS
+
+/**
+* Resets the calendar widget to the originally selected month and year, and
+* sets the calendar to the initial selection(s).
+* @method reset
+*/
+YAHOO.widget.Calendar.prototype.reset = function() {
+ var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+ this.cfg.resetProperty(defCfg.SELECTED.key);
+ this.cfg.resetProperty(defCfg.PAGEDATE.key);
+ this.resetEvent.fire();
+};
+
+/**
+* Clears the selected dates in the current calendar widget and sets the calendar
+* to the current month and year.
+* @method clear
+*/
+YAHOO.widget.Calendar.prototype.clear = function() {
+ var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+ this.cfg.setProperty(defCfg.SELECTED.key, []);
+ this.cfg.setProperty(defCfg.PAGEDATE.key, new Date(this.today.getTime()));
+ this.clearEvent.fire();
+};
+
+/**
+* Selects a date or a collection of dates on the current calendar. This method, by default,
+* does not call the render method explicitly. Once selection has completed, render must be
+* called for the changes to be reflected visually.
+* @method select
+* @param {String/Date/Date[]} date The date string of dates to select in the current calendar. Valid formats are
+* individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+* Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+* This method can also take a JavaScript Date object or an array of Date objects.
+* @return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected.
+*/
+YAHOO.widget.Calendar.prototype.select = function(date) {
+ this.beforeSelectEvent.fire();
+
+ var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+
+ var selected = this.cfg.getProperty(cfgSelected);
+ var aToBeSelected = this._toFieldArray(date);
+
+ for (var a=0;a -1) {
+ if (this.cfg.getProperty(defCfg.PAGEDATE.key).getMonth() == dCellDate.getMonth() &&
+ this.cfg.getProperty(defCfg.PAGEDATE.key).getFullYear() == dCellDate.getFullYear()) {
+ YAHOO.util.Dom.removeClass(cell, this.Style.CSS_CELL_SELECTED);
+ }
+
+ selected.splice(cellDateIndex, 1);
+ }
+
+ if (this.parent) {
+ this.parent.cfg.setProperty(defCfg.SELECTED.key, selected);
+ } else {
+ this.cfg.setProperty(defCfg.SELECTED.key, selected);
+ }
+
+ this.deselectEvent.fire(selectDate);
+ return this.getSelectedDates();
+};
+
+/**
+* Deselects all dates on the current calendar.
+* @method deselectAll
+* @return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected.
+* Assuming that this function executes properly, the return value should be an empty array.
+* However, the empty array is returned for the sake of being able to check the selection status
+* of the calendar.
+*/
+YAHOO.widget.Calendar.prototype.deselectAll = function() {
+ this.beforeDeselectEvent.fire();
+
+ var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+
+ var selected = this.cfg.getProperty(cfgSelected);
+ var count = selected.length;
+ var sel = selected.concat();
+
+ if (this.parent) {
+ this.parent.cfg.setProperty(cfgSelected, []);
+ } else {
+ this.cfg.setProperty(cfgSelected, []);
+ }
+
+ if (count > 0) {
+ this.deselectEvent.fire(sel);
+ }
+
+ return this.getSelectedDates();
+};
+
+// END SELECTION METHODS
+
+// BEGIN TYPE CONVERSION METHODS
+
+/**
+* Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
+* used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
+* @method _toFieldArray
+* @private
+* @param {String/Date/Date[]} date The date string of dates to deselect in the current calendar. Valid formats are
+* individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+* Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+* This method can also take a JavaScript Date object or an array of Date objects.
+* @return {Array[](Number[])} Array of date field arrays
+*/
+YAHOO.widget.Calendar.prototype._toFieldArray = function(date) {
+ var returnDate = [];
+
+ if (date instanceof Date) {
+ returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]];
+ } else if (YAHOO.lang.isString(date)) {
+ returnDate = this._parseDates(date);
+ } else if (YAHOO.lang.isArray(date)) {
+ for (var i=0;i
+*
+*
+*
+* The tables for the calendars ("cal1_0" and "cal1_1") will be inserted into those containers.
+* @namespace YAHOO.widget
+* @class CalendarGroup
+* @constructor
+* @param {String} id The id of the table element that will represent the calendar widget
+* @param {String} containerId The id of the container div element that will wrap the calendar table
+* @param {Object} config The configuration object containing the Calendar's arguments
+*/
+YAHOO.widget.CalendarGroup = function(id, containerId, config) {
+ if (arguments.length > 0) {
+ this.init(id, containerId, config);
+ }
+};
+
+/**
+* Initializes the calendar group. All subclasses must call this method in order for the
+* group to be initialized properly.
+* @method init
+* @param {String} id The id of the table element that will represent the calendar widget
+* @param {String} containerId The id of the container div element that will wrap the calendar table
+* @param {Object} config The configuration object containing the Calendar's arguments
+*/
+YAHOO.widget.CalendarGroup.prototype.init = function(id, containerId, config) {
+ this.initEvents();
+ this.initStyles();
+
+ /**
+ * The collection of Calendar pages contained within the CalendarGroup
+ * @property pages
+ * @type YAHOO.widget.Calendar[]
+ */
+ this.pages = [];
+
+ /**
+ * The unique id associated with the CalendarGroup
+ * @property id
+ * @type String
+ */
+ this.id = id;
+
+ /**
+ * The unique id associated with the CalendarGroup container
+ * @property containerId
+ * @type String
+ */
+ this.containerId = containerId;
+
+ /**
+ * The outer containing element for the CalendarGroup
+ * @property oDomContainer
+ * @type HTMLElement
+ */
+ this.oDomContainer = document.getElementById(containerId);
+
+ YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_CONTAINER);
+ YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_MULTI_UP);
+
+ /**
+ * The Config object used to hold the configuration variables for the CalendarGroup
+ * @property cfg
+ * @type YAHOO.util.Config
+ */
+ this.cfg = new YAHOO.util.Config(this);
+
+ /**
+ * The local object which contains the CalendarGroup's options
+ * @property Options
+ * @type Object
+ */
+ this.Options = {};
+
+ /**
+ * The local object which contains the CalendarGroup's locale settings
+ * @property Locale
+ * @type Object
+ */
+ this.Locale = {};
+
+ this.setupConfig();
+
+ if (config) {
+ this.cfg.applyConfig(config, true);
+ }
+
+ this.cfg.fireQueue();
+
+ // OPERA HACK FOR MISWRAPPED FLOATS
+ if (this.browser == "opera"){
+ var fixWidth = function() {
+ var startW = this.oDomContainer.offsetWidth;
+ var w = 0;
+ for (var p=0;p 0) {
+ this.oDomContainer.style.width = w + "px";
+ }
+ };
+ this.renderEvent.subscribe(fixWidth,this,true);
+ }
+};
+
+
+YAHOO.widget.CalendarGroup.prototype.setupConfig = function() {
+
+ var defCfg = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;
+
+ /**
+ * The number of pages to include in the CalendarGroup. This value can only be set once, in the CalendarGroup's constructor arguments.
+ * @config pages
+ * @type Number
+ * @default 2
+ */
+ this.cfg.addProperty(defCfg.PAGES.key, { value:defCfg.PAGES.value, validator:this.cfg.checkNumber, handler:this.configPages } );
+
+ /**
+ * The month/year representing the current visible Calendar date (mm/yyyy)
+ * @config pagedate
+ * @type String
+ * @default today's date
+ */
+ this.cfg.addProperty(defCfg.PAGEDATE.key, { value:defCfg.PAGEDATE.value, handler:this.configPageDate } );
+
+ /**
+ * The date or range of dates representing the current Calendar selection
+ * @config selected
+ * @type String
+ * @default []
+ */
+ this.cfg.addProperty(defCfg.SELECTED.key, { value:defCfg.SELECTED.value, handler:this.configSelected } );
+
+ /**
+ * The title to display above the CalendarGroup's month header
+ * @config title
+ * @type String
+ * @default ""
+ */
+ this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
+
+ /**
+ * Whether or not a close button should be displayed for this CalendarGroup
+ * @config close
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
+
+ /**
+ * Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
+ * @config iframe
+ * @type Boolean
+ * @default true
+ */
+ this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
+
+ /**
+ * The minimum selectable date in the current Calendar (mm/dd/yyyy)
+ * @config mindate
+ * @type String
+ * @default null
+ */
+ this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.delegateConfig } );
+
+ /**
+ * The maximum selectable date in the current Calendar (mm/dd/yyyy)
+ * @config maxdate
+ * @type String
+ * @default null
+ */
+ this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.delegateConfig } );
+
+ // Options properties
+
+ /**
+ * True if the Calendar should allow multiple selections. False by default.
+ * @config MULTI_SELECT
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(defCfg.MULTI_SELECT.key, { value:defCfg.MULTI_SELECT.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+
+ /**
+ * The weekday the week begins on. Default is 0 (Sunday).
+ * @config START_WEEKDAY
+ * @type number
+ * @default 0
+ */
+ this.cfg.addProperty(defCfg.START_WEEKDAY.key, { value:defCfg.START_WEEKDAY.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+
+ /**
+ * True if the Calendar should show weekday labels. True by default.
+ * @config SHOW_WEEKDAYS
+ * @type Boolean
+ * @default true
+ */
+ this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key, { value:defCfg.SHOW_WEEKDAYS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+
+ /**
+ * True if the Calendar should show week row headers. False by default.
+ * @config SHOW_WEEK_HEADER
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key,{ value:defCfg.SHOW_WEEK_HEADER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+
+ /**
+ * True if the Calendar should show week row footers. False by default.
+ * @config SHOW_WEEK_FOOTER
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+
+ /**
+ * True if the Calendar should suppress weeks that are not a part of the current month. False by default.
+ * @config HIDE_BLANK_WEEKS
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key,{ value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+
+ /**
+ * The image that should be used for the left navigation arrow.
+ * @config NAV_ARROW_LEFT
+ * @type String
+ * @deprecated You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"
+ * @default null
+ */
+ this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key, { value:defCfg.NAV_ARROW_LEFT.value, handler:this.delegateConfig } );
+
+ /**
+ * The image that should be used for the right navigation arrow.
+ * @config NAV_ARROW_RIGHT
+ * @type String
+ * @deprecated You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
+ * @default null
+ */
+ this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key, { value:defCfg.NAV_ARROW_RIGHT.value, handler:this.delegateConfig } );
+
+ // Locale properties
+
+ /**
+ * The short month labels for the current locale.
+ * @config MONTHS_SHORT
+ * @type String[]
+ * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+ */
+ this.cfg.addProperty(defCfg.MONTHS_SHORT.key, { value:defCfg.MONTHS_SHORT.value, handler:this.delegateConfig } );
+
+ /**
+ * The long month labels for the current locale.
+ * @config MONTHS_LONG
+ * @type String[]
+ * @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ */
+ this.cfg.addProperty(defCfg.MONTHS_LONG.key, { value:defCfg.MONTHS_LONG.value, handler:this.delegateConfig } );
+
+ /**
+ * The 1-character weekday labels for the current locale.
+ * @config WEEKDAYS_1CHAR
+ * @type String[]
+ * @default ["S", "M", "T", "W", "T", "F", "S"]
+ */
+ this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key, { value:defCfg.WEEKDAYS_1CHAR.value, handler:this.delegateConfig } );
+
+ /**
+ * The short weekday labels for the current locale.
+ * @config WEEKDAYS_SHORT
+ * @type String[]
+ * @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
+ */
+ this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key, { value:defCfg.WEEKDAYS_SHORT.value, handler:this.delegateConfig } );
+
+ /**
+ * The medium weekday labels for the current locale.
+ * @config WEEKDAYS_MEDIUM
+ * @type String[]
+ * @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+ */
+ this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key, { value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.delegateConfig } );
+
+ /**
+ * The long weekday labels for the current locale.
+ * @config WEEKDAYS_LONG
+ * @type String[]
+ * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+ */
+ this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key, { value:defCfg.WEEKDAYS_LONG.value, handler:this.delegateConfig } );
+
+ /**
+ * The setting that determines which length of month labels should be used. Possible values are "short" and "long".
+ * @config LOCALE_MONTHS
+ * @type String
+ * @default "long"
+ */
+ this.cfg.addProperty(defCfg.LOCALE_MONTHS.key, { value:defCfg.LOCALE_MONTHS.value, handler:this.delegateConfig } );
+
+ /**
+ * The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
+ * @config LOCALE_WEEKDAYS
+ * @type String
+ * @default "short"
+ */
+ this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key, { value:defCfg.LOCALE_WEEKDAYS.value, handler:this.delegateConfig } );
+
+ /**
+ * The value used to delimit individual dates in a date string passed to various Calendar functions.
+ * @config DATE_DELIMITER
+ * @type String
+ * @default ","
+ */
+ this.cfg.addProperty(defCfg.DATE_DELIMITER.key, { value:defCfg.DATE_DELIMITER.value, handler:this.delegateConfig } );
+
+ /**
+ * The value used to delimit date fields in a date string passed to various Calendar functions.
+ * @config DATE_FIELD_DELIMITER
+ * @type String
+ * @default "/"
+ */
+ this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key,{ value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.delegateConfig } );
+
+ /**
+ * The value used to delimit date ranges in a date string passed to various Calendar functions.
+ * @config DATE_RANGE_DELIMITER
+ * @type String
+ * @default "-"
+ */
+ this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key,{ value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.delegateConfig } );
+
+ /**
+ * The position of the month in a month/year date string
+ * @config MY_MONTH_POSITION
+ * @type Number
+ * @default 1
+ */
+ this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key, { value:defCfg.MY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the year in a month/year date string
+ * @config MY_YEAR_POSITION
+ * @type Number
+ * @default 2
+ */
+ this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key, { value:defCfg.MY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the month in a month/day date string
+ * @config MD_MONTH_POSITION
+ * @type Number
+ * @default 1
+ */
+ this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key, { value:defCfg.MD_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the day in a month/year date string
+ * @config MD_DAY_POSITION
+ * @type Number
+ * @default 2
+ */
+ this.cfg.addProperty(defCfg.MD_DAY_POSITION.key, { value:defCfg.MD_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the month in a month/day/year date string
+ * @config MDY_MONTH_POSITION
+ * @type Number
+ * @default 1
+ */
+ this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key, { value:defCfg.MDY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the day in a month/day/year date string
+ * @config MDY_DAY_POSITION
+ * @type Number
+ * @default 2
+ */
+ this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key, { value:defCfg.MDY_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+
+ /**
+ * The position of the year in a month/day/year date string
+ * @config MDY_YEAR_POSITION
+ * @type Number
+ * @default 3
+ */
+ this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key, { value:defCfg.MDY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+
+};
+
+/**
+* Initializes CalendarGroup's built-in CustomEvents
+* @method initEvents
+*/
+YAHOO.widget.CalendarGroup.prototype.initEvents = function() {
+ var me = this;
+ var strEvent = "Event";
+
+ /**
+ * Proxy subscriber to subscribe to the CalendarGroup's child Calendars' CustomEvents
+ * @method sub
+ * @private
+ * @param {Function} fn The function to subscribe to this CustomEvent
+ * @param {Object} obj The CustomEvent's scope object
+ * @param {Boolean} bOverride Whether or not to apply scope correction
+ */
+ var sub = function(fn, obj, bOverride) {
+ for (var p=0;p 0) ? this.pages[0].cfg.getProperty(cfgSelected) : [];
+ this.cfg.setProperty(cfgSelected, selected, true);
+};
+
+
+/**
+* Delegates a configuration property to the CustomEvents associated with the CalendarGroup's children
+* @method delegateConfig
+* @param {String} type The CustomEvent type (usually the property name)
+* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.CalendarGroup.prototype.delegateConfig = function(type, args, obj) {
+ var val = args[0];
+ var cal;
+
+ for (var p=0;p0) {
+ year+=1;
+ }
+ cal.setYear(year);
+ }
+};
+/**
+* Calls the render function of all child calendars within the group.
+* @method render
+*/
+YAHOO.widget.CalendarGroup.prototype.render = function() {
+ this.renderHeader();
+ for (var p=0;p
+* If MULTI_SELECT is false, selectCell will select the cell at the specified index for only the last displayed Calendar page.
+* If MULTI_SELECT is true, selectCell will select the cell at the specified index, on each displayed Calendar page.
+*
+* @method selectCell
+* @param {Number} cellIndex The index of the cell to be selected.
+* @return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected.
+*/
+YAHOO.widget.CalendarGroup.prototype.selectCell = function(cellIndex) {
+ for (var p=0;p=0;--p) {
+ var cal = this.pages[p];
+ cal.previousMonth();
+ }
+};
+
+/**
+* Navigates to the next year in the currently selected month in the calendar widget.
+* @method nextYear
+*/
+YAHOO.widget.CalendarGroup.prototype.nextYear = function() {
+ for (var p=0;p 11)) {
+ var DM = YAHOO.widget.DateMath;
+ var newDate = DM.add(date, DM.MONTH, iMonth-date.getMonth());
+ date.setTime(newDate.getTime());
+ } else {
+ date.setMonth(iMonth);
+ }
+};
+
+
+/**
+* CSS class representing the container for the calendar
+* @property YAHOO.widget.CalendarGroup.CSS_CONTAINER
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.CalendarGroup.CSS_CONTAINER = "yui-calcontainer";
+
+/**
+* CSS class representing the container for the calendar
+* @property YAHOO.widget.CalendarGroup.CSS_MULTI_UP
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.CalendarGroup.CSS_MULTI_UP = "multi";
+
+/**
+* CSS class representing the title for the 2-up calendar
+* @property YAHOO.widget.CalendarGroup.CSS_2UPTITLE
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.CalendarGroup.CSS_2UPTITLE = "title";
+
+/**
+* CSS class representing the close icon for the 2-up calendar
+* @property YAHOO.widget.CalendarGroup.CSS_2UPCLOSE
+* @static
+* @final
+* @deprecated Along with Calendar.IMG_ROOT and NAV_ARROW_LEFT, NAV_ARROW_RIGHT configuration properties.
+* Calendar's Style.CSS_CLOSE property now represents the CSS class used to render the close icon
+* @type String
+*/
+YAHOO.widget.CalendarGroup.CSS_2UPCLOSE = "close-icon";
+
+YAHOO.augment(YAHOO.widget.CalendarGroup, YAHOO.widget.Calendar, "buildDayLabel",
+ "buildMonthLabel",
+ "renderOutOfBoundsDate",
+ "renderRowHeader",
+ "renderRowFooter",
+ "renderCellDefault",
+ "styleCellDefault",
+ "renderCellStyleHighlight1",
+ "renderCellStyleHighlight2",
+ "renderCellStyleHighlight3",
+ "renderCellStyleHighlight4",
+ "renderCellStyleToday",
+ "renderCellStyleSelected",
+ "renderCellNotThisMonth",
+ "renderBodyCellRestricted",
+ "initStyles",
+ "configTitle",
+ "configClose",
+ "configIframe",
+ "hide",
+ "show",
+ "browser");
+
+/**
+* The set of default Config property keys and values for the CalendarGroup
+* @property YAHOO.widget.CalendarGroup._DEFAULT_CONFIG
+* @final
+* @static
+* @private
+* @type Object
+*/
+YAHOO.widget.CalendarGroup._DEFAULT_CONFIG = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES = {key:"pages", value:2};
+
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String} A string representation of the CalendarGroup object.
+*/
+YAHOO.widget.CalendarGroup.prototype.toString = function() {
+ return "CalendarGroup " + this.id;
+};
+
+YAHOO.widget.CalGrp = YAHOO.widget.CalendarGroup;
+
+/**
+* @class YAHOO.widget.Calendar2up
+* @extends YAHOO.widget.CalendarGroup
+* @deprecated The old Calendar2up class is no longer necessary, since CalendarGroup renders in a 2up view by default.
+*/
+YAHOO.widget.Calendar2up = function(id, containerId, config) {
+ this.init(id, containerId, config);
+};
+
+YAHOO.extend(YAHOO.widget.Calendar2up, YAHOO.widget.CalendarGroup);
+
+/**
+* @deprecated The old Calendar2up class is no longer necessary, since CalendarGroup renders in a 2up view by default.
+*/
+YAHOO.widget.Cal2up = YAHOO.widget.Calendar2up;
+
+YAHOO.register("calendar", YAHOO.widget.Calendar, {version: "2.2.1", build: "193"});
Modified: jifty/trunk/share/web/static/js/yui/container.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/container.js (original)
+++ jifty/trunk/share/web/static/js/yui/container.js Thu Apr 12 03:32:44 2007
@@ -1,4614 +1,5398 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version 0.12.1
-*/
-
-/**
-* Config is a utility used within an Object to allow the implementer to maintain a list of local configuration properties and listen for changes to those properties dynamically using CustomEvent. The initial values are also maintained so that the configuration can be reset at any given point to its initial state.
-* @namespace YAHOO.util
-* @class Config
-* @constructor
-* @param {Object} owner The owner Object to which this Config Object belongs
-*/
-YAHOO.util.Config = function(owner) {
- if (owner) {
- this.init(owner);
- }
-};
-
-YAHOO.util.Config.prototype = {
-
- /**
- * Object reference to the owner of this Config Object
- * @property owner
- * @type Object
- */
- owner : null,
-
- /**
- * Boolean flag that specifies whether a queue is currently being executed
- * @property queueInProgress
- * @type Boolean
- */
- queueInProgress : false,
-
-
- /**
- * Validates that the value passed in is a Boolean.
- * @method checkBoolean
- * @param {Object} val The value to validate
- * @return {Boolean} true, if the value is valid
- */
- checkBoolean: function(val) {
- if (typeof val == 'boolean') {
- return true;
- } else {
- return false;
- }
- },
-
- /**
- * Validates that the value passed in is a number.
- * @method checkNumber
- * @param {Object} val The value to validate
- * @return {Boolean} true, if the value is valid
- */
- checkNumber: function(val) {
- if (isNaN(val)) {
- return false;
- } else {
- return true;
- }
- }
-};
-
-
-/**
-* Initializes the configuration Object and all of its local members.
-* @method init
-* @param {Object} owner The owner Object to which this Config Object belongs
-*/
-YAHOO.util.Config.prototype.init = function(owner) {
-
- this.owner = owner;
-
- /**
- * Object reference to the owner of this Config Object
- * @event configChangedEvent
- */
- this.configChangedEvent = new YAHOO.util.CustomEvent("configChanged");
-
- this.queueInProgress = false;
-
- /* Private Members */
-
- /**
- * Maintains the local collection of configuration property objects and their specified values
- * @property config
- * @private
- * @type Object
- */
- var config = {};
-
- /**
- * Maintains the local collection of configuration property objects as they were initially applied.
- * This object is used when resetting a property.
- * @property initialConfig
- * @private
- * @type Object
- */
- var initialConfig = {};
-
- /**
- * Maintains the local, normalized CustomEvent queue
- * @property eventQueue
- * @private
- * @type Object
- */
- var eventQueue = [];
-
- /**
- * Fires a configuration property event using the specified value.
- * @method fireEvent
- * @private
- * @param {String} key The configuration property's name
- * @param {value} Object The value of the correct type for the property
- */
- var fireEvent = function( key, value ) {
- key = key.toLowerCase();
-
- var property = config[key];
-
- if (typeof property != 'undefined' && property.event) {
- property.event.fire(value);
- }
- };
- /* End Private Members */
-
- /**
- * Adds a property to the Config Object's private config hash.
- * @method addProperty
- * @param {String} key The configuration property's name
- * @param {Object} propertyObject The Object containing all of this property's arguments
- */
- this.addProperty = function( key, propertyObject ) {
- key = key.toLowerCase();
-
- config[key] = propertyObject;
-
- propertyObject.event = new YAHOO.util.CustomEvent(key);
- propertyObject.key = key;
-
- if (propertyObject.handler) {
- propertyObject.event.subscribe(propertyObject.handler, this.owner, true);
- }
-
- this.setProperty(key, propertyObject.value, true);
-
- if (! propertyObject.suppressEvent) {
- this.queueProperty(key, propertyObject.value);
- }
- };
-
- /**
- * Returns a key-value configuration map of the values currently set in the Config Object.
- * @method getConfig
- * @return {Object} The current config, represented in a key-value map
- */
- this.getConfig = function() {
- var cfg = {};
-
- for (var prop in config) {
- var property = config[prop];
- if (typeof property != 'undefined' && property.event) {
- cfg[prop] = property.value;
- }
- }
-
- return cfg;
- };
-
- /**
- * Returns the value of specified property.
- * @method getProperty
- * @param {String} key The name of the property
- * @return {Object} The value of the specified property
- */
- this.getProperty = function(key) {
- key = key.toLowerCase();
-
- var property = config[key];
- if (typeof property != 'undefined' && property.event) {
- return property.value;
- } else {
- return undefined;
- }
- };
-
- /**
- * Resets the specified property's value to its initial value.
- * @method resetProperty
- * @param {String} key The name of the property
- * @return {Boolean} True is the property was reset, false if not
- */
- this.resetProperty = function(key) {
- key = key.toLowerCase();
-
- var property = config[key];
- if (typeof property != 'undefined' && property.event) {
- if (initialConfig[key] && initialConfig[key] != 'undefined') {
- this.setProperty(key, initialConfig[key]);
- }
- return true;
- } else {
- return false;
- }
- };
-
- /**
- * Sets the value of a property. If the silent property is passed as true, the property's event will not be fired.
- * @method setProperty
- * @param {String} key The name of the property
- * @param {String} value The value to set the property to
- * @param {Boolean} silent Whether the value should be set silently, without firing the property event.
- * @return {Boolean} True, if the set was successful, false if it failed.
- */
- this.setProperty = function(key, value, silent) {
- key = key.toLowerCase();
-
- if (this.queueInProgress && ! silent) {
- this.queueProperty(key,value); // Currently running through a queue...
- return true;
- } else {
- var property = config[key];
- if (typeof property != 'undefined' && property.event) {
- if (property.validator && ! property.validator(value)) { // validator
- return false;
- } else {
- property.value = value;
- if (! silent) {
- fireEvent(key, value);
- this.configChangedEvent.fire([key, value]);
- }
- return true;
- }
- } else {
- return false;
- }
- }
- };
-
- /**
- * Sets the value of a property and queues its event to execute. If the event is already scheduled to execute, it is
- * moved from its current position to the end of the queue.
- * @method queueProperty
- * @param {String} key The name of the property
- * @param {String} value The value to set the property to
- * @return {Boolean} true, if the set was successful, false if it failed.
- */
- this.queueProperty = function(key, value) {
- key = key.toLowerCase();
-
- var property = config[key];
-
- if (typeof property != 'undefined' && property.event) {
- if (typeof value != 'undefined' && property.validator && ! property.validator(value)) { // validator
- return false;
- } else {
-
- if (typeof value != 'undefined') {
- property.value = value;
- } else {
- value = property.value;
- }
-
- var foundDuplicate = false;
-
- for (var i=0;iOR
-* @param {HTMLElement} el The element representing the Module
-* @param {Object} userConfig The configuration Object literal containing the configuration that should be set for this module. See configuration documentation for more details.
-*/
-YAHOO.widget.Module = function(el, userConfig) {
- if (el) {
- this.init(el, userConfig);
- }
-};
-
-/**
-* Constant representing the prefix path to use for non-secure images
-* @property YAHOO.widget.Module.IMG_ROOT
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.IMG_ROOT = "http://us.i1.yimg.com/us.yimg.com/i/";
-
-/**
-* Constant representing the prefix path to use for securely served images
-* @property YAHOO.widget.Module.IMG_ROOT_SSL
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.IMG_ROOT_SSL = "https://a248.e.akamai.net/sec.yimg.com/i/";
-
-/**
-* Constant for the default CSS class name that represents a Module
-* @property YAHOO.widget.Module.CSS_MODULE
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.CSS_MODULE = "module";
-
-/**
-* Constant representing the module header
-* @property YAHOO.widget.Module.CSS_HEADER
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.CSS_HEADER = "hd";
-
-/**
-* Constant representing the module body
-* @property YAHOO.widget.Module.CSS_BODY
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.CSS_BODY = "bd";
-
-/**
-* Constant representing the module footer
-* @property YAHOO.widget.Module.CSS_FOOTER
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.CSS_FOOTER = "ft";
-
-/**
-* Constant representing the url for the "src" attribute of the iframe used to monitor changes to the browser's base font size
-* @property YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL = "javascript:false;";
-
-/**
-* Singleton CustomEvent fired when the font size is changed in the browser.
-* Opera's "zoom" functionality currently does not support text size detection.
-* @event YAHOO.widget.Module.textResizeEvent
-*/
-YAHOO.widget.Module.textResizeEvent = new YAHOO.util.CustomEvent("textResize");
-
-YAHOO.widget.Module.prototype = {
- /**
- * The class's constructor function
- * @property contructor
- * @type Function
- */
- constructor : YAHOO.widget.Module,
-
- /**
- * The main module element that contains the header, body, and footer
- * @property element
- * @type HTMLElement
- */
- element : null,
-
- /**
- * The header element, denoted with CSS class "hd"
- * @property header
- * @type HTMLElement
- */
- header : null,
-
- /**
- * The body element, denoted with CSS class "bd"
- * @property body
- * @type HTMLElement
- */
- body : null,
-
- /**
- * The footer element, denoted with CSS class "ft"
- * @property footer
- * @type HTMLElement
- */
- footer : null,
-
- /**
- * The id of the element
- * @property id
- * @type String
- */
- id : null,
-
- /**
- * The String representing the image root
- * @property imageRoot
- * @type String
- */
- imageRoot : YAHOO.widget.Module.IMG_ROOT,
-
- /**
- * Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
- * @method initEvents
- */
- initEvents : function() {
-
- /**
- * CustomEvent fired prior to class initalization.
- * @event beforeInitEvent
- * @param {class} classRef class reference of the initializing class, such as this.beforeInitEvent.fire(YAHOO.widget.Module)
- */
- this.beforeInitEvent = new YAHOO.util.CustomEvent("beforeInit");
-
- /**
- * CustomEvent fired after class initalization.
- * @event initEvent
- * @param {class} classRef class reference of the initializing class, such as this.beforeInitEvent.fire(YAHOO.widget.Module)
- */
- this.initEvent = new YAHOO.util.CustomEvent("init");
-
- /**
- * CustomEvent fired when the Module is appended to the DOM
- * @event appendEvent
- */
- this.appendEvent = new YAHOO.util.CustomEvent("append");
-
- /**
- * CustomEvent fired before the Module is rendered
- * @event beforeRenderEvent
- */
- this.beforeRenderEvent = new YAHOO.util.CustomEvent("beforeRender");
-
- /**
- * CustomEvent fired after the Module is rendered
- * @event renderEvent
- */
- this.renderEvent = new YAHOO.util.CustomEvent("render");
-
- /**
- * CustomEvent fired when the header content of the Module is modified
- * @event changeHeaderEvent
- * @param {String/HTMLElement} content String/element representing the new header content
- */
- this.changeHeaderEvent = new YAHOO.util.CustomEvent("changeHeader");
-
- /**
- * CustomEvent fired when the body content of the Module is modified
- * @event changeBodyEvent
- * @param {String/HTMLElement} content String/element representing the new body content
- */
- this.changeBodyEvent = new YAHOO.util.CustomEvent("changeBody");
-
- /**
- * CustomEvent fired when the footer content of the Module is modified
- * @event changeFooterEvent
- * @param {String/HTMLElement} content String/element representing the new footer content
- */
- this.changeFooterEvent = new YAHOO.util.CustomEvent("changeFooter");
-
- /**
- * CustomEvent fired when the content of the Module is modified
- * @event changeContentEvent
- */
- this.changeContentEvent = new YAHOO.util.CustomEvent("changeContent");
-
- /**
- * CustomEvent fired when the Module is destroyed
- * @event destroyEvent
- */
- this.destroyEvent = new YAHOO.util.CustomEvent("destroy");
-
- /**
- * CustomEvent fired before the Module is shown
- * @event beforeShowEvent
- */
- this.beforeShowEvent = new YAHOO.util.CustomEvent("beforeShow");
-
- /**
- * CustomEvent fired after the Module is shown
- * @event showEvent
- */
- this.showEvent = new YAHOO.util.CustomEvent("show");
-
- /**
- * CustomEvent fired before the Module is hidden
- * @event beforeHideEvent
- */
- this.beforeHideEvent = new YAHOO.util.CustomEvent("beforeHide");
-
- /**
- * CustomEvent fired after the Module is hidden
- * @event hideEvent
- */
- this.hideEvent = new YAHOO.util.CustomEvent("hide");
- },
-
- /**
- * String representing the current user-agent platform
- * @property platform
- * @type String
- */
- platform : function() {
- var ua = navigator.userAgent.toLowerCase();
- if (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1) {
- return "windows";
- } else if (ua.indexOf("macintosh") != -1) {
- return "mac";
- } else {
- return false;
- }
- }(),
-
- /**
- * String representing the current user-agent browser
- * @property browser
- * @type String
- */
- browser : function() {
- var ua = navigator.userAgent.toLowerCase();
- if (ua.indexOf('opera')!=-1) { // Opera (check first in case of spoof)
- return 'opera';
- } else if (ua.indexOf('msie 7')!=-1) { // IE7
- return 'ie7';
- } else if (ua.indexOf('msie') !=-1) { // IE
- return 'ie';
- } else if (ua.indexOf('safari')!=-1) { // Safari (check before Gecko because it includes "like Gecko")
- return 'safari';
- } else if (ua.indexOf('gecko') != -1) { // Gecko
- return 'gecko';
- } else {
- return false;
- }
- }(),
-
- /**
- * Boolean representing whether or not the current browsing context is secure (https)
- * @property isSecure
- * @type Boolean
- */
- isSecure : function() {
- if (window.location.href.toLowerCase().indexOf("https") === 0) {
- return true;
- } else {
- return false;
- }
- }(),
-
- /**
- * Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
- */
- initDefaultConfig : function() {
- // Add properties //
-
- /**
- * Specifies whether the Module is visible on the page.
- * @config visible
- * @type Boolean
- * @default true
- */
- this.cfg.addProperty("visible", { value:true, handler:this.configVisible, validator:this.cfg.checkBoolean } );
-
- /**
- * Object or array of objects representing the ContainerEffect classes that are active for animating the container.
- * @config effect
- * @type Object
- * @default null
- */
- this.cfg.addProperty("effect", { suppressEvent:true, supercedes:["visible"] } );
-
- /**
- * Specifies whether to create a special proxy iframe to monitor for user font resizing in the document
- * @config monitorresize
- * @type Boolean
- * @default true
- */
- this.cfg.addProperty("monitorresize", { value:true, handler:this.configMonitorResize } );
- },
-
- /**
- * The Module class's initialization method, which is executed for Module and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
- * @method init
- * @param {String} el The element ID representing the Module OR
- * @param {HTMLElement} el The element representing the Module
- * @param {Object} userConfig The configuration Object literal containing the configuration that should be set for this module. See configuration documentation for more details.
- */
- init : function(el, userConfig) {
-
- this.initEvents();
-
- this.beforeInitEvent.fire(YAHOO.widget.Module);
-
- /**
- * The Module's Config object used for monitoring configuration properties.
- * @property cfg
- * @type YAHOO.util.Config
- */
- this.cfg = new YAHOO.util.Config(this);
-
- if (this.isSecure) {
- this.imageRoot = YAHOO.widget.Module.IMG_ROOT_SSL;
- }
-
- if (typeof el == "string") {
- var elId = el;
-
- el = document.getElementById(el);
- if (! el) {
- el = document.createElement("DIV");
- el.id = elId;
- }
- }
-
- this.element = el;
-
- if (el.id) {
- this.id = el.id;
- }
-
- var childNodes = this.element.childNodes;
-
- if (childNodes) {
- for (var i=0;iOR
- * @param {HTMLElement} headerContent The HTMLElement to append to the header
- */
- setHeader : function(headerContent) {
- if (! this.header) {
- this.header = document.createElement("DIV");
- this.header.className = YAHOO.widget.Module.CSS_HEADER;
- }
-
- if (typeof headerContent == "string") {
- this.header.innerHTML = headerContent;
- } else {
- this.header.innerHTML = "";
- this.header.appendChild(headerContent);
- }
-
- this.changeHeaderEvent.fire(headerContent);
- this.changeContentEvent.fire();
- },
-
- /**
- * Appends the passed element to the header. If no header is present, one will be automatically created.
- * @method appendToHeader
- * @param {HTMLElement} element The element to append to the header
- */
- appendToHeader : function(element) {
- if (! this.header) {
- this.header = document.createElement("DIV");
- this.header.className = YAHOO.widget.Module.CSS_HEADER;
- }
-
- this.header.appendChild(element);
- this.changeHeaderEvent.fire(element);
- this.changeContentEvent.fire();
- },
-
- /**
- * Sets the Module's body content to the HTML specified, or appends the passed element to the body. If no body is present, one will be automatically created.
- * @method setBody
- * @param {String} bodyContent The HTML used to set the body OR
- * @param {HTMLElement} bodyContent The HTMLElement to append to the body
- */
- setBody : function(bodyContent) {
- if (! this.body) {
- this.body = document.createElement("DIV");
- this.body.className = YAHOO.widget.Module.CSS_BODY;
- }
-
- if (typeof bodyContent == "string")
- {
- this.body.innerHTML = bodyContent;
- } else {
- this.body.innerHTML = "";
- this.body.appendChild(bodyContent);
- }
-
- this.changeBodyEvent.fire(bodyContent);
- this.changeContentEvent.fire();
- },
-
- /**
- * Appends the passed element to the body. If no body is present, one will be automatically created.
- * @method appendToBody
- * @param {HTMLElement} element The element to append to the body
- */
- appendToBody : function(element) {
- if (! this.body) {
- this.body = document.createElement("DIV");
- this.body.className = YAHOO.widget.Module.CSS_BODY;
- }
-
- this.body.appendChild(element);
- this.changeBodyEvent.fire(element);
- this.changeContentEvent.fire();
- },
-
- /**
- * Sets the Module's footer content to the HTML specified, or appends the passed element to the footer. If no footer is present, one will be automatically created.
- * @method setFooter
- * @param {String} footerContent The HTML used to set the footer OR
- * @param {HTMLElement} footerContent The HTMLElement to append to the footer
- */
- setFooter : function(footerContent) {
- if (! this.footer) {
- this.footer = document.createElement("DIV");
- this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
- }
-
- if (typeof footerContent == "string") {
- this.footer.innerHTML = footerContent;
- } else {
- this.footer.innerHTML = "";
- this.footer.appendChild(footerContent);
- }
-
- this.changeFooterEvent.fire(footerContent);
- this.changeContentEvent.fire();
- },
-
- /**
- * Appends the passed element to the footer. If no footer is present, one will be automatically created.
- * @method appendToFooter
- * @param {HTMLElement} element The element to append to the footer
- */
- appendToFooter : function(element) {
- if (! this.footer) {
- this.footer = document.createElement("DIV");
- this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
- }
-
- this.footer.appendChild(element);
- this.changeFooterEvent.fire(element);
- this.changeContentEvent.fire();
- },
-
- /**
- * Renders the Module by inserting the elements that are not already in the main Module into their correct places. Optionally appends the Module to the specified node prior to the render's execution. NOTE: For Modules without existing markup, the appendToNode argument is REQUIRED. If this argument is ommitted and the current element is not present in the document, the function will return false, indicating that the render was a failure.
- * @method render
- * @param {String} appendToNode The element id to which the Module should be appended to prior to rendering OR
- * @param {HTMLElement} appendToNode The element to which the Module should be appended to prior to rendering
- * @param {HTMLElement} moduleElement OPTIONAL. The element that represents the actual Standard Module container.
- * @return {Boolean} Success or failure of the render
- */
- render : function(appendToNode, moduleElement) {
- this.beforeRenderEvent.fire();
-
- if (! moduleElement) {
- moduleElement = this.element;
- }
-
- var me = this;
- var appendTo = function(element) {
- if (typeof element == "string") {
- element = document.getElementById(element);
- }
-
- if (element) {
- element.appendChild(me.element);
- me.appendEvent.fire();
- }
- };
-
- if (appendToNode) {
- appendTo(appendToNode);
- } else { // No node was passed in. If the element is not pre-marked up, this fails
- if (! YAHOO.util.Dom.inDocument(this.element)) {
- return false;
- }
- }
-
- // Need to get everything into the DOM if it isn't already
-
- if (this.header && ! YAHOO.util.Dom.inDocument(this.header)) {
- // There is a header, but it's not in the DOM yet... need to add it
- var firstChild = moduleElement.firstChild;
- if (firstChild) { // Insert before first child if exists
- moduleElement.insertBefore(this.header, firstChild);
- } else { // Append to empty body because there are no children
- moduleElement.appendChild(this.header);
- }
- }
-
- if (this.body && ! YAHOO.util.Dom.inDocument(this.body)) {
- // There is a body, but it's not in the DOM yet... need to add it
- if (this.footer && YAHOO.util.Dom.isAncestor(this.moduleElement, this.footer)) { // Insert before footer if exists in DOM
- moduleElement.insertBefore(this.body, this.footer);
- } else { // Append to element because there is no footer
- moduleElement.appendChild(this.body);
- }
- }
-
- if (this.footer && ! YAHOO.util.Dom.inDocument(this.footer)) {
- // There is a footer, but it's not in the DOM yet... need to add it
- moduleElement.appendChild(this.footer);
- }
-
- this.renderEvent.fire();
- return true;
- },
-
- /**
- * Removes the Module element from the DOM and sets all child elements to null.
- * @method destroy
- */
- destroy : function() {
- var parent;
-
- if (this.element) {
- YAHOO.util.Event.purgeElement(this.element, true);
- parent = this.element.parentNode;
- }
- if (parent) {
- parent.removeChild(this.element);
- }
-
- this.element = null;
- this.header = null;
- this.body = null;
- this.footer = null;
-
- for (var e in this) {
- if (e instanceof YAHOO.util.CustomEvent) {
- e.unsubscribeAll();
- }
- }
-
- YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize, this);
-
- this.destroyEvent.fire();
- },
-
- /**
- * Shows the Module element by setting the visible configuration property to true. Also fires two events: beforeShowEvent prior to the visibility change, and showEvent after.
- * @method show
- */
- show : function() {
- this.cfg.setProperty("visible", true);
- },
-
- /**
- * Hides the Module element by setting the visible configuration property to false. Also fires two events: beforeHideEvent prior to the visibility change, and hideEvent after.
- * @method hide
- */
- hide : function() {
- this.cfg.setProperty("visible", false);
- },
-
- // BUILT-IN EVENT HANDLERS FOR MODULE //
-
- /**
- * Default event handler for changing the visibility property of a Module. By default, this is achieved by switching the "display" style between "block" and "none".
- * This method is responsible for firing showEvent and hideEvent.
- * @param {String} type The CustomEvent type (usually the property name)
- * @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
- * @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
- * @method configVisible
- */
- configVisible : function(type, args, obj) {
- var visible = args[0];
- if (visible) {
- this.beforeShowEvent.fire();
- YAHOO.util.Dom.setStyle(this.element, "display", "block");
- this.showEvent.fire();
- } else {
- this.beforeHideEvent.fire();
- YAHOO.util.Dom.setStyle(this.element, "display", "none");
- this.hideEvent.fire();
- }
- },
-
- /**
- * Default event handler for the "monitorresize" configuration property
- * @param {String} type The CustomEvent type (usually the property name)
- * @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
- * @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
- * @method configMonitorResize
- */
- configMonitorResize : function(type, args, obj) {
- var monitor = args[0];
- if (monitor) {
- this.initResizeMonitor();
- } else {
- YAHOO.util.Event.removeListener(this.resizeMonitor, "resize", this.onDomResize);
- this.resizeMonitor = null;
- }
- }
-};
-
-/**
-* Returns a String representation of the Object.
-* @method toString
-* @return {String} The string representation of the Module
-*/
-YAHOO.widget.Module.prototype.toString = function() {
- return "Module " + this.id;
-};
-
-/**
-* Overlay is a Module that is absolutely positioned above the page flow. It has convenience methods for positioning and sizing, as well as options for controlling zIndex and constraining the Overlay's position to the current visible viewport. Overlay also contains a dynamicly generated IFRAME which is placed beneath it for Internet Explorer 6 and 5.x so that it will be properly rendered above SELECT elements.
-* @namespace YAHOO.widget
-* @class Overlay
-* @extends YAHOO.widget.Module
-* @param {String} el The element ID representing the Overlay OR
-* @param {HTMLElement} el The element representing the Overlay
-* @param {Object} userConfig The configuration object literal containing 10/23/2006the configuration that should be set for this Overlay. See configuration documentation for more details.
-* @constructor
-*/
-YAHOO.widget.Overlay = function(el, userConfig) {
- YAHOO.widget.Overlay.superclass.constructor.call(this, el, userConfig);
-};
-
-YAHOO.extend(YAHOO.widget.Overlay, YAHOO.widget.Module);
-
-/**
-* The URL that will be placed in the iframe
-* @property YAHOO.widget.Overlay.IFRAME_SRC
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.IFRAME_SRC = "javascript:false;";
-
-/**
-* Constant representing the top left corner of an element, used for configuring the context element alignment
-* @property YAHOO.widget.Overlay.TOP_LEFT
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.TOP_LEFT = "tl";
-
-/**
-* Constant representing the top right corner of an element, used for configuring the context element alignment
-* @property YAHOO.widget.Overlay.TOP_RIGHT
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.TOP_RIGHT = "tr";
-
-/**
-* Constant representing the top bottom left corner of an element, used for configuring the context element alignment
-* @property YAHOO.widget.Overlay.BOTTOM_LEFT
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.BOTTOM_LEFT = "bl";
-
-/**
-* Constant representing the bottom right corner of an element, used for configuring the context element alignment
-* @property YAHOO.widget.Overlay.BOTTOM_RIGHT
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.BOTTOM_RIGHT = "br";
-
-/**
-* Constant representing the default CSS class used for an Overlay
-* @property YAHOO.widget.Overlay.CSS_OVERLAY
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Overlay.CSS_OVERLAY = "overlay";
-
-/**
-* The Overlay initialization method, which is executed for Overlay and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
-* @method init
-* @param {String} el The element ID representing the Overlay OR
-* @param {HTMLElement} el The element representing the Overlay
-* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
-*/
-YAHOO.widget.Overlay.prototype.init = function(el, userConfig) {
- YAHOO.widget.Overlay.superclass.init.call(this, el/*, userConfig*/); // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
-
- this.beforeInitEvent.fire(YAHOO.widget.Overlay);
-
- YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Overlay.CSS_OVERLAY);
-
- if (userConfig) {
- this.cfg.applyConfig(userConfig, true);
- }
-
- if (this.platform == "mac" && this.browser == "gecko") {
- if (! YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)) {
- this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);
- }
- if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)) {
- this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);
- }
- }
-
- this.initEvent.fire(YAHOO.widget.Overlay);
-};
-
-/**
-* Initializes the custom events for Overlay which are fired automatically at appropriate times by the Overlay class.
-* @method initEvents
-*/
-YAHOO.widget.Overlay.prototype.initEvents = function() {
- YAHOO.widget.Overlay.superclass.initEvents.call(this);
-
- /**
- * CustomEvent fired before the Overlay is moved.
- * @event beforeMoveEvent
- * @param {Number} x x coordinate
- * @param {Number} y y coordinate
- */
- this.beforeMoveEvent = new YAHOO.util.CustomEvent("beforeMove", this);
-
- /**
- * CustomEvent fired after the Overlay is moved.
- * @event moveEvent
- * @param {Number} x x coordinate
- * @param {Number} y y coordinate
- */
- this.moveEvent = new YAHOO.util.CustomEvent("move", this);
-};
-
-/**
-* Initializes the class's configurable properties which can be changed using the Overlay's Config object (cfg).
-* @method initDefaultConfig
-*/
-YAHOO.widget.Overlay.prototype.initDefaultConfig = function() {
- YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);
-
- // Add overlay config properties //
-
- /**
- * The absolute x-coordinate position of the Overlay
- * @config x
- * @type Number
- * @default null
- */
- this.cfg.addProperty("x", { handler:this.configX, validator:this.cfg.checkNumber, suppressEvent:true, supercedes:["iframe"] } );
-
- /**
- * The absolute y-coordinate position of the Overlay
- * @config y
- * @type Number
- * @default null
- */
- this.cfg.addProperty("y", { handler:this.configY, validator:this.cfg.checkNumber, suppressEvent:true, supercedes:["iframe"] } );
-
- /**
- * An array with the absolute x and y positions of the Overlay
- * @config xy
- * @type Number[]
- * @default null
- */
- this.cfg.addProperty("xy",{ handler:this.configXY, suppressEvent:true, supercedes:["iframe"] } );
-
- /**
- * The array of context arguments for context-sensitive positioning. The format is: [id or element, element corner, context corner]. For example, setting this property to ["img1", "tl", "bl"] would align the Overlay's top left corner to the context element's bottom left corner.
- * @config context
- * @type Array
- * @default null
- */
- this.cfg.addProperty("context", { handler:this.configContext, suppressEvent:true, supercedes:["iframe"] } );
-
- /**
- * True if the Overlay should be anchored to the center of the viewport.
- * @config fixedcenter
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("fixedcenter", { value:false, handler:this.configFixedCenter, validator:this.cfg.checkBoolean, supercedes:["iframe","visible"] } );
-
- /**
- * CSS width of the Overlay.
- * @config width
- * @type String
- * @default null
- */
- this.cfg.addProperty("width", { handler:this.configWidth, suppressEvent:true, supercedes:["iframe"] } );
-
- /**
- * CSS height of the Overlay.
- * @config height
- * @type String
- * @default null
- */
- this.cfg.addProperty("height", { handler:this.configHeight, suppressEvent:true, supercedes:["iframe"] } );
-
- /**
- * CSS z-index of the Overlay.
- * @config zIndex
- * @type Number
- * @default null
- */
- this.cfg.addProperty("zIndex", { value:null, handler:this.configzIndex } );
-
- /**
- * True if the Overlay should be prevented from being positioned out of the viewport.
- * @config constraintoviewport
- * @type Boolean
- * @default false
- */
- this.cfg.addProperty("constraintoviewport", { value:false, handler:this.configConstrainToViewport, validator:this.cfg.checkBoolean, supercedes:["iframe","x","y","xy"] } );
-
- /**
- * True if the Overlay should have an IFRAME shim (for correcting the select z-index bug in IE6 and below).
- * @config iframe
- * @type Boolean
- * @default true for IE6 and below, false for all others
- */
- this.cfg.addProperty("iframe", { value:(this.browser == "ie" ? true : false), handler:this.configIframe, validator:this.cfg.checkBoolean, supercedes:["zIndex"] } );
-};
-
-/**
-* Moves the Overlay to the specified position. This function is identical to calling this.cfg.setProperty("xy", [x,y]);
-* @method moveTo
-* @param {Number} x The Overlay's new x position
-* @param {Number} y The Overlay's new y position
-*/
-YAHOO.widget.Overlay.prototype.moveTo = function(x, y) {
- this.cfg.setProperty("xy",[x,y]);
-};
-
-/**
-* Adds a special CSS class to the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
-* scrollbars cannot be hidden. See https://bugzilla.mozilla.org/show_bug.cgi?id=187435
-* @method hideMacGeckoScrollbars
-*/
-YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars = function() {
- YAHOO.util.Dom.removeClass(this.element, "show-scrollbars");
- YAHOO.util.Dom.addClass(this.element, "hide-scrollbars");
-};
-
-/**
-* Removes a special CSS class from the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
-* scrollbars cannot be hidden. See https://bugzilla.mozilla.org/show_bug.cgi?id=187435
-* @method showMacGeckoScrollbars
-*/
-YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars = function() {
- YAHOO.util.Dom.removeClass(this.element, "hide-scrollbars");
- YAHOO.util.Dom.addClass(this.element, "show-scrollbars");
-};
-
-// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* The default event handler fired when the "visible" property is changed. This method is responsible for firing showEvent and hideEvent.
-* @method configVisible
-* @param {String} type The CustomEvent type (usually the property name)
-* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Overlay.prototype.configVisible = function(type, args, obj) {
- var visible = args[0];
-
- var currentVis = YAHOO.util.Dom.getStyle(this.element, "visibility");
-
- if (currentVis == "inherit") {
- var e = this.element.parentNode;
- while (e.nodeType != 9 && e.nodeType != 11) {
- currentVis = YAHOO.util.Dom.getStyle(e, "visibility");
- if (currentVis != "inherit") { break; }
- e = e.parentNode;
- }
- if (currentVis == "inherit") {
- currentVis = "visible";
- }
- }
-
- var effect = this.cfg.getProperty("effect");
-
- var effectInstances = [];
- if (effect) {
- if (effect instanceof Array) {
- for (var i=0;i rightConstraint) {
- x = rightConstraint;
- }
-
- if (y < topConstraint) {
- y = topConstraint;
- } else if (y > bottomConstraint) {
- y = bottomConstraint;
- }
-
- this.cfg.setProperty("x", x, true);
- this.cfg.setProperty("y", y, true);
- this.cfg.setProperty("xy", [x,y], true);
-};
-
-/**
-* Centers the container in the viewport.
-* @method center
-*/
-YAHOO.widget.Overlay.prototype.center = function() {
- var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
- var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
-
- var viewPortWidth = YAHOO.util.Dom.getClientWidth();
- var viewPortHeight = YAHOO.util.Dom.getClientHeight();
-
- var elementWidth = this.element.offsetWidth;
- var elementHeight = this.element.offsetHeight;
-
- var x = (viewPortWidth / 2) - (elementWidth / 2) + scrollX;
- var y = (viewPortHeight / 2) - (elementHeight / 2) + scrollY;
-
- this.cfg.setProperty("xy", [parseInt(x, 10), parseInt(y, 10)]);
-
- this.cfg.refireEvent("iframe");
-};
-
-/**
-* Synchronizes the Panel's "xy", "x", and "y" properties with the Panel's position in the DOM. This is primarily used to update position information during drag & drop.
-* @method syncPosition
-*/
-YAHOO.widget.Overlay.prototype.syncPosition = function() {
- var pos = YAHOO.util.Dom.getXY(this.element);
- this.cfg.setProperty("x", pos[0], true);
- this.cfg.setProperty("y", pos[1], true);
- this.cfg.setProperty("xy", pos, true);
-};
-
-/**
-* Event handler fired when the resize monitor element is resized.
-* @method onDomResize
-* @param {DOMEvent} e The resize DOM event
-* @param {Object} obj The scope object
-*/
-YAHOO.widget.Overlay.prototype.onDomResize = function(e, obj) {
- YAHOO.widget.Overlay.superclass.onDomResize.call(this, e, obj);
- var me = this;
- setTimeout(function() {
- me.syncPosition();
- me.cfg.refireEvent("iframe");
- me.cfg.refireEvent("context");
- }, 0);
-};
-
-/**
-* Removes the Overlay element from the DOM and sets all child elements to null.
-* @method destroy
-*/
-YAHOO.widget.Overlay.prototype.destroy = function() {
- if (this.iframe) {
- this.iframe.parentNode.removeChild(this.iframe);
- }
-
- this.iframe = null;
-
- YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, this);
- YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, this);
-
- YAHOO.widget.Overlay.superclass.destroy.call(this);
-};
-
-/**
-* Returns a String representation of the object.
-* @method toString
-* @return {String} The string representation of the Overlay.
-*/
-YAHOO.widget.Overlay.prototype.toString = function() {
- return "Overlay " + this.id;
-};
-
-/**
-* A singleton CustomEvent used for reacting to the DOM event for window scroll
-* @event YAHOO.widget.Overlay.windowScrollEvent
-*/
-YAHOO.widget.Overlay.windowScrollEvent = new YAHOO.util.CustomEvent("windowScroll");
-
-/**
-* A singleton CustomEvent used for reacting to the DOM event for window resize
-* @event YAHOO.widget.Overlay.windowResizeEvent
-*/
-YAHOO.widget.Overlay.windowResizeEvent = new YAHOO.util.CustomEvent("windowResize");
-
-/**
-* The DOM event handler used to fire the CustomEvent for window scroll
-* @method YAHOO.widget.Overlay.windowScrollHandler
-* @static
-* @param {DOMEvent} e The DOM scroll event
-*/
-YAHOO.widget.Overlay.windowScrollHandler = function(e) {
- if (YAHOO.widget.Module.prototype.browser == "ie" || YAHOO.widget.Module.prototype.browser == "ie7") {
- if (! window.scrollEnd) {
- window.scrollEnd = -1;
- }
- clearTimeout(window.scrollEnd);
- window.scrollEnd = setTimeout(function() { YAHOO.widget.Overlay.windowScrollEvent.fire(); }, 1);
- } else {
- YAHOO.widget.Overlay.windowScrollEvent.fire();
- }
-};
-
-/**
-* The DOM event handler used to fire the CustomEvent for window resize
-* @method YAHOO.widget.Overlay.windowResizeHandler
-* @static
-* @param {DOMEvent} e The DOM resize event
-*/
-YAHOO.widget.Overlay.windowResizeHandler = function(e) {
- if (YAHOO.widget.Module.prototype.browser == "ie" || YAHOO.widget.Module.prototype.browser == "ie7") {
- if (! window.resizeEnd) {
- window.resizeEnd = -1;
- }
- clearTimeout(window.resizeEnd);
- window.resizeEnd = setTimeout(function() { YAHOO.widget.Overlay.windowResizeEvent.fire(); }, 100);
- } else {
- YAHOO.widget.Overlay.windowResizeEvent.fire();
- }
-};
-
-/**
-* A boolean that indicated whether the window resize and scroll events have already been subscribed to.
-* @property YAHOO.widget.Overlay._initialized
-* @private
-* @type Boolean
-*/
-YAHOO.widget.Overlay._initialized = null;
-
-if (YAHOO.widget.Overlay._initialized === null) {
- YAHOO.util.Event.addListener(window, "scroll", YAHOO.widget.Overlay.windowScrollHandler);
- YAHOO.util.Event.addListener(window, "resize", YAHOO.widget.Overlay.windowResizeHandler);
-
- YAHOO.widget.Overlay._initialized = true;
-}
-
-/**
-* OverlayManager is used for maintaining the focus status of multiple Overlays.* @namespace YAHOO.widget
-* @namespace YAHOO.widget
-* @class OverlayManager
-* @constructor
-* @param {Array} overlays Optional. A collection of Overlays to register with the manager.
-* @param {Object} userConfig The object literal representing the user configuration of the OverlayManager
-*/
-YAHOO.widget.OverlayManager = function(userConfig) {
- this.init(userConfig);
-};
-
-/**
-* The CSS class representing a focused Overlay
-* @property YAHOO.widget.OverlayManager.CSS_FOCUSED
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.OverlayManager.CSS_FOCUSED = "focused";
-
-YAHOO.widget.OverlayManager.prototype = {
- /**
- * The class's constructor function
- * @property contructor
- * @type Function
- */
- constructor : YAHOO.widget.OverlayManager,
-
- /**
- * The array of Overlays that are currently registered
- * @property overlays
- * @type YAHOO.widget.Overlay[]
- */
- overlays : null,
-
- /**
- * Initializes the default configuration of the OverlayManager
- * @method initDefaultConfig
- */
- initDefaultConfig : function() {
- /**
- * The collection of registered Overlays in use by the OverlayManager
- * @config overlays
- * @type YAHOO.widget.Overlay[]
- * @default null
- */
- this.cfg.addProperty("overlays", { suppressEvent:true } );
-
- /**
- * The default DOM event that should be used to focus an Overlay
- * @config focusevent
- * @type String
- * @default "mousedown"
- */
- this.cfg.addProperty("focusevent", { value:"mousedown" } );
- },
-
- /**
- * Initializes the OverlayManager
- * @method init
- * @param {YAHOO.widget.Overlay[]} overlays Optional. A collection of Overlays to register with the manager.
- * @param {Object} userConfig The object literal representing the user configuration of the OverlayManager
- */
- init : function(userConfig) {
- /**
- * The OverlayManager's Config object used for monitoring configuration properties.
- * @property cfg
- * @type YAHOO.util.Config
- */
- this.cfg = new YAHOO.util.Config(this);
-
- this.initDefaultConfig();
-
- if (userConfig) {
- this.cfg.applyConfig(userConfig, true);
- }
- this.cfg.fireQueue();
-
- /**
- * The currently activated Overlay
- * @property activeOverlay
- * @private
- * @type YAHOO.widget.Overlay
- */
- var activeOverlay = null;
-
- /**
- * Returns the currently focused Overlay
- * @method getActive
- * @return {YAHOO.widget.Overlay} The currently focused Overlay
- */
- this.getActive = function() {
- return activeOverlay;
- };
-
- /**
- * Focuses the specified Overlay
- * @method focus
- * @param {YAHOO.widget.Overlay} overlay The Overlay to focus
- * @param {String} overlay The id of the Overlay to focus
- */
- this.focus = function(overlay) {
- var o = this.find(overlay);
- if (o) {
- this.blurAll();
- activeOverlay = o;
- YAHOO.util.Dom.addClass(activeOverlay.element, YAHOO.widget.OverlayManager.CSS_FOCUSED);
- this.overlays.sort(this.compareZIndexDesc);
- var topZIndex = YAHOO.util.Dom.getStyle(this.overlays[0].element, "zIndex");
- if (! isNaN(topZIndex) && this.overlays[0] != overlay) {
- activeOverlay.cfg.setProperty("zIndex", (parseInt(topZIndex, 10) + 2));
- }
- this.overlays.sort(this.compareZIndexDesc);
- }
- };
-
- /**
- * Removes the specified Overlay from the manager
- * @method remove
- * @param {YAHOO.widget.Overlay} overlay The Overlay to remove
- * @param {String} overlay The id of the Overlay to remove
- */
- this.remove = function(overlay) {
- var o = this.find(overlay);
- if (o) {
- var originalZ = YAHOO.util.Dom.getStyle(o.element, "zIndex");
- o.cfg.setProperty("zIndex", -1000, true);
- this.overlays.sort(this.compareZIndexDesc);
- this.overlays = this.overlays.slice(0, this.overlays.length-1);
- o.cfg.setProperty("zIndex", originalZ, true);
-
- o.cfg.setProperty("manager", null);
- o.focusEvent = null;
- o.blurEvent = null;
- o.focus = null;
- o.blur = null;
- }
- };
-
- /**
- * Removes focus from all registered Overlays in the manager
- * @method blurAll
- */
- this.blurAll = function() {
- activeOverlay = null;
- for (var o=0;o 0) {
- return true;
- }
- } else {
- return false;
- }
- },
-
- /**
- * Attempts to locate an Overlay by instance or ID.
- * @method find
- * @param {YAHOO.widget.Overlay} overlay An Overlay to locate within the manager
- * @param {String} overlay An Overlay id to locate within the manager
- * @return {YAHOO.widget.Overlay} The requested Overlay, if found, or null if it cannot be located.
- */
- find : function(overlay) {
- if (overlay instanceof YAHOO.widget.Overlay) {
- for (var o=0;o zIndex2) {
- return -1;
- } else if (zIndex1 < zIndex2) {
- return 1;
- } else {
- return 0;
- }
- },
-
- /**
- * Shows all Overlays in the manager.
- * @method showAll
- */
- showAll : function() {
- for (var o=0;oOR
-* @param {HTMLElement} el The element representing the Tooltip
-* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
-*/
-YAHOO.widget.Tooltip = function(el, userConfig) {
- YAHOO.widget.Tooltip.superclass.constructor.call(this, el, userConfig);
-};
-
-YAHOO.extend(YAHOO.widget.Tooltip, YAHOO.widget.Overlay);
-
-/**
-* Constant representing the Tooltip CSS class
-* @property YAHOO.widget.Tooltip.CSS_TOOLTIP
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Tooltip.CSS_TOOLTIP = "tt";
-
-/**
-* The Tooltip initialization method. This method is automatically called by the constructor. A Tooltip is automatically rendered by the init method, and it also is set to be invisible by default, and constrained to viewport by default as well.
-* @method init
-* @param {String} el The element ID representing the Tooltip OR
-* @param {HTMLElement} el The element representing the Tooltip
-* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Tooltip. See configuration documentation for more details.
-*/
-YAHOO.widget.Tooltip.prototype.init = function(el, userConfig) {
- if (document.readyState && document.readyState != "complete") {
- var deferredInit = function() {
- this.init(el, userConfig);
- };
- YAHOO.util.Event.addListener(window, "load", deferredInit, this, true);
- } else {
- YAHOO.widget.Tooltip.superclass.init.call(this, el);
-
- this.beforeInitEvent.fire(YAHOO.widget.Tooltip);
-
- YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Tooltip.CSS_TOOLTIP);
-
- if (userConfig) {
- this.cfg.applyConfig(userConfig, true);
- }
-
- this.cfg.queueProperty("visible",false);
- this.cfg.queueProperty("constraintoviewport",true);
-
- this.setBody("");
- this.render(this.cfg.getProperty("container"));
-
- this.initEvent.fire(YAHOO.widget.Tooltip);
- }
-};
-
-/**
-* Initializes the class's configurable properties which can be changed using the Overlay's Config object (cfg).
-* @method initDefaultConfig
-*/
-YAHOO.widget.Tooltip.prototype.initDefaultConfig = function() {
- YAHOO.widget.Tooltip.superclass.initDefaultConfig.call(this);
-
- /**
- * Specifies whether the Tooltip should be kept from overlapping its context element.
- * @config preventoverlap
- * @type Boolean
- * @default true
- */
- this.cfg.addProperty("preventoverlap", { value:true, validator:this.cfg.checkBoolean, supercedes:["x","y","xy"] } );
-
- /**
- * The number of milliseconds to wait before showing a Tooltip on mouseover.
- * @config showdelay
- * @type Number
- * @default 200
- */
- this.cfg.addProperty("showdelay", { value:200, handler:this.configShowDelay, validator:this.cfg.checkNumber } );
-
- /**
- * The number of milliseconds to wait before automatically dismissing a Tooltip after the mouse has been resting on the context element.
- * @config autodismissdelay
- * @type Number
- * @default 5000
- */
- this.cfg.addProperty("autodismissdelay", { value:5000, handler:this.configAutoDismissDelay, validator:this.cfg.checkNumber } );
-
- /**
- * The number of milliseconds to wait before hiding a Tooltip on mouseover.
- * @config hidedelay
- * @type Number
- * @default 250
- */
- this.cfg.addProperty("hidedelay", { value:250, handler:this.configHideDelay, validator:this.cfg.checkNumber } );
-
- /**
- * Specifies the Tooltip's text.
- * @config text
- * @type String
- * @default null
- */
- this.cfg.addProperty("text", { handler:this.configText, suppressEvent:true } );
-
- /**
- * Specifies the container element that the Tooltip's markup should be rendered into.
- * @config container
- * @type HTMLElement/String
- * @default document.body
- */
- this.cfg.addProperty("container", { value:document.body, handler:this.configContainer } );
-
- /**
- * Specifies the element or elements that the Tooltip should be anchored to on mouseover.
- * @config context
- * @type HTMLElement[]/String[]
- * @default null
- */
-
-};
-
-// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* The default event handler fired when the "text" property is changed.
-* @method configText
-* @param {String} type The CustomEvent type (usually the property name)
-* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Tooltip.prototype.configText = function(type, args, obj) {
- var text = args[0];
- if (text) {
- this.setBody(text);
- }
-};
-
-/**
-* The default event handler fired when the "container" property is changed.
-* @method configContainer
-* @param {String} type The CustomEvent type (usually the property name)
-* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Tooltip.prototype.configContainer = function(type, args, obj) {
- var container = args[0];
- if (typeof container == 'string') {
- this.cfg.setProperty("container", document.getElementById(container), true);
- }
-};
-
-/**
-* The default event handler fired when the "context" property is changed.
-* @method configContext
-* @param {String} type The CustomEvent type (usually the property name)
-* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Tooltip.prototype.configContext = function(type, args, obj) {
- var context = args[0];
- if (context) {
-
- // Normalize parameter into an array
- if (! (context instanceof Array)) {
- if (typeof context == "string") {
- this.cfg.setProperty("context", [document.getElementById(context)], true);
- } else { // Assuming this is an element
- this.cfg.setProperty("context", [context], true);
- }
- context = this.cfg.getProperty("context");
- }
-
-
- // Remove any existing mouseover/mouseout listeners
- if (this._context) {
- for (var c=0;cOR
-* @param {HTMLElement} el The element representing the Panel
-* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Panel. See configuration documentation for more details.
-*/
-YAHOO.widget.Panel = function(el, userConfig) {
- YAHOO.widget.Panel.superclass.constructor.call(this, el, userConfig);
-};
-
-YAHOO.extend(YAHOO.widget.Panel, YAHOO.widget.Overlay);
-
-/**
-* Constant representing the default CSS class used for a Panel
-* @property YAHOO.widget.Panel.CSS_PANEL
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Panel.CSS_PANEL = "panel";
-
-/**
-* Constant representing the default CSS class used for a Panel's wrapping container
-* @property YAHOO.widget.Panel.CSS_PANEL_CONTAINER
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Panel.CSS_PANEL_CONTAINER = "panel-container";
-
-/**
-* The Overlay initialization method, which is executed for Overlay and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
-* @method init
-* @param {String} el The element ID representing the Overlay OR
-* @param {HTMLElement} el The element representing the Overlay
-* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
-*/
-YAHOO.widget.Panel.prototype.init = function(el, userConfig) {
- YAHOO.widget.Panel.superclass.init.call(this, el/*, userConfig*/); // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
-
- this.beforeInitEvent.fire(YAHOO.widget.Panel);
-
- YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Panel.CSS_PANEL);
-
- this.buildWrapper();
-
- if (userConfig) {
- this.cfg.applyConfig(userConfig, true);
- }
-
- this.beforeRenderEvent.subscribe(function() {
- var draggable = this.cfg.getProperty("draggable");
- if (draggable) {
- if (! this.header) {
- this.setHeader(" ");
- }
- }
- }, this, true);
-
- var me = this;
-
- var doBlur = function() {
- this.blur();
- };
-
- this.showMaskEvent.subscribe(function() {
- var checkFocusable = function(el) {
- if ((el.tagName == "A" || el.tagName == "BUTTON" || el.tagName == "SELECT" || el.tagName == "INPUT" || el.tagName == "TEXTAREA" || el.tagName == "FORM") && el.type != "hidden") {
- if (! YAHOO.util.Dom.isAncestor(me.element, el)) {
- YAHOO.util.Event.addListener(el, "focus", doBlur, el, true);
- return true;
- }
- } else {
- return false;
- }
- };
-
- this.focusableElements = YAHOO.util.Dom.getElementsBy(checkFocusable);
- }, this, true);
-
- this.hideMaskEvent.subscribe(function() {
- for (var i=0;iOR
-* @param {HTMLElement} appendToNode The element to which the Module should be appended to prior to rendering
-* @return {boolean} Success or failure of the render
-*/
-YAHOO.widget.Panel.prototype.render = function(appendToNode) {
- return YAHOO.widget.Panel.superclass.render.call(this, appendToNode, this.innerElement);
-};
-
-/**
-* Returns a String representation of the object.
-* @method toString
-* @return {String} The string representation of the Panel.
-*/
-YAHOO.widget.Panel.prototype.toString = function() {
- return "Panel " + this.id;
-};
-
-/**
-* Dialog is an implementation of Panel that can be used to submit form data. Built-in functionality for buttons with event handlers is included, and button sets can be build dynamically, or the preincluded ones for Submit/Cancel and OK/Cancel can be utilized. Forms can be processed in 3 ways -- via an asynchronous Connection utility call, a simple form POST or GET, or manually.
-* @namespace YAHOO.widget
-* @class Dialog
-* @extends YAHOO.widget.Panel
-* @constructor
-* @param {String} el The element ID representing the Dialog OR
-* @param {HTMLElement} el The element representing the Dialog
-* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Dialog. See configuration documentation for more details.
-*/
-YAHOO.widget.Dialog = function(el, userConfig) {
- YAHOO.widget.Dialog.superclass.constructor.call(this, el, userConfig);
-};
-
-YAHOO.extend(YAHOO.widget.Dialog, YAHOO.widget.Panel);
-
-/**
-* Constant representing the default CSS class used for a Dialog
-* @property YAHOO.widget.Dialog.CSS_DIALOG
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.Dialog.CSS_DIALOG = "dialog";
-
-/**
-* Initializes the class's configurable properties which can be changed using the Dialog's Config object (cfg).
-* @method initDefaultConfig
-*/
-YAHOO.widget.Dialog.prototype.initDefaultConfig = function() {
- YAHOO.widget.Dialog.superclass.initDefaultConfig.call(this);
-
- /**
- * The internally maintained callback object for use with the Connection utility
- * @property callback
- * @type Object
- */
- this.callback = {
- /**
- * The function to execute upon success of the Connection submission
- * @property callback.success
- * @type Function
- */
- success : null,
- /**
- * The function to execute upon failure of the Connection submission
- * @property callback.failure
- * @type Function
- */
- failure : null,
- /**
- * The arbitraty argument or arguments to pass to the Connection callback functions
- * @property callback.argument
- * @type Object
- */
- argument: null
- };
-
- // Add form dialog config properties //
-
- /**
- * The method to use for posting the Dialog's form. Possible values are "async", "form", and "manual".
- * @config postmethod
- * @type String
- * @default async
- */
- this.cfg.addProperty("postmethod", { value:"async", handler:this.configPostMethod, validator:function(val) {
- if (val != "form" && val != "async" && val != "none" && val != "manual") {
- return false;
- } else {
- return true;
- }
- } });
-
- /**
- * Object literal(s) defining the buttons for the Dialog's footer.
- * @config buttons
- * @type Object[]
- * @default "none"
- */
- this.cfg.addProperty("buttons", { value:"none", handler:this.configButtons } );
-};
-
-/**
-* Initializes the custom events for Dialog which are fired automatically at appropriate times by the Dialog class.
-* @method initEvents
-*/
-YAHOO.widget.Dialog.prototype.initEvents = function() {
- YAHOO.widget.Dialog.superclass.initEvents.call(this);
-
- /**
- * CustomEvent fired prior to submission
- * @event beforeSumitEvent
- */
- this.beforeSubmitEvent = new YAHOO.util.CustomEvent("beforeSubmit");
-
- /**
- * CustomEvent fired after submission
- * @event submitEvent
- */
- this.submitEvent = new YAHOO.util.CustomEvent("submit");
-
- /**
- * CustomEvent fired prior to manual submission
- * @event manualSubmitEvent
- */
- this.manualSubmitEvent = new YAHOO.util.CustomEvent("manualSubmit");
-
- /**
- * CustomEvent fired prior to asynchronous submission
- * @event asyncSubmitEvent
- */
- this.asyncSubmitEvent = new YAHOO.util.CustomEvent("asyncSubmit");
-
- /**
- * CustomEvent fired prior to form-based submission
- * @event formSubmitEvent
- */
- this.formSubmitEvent = new YAHOO.util.CustomEvent("formSubmit");
-
- /**
- * CustomEvent fired after cancel
- * @event cancelEvent
- */
- this.cancelEvent = new YAHOO.util.CustomEvent("cancel");
-};
-
-/**
-* The Dialog initialization method, which is executed for Dialog and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
-* @method init
-* @param {String} el The element ID representing the Dialog OR
-* @param {HTMLElement} el The element representing the Dialog
-* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Dialog. See configuration documentation for more details.
-*/
-YAHOO.widget.Dialog.prototype.init = function(el, userConfig) {
- YAHOO.widget.Dialog.superclass.init.call(this, el/*, userConfig*/); // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
-
- this.beforeInitEvent.fire(YAHOO.widget.Dialog);
-
- YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Dialog.CSS_DIALOG);
-
- this.cfg.setProperty("visible", false);
-
- if (userConfig) {
- this.cfg.applyConfig(userConfig, true);
- }
-
- this.showEvent.subscribe(this.focusFirst, this, true);
- this.beforeHideEvent.subscribe(this.blurButtons, this, true);
-
- this.beforeRenderEvent.subscribe(function() {
- var buttonCfg = this.cfg.getProperty("buttons");
- if (buttonCfg && buttonCfg != "none") {
- if (! this.footer) {
- this.setFooter("");
- }
- }
- }, this, true);
-
- this.initEvent.fire(YAHOO.widget.Dialog);
-};
-
-/**
-* Performs the submission of the Dialog form depending on the value of "postmethod" property.
-* @method doSubmit
-*/
-YAHOO.widget.Dialog.prototype.doSubmit = function() {
- var pm = this.cfg.getProperty("postmethod");
- switch (pm) {
- case "async":
- var method = this.form.getAttribute("method") || 'POST';
- method = method.toUpperCase();
- YAHOO.util.Connect.setForm(this.form);
- var cObj = YAHOO.util.Connect.asyncRequest(method, this.form.getAttribute("action"), this.callback);
- this.asyncSubmitEvent.fire();
- break;
- case "form":
- this.form.submit();
- this.formSubmitEvent.fire();
- break;
- case "none":
- case "manual":
- this.manualSubmitEvent.fire();
- break;
- }
-};
-
-/**
-* Prepares the Dialog's internal FORM object, creating one if one is not currently present.
-* @method registerForm
-*/
-YAHOO.widget.Dialog.prototype.registerForm = function() {
- var form = this.element.getElementsByTagName("FORM")[0];
-
- if (! form) {
- var formHTML = "";
- this.body.innerHTML += formHTML;
- form = this.element.getElementsByTagName("FORM")[0];
- }
-
- this.firstFormElement = function() {
- for (var f=0;f=0;f-- ) {
- var el = form.elements[f];
- if (el.focus) {
- if (el.type && el.type != "hidden") {
- return el;
- }
- }
- }
- return null;
- }();
-
- this.form = form;
-
- if (this.cfg.getProperty("modal") && this.form) {
-
- var me = this;
-
- var firstElement = this.firstFormElement || this.firstButton;
- if (firstElement) {
- this.preventBackTab = new YAHOO.util.KeyListener(firstElement, { shift:true, keys:9 }, {fn:me.focusLast, scope:me, correctScope:true} );
- this.showEvent.subscribe(this.preventBackTab.enable, this.preventBackTab, true);
- this.hideEvent.subscribe(this.preventBackTab.disable, this.preventBackTab, true);
- }
-
- var lastElement = this.lastButton || this.lastFormElement;
- if (lastElement) {
- this.preventTabOut = new YAHOO.util.KeyListener(lastElement, { shift:false, keys:9 }, {fn:me.focusFirst, scope:me, correctScope:true} );
- this.showEvent.subscribe(this.preventTabOut.enable, this.preventTabOut, true);
- this.hideEvent.subscribe(this.preventTabOut.disable, this.preventTabOut, true);
- }
- }
-};
-
-// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* The default event handler for the "buttons" configuration property
-* @method configButtons
-* @param {String} type The CustomEvent type (usually the property name)
-* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.Dialog.prototype.configButtons = function(type, args, obj) {
- var buttons = args[0];
- if (buttons != "none") {
- this.buttonSpan = null;
- this.buttonSpan = document.createElement("SPAN");
- this.buttonSpan.className = "button-group";
-
- for (var b=0;bOR
-* @param {HTMLElement} el The element representing the SimpleDialog
-* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this SimpleDialog. See configuration documentation for more details.
-*/
-YAHOO.widget.SimpleDialog = function(el, userConfig) {
- YAHOO.widget.SimpleDialog.superclass.constructor.call(this, el, userConfig);
-};
-
-YAHOO.extend(YAHOO.widget.SimpleDialog, YAHOO.widget.Dialog);
-
-/**
-* Constant for the standard network icon for a blocking action
-* @property YAHOO.widget.SimpleDialog.ICON_BLOCK
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_BLOCK = "nt/ic/ut/bsc/blck16_1.gif";
-
-/**
-* Constant for the standard network icon for alarm
-* @property YAHOO.widget.SimpleDialog.ICON_ALARM
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_ALARM = "nt/ic/ut/bsc/alrt16_1.gif";
-
-/**
-* Constant for the standard network icon for help
-* @property YAHOO.widget.SimpleDialog.ICON_HELP
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_HELP = "nt/ic/ut/bsc/hlp16_1.gif";
-
-/**
-* Constant for the standard network icon for info
-* @property YAHOO.widget.SimpleDialog.ICON_INFO
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_INFO = "nt/ic/ut/bsc/info16_1.gif";
-
-/**
-* Constant for the standard network icon for warn
-* @property YAHOO.widget.SimpleDialog.ICON_WARN
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_WARN = "nt/ic/ut/bsc/warn16_1.gif";
-
-/**
-* Constant for the standard network icon for a tip
-* @property YAHOO.widget.SimpleDialog.ICON_TIP
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.ICON_TIP = "nt/ic/ut/bsc/tip16_1.gif";
-
-/**
-* Constant representing the default CSS class used for a SimpleDialog
-* @property YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG
-* @static
-* @final
-* @type String
-*/
-YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG = "simple-dialog";
-
-/**
-* Initializes the class's configurable properties which can be changed using the SimpleDialog's Config object (cfg).
-* @method initDefaultConfig
-*/
-YAHOO.widget.SimpleDialog.prototype.initDefaultConfig = function() {
- YAHOO.widget.SimpleDialog.superclass.initDefaultConfig.call(this);
-
- // Add dialog config properties //
-
- /**
- * Sets the informational icon for the SimpleDialog
- * @config icon
- * @type String
- * @default "none"
- */
- this.cfg.addProperty("icon", { value:"none", handler:this.configIcon, suppressEvent:true } );
-
- /**
- * Sets the text for the SimpleDialog
- * @config text
- * @type String
- * @default ""
- */
- this.cfg.addProperty("text", { value:"", handler:this.configText, suppressEvent:true, supercedes:["icon"] } );
-};
-
-
-/**
-* The SimpleDialog initialization method, which is executed for SimpleDialog and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
-* @method init
-* @param {String} el The element ID representing the SimpleDialog OR
-* @param {HTMLElement} el The element representing the SimpleDialog
-* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this SimpleDialog. See configuration documentation for more details.
-*/
-YAHOO.widget.SimpleDialog.prototype.init = function(el, userConfig) {
- YAHOO.widget.SimpleDialog.superclass.init.call(this, el/*, userConfig*/); // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
-
- this.beforeInitEvent.fire(YAHOO.widget.SimpleDialog);
-
- YAHOO.util.Dom.addClass(this.element, YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG);
-
- this.cfg.queueProperty("postmethod", "manual");
-
- if (userConfig) {
- this.cfg.applyConfig(userConfig, true);
- }
-
- this.beforeRenderEvent.subscribe(function() {
- if (! this.body) {
- this.setBody("");
- }
- }, this, true);
-
- this.initEvent.fire(YAHOO.widget.SimpleDialog);
-
-};
-/**
-* Prepares the SimpleDialog's internal FORM object, creating one if one is not currently present, and adding the value hidden field.
-* @method registerForm
-*/
-YAHOO.widget.SimpleDialog.prototype.registerForm = function() {
- YAHOO.widget.SimpleDialog.superclass.registerForm.call(this);
- this.form.innerHTML += " ";
-};
-
-// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* Fired when the "icon" property is set.
-* @method configIcon
-* @param {String} type The CustomEvent type (usually the property name)
-* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.SimpleDialog.prototype.configIcon = function(type,args,obj) {
- var icon = args[0];
- if (icon && icon != "none") {
- var iconHTML = " ";
- this.body.innerHTML = iconHTML + this.body.innerHTML;
- }
-};
-
-/**
-* Fired when the "text" property is set.
-* @method configText
-* @param {String} type The CustomEvent type (usually the property name)
-* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.SimpleDialog.prototype.configText = function(type,args,obj) {
- var text = args[0];
- if (text) {
- this.setBody(text);
- this.cfg.refireEvent("icon");
- }
-};
-// END BUILT-IN PROPERTY EVENT HANDLERS //
-
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String} The string representation of the SimpleDialog
-*/
-YAHOO.widget.SimpleDialog.prototype.toString = function() {
- return "SimpleDialog " + this.id;
-};
-
-/**
-* ContainerEffect encapsulates animation transitions that are executed when an Overlay is shown or hidden.
-* @namespace YAHOO.widget
-* @class ContainerEffect
-* @constructor
-* @param {YAHOO.widget.Overlay} overlay The Overlay that the animation should be associated with
-* @param {Object} attrIn The object literal representing the animation arguments to be used for the animate-in transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. YAHOO.util.Easing.easeIn).
-* @param {Object} attrOut The object literal representing the animation arguments to be used for the animate-out transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. YAHOO.util.Easing.easeIn).
-* @param {HTMLElement} targetElement Optional. The target element that should be animated during the transition. Defaults to overlay.element.
-* @param {class} Optional. The animation class to instantiate. Defaults to YAHOO.util.Anim. Other options include YAHOO.util.Motion.
-*/
-YAHOO.widget.ContainerEffect = function(overlay, attrIn, attrOut, targetElement, animClass) {
- if (! animClass) {
- animClass = YAHOO.util.Anim;
- }
-
- /**
- * The overlay to animate
- * @property overlay
- * @type YAHOO.widget.Overlay
- */
- this.overlay = overlay;
- /**
- * The animation attributes to use when transitioning into view
- * @property attrIn
- * @type Object
- */
- this.attrIn = attrIn;
- /**
- * The animation attributes to use when transitioning out of view
- * @property attrOut
- * @type Object
- */
- this.attrOut = attrOut;
- /**
- * The target element to be animated
- * @property targetElement
- * @type HTMLElement
- */
- this.targetElement = targetElement || overlay.element;
- /**
- * The animation class to use for animating the overlay
- * @property animClass
- * @type class
- */
- this.animClass = animClass;
-};
-
-/**
-* Initializes the animation classes and events.
-* @method init
-*/
-YAHOO.widget.ContainerEffect.prototype.init = function() {
- this.beforeAnimateInEvent = new YAHOO.util.CustomEvent("beforeAnimateIn");
- this.beforeAnimateOutEvent = new YAHOO.util.CustomEvent("beforeAnimateOut");
-
- this.animateInCompleteEvent = new YAHOO.util.CustomEvent("animateInComplete");
- this.animateOutCompleteEvent = new YAHOO.util.CustomEvent("animateOutComplete");
-
- this.animIn = new this.animClass(this.targetElement, this.attrIn.attributes, this.attrIn.duration, this.attrIn.method);
- this.animIn.onStart.subscribe(this.handleStartAnimateIn, this);
- this.animIn.onTween.subscribe(this.handleTweenAnimateIn, this);
- this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn, this);
-
- this.animOut = new this.animClass(this.targetElement, this.attrOut.attributes, this.attrOut.duration, this.attrOut.method);
- this.animOut.onStart.subscribe(this.handleStartAnimateOut, this);
- this.animOut.onTween.subscribe(this.handleTweenAnimateOut, this);
- this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut, this);
-};
-
-/**
-* Triggers the in-animation.
-* @method animateIn
-*/
-YAHOO.widget.ContainerEffect.prototype.animateIn = function() {
- this.beforeAnimateInEvent.fire();
- this.animIn.animate();
-};
-
-/**
-* Triggers the out-animation.
-* @method animateOut
-*/
-YAHOO.widget.ContainerEffect.prototype.animateOut = function() {
- this.beforeAnimateOutEvent.fire();
- this.animOut.animate();
-};
-
-/**
-* The default onStart handler for the in-animation.
-* @method handleStartAnimateIn
-* @param {String} type The CustomEvent type
-* @param {Object[]} args The CustomEvent arguments
-* @param {Object} obj The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn = function(type, args, obj) { };
-/**
-* The default onTween handler for the in-animation.
-* @method handleTweenAnimateIn
-* @param {String} type The CustomEvent type
-* @param {Object[]} args The CustomEvent arguments
-* @param {Object} obj The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn = function(type, args, obj) { };
-/**
-* The default onComplete handler for the in-animation.
-* @method handleCompleteAnimateIn
-* @param {String} type The CustomEvent type
-* @param {Object[]} args The CustomEvent arguments
-* @param {Object} obj The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn = function(type, args, obj) { };
-
-/**
-* The default onStart handler for the out-animation.
-* @method handleStartAnimateOut
-* @param {String} type The CustomEvent type
-* @param {Object[]} args The CustomEvent arguments
-* @param {Object} obj The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut = function(type, args, obj) { };
-/**
-* The default onTween handler for the out-animation.
-* @method handleTweenAnimateOut
-* @param {String} type The CustomEvent type
-* @param {Object[]} args The CustomEvent arguments
-* @param {Object} obj The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut = function(type, args, obj) { };
-/**
-* The default onComplete handler for the out-animation.
-* @method handleCompleteAnimateOut
-* @param {String} type The CustomEvent type
-* @param {Object[]} args The CustomEvent arguments
-* @param {Object} obj The scope object
-*/
-YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut = function(type, args, obj) { };
-
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String} The string representation of the ContainerEffect
-*/
-YAHOO.widget.ContainerEffect.prototype.toString = function() {
- var output = "ContainerEffect";
- if (this.overlay) {
- output += " [" + this.overlay.toString() + "]";
- }
- return output;
-};
-
-/**
-* A pre-configured ContainerEffect instance that can be used for fading an overlay in and out.
-* @method FADE
-* @static
-* @param {Overlay} overlay The Overlay object to animate
-* @param {Number} dur The duration of the animation
-* @return {ContainerEffect} The configured ContainerEffect object
-*/
-YAHOO.widget.ContainerEffect.FADE = function(overlay, dur) {
- var fade = new YAHOO.widget.ContainerEffect(overlay, { attributes:{opacity: {from:0, to:1}}, duration:dur, method:YAHOO.util.Easing.easeIn }, { attributes:{opacity: {to:0}}, duration:dur, method:YAHOO.util.Easing.easeOut}, overlay.element );
-
- fade.handleStartAnimateIn = function(type,args,obj) {
- YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");
-
- if (! obj.overlay.underlay) {
- obj.overlay.cfg.refireEvent("underlay");
- }
-
- if (obj.overlay.underlay) {
- obj.initialUnderlayOpacity = YAHOO.util.Dom.getStyle(obj.overlay.underlay, "opacity");
- obj.overlay.underlay.style.filter = null;
- }
-
- YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "visible");
- YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 0);
- };
-
- fade.handleCompleteAnimateIn = function(type,args,obj) {
- YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");
-
- if (obj.overlay.element.style.filter) {
- obj.overlay.element.style.filter = null;
- }
-
- if (obj.overlay.underlay) {
- YAHOO.util.Dom.setStyle(obj.overlay.underlay, "opacity", obj.initialUnderlayOpacity);
- }
-
- obj.overlay.cfg.refireEvent("iframe");
- obj.animateInCompleteEvent.fire();
- };
-
- fade.handleStartAnimateOut = function(type, args, obj) {
- YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");
-
- if (obj.overlay.underlay) {
- obj.overlay.underlay.style.filter = null;
- }
- };
-
- fade.handleCompleteAnimateOut = function(type, args, obj) {
- YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");
- if (obj.overlay.element.style.filter) {
- obj.overlay.element.style.filter = null;
- }
- YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "hidden");
- YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 1);
-
- obj.overlay.cfg.refireEvent("iframe");
-
- obj.animateOutCompleteEvent.fire();
- };
-
- fade.init();
- return fade;
-};
-
-
-/**
-* A pre-configured ContainerEffect instance that can be used for sliding an overlay in and out.
-* @method SLIDE
-* @static
-* @param {Overlay} overlay The Overlay object to animate
-* @param {Number} dur The duration of the animation
-* @return {ContainerEffect} The configured ContainerEffect object
-*/
-YAHOO.widget.ContainerEffect.SLIDE = function(overlay, dur) {
- var x = overlay.cfg.getProperty("x") || YAHOO.util.Dom.getX(overlay.element);
- var y = overlay.cfg.getProperty("y") || YAHOO.util.Dom.getY(overlay.element);
-
- var clientWidth = YAHOO.util.Dom.getClientWidth();
- var offsetWidth = overlay.element.offsetWidth;
-
- var slide = new YAHOO.widget.ContainerEffect(overlay, {
- attributes:{ points: { to:[x, y] } },
- duration:dur,
- method:YAHOO.util.Easing.easeIn
- },
- {
- attributes:{ points: { to:[(clientWidth+25), y] } },
- duration:dur,
- method:YAHOO.util.Easing.easeOut
- },
- overlay.element,
- YAHOO.util.Motion);
-
-
- slide.handleStartAnimateIn = function(type,args,obj) {
- obj.overlay.element.style.left = (-25-offsetWidth) + "px";
- obj.overlay.element.style.top = y + "px";
- };
-
- slide.handleTweenAnimateIn = function(type, args, obj) {
-
-
- var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
-
- var currentX = pos[0];
- var currentY = pos[1];
-
- if (YAHOO.util.Dom.getStyle(obj.overlay.element, "visibility") == "hidden" && currentX < x) {
- YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "visible");
- }
-
- obj.overlay.cfg.setProperty("xy", [currentX,currentY], true);
- obj.overlay.cfg.refireEvent("iframe");
- };
-
- slide.handleCompleteAnimateIn = function(type, args, obj) {
- obj.overlay.cfg.setProperty("xy", [x,y], true);
- obj.startX = x;
- obj.startY = y;
- obj.overlay.cfg.refireEvent("iframe");
- obj.animateInCompleteEvent.fire();
- };
-
- slide.handleStartAnimateOut = function(type, args, obj) {
- var vw = YAHOO.util.Dom.getViewportWidth();
-
- var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
-
- var yso = pos[1];
-
- var currentTo = obj.animOut.attributes.points.to;
- obj.animOut.attributes.points.to = [(vw+25), yso];
- };
-
- slide.handleTweenAnimateOut = function(type, args, obj) {
- var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
-
- var xto = pos[0];
- var yto = pos[1];
-
- obj.overlay.cfg.setProperty("xy", [xto,yto], true);
- obj.overlay.cfg.refireEvent("iframe");
- };
-
- slide.handleCompleteAnimateOut = function(type, args, obj) {
- YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "hidden");
-
- obj.overlay.cfg.setProperty("xy", [x,y]);
- obj.animateOutCompleteEvent.fire();
- };
-
- slide.init();
- return slide;
-};
\ No newline at end of file
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/**
+* Config is a utility used within an Object to allow the implementer to maintain a list of local configuration properties and listen for changes to those properties dynamically using CustomEvent. The initial values are also maintained so that the configuration can be reset at any given point to its initial state.
+* @namespace YAHOO.util
+* @class Config
+* @constructor
+* @param {Object} owner The owner Object to which this Config Object belongs
+*/
+YAHOO.util.Config = function(owner) {
+ if (owner) {
+ this.init(owner);
+ }
+};
+
+/**
+ * Constant representing the CustomEvent type for the config changed event.
+ * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT
+ * @private
+ * @static
+ * @final
+ */
+YAHOO.util.Config.CONFIG_CHANGED_EVENT = "configChanged";
+
+/**
+ * Constant representing the boolean type string
+ * @property YAHOO.util.Config.BOOLEAN_TYPE
+ * @private
+ * @static
+ * @final
+ */
+YAHOO.util.Config.BOOLEAN_TYPE = "boolean";
+
+YAHOO.util.Config.prototype = {
+
+ /**
+ * Object reference to the owner of this Config Object
+ * @property owner
+ * @type Object
+ */
+ owner : null,
+
+ /**
+ * Boolean flag that specifies whether a queue is currently being executed
+ * @property queueInProgress
+ * @type Boolean
+ */
+ queueInProgress : false,
+
+ /**
+ * Maintains the local collection of configuration property objects and their specified values
+ * @property config
+ * @private
+ * @type Object
+ */
+ config : null,
+
+ /**
+ * Maintains the local collection of configuration property objects as they were initially applied.
+ * This object is used when resetting a property.
+ * @property initialConfig
+ * @private
+ * @type Object
+ */
+ initialConfig : null,
+
+ /**
+ * Maintains the local, normalized CustomEvent queue
+ * @property eventQueue
+ * @private
+ * @type Object
+ */
+ eventQueue : null,
+
+ /**
+ * Custom Event, notifying subscribers when Config properties are set (setProperty is called without the silent flag
+ * @event configChangedEvent
+ */
+ configChangedEvent : null,
+
+ /**
+ * Validates that the value passed in is a Boolean.
+ * @method checkBoolean
+ * @param {Object} val The value to validate
+ * @return {Boolean} true, if the value is valid
+ */
+ checkBoolean: function(val) {
+ return (typeof val == YAHOO.util.Config.BOOLEAN_TYPE);
+ },
+
+ /**
+ * Validates that the value passed in is a number.
+ * @method checkNumber
+ * @param {Object} val The value to validate
+ * @return {Boolean} true, if the value is valid
+ */
+ checkNumber: function(val) {
+ return (!isNaN(val));
+ },
+
+ /**
+ * Fires a configuration property event using the specified value.
+ * @method fireEvent
+ * @private
+ * @param {String} key The configuration property's name
+ * @param {value} Object The value of the correct type for the property
+ */
+ fireEvent : function( key, value ) {
+ var property = this.config[key];
+
+ if (property && property.event) {
+ property.event.fire(value);
+ }
+ },
+
+ /**
+ * Adds a property to the Config Object's private config hash.
+ * @method addProperty
+ * @param {String} key The configuration property's name
+ * @param {Object} propertyObject The Object containing all of this property's arguments
+ */
+ addProperty : function( key, propertyObject ) {
+ key = key.toLowerCase();
+
+ this.config[key] = propertyObject;
+
+ propertyObject.event = new YAHOO.util.CustomEvent(key, this.owner);
+ propertyObject.key = key;
+
+ if (propertyObject.handler) {
+ propertyObject.event.subscribe(propertyObject.handler, this.owner);
+ }
+
+ this.setProperty(key, propertyObject.value, true);
+
+ if (! propertyObject.suppressEvent) {
+ this.queueProperty(key, propertyObject.value);
+ }
+
+ },
+
+ /**
+ * Returns a key-value configuration map of the values currently set in the Config Object.
+ * @method getConfig
+ * @return {Object} The current config, represented in a key-value map
+ */
+ getConfig : function() {
+ var cfg = {};
+
+ for (var prop in this.config) {
+ var property = this.config[prop];
+ if (property && property.event) {
+ cfg[prop] = property.value;
+ }
+ }
+
+ return cfg;
+ },
+
+ /**
+ * Returns the value of specified property.
+ * @method getProperty
+ * @param {String} key The name of the property
+ * @return {Object} The value of the specified property
+ */
+ getProperty : function(key) {
+ var property = this.config[key.toLowerCase()];
+ if (property && property.event) {
+ return property.value;
+ } else {
+ return undefined;
+ }
+ },
+
+ /**
+ * Resets the specified property's value to its initial value.
+ * @method resetProperty
+ * @param {String} key The name of the property
+ * @return {Boolean} True is the property was reset, false if not
+ */
+ resetProperty : function(key) {
+ key = key.toLowerCase();
+
+ var property = this.config[key];
+ if (property && property.event) {
+ if (this.initialConfig[key] && !YAHOO.lang.isUndefined(this.initialConfig[key])) {
+ this.setProperty(key, this.initialConfig[key]);
+ }
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Sets the value of a property. If the silent property is passed as true, the property's event will not be fired.
+ * @method setProperty
+ * @param {String} key The name of the property
+ * @param {String} value The value to set the property to
+ * @param {Boolean} silent Whether the value should be set silently, without firing the property event.
+ * @return {Boolean} True, if the set was successful, false if it failed.
+ */
+ setProperty : function(key, value, silent) {
+ key = key.toLowerCase();
+
+ if (this.queueInProgress && ! silent) {
+ this.queueProperty(key,value); // Currently running through a queue...
+ return true;
+ } else {
+ var property = this.config[key];
+ if (property && property.event) {
+ if (property.validator && ! property.validator(value)) { // validator
+ return false;
+ } else {
+ property.value = value;
+ if (! silent) {
+ this.fireEvent(key, value);
+ this.configChangedEvent.fire([key, value]);
+ }
+ return true;
+ }
+ } else {
+ return false;
+ }
+ }
+ },
+
+ /**
+ * Sets the value of a property and queues its event to execute. If the event is already scheduled to execute, it is
+ * moved from its current position to the end of the queue.
+ * @method queueProperty
+ * @param {String} key The name of the property
+ * @param {String} value The value to set the property to
+ * @return {Boolean} true, if the set was successful, false if it failed.
+ */
+ queueProperty : function(key, value) {
+ key = key.toLowerCase();
+
+ var property = this.config[key];
+
+ if (property && property.event) {
+ if (!YAHOO.lang.isUndefined(value) && property.validator && ! property.validator(value)) { // validator
+ return false;
+ } else {
+
+ if (!YAHOO.lang.isUndefined(value)) {
+ property.value = value;
+ } else {
+ value = property.value;
+ }
+
+ var foundDuplicate = false;
+ var iLen = this.eventQueue.length;
+ for (var i=0; i < iLen; i++) {
+ var queueItem = this.eventQueue[i];
+
+ if (queueItem) {
+ var queueItemKey = queueItem[0];
+ var queueItemValue = queueItem[1];
+
+ if (queueItemKey == key) {
+ // found a dupe... push to end of queue, null current item, and break
+ this.eventQueue[i] = null;
+ this.eventQueue.push([key, (!YAHOO.lang.isUndefined(value) ? value : queueItemValue)]);
+ foundDuplicate = true;
+ break;
+ }
+ }
+ }
+
+ if (! foundDuplicate && !YAHOO.lang.isUndefined(value)) { // this is a refire, or a new property in the queue
+ this.eventQueue.push([key, value]);
+ }
+ }
+
+ if (property.supercedes) {
+ var sLen = property.supercedes.length;
+ for (var s=0; s < sLen; s++) {
+ var supercedesCheck = property.supercedes[s];
+ var qLen = this.eventQueue.length;
+ for (var q=0; q < qLen; q++) {
+ var queueItemCheck = this.eventQueue[q];
+
+ if (queueItemCheck) {
+ var queueItemCheckKey = queueItemCheck[0];
+ var queueItemCheckValue = queueItemCheck[1];
+
+ if ( queueItemCheckKey == supercedesCheck.toLowerCase() ) {
+ this.eventQueue.push([queueItemCheckKey, queueItemCheckValue]);
+ this.eventQueue[q] = null;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Fires the event for a property using the property's current value.
+ * @method refireEvent
+ * @param {String} key The name of the property
+ */
+ refireEvent : function(key) {
+ key = key.toLowerCase();
+
+ var property = this.config[key];
+ if (property && property.event && !YAHOO.lang.isUndefined(property.value)) {
+ if (this.queueInProgress) {
+ this.queueProperty(key);
+ } else {
+ this.fireEvent(key, property.value);
+ }
+ }
+ },
+
+ /**
+ * Applies a key-value Object literal to the configuration, replacing any existing values, and queueing the property events.
+ * Although the values will be set, fireQueue() must be called for their associated events to execute.
+ * @method applyConfig
+ * @param {Object} userConfig The configuration Object literal
+ * @param {Boolean} init When set to true, the initialConfig will be set to the userConfig passed in, so that calling a reset will reset the properties to the passed values.
+ */
+ applyConfig : function(userConfig, init) {
+ if (init) {
+ this.initialConfig = userConfig;
+ }
+ for (var prop in userConfig) {
+ this.queueProperty(prop, userConfig[prop]);
+ }
+ },
+
+ /**
+ * Refires the events for all configuration properties using their current values.
+ * @method refresh
+ */
+ refresh : function() {
+ for (var prop in this.config) {
+ this.refireEvent(prop);
+ }
+ },
+
+ /**
+ * Fires the normalized list of queued property change events
+ * @method fireQueue
+ */
+ fireQueue : function() {
+ this.queueInProgress = true;
+ for (var i=0;iOR
+* @param {HTMLElement} el The element representing the Module
+* @param {Object} userConfig The configuration Object literal containing the configuration that should be set for this module. See configuration documentation for more details.
+*/
+YAHOO.widget.Module = function(el, userConfig) {
+ if (el) {
+ this.init(el, userConfig);
+ } else {
+ }
+};
+
+/**
+* Constant representing the prefix path to use for non-secure images
+* @property YAHOO.widget.Module.IMG_ROOT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.IMG_ROOT = null;
+
+/**
+* Constant representing the prefix path to use for securely served images
+* @property YAHOO.widget.Module.IMG_ROOT_SSL
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.IMG_ROOT_SSL = null;
+
+/**
+* Constant for the default CSS class name that represents a Module
+* @property YAHOO.widget.Module.CSS_MODULE
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.CSS_MODULE = "yui-module";
+
+/**
+* Constant representing the module header
+* @property YAHOO.widget.Module.CSS_HEADER
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.CSS_HEADER = "hd";
+
+/**
+* Constant representing the module body
+* @property YAHOO.widget.Module.CSS_BODY
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.CSS_BODY = "bd";
+
+/**
+* Constant representing the module footer
+* @property YAHOO.widget.Module.CSS_FOOTER
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.CSS_FOOTER = "ft";
+
+/**
+* Constant representing the url for the "src" attribute of the iframe used to monitor changes to the browser's base font size
+* @property YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL = "javascript:false;";
+
+/**
+* Singleton CustomEvent fired when the font size is changed in the browser.
+* Opera's "zoom" functionality currently does not support text size detection.
+* @event YAHOO.widget.Module.textResizeEvent
+*/
+YAHOO.widget.Module.textResizeEvent = new YAHOO.util.CustomEvent("textResize");
+
+/**
+* Constant representing the name of the Module's events
+* @property YAHOO.widget.Module._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Module._EVENT_TYPES = {
+
+ "BEFORE_INIT": "beforeInit",
+ "INIT": "init",
+ "APPEND": "append",
+ "BEFORE_RENDER": "beforeRender",
+ "RENDER": "render",
+ "CHANGE_HEADER": "changeHeader",
+ "CHANGE_BODY": "changeBody",
+ "CHANGE_FOOTER": "changeFooter",
+ "CHANGE_CONTENT": "changeContent",
+ "DESTORY": "destroy",
+ "BEFORE_SHOW": "beforeShow",
+ "SHOW": "show",
+ "BEFORE_HIDE": "beforeHide",
+ "HIDE": "hide"
+
+};
+
+/**
+* Constant representing the Module's configuration properties
+* @property YAHOO.widget.Module._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Module._DEFAULT_CONFIG = {
+
+ "VISIBLE": {
+ key: "visible",
+ value: true,
+ validator: YAHOO.lang.isBoolean
+ },
+
+ "EFFECT": {
+ key: "effect",
+ suppressEvent:true,
+ supercedes:["visible"]
+ },
+
+ "MONITOR_RESIZE": {
+ key: "monitorresize",
+ value:true
+ }
+
+};
+
+
+YAHOO.widget.Module.prototype = {
+
+ /**
+ * The class's constructor function
+ * @property contructor
+ * @type Function
+ */
+ constructor : YAHOO.widget.Module,
+
+ /**
+ * The main module element that contains the header, body, and footer
+ * @property element
+ * @type HTMLElement
+ */
+ element : null,
+
+ /**
+ * The header element, denoted with CSS class "hd"
+ * @property header
+ * @type HTMLElement
+ */
+ header : null,
+
+ /**
+ * The body element, denoted with CSS class "bd"
+ * @property body
+ * @type HTMLElement
+ */
+ body : null,
+
+ /**
+ * The footer element, denoted with CSS class "ft"
+ * @property footer
+ * @type HTMLElement
+ */
+ footer : null,
+
+ /**
+ * The id of the element
+ * @property id
+ * @type String
+ */
+ id : null,
+
+ /**
+ * The String representing the image root
+ * @property imageRoot
+ * @type String
+ */
+ imageRoot : YAHOO.widget.Module.IMG_ROOT,
+
+ /**
+ * Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
+ * @method initEvents
+ */
+ initEvents : function() {
+
+ var EVENT_TYPES = YAHOO.widget.Module._EVENT_TYPES;
+
+ /**
+ * CustomEvent fired prior to class initalization.
+ * @event beforeInitEvent
+ * @param {class} classRef class reference of the initializing class, such as this.beforeInitEvent.fire(YAHOO.widget.Module)
+ */
+ this.beforeInitEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_INIT, this);
+
+ /**
+ * CustomEvent fired after class initalization.
+ * @event initEvent
+ * @param {class} classRef class reference of the initializing class, such as this.beforeInitEvent.fire(YAHOO.widget.Module)
+ */
+ this.initEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.INIT, this);
+
+ /**
+ * CustomEvent fired when the Module is appended to the DOM
+ * @event appendEvent
+ */
+ this.appendEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.APPEND, this);
+
+ /**
+ * CustomEvent fired before the Module is rendered
+ * @event beforeRenderEvent
+ */
+ this.beforeRenderEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_RENDER, this);
+
+ /**
+ * CustomEvent fired after the Module is rendered
+ * @event renderEvent
+ */
+ this.renderEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.RENDER, this);
+
+ /**
+ * CustomEvent fired when the header content of the Module is modified
+ * @event changeHeaderEvent
+ * @param {String/HTMLElement} content String/element representing the new header content
+ */
+ this.changeHeaderEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_HEADER, this);
+
+ /**
+ * CustomEvent fired when the body content of the Module is modified
+ * @event changeBodyEvent
+ * @param {String/HTMLElement} content String/element representing the new body content
+ */
+ this.changeBodyEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_BODY, this);
+
+ /**
+ * CustomEvent fired when the footer content of the Module is modified
+ * @event changeFooterEvent
+ * @param {String/HTMLElement} content String/element representing the new footer content
+ */
+ this.changeFooterEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_FOOTER, this);
+
+ /**
+ * CustomEvent fired when the content of the Module is modified
+ * @event changeContentEvent
+ */
+ this.changeContentEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_CONTENT, this);
+
+ /**
+ * CustomEvent fired when the Module is destroyed
+ * @event destroyEvent
+ */
+ this.destroyEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.DESTORY, this);
+
+ /**
+ * CustomEvent fired before the Module is shown
+ * @event beforeShowEvent
+ */
+ this.beforeShowEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_SHOW, this);
+
+ /**
+ * CustomEvent fired after the Module is shown
+ * @event showEvent
+ */
+ this.showEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.SHOW, this);
+
+ /**
+ * CustomEvent fired before the Module is hidden
+ * @event beforeHideEvent
+ */
+ this.beforeHideEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_HIDE, this);
+
+ /**
+ * CustomEvent fired after the Module is hidden
+ * @event hideEvent
+ */
+ this.hideEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.HIDE, this);
+ },
+
+ /**
+ * String representing the current user-agent platform
+ * @property platform
+ * @type String
+ */
+ platform : function() {
+ var ua = navigator.userAgent.toLowerCase();
+ if (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1) {
+ return "windows";
+ } else if (ua.indexOf("macintosh") != -1) {
+ return "mac";
+ } else {
+ return false;
+ }
+ }(),
+
+ /**
+ * String representing the current user-agent browser
+ * @property browser
+ * @type String
+ */
+ browser : function() {
+ var ua = navigator.userAgent.toLowerCase();
+ if (ua.indexOf('opera')!=-1) { // Opera (check first in case of spoof)
+ return 'opera';
+ } else if (ua.indexOf('msie 7')!=-1) { // IE7
+ return 'ie7';
+ } else if (ua.indexOf('msie') !=-1) { // IE
+ return 'ie';
+ } else if (ua.indexOf('safari')!=-1) { // Safari (check before Gecko because it includes "like Gecko")
+ return 'safari';
+ } else if (ua.indexOf('gecko') != -1) { // Gecko
+ return 'gecko';
+ } else {
+ return false;
+ }
+ }(),
+
+ /**
+ * Boolean representing whether or not the current browsing context is secure (https)
+ * @property isSecure
+ * @type Boolean
+ */
+ isSecure : function() {
+ if (window.location.href.toLowerCase().indexOf("https") === 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }(),
+
+ /**
+ * Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
+ */
+ initDefaultConfig : function() {
+ // Add properties //
+
+ var DEFAULT_CONFIG = YAHOO.widget.Module._DEFAULT_CONFIG;
+
+ /**
+ * Specifies whether the Module is visible on the page.
+ * @config visible
+ * @type Boolean
+ * @default true
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.VISIBLE.key,
+ {
+ handler: this.configVisible,
+ value: DEFAULT_CONFIG.VISIBLE.value,
+ validator: DEFAULT_CONFIG.VISIBLE.validator
+ }
+ );
+
+ /**
+ * Object or array of objects representing the ContainerEffect classes that are active for animating the container.
+ * @config effect
+ * @type Object
+ * @default null
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.EFFECT.key,
+ {
+ suppressEvent: DEFAULT_CONFIG.EFFECT.suppressEvent,
+ supercedes: DEFAULT_CONFIG.EFFECT.supercedes
+ }
+ );
+
+ /**
+ * Specifies whether to create a special proxy iframe to monitor for user font resizing in the document
+ * @config monitorresize
+ * @type Boolean
+ * @default true
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.MONITOR_RESIZE.key,
+ {
+ handler: this.configMonitorResize,
+ value: DEFAULT_CONFIG.MONITOR_RESIZE.value
+ }
+ );
+
+ },
+
+ /**
+ * The Module class's initialization method, which is executed for Module and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
+ * @method init
+ * @param {String} el The element ID representing the Module OR
+ * @param {HTMLElement} el The element representing the Module
+ * @param {Object} userConfig The configuration Object literal containing the configuration that should be set for this module. See configuration documentation for more details.
+ */
+ init : function(el, userConfig) {
+
+ this.initEvents();
+
+ this.beforeInitEvent.fire(YAHOO.widget.Module);
+
+ /**
+ * The Module's Config object used for monitoring configuration properties.
+ * @property cfg
+ * @type YAHOO.util.Config
+ */
+ this.cfg = new YAHOO.util.Config(this);
+
+ if (this.isSecure) {
+ this.imageRoot = YAHOO.widget.Module.IMG_ROOT_SSL;
+ }
+
+ if (typeof el == "string") {
+ var elId = el;
+
+ el = document.getElementById(el);
+ if (! el) {
+ el = document.createElement("div");
+ el.id = elId;
+ }
+ }
+
+ this.element = el;
+
+ if (el.id) {
+ this.id = el.id;
+ }
+
+ var childNodes = this.element.childNodes;
+
+ if (childNodes) {
+ for (var i=0;iOR
+ * @param {HTMLElement} headerContent The HTMLElement to append to the header
+ */
+ setHeader : function(headerContent) {
+ if (! this.header) {
+ this.header = document.createElement("div");
+ this.header.className = YAHOO.widget.Module.CSS_HEADER;
+ }
+
+ if (typeof headerContent == "string") {
+ this.header.innerHTML = headerContent;
+ } else {
+ this.header.innerHTML = "";
+ this.header.appendChild(headerContent);
+ }
+
+ this.changeHeaderEvent.fire(headerContent);
+ this.changeContentEvent.fire();
+ },
+
+ /**
+ * Appends the passed element to the header. If no header is present, one will be automatically created.
+ * @method appendToHeader
+ * @param {HTMLElement} element The element to append to the header
+ */
+ appendToHeader : function(element) {
+ if (! this.header) {
+ this.header = document.createElement("div");
+ this.header.className = YAHOO.widget.Module.CSS_HEADER;
+ }
+
+ this.header.appendChild(element);
+ this.changeHeaderEvent.fire(element);
+ this.changeContentEvent.fire();
+ },
+
+ /**
+ * Sets the Module's body content to the HTML specified, or appends the passed element to the body. If no body is present, one will be automatically created.
+ * @method setBody
+ * @param {String} bodyContent The HTML used to set the body OR
+ * @param {HTMLElement} bodyContent The HTMLElement to append to the body
+ */
+ setBody : function(bodyContent) {
+ if (! this.body) {
+ this.body = document.createElement("div");
+ this.body.className = YAHOO.widget.Module.CSS_BODY;
+ }
+
+ if (typeof bodyContent == "string")
+ {
+ this.body.innerHTML = bodyContent;
+ } else {
+ this.body.innerHTML = "";
+ this.body.appendChild(bodyContent);
+ }
+
+ this.changeBodyEvent.fire(bodyContent);
+ this.changeContentEvent.fire();
+ },
+
+ /**
+ * Appends the passed element to the body. If no body is present, one will be automatically created.
+ * @method appendToBody
+ * @param {HTMLElement} element The element to append to the body
+ */
+ appendToBody : function(element) {
+ if (! this.body) {
+ this.body = document.createElement("div");
+ this.body.className = YAHOO.widget.Module.CSS_BODY;
+ }
+
+ this.body.appendChild(element);
+ this.changeBodyEvent.fire(element);
+ this.changeContentEvent.fire();
+ },
+
+ /**
+ * Sets the Module's footer content to the HTML specified, or appends the passed element to the footer. If no footer is present, one will be automatically created.
+ * @method setFooter
+ * @param {String} footerContent The HTML used to set the footer OR
+ * @param {HTMLElement} footerContent The HTMLElement to append to the footer
+ */
+ setFooter : function(footerContent) {
+ if (! this.footer) {
+ this.footer = document.createElement("div");
+ this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
+ }
+
+ if (typeof footerContent == "string") {
+ this.footer.innerHTML = footerContent;
+ } else {
+ this.footer.innerHTML = "";
+ this.footer.appendChild(footerContent);
+ }
+
+ this.changeFooterEvent.fire(footerContent);
+ this.changeContentEvent.fire();
+ },
+
+ /**
+ * Appends the passed element to the footer. If no footer is present, one will be automatically created.
+ * @method appendToFooter
+ * @param {HTMLElement} element The element to append to the footer
+ */
+ appendToFooter : function(element) {
+ if (! this.footer) {
+ this.footer = document.createElement("div");
+ this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
+ }
+
+ this.footer.appendChild(element);
+ this.changeFooterEvent.fire(element);
+ this.changeContentEvent.fire();
+ },
+
+ /**
+ * Renders the Module by inserting the elements that are not already in the main Module into their correct places. Optionally appends the Module to the specified node prior to the render's execution. NOTE: For Modules without existing markup, the appendToNode argument is REQUIRED. If this argument is ommitted and the current element is not present in the document, the function will return false, indicating that the render was a failure.
+ * @method render
+ * @param {String} appendToNode The element id to which the Module should be appended to prior to rendering OR
+ * @param {HTMLElement} appendToNode The element to which the Module should be appended to prior to rendering
+ * @param {HTMLElement} moduleElement OPTIONAL. The element that represents the actual Standard Module container.
+ * @return {Boolean} Success or failure of the render
+ */
+ render : function(appendToNode, moduleElement) {
+ this.beforeRenderEvent.fire();
+
+ if (! moduleElement) {
+ moduleElement = this.element;
+ }
+
+ var me = this;
+ var appendTo = function(element) {
+ if (typeof element == "string") {
+ element = document.getElementById(element);
+ }
+
+ if (element) {
+ element.appendChild(me.element);
+ me.appendEvent.fire();
+ }
+ };
+
+ if (appendToNode) {
+ appendTo(appendToNode);
+ } else { // No node was passed in. If the element is not pre-marked up, this fails
+ if (! YAHOO.util.Dom.inDocument(this.element)) {
+ return false;
+ }
+ }
+
+ // Need to get everything into the DOM if it isn't already
+
+ if (this.header && ! YAHOO.util.Dom.inDocument(this.header)) {
+ // There is a header, but it's not in the DOM yet... need to add it
+ var firstChild = moduleElement.firstChild;
+ if (firstChild) { // Insert before first child if exists
+ moduleElement.insertBefore(this.header, firstChild);
+ } else { // Append to empty body because there are no children
+ moduleElement.appendChild(this.header);
+ }
+ }
+
+ if (this.body && ! YAHOO.util.Dom.inDocument(this.body)) {
+ // There is a body, but it's not in the DOM yet... need to add it
+ if (this.footer && YAHOO.util.Dom.isAncestor(this.moduleElement, this.footer)) { // Insert before footer if exists in DOM
+ moduleElement.insertBefore(this.body, this.footer);
+ } else { // Append to element because there is no footer
+ moduleElement.appendChild(this.body);
+ }
+ }
+
+ if (this.footer && ! YAHOO.util.Dom.inDocument(this.footer)) {
+ // There is a footer, but it's not in the DOM yet... need to add it
+ moduleElement.appendChild(this.footer);
+ }
+
+ this.renderEvent.fire();
+ return true;
+ },
+
+ /**
+ * Removes the Module element from the DOM and sets all child elements to null.
+ * @method destroy
+ */
+ destroy : function() {
+ var parent;
+
+ if (this.element) {
+ YAHOO.util.Event.purgeElement(this.element, true);
+ parent = this.element.parentNode;
+ }
+ if (parent) {
+ parent.removeChild(this.element);
+ }
+
+ this.element = null;
+ this.header = null;
+ this.body = null;
+ this.footer = null;
+
+ for (var e in this) {
+ if (e instanceof YAHOO.util.CustomEvent) {
+ e.unsubscribeAll();
+ }
+ }
+
+ YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize, this);
+
+ this.destroyEvent.fire();
+ },
+
+ /**
+ * Shows the Module element by setting the visible configuration property to true. Also fires two events: beforeShowEvent prior to the visibility change, and showEvent after.
+ * @method show
+ */
+ show : function() {
+ this.cfg.setProperty("visible", true);
+ },
+
+ /**
+ * Hides the Module element by setting the visible configuration property to false. Also fires two events: beforeHideEvent prior to the visibility change, and hideEvent after.
+ * @method hide
+ */
+ hide : function() {
+ this.cfg.setProperty("visible", false);
+ },
+
+ // BUILT-IN EVENT HANDLERS FOR MODULE //
+
+ /**
+ * Default event handler for changing the visibility property of a Module. By default, this is achieved by switching the "display" style between "block" and "none".
+ * This method is responsible for firing showEvent and hideEvent.
+ * @param {String} type The CustomEvent type (usually the property name)
+ * @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+ * @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+ * @method configVisible
+ */
+ configVisible : function(type, args, obj) {
+ var visible = args[0];
+ if (visible) {
+ this.beforeShowEvent.fire();
+ YAHOO.util.Dom.setStyle(this.element, "display", "block");
+ this.showEvent.fire();
+ } else {
+ this.beforeHideEvent.fire();
+ YAHOO.util.Dom.setStyle(this.element, "display", "none");
+ this.hideEvent.fire();
+ }
+ },
+
+ /**
+ * Default event handler for the "monitorresize" configuration property
+ * @param {String} type The CustomEvent type (usually the property name)
+ * @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+ * @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+ * @method configMonitorResize
+ */
+ configMonitorResize : function(type, args, obj) {
+ var monitor = args[0];
+ if (monitor) {
+ this.initResizeMonitor();
+ } else {
+ YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize, this, true);
+ this.resizeMonitor = null;
+ }
+ }
+};
+
+/**
+* Returns a String representation of the Object.
+* @method toString
+* @return {String} The string representation of the Module
+*/
+YAHOO.widget.Module.prototype.toString = function() {
+ return "Module " + this.id;
+};
+/**
+* Overlay is a Module that is absolutely positioned above the page flow. It has convenience methods for positioning and sizing, as well as options for controlling zIndex and constraining the Overlay's position to the current visible viewport. Overlay also contains a dynamicly generated IFRAME which is placed beneath it for Internet Explorer 6 and 5.x so that it will be properly rendered above SELECT elements.
+* @namespace YAHOO.widget
+* @class Overlay
+* @extends YAHOO.widget.Module
+* @param {String} el The element ID representing the Overlay OR
+* @param {HTMLElement} el The element representing the Overlay
+* @param {Object} userConfig The configuration object literal containing 10/23/2006the configuration that should be set for this Overlay. See configuration documentation for more details.
+* @constructor
+*/
+YAHOO.widget.Overlay = function(el, userConfig) {
+ YAHOO.widget.Overlay.superclass.constructor.call(this, el, userConfig);
+};
+
+YAHOO.extend(YAHOO.widget.Overlay, YAHOO.widget.Module);
+
+/**
+* Constant representing the name of the Overlay's events
+* @property YAHOO.widget.Overlay._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Overlay._EVENT_TYPES = {
+
+ "BEFORE_MOVE": "beforeMove",
+ "MOVE": "move"
+
+};
+
+/**
+* Constant representing the Overlay's configuration properties
+* @property YAHOO.widget.Overlay._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Overlay._DEFAULT_CONFIG = {
+
+ "X": {
+ key: "x",
+ validator:YAHOO.lang.isNumber,
+ suppressEvent:true, supercedes:["iframe"]
+ },
+
+ "Y": {
+ key: "y",
+ validator:YAHOO.lang.isNumber,
+ suppressEvent:true, supercedes:["iframe"]
+ },
+
+ "XY": {
+ key: "xy",
+ suppressEvent:true,
+ supercedes:["iframe"]
+ },
+
+ "CONTEXT": {
+ key: "context",
+ suppressEvent:true,
+ supercedes:["iframe"]
+ },
+
+ "FIXED_CENTER": {
+ key: "fixedcenter",
+ value:false,
+ validator:YAHOO.lang.isBoolean,
+ supercedes:["iframe","visible"]
+ },
+
+ "WIDTH": {
+ key: "width",
+ suppressEvent:true,
+ supercedes:["iframe"]
+ },
+
+ "HEIGHT": {
+ key: "height",
+ suppressEvent:true,
+ supercedes:["iframe"]
+ },
+
+ "ZINDEX": {
+ key: "zindex",
+ value:null
+ },
+
+ "CONSTRAIN_TO_VIEWPORT": {
+ key: "constraintoviewport",
+ value:false,
+ validator:YAHOO.lang.isBoolean,
+ supercedes:["iframe","x","y","xy"]
+ },
+
+ "IFRAME": {
+ key: "iframe",
+ value:(YAHOO.widget.Module.prototype.browser == "ie" ? true : false),
+ validator:YAHOO.lang.isBoolean,
+ supercedes:["zIndex"]
+ }
+
+};
+
+/**
+* The URL that will be placed in the iframe
+* @property YAHOO.widget.Overlay.IFRAME_SRC
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.IFRAME_SRC = "javascript:false;";
+
+/**
+* Constant representing the top left corner of an element, used for configuring the context element alignment
+* @property YAHOO.widget.Overlay.TOP_LEFT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.TOP_LEFT = "tl";
+
+/**
+* Constant representing the top right corner of an element, used for configuring the context element alignment
+* @property YAHOO.widget.Overlay.TOP_RIGHT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.TOP_RIGHT = "tr";
+
+/**
+* Constant representing the top bottom left corner of an element, used for configuring the context element alignment
+* @property YAHOO.widget.Overlay.BOTTOM_LEFT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.BOTTOM_LEFT = "bl";
+
+/**
+* Constant representing the bottom right corner of an element, used for configuring the context element alignment
+* @property YAHOO.widget.Overlay.BOTTOM_RIGHT
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.BOTTOM_RIGHT = "br";
+
+/**
+* Constant representing the default CSS class used for an Overlay
+* @property YAHOO.widget.Overlay.CSS_OVERLAY
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Overlay.CSS_OVERLAY = "yui-overlay";
+
+/**
+* The Overlay initialization method, which is executed for Overlay and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
+* @method init
+* @param {String} el The element ID representing the Overlay OR
+* @param {HTMLElement} el The element representing the Overlay
+* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
+*/
+YAHOO.widget.Overlay.prototype.init = function(el, userConfig) {
+ YAHOO.widget.Overlay.superclass.init.call(this, el/*, userConfig*/); // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
+
+ this.beforeInitEvent.fire(YAHOO.widget.Overlay);
+
+ YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Overlay.CSS_OVERLAY);
+
+ if (userConfig) {
+ this.cfg.applyConfig(userConfig, true);
+ }
+
+ if (this.platform == "mac" && this.browser == "gecko") {
+ if (! YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)) {
+ this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);
+ }
+ if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)) {
+ this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);
+ }
+ }
+
+ this.initEvent.fire(YAHOO.widget.Overlay);
+
+};
+
+/**
+* Initializes the custom events for Overlay which are fired automatically at appropriate times by the Overlay class.
+* @method initEvents
+*/
+YAHOO.widget.Overlay.prototype.initEvents = function() {
+ YAHOO.widget.Overlay.superclass.initEvents.call(this);
+
+ var EVENT_TYPES = YAHOO.widget.Overlay._EVENT_TYPES;
+
+ /**
+ * CustomEvent fired before the Overlay is moved.
+ * @event beforeMoveEvent
+ * @param {Number} x x coordinate
+ * @param {Number} y y coordinate
+ */
+ this.beforeMoveEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_MOVE, this);
+
+ /**
+ * CustomEvent fired after the Overlay is moved.
+ * @event moveEvent
+ * @param {Number} x x coordinate
+ * @param {Number} y y coordinate
+ */
+ this.moveEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.MOVE, this);
+};
+
+/**
+* Initializes the class's configurable properties which can be changed using the Overlay's Config object (cfg).
+* @method initDefaultConfig
+*/
+YAHOO.widget.Overlay.prototype.initDefaultConfig = function() {
+ YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);
+
+
+ // Add overlay config properties //
+
+ var DEFAULT_CONFIG = YAHOO.widget.Overlay._DEFAULT_CONFIG;
+
+ /**
+ * The absolute x-coordinate position of the Overlay
+ * @config x
+ * @type Number
+ * @default null
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.X.key,
+ {
+ handler: this.configX,
+ validator: DEFAULT_CONFIG.X.validator,
+ suppressEvent: DEFAULT_CONFIG.X.suppressEvent,
+ supercedes: DEFAULT_CONFIG.X.supercedes
+ }
+ );
+
+ /**
+ * The absolute y-coordinate position of the Overlay
+ * @config y
+ * @type Number
+ * @default null
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.Y.key,
+ {
+ handler: this.configY,
+ validator: DEFAULT_CONFIG.Y.validator,
+ suppressEvent: DEFAULT_CONFIG.Y.suppressEvent,
+ supercedes: DEFAULT_CONFIG.Y.supercedes
+ }
+ );
+
+ /**
+ * An array with the absolute x and y positions of the Overlay
+ * @config xy
+ * @type Number[]
+ * @default null
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.XY.key,
+ {
+ handler: this.configXY,
+ suppressEvent: DEFAULT_CONFIG.XY.suppressEvent,
+ supercedes: DEFAULT_CONFIG.XY.supercedes
+ }
+ );
+
+ /**
+ * The array of context arguments for context-sensitive positioning. The format is: [id or element, element corner, context corner]. For example, setting this property to ["img1", "tl", "bl"] would align the Overlay's top left corner to the context element's bottom left corner.
+ * @config context
+ * @type Array
+ * @default null
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.CONTEXT.key,
+ {
+ handler: this.configContext,
+ suppressEvent: DEFAULT_CONFIG.CONTEXT.suppressEvent,
+ supercedes: DEFAULT_CONFIG.CONTEXT.supercedes
+ }
+ );
+
+ /**
+ * True if the Overlay should be anchored to the center of the viewport.
+ * @config fixedcenter
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.FIXED_CENTER.key,
+ {
+ handler: this.configFixedCenter,
+ value: DEFAULT_CONFIG.FIXED_CENTER.value,
+ validator: DEFAULT_CONFIG.FIXED_CENTER.validator,
+ supercedes: DEFAULT_CONFIG.FIXED_CENTER.supercedes
+ }
+ );
+
+ /**
+ * CSS width of the Overlay.
+ * @config width
+ * @type String
+ * @default null
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.WIDTH.key,
+ {
+ handler: this.configWidth,
+ suppressEvent: DEFAULT_CONFIG.WIDTH.suppressEvent,
+ supercedes: DEFAULT_CONFIG.WIDTH.supercedes
+ }
+ );
+
+ /**
+ * CSS height of the Overlay.
+ * @config height
+ * @type String
+ * @default null
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.HEIGHT.key,
+ {
+ handler: this.configHeight,
+ suppressEvent: DEFAULT_CONFIG.HEIGHT.suppressEvent,
+ supercedes: DEFAULT_CONFIG.HEIGHT.supercedes
+ }
+ );
+
+ /**
+ * CSS z-index of the Overlay.
+ * @config zIndex
+ * @type Number
+ * @default null
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.ZINDEX.key,
+ {
+ handler: this.configzIndex,
+ value: DEFAULT_CONFIG.ZINDEX.value
+ }
+ );
+
+ /**
+ * True if the Overlay should be prevented from being positioned out of the viewport.
+ * @config constraintoviewport
+ * @type Boolean
+ * @default false
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,
+ {
+ handler: this.configConstrainToViewport,
+ value: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,
+ validator: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,
+ supercedes: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes
+ }
+ );
+
+ /**
+ * True if the Overlay should have an IFRAME shim (for correcting the select z-index bug in IE6 and below).
+ * @config iframe
+ * @type Boolean
+ * @default true for IE6 and below, false for all others
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.IFRAME.key,
+ {
+ handler: this.configIframe,
+ value: DEFAULT_CONFIG.IFRAME.value,
+ validator: DEFAULT_CONFIG.IFRAME.validator,
+ supercedes: DEFAULT_CONFIG.IFRAME.supercedes
+ }
+ );
+
+};
+
+/**
+* Moves the Overlay to the specified position. This function is identical to calling this.cfg.setProperty("xy", [x,y]);
+* @method moveTo
+* @param {Number} x The Overlay's new x position
+* @param {Number} y The Overlay's new y position
+*/
+YAHOO.widget.Overlay.prototype.moveTo = function(x, y) {
+ this.cfg.setProperty("xy",[x,y]);
+};
+
+/**
+* Adds a special CSS class to the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
+* scrollbars cannot be hidden. See https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+* @method hideMacGeckoScrollbars
+*/
+YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars = function() {
+ YAHOO.util.Dom.removeClass(this.element, "show-scrollbars");
+ YAHOO.util.Dom.addClass(this.element, "hide-scrollbars");
+};
+
+/**
+* Removes a special CSS class from the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
+* scrollbars cannot be hidden. See https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+* @method showMacGeckoScrollbars
+*/
+YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars = function() {
+ YAHOO.util.Dom.removeClass(this.element, "hide-scrollbars");
+ YAHOO.util.Dom.addClass(this.element, "show-scrollbars");
+};
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "visible" property is changed. This method is responsible for firing showEvent and hideEvent.
+* @method configVisible
+* @param {String} type The CustomEvent type (usually the property name)
+* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Overlay.prototype.configVisible = function(type, args, obj) {
+ var visible = args[0];
+ var currentVis = YAHOO.util.Dom.getStyle(this.element, "visibility");
+
+ if (currentVis == "inherit") {
+ var e = this.element.parentNode;
+ while (e.nodeType != 9 && e.nodeType != 11) {
+ currentVis = YAHOO.util.Dom.getStyle(e, "visibility");
+ if (currentVis != "inherit") { break; }
+ e = e.parentNode;
+ }
+ if (currentVis == "inherit") {
+ currentVis = "visible";
+ }
+ }
+
+ var effect = this.cfg.getProperty("effect");
+
+ var effectInstances = [];
+ if (effect) {
+ if (effect instanceof Array) {
+ for (var i=0;i rightConstraint) {
+ x = rightConstraint;
+ }
+
+ if (y < topConstraint) {
+ y = topConstraint;
+ } else if (y > bottomConstraint) {
+ y = bottomConstraint;
+ }
+
+ this.cfg.setProperty("x", x, true);
+ this.cfg.setProperty("y", y, true);
+ this.cfg.setProperty("xy", [x,y], true);
+};
+
+/**
+* Centers the container in the viewport.
+* @method center
+*/
+YAHOO.widget.Overlay.prototype.center = function() {
+ var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+ var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+
+ var viewPortWidth = YAHOO.util.Dom.getClientWidth();
+ var viewPortHeight = YAHOO.util.Dom.getClientHeight();
+
+ var elementWidth = this.element.offsetWidth;
+ var elementHeight = this.element.offsetHeight;
+
+ var x = (viewPortWidth / 2) - (elementWidth / 2) + scrollX;
+ var y = (viewPortHeight / 2) - (elementHeight / 2) + scrollY;
+
+ this.cfg.setProperty("xy", [parseInt(x, 10), parseInt(y, 10)]);
+
+ this.cfg.refireEvent("iframe");
+};
+
+/**
+* Synchronizes the Panel's "xy", "x", and "y" properties with the Panel's position in the DOM. This is primarily used to update position information during drag & drop.
+* @method syncPosition
+*/
+YAHOO.widget.Overlay.prototype.syncPosition = function() {
+ var pos = YAHOO.util.Dom.getXY(this.element);
+ this.cfg.setProperty("x", pos[0], true);
+ this.cfg.setProperty("y", pos[1], true);
+ this.cfg.setProperty("xy", pos, true);
+};
+
+/**
+* Event handler fired when the resize monitor element is resized.
+* @method onDomResize
+* @param {DOMEvent} e The resize DOM event
+* @param {Object} obj The scope object
+*/
+YAHOO.widget.Overlay.prototype.onDomResize = function(e, obj) {
+ YAHOO.widget.Overlay.superclass.onDomResize.call(this, e, obj);
+ var me = this;
+ setTimeout(function() {
+ me.syncPosition();
+ me.cfg.refireEvent("iframe");
+ me.cfg.refireEvent("context");
+ }, 0);
+};
+
+/**
+* Removes the Overlay element from the DOM and sets all child elements to null.
+* @method destroy
+*/
+YAHOO.widget.Overlay.prototype.destroy = function() {
+ if (this.iframe) {
+ this.iframe.parentNode.removeChild(this.iframe);
+ }
+
+ this.iframe = null;
+
+ YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, this);
+ YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, this);
+
+ YAHOO.widget.Overlay.superclass.destroy.call(this);
+};
+
+/**
+* Returns a String representation of the object.
+* @method toString
+* @return {String} The string representation of the Overlay.
+*/
+YAHOO.widget.Overlay.prototype.toString = function() {
+ return "Overlay " + this.id;
+};
+
+/**
+* A singleton CustomEvent used for reacting to the DOM event for window scroll
+* @event YAHOO.widget.Overlay.windowScrollEvent
+*/
+YAHOO.widget.Overlay.windowScrollEvent = new YAHOO.util.CustomEvent("windowScroll");
+
+/**
+* A singleton CustomEvent used for reacting to the DOM event for window resize
+* @event YAHOO.widget.Overlay.windowResizeEvent
+*/
+YAHOO.widget.Overlay.windowResizeEvent = new YAHOO.util.CustomEvent("windowResize");
+
+/**
+* The DOM event handler used to fire the CustomEvent for window scroll
+* @method YAHOO.widget.Overlay.windowScrollHandler
+* @static
+* @param {DOMEvent} e The DOM scroll event
+*/
+YAHOO.widget.Overlay.windowScrollHandler = function(e) {
+ if (YAHOO.widget.Module.prototype.browser == "ie" || YAHOO.widget.Module.prototype.browser == "ie7") {
+ if (! window.scrollEnd) {
+ window.scrollEnd = -1;
+ }
+ clearTimeout(window.scrollEnd);
+ window.scrollEnd = setTimeout(function() { YAHOO.widget.Overlay.windowScrollEvent.fire(); }, 1);
+ } else {
+ YAHOO.widget.Overlay.windowScrollEvent.fire();
+ }
+};
+
+/**
+* The DOM event handler used to fire the CustomEvent for window resize
+* @method YAHOO.widget.Overlay.windowResizeHandler
+* @static
+* @param {DOMEvent} e The DOM resize event
+*/
+YAHOO.widget.Overlay.windowResizeHandler = function(e) {
+ if (YAHOO.widget.Module.prototype.browser == "ie" || YAHOO.widget.Module.prototype.browser == "ie7") {
+ if (! window.resizeEnd) {
+ window.resizeEnd = -1;
+ }
+ clearTimeout(window.resizeEnd);
+ window.resizeEnd = setTimeout(function() { YAHOO.widget.Overlay.windowResizeEvent.fire(); }, 100);
+ } else {
+ YAHOO.widget.Overlay.windowResizeEvent.fire();
+ }
+};
+
+/**
+* A boolean that indicated whether the window resize and scroll events have already been subscribed to.
+* @property YAHOO.widget.Overlay._initialized
+* @private
+* @type Boolean
+*/
+YAHOO.widget.Overlay._initialized = null;
+
+if (YAHOO.widget.Overlay._initialized === null) {
+ YAHOO.util.Event.addListener(window, "scroll", YAHOO.widget.Overlay.windowScrollHandler);
+ YAHOO.util.Event.addListener(window, "resize", YAHOO.widget.Overlay.windowResizeHandler);
+
+ YAHOO.widget.Overlay._initialized = true;
+}
+/**
+* OverlayManager is used for maintaining the focus status of multiple Overlays.* @namespace YAHOO.widget
+* @namespace YAHOO.widget
+* @class OverlayManager
+* @constructor
+* @param {Array} overlays Optional. A collection of Overlays to register with the manager.
+* @param {Object} userConfig The object literal representing the user configuration of the OverlayManager
+*/
+YAHOO.widget.OverlayManager = function(userConfig) {
+ this.init(userConfig);
+};
+
+/**
+* The CSS class representing a focused Overlay
+* @property YAHOO.widget.OverlayManager.CSS_FOCUSED
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.OverlayManager.CSS_FOCUSED = "focused";
+
+YAHOO.widget.OverlayManager.prototype = {
+ /**
+ * The class's constructor function
+ * @property contructor
+ * @type Function
+ */
+ constructor : YAHOO.widget.OverlayManager,
+
+ /**
+ * The array of Overlays that are currently registered
+ * @property overlays
+ * @type YAHOO.widget.Overlay[]
+ */
+ overlays : null,
+
+ /**
+ * Initializes the default configuration of the OverlayManager
+ * @method initDefaultConfig
+ */
+ initDefaultConfig : function() {
+ /**
+ * The collection of registered Overlays in use by the OverlayManager
+ * @config overlays
+ * @type YAHOO.widget.Overlay[]
+ * @default null
+ */
+ this.cfg.addProperty("overlays", { suppressEvent:true } );
+
+ /**
+ * The default DOM event that should be used to focus an Overlay
+ * @config focusevent
+ * @type String
+ * @default "mousedown"
+ */
+ this.cfg.addProperty("focusevent", { value:"mousedown" } );
+ },
+
+ /**
+ * Initializes the OverlayManager
+ * @method init
+ * @param {YAHOO.widget.Overlay[]} overlays Optional. A collection of Overlays to register with the manager.
+ * @param {Object} userConfig The object literal representing the user configuration of the OverlayManager
+ */
+ init : function(userConfig) {
+ /**
+ * The OverlayManager's Config object used for monitoring configuration properties.
+ * @property cfg
+ * @type YAHOO.util.Config
+ */
+ this.cfg = new YAHOO.util.Config(this);
+
+ this.initDefaultConfig();
+
+ if (userConfig) {
+ this.cfg.applyConfig(userConfig, true);
+ }
+ this.cfg.fireQueue();
+
+ /**
+ * The currently activated Overlay
+ * @property activeOverlay
+ * @private
+ * @type YAHOO.widget.Overlay
+ */
+ var activeOverlay = null;
+
+ /**
+ * Returns the currently focused Overlay
+ * @method getActive
+ * @return {YAHOO.widget.Overlay} The currently focused Overlay
+ */
+ this.getActive = function() {
+ return activeOverlay;
+ };
+
+ /**
+ * Focuses the specified Overlay
+ * @method focus
+ * @param {YAHOO.widget.Overlay} overlay The Overlay to focus
+ * @param {String} overlay The id of the Overlay to focus
+ */
+ this.focus = function(overlay) {
+
+ var o = this.find(overlay);
+
+ if (o) {
+
+ if (activeOverlay != o) {
+
+ if(activeOverlay) {
+
+ activeOverlay.blur();
+
+ }
+
+ activeOverlay = o;
+
+ YAHOO.util.Dom.addClass(activeOverlay.element, YAHOO.widget.OverlayManager.CSS_FOCUSED);
+
+ this.overlays.sort(this.compareZIndexDesc);
+
+ var topZIndex = YAHOO.util.Dom.getStyle(this.overlays[0].element, "zIndex");
+
+ if (! isNaN(topZIndex) && this.overlays[0] != overlay) {
+
+ activeOverlay.cfg.setProperty("zIndex", (parseInt(topZIndex, 10) + 2));
+
+ }
+
+ this.overlays.sort(this.compareZIndexDesc);
+
+ o.focusEvent.fire();
+
+ }
+
+ }
+
+ };
+
+ /**
+ * Removes the specified Overlay from the manager
+ * @method remove
+ * @param {YAHOO.widget.Overlay} overlay The Overlay to remove
+ * @param {String} overlay The id of the Overlay to remove
+ */
+ this.remove = function(overlay) {
+ var o = this.find(overlay);
+ if (o) {
+ var originalZ = YAHOO.util.Dom.getStyle(o.element, "zIndex");
+ o.cfg.setProperty("zIndex", -1000, true);
+ this.overlays.sort(this.compareZIndexDesc);
+ this.overlays = this.overlays.slice(0, this.overlays.length-1);
+ o.cfg.setProperty("zIndex", originalZ, true);
+
+ o.cfg.setProperty("manager", null);
+ o.focusEvent = null;
+ o.blurEvent = null;
+ o.focus = null;
+ o.blur = null;
+ }
+ };
+
+ /**
+ * Removes focus from all registered Overlays in the manager
+ * @method blurAll
+ */
+ this.blurAll = function() {
+ for (var o=0;o 0) {
+ return true;
+ }
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Attempts to locate an Overlay by instance or ID.
+ * @method find
+ * @param {YAHOO.widget.Overlay} overlay An Overlay to locate within the manager
+ * @param {String} overlay An Overlay id to locate within the manager
+ * @return {YAHOO.widget.Overlay} The requested Overlay, if found, or null if it cannot be located.
+ */
+ find : function(overlay) {
+ if (overlay instanceof YAHOO.widget.Overlay) {
+ for (var o=0;o zIndex2) {
+ return -1;
+ } else if (zIndex1 < zIndex2) {
+ return 1;
+ } else {
+ return 0;
+ }
+ },
+
+ /**
+ * Shows all Overlays in the manager.
+ * @method showAll
+ */
+ showAll : function() {
+ for (var o=0;oOR
+* @param {HTMLElement} el The element representing the Tooltip
+* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
+*/
+YAHOO.widget.Tooltip = function(el, userConfig) {
+ YAHOO.widget.Tooltip.superclass.constructor.call(this, el, userConfig);
+};
+
+YAHOO.extend(YAHOO.widget.Tooltip, YAHOO.widget.Overlay);
+
+/**
+* Constant representing the Tooltip CSS class
+* @property YAHOO.widget.Tooltip.CSS_TOOLTIP
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Tooltip.CSS_TOOLTIP = "yui-tt";
+
+/**
+* Constant representing the Tooltip's configuration properties
+* @property YAHOO.widget.Tooltip._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Tooltip._DEFAULT_CONFIG = {
+
+ "PREVENT_OVERLAP": {
+ key: "preventoverlap",
+ value:true,
+ validator:YAHOO.lang.isBoolean,
+ supercedes:["x","y","xy"]
+ },
+
+ "SHOW_DELAY": {
+ key: "showdelay",
+ value:200,
+ validator:YAHOO.lang.isNumber
+ },
+
+ "AUTO_DISMISS_DELAY": {
+ key: "autodismissdelay",
+ value:5000,
+ validator:YAHOO.lang.isNumber
+ },
+
+ "HIDE_DELAY": {
+ key: "hidedelay",
+ value:250,
+ validator:YAHOO.lang.isNumber
+ },
+
+ "TEXT": {
+ key: "text",
+ suppressEvent:true
+ },
+
+ "CONTAINER": {
+ key: "container"
+ }
+
+};
+
+/**
+* The Tooltip initialization method. This method is automatically called by the constructor. A Tooltip is automatically rendered by the init method, and it also is set to be invisible by default, and constrained to viewport by default as well.
+* @method init
+* @param {String} el The element ID representing the Tooltip OR
+* @param {HTMLElement} el The element representing the Tooltip
+* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Tooltip. See configuration documentation for more details.
+*/
+YAHOO.widget.Tooltip.prototype.init = function(el, userConfig) {
+
+ if (document.readyState && document.readyState != "complete") {
+ var deferredInit = function() {
+ this.init(el, userConfig);
+ };
+ YAHOO.util.Event.addListener(window, "load", deferredInit, this, true);
+ } else {
+ YAHOO.widget.Tooltip.superclass.init.call(this, el);
+
+ this.beforeInitEvent.fire(YAHOO.widget.Tooltip);
+
+ YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Tooltip.CSS_TOOLTIP);
+
+ if (userConfig) {
+ this.cfg.applyConfig(userConfig, true);
+ }
+
+ this.cfg.queueProperty("visible",false);
+ this.cfg.queueProperty("constraintoviewport",true);
+
+ this.setBody("");
+ this.render(this.cfg.getProperty("container"));
+
+ this.initEvent.fire(YAHOO.widget.Tooltip);
+ }
+};
+
+/**
+* Initializes the class's configurable properties which can be changed using the Overlay's Config object (cfg).
+* @method initDefaultConfig
+*/
+YAHOO.widget.Tooltip.prototype.initDefaultConfig = function() {
+ YAHOO.widget.Tooltip.superclass.initDefaultConfig.call(this);
+
+ var DEFAULT_CONFIG = YAHOO.widget.Tooltip._DEFAULT_CONFIG;
+
+ /**
+ * Specifies whether the Tooltip should be kept from overlapping its context element.
+ * @config preventoverlap
+ * @type Boolean
+ * @default true
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.PREVENT_OVERLAP.key,
+ {
+ value: DEFAULT_CONFIG.PREVENT_OVERLAP.value,
+ validator: DEFAULT_CONFIG.PREVENT_OVERLAP.validator,
+ supercedes: DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes
+ }
+ );
+
+ /**
+ * The number of milliseconds to wait before showing a Tooltip on mouseover.
+ * @config showdelay
+ * @type Number
+ * @default 200
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.SHOW_DELAY.key,
+ {
+ handler: this.configShowDelay,
+ value: 200,
+ validator: DEFAULT_CONFIG.SHOW_DELAY.validator
+ }
+ );
+
+ /**
+ * The number of milliseconds to wait before automatically dismissing a Tooltip after the mouse has been resting on the context element.
+ * @config autodismissdelay
+ * @type Number
+ * @default 5000
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,
+ {
+ handler: this.configAutoDismissDelay,
+ value: DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,
+ validator: DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator
+ }
+ );
+
+ /**
+ * The number of milliseconds to wait before hiding a Tooltip on mouseover.
+ * @config hidedelay
+ * @type Number
+ * @default 250
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.HIDE_DELAY.key,
+ {
+ handler: this.configHideDelay,
+ value: DEFAULT_CONFIG.HIDE_DELAY.value,
+ validator: DEFAULT_CONFIG.HIDE_DELAY.validator
+ }
+ );
+
+ /**
+ * Specifies the Tooltip's text.
+ * @config text
+ * @type String
+ * @default null
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.TEXT.key,
+ {
+ handler: this.configText,
+ suppressEvent: DEFAULT_CONFIG.TEXT.suppressEvent
+ }
+ );
+
+ /**
+ * Specifies the container element that the Tooltip's markup should be rendered into.
+ * @config container
+ * @type HTMLElement/String
+ * @default document.body
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.CONTAINER.key,
+ {
+ handler: this.configContainer,
+ value: document.body
+ }
+ );
+
+ /**
+ * Specifies the element or elements that the Tooltip should be anchored to on mouseover.
+ * @config context
+ * @type HTMLElement[]/String[]
+ * @default null
+ */
+
+};
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "text" property is changed.
+* @method configText
+* @param {String} type The CustomEvent type (usually the property name)
+* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Tooltip.prototype.configText = function(type, args, obj) {
+ var text = args[0];
+ if (text) {
+ this.setBody(text);
+ }
+};
+
+/**
+* The default event handler fired when the "container" property is changed.
+* @method configContainer
+* @param {String} type The CustomEvent type (usually the property name)
+* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Tooltip.prototype.configContainer = function(type, args, obj) {
+ var container = args[0];
+ if (typeof container == 'string') {
+ this.cfg.setProperty("container", document.getElementById(container), true);
+ }
+};
+
+/**
+* @method _removeEventListeners
+* @description Removes all of the DOM event handlers from the HTML element(s)
+* that trigger the display of the tooltip.
+* @protected
+*/
+YAHOO.widget.Tooltip.prototype._removeEventListeners = function() {
+
+ var aElements = this._context;
+
+ if (aElements) {
+
+ var nElements = aElements.length;
+
+ if (nElements > 0) {
+
+ var i = nElements - 1,
+ oElement;
+
+ do {
+
+ oElement = aElements[i];
+
+ YAHOO.util.Event.removeListener(oElement, "mouseover", this.onContextMouseOver);
+ YAHOO.util.Event.removeListener(oElement, "mousemove", this.onContextMouseMove);
+ YAHOO.util.Event.removeListener(oElement, "mouseout", this.onContextMouseOut);
+
+ }
+ while(i--);
+
+ }
+
+ }
+
+};
+
+/**
+* The default event handler fired when the "context" property is changed.
+* @method configContext
+* @param {String} type The CustomEvent type (usually the property name)
+* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Tooltip.prototype.configContext = function(type, args, obj) {
+ var context = args[0];
+ if (context) {
+
+ // Normalize parameter into an array
+ if (! (context instanceof Array)) {
+ if (typeof context == "string") {
+ this.cfg.setProperty("context", [document.getElementById(context)], true);
+ } else { // Assuming this is an element
+ this.cfg.setProperty("context", [context], true);
+ }
+ context = this.cfg.getProperty("context");
+ }
+
+
+ // Remove any existing mouseover/mouseout listeners
+ this._removeEventListeners();
+
+ // Add mouseover/mouseout listeners to context elements
+ this._context = context;
+
+ var aElements = this._context;
+
+ if (aElements) {
+
+ var nElements = aElements.length;
+
+ if (nElements > 0) {
+
+ var i = nElements - 1,
+ oElement;
+
+ do {
+
+ oElement = aElements[i];
+
+ YAHOO.util.Event.addListener(oElement, "mouseover", this.onContextMouseOver, this);
+ YAHOO.util.Event.addListener(oElement, "mousemove", this.onContextMouseMove, this);
+ YAHOO.util.Event.addListener(oElement, "mouseout", this.onContextMouseOut, this);
+
+ }
+ while(i--);
+
+ }
+
+ }
+
+ }
+};
+
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+// BEGIN BUILT-IN DOM EVENT HANDLERS //
+
+/**
+* The default event handler fired when the user moves the mouse while over the context element.
+* @method onContextMouseMove
+* @param {DOMEvent} e The current DOM event
+* @param {Object} obj The object argument
+*/
+YAHOO.widget.Tooltip.prototype.onContextMouseMove = function(e, obj) {
+ obj.pageX = YAHOO.util.Event.getPageX(e);
+ obj.pageY = YAHOO.util.Event.getPageY(e);
+
+};
+
+/**
+* The default event handler fired when the user mouses over the context element.
+* @method onContextMouseOver
+* @param {DOMEvent} e The current DOM event
+* @param {Object} obj The object argument
+*/
+YAHOO.widget.Tooltip.prototype.onContextMouseOver = function(e, obj) {
+
+ if (obj.hideProcId) {
+ clearTimeout(obj.hideProcId);
+ obj.hideProcId = null;
+ }
+
+ var context = this;
+ YAHOO.util.Event.addListener(context, "mousemove", obj.onContextMouseMove, obj);
+
+ if (context.title) {
+ obj._tempTitle = context.title;
+ context.title = "";
+ }
+
+ /**
+ * The unique process ID associated with the thread responsible for showing the Tooltip.
+ * @type int
+ */
+ obj.showProcId = obj.doShow(e, context);
+};
+
+/**
+* The default event handler fired when the user mouses out of the context element.
+* @method onContextMouseOut
+* @param {DOMEvent} e The current DOM event
+* @param {Object} obj The object argument
+*/
+YAHOO.widget.Tooltip.prototype.onContextMouseOut = function(e, obj) {
+ var el = this;
+
+ if (obj._tempTitle) {
+ el.title = obj._tempTitle;
+ obj._tempTitle = null;
+ }
+
+ if (obj.showProcId) {
+ clearTimeout(obj.showProcId);
+ obj.showProcId = null;
+ }
+
+ if (obj.hideProcId) {
+ clearTimeout(obj.hideProcId);
+ obj.hideProcId = null;
+ }
+
+
+ obj.hideProcId = setTimeout(function() {
+ obj.hide();
+ }, obj.cfg.getProperty("hidedelay"));
+};
+
+// END BUILT-IN DOM EVENT HANDLERS //
+
+/**
+* Processes the showing of the Tooltip by setting the timeout delay and offset of the Tooltip.
+* @method doShow
+* @param {DOMEvent} e The current DOM event
+* @return {Number} The process ID of the timeout function associated with doShow
+*/
+YAHOO.widget.Tooltip.prototype.doShow = function(e, context) {
+
+ var yOffset = 25;
+ if (this.browser == "opera" && context.tagName && context.tagName.toUpperCase() == "A") {
+ yOffset += 12;
+ }
+
+ var me = this;
+ return setTimeout(
+ function() {
+ if (me._tempTitle) {
+ me.setBody(me._tempTitle);
+ } else {
+ me.cfg.refireEvent("text");
+ }
+
+ me.moveTo(me.pageX, me.pageY + yOffset);
+ if (me.cfg.getProperty("preventoverlap")) {
+ me.preventOverlap(me.pageX, me.pageY);
+ }
+
+ YAHOO.util.Event.removeListener(context, "mousemove", me.onContextMouseMove);
+
+ me.show();
+ me.hideProcId = me.doHide();
+ },
+ this.cfg.getProperty("showdelay"));
+};
+
+/**
+* Sets the timeout for the auto-dismiss delay, which by default is 5 seconds, meaning that a tooltip will automatically dismiss itself after 5 seconds of being displayed.
+* @method doHide
+*/
+YAHOO.widget.Tooltip.prototype.doHide = function() {
+ var me = this;
+ return setTimeout(
+ function() {
+ me.hide();
+ },
+ this.cfg.getProperty("autodismissdelay"));
+};
+
+/**
+* Fired when the Tooltip is moved, this event handler is used to prevent the Tooltip from overlapping with its context element.
+* @method preventOverlay
+* @param {Number} pageX The x coordinate position of the mouse pointer
+* @param {Number} pageY The y coordinate position of the mouse pointer
+*/
+YAHOO.widget.Tooltip.prototype.preventOverlap = function(pageX, pageY) {
+
+ var height = this.element.offsetHeight;
+
+ var elementRegion = YAHOO.util.Dom.getRegion(this.element);
+
+ elementRegion.top -= 5;
+ elementRegion.left -= 5;
+ elementRegion.right += 5;
+ elementRegion.bottom += 5;
+
+ var mousePoint = new YAHOO.util.Point(pageX, pageY);
+
+
+ if (elementRegion.contains(mousePoint)) {
+ this.cfg.setProperty("y", (pageY-height-5));
+ }
+};
+
+/**
+* Removes the Tooltip element from the DOM and sets all child elements to null.
+* @method destroy
+*/
+YAHOO.widget.Tooltip.prototype.destroy = function() {
+
+ // Remove any existing mouseover/mouseout listeners
+ this._removeEventListeners();
+
+ YAHOO.widget.Tooltip.superclass.destroy.call(this);
+
+};
+
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String} The string representation of the Tooltip
+*/
+YAHOO.widget.Tooltip.prototype.toString = function() {
+ return "Tooltip " + this.id;
+};
+/**
+* Panel is an implementation of Overlay that behaves like an OS window, with a draggable header and an optional close icon at the top right.
+* @namespace YAHOO.widget
+* @class Panel
+* @extends YAHOO.widget.Overlay
+* @constructor
+* @param {String} el The element ID representing the Panel OR
+* @param {HTMLElement} el The element representing the Panel
+* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Panel. See configuration documentation for more details.
+*/
+YAHOO.widget.Panel = function(el, userConfig) {
+ YAHOO.widget.Panel.superclass.constructor.call(this, el, userConfig);
+};
+
+YAHOO.extend(YAHOO.widget.Panel, YAHOO.widget.Overlay);
+
+/**
+* Constant representing the default CSS class used for a Panel
+* @property YAHOO.widget.Panel.CSS_PANEL
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Panel.CSS_PANEL = "yui-panel";
+
+/**
+* Constant representing the default CSS class used for a Panel's wrapping container
+* @property YAHOO.widget.Panel.CSS_PANEL_CONTAINER
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Panel.CSS_PANEL_CONTAINER = "yui-panel-container";
+
+/**
+* Constant representing the name of the Panel's events
+* @property YAHOO.widget.Panel._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Panel._EVENT_TYPES = {
+
+ "SHOW_MASK": "showMask",
+ "HIDE_MASK": "hideMask",
+ "DRAG": "drag"
+
+};
+
+/**
+* Constant representing the Panel's configuration properties
+* @property YAHOO.widget.Panel._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Panel._DEFAULT_CONFIG = {
+
+ "CLOSE": {
+ key: "close",
+ value:true,
+ validator:YAHOO.lang.isBoolean,
+ supercedes:["visible"]
+ },
+
+ "DRAGGABLE": {
+ key: "draggable",
+ value:(YAHOO.util.DD ? true : false),
+ validator:YAHOO.lang.isBoolean,
+ supercedes:["visible"]
+ },
+
+ "UNDERLAY": {
+ key: "underlay",
+ value:"shadow",
+ supercedes:["visible"]
+ },
+
+ "MODAL": {
+ key: "modal",
+ value:false,
+ validator:YAHOO.lang.isBoolean,
+ supercedes:["visible"]
+ },
+
+ "KEY_LISTENERS": {
+ key: "keylisteners",
+ suppressEvent:true,
+ supercedes:["visible"]
+ }
+
+};
+
+/**
+* The Overlay initialization method, which is executed for Overlay and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
+* @method init
+* @param {String} el The element ID representing the Overlay OR
+* @param {HTMLElement} el The element representing the Overlay
+* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
+*/
+YAHOO.widget.Panel.prototype.init = function(el, userConfig) {
+ YAHOO.widget.Panel.superclass.init.call(this, el/*, userConfig*/); // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
+
+ this.beforeInitEvent.fire(YAHOO.widget.Panel);
+
+ YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Panel.CSS_PANEL);
+
+ this.buildWrapper();
+
+ if (userConfig) {
+ this.cfg.applyConfig(userConfig, true);
+ }
+
+ this.beforeRenderEvent.subscribe(function() {
+ var draggable = this.cfg.getProperty("draggable");
+ if (draggable) {
+ if (! this.header) {
+ this.setHeader(" ");
+ }
+ }
+ }, this, true);
+
+
+ this.renderEvent.subscribe(function() {
+
+ /*
+ If no value for the "width" configuration property was specified,
+ set it to the offsetWidth. If the "width" is not set, then in IE
+ you can only drag the panel when you put the cursor on the
+ header's text.
+ */
+
+ var sWidth = this.cfg.getProperty("width");
+
+ if(!sWidth) {
+
+ this.cfg.setProperty("width", (this.element.offsetWidth + "px"));
+
+ }
+
+ });
+
+
+ var me = this;
+
+ var doBlur = function() {
+ this.blur();
+ };
+
+ this.showMaskEvent.subscribe(function() {
+
+ var checkFocusable = function(el) {
+
+ var sTagName = el.tagName.toUpperCase(),
+ bFocusable = false;
+
+ switch(sTagName) {
+
+ case "A":
+ case "BUTTON":
+ case "SELECT":
+ case "TEXTAREA":
+
+ if (! YAHOO.util.Dom.isAncestor(me.element, el)) {
+ YAHOO.util.Event.addListener(el, "focus", doBlur, el, true);
+ bFocusable = true;
+ }
+
+ break;
+
+ case "INPUT":
+
+ if (el.type != "hidden" && ! YAHOO.util.Dom.isAncestor(me.element, el)) {
+
+ YAHOO.util.Event.addListener(el, "focus", doBlur, el, true);
+ bFocusable = true;
+
+ }
+
+ break;
+
+ }
+
+ return bFocusable;
+
+ };
+
+ this.focusableElements = YAHOO.util.Dom.getElementsBy(checkFocusable);
+ }, this, true);
+
+ this.hideMaskEvent.subscribe(function() {
+ for (var i=0;iOR
+* @param {HTMLElement} appendToNode The element to which the Module should be appended to prior to rendering
+* @return {boolean} Success or failure of the render
+*/
+YAHOO.widget.Panel.prototype.render = function(appendToNode) {
+ return YAHOO.widget.Panel.superclass.render.call(this, appendToNode, this.innerElement);
+};
+
+/**
+* Removes the Panel element from the DOM and sets all child elements to null.
+* @method destroy
+*/
+YAHOO.widget.Panel.prototype.destroy = function() {
+
+ YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.sizeMask, this);
+
+ if(this.close) {
+
+ YAHOO.util.Event.purgeElement(this.close);
+
+ }
+
+ YAHOO.widget.Panel.superclass.destroy.call(this);
+
+};
+
+/**
+* Returns a String representation of the object.
+* @method toString
+* @return {String} The string representation of the Panel.
+*/
+YAHOO.widget.Panel.prototype.toString = function() {
+ return "Panel " + this.id;
+};
+/**
+* Dialog is an implementation of Panel that can be used to submit form data. Built-in functionality for buttons with event handlers is included, and button sets can be build dynamically, or the preincluded ones for Submit/Cancel and OK/Cancel can be utilized. Forms can be processed in 3 ways -- via an asynchronous Connection utility call, a simple form POST or GET, or manually.
+* @namespace YAHOO.widget
+* @class Dialog
+* @extends YAHOO.widget.Panel
+* @constructor
+* @param {String} el The element ID representing the Dialog OR
+* @param {HTMLElement} el The element representing the Dialog
+* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Dialog. See configuration documentation for more details.
+*/
+YAHOO.widget.Dialog = function(el, userConfig) {
+ YAHOO.widget.Dialog.superclass.constructor.call(this, el, userConfig);
+};
+
+YAHOO.extend(YAHOO.widget.Dialog, YAHOO.widget.Panel);
+
+/**
+* Constant representing the default CSS class used for a Dialog
+* @property YAHOO.widget.Dialog.CSS_DIALOG
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.Dialog.CSS_DIALOG = "yui-dialog";
+
+/**
+* Constant representing the name of the Dialog's events
+* @property YAHOO.widget.Dialog._EVENT_TYPES
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Dialog._EVENT_TYPES = {
+
+ "BEFORE_SUBMIT": "beforeSubmit",
+ "SUBMIT": "submit",
+ "MANUAL_SUBMIT": "manualSubmit",
+ "ASYNC_SUBMIT": "asyncSubmit",
+ "FORM_SUBMIT": "formSubmit",
+ "CANCEL": "cancel"
+
+};
+
+/**
+* Constant representing the Dialog's configuration properties
+* @property YAHOO.widget.Dialog._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.Dialog._DEFAULT_CONFIG = {
+
+ "POST_METHOD": {
+ key: "postmethod",
+ value: "async"
+ },
+
+ "BUTTONS": {
+ key: "buttons",
+ value: "none"
+ }
+
+};
+
+/**
+* Initializes the class's configurable properties which can be changed using the Dialog's Config object (cfg).
+* @method initDefaultConfig
+*/
+YAHOO.widget.Dialog.prototype.initDefaultConfig = function() {
+ YAHOO.widget.Dialog.superclass.initDefaultConfig.call(this);
+
+ /**
+ * The internally maintained callback object for use with the Connection utility
+ * @property callback
+ * @type Object
+ */
+ this.callback = {
+ /**
+ * The function to execute upon success of the Connection submission
+ * @property callback.success
+ * @type Function
+ */
+ success : null,
+ /**
+ * The function to execute upon failure of the Connection submission
+ * @property callback.failure
+ * @type Function
+ */
+ failure : null,
+ /**
+ * The arbitraty argument or arguments to pass to the Connection callback functions
+ * @property callback.argument
+ * @type Object
+ */
+ argument: null
+ };
+
+ // Add form dialog config properties //
+
+ var DEFAULT_CONFIG = YAHOO.widget.Dialog._DEFAULT_CONFIG;
+
+ /**
+ * The method to use for posting the Dialog's form. Possible values are "async", "form", and "manual".
+ * @config postmethod
+ * @type String
+ * @default async
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.POST_METHOD.key,
+ {
+ handler: this.configPostMethod,
+ value: DEFAULT_CONFIG.POST_METHOD.value,
+ validator: function(val) {
+ if (val != "form" && val != "async" && val != "none" && val != "manual") {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ }
+ );
+
+ /**
+ * Object literal(s) defining the buttons for the Dialog's footer.
+ * @config buttons
+ * @type Object[]
+ * @default "none"
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.BUTTONS.key,
+ {
+ handler: this.configButtons,
+ value: DEFAULT_CONFIG.BUTTONS.value
+ }
+ );
+
+};
+
+/**
+* Initializes the custom events for Dialog which are fired automatically at appropriate times by the Dialog class.
+* @method initEvents
+*/
+YAHOO.widget.Dialog.prototype.initEvents = function() {
+ YAHOO.widget.Dialog.superclass.initEvents.call(this);
+
+ var EVENT_TYPES = YAHOO.widget.Dialog._EVENT_TYPES;
+
+ /**
+ * CustomEvent fired prior to submission
+ * @event beforeSumitEvent
+ */
+ this.beforeSubmitEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_SUBMIT, this);
+
+ /**
+ * CustomEvent fired after submission
+ * @event submitEvent
+ */
+ this.submitEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.SUBMIT, this);
+
+ /**
+ * CustomEvent fired prior to manual submission
+ * @event manualSubmitEvent
+ */
+ this.manualSubmitEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.MANUAL_SUBMIT, this);
+
+ /**
+ * CustomEvent fired prior to asynchronous submission
+ * @event asyncSubmitEvent
+ */
+ this.asyncSubmitEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.ASYNC_SUBMIT, this);
+
+ /**
+ * CustomEvent fired prior to form-based submission
+ * @event formSubmitEvent
+ */
+ this.formSubmitEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.FORM_SUBMIT, this);
+
+ /**
+ * CustomEvent fired after cancel
+ * @event cancelEvent
+ */
+ this.cancelEvent = new YAHOO.util.CustomEvent(EVENT_TYPES.CANCEL, this);
+};
+
+/**
+* The Dialog initialization method, which is executed for Dialog and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
+* @method init
+* @param {String} el The element ID representing the Dialog OR
+* @param {HTMLElement} el The element representing the Dialog
+* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this Dialog. See configuration documentation for more details.
+*/
+YAHOO.widget.Dialog.prototype.init = function(el, userConfig) {
+ YAHOO.widget.Dialog.superclass.init.call(this, el/*, userConfig*/); // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
+
+ this.beforeInitEvent.fire(YAHOO.widget.Dialog);
+
+ YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Dialog.CSS_DIALOG);
+
+ this.cfg.setProperty("visible", false);
+
+ if (userConfig) {
+ this.cfg.applyConfig(userConfig, true);
+ }
+
+ this.showEvent.subscribe(this.focusFirst, this, true);
+ this.beforeHideEvent.subscribe(this.blurButtons, this, true);
+
+ this.beforeRenderEvent.subscribe(function() {
+ var buttonCfg = this.cfg.getProperty("buttons");
+ if (buttonCfg && buttonCfg != "none") {
+ if (! this.footer) {
+ this.setFooter("");
+ }
+ }
+ }, this, true);
+
+ this.initEvent.fire(YAHOO.widget.Dialog);
+};
+
+/**
+* Performs the submission of the Dialog form depending on the value of "postmethod" property.
+* @method doSubmit
+*/
+YAHOO.widget.Dialog.prototype.doSubmit = function() {
+ var pm = this.cfg.getProperty("postmethod");
+ switch (pm) {
+ case "async":
+ var method = this.form.getAttribute("method") || 'POST';
+ method = method.toUpperCase();
+ YAHOO.util.Connect.setForm(this.form);
+ var cObj = YAHOO.util.Connect.asyncRequest(method, this.form.getAttribute("action"), this.callback);
+ this.asyncSubmitEvent.fire();
+ break;
+ case "form":
+ this.form.submit();
+ this.formSubmitEvent.fire();
+ break;
+ case "none":
+ case "manual":
+ this.manualSubmitEvent.fire();
+ break;
+ }
+};
+
+/**
+* @method _onFormKeyDown
+* @description "keydown" event handler for the dialog's form.
+* @protected
+* @param {Event} p_oEvent Object representing the DOM event object passed
+* back by the event utility (YAHOO.util.Event).
+*/
+YAHOO.widget.Dialog.prototype._onFormKeyDown = function(p_oEvent) {
+
+ var oTarget = YAHOO.util.Event.getTarget(p_oEvent),
+ nCharCode = YAHOO.util.Event.getCharCode(p_oEvent);
+
+ if (
+ nCharCode == 13 &&
+ oTarget.tagName &&
+ oTarget.tagName.toUpperCase() == "INPUT"
+ ) {
+
+ var sType = oTarget.type;
+
+ if(
+ sType == "text" || sType == "password" || sType == "checkbox" ||
+ sType == "radio" || sType == "file"
+ ) {
+
+ // Fire the "click" event on the dialog's default button
+ this.defaultHtmlButton.click();
+
+ }
+
+ }
+
+};
+
+/**
+* Prepares the Dialog's internal FORM object, creating one if one is not currently present.
+* @method registerForm
+*/
+YAHOO.widget.Dialog.prototype.registerForm = function() {
+ var form = this.element.getElementsByTagName("form")[0];
+
+ if (! form) {
+ var formHTML = "";
+ this.body.innerHTML += formHTML;
+ form = this.element.getElementsByTagName("form")[0];
+ }
+
+ this.firstFormElement = function() {
+ for (var f=0;f=0;f-- ) {
+ var el = form.elements[f];
+ if (el.focus && ! el.disabled) {
+ if (el.type && el.type != "hidden") {
+ return el;
+ }
+ }
+ }
+ return null;
+ }();
+
+ this.form = form;
+
+ if(this.form && (this.browser == "ie" || this.browser == "ie7" || this.browser == "gecko")) {
+
+ YAHOO.util.Event.addListener(this.form, "keydown", this._onFormKeyDown, null, this);
+
+ }
+
+
+ if (this.cfg.getProperty("modal") && this.form) {
+
+ var me = this;
+
+ var firstElement = this.firstFormElement || this.firstButton;
+ if (firstElement) {
+ this.preventBackTab = new YAHOO.util.KeyListener(firstElement, { shift:true, keys:9 }, {fn:me.focusLast, scope:me, correctScope:true} );
+ this.showEvent.subscribe(this.preventBackTab.enable, this.preventBackTab, true);
+ this.hideEvent.subscribe(this.preventBackTab.disable, this.preventBackTab, true);
+ }
+
+ var lastElement = this.lastButton || this.lastFormElement;
+ if (lastElement) {
+ this.preventTabOut = new YAHOO.util.KeyListener(lastElement, { shift:false, keys:9 }, {fn:me.focusFirst, scope:me, correctScope:true} );
+ this.showEvent.subscribe(this.preventTabOut.enable, this.preventTabOut, true);
+ this.hideEvent.subscribe(this.preventTabOut.disable, this.preventTabOut, true);
+ }
+ }
+};
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "close" property is changed. The method controls the appending or hiding of the close icon at the top right of the Dialog.
+* @method configClose
+* @param {String} type The CustomEvent type (usually the property name)
+* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Dialog.prototype.configClose = function(type, args, obj) {
+ var val = args[0];
+
+ var doCancel = function(e, obj) {
+ obj.cancel();
+ };
+
+ if (val) {
+ if (! this.close) {
+ this.close = document.createElement("div");
+ YAHOO.util.Dom.addClass(this.close, "container-close");
+
+ this.close.innerHTML = " ";
+ this.innerElement.appendChild(this.close);
+ YAHOO.util.Event.addListener(this.close, "click", doCancel, this);
+ } else {
+ this.close.style.display = "block";
+ }
+ } else {
+ if (this.close) {
+ this.close.style.display = "none";
+ }
+ }
+};
+
+/**
+* The default event handler for the "buttons" configuration property
+* @method configButtons
+* @param {String} type The CustomEvent type (usually the property name)
+* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.Dialog.prototype.configButtons = function(type, args, obj) {
+ var buttons = args[0];
+ if (buttons != "none") {
+ this.buttonSpan = null;
+ this.buttonSpan = document.createElement("span");
+ this.buttonSpan.className = "button-group";
+
+ for (var b=0;b 0) {
+
+ if(nElements == 1) {
+
+ oElement = oElement[0];
+
+ var sType = oElement.type,
+ sTagName = oElement.tagName.toUpperCase();
+
+ switch(sTagName) {
+
+ case "INPUT":
+
+ if(sType == "checkbox") {
+
+ oData[sName] = oElement.checked;
+
+ }
+ else if(sType != "radio") {
+
+ oData[sName] = oElement.value;
+
+ }
+
+ break;
+
+ case "TEXTAREA":
+
+ oData[sName] = oElement.value;
+
+ break;
+
+ case "SELECT":
+
+ var aOptions = oElement.options,
+ nOptions = aOptions.length,
+ aValues = [],
+ oOption,
+ sValue;
+
+
+ for(var n=0; n 0) {
+
+ var i = aButtons.length - 1;
+
+ do {
+
+ Event.purgeElement(aButtons[i], false, "click");
+
+ }
+ while(i--);
+
+ }
+
+ }
+
+
+ if(oForm) {
+
+ Event.purgeElement(oForm);
+
+ this.body.removeChild(oForm);
+
+ this.form = null;
+
+ }
+
+ YAHOO.widget.Dialog.superclass.destroy.call(this);
+
+};
+
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String} The string representation of the Dialog
+*/
+YAHOO.widget.Dialog.prototype.toString = function() {
+ return "Dialog " + this.id;
+};
+/**
+* SimpleDialog is a simple implementation of Dialog that can be used to submit a single value. Forms can be processed in 3 ways -- via an asynchronous Connection utility call, a simple form POST or GET, or manually.
+* @namespace YAHOO.widget
+* @class SimpleDialog
+* @extends YAHOO.widget.Dialog
+* @constructor
+* @param {String} el The element ID representing the SimpleDialog OR
+* @param {HTMLElement} el The element representing the SimpleDialog
+* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this SimpleDialog. See configuration documentation for more details.
+*/
+YAHOO.widget.SimpleDialog = function(el, userConfig) {
+ YAHOO.widget.SimpleDialog.superclass.constructor.call(this, el, userConfig);
+};
+
+YAHOO.extend(YAHOO.widget.SimpleDialog, YAHOO.widget.Dialog);
+
+/**
+* Constant for the standard network icon for a blocking action
+* @property YAHOO.widget.SimpleDialog.ICON_BLOCK
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_BLOCK = "blckicon";
+
+/**
+* Constant for the standard network icon for alarm
+* @property YAHOO.widget.SimpleDialog.ICON_ALARM
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_ALARM = "alrticon";
+
+/**
+* Constant for the standard network icon for help
+* @property YAHOO.widget.SimpleDialog.ICON_HELP
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_HELP = "hlpicon";
+
+/**
+* Constant for the standard network icon for info
+* @property YAHOO.widget.SimpleDialog.ICON_INFO
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_INFO = "infoicon";
+
+/**
+* Constant for the standard network icon for warn
+* @property YAHOO.widget.SimpleDialog.ICON_WARN
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_WARN = "warnicon";
+
+/**
+* Constant for the standard network icon for a tip
+* @property YAHOO.widget.SimpleDialog.ICON_TIP
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.ICON_TIP = "tipicon";
+
+/**
+* Constant representing the default CSS class used for a SimpleDialog
+* @property YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG
+* @static
+* @final
+* @type String
+*/
+YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG = "yui-simple-dialog";
+
+/**
+* Constant representing the SimpleDialog's configuration properties
+* @property YAHOO.widget.SimpleDialog._DEFAULT_CONFIG
+* @private
+* @final
+* @type Object
+*/
+YAHOO.widget.SimpleDialog._DEFAULT_CONFIG = {
+
+ "ICON": {
+ key: "icon",
+ value:"none",
+ suppressEvent:true
+ },
+
+ "TEXT": {
+ key: "text",
+ value:"",
+ suppressEvent:true,
+ supercedes:["icon"]
+ }
+
+};
+
+/**
+* Initializes the class's configurable properties which can be changed using the SimpleDialog's Config object (cfg).
+* @method initDefaultConfig
+*/
+YAHOO.widget.SimpleDialog.prototype.initDefaultConfig = function() {
+ YAHOO.widget.SimpleDialog.superclass.initDefaultConfig.call(this);
+
+ // Add dialog config properties //
+
+ var DEFAULT_CONFIG = YAHOO.widget.SimpleDialog._DEFAULT_CONFIG;
+
+ /**
+ * Sets the informational icon for the SimpleDialog
+ * @config icon
+ * @type String
+ * @default "none"
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.ICON.key,
+ {
+ handler: this.configIcon,
+ value: DEFAULT_CONFIG.ICON.value,
+ suppressEvent: DEFAULT_CONFIG.ICON.suppressEvent
+ }
+ );
+
+ /**
+ * Sets the text for the SimpleDialog
+ * @config text
+ * @type String
+ * @default ""
+ */
+ this.cfg.addProperty(
+ DEFAULT_CONFIG.TEXT.key,
+ {
+ handler: this.configText,
+ value: DEFAULT_CONFIG.TEXT.value,
+ suppressEvent: DEFAULT_CONFIG.TEXT.suppressEvent,
+ supercedes: DEFAULT_CONFIG.TEXT.supercedes
+ }
+ );
+
+};
+
+
+/**
+* The SimpleDialog initialization method, which is executed for SimpleDialog and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
+* @method init
+* @param {String} el The element ID representing the SimpleDialog OR
+* @param {HTMLElement} el The element representing the SimpleDialog
+* @param {Object} userConfig The configuration object literal containing the configuration that should be set for this SimpleDialog. See configuration documentation for more details.
+*/
+YAHOO.widget.SimpleDialog.prototype.init = function(el, userConfig) {
+ YAHOO.widget.SimpleDialog.superclass.init.call(this, el/*, userConfig*/); // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
+
+ this.beforeInitEvent.fire(YAHOO.widget.SimpleDialog);
+
+ YAHOO.util.Dom.addClass(this.element, YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG);
+
+ this.cfg.queueProperty("postmethod", "manual");
+
+ if (userConfig) {
+ this.cfg.applyConfig(userConfig, true);
+ }
+
+ this.beforeRenderEvent.subscribe(function() {
+ if (! this.body) {
+ this.setBody("");
+ }
+ }, this, true);
+
+ this.initEvent.fire(YAHOO.widget.SimpleDialog);
+
+};
+/**
+* Prepares the SimpleDialog's internal FORM object, creating one if one is not currently present, and adding the value hidden field.
+* @method registerForm
+*/
+YAHOO.widget.SimpleDialog.prototype.registerForm = function() {
+ YAHOO.widget.SimpleDialog.superclass.registerForm.call(this);
+ this.form.innerHTML += " ";
+};
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Fired when the "icon" property is set.
+* @method configIcon
+* @param {String} type The CustomEvent type (usually the property name)
+* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.SimpleDialog.prototype.configIcon = function(type,args,obj) {
+ var icon = args[0];
+ if (icon && icon != "none") {
+ var iconHTML = "";
+ if (icon.indexOf(".") == -1) {
+ iconHTML = " ";
+ } else {
+ iconHTML = " ";
+ }
+ this.body.innerHTML = iconHTML + this.body.innerHTML;
+ }
+};
+
+/**
+* Fired when the "text" property is set.
+* @method configText
+* @param {String} type The CustomEvent type (usually the property name)
+* @param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+* @param {Object} obj The scope object. For configuration handlers, this will usually equal the owner.
+*/
+YAHOO.widget.SimpleDialog.prototype.configText = function(type,args,obj) {
+ var text = args[0];
+ if (text) {
+ this.setBody(text);
+ this.cfg.refireEvent("icon");
+ }
+};
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String} The string representation of the SimpleDialog
+*/
+YAHOO.widget.SimpleDialog.prototype.toString = function() {
+ return "SimpleDialog " + this.id;
+};
+/**
+* ContainerEffect encapsulates animation transitions that are executed when an Overlay is shown or hidden.
+* @namespace YAHOO.widget
+* @class ContainerEffect
+* @constructor
+* @param {YAHOO.widget.Overlay} overlay The Overlay that the animation should be associated with
+* @param {Object} attrIn The object literal representing the animation arguments to be used for the animate-in transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. YAHOO.util.Easing.easeIn).
+* @param {Object} attrOut The object literal representing the animation arguments to be used for the animate-out transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. YAHOO.util.Easing.easeIn).
+* @param {HTMLElement} targetElement Optional. The target element that should be animated during the transition. Defaults to overlay.element.
+* @param {class} Optional. The animation class to instantiate. Defaults to YAHOO.util.Anim. Other options include YAHOO.util.Motion.
+*/
+YAHOO.widget.ContainerEffect = function(overlay, attrIn, attrOut, targetElement, animClass) {
+ if (! animClass) {
+ animClass = YAHOO.util.Anim;
+ }
+
+ /**
+ * The overlay to animate
+ * @property overlay
+ * @type YAHOO.widget.Overlay
+ */
+ this.overlay = overlay;
+ /**
+ * The animation attributes to use when transitioning into view
+ * @property attrIn
+ * @type Object
+ */
+ this.attrIn = attrIn;
+ /**
+ * The animation attributes to use when transitioning out of view
+ * @property attrOut
+ * @type Object
+ */
+ this.attrOut = attrOut;
+ /**
+ * The target element to be animated
+ * @property targetElement
+ * @type HTMLElement
+ */
+ this.targetElement = targetElement || overlay.element;
+ /**
+ * The animation class to use for animating the overlay
+ * @property animClass
+ * @type class
+ */
+ this.animClass = animClass;
+};
+
+/**
+* Initializes the animation classes and events.
+* @method init
+*/
+YAHOO.widget.ContainerEffect.prototype.init = function() {
+ this.beforeAnimateInEvent = new YAHOO.util.CustomEvent("beforeAnimateIn", this);
+ this.beforeAnimateOutEvent = new YAHOO.util.CustomEvent("beforeAnimateOut", this);
+
+ this.animateInCompleteEvent = new YAHOO.util.CustomEvent("animateInComplete", this);
+ this.animateOutCompleteEvent = new YAHOO.util.CustomEvent("animateOutComplete", this);
+
+ this.animIn = new this.animClass(this.targetElement, this.attrIn.attributes, this.attrIn.duration, this.attrIn.method);
+ this.animIn.onStart.subscribe(this.handleStartAnimateIn, this);
+ this.animIn.onTween.subscribe(this.handleTweenAnimateIn, this);
+ this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn, this);
+
+ this.animOut = new this.animClass(this.targetElement, this.attrOut.attributes, this.attrOut.duration, this.attrOut.method);
+ this.animOut.onStart.subscribe(this.handleStartAnimateOut, this);
+ this.animOut.onTween.subscribe(this.handleTweenAnimateOut, this);
+ this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut, this);
+};
+
+/**
+* Triggers the in-animation.
+* @method animateIn
+*/
+YAHOO.widget.ContainerEffect.prototype.animateIn = function() {
+ this.beforeAnimateInEvent.fire();
+ this.animIn.animate();
+};
+
+/**
+* Triggers the out-animation.
+* @method animateOut
+*/
+YAHOO.widget.ContainerEffect.prototype.animateOut = function() {
+ this.beforeAnimateOutEvent.fire();
+ this.animOut.animate();
+};
+
+/**
+* The default onStart handler for the in-animation.
+* @method handleStartAnimateIn
+* @param {String} type The CustomEvent type
+* @param {Object[]} args The CustomEvent arguments
+* @param {Object} obj The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn = function(type, args, obj) { };
+/**
+* The default onTween handler for the in-animation.
+* @method handleTweenAnimateIn
+* @param {String} type The CustomEvent type
+* @param {Object[]} args The CustomEvent arguments
+* @param {Object} obj The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn = function(type, args, obj) { };
+/**
+* The default onComplete handler for the in-animation.
+* @method handleCompleteAnimateIn
+* @param {String} type The CustomEvent type
+* @param {Object[]} args The CustomEvent arguments
+* @param {Object} obj The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn = function(type, args, obj) { };
+
+/**
+* The default onStart handler for the out-animation.
+* @method handleStartAnimateOut
+* @param {String} type The CustomEvent type
+* @param {Object[]} args The CustomEvent arguments
+* @param {Object} obj The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut = function(type, args, obj) { };
+/**
+* The default onTween handler for the out-animation.
+* @method handleTweenAnimateOut
+* @param {String} type The CustomEvent type
+* @param {Object[]} args The CustomEvent arguments
+* @param {Object} obj The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut = function(type, args, obj) { };
+/**
+* The default onComplete handler for the out-animation.
+* @method handleCompleteAnimateOut
+* @param {String} type The CustomEvent type
+* @param {Object[]} args The CustomEvent arguments
+* @param {Object} obj The scope object
+*/
+YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut = function(type, args, obj) { };
+
+/**
+* Returns a string representation of the object.
+* @method toString
+* @return {String} The string representation of the ContainerEffect
+*/
+YAHOO.widget.ContainerEffect.prototype.toString = function() {
+ var output = "ContainerEffect";
+ if (this.overlay) {
+ output += " [" + this.overlay.toString() + "]";
+ }
+ return output;
+};
+
+/**
+* A pre-configured ContainerEffect instance that can be used for fading an overlay in and out.
+* @method FADE
+* @static
+* @param {Overlay} overlay The Overlay object to animate
+* @param {Number} dur The duration of the animation
+* @return {ContainerEffect} The configured ContainerEffect object
+*/
+YAHOO.widget.ContainerEffect.FADE = function(overlay, dur) {
+ var fade = new YAHOO.widget.ContainerEffect(overlay, { attributes:{opacity: {from:0, to:1}}, duration:dur, method:YAHOO.util.Easing.easeIn }, { attributes:{opacity: {to:0}}, duration:dur, method:YAHOO.util.Easing.easeOut}, overlay.element );
+
+ fade.handleStartAnimateIn = function(type,args,obj) {
+ YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");
+
+ if (! obj.overlay.underlay) {
+ obj.overlay.cfg.refireEvent("underlay");
+ }
+
+ if (obj.overlay.underlay) {
+ obj.initialUnderlayOpacity = YAHOO.util.Dom.getStyle(obj.overlay.underlay, "opacity");
+ obj.overlay.underlay.style.filter = null;
+ }
+
+ YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "visible");
+ YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 0);
+ };
+
+ fade.handleCompleteAnimateIn = function(type,args,obj) {
+ YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");
+
+ if (obj.overlay.element.style.filter) {
+ obj.overlay.element.style.filter = null;
+ }
+
+ if (obj.overlay.underlay) {
+ YAHOO.util.Dom.setStyle(obj.overlay.underlay, "opacity", obj.initialUnderlayOpacity);
+ }
+
+ obj.overlay.cfg.refireEvent("iframe");
+ obj.animateInCompleteEvent.fire();
+ };
+
+ fade.handleStartAnimateOut = function(type, args, obj) {
+ YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");
+
+ if (obj.overlay.underlay) {
+ obj.overlay.underlay.style.filter = null;
+ }
+ };
+
+ fade.handleCompleteAnimateOut = function(type, args, obj) {
+ YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");
+ if (obj.overlay.element.style.filter) {
+ obj.overlay.element.style.filter = null;
+ }
+ YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "hidden");
+ YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 1);
+
+ obj.overlay.cfg.refireEvent("iframe");
+
+ obj.animateOutCompleteEvent.fire();
+ };
+
+ fade.init();
+ return fade;
+};
+
+
+/**
+* A pre-configured ContainerEffect instance that can be used for sliding an overlay in and out.
+* @method SLIDE
+* @static
+* @param {Overlay} overlay The Overlay object to animate
+* @param {Number} dur The duration of the animation
+* @return {ContainerEffect} The configured ContainerEffect object
+*/
+YAHOO.widget.ContainerEffect.SLIDE = function(overlay, dur) {
+ var x = overlay.cfg.getProperty("x") || YAHOO.util.Dom.getX(overlay.element);
+ var y = overlay.cfg.getProperty("y") || YAHOO.util.Dom.getY(overlay.element);
+
+ var clientWidth = YAHOO.util.Dom.getClientWidth();
+ var offsetWidth = overlay.element.offsetWidth;
+
+ var slide = new YAHOO.widget.ContainerEffect(overlay, {
+ attributes:{ points: { to:[x, y] } },
+ duration:dur,
+ method:YAHOO.util.Easing.easeIn
+ },
+ {
+ attributes:{ points: { to:[(clientWidth+25), y] } },
+ duration:dur,
+ method:YAHOO.util.Easing.easeOut
+ },
+ overlay.element,
+ YAHOO.util.Motion);
+
+
+ slide.handleStartAnimateIn = function(type,args,obj) {
+ obj.overlay.element.style.left = (-25-offsetWidth) + "px";
+ obj.overlay.element.style.top = y + "px";
+ };
+
+ slide.handleTweenAnimateIn = function(type, args, obj) {
+
+
+ var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
+
+ var currentX = pos[0];
+ var currentY = pos[1];
+
+ if (YAHOO.util.Dom.getStyle(obj.overlay.element, "visibility") == "hidden" && currentX < x) {
+ YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "visible");
+ }
+
+ obj.overlay.cfg.setProperty("xy", [currentX,currentY], true);
+ obj.overlay.cfg.refireEvent("iframe");
+ };
+
+ slide.handleCompleteAnimateIn = function(type, args, obj) {
+ obj.overlay.cfg.setProperty("xy", [x,y], true);
+ obj.startX = x;
+ obj.startY = y;
+ obj.overlay.cfg.refireEvent("iframe");
+ obj.animateInCompleteEvent.fire();
+ };
+
+ slide.handleStartAnimateOut = function(type, args, obj) {
+ var vw = YAHOO.util.Dom.getViewportWidth();
+
+ var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
+
+ var yso = pos[1];
+
+ var currentTo = obj.animOut.attributes.points.to;
+ obj.animOut.attributes.points.to = [(vw+25), yso];
+ };
+
+ slide.handleTweenAnimateOut = function(type, args, obj) {
+ var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
+
+ var xto = pos[0];
+ var yto = pos[1];
+
+ obj.overlay.cfg.setProperty("xy", [xto,yto], true);
+ obj.overlay.cfg.refireEvent("iframe");
+ };
+
+ slide.handleCompleteAnimateOut = function(type, args, obj) {
+ YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "hidden");
+
+ obj.overlay.cfg.setProperty("xy", [x,y]);
+ obj.animateOutCompleteEvent.fire();
+ };
+
+ slide.init();
+ return slide;
+};
+YAHOO.register("container", YAHOO.widget.Module, {version: "2.2.1", build: "193"});
Modified: jifty/trunk/share/web/static/js/yui/dom.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/dom.js (original)
+++ jifty/trunk/share/web/static/js/yui/dom.js Thu Apr 12 03:32:44 2007
@@ -1,893 +1,923 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 0.12.1
-*/
-
-/**
- * The dom module provides helper methods for manipulating Dom elements.
- * @module dom
- *
- */
-
-(function() {
- var Y = YAHOO.util, // internal shorthand
- getStyle, // for load time browser branching
- setStyle, // ditto
- id_counter = 0, // for use with generateId
- propertyCache = {}; // for faster hyphen converts
-
- // brower detection
- var ua = navigator.userAgent.toLowerCase(),
- isOpera = (ua.indexOf('opera') > -1),
- isSafari = (ua.indexOf('safari') > -1),
- isGecko = (!isOpera && !isSafari && ua.indexOf('gecko') > -1),
- isIE = (!isOpera && ua.indexOf('msie') > -1);
-
- // regex cache
- var patterns = {
- HYPHEN: /(-[a-z])/i
- };
-
-
- var toCamel = function(property) {
- if ( !patterns.HYPHEN.test(property) ) {
- return property; // no hyphens
- }
-
- if (propertyCache[property]) { // already converted
- return propertyCache[property];
- }
-
- while( patterns.HYPHEN.exec(property) ) {
- property = property.replace(RegExp.$1,
- RegExp.$1.substr(1).toUpperCase());
- }
-
- propertyCache[property] = property;
- return property;
- //return property.replace(/-([a-z])/gi, function(m0, m1) {return m1.toUpperCase()}) // cant use function as 2nd arg yet due to safari bug
- };
-
- // branching at load instead of runtime
- if (document.defaultView && document.defaultView.getComputedStyle) { // W3C DOM method
- getStyle = function(el, property) {
- var value = null;
-
- var computed = document.defaultView.getComputedStyle(el, '');
- if (computed) { // test computed before touching for safari
- value = computed[toCamel(property)];
- }
-
- return el.style[property] || value;
- };
- } else if (document.documentElement.currentStyle && isIE) { // IE method
- getStyle = function(el, property) {
- switch( toCamel(property) ) {
- case 'opacity' :// IE opacity uses filter
- var val = 100;
- try { // will error if no DXImageTransform
- val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity;
-
- } catch(e) {
- try { // make sure its in the document
- val = el.filters('alpha').opacity;
- } catch(e) {
- }
- }
- return val / 100;
- break;
- default:
- // test currentStyle before touching
- var value = el.currentStyle ? el.currentStyle[property] : null;
- return ( el.style[property] || value );
- }
- };
- } else { // default to inline only
- getStyle = function(el, property) { return el.style[property]; };
- }
-
- if (isIE) {
- setStyle = function(el, property, val) {
- switch (property) {
- case 'opacity':
- if ( typeof el.style.filter == 'string' ) { // in case not appended
- el.style.filter = 'alpha(opacity=' + val * 100 + ')';
-
- if (!el.currentStyle || !el.currentStyle.hasLayout) {
- el.style.zoom = 1; // when no layout or cant tell
- }
- }
- break;
- default:
- el.style[property] = val;
- }
- };
- } else {
- setStyle = function(el, property, val) {
- el.style[property] = val;
- };
- }
-
- /**
- * Provides helper methods for DOM elements.
- * @namespace YAHOO.util
- * @class Dom
- */
- YAHOO.util.Dom = {
- /**
- * Returns an HTMLElement reference.
- * @method get
- * @param {String | HTMLElement |Array} el Accepts a string to use as an ID for getting a DOM reference, an actual DOM reference, or an Array of IDs and/or HTMLElements.
- * @return {HTMLElement | Array} A DOM reference to an HTML element or an array of HTMLElements.
- */
- get: function(el) {
- if (!el) { return null; } // nothing to work with
-
- if (typeof el != 'string' && !(el instanceof Array) ) { // assuming HTMLElement or HTMLCollection, so pass back as is
- return el;
- }
-
- if (typeof el == 'string') { // ID
- return document.getElementById(el);
- }
- else { // array of ID's and/or elements
- var collection = [];
- for (var i = 0, len = el.length; i < len; ++i) {
- collection[collection.length] = Y.Dom.get(el[i]);
- }
-
- return collection;
- }
-
- return null; // safety, should never happen
- },
-
- /**
- * Normalizes currentStyle and ComputedStyle.
- * @method getStyle
- * @param {String | HTMLElement |Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
- * @param {String} property The style property whose value is returned.
- * @return {String | Array} The current value of the style property for the element(s).
- */
- getStyle: function(el, property) {
- property = toCamel(property);
-
- var f = function(element) {
- return getStyle(element, property);
- };
-
- return Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Wrapper for setting style properties of HTMLElements. Normalizes "opacity" across modern browsers.
- * @method setStyle
- * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
- * @param {String} property The style property to be set.
- * @param {String} val The value to apply to the given property.
- */
- setStyle: function(el, property, val) {
- property = toCamel(property);
-
- var f = function(element) {
- setStyle(element, property, val);
-
- };
-
- Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Gets the current position of an element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- * @method getXY
- * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
- * @return {Array} The XY position of the element(s)
- */
- getXY: function(el) {
- var f = function(el) {
-
- // has to be part of document to have pageXY
- if (el.parentNode === null || el.offsetParent === null ||
- this.getStyle(el, 'display') == 'none') {
- return false;
- }
-
- var parentNode = null;
- var pos = [];
- var box;
-
- if (el.getBoundingClientRect) { // IE
- box = el.getBoundingClientRect();
- var doc = document;
- if ( !this.inDocument(el) && parent.document != document) {// might be in a frame, need to get its scroll
- doc = parent.document;
-
- if ( !this.isAncestor(doc.documentElement, el) ) {
- return false;
- }
-
- }
-
- var scrollTop = Math.max(doc.documentElement.scrollTop, doc.body.scrollTop);
- var scrollLeft = Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft);
-
- return [box.left + scrollLeft, box.top + scrollTop];
- }
- else { // safari, opera, & gecko
- pos = [el.offsetLeft, el.offsetTop];
- parentNode = el.offsetParent;
- if (parentNode != el) {
- while (parentNode) {
- pos[0] += parentNode.offsetLeft;
- pos[1] += parentNode.offsetTop;
- parentNode = parentNode.offsetParent;
- }
- }
- if (isSafari && this.getStyle(el, 'position') == 'absolute' ) { // safari doubles in some cases
- pos[0] -= document.body.offsetLeft;
- pos[1] -= document.body.offsetTop;
- }
- }
-
- if (el.parentNode) { parentNode = el.parentNode; }
- else { parentNode = null; }
-
- while (parentNode && parentNode.tagName.toUpperCase() != 'BODY' && parentNode.tagName.toUpperCase() != 'HTML')
- { // account for any scrolled ancestors
- if (Y.Dom.getStyle(parentNode, 'display') != 'inline') { // work around opera inline scrollLeft/Top bug
- pos[0] -= parentNode.scrollLeft;
- pos[1] -= parentNode.scrollTop;
- }
-
- if (parentNode.parentNode) {
- parentNode = parentNode.parentNode;
- } else { parentNode = null; }
- }
-
-
- return pos;
- };
-
- return Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Gets the current X position of an element based on page coordinates. The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- * @method getX
- * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
- * @return {String | Array} The X position of the element(s)
- */
- getX: function(el) {
- var f = function(el) {
- return Y.Dom.getXY(el)[0];
- };
-
- return Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Gets the current Y position of an element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- * @method getY
- * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
- * @return {String | Array} The Y position of the element(s)
- */
- getY: function(el) {
- var f = function(el) {
- return Y.Dom.getXY(el)[1];
- };
-
- return Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Set the position of an html element in page coordinates, regardless of how the element is positioned.
- * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- * @method setXY
- * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
- * @param {Array} pos Contains X & Y values for new position (coordinates are page-based)
- * @param {Boolean} noRetry By default we try and set the position a second time if the first fails
- */
- setXY: function(el, pos, noRetry) {
- var f = function(el) {
- var style_pos = this.getStyle(el, 'position');
- if (style_pos == 'static') { // default to relative
- this.setStyle(el, 'position', 'relative');
- style_pos = 'relative';
- }
-
- var pageXY = this.getXY(el);
- if (pageXY === false) { // has to be part of doc to have pageXY
- return false;
- }
-
- var delta = [ // assuming pixels; if not we will have to retry
- parseInt( this.getStyle(el, 'left'), 10 ),
- parseInt( this.getStyle(el, 'top'), 10 )
- ];
-
- if ( isNaN(delta[0]) ) {// in case of 'auto'
- delta[0] = (style_pos == 'relative') ? 0 : el.offsetLeft;
- }
- if ( isNaN(delta[1]) ) { // in case of 'auto'
- delta[1] = (style_pos == 'relative') ? 0 : el.offsetTop;
- }
-
- if (pos[0] !== null) { el.style.left = pos[0] - pageXY[0] + delta[0] + 'px'; }
- if (pos[1] !== null) { el.style.top = pos[1] - pageXY[1] + delta[1] + 'px'; }
-
- if (!noRetry) {
- var newXY = this.getXY(el);
-
- // if retry is true, try one more time if we miss
- if ( (pos[0] !== null && newXY[0] != pos[0]) ||
- (pos[1] !== null && newXY[1] != pos[1]) ) {
- this.setXY(el, pos, true);
- }
- }
-
- };
-
- Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Set the X position of an html element in page coordinates, regardless of how the element is positioned.
- * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- * @method setX
- * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
- * @param {Int} x The value to use as the X coordinate for the element(s).
- */
- setX: function(el, x) {
- Y.Dom.setXY(el, [x, null]);
- },
-
- /**
- * Set the Y position of an html element in page coordinates, regardless of how the element is positioned.
- * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- * @method setY
- * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
- * @param {Int} x To use as the Y coordinate for the element(s).
- */
- setY: function(el, y) {
- Y.Dom.setXY(el, [null, y]);
- },
-
- /**
- * Returns the region position of the given element.
- * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
- * @method getRegion
- * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
- * @return {Region | Array} A Region or array of Region instances containing "top, left, bottom, right" member data.
- */
- getRegion: function(el) {
- var f = function(el) {
- var region = new Y.Region.getRegion(el);
- return region;
- };
-
- return Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Returns the width of the client (viewport).
- * @method getClientWidth
- * @deprecated Now using getViewportWidth. This interface left intact for back compat.
- * @return {Int} The width of the viewable area of the page.
- */
- getClientWidth: function() {
- return Y.Dom.getViewportWidth();
- },
-
- /**
- * Returns the height of the client (viewport).
- * @method getClientHeight
- * @deprecated Now using getViewportHeight. This interface left intact for back compat.
- * @return {Int} The height of the viewable area of the page.
- */
- getClientHeight: function() {
- return Y.Dom.getViewportHeight();
- },
-
- /**
- * Returns a array of HTMLElements with the given class.
- * For optimized performance, include a tag and/or root node when possible.
- * @method getElementsByClassName
- * @param {String} className The class name to match against
- * @param {String} tag (optional) The tag name of the elements being collected
- * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point
- * @return {Array} An array of elements that have the given class name
- */
- getElementsByClassName: function(className, tag, root) {
- var method = function(el) { return Y.Dom.hasClass(el, className); };
- return Y.Dom.getElementsBy(method, tag, root);
- },
-
- /**
- * Determines whether an HTMLElement has the given className.
- * @method hasClass
- * @param {String | HTMLElement | Array} el The element or collection to test
- * @param {String} className the class name to search for
- * @return {Boolean | Array} A boolean value or array of boolean values
- */
- hasClass: function(el, className) {
- var re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
-
- var f = function(el) {
- return re.test(el['className']);
- };
-
- return Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Adds a class name to a given element or collection of elements.
- * @method addClass
- * @param {String | HTMLElement | Array} el The element or collection to add the class to
- * @param {String} className the class name to add to the class attribute
- */
- addClass: function(el, className) {
- var f = function(el) {
- if (this.hasClass(el, className)) { return; } // already present
-
-
- el['className'] = [el['className'], className].join(' ');
- };
-
- Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Removes a class name from a given element or collection of elements.
- * @method removeClass
- * @param {String | HTMLElement | Array} el The element or collection to remove the class from
- * @param {String} className the class name to remove from the class attribute
- */
- removeClass: function(el, className) {
- var re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', 'g');
-
- var f = function(el) {
- if (!this.hasClass(el, className)) { return; } // not present
-
-
- var c = el['className'];
- el['className'] = c.replace(re, ' ');
- if ( this.hasClass(el, className) ) { // in case of multiple adjacent
- this.removeClass(el, className);
- }
-
- };
-
- Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Replace a class with another class for a given element or collection of elements.
- * If no oldClassName is present, the newClassName is simply added.
- * @method replaceClass
- * @param {String | HTMLElement | Array} el The element or collection to remove the class from
- * @param {String} oldClassName the class name to be replaced
- * @param {String} newClassName the class name that will be replacing the old class name
- */
- replaceClass: function(el, oldClassName, newClassName) {
- if (oldClassName === newClassName) { // avoid infinite loop
- return false;
- }
-
- var re = new RegExp('(?:^|\\s+)' + oldClassName + '(?:\\s+|$)', 'g');
-
- var f = function(el) {
-
- if ( !this.hasClass(el, oldClassName) ) {
- this.addClass(el, newClassName); // just add it if nothing to replace
- return; // note return
- }
-
- el['className'] = el['className'].replace(re, ' ' + newClassName + ' ');
-
- if ( this.hasClass(el, oldClassName) ) { // in case of multiple adjacent
- this.replaceClass(el, oldClassName, newClassName);
- }
- };
-
- Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Generates a unique ID
- * @method generateId
- * @param {String | HTMLElement | Array} el (optional) An optional element array of elements to add an ID to (no ID is added if one is already present).
- * @param {String} prefix (optional) an optional prefix to use (defaults to "yui-gen").
- * @return {String | Array} The generated ID, or array of generated IDs (or original ID if already present on an element)
- */
- generateId: function(el, prefix) {
- prefix = prefix || 'yui-gen';
- el = el || {};
-
- var f = function(el) {
- if (el) {
- el = Y.Dom.get(el);
- } else {
- el = {}; // just generating ID in this case
- }
-
- if (!el.id) {
- el.id = prefix + id_counter++;
- } // dont override existing
-
-
- return el.id;
- };
-
- return Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Determines whether an HTMLElement is an ancestor of another HTML element in the DOM hierarchy.
- * @method isAncestor
- * @param {String | HTMLElement} haystack The possible ancestor
- * @param {String | HTMLElement} needle The possible descendent
- * @return {Boolean} Whether or not the haystack is an ancestor of needle
- */
- isAncestor: function(haystack, needle) {
- haystack = Y.Dom.get(haystack);
- if (!haystack || !needle) { return false; }
-
- var f = function(needle) {
- if (haystack.contains && !isSafari) { // safari "contains" is broken
- return haystack.contains(needle);
- }
- else if ( haystack.compareDocumentPosition ) {
- return !!(haystack.compareDocumentPosition(needle) & 16);
- }
- else { // loop up and test each parent
- var parent = needle.parentNode;
-
- while (parent) {
- if (parent == haystack) {
- return true;
- }
- else if (!parent.tagName || parent.tagName.toUpperCase() == 'HTML') {
- return false;
- }
-
- parent = parent.parentNode;
- }
- return false;
- }
- };
-
- return Y.Dom.batch(needle, f, Y.Dom, true);
- },
-
- /**
- * Determines whether an HTMLElement is present in the current document.
- * @method inDocument
- * @param {String | HTMLElement} el The element to search for
- * @return {Boolean} Whether or not the element is present in the current document
- */
- inDocument: function(el) {
- var f = function(el) {
- return this.isAncestor(document.documentElement, el);
- };
-
- return Y.Dom.batch(el, f, Y.Dom, true);
- },
-
- /**
- * Returns a array of HTMLElements that pass the test applied by supplied boolean method.
- * For optimized performance, include a tag and/or root node when possible.
- * @method getElementsBy
- * @param {Function} method - A boolean method for testing elements which receives the element as its only argument.
-
- * @param {String} tag (optional) The tag name of the elements being collected
- * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point
- */
- getElementsBy: function(method, tag, root) {
- tag = tag || '*';
-
- var nodes = [];
-
- if (root) {
- root = Y.Dom.get(root);
- if (!root) { // if no root node, then no children
- return nodes;
- }
- } else {
- root = document;
- }
-
- var elements = root.getElementsByTagName(tag);
-
- if ( !elements.length && (tag == '*' && root.all) ) {
- elements = root.all; // IE < 6
- }
-
- for (var i = 0, len = elements.length; i < len; ++i) {
- if ( method(elements[i]) ) { nodes[nodes.length] = elements[i]; }
- }
-
-
- return nodes;
- },
-
- /**
- * Returns an array of elements that have had the supplied method applied.
- * The method is called with the element(s) as the first arg, and the optional param as the second ( method(el, o) ).
- * @method batch
- * @param {String | HTMLElement | Array} el (optional) An element or array of elements to apply the method to
- * @param {Function} method The method to apply to the element(s)
- * @param {Any} o (optional) An optional arg that is passed to the supplied method
- * @param {Boolean} override (optional) Whether or not to override the scope of "method" with "o"
- * @return {HTMLElement | Array} The element(s) with the method applied
- */
- batch: function(el, method, o, override) {
- var id = el;
- el = Y.Dom.get(el);
-
- var scope = (override) ? o : window;
-
- if (!el || el.tagName || !el.length) { // is null or not a collection (tagName for SELECT and others that can be both an element and a collection)
- if (!el) {
- return false;
- }
- return method.call(scope, el, o);
- }
-
- var collection = [];
-
- for (var i = 0, len = el.length; i < len; ++i) {
- if (!el[i]) {
- id = el[i];
- }
- collection[collection.length] = method.call(scope, el[i], o);
- }
-
- return collection;
- },
-
- /**
- * Returns the height of the document.
- * @method getDocumentHeight
- * @return {Int} The height of the actual document (which includes the body and its margin).
- */
- getDocumentHeight: function() {
- var scrollHeight = (document.compatMode != 'CSS1Compat') ? document.body.scrollHeight : document.documentElement.scrollHeight;
-
- var h = Math.max(scrollHeight, Y.Dom.getViewportHeight());
- return h;
- },
-
- /**
- * Returns the width of the document.
- * @method getDocumentWidth
- * @return {Int} The width of the actual document (which includes the body and its margin).
- */
- getDocumentWidth: function() {
- var scrollWidth = (document.compatMode != 'CSS1Compat') ? document.body.scrollWidth : document.documentElement.scrollWidth;
- var w = Math.max(scrollWidth, Y.Dom.getViewportWidth());
- return w;
- },
-
- /**
- * Returns the current height of the viewport.
- * @method getViewportHeight
- * @return {Int} The height of the viewable area of the page (excludes scrollbars).
- */
- getViewportHeight: function() {
- var height = self.innerHeight; // Safari, Opera
- var mode = document.compatMode;
-
- if ( (mode || isIE) && !isOpera ) { // IE, Gecko
- height = (mode == 'CSS1Compat') ?
- document.documentElement.clientHeight : // Standards
- document.body.clientHeight; // Quirks
- }
-
- return height;
- },
-
- /**
- * Returns the current width of the viewport.
- * @method getViewportWidth
- * @return {Int} The width of the viewable area of the page (excludes scrollbars).
- */
-
- getViewportWidth: function() {
- var width = self.innerWidth; // Safari
- var mode = document.compatMode;
-
- if (mode || isIE) { // IE, Gecko, Opera
- width = (mode == 'CSS1Compat') ?
- document.documentElement.clientWidth : // Standards
- document.body.clientWidth; // Quirks
- }
- return width;
- }
- };
-})();
-/**
- * A region is a representation of an object on a grid. It is defined
- * by the top, right, bottom, left extents, so is rectangular by default. If
- * other shapes are required, this class could be extended to support it.
- * @namespace YAHOO.util
- * @class Region
- * @param {Int} t the top extent
- * @param {Int} r the right extent
- * @param {Int} b the bottom extent
- * @param {Int} l the left extent
- * @constructor
- */
-YAHOO.util.Region = function(t, r, b, l) {
-
- /**
- * The region's top extent
- * @property top
- * @type Int
- */
- this.top = t;
-
- /**
- * The region's top extent as index, for symmetry with set/getXY
- * @property 1
- * @type Int
- */
- this[1] = t;
-
- /**
- * The region's right extent
- * @property right
- * @type int
- */
- this.right = r;
-
- /**
- * The region's bottom extent
- * @property bottom
- * @type Int
- */
- this.bottom = b;
-
- /**
- * The region's left extent
- * @property left
- * @type Int
- */
- this.left = l;
-
- /**
- * The region's left extent as index, for symmetry with set/getXY
- * @property 0
- * @type Int
- */
- this[0] = l;
-};
-
-/**
- * Returns true if this region contains the region passed in
- * @method contains
- * @param {Region} region The region to evaluate
- * @return {Boolean} True if the region is contained with this region,
- * else false
- */
-YAHOO.util.Region.prototype.contains = function(region) {
- return ( region.left >= this.left &&
- region.right <= this.right &&
- region.top >= this.top &&
- region.bottom <= this.bottom );
-
-};
-
-/**
- * Returns the area of the region
- * @method getArea
- * @return {Int} the region's area
- */
-YAHOO.util.Region.prototype.getArea = function() {
- return ( (this.bottom - this.top) * (this.right - this.left) );
-};
-
-/**
- * Returns the region where the passed in region overlaps with this one
- * @method intersect
- * @param {Region} region The region that intersects
- * @return {Region} The overlap region, or null if there is no overlap
- */
-YAHOO.util.Region.prototype.intersect = function(region) {
- var t = Math.max( this.top, region.top );
- var r = Math.min( this.right, region.right );
- var b = Math.min( this.bottom, region.bottom );
- var l = Math.max( this.left, region.left );
-
- if (b >= t && r >= l) {
- return new YAHOO.util.Region(t, r, b, l);
- } else {
- return null;
- }
-};
-
-/**
- * Returns the region representing the smallest region that can contain both
- * the passed in region and this region.
- * @method union
- * @param {Region} region The region that to create the union with
- * @return {Region} The union region
- */
-YAHOO.util.Region.prototype.union = function(region) {
- var t = Math.min( this.top, region.top );
- var r = Math.max( this.right, region.right );
- var b = Math.max( this.bottom, region.bottom );
- var l = Math.min( this.left, region.left );
-
- return new YAHOO.util.Region(t, r, b, l);
-};
-
-/**
- * toString
- * @method toString
- * @return string the region properties
- */
-YAHOO.util.Region.prototype.toString = function() {
- return ( "Region {" +
- "top: " + this.top +
- ", right: " + this.right +
- ", bottom: " + this.bottom +
- ", left: " + this.left +
- "}" );
-};
-
-/**
- * Returns a region that is occupied by the DOM element
- * @method getRegion
- * @param {HTMLElement} el The element
- * @return {Region} The region that the element occupies
- * @static
- */
-YAHOO.util.Region.getRegion = function(el) {
- var p = YAHOO.util.Dom.getXY(el);
-
- var t = p[1];
- var r = p[0] + el.offsetWidth;
- var b = p[1] + el.offsetHeight;
- var l = p[0];
-
- return new YAHOO.util.Region(t, r, b, l);
-};
-
-/////////////////////////////////////////////////////////////////////////////
-
-/**
- * A point is a region that is special in that it represents a single point on
- * the grid.
- * @namespace YAHOO.util
- * @class Point
- * @param {Int} x The X position of the point
- * @param {Int} y The Y position of the point
- * @constructor
- * @extends YAHOO.util.Region
- */
-YAHOO.util.Point = function(x, y) {
- if (x instanceof Array) { // accept output from Dom.getXY
- y = x[1];
- x = x[0];
- }
-
- /**
- * The X position of the point, which is also the right, left and index zero (for Dom.getXY symmetry)
- * @property x
- * @type Int
- */
-
- this.x = this.right = this.left = this[0] = x;
-
- /**
- * The Y position of the point, which is also the top, bottom and index one (for Dom.getXY symmetry)
- * @property y
- * @type Int
- */
- this.y = this.top = this.bottom = this[1] = y;
-};
-
-YAHOO.util.Point.prototype = new YAHOO.util.Region();
-
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/*
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+*/
+
+/**
+ * The dom module provides helper methods for manipulating Dom elements.
+ * @module dom
+ *
+ */
+
+(function() {
+ var Y = YAHOO.util, // internal shorthand
+ getStyle, // for load time browser branching
+ setStyle, // ditto
+ id_counter = 0, // for use with generateId
+ propertyCache = {}; // for faster hyphen converts
+
+ // brower detection
+ var ua = navigator.userAgent.toLowerCase(),
+ isOpera = (ua.indexOf('opera') > -1),
+ isSafari = (ua.indexOf('safari') > -1),
+ isGecko = (!isOpera && !isSafari && ua.indexOf('gecko') > -1),
+ isIE = (!isOpera && ua.indexOf('msie') > -1);
+
+ // regex cache
+ var patterns = {
+ HYPHEN: /(-[a-z])/i, // to normalize get/setStyle
+ ROOT_TAG: /body|html/i // body for quirks mode, html for standards
+ };
+
+ var toCamel = function(property) {
+ if ( !patterns.HYPHEN.test(property) ) {
+ return property; // no hyphens
+ }
+
+ if (propertyCache[property]) { // already converted
+ return propertyCache[property];
+ }
+
+ var converted = property;
+
+ while( patterns.HYPHEN.exec(converted) ) {
+ converted = converted.replace(RegExp.$1,
+ RegExp.$1.substr(1).toUpperCase());
+ }
+
+ propertyCache[property] = converted;
+ return converted;
+ //return property.replace(/-([a-z])/gi, function(m0, m1) {return m1.toUpperCase()}) // cant use function as 2nd arg yet due to safari bug
+ };
+
+ // branching at load instead of runtime
+ if (document.defaultView && document.defaultView.getComputedStyle) { // W3C DOM method
+ getStyle = function(el, property) {
+ var value = null;
+
+ if (property == 'float') { // fix reserved word
+ property = 'cssFloat';
+ }
+
+ var computed = document.defaultView.getComputedStyle(el, '');
+ if (computed) { // test computed before touching for safari
+ value = computed[toCamel(property)];
+ }
+
+ return el.style[property] || value;
+ };
+ } else if (document.documentElement.currentStyle && isIE) { // IE method
+ getStyle = function(el, property) {
+ switch( toCamel(property) ) {
+ case 'opacity' :// IE opacity uses filter
+ var val = 100;
+ try { // will error if no DXImageTransform
+ val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity;
+
+ } catch(e) {
+ try { // make sure its in the document
+ val = el.filters('alpha').opacity;
+ } catch(e) {
+ }
+ }
+ return val / 100;
+ break;
+ case 'float': // fix reserved word
+ property = 'styleFloat'; // fall through
+ default:
+ // test currentStyle before touching
+ var value = el.currentStyle ? el.currentStyle[property] : null;
+ return ( el.style[property] || value );
+ }
+ };
+ } else { // default to inline only
+ getStyle = function(el, property) { return el.style[property]; };
+ }
+
+ if (isIE) {
+ setStyle = function(el, property, val) {
+ switch (property) {
+ case 'opacity':
+ if ( YAHOO.lang.isString(el.style.filter) ) { // in case not appended
+ el.style.filter = 'alpha(opacity=' + val * 100 + ')';
+
+ if (!el.currentStyle || !el.currentStyle.hasLayout) {
+ el.style.zoom = 1; // when no layout or cant tell
+ }
+ }
+ break;
+ case 'float':
+ property = 'styleFloat';
+ default:
+ el.style[property] = val;
+ }
+ };
+ } else {
+ setStyle = function(el, property, val) {
+ if (property == 'float') {
+ property = 'cssFloat';
+ }
+ el.style[property] = val;
+ };
+ }
+
+ /**
+ * Provides helper methods for DOM elements.
+ * @namespace YAHOO.util
+ * @class Dom
+ */
+ YAHOO.util.Dom = {
+ /**
+ * Returns an HTMLElement reference.
+ * @method get
+ * @param {String | HTMLElement |Array} el Accepts a string to use as an ID for getting a DOM reference, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+ * @return {HTMLElement | Array} A DOM reference to an HTML element or an array of HTMLElements.
+ */
+ get: function(el) {
+ if ( YAHOO.lang.isString(el) ) { // ID
+ return document.getElementById(el);
+ }
+
+ if ( YAHOO.lang.isArray(el) ) { // Array of IDs and/or HTMLElements
+ var c = [];
+ for (var i = 0, len = el.length; i < len; ++i) {
+ c[c.length] = Y.Dom.get(el[i]);
+ }
+
+ return c;
+ }
+
+ if (el) { // assuming HTMLElement or HTMLCollection, just pass back
+ return el;
+ }
+
+ return null; // el is likely null or undefined
+ },
+
+ /**
+ * Normalizes currentStyle and ComputedStyle.
+ * @method getStyle
+ * @param {String | HTMLElement |Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+ * @param {String} property The style property whose value is returned.
+ * @return {String | Array} The current value of the style property for the element(s).
+ */
+ getStyle: function(el, property) {
+ property = toCamel(property);
+
+ var f = function(element) {
+ return getStyle(element, property);
+ };
+
+ return Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Wrapper for setting style properties of HTMLElements. Normalizes "opacity" across modern browsers.
+ * @method setStyle
+ * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+ * @param {String} property The style property to be set.
+ * @param {String} val The value to apply to the given property.
+ */
+ setStyle: function(el, property, val) {
+ property = toCamel(property);
+
+ var f = function(element) {
+ setStyle(element, property, val);
+
+ };
+
+ Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Gets the current position of an element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+ * @method getXY
+ * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
+ * @return {Array} The XY position of the element(s)
+ */
+ getXY: function(el) {
+ var f = function(el) {
+
+ // has to be part of document to have pageXY
+ if ( (el.parentNode === null || el.offsetParent === null ||
+ this.getStyle(el, 'display') == 'none') && el != document.body) {
+ return false;
+ }
+
+ var parentNode = null;
+ var pos = [];
+ var box;
+
+ if (el.getBoundingClientRect) { // IE
+ box = el.getBoundingClientRect();
+ var doc = document;
+ if ( !this.inDocument(el) && parent.document != document) {// might be in a frame, need to get its scroll
+ doc = parent.document;
+
+ if ( !this.isAncestor(doc.documentElement, el) ) {
+ return false;
+ }
+
+ }
+
+ var scrollTop = Math.max(doc.documentElement.scrollTop, doc.body.scrollTop);
+ var scrollLeft = Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft);
+
+ return [box.left + scrollLeft, box.top + scrollTop];
+ }
+ else { // safari, opera, & gecko
+ pos = [el.offsetLeft, el.offsetTop];
+ parentNode = el.offsetParent;
+
+ // safari: if el is abs or any parent is abs, subtract body offsets
+ var hasAbs = this.getStyle(el, 'position') == 'absolute';
+
+ if (parentNode != el) {
+ while (parentNode) {
+ pos[0] += parentNode.offsetLeft;
+ pos[1] += parentNode.offsetTop;
+ if (isSafari && !hasAbs &&
+ this.getStyle(parentNode,'position') == 'absolute' ) {
+ hasAbs = true; // we need to offset if any parent is absolutely positioned
+ }
+ parentNode = parentNode.offsetParent;
+ }
+ }
+
+ if (isSafari && hasAbs) { //safari doubles in this case
+ pos[0] -= document.body.offsetLeft;
+ pos[1] -= document.body.offsetTop;
+ }
+ }
+
+ parentNode = el.parentNode;
+
+ // account for any scrolled ancestors
+ while ( parentNode.tagName && !patterns.ROOT_TAG.test(parentNode.tagName) )
+ {
+ // work around opera inline scrollLeft/Top bug
+ if (isOpera && Y.Dom.getStyle(parentNode, 'display') != 'inline') {
+ pos[0] -= parentNode.scrollLeft;
+ pos[1] -= parentNode.scrollTop;
+ }
+
+ parentNode = parentNode.parentNode;
+ }
+
+
+ return pos;
+ };
+
+ return Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Gets the current X position of an element based on page coordinates. The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+ * @method getX
+ * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
+ * @return {String | Array} The X position of the element(s)
+ */
+ getX: function(el) {
+ var f = function(el) {
+ return Y.Dom.getXY(el)[0];
+ };
+
+ return Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Gets the current Y position of an element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+ * @method getY
+ * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
+ * @return {String | Array} The Y position of the element(s)
+ */
+ getY: function(el) {
+ var f = function(el) {
+ return Y.Dom.getXY(el)[1];
+ };
+
+ return Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Set the position of an html element in page coordinates, regardless of how the element is positioned.
+ * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+ * @method setXY
+ * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
+ * @param {Array} pos Contains X & Y values for new position (coordinates are page-based)
+ * @param {Boolean} noRetry By default we try and set the position a second time if the first fails
+ */
+ setXY: function(el, pos, noRetry) {
+ var f = function(el) {
+ var style_pos = this.getStyle(el, 'position');
+ if (style_pos == 'static') { // default to relative
+ this.setStyle(el, 'position', 'relative');
+ style_pos = 'relative';
+ }
+
+ var pageXY = this.getXY(el);
+ if (pageXY === false) { // has to be part of doc to have pageXY
+ return false;
+ }
+
+ var delta = [ // assuming pixels; if not we will have to retry
+ parseInt( this.getStyle(el, 'left'), 10 ),
+ parseInt( this.getStyle(el, 'top'), 10 )
+ ];
+
+ if ( isNaN(delta[0]) ) {// in case of 'auto'
+ delta[0] = (style_pos == 'relative') ? 0 : el.offsetLeft;
+ }
+ if ( isNaN(delta[1]) ) { // in case of 'auto'
+ delta[1] = (style_pos == 'relative') ? 0 : el.offsetTop;
+ }
+
+ if (pos[0] !== null) { el.style.left = pos[0] - pageXY[0] + delta[0] + 'px'; }
+ if (pos[1] !== null) { el.style.top = pos[1] - pageXY[1] + delta[1] + 'px'; }
+
+ if (!noRetry) {
+ var newXY = this.getXY(el);
+
+ // if retry is true, try one more time if we miss
+ if ( (pos[0] !== null && newXY[0] != pos[0]) ||
+ (pos[1] !== null && newXY[1] != pos[1]) ) {
+ this.setXY(el, pos, true);
+ }
+ }
+
+ };
+
+ Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Set the X position of an html element in page coordinates, regardless of how the element is positioned.
+ * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+ * @method setX
+ * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+ * @param {Int} x The value to use as the X coordinate for the element(s).
+ */
+ setX: function(el, x) {
+ Y.Dom.setXY(el, [x, null]);
+ },
+
+ /**
+ * Set the Y position of an html element in page coordinates, regardless of how the element is positioned.
+ * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+ * @method setY
+ * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+ * @param {Int} x To use as the Y coordinate for the element(s).
+ */
+ setY: function(el, y) {
+ Y.Dom.setXY(el, [null, y]);
+ },
+
+ /**
+ * Returns the region position of the given element.
+ * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
+ * @method getRegion
+ * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
+ * @return {Region | Array} A Region or array of Region instances containing "top, left, bottom, right" member data.
+ */
+ getRegion: function(el) {
+ var f = function(el) {
+ var region = new Y.Region.getRegion(el);
+ return region;
+ };
+
+ return Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Returns the width of the client (viewport).
+ * @method getClientWidth
+ * @deprecated Now using getViewportWidth. This interface left intact for back compat.
+ * @return {Int} The width of the viewable area of the page.
+ */
+ getClientWidth: function() {
+ return Y.Dom.getViewportWidth();
+ },
+
+ /**
+ * Returns the height of the client (viewport).
+ * @method getClientHeight
+ * @deprecated Now using getViewportHeight. This interface left intact for back compat.
+ * @return {Int} The height of the viewable area of the page.
+ */
+ getClientHeight: function() {
+ return Y.Dom.getViewportHeight();
+ },
+
+ /**
+ * Returns a array of HTMLElements with the given class.
+ * For optimized performance, include a tag and/or root node when possible.
+ * @method getElementsByClassName
+ * @param {String} className The class name to match against
+ * @param {String} tag (optional) The tag name of the elements being collected
+ * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point
+ * @return {Array} An array of elements that have the given class name
+ */
+ getElementsByClassName: function(className, tag, root) {
+ var method = function(el) { return Y.Dom.hasClass(el, className); };
+ return Y.Dom.getElementsBy(method, tag, root);
+ },
+
+ /**
+ * Determines whether an HTMLElement has the given className.
+ * @method hasClass
+ * @param {String | HTMLElement | Array} el The element or collection to test
+ * @param {String} className the class name to search for
+ * @return {Boolean | Array} A boolean value or array of boolean values
+ */
+ hasClass: function(el, className) {
+ var re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
+
+ var f = function(el) {
+ return re.test(el.className);
+ };
+
+ return Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Adds a class name to a given element or collection of elements.
+ * @method addClass
+ * @param {String | HTMLElement | Array} el The element or collection to add the class to
+ * @param {String} className the class name to add to the class attribute
+ */
+ addClass: function(el, className) {
+ var f = function(el) {
+ if (this.hasClass(el, className)) { return; } // already present
+
+
+ el.className = [el.className, className].join(' ');
+ };
+
+ Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Removes a class name from a given element or collection of elements.
+ * @method removeClass
+ * @param {String | HTMLElement | Array} el The element or collection to remove the class from
+ * @param {String} className the class name to remove from the class attribute
+ */
+ removeClass: function(el, className) {
+ var re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', 'g');
+
+ var f = function(el) {
+ if (!this.hasClass(el, className)) {
+ return; // not present
+ }
+
+
+ var c = el.className;
+ el.className = c.replace(re, ' ');
+ if ( this.hasClass(el, className) ) { // in case of multiple adjacent
+ this.removeClass(el, className);
+ }
+
+ };
+
+ Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Replace a class with another class for a given element or collection of elements.
+ * If no oldClassName is present, the newClassName is simply added.
+ * @method replaceClass
+ * @param {String | HTMLElement | Array} el The element or collection to remove the class from
+ * @param {String} oldClassName the class name to be replaced
+ * @param {String} newClassName the class name that will be replacing the old class name
+ */
+ replaceClass: function(el, oldClassName, newClassName) {
+ if (oldClassName === newClassName) { // avoid infinite loop
+ return false;
+ }
+
+ var re = new RegExp('(?:^|\\s+)' + oldClassName + '(?:\\s+|$)', 'g');
+
+ var f = function(el) {
+
+ if ( !this.hasClass(el, oldClassName) ) {
+ this.addClass(el, newClassName); // just add it if nothing to replace
+ return; // note return
+ }
+
+ el.className = el.className.replace(re, ' ' + newClassName + ' ');
+
+ if ( this.hasClass(el, oldClassName) ) { // in case of multiple adjacent
+ this.replaceClass(el, oldClassName, newClassName);
+ }
+ };
+
+ Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Generates a unique ID
+ * @method generateId
+ * @param {String | HTMLElement | Array} el (optional) An optional element array of elements to add an ID to (no ID is added if one is already present).
+ * @param {String} prefix (optional) an optional prefix to use (defaults to "yui-gen").
+ * @return {String | Array} The generated ID, or array of generated IDs (or original ID if already present on an element)
+ */
+ generateId: function(el, prefix) {
+ prefix = prefix || 'yui-gen';
+ el = el || {};
+
+ var f = function(el) {
+ if (el) {
+ el = Y.Dom.get(el);
+ } else {
+ el = {}; // just generating ID in this case
+ }
+
+ if (!el.id) {
+ el.id = prefix + id_counter++;
+ } // dont override existing
+
+
+ return el.id;
+ };
+
+ return Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Determines whether an HTMLElement is an ancestor of another HTML element in the DOM hierarchy.
+ * @method isAncestor
+ * @param {String | HTMLElement} haystack The possible ancestor
+ * @param {String | HTMLElement} needle The possible descendent
+ * @return {Boolean} Whether or not the haystack is an ancestor of needle
+ */
+ isAncestor: function(haystack, needle) {
+ haystack = Y.Dom.get(haystack);
+ if (!haystack || !needle) { return false; }
+
+ var f = function(needle) {
+ if (haystack.contains && !isSafari) { // safari "contains" is broken
+ return haystack.contains(needle);
+ }
+ else if ( haystack.compareDocumentPosition ) {
+ return !!(haystack.compareDocumentPosition(needle) & 16);
+ }
+ else { // loop up and test each parent
+ var parent = needle.parentNode;
+
+ while (parent) {
+ if (parent == haystack) {
+ return true;
+ }
+ else if (!parent.tagName || parent.tagName.toUpperCase() == 'HTML') {
+ return false;
+ }
+
+ parent = parent.parentNode;
+ }
+ return false;
+ }
+ };
+
+ return Y.Dom.batch(needle, f, Y.Dom, true);
+ },
+
+ /**
+ * Determines whether an HTMLElement is present in the current document.
+ * @method inDocument
+ * @param {String | HTMLElement} el The element to search for
+ * @return {Boolean} Whether or not the element is present in the current document
+ */
+ inDocument: function(el) {
+ var f = function(el) {
+ return this.isAncestor(document.documentElement, el);
+ };
+
+ return Y.Dom.batch(el, f, Y.Dom, true);
+ },
+
+ /**
+ * Returns a array of HTMLElements that pass the test applied by supplied boolean method.
+ * For optimized performance, include a tag and/or root node when possible.
+ * @method getElementsBy
+ * @param {Function} method - A boolean method for testing elements which receives the element as its only argument.
+
+ * @param {String} tag (optional) The tag name of the elements being collected
+ * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point
+ * @return {Array} Array of HTMLElements
+ */
+ getElementsBy: function(method, tag, root) {
+ tag = tag || '*';
+
+ var nodes = [];
+
+ if (root) {
+ root = Y.Dom.get(root);
+ if (!root) { // if no root node, then no children
+ return nodes;
+ }
+ } else {
+ root = document;
+ }
+
+ var elements = root.getElementsByTagName(tag);
+
+ if ( !elements.length && (tag == '*' && root.all) ) {
+ elements = root.all; // IE < 6
+ }
+
+ for (var i = 0, len = elements.length; i < len; ++i) {
+ if ( method(elements[i]) ) { nodes[nodes.length] = elements[i]; }
+ }
+
+
+ return nodes;
+ },
+
+ /**
+ * Returns an array of elements that have had the supplied method applied.
+ * The method is called with the element(s) as the first arg, and the optional param as the second ( method(el, o) ).
+ * @method batch
+ * @param {String | HTMLElement | Array} el (optional) An element or array of elements to apply the method to
+ * @param {Function} method The method to apply to the element(s)
+ * @param {Any} o (optional) An optional arg that is passed to the supplied method
+ * @param {Boolean} override (optional) Whether or not to override the scope of "method" with "o"
+ * @return {HTMLElement | Array} The element(s) with the method applied
+ */
+ batch: function(el, method, o, override) {
+ var id = el;
+ el = Y.Dom.get(el);
+
+ var scope = (override) ? o : window;
+
+ if (!el || el.tagName || !el.length) { // is null or not a collection (tagName for SELECT and others that can be both an element and a collection)
+ if (!el) {
+ return false;
+ }
+ return method.call(scope, el, o);
+ }
+
+ var collection = [];
+
+ for (var i = 0, len = el.length; i < len; ++i) {
+ if (!el[i]) {
+ id = el[i];
+ }
+ collection[collection.length] = method.call(scope, el[i], o);
+ }
+
+ return collection;
+ },
+
+ /**
+ * Returns the height of the document.
+ * @method getDocumentHeight
+ * @return {Int} The height of the actual document (which includes the body and its margin).
+ */
+ getDocumentHeight: function() {
+ var scrollHeight = (document.compatMode != 'CSS1Compat') ? document.body.scrollHeight : document.documentElement.scrollHeight;
+
+ var h = Math.max(scrollHeight, Y.Dom.getViewportHeight());
+ return h;
+ },
+
+ /**
+ * Returns the width of the document.
+ * @method getDocumentWidth
+ * @return {Int} The width of the actual document (which includes the body and its margin).
+ */
+ getDocumentWidth: function() {
+ var scrollWidth = (document.compatMode != 'CSS1Compat') ? document.body.scrollWidth : document.documentElement.scrollWidth;
+ var w = Math.max(scrollWidth, Y.Dom.getViewportWidth());
+ return w;
+ },
+
+ /**
+ * Returns the current height of the viewport.
+ * @method getViewportHeight
+ * @return {Int} The height of the viewable area of the page (excludes scrollbars).
+ */
+ getViewportHeight: function() {
+ var height = self.innerHeight; // Safari, Opera
+ var mode = document.compatMode;
+
+ if ( (mode || isIE) && !isOpera ) { // IE, Gecko
+ height = (mode == 'CSS1Compat') ?
+ document.documentElement.clientHeight : // Standards
+ document.body.clientHeight; // Quirks
+ }
+
+ return height;
+ },
+
+ /**
+ * Returns the current width of the viewport.
+ * @method getViewportWidth
+ * @return {Int} The width of the viewable area of the page (excludes scrollbars).
+ */
+
+ getViewportWidth: function() {
+ var width = self.innerWidth; // Safari
+ var mode = document.compatMode;
+
+ if (mode || isIE) { // IE, Gecko, Opera
+ width = (mode == 'CSS1Compat') ?
+ document.documentElement.clientWidth : // Standards
+ document.body.clientWidth; // Quirks
+ }
+ return width;
+ }
+ };
+})();
+/**
+ * A region is a representation of an object on a grid. It is defined
+ * by the top, right, bottom, left extents, so is rectangular by default. If
+ * other shapes are required, this class could be extended to support it.
+ * @namespace YAHOO.util
+ * @class Region
+ * @param {Int} t the top extent
+ * @param {Int} r the right extent
+ * @param {Int} b the bottom extent
+ * @param {Int} l the left extent
+ * @constructor
+ */
+YAHOO.util.Region = function(t, r, b, l) {
+
+ /**
+ * The region's top extent
+ * @property top
+ * @type Int
+ */
+ this.top = t;
+
+ /**
+ * The region's top extent as index, for symmetry with set/getXY
+ * @property 1
+ * @type Int
+ */
+ this[1] = t;
+
+ /**
+ * The region's right extent
+ * @property right
+ * @type int
+ */
+ this.right = r;
+
+ /**
+ * The region's bottom extent
+ * @property bottom
+ * @type Int
+ */
+ this.bottom = b;
+
+ /**
+ * The region's left extent
+ * @property left
+ * @type Int
+ */
+ this.left = l;
+
+ /**
+ * The region's left extent as index, for symmetry with set/getXY
+ * @property 0
+ * @type Int
+ */
+ this[0] = l;
+};
+
+/**
+ * Returns true if this region contains the region passed in
+ * @method contains
+ * @param {Region} region The region to evaluate
+ * @return {Boolean} True if the region is contained with this region,
+ * else false
+ */
+YAHOO.util.Region.prototype.contains = function(region) {
+ return ( region.left >= this.left &&
+ region.right <= this.right &&
+ region.top >= this.top &&
+ region.bottom <= this.bottom );
+
+};
+
+/**
+ * Returns the area of the region
+ * @method getArea
+ * @return {Int} the region's area
+ */
+YAHOO.util.Region.prototype.getArea = function() {
+ return ( (this.bottom - this.top) * (this.right - this.left) );
+};
+
+/**
+ * Returns the region where the passed in region overlaps with this one
+ * @method intersect
+ * @param {Region} region The region that intersects
+ * @return {Region} The overlap region, or null if there is no overlap
+ */
+YAHOO.util.Region.prototype.intersect = function(region) {
+ var t = Math.max( this.top, region.top );
+ var r = Math.min( this.right, region.right );
+ var b = Math.min( this.bottom, region.bottom );
+ var l = Math.max( this.left, region.left );
+
+ if (b >= t && r >= l) {
+ return new YAHOO.util.Region(t, r, b, l);
+ } else {
+ return null;
+ }
+};
+
+/**
+ * Returns the region representing the smallest region that can contain both
+ * the passed in region and this region.
+ * @method union
+ * @param {Region} region The region that to create the union with
+ * @return {Region} The union region
+ */
+YAHOO.util.Region.prototype.union = function(region) {
+ var t = Math.min( this.top, region.top );
+ var r = Math.max( this.right, region.right );
+ var b = Math.max( this.bottom, region.bottom );
+ var l = Math.min( this.left, region.left );
+
+ return new YAHOO.util.Region(t, r, b, l);
+};
+
+/**
+ * toString
+ * @method toString
+ * @return string the region properties
+ */
+YAHOO.util.Region.prototype.toString = function() {
+ return ( "Region {" +
+ "top: " + this.top +
+ ", right: " + this.right +
+ ", bottom: " + this.bottom +
+ ", left: " + this.left +
+ "}" );
+};
+
+/**
+ * Returns a region that is occupied by the DOM element
+ * @method getRegion
+ * @param {HTMLElement} el The element
+ * @return {Region} The region that the element occupies
+ * @static
+ */
+YAHOO.util.Region.getRegion = function(el) {
+ var p = YAHOO.util.Dom.getXY(el);
+
+ var t = p[1];
+ var r = p[0] + el.offsetWidth;
+ var b = p[1] + el.offsetHeight;
+ var l = p[0];
+
+ return new YAHOO.util.Region(t, r, b, l);
+};
+
+/////////////////////////////////////////////////////////////////////////////
+
+
+/**
+ * A point is a region that is special in that it represents a single point on
+ * the grid.
+ * @namespace YAHOO.util
+ * @class Point
+ * @param {Int} x The X position of the point
+ * @param {Int} y The Y position of the point
+ * @constructor
+ * @extends YAHOO.util.Region
+ */
+YAHOO.util.Point = function(x, y) {
+ if (x instanceof Array) { // accept output from Dom.getXY
+ y = x[1];
+ x = x[0];
+ }
+
+ /**
+ * The X position of the point, which is also the right, left and index zero (for Dom.getXY symmetry)
+ * @property x
+ * @type Int
+ */
+
+ this.x = this.right = this.left = this[0] = x;
+
+ /**
+ * The Y position of the point, which is also the top, bottom and index one (for Dom.getXY symmetry)
+ * @property y
+ * @type Int
+ */
+ this.y = this.top = this.bottom = this[1] = y;
+};
+
+YAHOO.util.Point.prototype = new YAHOO.util.Region();
+
+YAHOO.register("dom", YAHOO.util.Dom, {version: "2.2.1", build: "193"});
Added: jifty/trunk/share/web/static/js/yui/element-beta.js
==============================================================================
--- (empty file)
+++ jifty/trunk/share/web/static/js/yui/element-beta.js Thu Apr 12 03:32:44 2007
@@ -0,0 +1,913 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+/**
+ * Provides Attribute configurations.
+ * @namespace YAHOO.util
+ * @class Attribute
+ * @constructor
+ * @param hash {Object} The intial Attribute.
+ * @param {YAHOO.util.AttributeProvider} The owner of the Attribute instance.
+ */
+
+YAHOO.util.Attribute = function(hash, owner) {
+ if (owner) {
+ this.owner = owner;
+ this.configure(hash, true);
+ }
+};
+
+YAHOO.util.Attribute.prototype = {
+ /**
+ * The name of the attribute.
+ * @property name
+ * @type String
+ */
+ name: undefined,
+
+ /**
+ * The value of the attribute.
+ * @property value
+ * @type String
+ */
+ value: null,
+
+ /**
+ * The owner of the attribute.
+ * @property owner
+ * @type YAHOO.util.AttributeProvider
+ */
+ owner: null,
+
+ /**
+ * Whether or not the attribute is read only.
+ * @property readOnly
+ * @type Boolean
+ */
+ readOnly: false,
+
+ /**
+ * Whether or not the attribute can only be written once.
+ * @property writeOnce
+ * @type Boolean
+ */
+ writeOnce: false,
+
+ /**
+ * The attribute's initial configuration.
+ * @private
+ * @property _initialConfig
+ * @type Object
+ */
+ _initialConfig: null,
+
+ /**
+ * Whether or not the attribute's value has been set.
+ * @private
+ * @property _written
+ * @type Boolean
+ */
+ _written: false,
+
+ /**
+ * The method to use when setting the attribute's value.
+ * The method recieves the new value as the only argument.
+ * @property method
+ * @type Function
+ */
+ method: null,
+
+ /**
+ * The validator to use when setting the attribute's value.
+ * @property validator
+ * @type Function
+ * @return Boolean
+ */
+ validator: null,
+
+ /**
+ * Retrieves the current value of the attribute.
+ * @method getValue
+ * @return {any} The current value of the attribute.
+ */
+ getValue: function() {
+ return this.value;
+ },
+
+ /**
+ * Sets the value of the attribute and fires beforeChange and change events.
+ * @method setValue
+ * @param {Any} value The value to apply to the attribute.
+ * @param {Boolean} silent If true the change events will not be fired.
+ * @return {Boolean} Whether or not the value was set.
+ */
+ setValue: function(value, silent) {
+ var beforeRetVal;
+ var owner = this.owner;
+ var name = this.name;
+
+ var event = {
+ type: name,
+ prevValue: this.getValue(),
+ newValue: value
+ };
+
+ if (this.readOnly || ( this.writeOnce && this._written) ) {
+ return false; // write not allowed
+ }
+
+ if (this.validator && !this.validator.call(owner, value) ) {
+ return false; // invalid value
+ }
+
+ if (!silent) {
+ beforeRetVal = owner.fireBeforeChangeEvent(event);
+ if (beforeRetVal === false) {
+ return false;
+ }
+ }
+
+ if (this.method) {
+ this.method.call(owner, value);
+ }
+
+ this.value = value;
+ this._written = true;
+
+ event.type = name;
+
+ if (!silent) {
+ this.owner.fireChangeEvent(event);
+ }
+
+ return true;
+ },
+
+ /**
+ * Allows for configuring the Attribute's properties.
+ * @method configure
+ * @param {Object} map A key-value map of Attribute properties.
+ * @param {Boolean} init Whether or not this should become the initial config.
+ */
+ configure: function(map, init) {
+ map = map || {};
+ this._written = false; // reset writeOnce
+ this._initialConfig = this._initialConfig || {};
+
+ for (var key in map) {
+ if ( key && YAHOO.lang.hasOwnProperty(map, key) ) {
+ this[key] = map[key];
+ if (init) {
+ this._initialConfig[key] = map[key];
+ }
+ }
+ }
+ },
+
+ /**
+ * Resets the value to the initial config value.
+ * @method resetValue
+ * @return {Boolean} Whether or not the value was set.
+ */
+ resetValue: function() {
+ return this.setValue(this._initialConfig.value);
+ },
+
+ /**
+ * Resets the attribute config to the initial config state.
+ * @method resetConfig
+ */
+ resetConfig: function() {
+ this.configure(this._initialConfig);
+ },
+
+ /**
+ * Resets the value to the current value.
+ * Useful when values may have gotten out of sync with actual properties.
+ * @method refresh
+ * @return {Boolean} Whether or not the value was set.
+ */
+ refresh: function(silent) {
+ this.setValue(this.value, silent);
+ }
+};
+
+(function() {
+ var Lang = YAHOO.util.Lang;
+
+ /*
+ Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+ Code licensed under the BSD License:
+ http://developer.yahoo.net/yui/license.txt
+ */
+
+ /**
+ * Provides and manages YAHOO.util.Attribute instances
+ * @namespace YAHOO.util
+ * @class AttributeProvider
+ * @uses YAHOO.util.EventProvider
+ */
+ YAHOO.util.AttributeProvider = function() {};
+
+ YAHOO.util.AttributeProvider.prototype = {
+
+ /**
+ * A key-value map of Attribute configurations
+ * @property _configs
+ * @protected (may be used by subclasses and augmentors)
+ * @private
+ * @type {Object}
+ */
+ _configs: null,
+ /**
+ * Returns the current value of the attribute.
+ * @method get
+ * @param {String} key The attribute whose value will be returned.
+ */
+ get: function(key){
+ var configs = this._configs || {};
+ var config = configs[key];
+
+ if (!config) {
+ return undefined;
+ }
+
+ return config.value;
+ },
+
+ /**
+ * Sets the value of a config.
+ * @method set
+ * @param {String} key The name of the attribute
+ * @param {Any} value The value to apply to the attribute
+ * @param {Boolean} silent Whether or not to suppress change events
+ * @return {Boolean} Whether or not the value was set.
+ */
+ set: function(key, value, silent){
+ var configs = this._configs || {};
+ var config = configs[key];
+
+ if (!config) {
+ return false;
+ }
+
+ return config.setValue(value, silent);
+ },
+
+ /**
+ * Returns an array of attribute names.
+ * @method getAttributeKeys
+ * @return {Array} An array of attribute names.
+ */
+ getAttributeKeys: function(){
+ var configs = this._configs;
+ var keys = [];
+ var config;
+ for (var key in configs) {
+ config = configs[key];
+ if ( Lang.hasOwnProperty(configs, key) &&
+ !Lang.isUndefined(config) ) {
+ keys[keys.length] = key;
+ }
+ }
+
+ return keys;
+ },
+
+ /**
+ * Sets multiple attribute values.
+ * @method setAttributes
+ * @param {Object} map A key-value map of attributes
+ * @param {Boolean} silent Whether or not to suppress change events
+ */
+ setAttributes: function(map, silent){
+ for (var key in map) {
+ if ( Lang.hasOwnProperty(map, key) ) {
+ this.set(key, map[key], silent);
+ }
+ }
+ },
+
+ /**
+ * Resets the specified attribute's value to its initial value.
+ * @method resetValue
+ * @param {String} key The name of the attribute
+ * @param {Boolean} silent Whether or not to suppress change events
+ * @return {Boolean} Whether or not the value was set
+ */
+ resetValue: function(key, silent){
+ var configs = this._configs || {};
+ if (configs[key]) {
+ this.set(key, configs[key]._initialConfig.value, silent);
+ return true;
+ }
+ return false;
+ },
+
+ /**
+ * Sets the attribute's value to its current value.
+ * @method refresh
+ * @param {String | Array} key The attribute(s) to refresh
+ * @param {Boolean} silent Whether or not to suppress change events
+ */
+ refresh: function(key, silent){
+ var configs = this._configs;
+
+ key = ( ( Lang.isString(key) ) ? [key] : key ) ||
+ this.getAttributeKeys();
+
+ for (var i = 0, len = key.length; i < len; ++i) {
+ if ( // only set if there is a value and not null
+ configs[key[i]] &&
+ ! Lang.isUndefined(configs[key[i]].value) &&
+ ! Lang.isNull(configs[key[i]].value) ) {
+ configs[key[i]].refresh(silent);
+ }
+ }
+ },
+
+ /**
+ * Adds an Attribute to the AttributeProvider instance.
+ * @method register
+ * @param {String} key The attribute's name
+ * @param {Object} map A key-value map containing the
+ * attribute's properties.
+ * @deprecated Use setAttributeConfig
+ */
+ register: function(key, map) {
+ this.setAttributeConfig(key, map);
+ },
+
+
+ /**
+ * Returns the attribute's properties.
+ * @method getAttributeConfig
+ * @param {String} key The attribute's name
+ * @private
+ * @return {object} A key-value map containing all of the
+ * attribute's properties.
+ */
+ getAttributeConfig: function(key) {
+ var configs = this._configs || {};
+ var config = configs[key] || {};
+ var map = {}; // returning a copy to prevent overrides
+
+ for (key in config) {
+ if ( Lang.hasOwnProperty(config, key) ) {
+ map[key] = config[key];
+ }
+ }
+
+ return map;
+ },
+
+ /**
+ * Sets or updates an Attribute instance's properties.
+ * @method setAttributeConfig
+ * @param {String} key The attribute's name.
+ * @param {Object} map A key-value map of attribute properties
+ * @param {Boolean} init Whether or not this should become the intial config.
+ */
+ setAttributeConfig: function(key, map, init) {
+ var configs = this._configs || {};
+ map = map || {};
+ if (!configs[key]) {
+ map.name = key;
+ configs[key] = new YAHOO.util.Attribute(map, this);
+ } else {
+ configs[key].configure(map, init);
+ }
+ },
+
+ /**
+ * Sets or updates an Attribute instance's properties.
+ * @method configureAttribute
+ * @param {String} key The attribute's name.
+ * @param {Object} map A key-value map of attribute properties
+ * @param {Boolean} init Whether or not this should become the intial config.
+ * @deprecated Use setAttributeConfig
+ */
+ configureAttribute: function(key, map, init) {
+ this.setAttributeConfig(key, map, init);
+ },
+
+ /**
+ * Resets an attribute to its intial configuration.
+ * @method resetAttributeConfig
+ * @param {String} key The attribute's name.
+ * @private
+ */
+ resetAttributeConfig: function(key){
+ var configs = this._configs || {};
+ configs[key].resetConfig();
+ },
+
+ /**
+ * Fires the attribute's beforeChange event.
+ * @method fireBeforeChangeEvent
+ * @param {String} key The attribute's name.
+ * @param {Obj} e The event object to pass to handlers.
+ */
+ fireBeforeChangeEvent: function(e) {
+ var type = 'before';
+ type += e.type.charAt(0).toUpperCase() + e.type.substr(1) + 'Change';
+ e.type = type;
+ return this.fireEvent(e.type, e);
+ },
+
+ /**
+ * Fires the attribute's change event.
+ * @method fireChangeEvent
+ * @param {String} key The attribute's name.
+ * @param {Obj} e The event object to pass to the handlers.
+ */
+ fireChangeEvent: function(e) {
+ e.type += 'Change';
+ return this.fireEvent(e.type, e);
+ }
+ };
+
+ YAHOO.augment(YAHOO.util.AttributeProvider, YAHOO.util.EventProvider);
+})();
+
+(function() {
+// internal shorthand
+var Dom = YAHOO.util.Dom,
+ AttributeProvider = YAHOO.util.AttributeProvider;
+
+/**
+ * Element provides an wrapper object to simplify adding
+ * event listeners, using dom methods, and managing attributes.
+ * @module element
+ * @namespace YAHOO.util
+ * @requires yahoo, dom, event
+ * @beta
+ */
+
+/**
+ * Element provides an wrapper object to simplify adding
+ * event listeners, using dom methods, and managing attributes.
+ * @class Element
+ * @uses YAHOO.util.AttributeProvider
+ * @constructor
+ * @param el {HTMLElement | String} The html element that
+ * represents the Element.
+ * @param {Object} map A key-value map of initial config names and values
+ */
+YAHOO.util.Element = function(el, map) {
+ if (arguments.length) {
+ this.init(el, map);
+ }
+};
+
+YAHOO.util.Element.prototype = {
+ /**
+ * Dom events supported by the Element instance.
+ * @property DOM_EVENTS
+ * @type Object
+ */
+ DOM_EVENTS: null,
+
+ /**
+ * Wrapper for HTMLElement method.
+ * @method appendChild
+ * @param {Boolean} deep Whether or not to do a deep clone
+ */
+ appendChild: function(child) {
+ child = child.get ? child.get('element') : child;
+ this.get('element').appendChild(child);
+ },
+
+ /**
+ * Wrapper for HTMLElement method.
+ * @method getElementsByTagName
+ * @param {String} tag The tagName to collect
+ */
+ getElementsByTagName: function(tag) {
+ return this.get('element').getElementsByTagName(tag);
+ },
+
+ /**
+ * Wrapper for HTMLElement method.
+ * @method hasChildNodes
+ * @return {Boolean} Whether or not the element has childNodes
+ */
+ hasChildNodes: function() {
+ return this.get('element').hasChildNodes();
+ },
+
+ /**
+ * Wrapper for HTMLElement method.
+ * @method insertBefore
+ * @param {HTMLElement} element The HTMLElement to insert
+ * @param {HTMLElement} before The HTMLElement to insert
+ * the element before.
+ */
+ insertBefore: function(element, before) {
+ element = element.get ? element.get('element') : element;
+ before = (before && before.get) ? before.get('element') : before;
+
+ this.get('element').insertBefore(element, before);
+ },
+
+ /**
+ * Wrapper for HTMLElement method.
+ * @method removeChild
+ * @param {HTMLElement} child The HTMLElement to remove
+ */
+ removeChild: function(child) {
+ child = child.get ? child.get('element') : child;
+ this.get('element').removeChild(child);
+ return true;
+ },
+
+ /**
+ * Wrapper for HTMLElement method.
+ * @method replaceChild
+ * @param {HTMLElement} newNode The HTMLElement to insert
+ * @param {HTMLElement} oldNode The HTMLElement to replace
+ */
+ replaceChild: function(newNode, oldNode) {
+ newNode = newNode.get ? newNode.get('element') : newNode;
+ oldNode = oldNode.get ? oldNode.get('element') : oldNode;
+ return this.get('element').replaceChild(newNode, oldNode);
+ },
+
+
+ /**
+ * Registers Element specific attributes.
+ * @method initAttributes
+ * @param {Object} map A key-value map of initial attribute configs
+ */
+ initAttributes: function(map) {
+ },
+
+ /**
+ * Adds a listener for the given event. These may be DOM or
+ * customEvent listeners. Any event that is fired via fireEvent
+ * can be listened for. All handlers receive an event object.
+ * @method addListener
+ * @param {String} type The name of the event to listen for
+ * @param {Function} fn The handler to call when the event fires
+ * @param {Any} obj A variable to pass to the handler
+ * @param {Object} scope The object to use for the scope of the handler
+ */
+ addListener: function(type, fn, obj, scope) {
+ var el = this.get('element');
+ scope = scope || this;
+
+ el = this.get('id') || el;
+ var self = this;
+ if (!this._events[type]) { // create on the fly
+ if ( this.DOM_EVENTS[type] ) {
+ YAHOO.util.Event.addListener(el, type, function(e) {
+ if (e.srcElement && !e.target) { // supplement IE with target
+ e.target = e.srcElement;
+ }
+ self.fireEvent(type, e);
+ }, obj, scope);
+ }
+
+ this.createEvent(type, this);
+ this._events[type] = true;
+ }
+
+ this.subscribe.apply(this, arguments); // notify via customEvent
+ },
+
+
+ /**
+ * Alias for addListener
+ * @method on
+ * @param {String} type The name of the event to listen for
+ * @param {Function} fn The function call when the event fires
+ * @param {Any} obj A variable to pass to the handler
+ * @param {Object} scope The object to use for the scope of the handler
+ */
+ on: function() { this.addListener.apply(this, arguments); },
+
+
+ /**
+ * Remove an event listener
+ * @method removeListener
+ * @param {String} type The name of the event to listen for
+ * @param {Function} fn The function call when the event fires
+ */
+ removeListener: function(type, fn) {
+ this.unsubscribe.apply(this, arguments);
+ },
+
+ /**
+ * Wrapper for Dom method.
+ * @method addClass
+ * @param {String} className The className to add
+ */
+ addClass: function(className) {
+ Dom.addClass(this.get('element'), className);
+ },
+
+ /**
+ * Wrapper for Dom method.
+ * @method getElementsByClassName
+ * @param {String} className The className to collect
+ * @param {String} tag (optional) The tag to use in
+ * conjunction with class name
+ * @return {Array} Array of HTMLElements
+ */
+ getElementsByClassName: function(className, tag) {
+ return Dom.getElementsByClassName(className, tag,
+ this.get('element') );
+ },
+
+ /**
+ * Wrapper for Dom method.
+ * @method hasClass
+ * @param {String} className The className to add
+ * @return {Boolean} Whether or not the element has the class name
+ */
+ hasClass: function(className) {
+ return Dom.hasClass(this.get('element'), className);
+ },
+
+ /**
+ * Wrapper for Dom method.
+ * @method removeClass
+ * @param {String} className The className to remove
+ */
+ removeClass: function(className) {
+ return Dom.removeClass(this.get('element'), className);
+ },
+
+ /**
+ * Wrapper for Dom method.
+ * @method replaceClass
+ * @param {String} oldClassName The className to replace
+ * @param {String} newClassName The className to add
+ */
+ replaceClass: function(oldClassName, newClassName) {
+ return Dom.replaceClass(this.get('element'),
+ oldClassName, newClassName);
+ },
+
+ /**
+ * Wrapper for Dom method.
+ * @method setStyle
+ * @param {String} property The style property to set
+ * @param {String} value The value to apply to the style property
+ */
+ setStyle: function(property, value) {
+ var el = this.get('element');
+ if (!el) {
+ return this._queue[this._queue.length] = ['setStyle', arguments];
+ }
+
+ return Dom.setStyle(el, property, value); // TODO: always queuing?
+ },
+
+ /**
+ * Wrapper for Dom method.
+ * @method getStyle
+ * @param {String} property The style property to retrieve
+ * @return {String} The current value of the property
+ */
+ getStyle: function(property) {
+ return Dom.getStyle(this.get('element'), property);
+ },
+
+ /**
+ * Apply any queued set calls.
+ * @method fireQueue
+ */
+ fireQueue: function() {
+ var queue = this._queue;
+ for (var i = 0, len = queue.length; i < len; ++i) {
+ this[queue[i][0]].apply(this, queue[i][1]);
+ }
+ },
+
+ /**
+ * Appends the HTMLElement into either the supplied parentNode.
+ * @method appendTo
+ * @param {HTMLElement | Element} parentNode The node to append to
+ * @param {HTMLElement | Element} before An optional node to insert before
+ */
+ appendTo: function(parent, before) {
+ parent = (parent.get) ? parent.get('element') : Dom.get(parent);
+
+ this.fireEvent('beforeAppendTo', {
+ type: 'beforeAppendTo',
+ target: parent
+ });
+
+
+ before = (before && before.get) ?
+ before.get('element') : Dom.get(before);
+ var element = this.get('element');
+
+ if (!element) {
+ return false;
+ }
+
+ if (!parent) {
+ return false;
+ }
+
+ if (element.parent != parent) {
+ if (before) {
+ parent.insertBefore(element, before);
+ } else {
+ parent.appendChild(element);
+ }
+ }
+
+
+ this.fireEvent('appendTo', {
+ type: 'appendTo',
+ target: parent
+ });
+ },
+
+ get: function(key) {
+ var configs = this._configs || {};
+ var el = configs.element; // avoid loop due to 'element'
+ if (el && !configs[key] && !YAHOO.lang.isUndefined(el.value[key]) ) {
+ return el.value[key];
+ }
+
+ return AttributeProvider.prototype.get.call(this, key);
+ },
+
+ set: function(key, value, silent) {
+ var el = this.get('element');
+ if (!el) {
+ this._queue[this._queue.length] = ['set', arguments];
+ if (this._configs[key]) {
+ this._configs[key].value = value; // so "get" works while queueing
+
+ }
+ return;
+ }
+
+ // set it on the element if not configured and is an HTML attribute
+ if ( !this._configs[key] && !YAHOO.lang.isUndefined(el[key]) ) {
+ _registerHTMLAttr.call(this, key);
+ }
+
+ return AttributeProvider.prototype.set.apply(this, arguments);
+ },
+
+ setAttributeConfig: function(key, map, init) {
+ var el = this.get('element');
+
+ if (el && !this._configs[key] && !YAHOO.lang.isUndefined(el[key]) ) {
+ _registerHTMLAttr.call(this, key, map);
+ } else {
+ AttributeProvider.prototype.setAttributeConfig.apply(this, arguments);
+ }
+ },
+
+ getAttributeKeys: function() {
+ var el = this.get('element');
+ var keys = AttributeProvider.prototype.getAttributeKeys.call(this);
+
+ //add any unconfigured element keys
+ for (var key in el) {
+ if (!this._configs[key]) {
+ keys[key] = keys[key] || el[key];
+ }
+ }
+
+ return keys;
+ },
+
+ init: function(el, attr) {
+ _initElement.apply(this, arguments);
+ }
+};
+
+var _initElement = function(el, attr) {
+ this._queue = this._queue || [];
+ this._events = this._events || {};
+ this._configs = this._configs || {};
+ attr = attr || {};
+ attr.element = attr.element || el || null;
+
+ this.DOM_EVENTS = {
+ 'click': true,
+ 'dblclick': true,
+ 'keydown': true,
+ 'keypress': true,
+ 'keyup': true,
+ 'mousedown': true,
+ 'mousemove': true,
+ 'mouseout': true,
+ 'mouseover': true,
+ 'mouseup': true,
+ 'focus': true,
+ 'blur': true,
+ 'submit': true
+ };
+
+ if (YAHOO.lang.isString(el) ) { // defer until available/ready
+ _registerHTMLAttr.call(this, 'id', { value: attr.element });
+ }
+
+ if (Dom.get(el)) {
+ _availableHandler.call(this, attr);
+ _readyHandler.call(this, attr);
+ return; // note return
+ }
+
+ YAHOO.util.Event.onAvailable(attr.element, function() {
+ _availableHandler.call(this, attr);
+ }, this, true);
+
+ YAHOO.util.Event.onContentReady(attr.element, function() {
+ _readyHandler.call(this, attr);
+ }, this, true);
+};
+
+var _availableHandler = function(attr) {
+ attr.element = Dom.get(attr.element);
+
+ /**
+ * The HTMLElement the Element instance refers to.
+ * @config element
+ * @type HTMLElement
+ */
+ this.setAttributeConfig('element', {
+ value: attr.element,
+ readOnly: true
+ });
+
+ this.fireEvent('available', {
+ type: 'available',
+ target: attr.element
+ });
+};
+
+var _readyHandler = function(attr) {
+ this.initAttributes(attr);
+ this.setAttributes(attr, true);
+ this.fireQueue();
+
+ this.fireEvent('contentReady', {
+ type: 'contentReady',
+ target: attr.element
+ });
+};
+
+/**
+ * Sets the value of the property and fires beforeChange and change events.
+ * @private
+ * @method _registerHTMLAttr
+ * @param {YAHOO.util.Element} element The Element instance to
+ * register the config to.
+ * @param {String} key The name of the config to register
+ * @param {Object} map A key-value map of the config's params
+ */
+var _registerHTMLAttr = function(key, map) {
+ var el = this.get('element');
+ map = map || {};
+ map.name = key;
+ map.method = map.method || function(value) {
+ el[key] = value;
+ };
+ map.value = map.value || el[key];
+ this._configs[key] = new YAHOO.util.Attribute(map, this);
+};
+
+/**
+ * Fires when the Element's HTMLElement can be retrieved by Id.
+ * See: Element.addListener
+ * Event fields:
+ * <String> type available
+ * <HTMLElement>
+ * target the HTMLElement bound to this Element instance
+ *
Usage:
+ * var handler = function(e) {var target = e.target};
+ * myTabs.addListener('available', handler);
+ * @event available
+ */
+
+/**
+ * Fires when the Element's HTMLElement subtree is rendered.
+ * See: Element.addListener
+ * Event fields:
+ * <String> type contentReady
+ * <HTMLElement>
+ * target the HTMLElement bound to this Element instance
+ *
Usage:
+ * var handler = function(e) {var target = e.target};
+ * myTabs.addListener('contentReady', handler);
+ * @event contentReady
+ */
+
+
+YAHOO.augment(YAHOO.util.Element, AttributeProvider);
+})();
+
+YAHOO.register("element", YAHOO.util.Element, {version: "2.2.1", build: "193"});
Modified: jifty/trunk/share/web/static/js/yui/event.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/event.js (original)
+++ jifty/trunk/share/web/static/js/yui/event.js Thu Apr 12 03:32:44 2007
@@ -1,1771 +1,2183 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 0.12.1
-*/
-
-/**
- * The CustomEvent class lets you define events for your application
- * that can be subscribed to by one or more independent component.
- *
- * @param {String} type The type of event, which is passed to the callback
- * when the event fires
- * @param {Object} oScope The context the event will fire from. "this" will
- * refer to this object in the callback. Default value:
- * the window object. The listener can override this.
- * @param {boolean} silent pass true to prevent the event from writing to
- * the debugsystem
- * @param {int} signature the signature that the custom event subscriber
- * will receive. YAHOO.util.CustomEvent.LIST or
- * YAHOO.util.CustomEvent.FLAT. The default is
- * YAHOO.util.CustomEvent.LIST.
- * @namespace YAHOO.util
- * @class CustomEvent
- * @constructor
- */
-YAHOO.util.CustomEvent = function(type, oScope, silent, signature) {
-
- /**
- * The type of event, returned to subscribers when the event fires
- * @property type
- * @type string
- */
- this.type = type;
-
- /**
- * The scope the the event will fire from by default. Defaults to the window
- * obj
- * @property scope
- * @type object
- */
- this.scope = oScope || window;
-
- /**
- * By default all custom events are logged in the debug build, set silent
- * to true to disable debug outpu for this event.
- * @property silent
- * @type boolean
- */
- this.silent = silent;
-
- /**
- * Custom events support two styles of arguments provided to the event
- * subscribers.
- *
- * YAHOO.util.CustomEvent.LIST:
- *
- * param1: event name
- * param2: array of arguments sent to fire
- * param3: a custom object supplied by the subscriber
- *
- *
- * YAHOO.util.CustomEvent.FLAT
- *
- * param1: the first argument passed to fire. If you need to
- * pass multiple parameters, use and array or object literal
- * param2: a custom object supplied by the subscriber
- *
- *
- *
- * @property signature
- * @type int
- */
- this.signature = signature || YAHOO.util.CustomEvent.LIST;
-
- /**
- * The subscribers to this event
- * @property subscribers
- * @type Subscriber[]
- */
- this.subscribers = [];
-
- if (!this.silent) {
- }
-
- var onsubscribeType = "_YUICEOnSubscribe";
-
- // Only add subscribe events for events that are not generated by
- // CustomEvent
- if (type !== onsubscribeType) {
-
- /**
- * Custom events provide a custom event that fires whenever there is
- * a new subscriber to the event. This provides an opportunity to
- * handle the case where there is a non-repeating event that has
- * already fired has a new subscriber.
- *
- * @event subscribeEvent
- * @type YAHOO.util.CustomEvent
- * @param {Function} fn The function to execute
- * @param {Object} obj An object to be passed along when the event
- * fires
- * @param {boolean|Object} override If true, the obj passed in becomes
- * the execution scope of the listener.
- * if an object, that object becomes the
- * the execution scope.
- */
- this.subscribeEvent =
- new YAHOO.util.CustomEvent(onsubscribeType, this, true);
-
- }
-};
-
-/**
- * Subscriber listener sigature constant. The LIST type returns three
- * parameters: the event type, the array of args passed to fire, and
- * the optional custom object
- * @property YAHOO.util.CustomEvent.LIST
- * @static
- * @type int
- */
-YAHOO.util.CustomEvent.LIST = 0;
-
-/**
- * Subscriber listener sigature constant. The FLAT type returns two
- * parameters: the first argument passed to fire and the optional
- * custom object
- * @property YAHOO.util.CustomEvent.FLAT
- * @static
- * @type int
- */
-YAHOO.util.CustomEvent.FLAT = 1;
-
-YAHOO.util.CustomEvent.prototype = {
-
- /**
- * Subscribes the caller to this event
- * @method subscribe
- * @param {Function} fn The function to execute
- * @param {Object} obj An object to be passed along when the event
- * fires
- * @param {boolean|Object} override If true, the obj passed in becomes
- * the execution scope of the listener.
- * if an object, that object becomes the
- * the execution scope.
- */
- subscribe: function(fn, obj, override) {
- if (this.subscribeEvent) {
- this.subscribeEvent.fire(fn, obj, override);
- }
-
- this.subscribers.push( new YAHOO.util.Subscriber(fn, obj, override) );
- },
-
- /**
- * Unsubscribes the caller from this event
- * @method unsubscribe
- * @param {Function} fn The function to execute
- * @param {Object} obj The custom object passed to subscribe (optional)
- * @return {boolean} True if the subscriber was found and detached.
- */
- unsubscribe: function(fn, obj) {
- var found = false;
- for (var i=0, len=this.subscribers.length; i
- * The type of event
- * All of the arguments fire() was executed with as an array
- * The custom object (if any) that was passed into the subscribe()
- * method
- *
- * @method fire
- * @param {Object*} arguments an arbitrary set of parameters to pass to
- * the handler.
- * @return {boolean} false if one of the subscribers returned false,
- * true otherwise
- */
- fire: function() {
- var len=this.subscribers.length;
- if (!len && this.silent) {
- return true;
- }
-
- var args=[], ret=true, i;
-
- for (i=0; i 0) {
- param = args[0];
- }
- ret = s.fn.call(scope, param, s.obj);
- } else {
- ret = s.fn.call(scope, this.type, args, s.obj);
- }
- if (false === ret) {
- if (!this.silent) {
- }
-
- //break;
- return false;
- }
- }
- }
-
- return true;
- },
-
- /**
- * Removes all listeners
- * @method unsubscribeAll
- */
- unsubscribeAll: function() {
- for (var i=0, len=this.subscribers.length; i= 0) {
- cacheItem = listeners[index];
- }
-
- if (!el || !cacheItem) {
- return false;
- }
-
-
- if (this.useLegacyEvent(el, sType)) {
- var legacyIndex = this.getLegacyIndex(el, sType);
- var llist = legacyHandlers[legacyIndex];
- if (llist) {
- for (i=0, len=llist.length; i 0);
- }
-
- // onAvailable
- var notAvail = [];
- for (var i=0,len=onAvailStack.length; i 0) {
- for (var i=0,len=listeners.length; i 0) {
- j = listeners.length;
- while (j) {
- index = j-1;
- l = listeners[index];
- if (l) {
- EU.removeListener(l[EU.EL], l[EU.TYPE],
- l[EU.FN], index);
- }
- j = j - 1;
- }
- l=null;
-
- EU.clearCache();
- }
-
- for (i=0,len=legacyEvents.length; i
- *
- * scope: defines the default execution scope. If not defined
- * the default scope will be this instance.
- *
- *
- * silent: if true, the custom event will not generate log messages.
- * This is false by default.
- *
- *
- * onSubscribeCallback: specifies a callback to execute when the
- * event has a new subscriber. This will fire immediately for
- * each queued subscriber if any exist prior to the creation of
- * the event.
- *
- *
- *
- * @return {CustomEvent} the custom event
- *
- */
- createEvent: function(p_type, p_config) {
-
- this.__yui_events = this.__yui_events || {};
- var opts = p_config || {};
- var events = this.__yui_events;
-
- if (events[p_type]) {
- } else {
-
- var scope = opts.scope || this;
- var silent = opts.silent || null;
-
- var ce = new YAHOO.util.CustomEvent(p_type, scope, silent,
- YAHOO.util.CustomEvent.FLAT);
- events[p_type] = ce;
-
- if (opts.onSubscribeCallback) {
- ce.subscribeEvent.subscribe(opts.onSubscribeCallback);
- }
-
- this.__yui_subscribers = this.__yui_subscribers || {};
- var qs = this.__yui_subscribers[p_type];
-
- if (qs) {
- for (var i=0; i
- * The first argument fire() was executed with
- * The custom object (if any) that was passed into the subscribe()
- * method
- *
- * @method fireEvent
- * @param p_type {string} the type, or name of the event
- * @param arguments {Object*} an arbitrary set of parameters to pass to
- * the handler.
- * @return {boolean} the return value from CustomEvent.fire, or null if
- * the custom event does not exist.
- */
- fireEvent: function(p_type, arg1, arg2, etc) {
-
- this.__yui_events = this.__yui_events || {};
- var ce = this.__yui_events[p_type];
-
- if (ce) {
- var args = [];
- for (var i=1; i
+ * YAHOO.util.CustomEvent.LIST:
+ *
+ * param1: event name
+ * param2: array of arguments sent to fire
+ * param3: a custom object supplied by the subscriber
+ *
+ *
+ * YAHOO.util.CustomEvent.FLAT
+ *
+ * param1: the first argument passed to fire. If you need to
+ * pass multiple parameters, use and array or object literal
+ * param2: a custom object supplied by the subscriber
+ *
+ *
+ *
+ * @property signature
+ * @type int
+ */
+ this.signature = signature || YAHOO.util.CustomEvent.LIST;
+
+ /**
+ * The subscribers to this event
+ * @property subscribers
+ * @type Subscriber[]
+ */
+ this.subscribers = [];
+
+ if (!this.silent) {
+ }
+
+ var onsubscribeType = "_YUICEOnSubscribe";
+
+ // Only add subscribe events for events that are not generated by
+ // CustomEvent
+ if (type !== onsubscribeType) {
+
+ /**
+ * Custom events provide a custom event that fires whenever there is
+ * a new subscriber to the event. This provides an opportunity to
+ * handle the case where there is a non-repeating event that has
+ * already fired has a new subscriber.
+ *
+ * @event subscribeEvent
+ * @type YAHOO.util.CustomEvent
+ * @param {Function} fn The function to execute
+ * @param {Object} obj An object to be passed along when the event
+ * fires
+ * @param {boolean|Object} override If true, the obj passed in becomes
+ * the execution scope of the listener.
+ * if an object, that object becomes the
+ * the execution scope.
+ */
+ this.subscribeEvent =
+ new YAHOO.util.CustomEvent(onsubscribeType, this, true);
+
+ }
+};
+
+/**
+ * Subscriber listener sigature constant. The LIST type returns three
+ * parameters: the event type, the array of args passed to fire, and
+ * the optional custom object
+ * @property YAHOO.util.CustomEvent.LIST
+ * @static
+ * @type int
+ */
+YAHOO.util.CustomEvent.LIST = 0;
+
+/**
+ * Subscriber listener sigature constant. The FLAT type returns two
+ * parameters: the first argument passed to fire and the optional
+ * custom object
+ * @property YAHOO.util.CustomEvent.FLAT
+ * @static
+ * @type int
+ */
+YAHOO.util.CustomEvent.FLAT = 1;
+
+YAHOO.util.CustomEvent.prototype = {
+
+ /**
+ * Subscribes the caller to this event
+ * @method subscribe
+ * @param {Function} fn The function to execute
+ * @param {Object} obj An object to be passed along when the event
+ * fires
+ * @param {boolean|Object} override If true, the obj passed in becomes
+ * the execution scope of the listener.
+ * if an object, that object becomes the
+ * the execution scope.
+ */
+ subscribe: function(fn, obj, override) {
+
+ if (!fn) {
+throw new Error("Invalid callback for subscriber to '" + this.type + "'");
+ }
+
+ if (this.subscribeEvent) {
+ this.subscribeEvent.fire(fn, obj, override);
+ }
+
+ this.subscribers.push( new YAHOO.util.Subscriber(fn, obj, override) );
+ },
+
+ /**
+ * Unsubscribes subscribers.
+ * @method unsubscribe
+ * @param {Function} fn The subscribed function to remove, if not supplied
+ * all will be removed
+ * @param {Object} obj The custom object passed to subscribe. This is
+ * optional, but if supplied will be used to
+ * disambiguate multiple listeners that are the same
+ * (e.g., you subscribe many object using a function
+ * that lives on the prototype)
+ * @return {boolean} True if the subscriber was found and detached.
+ */
+ unsubscribe: function(fn, obj) {
+
+ if (!fn) {
+ return this.unsubscribeAll();
+ }
+
+ var found = false;
+ for (var i=0, len=this.subscribers.length; i
+ * The type of event
+ * All of the arguments fire() was executed with as an array
+ * The custom object (if any) that was passed into the subscribe()
+ * method
+ *
+ * @method fire
+ * @param {Object*} arguments an arbitrary set of parameters to pass to
+ * the handler.
+ * @return {boolean} false if one of the subscribers returned false,
+ * true otherwise
+ */
+ fire: function() {
+ var len=this.subscribers.length;
+ if (!len && this.silent) {
+ return true;
+ }
+
+ var args=[], ret=true, i;
+
+ for (i=0; i 0) {
+ param = args[0];
+ }
+ ret = s.fn.call(scope, param, s.obj);
+ } else {
+ ret = s.fn.call(scope, this.type, args, s.obj);
+ }
+ if (false === ret) {
+ if (!this.silent) {
+ }
+
+ //break;
+ return false;
+ }
+ }
+ }
+
+ return true;
+ },
+
+ /**
+ * Removes all listeners
+ * @method unsubscribeAll
+ * @return {int} The number of listeners unsubscribed
+ */
+ unsubscribeAll: function() {
+ for (var i=0, len=this.subscribers.length; i= 0) {
+ cacheItem = listeners[index];
+ }
+
+ if (!el || !cacheItem) {
+ return false;
+ }
+
+
+ if (this.useLegacyEvent(el, sType)) {
+ var legacyIndex = this.getLegacyIndex(el, sType);
+ var llist = legacyHandlers[legacyIndex];
+ if (llist) {
+ for (i=0, len=llist.length; i 0);
+ }
+
+ // onAvailable
+ var notAvail = [];
+
+ var executeItem = function (el, item) {
+ var scope = el;
+ if (item.override) {
+ if (item.override === true) {
+ scope = item.obj;
+ } else {
+ scope = item.override;
+ }
+ }
+ item.fn.call(scope, item.obj);
+ };
+
+ var i,len,item,el;
+
+ // onAvailable
+ for (i=0,len=onAvailStack.length; i 0) {
+ for (var i=0,len=searchList.length; i 0) {
+ j = listeners.length;
+ while (j) {
+ index = j-1;
+ l = listeners[index];
+ if (l) {
+ EU.removeListener(l[EU.EL], l[EU.TYPE],
+ l[EU.FN], index);
+ }
+ j = j - 1;
+ }
+ l=null;
+
+ EU.clearCache();
+ }
+
+ for (i=0,len=legacyEvents.length; i');
+
+ var el = document.getElementById("_yui_eu_dr");
+ el.onreadystatechange = function() {
+ if ("complete" == this.readyState) {
+ this.parentNode.removeChild(this);
+ YAHOO.util.Event._ready();
+ }
+ };
+
+ el=null;
+
+ // Process onAvailable/onContentReady items when when the
+ // DOM is ready.
+ YAHOO.util.Event.onDOMReady(
+ YAHOO.util.Event._tryPreloadAttach,
+ YAHOO.util.Event, true);
+
+ // Safari: The document's readyState in Safari currently will
+ // change to loaded/complete before images are loaded.
+ } else if (EU.webkit) {
+
+ EU._drwatch = setInterval(function(){
+ var rs=document.readyState;
+ if ("loaded" == rs || "complete" == rs) {
+ clearInterval(EU._drwatch);
+ EU._drwatch = null;
+ EU._ready();
+ }
+ }, EU.POLL_INTERVAL);
+
+ // FireFox and Opera: These browsers provide a event for this
+ // moment.
+ } else {
+
+ EU._simpleAdd(document, "DOMContentLoaded", EU._ready);
+
+ }
+ /////////////////////////////////////////////////////////////
+
+ EU._simpleAdd(window, "load", EU._load);
+ EU._simpleAdd(window, "unload", EU._unload);
+ EU._tryPreloadAttach();
+ })();
+}
+/**
+ * EventProvider is designed to be used with YAHOO.augment to wrap
+ * CustomEvents in an interface that allows events to be subscribed to
+ * and fired by name. This makes it possible for implementing code to
+ * subscribe to an event that either has not been created yet, or will
+ * not be created at all.
+ *
+ * @Class EventProvider
+ */
+YAHOO.util.EventProvider = function() { };
+
+YAHOO.util.EventProvider.prototype = {
+
+ /**
+ * Private storage of custom events
+ * @property __yui_events
+ * @type Object[]
+ * @private
+ */
+ __yui_events: null,
+
+ /**
+ * Private storage of custom event subscribers
+ * @property __yui_subscribers
+ * @type Object[]
+ * @private
+ */
+ __yui_subscribers: null,
+
+ /**
+ * Subscribe to a CustomEvent by event type
+ *
+ * @method subscribe
+ * @param p_type {string} the type, or name of the event
+ * @param p_fn {function} the function to exectute when the event fires
+ * @param p_obj
+ * @param p_obj {Object} An object to be passed along when the event
+ * fires
+ * @param p_override {boolean} If true, the obj passed in becomes the
+ * execution scope of the listener
+ */
+ subscribe: function(p_type, p_fn, p_obj, p_override) {
+
+ this.__yui_events = this.__yui_events || {};
+ var ce = this.__yui_events[p_type];
+
+ if (ce) {
+ ce.subscribe(p_fn, p_obj, p_override);
+ } else {
+ this.__yui_subscribers = this.__yui_subscribers || {};
+ var subs = this.__yui_subscribers;
+ if (!subs[p_type]) {
+ subs[p_type] = [];
+ }
+ subs[p_type].push(
+ { fn: p_fn, obj: p_obj, override: p_override } );
+ }
+ },
+
+ /**
+ * Unsubscribes one or more listeners the from the specified event
+ * @method unsubscribe
+ * @param p_type {string} The type, or name of the event
+ * @param p_fn {Function} The subscribed function to unsubscribe, if not
+ * supplied, all subscribers will be removed.
+ * @param p_obj {Object} The custom object passed to subscribe. This is
+ * optional, but if supplied will be used to
+ * disambiguate multiple listeners that are the same
+ * (e.g., you subscribe many object using a function
+ * that lives on the prototype)
+ * @return {boolean} true if the subscriber was found and detached.
+ */
+ unsubscribe: function(p_type, p_fn, p_obj) {
+ this.__yui_events = this.__yui_events || {};
+ var ce = this.__yui_events[p_type];
+ if (ce) {
+ return ce.unsubscribe(p_fn, p_obj);
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Removes all listeners from the specified event
+ * @method unsubscribeAll
+ * @param p_type {string} The type, or name of the event
+ */
+ unsubscribeAll: function(p_type) {
+ return this.unsubscribe(p_type);
+ },
+
+ /**
+ * Creates a new custom event of the specified type. If a custom event
+ * by that name already exists, it will not be re-created. In either
+ * case the custom event is returned.
+ *
+ * @method createEvent
+ *
+ * @param p_type {string} the type, or name of the event
+ * @param p_config {object} optional config params. Valid properties are:
+ *
+ *
+ *
+ * scope: defines the default execution scope. If not defined
+ * the default scope will be this instance.
+ *
+ *
+ * silent: if true, the custom event will not generate log messages.
+ * This is false by default.
+ *
+ *
+ * onSubscribeCallback: specifies a callback to execute when the
+ * event has a new subscriber. This will fire immediately for
+ * each queued subscriber if any exist prior to the creation of
+ * the event.
+ *
+ *
+ *
+ * @return {CustomEvent} the custom event
+ *
+ */
+ createEvent: function(p_type, p_config) {
+
+ this.__yui_events = this.__yui_events || {};
+ var opts = p_config || {};
+ var events = this.__yui_events;
+
+ if (events[p_type]) {
+ } else {
+
+ var scope = opts.scope || this;
+ var silent = opts.silent || null;
+
+ var ce = new YAHOO.util.CustomEvent(p_type, scope, silent,
+ YAHOO.util.CustomEvent.FLAT);
+ events[p_type] = ce;
+
+ if (opts.onSubscribeCallback) {
+ ce.subscribeEvent.subscribe(opts.onSubscribeCallback);
+ }
+
+ this.__yui_subscribers = this.__yui_subscribers || {};
+ var qs = this.__yui_subscribers[p_type];
+
+ if (qs) {
+ for (var i=0; i
+ * The first argument fire() was executed with
+ * The custom object (if any) that was passed into the subscribe()
+ * method
+ *
+ * @method fireEvent
+ * @param p_type {string} the type, or name of the event
+ * @param arguments {Object*} an arbitrary set of parameters to pass to
+ * the handler.
+ * @return {boolean} the return value from CustomEvent.fire, or null if
+ * the custom event does not exist.
+ */
+ fireEvent: function(p_type, arg1, arg2, etc) {
+
+ this.__yui_events = this.__yui_events || {};
+ var ce = this.__yui_events[p_type];
+
+ if (ce) {
+ var args = [];
+ for (var i=1; i -1) {
- return true;
- } else {
- return YAHOO.util.Lang.isObject(val) && val.constructor == Array;
- }
- },
-
- isBoolean: function(val) {
- return typeof val == 'boolean';
- },
-
- isFunction: function(val) {
- return typeof val == 'function';
- },
-
- isNull: function(val) {
- return val === null;
- },
-
- isNumber: function(val) {
- return !isNaN(val);
- },
-
- isObject: function(val) {
- return typeof val == 'object' || YAHOO.util.Lang.isFunction(val);
- },
-
- isString: function(val) {
- return typeof val == 'string';
- },
-
- isUndefined: function(val) {
- return typeof val == 'undefined';
- }
- };
-})();/**
- * Provides Attribute configurations.
- * @namespace YAHOO.util
- * @class Attribute
- * @constructor
- * @param hash {Object} The intial Attribute.
- * @param {YAHOO.util.AttributeProvider} The owner of the Attribute instance.
- */
-
-YAHOO.util.Attribute = function(hash, owner) {
- if (owner) {
- this.owner = owner;
- this.configure(hash, true);
- }
-};
-
-YAHOO.util.Attribute.prototype = {
- /**
- * The name of the attribute.
- * @property name
- * @type String
- */
- name: undefined,
-
- /**
- * The value of the attribute.
- * @property value
- * @type String
- */
- value: null,
-
- /**
- * The owner of the attribute.
- * @property owner
- * @type YAHOO.util.AttributeProvider
- */
- owner: null,
-
- /**
- * Whether or not the attribute is read only.
- * @property readOnly
- * @type Boolean
- */
- readOnly: false,
-
- /**
- * Whether or not the attribute can only be written once.
- * @property writeOnce
- * @type Boolean
- */
- writeOnce: false,
-
- /**
- * The attribute's initial configuration.
- * @private
- * @property _initialConfig
- * @type Object
- */
- _initialConfig: null,
-
- /**
- * Whether or not the attribute's value has been set.
- * @private
- * @property _written
- * @type Boolean
- */
- _written: false,
-
- /**
- * The method to use when setting the attribute's value.
- * The method recieves the new value as the only argument.
- * @property method
- * @type Function
- */
- method: null,
-
- /**
- * The validator to use when setting the attribute's value.
- * @property validator
- * @type Function
- * @return Boolean
- */
- validator: null,
-
- /**
- * Retrieves the current value of the attribute.
- * @method getValue
- * @return {any} The current value of the attribute.
- */
- getValue: function() {
- return this.value;
- },
-
- /**
- * Sets the value of the attribute and fires beforeChange and change events.
- * @method setValue
- * @param {Any} value The value to apply to the attribute.
- * @param {Boolean} silent If true the change events will not be fired.
- * @return {Boolean} Whether or not the value was set.
- */
- setValue: function(value, silent) {
- var beforeRetVal;
- var owner = this.owner;
- var name = this.name;
-
- var event = {
- type: name,
- prevValue: this.getValue(),
- newValue: value
- };
-
- if (this.readOnly || ( this.writeOnce && this._written) ) {
- return false; // write not allowed
- }
-
- if (this.validator && !this.validator.call(owner, value) ) {
- return false; // invalid value
- }
-
- if (!silent) {
- beforeRetVal = owner.fireBeforeChangeEvent(event);
- if (beforeRetVal === false) {
- YAHOO.log('setValue ' + name +
- 'cancelled by beforeChange event', 'info', 'Attribute');
- return false;
- }
- }
-
- if (this.method) {
- this.method.call(owner, value);
- }
-
- this.value = value;
- this._written = true;
-
- event.type = name;
-
- if (!silent) {
- this.owner.fireChangeEvent(event);
- }
-
- return true;
- },
-
- /**
- * Allows for configuring the Attribute's properties.
- * @method configure
- * @param {Object} map A key-value map of Attribute properties.
- * @param {Boolean} init Whether or not this should become the initial config.
- */
- configure: function(map, init) {
- map = map || {};
- this._written = false; // reset writeOnce
- this._initialConfig = this._initialConfig || {};
-
- for (var key in map) {
- if ( key && map.hasOwnProperty(key) ) {
- this[key] = map[key];
- if (init) {
- this._initialConfig[key] = map[key];
- }
- }
- }
- },
-
- /**
- * Resets the value to the initial config value.
- * @method resetValue
- * @return {Boolean} Whether or not the value was set.
- */
- resetValue: function() {
- return this.setValue(this._initialConfig.value);
- },
-
- /**
- * Resets the attribute config to the initial config state.
- * @method resetConfig
- */
- resetConfig: function() {
- this.configure(this._initialConfig);
- },
-
- /**
- * Resets the value to the current value.
- * Useful when values may have gotten out of sync with actual properties.
- * @method refresh
- * @return {Boolean} Whether or not the value was set.
- */
- refresh: function(silent) {
- this.setValue(this.value, silent);
- }
-};(function() {
- var Lang = YAHOO.util.Lang;
-
- /*
- Copyright (c) 2006, Yahoo! Inc. All rights reserved.
- Code licensed under the BSD License:
- http://developer.yahoo.net/yui/license.txt
- */
-
- /**
- * Provides and manages YAHOO.util.Attribute instances
- * @namespace YAHOO.util
- * @class AttributeProvider
- * @uses YAHOO.util.EventProvider
- */
- YAHOO.util.AttributeProvider = function() {};
-
- YAHOO.util.AttributeProvider.prototype = {
-
- /**
- * A key-value map of Attribute configurations
- * @property _configs
- * @protected (may be used by subclasses and augmentors)
- * @private
- * @type {Object}
- */
- _configs: null,
- /**
- * Returns the current value of the attribute.
- * @method get
- * @param {String} key The attribute whose value will be returned.
- */
- get: function(key){
- var configs = this._configs || {};
- var config = configs[key];
-
- if (!config) {
- YAHOO.log(key + ' not found', 'error', 'AttributeProvider');
- return undefined;
- }
-
- return config.value;
- },
-
- /**
- * Sets the value of a config.
- * @method set
- * @param {String} key The name of the attribute
- * @param {Any} value The value to apply to the attribute
- * @param {Boolean} silent Whether or not to suppress change events
- * @return {Boolean} Whether or not the value was set.
- */
- set: function(key, value, silent){
- var configs = this._configs || {};
- var config = configs[key];
-
- if (!config) {
- YAHOO.log('set failed: ' + key + ' not found',
- 'error', 'AttributeProvider');
- return false;
- }
-
- return config.setValue(value, silent);
- },
-
- /**
- * Returns an array of attribute names.
- * @method getAttributeKeys
- * @return {Array} An array of attribute names.
- */
- getAttributeKeys: function(){
- var configs = this._configs;
- var keys = [];
- var config;
- for (var key in configs) {
- config = configs[key];
- if ( configs.hasOwnProperty(key) &&
- !Lang.isUndefined(config) ) {
- keys[keys.length] = key;
- }
- }
-
- return keys;
- },
-
- /**
- * Sets multiple attribute values.
- * @method setAttributes
- * @param {Object} map A key-value map of attributes
- * @param {Boolean} silent Whether or not to suppress change events
- */
- setAttributes: function(map, silent){
- for (var key in map) {
- if ( map.hasOwnProperty(key) ) {
- this.set(key, map[key], silent);
- }
- }
- },
-
- /**
- * Resets the specified attribute's value to its initial value.
- * @method resetValue
- * @param {String} key The name of the attribute
- * @param {Boolean} silent Whether or not to suppress change events
- * @return {Boolean} Whether or not the value was set
- */
- resetValue: function(key, silent){
- var configs = this._configs || {};
- if (configs[key]) {
- this.set(key, configs[key]._initialConfig.value, silent);
- return true;
- }
- return false;
- },
-
- /**
- * Sets the attribute's value to its current value.
- * @method refresh
- * @param {String | Array} key The attribute(s) to refresh
- * @param {Boolean} silent Whether or not to suppress change events
- */
- refresh: function(key, silent){
- var configs = this._configs;
-
- key = ( ( Lang.isString(key) ) ? [key] : key ) ||
- this.getAttributeKeys();
-
- for (var i = 0, len = key.length; i < len; ++i) {
- if ( // only set if there is a value and not null
- configs[key[i]] &&
- ! Lang.isUndefined(configs[key[i]].value) &&
- ! Lang.isNull(configs[key[i]].value) ) {
- configs[key[i]].refresh(silent);
- }
- }
- },
-
- /**
- * Adds an Attribute to the AttributeProvider instance.
- * @method register
- * @param {String} key The attribute's name
- * @param {Object} map A key-value map containing the
- * attribute's properties.
- */
- register: function(key, map) {
- this._configs = this._configs || {};
-
- if (this._configs[key]) { // dont override
- return false;
- }
-
- map.name = key;
- this._configs[key] = new YAHOO.util.Attribute(map, this);
- return true;
- },
-
- /**
- * Returns the attribute's properties.
- * @method getAttributeConfig
- * @param {String} key The attribute's name
- * @private
- * @return {object} A key-value map containing all of the
- * attribute's properties.
- */
- getAttributeConfig: function(key) {
- var configs = this._configs || {};
- var config = configs[key] || {};
- var map = {}; // returning a copy to prevent overrides
-
- for (key in config) {
- if ( config.hasOwnProperty(key) ) {
- map[key] = config[key];
- }
- }
-
- return map;
- },
-
- /**
- * Sets or updates an Attribute instance's properties.
- * @method configureAttribute
- * @param {String} key The attribute's name.
- * @param {Object} map A key-value map of attribute properties
- * @param {Boolean} init Whether or not this should become the intial config.
- */
- configureAttribute: function(key, map, init) {
- var configs = this._configs || {};
-
- if (!configs[key]) {
- YAHOO.log('unable to configure, ' + key + ' not found',
- 'error', 'AttributeProvider');
- return false;
- }
-
- configs[key].configure(map, init);
- },
-
- /**
- * Resets an attribute to its intial configuration.
- * @method resetAttributeConfig
- * @param {String} key The attribute's name.
- * @private
- */
- resetAttributeConfig: function(key){
- var configs = this._configs || {};
- configs[key].resetConfig();
- },
-
- /**
- * Fires the attribute's beforeChange event.
- * @method fireBeforeChangeEvent
- * @param {String} key The attribute's name.
- * @param {Obj} e The event object to pass to handlers.
- */
- fireBeforeChangeEvent: function(e) {
- var type = 'before';
- type += e.type.charAt(0).toUpperCase() + e.type.substr(1) + 'Change';
- e.type = type;
- return this.fireEvent(e.type, e);
- },
-
- /**
- * Fires the attribute's change event.
- * @method fireChangeEvent
- * @param {String} key The attribute's name.
- * @param {Obj} e The event object to pass to the handlers.
- */
- fireChangeEvent: function(e) {
- e.type += 'Change';
- return this.fireEvent(e.type, e);
- }
- };
-
- YAHOO.augment(YAHOO.util.AttributeProvider, YAHOO.util.EventProvider);
-})();(function() {
-// internal shorthand
-var Dom = YAHOO.util.Dom,
- Lang = YAHOO.util.Lang,
- EventPublisher = YAHOO.util.EventPublisher,
- AttributeProvider = YAHOO.util.AttributeProvider;
-
-/**
- * Element provides an interface to an HTMLElement's attributes and common
- * methods. Other commonly used attributes are added as well.
- * @namespace YAHOO.util
- * @class Element
- * @uses YAHOO.util.AttributeProvider
- * @constructor
- * @param el {HTMLElement | String} The html element that
- * represents the Element.
- * @param {Object} map A key-value map of initial config names and values
- */
-YAHOO.util.Element = function(el, map) {
- if (arguments.length) {
- this.init(el, map);
- }
-};
-
-YAHOO.util.Element.prototype = {
- /**
- * Dom events supported by the Element instance.
- * @property DOM_EVENTS
- * @type Object
- */
- DOM_EVENTS: null,
-
- /**
- * Wrapper for HTMLElement method.
- * @method appendChild
- * @param {Boolean} deep Whether or not to do a deep clone
- */
- appendChild: function(child) {
- child = child.get ? child.get('element') : child;
- this.get('element').appendChild(child);
- },
-
- /**
- * Wrapper for HTMLElement method.
- * @method getElementsByTagName
- * @param {String} tag The tagName to collect
- */
- getElementsByTagName: function(tag) {
- return this.get('element').getElementsByTagName(tag);
- },
-
- /**
- * Wrapper for HTMLElement method.
- * @method hasChildNodes
- * @return {Boolean} Whether or not the element has childNodes
- */
- hasChildNodes: function() {
- return this.get('element').hasChildNodes();
- },
-
- /**
- * Wrapper for HTMLElement method.
- * @method insertBefore
- * @param {HTMLElement} element The HTMLElement to insert
- * @param {HTMLElement} before The HTMLElement to insert
- * the element before.
- */
- insertBefore: function(element, before) {
- element = element.get ? element.get('element') : element;
- before = (before && before.get) ? before.get('element') : before;
-
- this.get('element').insertBefore(element, before);
- },
-
- /**
- * Wrapper for HTMLElement method.
- * @method removeChild
- * @param {HTMLElement} child The HTMLElement to remove
- */
- removeChild: function(child) {
- child = child.get ? child.get('element') : child;
- this.get('element').removeChild(child);
- return true;
- },
-
- /**
- * Wrapper for HTMLElement method.
- * @method replaceChild
- * @param {HTMLElement} newNode The HTMLElement to insert
- * @param {HTMLElement} oldNode The HTMLElement to replace
- */
- replaceChild: function(newNode, oldNode) {
- newNode = newNode.get ? newNode.get('element') : newNode;
- oldNode = oldNode.get ? oldNode.get('element') : oldNode;
- return this.get('element').replaceChild(newNode, oldNode);
- },
-
-
- /**
- * Registers Element specific attributes.
- * @method initAttributes
- * @param {Object} map A key-value map of initial attribute configs
- */
- initAttributes: function(map) {
- map = map || {};
- var element = Dom.get(map.element) || null;
-
- /**
- * The HTMLElement the Element instance refers to.
- * @config element
- * @type HTMLElement
- */
- this.register('element', {
- value: element,
- readOnly: true
- });
- },
-
- /**
- * Adds a listener for the given event. These may be DOM or
- * customEvent listeners. Any event that is fired via fireEvent
- * can be listened for. All handlers receive an event object.
- * @method addListener
- * @param {String} type The name of the event to listen for
- * @param {Function} fn The handler to call when the event fires
- * @param {Any} obj A variable to pass to the handler
- * @param {Object} scope The object to use for the scope of the handler
- */
- addListener: function(type, fn, obj, scope) {
- var el = this.get('element');
- var scope = scope || this;
-
- el = this.get('id') || el;
-
- if (!this._events[type]) { // create on the fly
- if ( this.DOM_EVENTS[type] ) {
- YAHOO.util.Event.addListener(el, type, function(e) {
- if (e.srcElement && !e.target) { // supplement IE with target
- e.target = e.srcElement;
- }
- this.fireEvent(type, e);
- }, obj, scope);
- }
-
- this.createEvent(type, this);
- this._events[type] = true;
- }
-
- this.subscribe.apply(this, arguments); // notify via customEvent
- },
-
-
- /**
- * Alias for addListener
- * @method on
- * @param {String} type The name of the event to listen for
- * @param {Function} fn The function call when the event fires
- * @param {Any} obj A variable to pass to the handler
- * @param {Object} scope The object to use for the scope of the handler
- */
- on: function() { this.addListener.apply(this, arguments); },
-
-
- /**
- * Remove an event listener
- * @method removeListener
- * @param {String} type The name of the event to listen for
- * @param {Function} fn The function call when the event fires
- */
- removeListener: function(type, fn) {
- this.unsubscribe.apply(this, arguments);
- },
-
- /**
- * Wrapper for Dom method.
- * @method addClass
- * @param {String} className The className to add
- */
- addClass: function(className) {
- Dom.addClass(this.get('element'), className);
- },
-
- /**
- * Wrapper for Dom method.
- * @method getElementsByClassName
- * @param {String} className The className to collect
- * @param {String} tag (optional) The tag to use in
- * conjunction with class name
- * @return {Array} Array of HTMLElements
- */
- getElementsByClassName: function(className, tag) {
- return Dom.getElementsByClassName(className, tag,
- this.get('element') );
- },
-
- /**
- * Wrapper for Dom method.
- * @method hasClass
- * @param {String} className The className to add
- * @return {Boolean} Whether or not the element has the class name
- */
- hasClass: function(className) {
- return Dom.hasClass(this.get('element'), className);
- },
-
- /**
- * Wrapper for Dom method.
- * @method removeClass
- * @param {String} className The className to remove
- */
- removeClass: function(className) {
- return Dom.removeClass(this.get('element'), className);
- },
-
- /**
- * Wrapper for Dom method.
- * @method replaceClass
- * @param {String} oldClassName The className to replace
- * @param {String} newClassName The className to add
- */
- replaceClass: function(oldClassName, newClassName) {
- return Dom.replaceClass(this.get('element'),
- oldClassName, newClassName);
- },
-
- /**
- * Wrapper for Dom method.
- * @method setStyle
- * @param {String} property The style property to set
- * @param {String} value The value to apply to the style property
- */
- setStyle: function(property, value) {
- return Dom.setStyle(this.get('element'), property, value);
- },
-
- /**
- * Wrapper for Dom method.
- * @method getStyle
- * @param {String} property The style property to retrieve
- * @return {String} The current value of the property
- */
- getStyle: function(property) {
- return Dom.getStyle(this.get('element'), property);
- },
-
- /**
- * Apply any queued set calls.
- * @method fireQueue
- */
- fireQueue: function() {
- var queue = this._queue;
- for (var i = 0, len = queue.length; i < len; ++i) {
- this[queue[i][0]].apply(this, queue[i][1]);
- }
- },
-
- /**
- * Appends the HTMLElement into either the supplied parentNode.
- * @method appendTo
- * @param {HTMLElement | Element} parentNode The node to append to
- * @param {HTMLElement | Element} before An optional node to insert before
- */
- appendTo: function(parent, before) {
- parent = (parent.get) ? parent.get('element') : Dom.get(parent);
-
- before = (before && before.get) ?
- before.get('element') : Dom.get(before);
- var element = this.get('element');
-
- var newAddition = !Dom.inDocument(element);
-
- if (!element) {
- YAHOO.log('appendTo failed: element not available',
- 'error', 'Element');
- return false;
- }
-
- if (!parent) {
- YAHOO.log('appendTo failed: parent not available',
- 'error', 'Element');
- return false;
- }
-
- if (element.parent != parent) {
- if (before) {
- parent.insertBefore(element, before);
- } else {
- parent.appendChild(element);
- }
- }
-
- YAHOO.log(element + 'appended to ' + parent);
-
- if (!newAddition) {
- return false; // note return; no refresh if in document
- }
-
- // if a new addition, refresh HTMLElement any applied attributes
- var keys = this.getAttributeKeys();
-
- for (var key in keys) { // only refresh HTMLElement attributes
- if ( !Lang.isUndefined(element[key]) ) {
- this.refresh(key);
- }
- }
- },
-
- get: function(key) {
- var configs = this._configs || {};
- var el = configs.element; // avoid loop due to 'element'
- if (el && !configs[key] && !Lang.isUndefined(el.value[key]) ) {
- return el.value[key];
- }
-
- return AttributeProvider.prototype.get.call(this, key);
- },
-
- set: function(key, value, silent) {
- var el = this.get('element');
- if (!el) {
- this._queue[key] = ['set', arguments];
- return false;
- }
-
- // set it on the element if not a property
- if ( !this._configs[key] && !Lang.isUndefined(el[key]) ) {
- _registerHTMLAttr(this, key);
- }
-
- return AttributeProvider.prototype.set.apply(this, arguments);
- },
-
- register: function(key) { // protect html attributes
- var configs = this._configs || {};
- var element = this.get('element') || null;
-
- if ( element && !Lang.isUndefined(element[key]) ) {
- YAHOO.log(key + ' is reserved for ' + element,
- 'error', 'Element');
- return false;
- }
-
- return AttributeProvider.prototype.register.apply(this, arguments);
- },
-
- configureAttribute: function(property, map, init) { // protect html attributes
- if (!this._configs[property] && this._configs.element &&
- !Lang.isUndefined(this._configs.element[property]) ) {
- _registerHTMLAttr(this, property, map);
- return false;
- }
-
- return AttributeProvider.prototype.configure.apply(this, arguments);
- },
-
- getAttributeKeys: function() {
- var el = this.get('element');
- var keys = AttributeProvider.prototype.getAttributeKeys.call(this);
-
- //add any unconfigured element keys
- for (var key in el) {
- if (!this._configs[key]) {
- keys[key] = keys[key] || el[key];
- }
- }
-
- return keys;
- },
-
- init: function(el, attr) {
- this._queue = this._queue || [];
- this._events = this._events || {};
- this._configs = this._configs || {};
- attr = attr || {};
- attr.element = attr.element || el || null;
-
- this.DOM_EVENTS = {
- 'click': true,
- 'keydown': true,
- 'keypress': true,
- 'keyup': true,
- 'mousedown': true,
- 'mousemove': true,
- 'mouseout': true,
- 'mouseover': true,
- 'mouseup': true
- };
-
- var readyHandler = function() {
- this.initAttributes(attr);
-
- this.setAttributes(attr, true);
- this.fireQueue();
- this.fireEvent('contentReady', {
- type: 'contentReady',
- target: attr.element
- });
- };
-
- if ( Lang.isString(el) ) {
- _registerHTMLAttr(this, 'id', { value: el });
- YAHOO.util.Event.onAvailable(el, function() {
- attr.element = Dom.get(el);
- this.fireEvent('available', {
- type: 'available',
- target: attr.element
- });
- }, this, true);
-
- YAHOO.util.Event.onContentReady(el, function() {
- readyHandler.call(this);
- }, this, true);
- } else {
- readyHandler.call(this);
- }
- }
-};
-
-/**
- * Sets the value of the property and fires beforeChange and change events.
- * @private
- * @method _registerHTMLAttr
- * @param {YAHOO.util.Element} element The Element instance to
- * register the config to.
- * @param {String} key The name of the config to register
- * @param {Object} map A key-value map of the config's params
- */
-var _registerHTMLAttr = function(self, key, map) {
- var el = self.get('element');
- map = map || {};
- map.name = key;
- map.method = map.method || function(value) {
- el[key] = value;
- };
- map.value = map.value || el[key];
- self._configs[key] = new YAHOO.util.Attribute(map, self);
-};
-
-/**
- * Fires when the Element's HTMLElement can be retrieved by Id.
- * See: Element.addListener
- * Event fields:
- * <String> type available
- * <HTMLElement>
- * target the HTMLElement bound to this Element instance
- *
Usage:
- * var handler = function(e) {var target = e.target};
- * myTabs.addListener('available', handler);
- * @event available
- */
-
-/**
- * Fires when the Element's HTMLElement subtree is rendered.
- * See: Element.addListener
- * Event fields:
- * <String> type contentReady
- * <HTMLElement>
- * target the HTMLElement bound to this Element instance
- *
Usage:
- * var handler = function(e) {var target = e.target};
- * myTabs.addListener('contentReady', handler);
- * @event contentReady
- */
-
-YAHOO.augment(YAHOO.util.Element, AttributeProvider);
-})();(function() {
- var Dom = YAHOO.util.Dom,
- Event = YAHOO.util.Event,
- Lang = YAHOO.util.Lang;
-
- /**
- * A representation of a Tab's label and content.
- * @namespace YAHOO.widget
- * @class Tab
- * @extends YAHOO.util.Element
- * @constructor
- * @param element {HTMLElement | String} (optional) The html element that
- * represents the TabView. An element will be created if none provided.
- * @param {Object} properties A key map of initial properties
- */
- Tab = function(el, attr) {
- attr = attr || {};
- if (arguments.length == 1 && !Lang.isString(el) && !el.nodeName) {
- attr = el;
- el = attr.element;
- }
-
- if (!el && !attr.element) {
- el = _createTabElement.call(this, attr);
- }
-
- this.loadHandler = {
- success: function(o) {
- this.set('content', o.responseText);
- },
- failure: function(o) {
- YAHOO.log('loading failed: ' + o.statusText,
- 'error', 'Tab');
- }
- };
-
- Tab.superclass.constructor.call(this, el, attr);
-
- this.DOM_EVENTS = {}; // delegating to tabView
- };
-
- YAHOO.extend(Tab, YAHOO.util.Element);
- var proto = Tab.prototype;
-
- /**
- * The default tag name for a Tab's inner element.
- * @property LABEL_INNER_TAGNAME
- * @type String
- * @default "em"
- */
- proto.LABEL_TAGNAME = 'em';
-
- /**
- * The class name applied to active tabs.
- * @property ACTIVE_CLASSNAME
- * @type String
- * @default "on"
- */
- proto.ACTIVE_CLASSNAME = 'selected';
-
- /**
- * The class name applied to disabled tabs.
- * @property DISABLED_CLASSNAME
- * @type String
- * @default "disabled"
- */
- proto.DISABLED_CLASSNAME = 'disabled';
-
- /**
- * The class name applied to dynamic tabs while loading.
- * @property LOADING_CLASSNAME
- * @type String
- * @default "disabled"
- */
- proto.LOADING_CLASSNAME = 'loading';
-
- /**
- * Provides a reference to the connection request object when data is
- * loaded dynamically.
- * @property dataConnection
- * @type Object
- */
- proto.dataConnection = null;
-
- /**
- * Object containing success and failure callbacks for loading data.
- * @property loadHandler
- * @type object
- */
- proto.loadHandler = null;
-
- /**
- * Provides a readable name for the tab.
- * @method toString
- * @return String
- */
- proto.toString = function() {
- var el = this.get('element');
- var id = el.id || el.tagName;
- return "Tab " + id;
- };
-
- /**
- * Registers TabView specific properties.
- * @method initAttributes
- * @param {Object} attr Hash of initial attributes
- */
- proto.initAttributes = function(attr) {
- attr = attr || {};
- Tab.superclass.initAttributes.call(this, attr);
-
- var el = this.get('element');
-
- /**
- * The event that triggers the tab's activation.
- * @config activationEvent
- * @type String
- */
- this.register('activationEvent', {
- value: attr.activationEvent || 'click'
- });
-
- /**
- * The element that contains the tab's label.
- * @config labelEl
- * @type HTMLElement
- */
- this.register('labelEl', {
- value: attr.labelEl || _getlabelEl.call(this),
- method: function(value) {
- var current = this.get('labelEl');
-
- if (current) {
- if (current == value) {
- return false; // already set
- }
-
- this.replaceChild(value, current);
- } else if (el.firstChild) { // ensure label is firstChild by default
- this.insertBefore(value, el.firstChild);
- } else {
- this.appendChild(value);
- }
- }
- });
-
- /**
- * The tab's label text (or innerHTML).
- * @config label
- * @type String
- */
- this.register('label', {
- value: attr.label || _getLabel.call(this),
- method: function(value) {
- var labelEl = this.get('labelEl');
- if (!labelEl) { // create if needed
- this.set('labelEl', _createlabelEl.call(this));
- }
-
- _setLabel.call(this, value);
- }
- });
-
- /**
- * The HTMLElement that contains the tab's content.
- * @config contentEl
- * @type HTMLElement
- */
- this.register('contentEl', { // TODO: apply className?
- value: attr.contentEl || document.createElement('div'),
- method: function(value) {
- var current = this.get('contentEl');
-
- if (current) {
- if (current == value) {
- return false; // already set
- }
- this.replaceChild(value, current);
- }
- }
- });
-
- /**
- * The tab's content.
- * @config content
- * @type String
- */
- this.register('content', {
- value: attr.content, // TODO: what about existing?
- method: function(value) {
- this.get('contentEl').innerHTML = value;
- }
- });
-
- var _dataLoaded = false;
-
- /**
- * The tab's data source, used for loading content dynamically.
- * @config dataSrc
- * @type String
- */
- this.register('dataSrc', {
- value: attr.dataSrc
- });
-
- /**
- * Whether or not content should be reloaded for every view.
- * @config cacheData
- * @type Boolean
- * @default false
- */
- this.register('cacheData', {
- value: attr.cacheData || false,
- validator: Lang.isBoolean
- });
-
- /**
- * The method to use for the data request.
- * @config loadMethod
- * @type String
- * @default "GET"
- */
- this.register('loadMethod', {
- value: attr.loadMethod || 'GET',
- validator: Lang.isString
- });
-
- /**
- * Whether or not any data has been loaded from the server.
- * @config dataLoaded
- * @type Boolean
- */
- this.register('dataLoaded', {
- value: false,
- validator: Lang.isBoolean,
- writeOnce: true
- });
-
- /**
- * Number if milliseconds before aborting and calling failure handler.
- * @config dataTimeout
- * @type Number
- * @default null
- */
- this.register('dataTimeout', {
- value: attr.dataTimeout || null,
- validator: Lang.isNumber
- });
-
- /**
- * Whether or not the tab is currently active.
- * If a dataSrc is set for the tab, the content will be loaded from
- * the given source.
- * @config active
- * @type Boolean
- */
- this.register('active', {
- value: attr.active || this.hasClass(this.ACTIVE_CLASSNAME),
- method: function(value) {
- if (value === true) {
- this.addClass(this.ACTIVE_CLASSNAME);
- this.set('title', 'active');
- } else {
- this.removeClass(this.ACTIVE_CLASSNAME);
- this.set('title', '');
- }
- },
- validator: function(value) {
- return Lang.isBoolean(value) && !this.get('disabled') ;
- }
- });
-
- /**
- * Whether or not the tab is disabled.
- * @config disabled
- * @type Boolean
- */
- this.register('disabled', {
- value: attr.disabled || this.hasClass(this.DISABLED_CLASSNAME),
- method: function(value) {
- if (value === true) {
- Dom.addClass(this.get('element'), this.DISABLED_CLASSNAME);
- } else {
- Dom.removeClass(this.get('element'), this.DISABLED_CLASSNAME);
- }
- },
- validator: Lang.isBoolean
- });
-
- /**
- * The href of the tab's anchor element.
- * @config href
- * @type String
- * @default '#'
- */
- this.register('href', {
- value: attr.href || '#',
- method: function(value) {
- this.getElementsByTagName('a')[0].href = value;
- },
- validator: Lang.isString
- });
-
- /**
- * The Whether or not the tab's content is visible.
- * @config contentVisible
- * @type Boolean
- * @default false
- */
- this.register('contentVisible', {
- value: attr.contentVisible,
- method: function(value) {
- if (value == true) {
- this.get('contentEl').style.display = 'block';
-
- if ( this.get('dataSrc') ) {
- // load dynamic content unless already loaded and caching
- if ( !this.get('dataLoaded') || !this.get('cacheData') ) {
- _dataConnect.call(this);
- }
- }
- } else {
- this.get('contentEl').style.display = 'none';
- }
- },
- validator: Lang.isBoolean
- });
- };
-
- var _createTabElement = function(attr) {
- var el = document.createElement('li');
- var a = document.createElement('a');
-
- a.href = attr.href || '#';
-
- el.appendChild(a);
-
- var label = attr.label || null;
- var labelEl = attr.labelEl || null;
-
- if (labelEl) { // user supplied labelEl
- if (!label) { // user supplied label
- label = _getLabel.call(this, labelEl);
- }
- } else {
- labelEl = _createlabelEl.call(this);
- }
-
- a.appendChild(labelEl);
-
- return el;
- };
-
- var _getlabelEl = function() {
- return this.getElementsByTagName(this.LABEL_TAGNAME)[0];
- };
-
- var _createlabelEl = function() {
- var el = document.createElement(this.LABEL_TAGNAME);
- return el;
- };
-
- var _setLabel = function(label) {
- var el = this.get('labelEl');
- el.innerHTML = label;
- };
-
- var _getLabel = function() {
- var label,
- el = this.get('labelEl');
-
- if (!el) {
- return undefined;
- }
-
- return el.innerHTML;
- };
-
- var _dataConnect = function() {
- if (!YAHOO.util.Connect) {
- YAHOO.log('YAHOO.util.Connect dependency not met',
- 'error', 'Tab');
- return false;
- }
-
- Dom.addClass(this.get('contentEl').parentNode, this.LOADING_CLASSNAME);
-
- this.dataConnection = YAHOO.util.Connect.asyncRequest(
- this.get('loadMethod'),
- this.get('dataSrc'),
- {
- success: function(o) {
- this.loadHandler.success.call(this, o);
- this.set('dataLoaded', true);
- this.dataConnection = null;
- Dom.removeClass(this.get('contentEl').parentNode,
- this.LOADING_CLASSNAME);
- },
- failure: function(o) {
- this.loadHandler.failure.call(this, o);
- this.dataConnection = null;
- Dom.removeClass(this.get('contentEl').parentNode,
- this.LOADING_CLASSNAME);
- },
- scope: this,
- timeout: this.get('dataTimeout')
- }
- );
- };
-
- YAHOO.widget.Tab = Tab;
-
- /**
- * Fires before the active state is changed.
- * See: Element.addListener
- * If handler returns false, the change will be cancelled, and the value will not
- * be set.
- * Event fields:
- * <String> type beforeActiveChange
- * <Boolean>
- * prevValue the current value
- * <Boolean>
- * newValue the new value
- * Usage:
- * var handler = function(e) {var previous = e.prevValue};
- * myTabs.addListener('beforeActiveChange', handler);
- * @event beforeActiveChange
- */
-
- /**
- * Fires after the active state is changed.
- * See: Element.addListener
- * Event fields:
- * <String> type activeChange
- * <Boolean>
- * prevValue the previous value
- * <Boolean>
- * newValue the updated value
- * Usage:
- * var handler = function(e) {var previous = e.prevValue};
- * myTabs.addListener('activeChange', handler);
- * @event activeChange
- */
-
- /**
- * Fires before the tab label is changed.
- * See: Element.addListener
- * If handler returns false, the change will be cancelled, and the value will not
- * be set.
- * Event fields:
- * <String> type beforeLabelChange
- * <String>
- * prevValue the current value
- * <String>
- * newValue the new value
- * Usage:
- * var handler = function(e) {var previous = e.prevValue};
- * myTabs.addListener('beforeLabelChange', handler);
- * @event beforeLabelChange
- */
-
- /**
- * Fires after the tab label is changed.
- * See: Element.addListener
- * Event fields:
- * <String> type labelChange
- * <String>
- * prevValue the previous value
- * <String>
- * newValue the updated value
- * Usage:
- * var handler = function(e) {var previous = e.prevValue};
- * myTabs.addListener('labelChange', handler);
- * @event labelChange
- */
-
- /**
- * Fires before the tab content is changed.
- * See: Element.addListener
- * If handler returns false, the change will be cancelled, and the value will not
- * be set.
- * Event fields:
- * <String> type beforeContentChange
- * <String>
- * prevValue the current value
- * <String>
- * newValue the new value
- * Usage:
- * var handler = function(e) {var previous = e.prevValue};
- * myTabs.addListener('beforeContentChange', handler);
- * @event beforeContentChange
- */
-
- /**
- * Fires after the tab content is changed.
- * See: Element.addListener
- * Event fields:
- * <String> type contentChange
- * <String>
- * prevValue the previous value
- * <Boolean>
- * newValue the updated value
- * Usage:
- * var handler = function(e) {var previous = e.prevValue};
- * myTabs.addListener('contentChange', handler);
- * @event contentChange
- */
-})();(function() {
-
- /**
- * The tabview module provides a widget for managing content bound to tabs.
- * @module tabview
- *
- */
- /**
- * A widget to control tabbed views.
- * @namespace YAHOO.widget
- * @class TabView
- * @extends YAHOO.util.Element
- * @constructor
- * @param {HTMLElement | String | Object} el(optional) The html
- * element that represents the TabView, or the attribute object to use.
- * An element will be created if none provided.
- * @param {Object} attr (optional) A key map of the tabView's
- * initial attributes. Ignored if first arg is attributes object.
- */
- YAHOO.widget.TabView = function(el, attr) {
- attr = attr || {};
- if (arguments.length == 1 && !Lang.isString(el) && !el.nodeName) {
- attr = el; // treat first arg as attr object
- el = attr.element || null;
- }
-
- if (!el && !attr.element) { // create if we dont have one
- el = _createTabViewElement.call(this, attr);
- }
- YAHOO.widget.TabView.superclass.constructor.call(this, el, attr);
- };
-
- YAHOO.extend(YAHOO.widget.TabView, YAHOO.util.Element);
-
- var proto = YAHOO.widget.TabView.prototype;
- var Dom = YAHOO.util.Dom;
- var Lang = YAHOO.util.Lang;
- var Event = YAHOO.util.Event;
- var Tab = YAHOO.widget.Tab;
-
-
- /**
- * The className to add when building from scratch.
- * @property CLASSNAME
- * @default "navset"
- */
- proto.CLASSNAME = 'yui-navset';
-
- /**
- * The className of the HTMLElement containing the TabView's tab elements
- * to look for when building from existing markup, or to add when building
- * from scratch.
- * All childNodes of the tab container are treated as Tabs when building
- * from existing markup.
- * @property TAB_PARENT_CLASSNAME
- * @default "nav"
- */
- proto.TAB_PARENT_CLASSNAME = 'yui-nav';
-
- /**
- * The className of the HTMLElement containing the TabView's label elements
- * to look for when building from existing markup, or to add when building
- * from scratch.
- * All childNodes of the content container are treated as content elements when
- * building from existing markup.
- * @property CONTENT_PARENT_CLASSNAME
- * @default "nav-content"
- */
- proto.CONTENT_PARENT_CLASSNAME = 'yui-content';
-
- proto._tabParent = null;
- proto._contentParent = null;
-
- /**
- * Adds a Tab to the TabView instance.
- * If no index is specified, the tab is added to the end of the tab list.
- * @method addTab
- * @param {YAHOO.widget.Tab} tab A Tab instance to add.
- * @param {Integer} index The position to add the tab.
- * @return void
- */
- proto.addTab = function(tab, index) {
- var tabs = this.get('tabs');
- if (!tabs) { // not ready yet
- this._queue[this._queue.length] = ['addTab', arguments];
- return false;
- }
-
- index = (index === undefined) ? tabs.length : index;
-
- var before = this.getTab(index);
-
- var self = this;
- var el = this.get('element');
- var tabParent = this._tabParent;
- var contentParent = this._contentParent;
-
- var tabElement = tab.get('element');
- var contentEl = tab.get('contentEl');
-
- if ( before ) {
- tabParent.insertBefore(tabElement, before.get('element'));
- } else {
- tabParent.appendChild(tabElement);
- }
-
- if ( contentEl && !Dom.isAncestor(contentParent, contentEl) ) {
- contentParent.appendChild(contentEl);
- }
-
- if ( !tab.get('active') ) {
- tab.set('contentVisible', false, true); /* hide if not active */
- } else {
- this.set('activeTab', tab, true);
-
- }
-
- var activate = function(e) {
- YAHOO.util.Event.preventDefault(e);
- self.set('activeTab', this);
- };
-
- tab.addListener( tab.get('activationEvent'), activate);
-
- tab.addListener('activationEventChange', function(e) {
- if (e.prevValue != e.newValue) {
- tab.removeListener(e.prevValue, activate);
- tab.addListener(e.newValue, activate);
- }
- });
-
- tabs.splice(index, 0, tab);
- };
-
- /**
- * Routes childNode events.
- * @method DOMEventHandler
- * @param {event} e The Dom event that is being handled.
- * @return void
- */
- proto.DOMEventHandler = function(e) {
- var el = this.get('element');
- var target = YAHOO.util.Event.getTarget(e);
- var tabParent = this._tabParent;
-
- if (Dom.isAncestor(tabParent, target) ) {
- var tabEl;
- var tab = null;
- var contentEl;
- var tabs = this.get('tabs');
-
- for (var i = 0, len = tabs.length; i < len; i++) {
- tabEl = tabs[i].get('element');
- contentEl = tabs[i].get('contentEl');
-
- if ( target == tabEl || Dom.isAncestor(tabEl, target) ) {
- tab = tabs[i];
- break; // note break
- }
- }
-
- if (tab) {
- tab.fireEvent(e.type, e);
- }
- }
- };
-
- /**
- * Returns the Tab instance at the specified index.
- * @method getTab
- * @param {Integer} index The position of the Tab.
- * @return YAHOO.widget.Tab
- */
- proto.getTab = function(index) {
- return this.get('tabs')[index];
- };
-
- /**
- * Returns the index of given tab.
- * @method getTabIndex
- * @param {YAHOO.widget.Tab} tab The tab whose index will be returned.
- * @return int
- */
- proto.getTabIndex = function(tab) {
- var index = null;
- var tabs = this.get('tabs');
- for (var i = 0, len = tabs.length; i < len; ++i) {
- if (tab == tabs[i]) {
- index = i;
- break;
- }
- }
-
- return index;
- };
-
- /**
- * Removes the specified Tab from the TabView.
- * @method removeTab
- * @param {YAHOO.widget.Tab} item The Tab instance to be removed.
- * @return void
- */
- proto.removeTab = function(tab) {
- var tabCount = this.get('tabs').length;
-
- var index = this.getTabIndex(tab);
- var nextIndex = index + 1;
- if ( tab == this.get('activeTab') ) { // select next tab
- if (tabCount > 1) {
- if (index + 1 == tabCount) {
- this.set('activeIndex', index - 1);
- } else {
- this.set('activeIndex', index + 1);
- }
- }
- }
-
- this._tabParent.removeChild( tab.get('element') );
- this._contentParent.removeChild( tab.get('contentEl') );
- this._configs.tabs.value.splice(index, 1);
-
- };
-
- /**
- * Provides a readable name for the TabView instance.
- * @method toString
- * @return String
- */
- proto.toString = function() {
- var name = this.get('id') || this.get('tagName');
- return "TabView " + name;
- };
-
- /**
- * The transiton to use when switching between tabs.
- * @method contentTransition
- */
- proto.contentTransition = function(newTab, oldTab) {
- newTab.set('contentVisible', true);
- oldTab.set('contentVisible', false);
- };
-
- /**
- * Registers TabView specific properties.
- * @method initAttributes
- * @param {Object} attr Hash of initial attributes
- */
- proto.initAttributes = function(attr) {
- YAHOO.widget.TabView.superclass.initAttributes.call(this, attr);
-
- if (!attr.orientation) {
- attr.orientation = 'top';
- }
-
- var el = this.get('element');
-
- /**
- * The Tabs belonging to the TabView instance.
- * @config tabs
- * @type Array
- */
- this.register('tabs', {
- value: [],
- readOnly: true
- });
-
- /**
- * The container of the tabView's label elements.
- * @property _tabParent
- * @private
- * @type HTMLElement
- */
- this._tabParent =
- this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,
- 'ul' )[0] || _createTabParent.call(this);
-
- /**
- * The container of the tabView's content elements.
- * @property _contentParent
- * @type HTMLElement
- * @private
- */
- this._contentParent =
- this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,
- 'div')[0] || _createContentParent.call(this);
-
- /**
- * How the Tabs should be oriented relative to the TabView.
- * @config orientation
- * @type String
- * @default "top"
- */
- this.register('orientation', {
- value: attr.orientation,
- method: function(value) {
- var current = this.get('orientation');
- this.addClass('yui-navset-' + value);
-
- if (current != value) {
- this.removeClass('yui-navset-' + current);
- }
-
- switch(value) {
- case 'bottom':
- this.appendChild(this._tabParent);
- break;
- }
- }
- });
-
- /**
- * The index of the tab currently active.
- * @config activeIndex
- * @type Int
- */
- this.register('activeIndex', {
- value: attr.activeIndex,
- method: function(value) {
- this.set('activeTab', this.getTab(value));
- },
- validator: function(value) {
- return !this.getTab(value).get('disabled'); // cannot activate if disabled
- }
- });
-
- /**
- * The tab currently active.
- * @config activeTab
- * @type YAHOO.widget.Tab
- */
- this.register('activeTab', {
- value: attr.activeTab,
- method: function(tab) {
- var activeTab = this.get('activeTab');
-
- if (tab) {
- tab.set('active', true);
- }
-
- if (activeTab && activeTab != tab) {
- activeTab.set('active', false);
- }
-
- if (activeTab && tab != activeTab) { // no transition if only 1
- this.contentTransition(tab, activeTab);
- } else if (tab) {
- tab.set('contentVisible', true);
- }
- },
- validator: function(value) {
- return !value.get('disabled'); // cannot activate if disabled
- }
- });
-
- if ( this._tabParent ) {
- _initTabs.call(this);
- }
-
- for (var type in this.DOM_EVENTS) {
- if ( this.DOM_EVENTS.hasOwnProperty(type) ) {
- this.addListener.call(this, type, this.DOMEventHandler);
- }
- }
- };
-
- /**
- * Creates Tab instances from a collection of HTMLElements.
- * @method createTabs
- * @private
- * @param {Array|HTMLCollection} elements The elements to use for Tabs.
- * @return void
- */
- var _initTabs = function() {
- var tab,
- attr,
- contentEl;
-
- var el = this.get('element');
- var tabs = _getChildNodes(this._tabParent);
- var contentElements = _getChildNodes(this._contentParent);
-
- for (var i = 0, len = tabs.length; i < len; ++i) {
- attr = {};
-
- if (contentElements[i]) {
- attr.contentEl = contentElements[i];
- }
-
- tab = new YAHOO.widget.Tab(tabs[i], attr);
- this.addTab(tab);
-
- if (tab.hasClass(tab.ACTIVE_CLASSNAME) ) {
- this._configs.activeTab.value = tab; // dont invoke method
- }
- }
- };
-
- var _createTabViewElement = function(attr) {
- var el = document.createElement('div');
-
- if ( this.CLASSNAME ) {
- el.className = this.CLASSNAME;
- }
-
- return el;
- };
-
- var _createTabParent = function(attr) {
- var el = document.createElement('ul');
-
- if ( this.TAB_PARENT_CLASSNAME ) {
- el.className = this.TAB_PARENT_CLASSNAME;
- }
-
- this.get('element').appendChild(el);
-
- return el;
- };
-
- var _createContentParent = function(attr) {
- var el = document.createElement('div');
-
- if ( this.CONTENT_PARENT_CLASSNAME ) {
- el.className = this.CONTENT_PARENT_CLASSNAME;
- }
-
- this.get('element').appendChild(el);
-
- return el;
- };
-
- var _getChildNodes = function(el) {
- var nodes = [];
- var childNodes = el.childNodes;
-
- for (var i = 0, len = childNodes.length; i < len; ++i) {
- if (childNodes[i].nodeType == 1) {
- nodes[nodes.length] = childNodes[i];
- }
- }
-
- return nodes;
- };
-
-/**
- * Fires before the activeTab is changed.
- * See: Element.addListener
- * If handler returns false, the change will be cancelled, and the value will not
- * be set.
- * Event fields:
- * <String> type beforeActiveTabChange
- * <YAHOO.widget.Tab >
- * prevValue the currently active tab
- * <YAHOO.widget.Tab >
- * newValue the tab to be made active
- * Usage:
- * var handler = function(e) {var previous = e.prevValue};
- * myTabs.addListener('beforeActiveTabChange', handler);
- * @event beforeActiveTabChange
- */
-
-/**
- * Fires after the activeTab is changed.
- * See: Element.addListener
- * Event fields:
- * <String> type activeTabChange
- * <YAHOO.widget.Tab >
- * prevValue the formerly active tab
- * <YAHOO.widget.Tab >
- * newValue the new active tab
- * Usage:
- * var handler = function(e) {var previous = e.prevValue};
- * myTabs.addListener('activeTabChange', handler);
- * @event activeTabChange
- */
-
-/**
- * Fires before the orientation is changed.
- * See: Element.addListener
- * If handler returns false, the change will be cancelled, and the value will not
- * be set.
- * Event fields:
- * <String> type beforeOrientationChange
- * <String>
- * prevValue the current orientation
- * <String>
- * newValue the new orientation to be applied
- * Usage:
- * var handler = function(e) {var previous = e.prevValue};
- * myTabs.addListener('beforeOrientationChange', handler);
- * @event beforeOrientationChange
- */
-
-/**
- * Fires after the orientation is changed.
- * See: Element.addListener
- * Event fields:
- * <String> type orientationChange
- * <String>
- * prevValue the former orientation
- * <String>
- * newValue the new orientation
- * Usage:
- * var handler = function(e) {var previous = e.prevValue};
- * myTabs.addListener('orientationChange', handler);
- * @event orientationChange
- */
-})();
\ No newline at end of file
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.1
+*/
+(function() {
+
+ /**
+ * The tabview module provides a widget for managing content bound to tabs.
+ * @module tabview
+ * @requires yahoo, dom, event, element
+ *
+ */
+ /**
+ * A widget to control tabbed views.
+ * @namespace YAHOO.widget
+ * @class TabView
+ * @extends YAHOO.util.Element
+ * @constructor
+ * @param {HTMLElement | String | Object} el(optional) The html
+ * element that represents the TabView, or the attribute object to use.
+ * An element will be created if none provided.
+ * @param {Object} attr (optional) A key map of the tabView's
+ * initial attributes. Ignored if first arg is attributes object.
+ */
+ YAHOO.widget.TabView = function(el, attr) {
+ attr = attr || {};
+ if (arguments.length == 1 && !YAHOO.lang.isString(el) && !el.nodeName) {
+ attr = el; // treat first arg as attr object
+ el = attr.element || null;
+ }
+
+ if (!el && !attr.element) { // create if we dont have one
+ el = _createTabViewElement.call(this, attr);
+ }
+ YAHOO.widget.TabView.superclass.constructor.call(this, el, attr);
+ };
+
+ YAHOO.extend(YAHOO.widget.TabView, YAHOO.util.Element);
+
+ var proto = YAHOO.widget.TabView.prototype;
+ var Dom = YAHOO.util.Dom;
+ var Event = YAHOO.util.Event;
+ var Tab = YAHOO.widget.Tab;
+
+
+ /**
+ * The className to add when building from scratch.
+ * @property CLASSNAME
+ * @default "navset"
+ */
+ proto.CLASSNAME = 'yui-navset';
+
+ /**
+ * The className of the HTMLElement containing the TabView's tab elements
+ * to look for when building from existing markup, or to add when building
+ * from scratch.
+ * All childNodes of the tab container are treated as Tabs when building
+ * from existing markup.
+ * @property TAB_PARENT_CLASSNAME
+ * @default "nav"
+ */
+ proto.TAB_PARENT_CLASSNAME = 'yui-nav';
+
+ /**
+ * The className of the HTMLElement containing the TabView's label elements
+ * to look for when building from existing markup, or to add when building
+ * from scratch.
+ * All childNodes of the content container are treated as content elements when
+ * building from existing markup.
+ * @property CONTENT_PARENT_CLASSNAME
+ * @default "nav-content"
+ */
+ proto.CONTENT_PARENT_CLASSNAME = 'yui-content';
+
+ proto._tabParent = null;
+ proto._contentParent = null;
+
+ /**
+ * Adds a Tab to the TabView instance.
+ * If no index is specified, the tab is added to the end of the tab list.
+ * @method addTab
+ * @param {YAHOO.widget.Tab} tab A Tab instance to add.
+ * @param {Integer} index The position to add the tab.
+ * @return void
+ */
+ proto.addTab = function(tab, index) {
+ var tabs = this.get('tabs');
+ if (!tabs) { // not ready yet
+ this._queue[this._queue.length] = ['addTab', arguments];
+ return false;
+ }
+
+ index = (index === undefined) ? tabs.length : index;
+
+ var before = this.getTab(index);
+
+ var self = this;
+ var el = this.get('element');
+ var tabParent = this._tabParent;
+ var contentParent = this._contentParent;
+
+ var tabElement = tab.get('element');
+ var contentEl = tab.get('contentEl');
+
+ if ( before ) {
+ tabParent.insertBefore(tabElement, before.get('element'));
+ } else {
+ tabParent.appendChild(tabElement);
+ }
+
+ if ( contentEl && !Dom.isAncestor(contentParent, contentEl) ) {
+ contentParent.appendChild(contentEl);
+ }
+
+ if ( !tab.get('active') ) {
+ tab.set('contentVisible', false, true); /* hide if not active */
+ } else {
+ this.set('activeTab', tab, true);
+
+ }
+
+ var activate = function(e) {
+ YAHOO.util.Event.preventDefault(e);
+ self.set('activeTab', this);
+ };
+
+ tab.addListener( tab.get('activationEvent'), activate);
+
+ tab.addListener('activationEventChange', function(e) {
+ if (e.prevValue != e.newValue) {
+ tab.removeListener(e.prevValue, activate);
+ tab.addListener(e.newValue, activate);
+ }
+ });
+
+ tabs.splice(index, 0, tab);
+ };
+
+ /**
+ * Routes childNode events.
+ * @method DOMEventHandler
+ * @param {event} e The Dom event that is being handled.
+ * @return void
+ */
+ proto.DOMEventHandler = function(e) {
+ var el = this.get('element');
+ var target = YAHOO.util.Event.getTarget(e);
+ var tabParent = this._tabParent;
+
+ if (Dom.isAncestor(tabParent, target) ) {
+ var tabEl;
+ var tab = null;
+ var contentEl;
+ var tabs = this.get('tabs');
+
+ for (var i = 0, len = tabs.length; i < len; i++) {
+ tabEl = tabs[i].get('element');
+ contentEl = tabs[i].get('contentEl');
+
+ if ( target == tabEl || Dom.isAncestor(tabEl, target) ) {
+ tab = tabs[i];
+ break; // note break
+ }
+ }
+
+ if (tab) {
+ tab.fireEvent(e.type, e);
+ }
+ }
+ };
+
+ /**
+ * Returns the Tab instance at the specified index.
+ * @method getTab
+ * @param {Integer} index The position of the Tab.
+ * @return YAHOO.widget.Tab
+ */
+ proto.getTab = function(index) {
+ return this.get('tabs')[index];
+ };
+
+ /**
+ * Returns the index of given tab.
+ * @method getTabIndex
+ * @param {YAHOO.widget.Tab} tab The tab whose index will be returned.
+ * @return int
+ */
+ proto.getTabIndex = function(tab) {
+ var index = null;
+ var tabs = this.get('tabs');
+ for (var i = 0, len = tabs.length; i < len; ++i) {
+ if (tab == tabs[i]) {
+ index = i;
+ break;
+ }
+ }
+
+ return index;
+ };
+
+ /**
+ * Removes the specified Tab from the TabView.
+ * @method removeTab
+ * @param {YAHOO.widget.Tab} item The Tab instance to be removed.
+ * @return void
+ */
+ proto.removeTab = function(tab) {
+ var tabCount = this.get('tabs').length;
+
+ var index = this.getTabIndex(tab);
+ var nextIndex = index + 1;
+ if ( tab == this.get('activeTab') ) { // select next tab
+ if (tabCount > 1) {
+ if (index + 1 == tabCount) {
+ this.set('activeIndex', index - 1);
+ } else {
+ this.set('activeIndex', index + 1);
+ }
+ }
+ }
+
+ this._tabParent.removeChild( tab.get('element') );
+ this._contentParent.removeChild( tab.get('contentEl') );
+ this._configs.tabs.value.splice(index, 1);
+
+ };
+
+ /**
+ * Provides a readable name for the TabView instance.
+ * @method toString
+ * @return String
+ */
+ proto.toString = function() {
+ var name = this.get('id') || this.get('tagName');
+ return "TabView " + name;
+ };
+
+ /**
+ * The transiton to use when switching between tabs.
+ * @method contentTransition
+ */
+ proto.contentTransition = function(newTab, oldTab) {
+ newTab.set('contentVisible', true);
+ oldTab.set('contentVisible', false);
+ };
+
+ /**
+ * setAttributeConfigs TabView specific properties.
+ * @method initAttributes
+ * @param {Object} attr Hash of initial attributes
+ */
+ proto.initAttributes = function(attr) {
+ YAHOO.widget.TabView.superclass.initAttributes.call(this, attr);
+
+ if (!attr.orientation) {
+ attr.orientation = 'top';
+ }
+
+ var el = this.get('element');
+
+ /**
+ * The Tabs belonging to the TabView instance.
+ * @config tabs
+ * @type Array
+ */
+ this.setAttributeConfig('tabs', {
+ value: [],
+ readOnly: true
+ });
+
+ /**
+ * The container of the tabView's label elements.
+ * @property _tabParent
+ * @private
+ * @type HTMLElement
+ */
+ this._tabParent =
+ this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,
+ 'ul' )[0] || _createTabParent.call(this);
+
+ /**
+ * The container of the tabView's content elements.
+ * @property _contentParent
+ * @type HTMLElement
+ * @private
+ */
+ this._contentParent =
+ this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,
+ 'div')[0] || _createContentParent.call(this);
+
+ /**
+ * How the Tabs should be oriented relative to the TabView.
+ * @config orientation
+ * @type String
+ * @default "top"
+ */
+ this.setAttributeConfig('orientation', {
+ value: attr.orientation,
+ method: function(value) {
+ var current = this.get('orientation');
+ this.addClass('yui-navset-' + value);
+
+ if (current != value) {
+ this.removeClass('yui-navset-' + current);
+ }
+
+ switch(value) {
+ case 'bottom':
+ this.appendChild(this._tabParent);
+ break;
+ }
+ }
+ });
+
+ /**
+ * The index of the tab currently active.
+ * @config activeIndex
+ * @type Int
+ */
+ this.setAttributeConfig('activeIndex', {
+ value: attr.activeIndex,
+ method: function(value) {
+ this.set('activeTab', this.getTab(value));
+ },
+ validator: function(value) {
+ return !this.getTab(value).get('disabled'); // cannot activate if disabled
+ }
+ });
+
+ /**
+ * The tab currently active.
+ * @config activeTab
+ * @type YAHOO.widget.Tab
+ */
+ this.setAttributeConfig('activeTab', {
+ value: attr.activeTab,
+ method: function(tab) {
+ var activeTab = this.get('activeTab');
+
+ if (tab) {
+ tab.set('active', true);
+ this._configs['activeIndex'].value = this.getTabIndex(tab); // keep in sync
+ }
+
+ if (activeTab && activeTab != tab) {
+ activeTab.set('active', false);
+ }
+
+ if (activeTab && tab != activeTab) { // no transition if only 1
+ this.contentTransition(tab, activeTab);
+ } else if (tab) {
+ tab.set('contentVisible', true);
+ }
+ },
+ validator: function(value) {
+ return !value.get('disabled'); // cannot activate if disabled
+ }
+ });
+
+ if ( this._tabParent ) {
+ _initTabs.call(this);
+ }
+
+ for (var type in this.DOM_EVENTS) {
+ if ( YAHOO.lang.hasOwnProperty(this.DOM_EVENTS, type) ) {
+ this.addListener.call(this, type, this.DOMEventHandler);
+ }
+ }
+ };
+
+ /**
+ * Creates Tab instances from a collection of HTMLElements.
+ * @method createTabs
+ * @private
+ * @param {Array|HTMLCollection} elements The elements to use for Tabs.
+ * @return void
+ */
+ var _initTabs = function() {
+ var tab,
+ attr,
+ contentEl;
+
+ var el = this.get('element');
+ var tabs = _getChildNodes(this._tabParent);
+ var contentElements = _getChildNodes(this._contentParent);
+
+ for (var i = 0, len = tabs.length; i < len; ++i) {
+ attr = {};
+
+ if (contentElements[i]) {
+ attr.contentEl = contentElements[i];
+ }
+
+ tab = new YAHOO.widget.Tab(tabs[i], attr);
+ this.addTab(tab);
+
+ if (tab.hasClass(tab.ACTIVE_CLASSNAME) ) {
+ this._configs.activeTab.value = tab; // dont invoke method
+ }
+ }
+ };
+
+ var _createTabViewElement = function(attr) {
+ var el = document.createElement('div');
+
+ if ( this.CLASSNAME ) {
+ el.className = this.CLASSNAME;
+ }
+
+ return el;
+ };
+
+ var _createTabParent = function(attr) {
+ var el = document.createElement('ul');
+
+ if ( this.TAB_PARENT_CLASSNAME ) {
+ el.className = this.TAB_PARENT_CLASSNAME;
+ }
+
+ this.get('element').appendChild(el);
+
+ return el;
+ };
+
+ var _createContentParent = function(attr) {
+ var el = document.createElement('div');
+
+ if ( this.CONTENT_PARENT_CLASSNAME ) {
+ el.className = this.CONTENT_PARENT_CLASSNAME;
+ }
+
+ this.get('element').appendChild(el);
+
+ return el;
+ };
+
+ var _getChildNodes = function(el) {
+ var nodes = [];
+ var childNodes = el.childNodes;
+
+ for (var i = 0, len = childNodes.length; i < len; ++i) {
+ if (childNodes[i].nodeType == 1) {
+ nodes[nodes.length] = childNodes[i];
+ }
+ }
+
+ return nodes;
+ };
+
+/**
+ * Fires before the activeTab is changed.
+ * See: Element.addListener
+ * If handler returns false, the change will be cancelled, and the value will not
+ * be set.
+ * Event fields:
+ * <String> type beforeActiveTabChange
+ * <YAHOO.widget.Tab >
+ * prevValue the currently active tab
+ * <YAHOO.widget.Tab >
+ * newValue the tab to be made active
+ * Usage:
+ * var handler = function(e) {var previous = e.prevValue};
+ * myTabs.addListener('beforeActiveTabChange', handler);
+ * @event beforeActiveTabChange
+ */
+
+/**
+ * Fires after the activeTab is changed.
+ * See: Element.addListener
+ * Event fields:
+ * <String> type activeTabChange
+ * <YAHOO.widget.Tab >
+ * prevValue the formerly active tab
+ * <YAHOO.widget.Tab >
+ * newValue the new active tab
+ * Usage:
+ * var handler = function(e) {var previous = e.prevValue};
+ * myTabs.addListener('activeTabChange', handler);
+ * @event activeTabChange
+ */
+
+/**
+ * Fires before the orientation is changed.
+ * See: Element.addListener
+ * If handler returns false, the change will be cancelled, and the value will not
+ * be set.
+ * Event fields:
+ * <String> type beforeOrientationChange
+ * <String>
+ * prevValue the current orientation
+ * <String>
+ * newValue the new orientation to be applied
+ * Usage:
+ * var handler = function(e) {var previous = e.prevValue};
+ * myTabs.addListener('beforeOrientationChange', handler);
+ * @event beforeOrientationChange
+ */
+
+/**
+ * Fires after the orientation is changed.
+ * See: Element.addListener
+ * Event fields:
+ * <String> type orientationChange
+ * <String>
+ * prevValue the former orientation
+ * <String>
+ * newValue the new orientation
+ * Usage:
+ * var handler = function(e) {var previous = e.prevValue};
+ * myTabs.addListener('orientationChange', handler);
+ * @event orientationChange
+ */
+})();
+
+(function() {
+ var Dom = YAHOO.util.Dom,
+ Event = YAHOO.util.Event;
+
+ /**
+ * A representation of a Tab's label and content.
+ * @namespace YAHOO.widget
+ * @class Tab
+ * @extends YAHOO.util.Element
+ * @constructor
+ * @param element {HTMLElement | String} (optional) The html element that
+ * represents the TabView. An element will be created if none provided.
+ * @param {Object} properties A key map of initial properties
+ */
+ var Tab = function(el, attr) {
+ attr = attr || {};
+ if (arguments.length == 1 && !YAHOO.lang.isString(el) && !el.nodeName) {
+ attr = el;
+ el = attr.element;
+ }
+
+ if (!el && !attr.element) {
+ el = _createTabElement.call(this, attr);
+ }
+
+ this.loadHandler = {
+ success: function(o) {
+ this.set('content', o.responseText);
+ },
+ failure: function(o) {
+ }
+ };
+
+ Tab.superclass.constructor.call(this, el, attr);
+
+ this.DOM_EVENTS = {}; // delegating to tabView
+ };
+
+ YAHOO.extend(Tab, YAHOO.util.Element);
+ var proto = Tab.prototype;
+
+ /**
+ * The default tag name for a Tab's inner element.
+ * @property LABEL_INNER_TAGNAME
+ * @type String
+ * @default "em"
+ */
+ proto.LABEL_TAGNAME = 'em';
+
+ /**
+ * The class name applied to active tabs.
+ * @property ACTIVE_CLASSNAME
+ * @type String
+ * @default "on"
+ */
+ proto.ACTIVE_CLASSNAME = 'selected';
+
+ /**
+ * The class name applied to disabled tabs.
+ * @property DISABLED_CLASSNAME
+ * @type String
+ * @default "disabled"
+ */
+ proto.DISABLED_CLASSNAME = 'disabled';
+
+ /**
+ * The class name applied to dynamic tabs while loading.
+ * @property LOADING_CLASSNAME
+ * @type String
+ * @default "disabled"
+ */
+ proto.LOADING_CLASSNAME = 'loading';
+
+ /**
+ * Provides a reference to the connection request object when data is
+ * loaded dynamically.
+ * @property dataConnection
+ * @type Object
+ */
+ proto.dataConnection = null;
+
+ /**
+ * Object containing success and failure callbacks for loading data.
+ * @property loadHandler
+ * @type object
+ */
+ proto.loadHandler = null;
+
+ /**
+ * Provides a readable name for the tab.
+ * @method toString
+ * @return String
+ */
+ proto.toString = function() {
+ var el = this.get('element');
+ var id = el.id || el.tagName;
+ return "Tab " + id;
+ };
+
+ /**
+ * setAttributeConfigs TabView specific properties.
+ * @method initAttributes
+ * @param {Object} attr Hash of initial attributes
+ */
+ proto.initAttributes = function(attr) {
+ attr = attr || {};
+ Tab.superclass.initAttributes.call(this, attr);
+
+ var el = this.get('element');
+
+ /**
+ * The event that triggers the tab's activation.
+ * @config activationEvent
+ * @type String
+ */
+ this.setAttributeConfig('activationEvent', {
+ value: attr.activationEvent || 'click'
+ });
+
+ /**
+ * The element that contains the tab's label.
+ * @config labelEl
+ * @type HTMLElement
+ */
+ this.setAttributeConfig('labelEl', {
+ value: attr.labelEl || _getlabelEl.call(this),
+ method: function(value) {
+ var current = this.get('labelEl');
+
+ if (current) {
+ if (current == value) {
+ return false; // already set
+ }
+
+ this.replaceChild(value, current);
+ } else if (el.firstChild) { // ensure label is firstChild by default
+ this.insertBefore(value, el.firstChild);
+ } else {
+ this.appendChild(value);
+ }
+ }
+ });
+
+ /**
+ * The tab's label text (or innerHTML).
+ * @config label
+ * @type String
+ */
+ this.setAttributeConfig('label', {
+ value: attr.label || _getLabel.call(this),
+ method: function(value) {
+ var labelEl = this.get('labelEl');
+ if (!labelEl) { // create if needed
+ this.set('labelEl', _createlabelEl.call(this));
+ }
+
+ _setLabel.call(this, value);
+ }
+ });
+
+ /**
+ * The HTMLElement that contains the tab's content.
+ * @config contentEl
+ * @type HTMLElement
+ */
+ this.setAttributeConfig('contentEl', {
+ value: attr.contentEl || document.createElement('div'),
+ method: function(value) {
+ var current = this.get('contentEl');
+
+ if (current) {
+ if (current == value) {
+ return false; // already set
+ }
+ this.replaceChild(value, current);
+ }
+ }
+ });
+
+ /**
+ * The tab's content.
+ * @config content
+ * @type String
+ */
+ this.setAttributeConfig('content', {
+ value: attr.content,
+ method: function(value) {
+ this.get('contentEl').innerHTML = value;
+ }
+ });
+
+ var _dataLoaded = false;
+
+ /**
+ * The tab's data source, used for loading content dynamically.
+ * @config dataSrc
+ * @type String
+ */
+ this.setAttributeConfig('dataSrc', {
+ value: attr.dataSrc
+ });
+
+ /**
+ * Whether or not content should be reloaded for every view.
+ * @config cacheData
+ * @type Boolean
+ * @default false
+ */
+ this.setAttributeConfig('cacheData', {
+ value: attr.cacheData || false,
+ validator: YAHOO.lang.isBoolean
+ });
+
+ /**
+ * The method to use for the data request.
+ * @config loadMethod
+ * @type String
+ * @default "GET"
+ */
+ this.setAttributeConfig('loadMethod', {
+ value: attr.loadMethod || 'GET',
+ validator: YAHOO.lang.isString
+ });
+
+ /**
+ * Whether or not any data has been loaded from the server.
+ * @config dataLoaded
+ * @type Boolean
+ */
+ this.setAttributeConfig('dataLoaded', {
+ value: false,
+ validator: YAHOO.lang.isBoolean,
+ writeOnce: true
+ });
+
+ /**
+ * Number if milliseconds before aborting and calling failure handler.
+ * @config dataTimeout
+ * @type Number
+ * @default null
+ */
+ this.setAttributeConfig('dataTimeout', {
+ value: attr.dataTimeout || null,
+ validator: YAHOO.lang.isNumber
+ });
+
+ /**
+ * Whether or not the tab is currently active.
+ * If a dataSrc is set for the tab, the content will be loaded from
+ * the given source.
+ * @config active
+ * @type Boolean
+ */
+ this.setAttributeConfig('active', {
+ value: attr.active || this.hasClass(this.ACTIVE_CLASSNAME),
+ method: function(value) {
+ if (value === true) {
+ this.addClass(this.ACTIVE_CLASSNAME);
+ this.set('title', 'active');
+ } else {
+ this.removeClass(this.ACTIVE_CLASSNAME);
+ this.set('title', '');
+ }
+ },
+ validator: function(value) {
+ return YAHOO.lang.isBoolean(value) && !this.get('disabled') ;
+ }
+ });
+
+ /**
+ * Whether or not the tab is disabled.
+ * @config disabled
+ * @type Boolean
+ */
+ this.setAttributeConfig('disabled', {
+ value: attr.disabled || this.hasClass(this.DISABLED_CLASSNAME),
+ method: function(value) {
+ if (value === true) {
+ Dom.addClass(this.get('element'), this.DISABLED_CLASSNAME);
+ } else {
+ Dom.removeClass(this.get('element'), this.DISABLED_CLASSNAME);
+ }
+ },
+ validator: YAHOO.lang.isBoolean
+ });
+
+ /**
+ * The href of the tab's anchor element.
+ * @config href
+ * @type String
+ * @default '#'
+ */
+ this.setAttributeConfig('href', {
+ value: attr.href || '#',
+ method: function(value) {
+ this.getElementsByTagName('a')[0].href = value;
+ },
+ validator: YAHOO.lang.isString
+ });
+
+ /**
+ * The Whether or not the tab's content is visible.
+ * @config contentVisible
+ * @type Boolean
+ * @default false
+ */
+ this.setAttributeConfig('contentVisible', {
+ value: attr.contentVisible,
+ method: function(value) {
+ if (value) {
+ this.get('contentEl').style.display = 'block';
+
+ if ( this.get('dataSrc') ) {
+ // load dynamic content unless already loaded and caching
+ if ( !this.get('dataLoaded') || !this.get('cacheData') ) {
+ _dataConnect.call(this);
+ }
+ }
+ } else {
+ this.get('contentEl').style.display = 'none';
+ }
+ },
+ validator: YAHOO.lang.isBoolean
+ });
+ };
+
+ var _createTabElement = function(attr) {
+ var el = document.createElement('li');
+ var a = document.createElement('a');
+
+ a.href = attr.href || '#';
+
+ el.appendChild(a);
+
+ var label = attr.label || null;
+ var labelEl = attr.labelEl || null;
+
+ if (labelEl) { // user supplied labelEl
+ if (!label) { // user supplied label
+ label = _getLabel.call(this, labelEl);
+ }
+ } else {
+ labelEl = _createlabelEl.call(this);
+ }
+
+ a.appendChild(labelEl);
+
+ return el;
+ };
+
+ var _getlabelEl = function() {
+ return this.getElementsByTagName(this.LABEL_TAGNAME)[0];
+ };
+
+ var _createlabelEl = function() {
+ var el = document.createElement(this.LABEL_TAGNAME);
+ return el;
+ };
+
+ var _setLabel = function(label) {
+ var el = this.get('labelEl');
+ el.innerHTML = label;
+ };
+
+ var _getLabel = function() {
+ var label,
+ el = this.get('labelEl');
+
+ if (!el) {
+ return undefined;
+ }
+
+ return el.innerHTML;
+ };
+
+ var _dataConnect = function() {
+ if (!YAHOO.util.Connect) {
+ return false;
+ }
+
+ Dom.addClass(this.get('contentEl').parentNode, this.LOADING_CLASSNAME);
+
+ this.dataConnection = YAHOO.util.Connect.asyncRequest(
+ this.get('loadMethod'),
+ this.get('dataSrc'),
+ {
+ success: function(o) {
+ this.loadHandler.success.call(this, o);
+ this.set('dataLoaded', true);
+ this.dataConnection = null;
+ Dom.removeClass(this.get('contentEl').parentNode,
+ this.LOADING_CLASSNAME);
+ },
+ failure: function(o) {
+ this.loadHandler.failure.call(this, o);
+ this.dataConnection = null;
+ Dom.removeClass(this.get('contentEl').parentNode,
+ this.LOADING_CLASSNAME);
+ },
+ scope: this,
+ timeout: this.get('dataTimeout')
+ }
+ );
+ };
+
+ YAHOO.widget.Tab = Tab;
+
+ /**
+ * Fires before the active state is changed.
+ * See: Element.addListener
+ * If handler returns false, the change will be cancelled, and the value will not
+ * be set.
+ * Event fields:
+ * <String> type beforeActiveChange
+ * <Boolean>
+ * prevValue the current value
+ * <Boolean>
+ * newValue the new value
+ * Usage:
+ * var handler = function(e) {var previous = e.prevValue};
+ * myTabs.addListener('beforeActiveChange', handler);
+ * @event beforeActiveChange
+ */
+
+ /**
+ * Fires after the active state is changed.
+ * See: Element.addListener
+ * Event fields:
+ * <String> type activeChange
+ * <Boolean>
+ * prevValue the previous value
+ * <Boolean>
+ * newValue the updated value
+ * Usage:
+ * var handler = function(e) {var previous = e.prevValue};
+ * myTabs.addListener('activeChange', handler);
+ * @event activeChange
+ */
+
+ /**
+ * Fires before the tab label is changed.
+ * See: Element.addListener
+ * If handler returns false, the change will be cancelled, and the value will not
+ * be set.
+ * Event fields:
+ * <String> type beforeLabelChange
+ * <String>
+ * prevValue the current value
+ * <String>
+ * newValue the new value
+ * Usage:
+ * var handler = function(e) {var previous = e.prevValue};
+ * myTabs.addListener('beforeLabelChange', handler);
+ * @event beforeLabelChange
+ */
+
+ /**
+ * Fires after the tab label is changed.
+ * See: Element.addListener
+ * Event fields:
+ * <String> type labelChange
+ * <String>
+ * prevValue the previous value
+ * <String>
+ * newValue the updated value
+ * Usage:
+ * var handler = function(e) {var previous = e.prevValue};
+ * myTabs.addListener('labelChange', handler);
+ * @event labelChange
+ */
+
+ /**
+ * Fires before the tab content is changed.
+ * See: Element.addListener
+ * If handler returns false, the change will be cancelled, and the value will not
+ * be set.
+ * Event fields:
+ * <String> type beforeContentChange
+ * <String>
+ * prevValue the current value
+ * <String>
+ * newValue the new value
+ * Usage:
+ * var handler = function(e) {var previous = e.prevValue};
+ * myTabs.addListener('beforeContentChange', handler);
+ * @event beforeContentChange
+ */
+
+ /**
+ * Fires after the tab content is changed.
+ * See: Element.addListener
+ * Event fields:
+ * <String> type contentChange
+ * <String>
+ * prevValue the previous value
+ * <Boolean>
+ * newValue the updated value
+ * Usage:
+ * var handler = function(e) {var previous = e.prevValue};
+ * myTabs.addListener('contentChange', handler);
+ * @event contentChange
+ */
+})();
+
+YAHOO.register("tabview", YAHOO.widget.TabView, {version: "2.2.1", build: "193"});
Modified: jifty/trunk/share/web/static/js/yui/yahoo.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/yahoo.js (original)
+++ jifty/trunk/share/web/static/js/yui/yahoo.js Thu Apr 12 03:32:44 2007
@@ -1,144 +1,442 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 0.12.1
-*/
-/**
- * The YAHOO object is the single global object used by YUI Library. It
- * contains utility function for setting up namespaces, inheritance, and
- * logging. YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces
- * created automatically for and used by the library.
- * @module yahoo
- * @title YAHOO Global
- */
-
-if (typeof YAHOO == "undefined") {
- /**
- * The YAHOO global namespace object
- * @class YAHOO
- * @static
- */
- var YAHOO = {};
-}
-
-/**
- * Returns the namespace specified and creates it if it doesn't exist
- *
- * YAHOO.namespace("property.package");
- * YAHOO.namespace("YAHOO.property.package");
- *
- * Either of the above would create YAHOO.property, then
- * YAHOO.property.package
- *
- * Be careful when naming packages. Reserved words may work in some browsers
- * and not others. For instance, the following will fail in Safari:
- *
- * YAHOO.namespace("really.long.nested.namespace");
- *
- * This fails because "long" is a future reserved word in ECMAScript
- *
- * @method namespace
- * @static
- * @param {String*} arguments 1-n namespaces to create
- * @return {Object} A reference to the last namespace object created
- */
-YAHOO.namespace = function() {
- var a=arguments, o=null, i, j, d;
- for (i=0; i
+ * YAHOO.env.getVersion for the description of the version data structure.
+ * @property listener
+ * @static
+ */
+if (typeof YAHOO == "undefined") {
+ /**
+ * The YAHOO global namespace object. If YAHOO is already defined, the
+ * existing YAHOO object will not be overwritten so that defined
+ * namespaces are preserved.
+ * @class YAHOO
+ * @static
+ */
+ var YAHOO = {};
+}
+
+/**
+ * Returns the namespace specified and creates it if it doesn't exist
+ *
+ * YAHOO.namespace("property.package");
+ * YAHOO.namespace("YAHOO.property.package");
+ *
+ * Either of the above would create YAHOO.property, then
+ * YAHOO.property.package
+ *
+ * Be careful when naming packages. Reserved words may work in some browsers
+ * and not others. For instance, the following will fail in Safari:
+ *
+ * YAHOO.namespace("really.long.nested.namespace");
+ *
+ * This fails because "long" is a future reserved word in ECMAScript
+ *
+ * @method namespace
+ * @static
+ * @param {String*} arguments 1-n namespaces to create
+ * @return {Object} A reference to the last namespace object created
+ */
+YAHOO.namespace = function() {
+ var a=arguments, o=null, i, j, d;
+ for (i=0; i
+ * name: The name of the module
+ * version: The version in use
+ * build: The build number in use
+ * versions: All versions that were registered
+ * builds: All builds that were registered.
+ * mainClass: An object that was was stamped with the
+ * current version and build. If
+ * mainClass.VERSION != version or mainClass.BUILD != build,
+ * multiple versions of pieces of the library have been
+ * loaded, potentially causing issues.
+ *
+ *
+ * @method getVersion
+ * @static
+ * @param {String} name the name of the module (event, slider, etc)
+ * @return {Object} The version info
+ */
+ getVersion: function(name) {
+ return YAHOO.env.modules[name] || null;
+ }
+};
+
+/**
+ * Provides the language utilites and extensions used by the library
+ * @class YAHOO.lang
+ */
+YAHOO.lang = {
+ /**
+ * Determines whether or not the provided object is an array
+ * @method isArray
+ * @param {any} obj The object being testing
+ * @return Boolean
+ */
+ isArray: function(obj) { // frames lose type, so test constructor string
+ if (obj && obj.constructor &&
+ obj.constructor.toString().indexOf('Array') > -1) {
+ return true;
+ } else {
+ return YAHOO.lang.isObject(obj) && obj.constructor == Array;
+ }
+ },
+
+ /**
+ * Determines whether or not the provided object is a boolean
+ * @method isBoolean
+ * @param {any} obj The object being testing
+ * @return Boolean
+ */
+ isBoolean: function(obj) {
+ return typeof obj == 'boolean';
+ },
+
+ /**
+ * Determines whether or not the provided object is a function
+ * @method isFunction
+ * @param {any} obj The object being testing
+ * @return Boolean
+ */
+ isFunction: function(obj) {
+ return typeof obj == 'function';
+ },
+
+ /**
+ * Determines whether or not the provided object is null
+ * @method isNull
+ * @param {any} obj The object being testing
+ * @return Boolean
+ */
+ isNull: function(obj) {
+ return obj === null;
+ },
+
+ /**
+ * Determines whether or not the provided object is a legal number
+ * @method isNumber
+ * @param {any} obj The object being testing
+ * @return Boolean
+ */
+ isNumber: function(obj) {
+ return typeof obj == 'number' && isFinite(obj);
+ },
+
+ /**
+ * Determines whether or not the provided object is of type object
+ * or function
+ * @method isObject
+ * @param {any} obj The object being testing
+ * @return Boolean
+ */
+ isObject: function(obj) {
+ return obj && (typeof obj == 'object' || YAHOO.lang.isFunction(obj));
+ },
+
+ /**
+ * Determines whether or not the provided object is a string
+ * @method isString
+ * @param {any} obj The object being testing
+ * @return Boolean
+ */
+ isString: function(obj) {
+ return typeof obj == 'string';
+ },
+
+ /**
+ * Determines whether or not the provided object is undefined
+ * @method isUndefined
+ * @param {any} obj The object being testing
+ * @return Boolean
+ */
+ isUndefined: function(obj) {
+ return typeof obj == 'undefined';
+ },
+
+ /**
+ * Determines whether or not the property was added
+ * to the object instance. Returns false if the property is not present
+ * in the object, or was inherited from the prototype.
+ * This abstraction is provided to enable hasOwnProperty for Safari 1.3.x.
+ * There is a discrepancy between YAHOO.lang.hasOwnProperty and
+ * Object.prototype.hasOwnProperty when the property is a primitive added to
+ * both the instance AND prototype with the same value:
+ *
+ * var A = function() {};
+ * A.prototype.foo = 'foo';
+ * var a = new A();
+ * a.foo = 'foo';
+ * alert(a.hasOwnProperty('foo')); // true
+ * alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
+ *
+ * @method hasOwnProperty
+ * @param {any} obj The object being testing
+ * @return Boolean
+ */
+ hasOwnProperty: function(obj, prop) {
+ if (Object.prototype.hasOwnProperty) {
+ return obj.hasOwnProperty(prop);
+ }
+
+ return !YAHOO.lang.isUndefined(obj[prop]) &&
+ obj.constructor.prototype[prop] !== obj[prop];
+ },
+
+ /**
+ * Utility to set up the prototype, constructor and superclass properties to
+ * support an inheritance strategy that can chain constructors and methods.
+ *
+ * @method extend
+ * @static
+ * @param {Function} subc the object to modify
+ * @param {Function} superc the object to inherit
+ * @param {Object} overrides additional properties/methods to add to the
+ * subclass prototype. These will override the
+ * matching items obtained from the superclass
+ * if present.
+ */
+ extend: function(subc, superc, overrides) {
+ if (!superc||!subc) {
+ throw new Error("YAHOO.lang.extend failed, please check that " +
+ "all dependencies are included.");
+ }
+ var F = function() {};
+ F.prototype=superc.prototype;
+ subc.prototype=new F();
+ subc.prototype.constructor=subc;
+ subc.superclass=superc.prototype;
+ if (superc.prototype.constructor == Object.prototype.constructor) {
+ superc.prototype.constructor=superc;
+ }
+
+ if (overrides) {
+ for (var i in overrides) {
+ subc.prototype[i]=overrides[i];
+ }
+ }
+ },
+
+ /**
+ * Applies all prototype properties in the supplier to the receiver if the
+ * receiver does not have these properties yet. Optionally, one or more
+ * methods/properties can be specified (as additional parameters). This
+ * option will overwrite the property if receiver has it already.
+ *
+ * @method augment
+ * @static
+ * @param {Function} r the object to receive the augmentation
+ * @param {Function} s the object that supplies the properties to augment
+ * @param {String*} arguments zero or more properties methods to augment the
+ * receiver with. If none specified, everything
+ * in the supplier will be used unless it would
+ * overwrite an existing property in the receiver
+ */
+ augment: function(r, s) {
+ if (!s||!r) {
+ throw new Error("YAHOO.lang.augment failed, please check that " +
+ "all dependencies are included.");
+ }
+ var rp=r.prototype, sp=s.prototype, a=arguments, i, p;
+ if (a[2]) {
+ for (i=2; iYAHOO.lang
+ * @class YAHOO.util.Lang
+ */
+YAHOO.util.Lang = YAHOO.lang;
+
+/**
+ * An alias for YAHOO.lang.augment
+ * @for YAHOO
+ * @method augment
+ * @static
+ * @param {Function} r the object to receive the augmentation
+ * @param {Function} s the object that supplies the properties to augment
+ * @param {String*} arguments zero or more properties methods to augment the
+ * receiver with. If none specified, everything
+ * in the supplier will be used unless it would
+ * overwrite an existing property in the receiver
+ */
+YAHOO.augment = YAHOO.lang.augment;
+
+/**
+ * An alias for YAHOO.lang.extend
+ * @method extend
+ * @static
+ * @param {Function} subc the object to modify
+ * @param {Function} superc the object to inherit
+ * @param {Object} overrides additional properties/methods to add to the
+ * subclass prototype. These will override the
+ * matching items obtained from the superclass
+ * if present.
+ */
+YAHOO.extend = YAHOO.lang.extend;
+
+YAHOO.register("yahoo", YAHOO, {version: "2.2.1", build: "193"});
From jifty-commit at lists.jifty.org Fri Apr 13 08:16:58 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 13 08:17:43 2007
Subject: [Jifty-commit] r3121 - jifty/trunk/lib/Jifty/View/Declare
Message-ID: <20070413121658.1CF694D8159@diesel.bestpractical.com>
Author: clkao
Date: Fri Apr 13 08:16:55 2007
New Revision: 3121
Modified:
jifty/trunk/lib/Jifty/View/Declare/Helpers.pm
Log:
render_region should have default empty path.
Modified: jifty/trunk/lib/Jifty/View/Declare/Helpers.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/Helpers.pm (original)
+++ jifty/trunk/lib/Jifty/View/Declare/Helpers.pm Fri Apr 13 08:16:55 2007
@@ -112,7 +112,7 @@
sub render_region(@) {
unshift @_, 'name' if @_ % 2;
my $args = {@_};
- my $path = $args->{path};
+ my $path = $args->{path} ||= '/__jifty/empty';
if ($Template::Declare::Tags::self && $path !~ m|^/|) {
$args->{path} = $Template::Declare::Tags::self->path_for($path);
}
From jifty-commit at lists.jifty.org Fri Apr 13 17:04:01 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 13 17:04:03 2007
Subject: [Jifty-commit] r3122 - in jifty/trunk: t/Mapper/t
Message-ID: <20070413210401.D71654D80AC@diesel.bestpractical.com>
Author: falcone
Date: Fri Apr 13 17:04:00 2007
New Revision: 3122
Modified:
jifty/trunk/ (props changed)
jifty/trunk/t/Mapper/t/02-api.t
Log:
r18017@ketch: falcone | 2007-04-13 17:02:35 -0400
* WWW::Mechanize 1.22 removed the form method.
thanks to hdp for noticing/poking
Modified: jifty/trunk/t/Mapper/t/02-api.t
==============================================================================
--- jifty/trunk/t/Mapper/t/02-api.t (original)
+++ jifty/trunk/t/Mapper/t/02-api.t Fri Apr 13 17:04:00 2007
@@ -33,13 +33,13 @@
# Feeding the first action into the second should cause both to run;
# first, test via setting arguments during action creation (which sets
# sticky values)
-$mech->form(2);
+$mech->form_number(2);
ok($mech->click_button(value => "Do both"));
$mech->content_like(qr/got the grail/i, "Got the grail");
$mech->content_like(qr/crossed the bridge/i, "And crossed the bridge");
# And then, the same, but via default_values on the form field
-$mech->form(3);
+$mech->form_number(3);
ok($mech->click_button(value => "Do both"));
$mech->content_like(qr/got the grail/i, "Got the grail");
$mech->content_like(qr/crossed the bridge/i, "And crossed the bridge");
From jifty-commit at lists.jifty.org Fri Apr 13 19:54:25 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 13 19:54:27 2007
Subject: [Jifty-commit] r3123 - in jifty/trunk:
lib/Jifty/Plugin/Authentication/Password
lib/Jifty/Plugin/Authentication/Password/Action
lib/Jifty/Plugin/User/Mixin/Model share/po
Message-ID: <20070413235425.BA53C4D806E@diesel.bestpractical.com>
Author: audreyt
Date: Fri Apr 13 19:54:24 2007
New Revision: 3123
Modified:
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm
jifty/trunk/lib/Jifty/Plugin/User/Mixin/Model/User.pm
jifty/trunk/share/po/zh_tw.po
Log:
* zh-tw L10N for authen/passwd/user plugins.
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm Fri Apr 13 19:54:24 2007
@@ -20,22 +20,22 @@
=cut
sub arguments {
- return( { email => { label => 'Email',
+ return( { email => { label => _('Email'),
mandatory => 1,
ajax_validates => 1,
} ,
password => { type => 'password',
- label => 'Password',
+ label => _('Password'),
# mandatory in some cases; see validate_password
mandatory => 0,
},
hashed_password => { type => 'hidden',
- label => 'Hashed Password',
+ label => _('Hashed Password'),
},
remember => { type => 'checkbox',
- label => 'Remember me?',
- hints => 'Your browser can remember your login for you',
+ label => _('Remember me?'),
+ hints => _('Your browser can remember your login for you'),
default => 0,
},
token => { type => 'hidden',
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm Fri Apr 13 19:54:24 2007
@@ -16,16 +16,16 @@
render_as 'unrendered',
type is 'varchar',
default is '',
- label is 'Authentication token';
+ label is _('Authentication token');
column password =>
is mandatory,
is unreadable,
- label is 'Password',
+ label is _('Password'),
type is 'varchar',
- hints is 'Your password should be at least six characters',
+ hints is _('Your password should be at least six characters'),
render_as 'password',
filters are 'Jifty::DBI::Filter::SaltHash';
@@ -85,7 +85,7 @@
my $self = shift;
my $new_value = shift;
- return ( 0, q{Passwords need to be at least six characters long} )
+ return ( 0, _('Passwords need to be at least six characters long') )
if length($new_value) < 6;
return 1;
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm Fri Apr 13 19:54:24 2007
@@ -27,7 +27,7 @@
template 'signup' => page {
- title is 'Signup';
+ title is _('Signup');
my ( $action, $next ) = get(qw(action next));
Jifty->web->form->start( call => $next );
render_param( $action => 'name' , focus => 1);
@@ -37,7 +37,7 @@
};
template login => page {
- { title is 'Login!' };
+ { title is _('Login!') };
show('login_widget');
};
@@ -49,10 +49,10 @@
request => Jifty::Request->new( path => "/" ) );
unless ( Jifty->web->current_user->id ) {
p {
- outs( _( qq{No account yet? It's quick and easy.} ));
+ outs( _( "No account yet? It's quick and easy. " ));
tangent( label => _("Sign up for an account!"), url => '/signup');
};
- h3 { _(qq{Login with a password}) };
+ h3 { _('Login with a password') };
div {
attr { id => 'jifty-login' };
Jifty->web->form->start( call => $next );
@@ -106,7 +106,7 @@
template 'passwordreminder' => page {
my $next = get('next');
- attr { title => 'Send Password Reminder' };
+ attr { title => _('Send a password reminder') };
my $action = Jifty->web->new_action(
moniker => 'password_reminder',
class => 'SendPasswordReminder',
Modified: jifty/trunk/lib/Jifty/Plugin/User/Mixin/Model/User.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/User/Mixin/Model/User.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/User/Mixin/Model/User.pm Fri Apr 13 19:54:24 2007
@@ -26,13 +26,13 @@
use Jifty::Plugin::User::Record schema {
column
name => type is 'text',
- label is 'Nickname',
- hints is 'How should I display your name to other users?';
+ label is _('Nickname'),
+ hints is _('How should I display your name to other users?');
column
email => type is 'text',
- label is 'Email address', default is '', is immutable, is distinct;
+ label is _('Email address'), default is '', is immutable, is distinct;
column
- email_confirmed => label is 'Email address confirmed?',
+ email_confirmed => label is _('Email address confirmed?'),
type is 'boolean';
};
@@ -79,14 +79,14 @@
my $self = shift;
my $new_email = shift;
- return ( 0, "That $new_email doesn't look like an email address." )
+ return ( 0, _("That %1 doesn't look like an email address.", $new_email) )
if $new_email !~ /\S\@\S/;
my $temp_user = Jifty->app_class('Model','User')->new( current_user => Jifty->app_class('CurrentUser')->superuser );
$temp_user->load_by_cols( 'email' => $new_email );
# It's ok if *we* have the address we're looking for
- return ( 0, q{It looks like somebody else is using that address. Is there a chance you have another account?} )
+ return ( 0, _('It looks like somebody else is using that address. Is there a chance you have another account?') )
if $temp_user->id && ( !$self->id || $temp_user->id != $self->id );
return 1;
Modified: jifty/trunk/share/po/zh_tw.po
==============================================================================
--- jifty/trunk/share/po/zh_tw.po (original)
+++ jifty/trunk/share/po/zh_tw.po Fri Apr 13 19:54:24 2007
@@ -14,10 +14,55 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+#: lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmLostPassword.pm:38
+#. ($appname,$confirm_url)
+msgid ""
+"\n"
+"You're getting this message because you (or somebody claiming to be you)\n"
+"request to reset your password for %1.\n"
+"\n"
+"If you don't want to reset your password just ignore this message.\n"
+"\n"
+"To reset your password, click on the link below:\n"
+"\n"
+"%2\n"
+msgstr ""
+"\n"
+"? (????????) ?????? %1 ???.\n"
+"\n"
+"?????????, ??????.\n"
+"\n"
+"??????, ???????:\n"
+"\n"
+"%2\n"
+
+#: lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm:41
+#. ($appname,$confirm_url)
+msgid ""
+"\n"
+"You're getting this message because you (or somebody claiming to be you)\n"
+"wants to use %1. \n"
+"\n"
+"We need to make sure that we got your email address right. Click on the link below to get started:\n"
+"\n"
+"%2\n"
+msgstr ""
+"\n"
+"? (????????) ? %1 ????.\n"
+"\n"
+"???????, ?????????:\n"
+"\n"
+"%2\n"
+
#: lib/Jifty/Action/Record/Search.pm:125
msgid "!=>< allowed"
msgstr "??? !=>< ??"
+#: lib/Jifty/Notification.pm:94
+#. ($appname, Jifty->config->framework('AdminEmail')
+msgid "%1 <%2>"
+msgstr "%1 <%2>"
+
#: lib/Jifty/Action/Record/Search.pm:115
#. ($label)
msgid "%1 after"
@@ -33,7 +78,7 @@
msgid "%1 contains"
msgstr "%1 ??"
-#: share/web/templates/__jifty/admin/fragments/list/list:87
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:141
#. ($collection-> count)
msgid "%1 entries"
msgstr "? %1 ?"
@@ -93,23 +138,32 @@
msgid "(any)"
msgstr "(??)"
-#: lib/Jifty/Web/Form/.Field.pm.swp:44 lib/Jifty/Web/Form/Field.pm:549
-msgid "@{[$self->current_value]}"
-msgstr ""
+#: lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm:58
+msgid ". Your email address has now been confirmed."
+msgstr ". ????????????."
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:96
+msgid "A link to reset your password has been sent to your email account."
+msgstr "?????????????????."
+
+#: lib/Jifty/Notification.pm:96
+#. ($appname)
+msgid "A notification from %1!"
+msgstr "%1 ?????!"
-#: share/web/templates/__jifty/admin/index.html:19
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:443
msgid "Actions"
msgstr "??"
-#: share/web/templates/_elements/nav:5
+#: lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm:28
msgid "Administration"
msgstr "????"
-#: share/web/templates/_elements/wrapper:11
+#: lib/Jifty/View/Declare/Helpers.pm:363 share/web/templates/_elements/wrapper:11
msgid "Administration mode is enabled."
msgstr "?????????."
-#: share/web/templates/_elements/wrapper:11
+#: lib/Jifty/View/Declare/Helpers.pm:360 share/web/templates/_elements/wrapper:11
msgid "Alert"
msgstr "???"
@@ -121,11 +175,19 @@
msgid "Any field contains"
msgstr "??????"
-#: share/web/templates/__jifty/admin/action/dhandler:25 share/web/templates/__jifty/admin/model/dhandler:21
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:131
+msgid "Anyway, the software has logged this error."
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:19
+msgid "Authentication token"
+msgstr ""
+
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:489 lib/Jifty/Plugin/AdminUI/View-not-yet.pm:59
msgid "Back to the admin console"
msgstr "??????"
-#: share/web/templates/__jifty/admin/index.html:29
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:461
msgid "Back to the application"
msgstr "??????"
@@ -138,7 +200,7 @@
msgid "Calendar"
msgstr "??"
-#: share/web/templates/__jifty/admin/fragments/list/update:31
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:338
msgid "Cancel"
msgstr "??"
@@ -150,11 +212,15 @@
msgid "Close window"
msgstr "????"
-#: share/web/templates/__jifty/admin/fragments/list/view:31
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:382
msgid "Confirm delete?"
msgstr "???????"
-#: share/web/templates/__jifty/admin/fragments/list/new_item:25
+#: lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:97
+msgid "Confirmation resent."
+msgstr ""
+
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:213
msgid "Create"
msgstr "??"
@@ -167,11 +233,11 @@
msgid "Created"
msgstr "??????."
-#: share/web/templates/__jifty/admin/index.html:3
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:415
msgid "Database Administration"
msgstr "?????"
-#: share/web/templates/__jifty/admin/fragments/list/view:29
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:380
msgid "Delete"
msgstr "??"
@@ -183,11 +249,11 @@
msgid "Dismiss"
msgstr "??"
-#: share/web/templates/__jifty/admin/index.html:28 share/web/templates/__jifty/admin/model/dhandler:20
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:458 lib/Jifty/Plugin/AdminUI/View-not-yet.pm:486 lib/Jifty/Plugin/AdminUI/View-not-yet.pm:56
msgid "Done?"
msgstr "?????"
-#: share/web/templates/__jifty/admin/fragments/list/view:40 share/web/templates/__jifty/halo:20
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:388 share/web/templates/__jifty/halo:126 share/web/templates/__jifty/halo:20
msgid "Edit"
msgstr "??"
@@ -196,77 +262,190 @@
msgid "Edit %1"
msgstr "?? %1"
-#: share/web/templates/dhandler:7
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:23 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
+msgid "Email"
+msgstr "??"
+
+#: lib/Jifty/Plugin/User/Mixin/Model/User.pm:33
+msgid "Email address"
+msgstr "????"
+
+#: lib/Jifty/Plugin/User/Mixin/Model/User.pm:35
+msgid "Email address confirmed?"
+msgstr "????????"
+
+#: lib/Jifty/Action.pm:1158
+msgid "Foo cannot contain -, *, +, or ?."
+msgstr ""
+
+#: lib/Jifty/Action.pm:1152
+msgid "Foo cannot contain uppercase letters."
+msgstr ""
+
+#: lib/Jifty/Action.pm:1136
+msgid "Foo values are always in lowercase."
+msgstr ""
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:27
+msgid "For one reason or another, you got to a web page that caused a bit of an error. And then you got to our 'basic' error handler. Which means we haven't written a pretty, easy to understand error message for you just yet. The message we do have is :"
+msgstr ""
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:138 share/web/templates/dhandler:7
msgid "Go back home..."
msgstr "???..."
-#: share/web/templates/_elements/sidebar:5
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:34
+msgid "Hashed Password"
+msgstr ""
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:44
+msgid "Head on back home"
+msgstr "???"
+
+#: lib/Jifty/I18N.pm:19 lib/Jifty/I18N.pm:23
+#. ('World')
+msgid "Hello, %1!"
+msgstr "%1 ??!"
+
+#: lib/Jifty/Plugin/SkeletonApp/View.pm:31 share/web/templates/_elements/sidebar:5
#. ($u->$method()
msgid "Hiya, %1."
msgstr "%1 ??."
-#: share/web/templates/_elements/nav:3
+#: lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm:23
msgid "Home"
msgstr "??"
-#: share/web/templates/__jifty/admin/index.html:1
+#: lib/Jifty/Plugin/User/Mixin/Model/User.pm:30
+msgid "How should I display your name to other users?"
+msgstr "????????"
+
+#: lib/Jifty/Action.pm:1090
+msgid "I changed $field for you"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:64
+msgid "I'm not sure how this happened."
+msgstr ""
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:62
+msgid "Internal error"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:78 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
+msgid "It doesn't look like there's an account by that name."
+msgstr ""
+
+#: lib/Jifty/Plugin/User/Mixin/Model/User.pm:89
+msgid "It looks like somebody else is using that address. Is there a chance you have another account?"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:75
+msgid "It looks like you already have an account. Perhaps you want to log in instead?"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:75
+msgid "It looks like you didn't enter the same password into both boxes. Give it another shot?"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:82
+msgid "It looks like you're already confirmed."
+msgstr ""
+
+#:
msgid "Jifty Administrative Console"
msgstr "Jifty ????"
-#: share/web/templates/__jifty/online_docs/toc.html:6
+#:
msgid "Jifty Developer Documentation Online"
msgstr "Jifty ??????"
-#: share/web/templates/__jifty/online_docs/content.html:6
+#:
msgid "Jifty Pod Online"
msgstr "Jifty ?? POD ??"
-#: share/web/templates/_elements/wrapper:18
+#: lib/Jifty/View/Declare/Helpers.pm:375 share/web/templates/_elements/wrapper:18
msgid "Loading..."
msgstr "???..."
-#: share/web/templates/__jifty/admin/model/dhandler:9
-#. ($object_type)
+#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:106
+msgid "Login"
+msgstr "??"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:55
+msgid "Login with a password"
+msgstr "??????"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:40
+msgid "Login!"
+msgstr "??!"
+
+#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:123
+msgid "Logout"
+msgstr "??"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:63
+msgid "Lost your password?"
+msgstr "??????"
+
+#:
msgid "Manage %1 records"
msgstr "?? %1 ??"
-#: share/web/templates/__jifty/admin/model/dhandler:11
+#:
msgid "Manage records:"
msgstr "?????"
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:46 lib/Jifty/Plugin/AdminUI/View-not-yet.pm:473
+#. ($object_type)
+msgid "Manage records: [_1]"
+msgstr ""
+
#: share/web/templates/__jifty/error/mason_internal_error:1
msgid "Mason error"
msgstr "Mason ????"
-#: share/web/templates/__jifty/admin/index.html:9
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:429
msgid "Models"
msgstr "??"
-#: share/web/templates/__jifty/admin/fragments/list/list:113
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:81
+msgid "New password"
+msgstr "????"
+
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:172
msgid "Next Page"
msgstr "???"
+#: lib/Jifty/Plugin/User/Mixin/Model/User.pm:29
+msgid "Nickname"
+msgstr "??"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:52
+msgid "No account yet? It's quick and easy. "
+msgstr "????????? "
+
#: lib/Jifty/Action/Record/Search.pm:130
msgid "No field contains"
msgstr "??????"
-#: share/web/templates/__jifty/admin/fragments/list/list:85
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:139
msgid "No items found"
msgstr "?????"
-#: lib/Jifty/Web.pm:300
+#: lib/Jifty/Web.pm:302
msgid "No request to handle"
msgstr "????????"
-#: share/web/templates/__jifty/online_docs/index.html:5
+#:
msgid "Online Documentation"
msgstr "????"
-#: share/web/templates/_elements/nav:6
+#: lib/Jifty/Plugin/OnlineDocs/Dispatcher.pm:26
msgid "Online docs"
msgstr "????"
-#: share/web/templates/__jifty/admin/fragments/list/list:80
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:134
#. ($page, $collection->pager->last_page)
msgid "Page %1 of %2"
msgstr "? %1 ?, ? %2 ?"
@@ -279,24 +458,48 @@
msgid "Parent"
msgstr "????"
-#: lib/Jifty/Record.pm:264 lib/Jifty/Record.pm:343 lib/Jifty/Record.pm:68
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:29 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:26
+msgid "Password"
+msgstr "??"
+
+#: lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:88
+msgid "Passwords need to be at least six characters long"
+msgstr "??????????"
+
+#: lib/Jifty/Record.pm:272 lib/Jifty/Record.pm:351 lib/Jifty/Record.pm:70
msgid "Permission denied"
msgstr "????."
-#: share/web/templates/__jifty/admin/fragments/list/list:108
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:66
+msgid "Please email us!"
+msgstr "???????!"
+
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:163
msgid "Previous Page"
msgstr "???"
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:65
+msgid "Really, really sorry."
+msgstr "??????."
+
#:
msgid "Record created"
msgstr "??????."
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:37
+msgid "Remember me?"
+msgstr "????"
+
#: share/web/templates/__jifty/halo:69
#. ($frame->{'render_time'})
msgid "Rendered in %1s"
msgstr "??????: %1 ?"
-#: share/web/templates/__jifty/admin/action/dhandler:20
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:78
+msgid "Reset lost password"
+msgstr "????"
+
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:53
msgid "Run the action"
msgstr "????"
@@ -304,58 +507,120 @@
msgid "SQL Statements"
msgstr "SQL ???"
-#: share/web/templates/__jifty/admin/fragments/list/update:21
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:327
msgid "Save"
msgstr "??"
-#: share/web/templates/__jifty/online_docs/content.html:50
+#:
msgid "Schema"
msgstr "??"
-#: share/web/templates/__jifty/admin/fragments/list/search:18
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:304
msgid "Search"
msgstr "??"
-#: share/web/templates/dhandler:1
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:119
+msgid "Send"
+msgstr "??"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:97
+msgid "Send a link to reset your password"
+msgstr "?????????"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:109 lib/Jifty/Plugin/Authentication/Password/View.pm:114
+msgid "Send a password reminder"
+msgstr "????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:111
+msgid "Sign up"
+msgstr "??"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:53
+msgid "Sign up for an account!"
+msgstr "?????!"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:30 lib/Jifty/Plugin/Authentication/Password/View.pm:35
+msgid "Signup"
+msgstr "??"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:108
+#. ($msg)
+msgid "Something bad happened and we couldn't create your account: %1"
+msgstr ""
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:149
+msgid "Something went awry"
+msgstr ""
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:124 share/web/templates/dhandler:1
msgid "Something's not quite right"
msgstr "????"
-#: share/web/templates/__jifty/online_docs/index.html:16 share/web/templates/__jifty/online_docs/index.html:18
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:132
+msgid "Sorry about this."
+msgstr "????."
+
+#:
msgid "Table of Contents"
msgstr "??"
-#: lib/Jifty/Action.pm:876
+#: lib/Jifty/Plugin/User/Mixin/Model/User.pm:82
+#. ($new_email)
+msgid "That %1 doesn't look like an email address."
+msgstr ""
+
+#: lib/Jifty/Action.pm:878
msgid "That doesn't look like a correct value"
msgstr "??????."
-#: lib/Jifty/Action/Record.pm:248
+#: lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:71 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:72 lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:70
+msgid "That doesn't look like an email address."
+msgstr ""
+
+#: lib/Jifty/Action/Record.pm:249
msgid "That doesn't look right, but I don't know why"
msgstr "??????."
-#: lib/Jifty/Action/Record.pm:180
+#: lib/Jifty/Action/Record.pm:181
msgid "The passwords you typed didn't match each other"
msgstr "???????."
-#: lib/Jifty/Web.pm:363
+#: lib/Jifty/Web.pm:365
msgid "There was an error completing the request. Please try again later."
msgstr "??????, ?????."
-#: share/web/templates/__jifty/admin/index.html:5
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:81
+msgid "There was an error setting your password."
+msgstr ""
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:37
+msgid "There's a pretty good chance that error message doesn't mean anything to you, but we'd rather you have a little bit of information about what went wrong than nothing. We've logged this error, so we know we need to write something friendly explaining just what happened and how to fix it."
+msgstr ""
+
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:419
msgid "This console lets you manage the records in your Jifty database. Below, you should see a list of all your database tables. Feel free to go through and add, delete or modify records."
msgstr "????????????????. ???????, ???????."
-#: share/web/templates/__jifty/admin/index.html:7
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:425
msgid "To disable this administrative console, add \"AdminMode: 0\" under the \"framework:\" settings in the config file (etc/config.yml)."
msgstr "????????, ????? (etc/config.yml) ? \"framework:\" ????? \"AdminMode: 0\" ??."
-#: share/web/templates/__jifty/admin/fragments/list/list:72
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:127
msgid "Toggle search"
msgstr "??????"
-#: share/web/templates/__jifty/error/mason_internal_error:6
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:173 share/web/templates/__jifty/error/mason_internal_error:6
msgid "Try again"
msgstr "????"
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:108
+msgid "Try again later. We're really, really sorry."
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:53
+msgid "Type that again?"
+msgstr "??????"
+
#: lib/Jifty/Action/Record/Update.pm:156
msgid "Updated"
msgstr "??????."
@@ -364,34 +629,119 @@
msgid "Variables"
msgstr "??"
-#: share/web/templates/index.html:1
+#: lib/Jifty.pm:27
+msgid "W00t"
+msgstr "??"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:114
+msgid "We've sent a confirmation message to your email box."
+msgstr "????????????????."
+
+#: lib/Jifty/I18N.pm:31
+#. ('Bob', 'World')
+msgid "Welcome %1 to the %2"
+msgstr "?? %1 ?? %2"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:181
+#. ($user->name)
+msgid "Welcome back, %1."
+msgstr "????, %1."
+
+#: lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm:40
+#. ($appname)
+msgid "Welcome to %1!"
+msgstr "???? %1!"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:113
+#. (Jifty->config->framework('ApplicationName')
+msgid "Welcome to %1, %2."
+msgstr "???? %1, %2!"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm:57
+#. (Jifty->config->framework('ApplicationName')
+msgid "Welcome to %1, %2. "
+msgstr "???? %1, %2. "
+
+#: lib/Jifty/Plugin/SkeletonApp/View.pm:75 share/web/templates/index.html:1
msgid "Welcome to your new Jifty application"
msgstr "???????? Jifty ????"
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:63
+msgid "You don't exist."
+msgstr "????."
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:130
+msgid "You got to a page that we don't think exists."
+msgstr "??????."
+
#: share/web/templates/dhandler:5
msgid "You got to a page that we don't think exists. Anyway, the software has logged this error. Sorry about this."
msgstr "??, ??????, ???????."
-#: lib/Jifty/Action.pm:863
+#: lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm:44
+msgid "You have already confirmed your account."
+msgstr "???????????."
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:98
+msgid "You lost your password. A link to reset it will be sent to the following email address:"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:115
+msgid "You lost your password. A reminder will be send to the following mail:"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:152
+msgid "You may have mistyped your email address or password. Give it another shot."
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:146
+msgid "You may have mistyped your email or password. Give it another shot."
+msgstr ""
+
+#: lib/Jifty/Action.pm:865
msgid "You need to fill in this field"
msgstr "???????."
-#: share/web/templates/index.html:3
+#: lib/Jifty/Plugin/SkeletonApp/View.pm:75 share/web/templates/index.html:3
#. ('http://hdl.loc.gov/loc.pnp/cph.3c13461')
msgid "You said you wanted a pony. (Source %1)"
msgstr "????????????? (?? %1)"
-#: share/web/templates/_elements/sidebar:7
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:69
+msgid "You're already logged in."
+msgstr "??????."
+
+#: lib/Jifty/Plugin/SkeletonApp/View.pm:34 share/web/templates/_elements/sidebar:7
msgid "You're not currently signed in."
msgstr "???????."
-#: share/web/templates/__jifty/admin/fragments/list/header:22
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:38
+msgid "Your browser can remember your login for you"
+msgstr "????????, ???????????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:87
+msgid "Your password has been reset. Welcome back."
+msgstr "????????. ????."
+
+#: lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:28
+msgid "Your password should be at least six characters"
+msgstr "????????????"
+
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:246
msgid "asc"
-msgstr "??"
+msgstr "??"
-#: share/web/templates/__jifty/admin/fragments/list/header:41
+#: lib/Jifty/Plugin/AdminUI/View-not-yet.pm:264
msgid "desc"
-msgstr "??"
+msgstr "??"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:31
+msgid "email address"
+msgstr "????"
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:46
+msgid "for now, and try to forget that we let you down."
+msgstr ""
#: lib/Jifty/Manual/PageRegions.pod:188
msgid "text of the link"
@@ -400,3 +750,11 @@
#: lib/Jifty/Manual/PageRegions.pod:225
msgid "text of the link that hides"
msgstr "??????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:37
+msgid "type your password again"
+msgstr "?????????"
+
+#: lib/Jifty/Action.pm:1050
+msgid "warning"
+msgstr ""
From jifty-commit at lists.jifty.org Fri Apr 13 19:55:39 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 13 19:55:45 2007
Subject: [Jifty-commit] r3124 - in jifty/trunk/examples/Doxory: . etc
lib/Doxory lib/Doxory/Model var
Message-ID: <20070413235539.133214D806E@diesel.bestpractical.com>
Author: audreyt
Date: Fri Apr 13 19:55:39 2007
New Revision: 3124
Added:
jifty/trunk/examples/Doxory/share/po/zh_cn.po
jifty/trunk/examples/Doxory/share/po/zh_tw.po
Removed:
jifty/trunk/examples/Doxory/var/jifty-server.pid
Modified:
jifty/trunk/examples/Doxory/doxory
jifty/trunk/examples/Doxory/etc/config.yml
jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm
jifty/trunk/examples/Doxory/lib/Doxory/Model/Choice.pm
jifty/trunk/examples/Doxory/lib/Doxory/Model/Vote.pm
jifty/trunk/examples/Doxory/lib/Doxory/View.pm
Log:
* Doxory L10N.
Modified: jifty/trunk/examples/Doxory/doxory
==============================================================================
Binary files. No diff available.
Modified: jifty/trunk/examples/Doxory/etc/config.yml
==============================================================================
--- jifty/trunk/examples/Doxory/etc/config.yml (original)
+++ jifty/trunk/examples/Doxory/etc/config.yml Fri Apr 13 19:55:39 2007
@@ -17,7 +17,6 @@
DevelMode: 1
L10N:
PoDir: share/po
- Lang: en
LogLevel: INFO
Mailer: Sendmail
MailerArgs: []
Modified: jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm
==============================================================================
--- jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm (original)
+++ jifty/trunk/examples/Doxory/lib/Doxory/Dispatcher.pm Fri Apr 13 19:55:39 2007
@@ -6,10 +6,10 @@
before '*' => run {
if (Jifty->web->current_user->id) {
my $top = Jifty->web->navigation;
- $top->child( 'Pick!' => url => '/pick' );
- $top->child( 'Choices' => url => '/choices' );
+ $top->child( _('Pick!') => url => '/pick' );
+ $top->child( _('Choices') => url => '/choices' );
}
- elsif ($1 !~ /^login|^signup|^__jifty/) {
+ elsif ($1 !~ /^login|^signup/) {
tangent 'login';
}
};
Modified: jifty/trunk/examples/Doxory/lib/Doxory/Model/Choice.pm
==============================================================================
--- jifty/trunk/examples/Doxory/lib/Doxory/Model/Choice.pm (original)
+++ jifty/trunk/examples/Doxory/lib/Doxory/Model/Choice.pm Fri Apr 13 19:55:39 2007
@@ -6,21 +6,21 @@
use Doxory::Record schema {
column name =>
- label is 'I need help deciding...',
+ label is _('I need help deciding...'),
render as 'textarea';
column a =>
- label is 'On the one hand',
+ label is _('On the one hand'),
render as 'textarea',
is mandatory;
column b =>
- label is 'On the other hand',
+ label is _('On the other hand'),
render as 'textarea',
is mandatory;
column asked_by =>
- label is 'Asked by',
+ label is _('Asked by'),
default is defer { Jifty->web->current_user->id },
references Doxory::Model::User;
};
Modified: jifty/trunk/examples/Doxory/lib/Doxory/Model/Vote.pm
==============================================================================
--- jifty/trunk/examples/Doxory/lib/Doxory/Model/Vote.pm (original)
+++ jifty/trunk/examples/Doxory/lib/Doxory/Model/Vote.pm Fri Apr 13 19:55:39 2007
@@ -15,7 +15,7 @@
valid are qw( a b skip );
column comments =>
- label is 'Comments?',
+ label is _('Comments?'),
render as 'textarea';
};
Modified: jifty/trunk/examples/Doxory/lib/Doxory/View.pm
==============================================================================
--- jifty/trunk/examples/Doxory/lib/Doxory/View.pm (original)
+++ jifty/trunk/examples/Doxory/lib/Doxory/View.pm Fri Apr 13 19:55:39 2007
@@ -5,7 +5,7 @@
use Jifty::View::Declare -base;
template '/' => page {
- h1 { 'Ask a question!' }
+ h1 { _('Ask a question!') }
div { show 'new_choice' }
};
@@ -13,7 +13,7 @@
form {
my $action = new_action( class => 'CreateChoice' );
render_action( $action => ['name', 'a', 'b'] );
- form_submit( label => 'Ask the crowd!' );
+ form_submit( label => _('Ask the crowd!') );
}
};
Added: jifty/trunk/examples/Doxory/share/po/zh_cn.po
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/share/po/zh_cn.po Fri Apr 13 19:55:39 2007
@@ -0,0 +1,55 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/Doxory/View.pm:8
+msgid "Ask a question!"
+msgstr "????!"
+
+#: lib/Doxory/View.pm:16
+msgid "Ask the crowd!"
+msgstr "???????!"
+
+#: lib/Doxory/Model/Choice.pm:23
+msgid "Asked by"
+msgstr "???"
+
+#: lib/Doxory/Dispatcher.pm:10
+msgid "Choices"
+msgstr "????"
+
+#: lib/Doxory/Model/Vote.pm:18
+msgid "Comments?"
+msgstr "?????"
+
+#: lib/Doxory/Model/Choice.pm:9
+msgid "I need help deciding..."
+msgstr "???, ????..."
+
+#: lib/Doxory/Model/Choice.pm:13
+msgid "On the one hand"
+msgstr "???...?"
+
+#: lib/Doxory/Model/Choice.pm:18
+msgid "On the other hand"
+msgstr "??...?"
+
+#: lib/Doxory/Dispatcher.pm:9
+msgid "Pick!"
+msgstr "??!"
+
+msgid "Logout"
+msgstr "??"
Added: jifty/trunk/examples/Doxory/share/po/zh_tw.po
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Doxory/share/po/zh_tw.po Fri Apr 13 19:55:39 2007
@@ -0,0 +1,55 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/Doxory/View.pm:8
+msgid "Ask a question!"
+msgstr "????!"
+
+#: lib/Doxory/View.pm:16
+msgid "Ask the crowd!"
+msgstr "???????!"
+
+#: lib/Doxory/Model/Choice.pm:23
+msgid "Asked by"
+msgstr "???"
+
+#: lib/Doxory/Dispatcher.pm:10
+msgid "Choices"
+msgstr "????"
+
+#: lib/Doxory/Model/Vote.pm:18
+msgid "Comments?"
+msgstr "?????"
+
+#: lib/Doxory/Model/Choice.pm:9
+msgid "I need help deciding..."
+msgstr "???, ????..."
+
+#: lib/Doxory/Model/Choice.pm:13
+msgid "On the one hand"
+msgstr "???...?"
+
+#: lib/Doxory/Model/Choice.pm:18
+msgid "On the other hand"
+msgstr "??...?"
+
+#: lib/Doxory/Dispatcher.pm:9
+msgid "Pick!"
+msgstr "??!"
+
+msgid "Logout"
+msgstr "??"
From jifty-commit at lists.jifty.org Sun Apr 15 11:05:12 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 11:05:40 2007
Subject: [Jifty-commit] r3125 - in Template-Declare: lib/Template
Message-ID: <20070415150512.9F8844D8005@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 11:05:11 2007
New Revision: 3125
Modified:
Template-Declare/ (props changed)
Template-Declare/lib/Template/Declare.pm
Log:
r55433@pinglin: jesse | 2007-04-15 10:59:06 -0400
* shut up a warning
Modified: Template-Declare/lib/Template/Declare.pm
==============================================================================
--- Template-Declare/lib/Template/Declare.pm (original)
+++ Template-Declare/lib/Template/Declare.pm Sun Apr 15 11:05:11 2007
@@ -429,6 +429,7 @@
my $subname = shift;
my $coderef = shift;
no strict 'refs';
+ no warnings 'redefine';
*{ $class . '::' . $subname } = $coderef;
}
From jifty-commit at lists.jifty.org Sun Apr 15 11:05:19 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 11:05:44 2007
Subject: [Jifty-commit] r3126 - in Template-Declare: t
Message-ID: <20070415150519.D22DE4D8005@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 11:05:18 2007
New Revision: 3126
Modified:
Template-Declare/ (props changed)
Template-Declare/t/closures.t
Log:
r55434@pinglin: jesse | 2007-04-15 10:59:48 -0400
* todoified new tests for a CPAN release
Modified: Template-Declare/t/closures.t
==============================================================================
--- Template-Declare/t/closures.t (original)
+++ Template-Declare/t/closures.t Sun Apr 15 11:05:18 2007
@@ -90,19 +90,30 @@
}
-for (qw(closure_1 closure_2 closure_3)) {
+for (qw(closure_1 closure_2 )) {
Template::Declare->buffer->clear;
my $simple = Template::Declare->show($_);
#diag ($simple);
-ok($simple =~ /\s*\s*Bolded\s*<\/b>\s*<\/i>/ms);
+like($simple, qr/\s*\s*Bolded\s*<\/b>\s*<\/i>/ms, "$_ matched");
ok_lint($simple);
}
+TODO: {
+local $TODO = 'Need some help figuring out how to make closures work';
+for (qw(closure_3)) {
+Template::Declare->buffer->clear;
+my $simple = Template::Declare->show($_);
+#diag ($simple);
+like($simple, qr/\s*\s*Bolded\s*<\/b>\s*<\/i>/ms, "$_ matched");
+ok_lint($simple);
+}
+
+
for (qw(closure_4 closure_5)) {
Template::Declare->buffer->clear;
my $simple = Template::Declare->show($_);
-ok($simple =~ /My\s*Bolded\s*<\/b>\s*<\/i>/ms);
+ok($simple =~ /My\s*Bolded\s*<\/b>\s*<\/i>/ms, "Showed $_");
#diag ($simple);
ok_lint(Template::Declare->buffer->data());
@@ -116,5 +127,6 @@
ok_lint(Template::Declare->buffer->data());
}
+};
1;
From jifty-commit at lists.jifty.org Sun Apr 15 11:05:24 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 11:05:50 2007
Subject: [Jifty-commit] r3127 - in Template-Declare: lib/Template
Message-ID: <20070415150524.BEE3F4D8005@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 11:05:23 2007
New Revision: 3127
Added:
Template-Declare/Changes
Modified:
Template-Declare/ (props changed)
Template-Declare/MANIFEST
Template-Declare/META.yml
Template-Declare/lib/Template/Declare.pm
Log:
r55435@pinglin: jesse | 2007-04-15 11:03:34 -0400
* Bumped the version, added a Changelog
Added: Template-Declare/Changes
==============================================================================
--- (empty file)
+++ Template-Declare/Changes Sun Apr 15 11:05:23 2007
@@ -0,0 +1,547 @@
+----------------------------------------------------------------------
+r54526 (orig r3102): jesse | 2007-04-06 10:07:35 -0400
+
+ r54525@dhcp207: jesse | 2007-04-06 23:07:11 +0900
+ * duplicate id tests.
+
+----------------------------------------------------------------------
+r54524 (orig r3101): jesse | 2007-04-06 10:04:34 -0400
+
+ r54523@dhcp207: jesse | 2007-04-06 23:04:19 +0900
+ * Patch from gugod++ to perform detection of duplicate html id elements
+
+----------------------------------------------------------------------
+r54518 (orig r3100): jesse | 2007-04-06 06:36:26 -0400
+
+ r54517@dhcp207: jesse | 2007-04-06 19:36:06 +0900
+ * Better handling of 'private' templates for gugod
+
+----------------------------------------------------------------------
+r54400 (orig r3076): jesse | 2007-03-31 21:49:35 -0400
+
+ r54399@pinglin: jesse | 2007-03-31 18:49:21 -0700
+ * This broke nav menus on live. i suck
+
+----------------------------------------------------------------------
+r54394 (orig r3074): jesse | 2007-03-31 21:20:45 -0400
+
+ r54393@pinglin: jesse | 2007-03-31 18:20:31 -0700
+ * more work on closures
+
+----------------------------------------------------------------------
+r54390 (orig r3073): jesse | 2007-03-31 03:21:23 -0400
+
+ r54389@pinglin: jesse | 2007-03-31 00:19:30 -0700
+ * Closer to right handling of embedded tags as closures. I think all that's left is stringification.
+
+
+----------------------------------------------------------------------
+r54260 (orig r3071): jesse | 2007-03-28 01:51:18 -0400
+
+ r54259@pinglin: jesse | 2007-03-27 22:50:53 -0700
+ * So sad. this broke live apps
+
+----------------------------------------------------------------------
+r54257 (orig r3070): jesse | 2007-03-27 23:21:29 -0400
+
+ r54255@pinglin: jesse | 2007-03-27 20:20:21 -0700
+ * Tests for closures
+
+----------------------------------------------------------------------
+r54256 (orig r3069): jesse | 2007-03-27 23:21:18 -0400
+
+ r54254@pinglin: jesse | 2007-03-27 20:18:21 -0700
+ * Getting closer to supporting closures of tags.
+
+----------------------------------------------------------------------
+r54253 (orig r3068): jesse | 2007-03-27 17:47:21 -0400
+
+ r54252@pinglin: jesse | 2007-03-27 14:41:20 -0700
+ * Refactoring outs to make tags into closures
+
+----------------------------------------------------------------------
+r54250 (orig r3067): ruz | 2007-03-27 13:43:19 -0400
+
+* idea about adding attributes to all tags on one level
+ is good, but 'with' is not good candidate for that.
+ Fix a test to according to the current behaviour.
+----------------------------------------------------------------------
+r54248 (orig r3066): ruz | 2007-03-27 06:56:33 -0400
+
+* change prototype of attr function so all tag functions
+ on the same level are called in array context. This
+ fixes a failing test in t/attributes.t
+----------------------------------------------------------------------
+r54247 (orig r3065): ruz | 2007-03-27 06:25:10 -0400
+
+* clear buffer after each test
+----------------------------------------------------------------------
+r54246 (orig r3064): ruz | 2007-03-26 22:40:29 -0400
+
+* tests for attributes
+----------------------------------------------------------------------
+r53849 (orig r3057): clkao | 2007-03-24 14:10:55 -0400
+
+rollback r3052 as it's breaking multiroot resolution.
+----------------------------------------------------------------------
+r53844 (orig r3052): clkao | 2007-03-23 22:22:25 -0400
+
+When calling show, look at the current context rather than global.
+This breaks a test that is arguably wrong by introducing collision.
+
+----------------------------------------------------------------------
+r53842 (orig r3050): clkao | 2007-03-23 21:56:01 -0400
+
+path_for method to do resolution for imported templates.
+----------------------------------------------------------------------
+r53531 (orig r2989): evdb | 2007-03-16 05:15:53 -0400
+
+Added function 'smart_tag_wrapper' that allows tags to be created that have access to the ATTRIBUTES set using 'with'. It attempts to hide most of the complexity of the call from the user and tidies up after itself.
+
+----------------------------------------------------------------------
+r53454 (orig r2971): evdb | 2007-03-15 12:30:44 -0400
+
+Added 'Test::More' build dependency
+----------------------------------------------------------------------
+r53453 (orig r2970): evdb | 2007-03-15 12:27:59 -0400
+
+Added carped warning when you try to 'show' a template that either does not exist or is private and so cannot be used.
+
+----------------------------------------------------------------------
+r52916 (orig r2885): jesse | 2007-03-03 04:17:27 -0500
+
+ r52903@152: jesse | 2007-03-03 00:54:03 +0000
+ 0.06
+
+----------------------------------------------------------------------
+r50024 (orig r2877): jesse | 2007-03-01 12:27:25 -0500
+
+ r49940@pinglin: jesse | 2007-03-01 12:26:05 -0500
+ * Added missing dependency on Class::Accessor
+
+----------------------------------------------------------------------
+r48608 (orig r2869): jesse | 2007-02-28 14:53:40 -0500
+
+ r48606@pinglin: jesse | 2007-02-28 14:53:09 -0500
+ * signature for 0.03
+
+----------------------------------------------------------------------
+r48607 (orig r2868): jesse | 2007-02-28 14:53:33 -0500
+
+ r48605@pinglin: jesse | 2007-02-28 14:49:48 -0500
+ * 0.03
+
+----------------------------------------------------------------------
+r48508 (orig r2833): jesse | 2007-02-23 17:30:09 -0500
+
+ r48504@233: jesse | 2007-02-23 17:24:34 -0500
+ * Better warnings when invalid things get shoved in your Template::Declare root list
+
+----------------------------------------------------------------------
+r47589 (orig r2760): audreyt | 2007-02-07 22:45:56 -0500
+
+* Buffer.pm: Fix the bug where existing content '0' will be eaten away;
+ also squash warnings.
+----------------------------------------------------------------------
+r47588 (orig r2759): clkao | 2007-02-07 03:29:02 -0500
+
+* Fix $self for importing.
+* Rename import to import_templates for now as it's conflicting with
+ jifty::view::declare's import.
+
+----------------------------------------------------------------------
+r47583 (orig r2754): jesse | 2007-02-05 23:14:33 -0500
+
+ r21797@hualien: jesse | 2007-02-06 17:11:57 +1300
+ * Switched from Template::Declare::BUFFER to a buffer object
+
+----------------------------------------------------------------------
+r47413 (orig r2584): jesse | 2007-01-26 07:00:12 -0500
+
+ r21351@hualien: jesse | 2007-01-26 19:46:44 +0800
+ * deprecated too soon
+
+----------------------------------------------------------------------
+r47406 (orig r2577): audreyt | 2007-01-26 06:41:29 -0500
+
+* More misc releng fix.
+----------------------------------------------------------------------
+r47405 (orig r2576): audreyt | 2007-01-26 06:39:30 -0500
+
+* Makefile.PL - Modernize Module::Install usage, as well as listing HTML::Lint
+ as build_requires() so that tests won't randomly fail.
+----------------------------------------------------------------------
+r47354 (orig r2525): jesse | 2007-01-18 00:13:29 -0500
+
+ r21085@hualien: jesse | 2007-01-18 00:12:37 -0500
+ * 0.02
+
+----------------------------------------------------------------------
+r47352 (orig r2523): jesse | 2007-01-18 00:07:08 -0500
+
+ r21082@hualien: jesse | 2007-01-18 00:06:05 -0500
+ * Module::Install update
+
+----------------------------------------------------------------------
+r47351 (orig r2522): jesse | 2007-01-18 00:06:43 -0500
+
+ r21081@hualien: jesse | 2007-01-18 00:05:40 -0500
+ * Better test coverage
+
+----------------------------------------------------------------------
+r47350 (orig r2521): jesse | 2007-01-17 23:29:12 -0500
+
+ r21079@hualien: jesse | 2007-01-17 23:28:57 -0500
+ * More docs!
+ * pod testing
+
+----------------------------------------------------------------------
+r47335 (orig r2506): jesse | 2007-01-16 13:34:54 -0500
+
+ r21007@hualien: jesse | 2007-01-16 13:23:33 -0500
+ *0.01_01
+
+----------------------------------------------------------------------
+r47332 (orig r2503): jesse | 2007-01-15 21:18:02 -0500
+
+ r21001@hualien: jesse | 2007-01-15 21:17:57 -0500
+ * that local should have been a my
+
+----------------------------------------------------------------------
+r47331 (orig r2502): jesse | 2007-01-15 20:59:31 -0500
+
+ r20995@hualien: jesse | 2007-01-15 20:57:42 -0500
+ * doc
+
+----------------------------------------------------------------------
+r47330 (orig r2501): jesse | 2007-01-15 20:59:25 -0500
+
+ r20994@hualien: jesse | 2007-01-15 20:57:36 -0500
+ * tests for aliasing
+
+----------------------------------------------------------------------
+r47329 (orig r2500): jesse | 2007-01-15 20:59:10 -0500
+
+ r20993@hualien: jesse | 2007-01-15 18:56:56 -0500
+ Evil, evil, evil tricks to make self the right packagename
+
+----------------------------------------------------------------------
+r47328 (orig r2499): jesse | 2007-01-15 20:58:56 -0500
+
+ r20992@hualien: jesse | 2007-01-15 17:58:08 -0500
+ * refactoring for readability
+
+----------------------------------------------------------------------
+r47327 (orig r2498): jesse | 2007-01-15 20:58:25 -0500
+
+ r20991@hualien: jesse | 2007-01-15 17:57:23 -0500
+ * refactoring for readability
+
+----------------------------------------------------------------------
+r47326 (orig r2497): jesse | 2007-01-15 17:04:23 -0500
+
+ r20989@hualien: jesse | 2007-01-15 17:03:19 -0500
+ * work on making sure there's a $self available to the template
+
+----------------------------------------------------------------------
+r47325 (orig r2496): jesse | 2007-01-15 16:15:15 -0500
+
+ r20985@hualien: jesse | 2007-01-15 16:11:22 -0500
+ * refactoring the tests utility fucntions
+
+----------------------------------------------------------------------
+r47324 (orig r2495): jesse | 2007-01-15 15:56:41 -0500
+
+ r20982@hualien: jesse | 2007-01-15 15:54:40 -0500
+ * allow imported subclass items
+
+----------------------------------------------------------------------
+r47323 (orig r2494): jesse | 2007-01-15 15:56:29 -0500
+
+ r20981@hualien: jesse | 2007-01-15 15:52:48 -0500
+ * Remove code that had been abstracted to a function
+
+----------------------------------------------------------------------
+r46838 (orig r2475): clkao | 2007-01-06 06:55:43 -0500
+
+Change has_template to lookup only in calling pkg unless used with Template::Declare itself.
+----------------------------------------------------------------------
+r46837 (orig r2474): clkao | 2007-01-06 05:13:34 -0500
+
+failing tests for imported template that uses base.
+----------------------------------------------------------------------
+r46836 (orig r2473): clkao | 2007-01-06 05:09:28 -0500
+
+failing tests expecting correct $self in template blocks.
+----------------------------------------------------------------------
+r46769 (orig r2467): jesse | 2007-01-05 01:03:22 -0500
+
+ r46767@pinglin: jesse | 2007-01-05 01:02:30 -0500
+ * Importing semantics deployed
+
+----------------------------------------------------------------------
+r46768 (orig r2466): jesse | 2007-01-05 01:03:14 -0500
+
+ r46753@pinglin: jesse | 2007-01-04 23:21:33 -0500
+ * more work on import. it now _parses
+
+----------------------------------------------------------------------
+r46505 (orig r2425): jesse | 2006-12-26 23:16:33 -0500
+
+ r46503@pinglin: jesse | 2006-12-26 23:16:22 -0500
+ * default to escaping user content
+
+----------------------------------------------------------------------
+r46504 (orig r2424): jesse | 2006-12-26 23:16:23 -0500
+
+
+----------------------------------------------------------------------
+r46376 (orig r2415): clkao | 2006-12-20 18:01:46 -0500
+
+plan for tests.
+----------------------------------------------------------------------
+r46375 (orig r2414): clkao | 2006-12-20 17:59:32 -0500
+
+failing tests for non-toplevel templates.
+----------------------------------------------------------------------
+r46340 (orig r2410): jesse | 2006-12-20 02:54:02 -0500
+
+ r46333@dhcp64-134-35-102: jesse | 2006-12-19 20:25:21 -0800
+ stray warning
+
+----------------------------------------------------------------------
+r46339 (orig r2409): jesse | 2006-12-20 02:53:18 -0500
+
+ r46332@dhcp64-134-35-102: jesse | 2006-12-19 18:42:56 -0800
+ * only one private tempalte was permitted
+
+----------------------------------------------------------------------
+r46337 (orig r2408): bartb | 2006-12-19 23:02:54 -0500
+
+typo fixes
+----------------------------------------------------------------------
+r46268 (orig r2406): jesse | 2006-12-19 03:08:34 -0500
+
+ r46259@pinglin: jesse | 2006-12-19 03:02:51 -0500
+ * show is no longer called as a method
+ * better handling of client code calling templates with a leading /
+
+ r46267@pinglin: jesse | 2006-12-19 03:08:30 -0500
+ * warning avoidance
+
+----------------------------------------------------------------------
+r46256 (orig r2401): jesse | 2006-12-18 19:45:48 -0500
+
+ r46255@185: jesse | 2006-12-18 19:45:21 -0500
+ * Publish the resolve_template API
+
+----------------------------------------------------------------------
+r46224 (orig r2395): jesse | 2006-12-16 22:48:26 -0500
+
+ r46221@pinglin: jesse | 2006-12-16 21:30:23 -0500
+ * Added support for multiple template roots to template::declare
+
+
+----------------------------------------------------------------------
+r46223 (orig r2394): jesse | 2006-12-16 22:48:10 -0500
+
+ r46220@pinglin: jesse | 2006-12-16 21:18:51 -0500
+ * tests converted to use the ->init method.
+
+
+----------------------------------------------------------------------
+r46222 (orig r2393): jesse | 2006-12-16 22:48:04 -0500
+
+ r46219@pinglin: jesse | 2006-12-16 20:44:13 -0500
+ * Removed the old inheritance system
+
+
+----------------------------------------------------------------------
+r46216 (orig r2390): jesse | 2006-12-16 17:22:36 -0500
+
+ r46213@66: jesse | 2006-12-16 12:57:42 -0800
+ * still not working right.
+ * Code cleanup
+
+----------------------------------------------------------------------
+r46215 (orig r2389): jesse | 2006-12-16 17:22:21 -0500
+
+ r46212@66: jesse | 2006-12-16 12:41:51 -0800
+ * working templates with dots and dashes in their names. (Jifty apps now work again)
+
+----------------------------------------------------------------------
+r46214 (orig r2388): jesse | 2006-12-16 17:22:05 -0500
+
+ r46211@66: jesse | 2006-12-16 11:41:31 -0800
+ * Unbroke support for subtemplates
+
+----------------------------------------------------------------------
+r46084 (orig r2365): jesse | 2006-12-10 21:15:46 -0500
+
+ r46081@pinglin: jesse | 2006-12-11 02:14:42 +0000
+ * _tests_ for private templates.
+
+
+----------------------------------------------------------------------
+r46083 (orig r2364): jesse | 2006-12-10 21:15:34 -0500
+
+ r46080@pinglin: jesse | 2006-12-11 02:06:21 +0000
+ * private templates
+
+----------------------------------------------------------------------
+r46009 (orig r2347): audreyt | 2006-12-08 10:01:27 -0500
+
+* Fix tests to agree with code ;)
+----------------------------------------------------------------------
+r46008 (orig r2346): audreyt | 2006-12-08 10:00:54 -0500
+
+* Semicolon is now optional in T::D declarators:
+ p { }
+ p { }
+ p { }
+----------------------------------------------------------------------
+r46004 (orig r2343): jesse | 2006-12-07 20:08:12 -0500
+
+ r46002@pinglin: jesse | 2006-12-07 18:13:57 +0000
+ * If we're used in an oo manner, don't blow away the caller's lexical
+
+----------------------------------------------------------------------
+r45865 (orig r2340): audreyt | 2006-12-06 11:17:51 -0500
+
+* Template::Declare - Revert obra++'s treatment:
+
+ # default to rather than if there's no content
+
+ and added this comment:
+
+ # We should, in theory, default to rather than if there's no content,
+ # but until all we output is strict XHTML, "" and " "
+ # are rendered incorrectly by gecko -- they require the use of an explicit closing tag
+ # So intead of the correct treatment:
+ #
+ # $BUFFER .= $buf." />";
+ #
+ # we supply a closing tag for now:
+ #
+ $BUFFER .= $buf.">$tag>";
+
+----------------------------------------------------------------------
+r45864 (orig r2339): audreyt | 2006-12-06 11:01:26 -0500
+
+* Template::Declare::Tags: Support for all five style (all mixable):
+
+ div {{ id is 'moose' } span { 'Hi!' } };
+ div { attr { id is 'moose' } span { 'Hi!' } };
+ div { attr { id => 'moose' } span { 'Hi!' } };
+ div { attr { id is 'moose' }; span { 'Hi!' } };
+ div { attr { id => 'moose' }; span { 'Hi!' } };
+
+ The old style is still supported as well:
+
+ with(id => 'moose'), div { span { 'Hi!' } };
+
+----------------------------------------------------------------------
+r45862 (orig r2337): jesse | 2006-12-06 02:23:17 -0500
+
+ r45839@pinglin: jesse | 2006-12-06 01:06:54 -0500
+
+ r45842@pinglin: jesse | 2006-12-06 02:13:13 -0500
+ * Added support for:
+
+ div {
+ attr( id => 'foo');
+
+ outs('my text');
+ }
+
+ In addition to the existing support for:
+
+ div {
+ { id is 'foo' }
+
+ outs('my text');
+ }
+
+ Tested both.
+
+
+----------------------------------------------------------------------
+r45837 (orig r2336): jesse | 2006-12-06 01:03:18 -0500
+
+t/trivial was failing tests because meta elements were being expanded to container nodes. which they are not.
+----------------------------------------------------------------------
+r45780 (orig r2305): audreyt | 2006-12-03 10:57:34 -0500
+
+* Template::Declare::Tags - Encode HTML attributes with underscores:
+
+ # Single underscore: http_equiv ====> http-equiv
+ meta {{ http_equiv is "Refresh", content is "0; $url" }};
+
+ # Double underscore: xml__lang ====> xml:lang
+ body {{ xml__lang is 'x-lojban' }};
+
+----------------------------------------------------------------------
+r45718 (orig r2251): audreyt | 2006-12-01 05:26:17 -0500
+
+* T::D::Tags - Tidy up and avoid redefinition warning.
+----------------------------------------------------------------------
+r45716 (orig r2249): audreyt | 2006-12-01 04:54:52 -0500
+
+* Template::Declare::Tags - Output "... " not "... "
+----------------------------------------------------------------------
+r45713 (orig r2246): audreyt | 2006-12-01 03:58:26 -0500
+
+* Ditch the intermediate CURRENT_ATTRIBUTE structure; now all "attr is foo"
+ immediately emits attributes.
+----------------------------------------------------------------------
+r45711 (orig r2244): audreyt | 2006-12-01 02:32:44 -0500
+
+* Template::Declare - Support for declarative "is" copula on attributes.
+ For example:
+
+ table {{width is '100%'} row {
+ cell {{width is '50%'} $search_region->render };
+ cell {{width is '50%'} $result_region->render };
+ } };
+
+----------------------------------------------------------------------
+r45655 (orig r2241): audreyt | 2006-12-01 00:19:18 -0500
+
+* Template::Declare::Tags - More uniform treatment of hiding &base.
+----------------------------------------------------------------------
+r45654 (orig r2240): audreyt | 2006-12-01 00:12:29 -0500
+
+* Template::Declare::Tags - Tr/td is now row/cell.
+----------------------------------------------------------------------
+r45588 (orig r2220): audreyt | 2006-11-29 13:06:55 -0500
+
+* Template::Declare::Tags - hide the "base" declarator because it conflicts with -base
+ in import line when refreshing.
+----------------------------------------------------------------------
+r45584 (orig r2216): audreyt | 2006-11-29 09:13:25 -0500
+
+* Template::Declare - new utility get_current_attr to get the with() context.
+* Also allow for qualified template declaration and show.
+----------------------------------------------------------------------
+r45583 (orig r2215): audreyt | 2006-11-29 08:44:19 -0500
+
+* Template::Declare - Allow has_template('foo/bar') and has_template('foo::bar').
+* Also, negative version numbers is really hard to deploy. Make it positive.
+----------------------------------------------------------------------
+r45133 (orig r2177): clkao | 2006-11-18 19:15:24 -0500
+
+Export $self.
+----------------------------------------------------------------------
+r44901 (orig r2168): jesse | 2006-11-15 23:55:49 -0500
+
+* License was typoed. -- Thanks to Matt Trout
+----------------------------------------------------------------------
+r44889 (orig r2167): jesse | 2006-11-15 21:42:11 -0500
+
+ * Initial version of Template::Declare
+
+----------------------------------------------------------------------
+r44888 (orig r2166): jesse | 2006-11-15 21:40:31 -0500
+
+
+----------------------------------------------------------------------
Modified: Template-Declare/MANIFEST
==============================================================================
--- Template-Declare/MANIFEST (original)
+++ Template-Declare/MANIFEST Sun Apr 15 11:05:23 2007
@@ -18,10 +18,14 @@
t/99-pod.t
t/aliasing.t
t/arg-declaration-styles.t
+t/attributes.t
+t/closures.t
+t/duplicate_element_ids.t
t/importing.t
t/indexhtml.t
t/private.t
t/self.t
+t/smart_tag_wrapper.t
t/subclassing.t
t/subtemplates.t
t/trivial.t
Modified: Template-Declare/META.yml
==============================================================================
--- Template-Declare/META.yml (original)
+++ Template-Declare/META.yml Sun Apr 15 11:05:23 2007
@@ -16,4 +16,4 @@
Class::Accessor: 0
Class::Data::Inheritable: 0
perl: 5.6.0
-version: 0.06
+version: 0.07
Modified: Template-Declare/lib/Template/Declare.pm
==============================================================================
--- Template-Declare/lib/Template/Declare.pm (original)
+++ Template-Declare/lib/Template/Declare.pm Sun Apr 15 11:05:23 2007
@@ -6,7 +6,7 @@
package Template::Declare;
use Template::Declare::Buffer;
-$Template::Declare::VERSION = "0.06";
+$Template::Declare::VERSION = "0.07";
use base 'Class::Data::Inheritable';
__PACKAGE__->mk_classdata('roots');
From jifty-commit at lists.jifty.org Sun Apr 15 11:05:37 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 11:05:50 2007
Subject: [Jifty-commit] r3128 - Template-Declare
Message-ID: <20070415150537.9762E4D8005@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 11:05:37 2007
New Revision: 3128
Modified:
Template-Declare/ (props changed)
Template-Declare/MANIFEST
Template-Declare/SIGNATURE
Log:
r55436@pinglin: jesse | 2007-04-15 11:04:22 -0400
0.07
Modified: Template-Declare/MANIFEST
==============================================================================
--- Template-Declare/MANIFEST (original)
+++ Template-Declare/MANIFEST Sun Apr 15 11:05:37 2007
@@ -14,7 +14,6 @@
MANIFEST This list of files
META.yml
README
-SIGNATURE
t/99-pod.t
t/aliasing.t
t/arg-declaration-styles.t
Modified: Template-Declare/SIGNATURE
==============================================================================
--- Template-Declare/SIGNATURE (original)
+++ Template-Declare/SIGNATURE Sun Apr 15 11:05:37 2007
@@ -14,10 +14,10 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 dd6c688809f3f5e47cca26f2db53d3b01e711f4f Changes
-SHA1 e3f4ddd12a7b59d743c0d82190d8387f76697d31 MANIFEST
-SHA1 c7ae91daba8ac0d4dbfd2c9648703d3388a169f9 META.yml
-SHA1 4cccbe5d1db060a2a99488bfb13eed54cac7d9f0 Makefile.PL
+SHA1 03abe3b89014989e10e8ed327fd5aa732b80c4c7 Changes
+SHA1 2036c175e32d3a4c2227b2844c5bddda66d8c44e MANIFEST
+SHA1 f69e5e4e9247ea9b9c8b00de7e5aafbe1826676d META.yml
+SHA1 b7e9f53056cd0580ecf2fb753fc3c3452e9648a9 Makefile.PL
SHA1 ac88cc91e2e25f60aec5d1a7b736c12a55641787 README
SHA1 9b2f9d83bcf77860f53a0c07c90a4a59ad9f5df1 inc/Module/Install.pm
SHA1 abe32855d75ab13747cf65765af9947b7a8c3057 inc/Module/Install/Base.pm
@@ -27,25 +27,29 @@
SHA1 381bb98ea3877bba49ae85e7a7ea130645fd3dbf inc/Module/Install/Metadata.pm
SHA1 0c2118868ef82ac517eb6d9c3bd93e6eb9bbf83e inc/Module/Install/Win32.pm
SHA1 e827d6d43771032fa3df35c0ad5e5698d0e54cda inc/Module/Install/WriteAll.pm
-SHA1 f20d24740f854e6deacf6983447b109549384433 lib/Template/Declare.pm
+SHA1 5fb65e7254ac8a165b2107cccd21bfde0c763b61 lib/Template/Declare.pm
SHA1 2a2fc392890d9eedead546a017302e8dc1b4d033 lib/Template/Declare/Buffer.pm
-SHA1 e2592437fa215a4023a6f1fb41ce10e7e91eb77a lib/Template/Declare/Tags.pm
+SHA1 c189a3924b09db60d2136cc8a35aaa976491941a lib/Template/Declare/Tags.pm
SHA1 bb0da54f2b3f2d7955baa41ee458cb3d1887f475 t/99-pod.t
SHA1 24776888683d0119027c87201cee98edbb5d7172 t/aliasing.t
SHA1 69afcad91f98cee7aae476d7925cfa8a8e031b11 t/arg-declaration-styles.t
-SHA1 f156da9df32645faf3dc64ace1a5d552b98d40ab t/importing.t
+SHA1 24db30148a533cad721cb88cb0934cefbd506214 t/attributes.t
+SHA1 cfe5e9a1d49b9c9a8a1ac8578332c7a0074f48fb t/closures.t
+SHA1 94c78c32ac1e16780ff2dd09c6f3b734035f83ac t/duplicate_element_ids.t
+SHA1 c06058b5de4bed61e600e91a475e021e8999da6f t/importing.t
SHA1 bcc7853609975acb08bb40e65901a63268e378ca t/indexhtml.t
-SHA1 639459b84c96e029eb485319b21e6728d9e1ec0a t/private.t
+SHA1 d144de377d45543374f2934462de20e16c4539e4 t/private.t
SHA1 de23aec78ebc456083d8df85cf11d520bb03544f t/self.t
-SHA1 0ffa800f3636df4dc55e65e20826723edd408bcb t/subclassing.t
+SHA1 613d76b8b76c74002da8dff2866539b991b0505a t/smart_tag_wrapper.t
+SHA1 144b47a435c0d84124ddccc69134a4aec60d8b6d t/subclassing.t
SHA1 5b50f7aa3a1ccab318b7418ffcd70e1fdce41189 t/subtemplates.t
-SHA1 6a997717a9b2c7d506b45839f8477332f97b0fb8 t/trivial.t
+SHA1 84d0637de826c842d5e00684c2d50494719b6819 t/trivial.t
SHA1 dde3268bba42de1aa10eb76557c86ccfa7d315a9 t/utils.pl
-SHA1 fa517cb4bbc24e79d202599c16bf1755982c13af t/xss.t
+SHA1 c07bcff77839e622b8b1ecffd492f5ccf0ab359c t/xss.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
-iD8DBQFF6McbEi9d9xCOQEYRAgnjAJ9TJeQssfc4akBpriOADEpTdZ91HwCeMIOO
-iCiFn0m7fYUuCQUVZsgwIWo=
-=NqaV
+iD8DBQFGIj7qEi9d9xCOQEYRAulxAJ9iDCPCzxvbfXzL+OTk8N/jqsuhUwCbBEO5
+5HhgO+9Bmrhn5g2EQAIblPI=
+=No5J
-----END PGP SIGNATURE-----
From jifty-commit at lists.jifty.org Sun Apr 15 11:05:42 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 11:05:51 2007
Subject: [Jifty-commit] r3129 - Template-Declare
Message-ID: <20070415150542.469484D8005@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 11:05:41 2007
New Revision: 3129
Modified:
Template-Declare/ (props changed)
Template-Declare/MANIFEST
Template-Declare/SIGNATURE
Log:
r55437@pinglin: jesse | 2007-04-15 11:04:41 -0400
manifest update
Modified: Template-Declare/MANIFEST
==============================================================================
--- Template-Declare/MANIFEST (original)
+++ Template-Declare/MANIFEST Sun Apr 15 11:05:41 2007
@@ -14,6 +14,7 @@
MANIFEST This list of files
META.yml
README
+SIGNATURE
t/99-pod.t
t/aliasing.t
t/arg-declaration-styles.t
Modified: Template-Declare/SIGNATURE
==============================================================================
--- Template-Declare/SIGNATURE (original)
+++ Template-Declare/SIGNATURE Sun Apr 15 11:05:41 2007
@@ -15,7 +15,7 @@
Hash: SHA1
SHA1 03abe3b89014989e10e8ed327fd5aa732b80c4c7 Changes
-SHA1 2036c175e32d3a4c2227b2844c5bddda66d8c44e MANIFEST
+SHA1 3296277f43a6b0fa24f9a69adef25ff005a93ec4 MANIFEST
SHA1 f69e5e4e9247ea9b9c8b00de7e5aafbe1826676d META.yml
SHA1 b7e9f53056cd0580ecf2fb753fc3c3452e9648a9 Makefile.PL
SHA1 ac88cc91e2e25f60aec5d1a7b736c12a55641787 README
@@ -49,7 +49,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
-iD8DBQFGIj7qEi9d9xCOQEYRAulxAJ9iDCPCzxvbfXzL+OTk8N/jqsuhUwCbBEO5
-5HhgO+9Bmrhn5g2EQAIblPI=
-=No5J
+iD8DBQFGIj8DEi9d9xCOQEYRAmJCAKCHf+mI2DG14UTePPnQP+6n10QofgCcC0tF
+WNfcKJp0p1JpbHK0UanoIMY=
+=nlIz
-----END PGP SIGNATURE-----
From jifty-commit at lists.jifty.org Sun Apr 15 12:07:19 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 12:07:21 2007
Subject: [Jifty-commit] r3130 - in jifty/trunk: doc
Message-ID: <20070415160719.4463E4D8005@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 12:07:18 2007
New Revision: 3130
Added:
jifty/trunk/doc/notes-on-distributed-operations
Modified:
jifty/trunk/ (props changed)
Log:
r55444@pinglin: jesse | 2007-04-15 12:05:49 -0400
* Notes on distributed operation (mostly based on reading papers about Xerox PARC
Added: jifty/trunk/doc/notes-on-distributed-operations
==============================================================================
--- (empty file)
+++ jifty/trunk/doc/notes-on-distributed-operations Sun Apr 15 12:07:18 2007
@@ -0,0 +1,256 @@
+Asynchrony
+Synchrony
+Syncrony
+Syncron
+
+
+
+client-server sync is easy
+consistent distributed replication is ... harder
+
+how do we guarantee a coherent model of the world after sync?
+two possible models:
+
+ - undo local transactions and replay them in globally unique order
+ (This is the bayou model)
+
+ - calculate big deltas to bring local and remote into sync
+
+ svk pull -l, svk push -l
+
+ - replay remote transactions locally until we conflict or are exhausted
+ then batch until we resolve the conflict automatically or require
+ external intervention, then turn around and do the other side?
+ svk pull, svk push
+
+
+How do we deal with "on transaction" behaviour?
+ Some rules should apply only on "this" replica
+ - Send email when we get an update that matches
+ Some rules should apply only when a record is created or modified by a local update (isn't syncced)
+ - When we create a bug report, create a log entry
+ Some rules should apply only when a record is synced
+ - when we sync in a bug report, extract it's associated patches
+ to the local filesystem in ~/patches/to-apply
+
+Getting toward a consistent result:
+
+ All bayou replicas move toward 'eventual consistency' using anti-entropy
+ syncs of deltas.
+ " The Bayou system
+ guarantees that all servers eventually receive all Writes via the
+ pair-wise anti-entropy process and that two servers holding the
+ same set of Writes will have the same data contents."
+
+ " Two important features of the Bayou system design allows
+ servers to achieve eventual consistency. First, Writes are per-
+ formed in the same, well-defined order at all servers. Second, the
+ conflict detection and merge procedures are deterministic so that
+ servers resolve the same conflicts in the same manner."
+
+Merge behaviour:
+
+ Bayou style:
+ 'dependency checks' on write -- "Do any of the preconditions for
+ my attempted write fail?
+ (BayouConflictsSOSPPreprint.pdf)
+
+ on conflict, run a "merge program" - merge programs are application
+ specific. bayou defines standard categories of merge programs
+ that developers can treat as templates
+
+ when unresolvable conflicts hit, punt it to the user.
+
+
+
+ Svn-style:
+ textual merge is fine for simple property databases, but won't
+ deal with "conflicting appointments"
+
+
+Access control:
+
+ * Authentication
+
+ All updates should be signed by an identity.
+
+
+ Jesse resolves task 1:
+ "Task 1, status changed from open to resolved" - Signed by 0xAAAA (Jesse)
+
+ When propagating updates delivered to a replica by another identity, updates should carry their full pedigrees.
+
+ Jesse syncs to clkao:
+ "Task 1, status changed from open to resolved" - Signed by 0xAAAA (Jesse)
+ Clkao syncs to audrey:
+ "Task 1, status changed from open to resolved" - Signed by 0xAAAA (Jesse)
+ - Propagated by 0xBBBB (Clkao) to 0xCCCC (Audreyt) at $TIME
+ Hm. $TIME can't be a timestamp. we don't trust timestamps.
+ Is there any reason to carry full pedigrees? It feels "right"
+ to know how updates get carried around.
+
+ When propagating lumped updates, we probably want to carry the components pedigrees.
+
+
+ clkao understands all of this stuff a lot better than I do. I'm probably 80% wrong.
+
+
+ * Authorization
+
+
+
+
+
+Defining characteristics of Bayou:
+
+ (from eurosigops-96)
+
+ ? Clients can read from and write to any server.
+ ? Servers propagate writes among themselves via a pairwise anti-entropy protocol that permits incremental
+ progress.
+ ? A new database replica, i.e. server, can be created from any existing replica.
+ ? New conflict detection and resolution procedures can be introduced at any time by clients and their applications.
+
+
+Bayou propagation of updates:
+
+ a replica has a history of all changes. Changes are defined as
+ 'committed' or 'tentative'. Tentative changes might get rolled back
+ on conflict....so there's a log of all updates. the database can get
+ rolled back and replayed based on new updates. the order of playback
+ is globally consistent.
+
+ we really don't want the distinction between tentative and committed.
+ this would mean that 'lightweight' clients can't be used as a vector
+ to decrease interserver entropy....it also means that clients can't sync with each other. this is a showstopper.
+
+ sosp-97/AE.pdf describes the bayou anti-entropy replication protocol
+ including an explanationf how to deal with servers which have truncated
+ their write logs. The rollback and insert new transactions scheme
+ described by AE.pdf sounds an awful lot like what Sam Vilain has been doing with splicing perl history, though presents additional challenges not present in a pure software version control system. the splice can introduce new data that needs to propagate forward.
+
+ While bayou servers are weakly connected, they appear to propagate
+ knowledge of all servers to all other servers.
+
+ In an internet-scale system, this feels like it would be a poor choice.
+
+
+Bayou's global ordering
+
+ The big thing about bayou that scares me is their single global order based on time syncronization. How do we actually ensure that random clients are globally synced timewise. There's a protocol floating around in my head. I haven't thoguht it through enough to know if it works. And yes, this text buffer is too small to explain it adequately.
+
+
+Connecting to any server:
+
+ Cool thing about Bayou:
+ Fluid transition between synchronous and asynchronous modes
+ of operations. Multiple collaborators can connect to distinct
+ servers for typical asynchronous operation, or connect to
+ the same server for ?tighter? synchronous operationn
+
+Partial Replication:
+
+ How do we deal with letting a client sync only part of the system?
+
+ None of the bayou papers dealt with it at all.
+
+
+"The Dangers of Replication and a Solution ", Microsoft, et al. (gray96danger.pdf)
+
+ Proposes a two-tier solution. It loses because we don't get mobile to mobile sync
+
+ mobile nodes maintain two copies of every record:
+ a local version and a best-known master.
+
+ online-connected servers are all closely timesynced and transactions are always applied in order.
+ I haven't read far enough into their paper yet, but I can presume that one server is the designated
+ Master and that in the case of disconnect between Master and other online-connected nodes, the Master
+ wins on any conflict that can't be resolved. but in general, updates are resolved actively.
+
+ "Certainly, there are replicated databases: bibles, phone books,
+ check books, mail systems, name servers, and so on. But up-
+ dates to these databases are managed in interesting ways ?
+ typically in a lazy-master way. Further, updates are not record-
+ value oriented; rather, updates are expressed as transactional
+ transformations such as ?Debit the account by $50? instead of
+ ?change account from $200 to $150?. "
+
+ "The two-tier replication scheme begins by assuming there are
+ two kinds of nodes:
+ Mobile nodes are disconnected much of the time. They store a
+ replica of the database and may originate tentative trans-
+ actions. A mobile node may be the master of some data
+ items.
+ Base nodes are always connected. They store a replica of the
+ database. Most items are mastered at base nodes.
+ Replicated data items have two versions at mobile nodes:
+ Master Version: The most recent value received from the ob-
+ ject master. The version at the object master is the master
+ version, but disconnected or lazy replica nodes may have
+ older versions.
+ Tentative Version: The local object may be updated by tenta-
+ tive transactions. The most recent value due to local up-
+ dates is maintained as a tentative value.
+ Similarly, there are two kinds of transactions:
+ Base Transaction: Base transactions work only on master
+ data, and they produce new master data. They involve at
+ most one connected-mobile node and may involve several
+ base nodes.
+ Tentative Transaction: Tentative transactions work on local
+ tentative data. They produce new tentative versions.
+ They also produce a base transaction to be run at a later
+ time on the base nodes.
+
+
+
+
+
+More about authz:
+
+AKA: I CAST PKI. YOUR PROJECT FAILS
+
+
+ Authorization is performed using cryptographically signed assertions:
+
+ Every database has a base "trusted authorizers" property: the public keys of principals allowed to make assertions about it.
+
+ Every database has a list of signed authorization assertions:
+ $PRINCIPAL_KEY_ID has the right $RIGHTNAME for the database with UUID $UUID
+
+
+ $RIGHTNAME is one of:
+
+ manage_access (make authz assertions)
+ change_db_model (send cryptographically signed database schema update assertions)
+ create_records (each of these four CRUD rights can optionally take a table name to check)
+ read_records (bad idea: allow these signed assertions to include a code chunk used to decide applicability)
+ update_records
+ delete_records
+
+
+ We need to protect against Mallory, the malicious user, who will hang on to his authz assertion even after revocation. So, revocations of signed authz assertions should be kept and propagated like regular authz assertions. Servers must never discard revocations or Mallory's malicious transactions could later be reinjected. How do we handle Mallory's pre-revocation non-malicious transactions? Presumably all pre-revocation transactions on the replica where the revocation was generated are
+cryptographically signed by Audrey, the trusted authorizer generating the revocation certificate.
+
+ On every sync, every client should propagate its trust database to the peer.
+
+ While a local user could modify the "trusted authorizers" property to allow an unauthorized user to commit transactions,
+i it would not compromise system integrity as this property would not change on upstream replicas and
+ transactions from unauthorized users, as well as authz assertions by unknown masters would be discarded.
+ It should be possible for a trusted user (Tony) to sign existing transactions generated by his collaborator Ursula,
+ such that they could be passed to tony's upstream replica with a trusted authorizers list whcih does not include ursula
+
+
+Application behaviour:
+
+ * Application-specific behaviours are side effects.
+ * Some side effects run when an update is replicated in
+ * Some side effects run when an update is created locally
+ * Some side effects run when an update first enters the system, regardless of whether it's locally created or replicated
+ * Some side effects only cause other database updates. These can _potentially_ be rolled back when the transaction
+ is created
+ * Some side effects perform an external action. These can never be rolled back. They cascade. Once a side effect has taken place, we're stuck with the transaction.
+
+
+
+
+
From jifty-commit at lists.jifty.org Sun Apr 15 12:07:44 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 12:07:49 2007
Subject: [Jifty-commit] r3131 - in jifty/trunk: .
Message-ID: <20070415160744.185804D8005@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 12:07:40 2007
New Revision: 3131
Added:
jifty/trunk/doc/talks/oscon.2007.dsls.txt
Modified:
jifty/trunk/ (props changed)
jifty/trunk/doc/talks/ (props changed)
Log:
r55445@pinglin: jesse | 2007-04-15 12:06:01 -0400
* Start of the oscon 2007 talk
Added: jifty/trunk/doc/talks/oscon.2007.dsls.txt
==============================================================================
--- (empty file)
+++ jifty/trunk/doc/talks/oscon.2007.dsls.txt Sun Apr 15 12:07:40 2007
@@ -0,0 +1,798 @@
+#title Jesse Vincent - Best Practical
+Domain Specific Languages in Perl
+---
+#title A bit about DSLs
+DSLs are little languages for specific programming tasks
+---
+DSLs are easier to read
+---
+DSLs are more expressive
+---
+DSLs let you optimize your code for coding
+---
+Mostly, I'm going to talk about "Englishy" DSLs
+---
+Not all DSLs are Englishy
+---
+SQL
+---
+Regexes
+---
+Excel Macros
+---
+XML config files
+---
+XSL-T
+---
+GraphViz
+---
+...but I've been on an Englishy DSL kick
+---
+DSLs can be implemented in your 'host' language
+---
+(These get called "internal" DSLs)
+---
+DSLs can be implemented outside your 'host' langauge
+---
+(External DSLs)
+---
+Everything I'm going to talk about is Pure Perl (Internal)
+---
+The Ruby community is big on DSLs
+---
+You can make DSLs in Perl, too
+---
+(but it does take more work in Perl)
+---
+How did I get here?
+---
+#title How did I get here?
+Airplane
+---
+Narita Express
+---
+Subway
+---
+Ok, How'd I really get here?
+---
+All started at OSCON 2005
+---
+DHH demonstrated Rails migrations
+---
+#mode ruby
+class AddUserTable < ActiveRecord::Migration
+ def self.up
+ create_table :users do |table|
+ table.column :name, :string
+ table.column :login, :string
+ table.column :password, :string, :limit => 32
+ table.column :email, :string
+ end
+ end
+
+ def self.down
+ drop_table :users
+ end
+ end
+---
+They looked very sexy
+---
+I was very jealous
+---
+"You can't do this in any other language"
+---
+Never say that to a Perl Hacker
+---
+#title Agenda
+We've made some DSLs
+---
+One for declaring database schema
+---
+(I thought Rails did more. But I never read the manual)
+---
+(It does a lot more than Rails migrations)
+---
+One for web templating
+# loc-ja ?????????????
+---
+(Yes, another web templating system)
+---
+(Hopefully, this one will provide some closure)
+---
+(You'll see)
+---
+One for making web testing easier
+---
+(It's VERY beta)
+---
+(Perfect for Web 2.0)
+---
+#title
+Jifty::DBI::Schema
+---
+#title Jifty::DBI::Schema - The design process
+Delarative Syntax for an Object Relational Mapper
+---
+Started sketching Jifty::DBI columns
+---
+Started with DBIx::SearchBuilder
+---
+Columns were defined as a hash
+---
+#mode perl
+sub _CoreAccessible {
+ { id => {
+ read => 1,
+ sql_type => 4,
+ length => 11,
+ is_blob => 0,
+ is_numeric => 1,
+ type => 'int(11)',
+ default => ''
+ },
+ Name => {
+ read => 1,
+ write => 1,
+ sql_type => 12,
+ length => 200,
+ is_blob => 0,
+ is_numeric => 0,
+ type => 'varchar(200)',
+ default => ''
+ },
+ }
+ ...
+}
+---
+Hashes are kind of ugly
+---
+We spent about a month playing with syntax.
+---
+Our first goal was "feels right"
+---
+Our second goal was "we can implement this"
+---
+I'm going to show you some of our design process
+---
+(It's a mix of code and IRC)
+---
+#mode perl
+$x = Jifty::DBI::SchemaBuilder->new;
+$x->define_blablalb
+$x->bla bla
+---
+#mode perl
+our db_table 'addresses';
+our field name => {
+ has_type 'varchar';
+ has_default 'frank'
+};
+---
+ (by the way, i'm pretty sure we don't get to do the sub-at-the-end thing either... I tried lots of hacky ways to get it working and failed.)
+
+ yeah, I think we're going to end up having a pseudo-sub that's really a hash behind the scenes
+---
+#mode perl
+{
+ my $s = Jifty::DBI::SG->import_functions;
+
+ db_table bla bla bla;
+ field bla;
+ field bar;
+} # $s.DESTROY gets called and unimports db_table/field/...
+---
+(This was astonishingly close to what we do today.)
+---
+#mode perl
+my $schema = Jifty::DBI::RecordSchema->new;
+$schema->for_class(__PACKAGE__);
+
+$schema->field name => {
+ has_type 'varchar';
+ has_default 'Frank'
+}
+
+---
+#mode perl
+
+BEGIN { @ISA = 'Jifty::DBI::Record' }
+use Jifty::DBI::Record; # but this sucks!
+
+use base qw/Jifty::DBI::Record/;
+
+__PACKAGE__->schema_version (0.0001)
+# (or some other method that does two thing evily).
+---
+ we could tie @ISA
+
+ ...I'm kidding
+---
+ we could tie the symbol table
+
+ ...It just doesn't work
+---
+#mode perl
+use base 'Jifty::DBI::Record';
+Jifty::DBI::Record->___from_code();
+
+db_table 'addresses';
+
+field {
+ called 'name'; # ?
+}
+---
+ is
+
+ "has_type 'string'"
+
+definitely better than
+
+ "type => 'string'"
+
+in your book?
+---
+ how would you do:
+
+ refers_to_many RT::Tickets by 'owner';
+
+ hmm. i thought about this before. we can do like simon and
+
+ refers_to_many "RT::Tickets by owner";
+
+ but I don't really like that. parsing is lame.
+
+ I'm *pretty* sure that we can't get the line you've written to compile.
+---
+ I've got a bad perl5 idea for you. Robert claims it's impossible
+
+ I'm trying to make the syntax "refers_to_many 'BTDT::Model::Tasks' by 'owner';" valid perl5 syntax.
+---
+ well, that may be true but you don't want that.
+
+ refers_to_many BTDT::Model::Tasks by 'owner'
+
+ is more readable and easily implemented.
+
+ sub by ($) { by => @_ }
+
+ done!
+
+ stop thinking classes as strings :)
+---
+ shit! it actually works!
+---
+What we had left:
+---
+the "field foo => sub {};" issue
+---
+#mode perl
+
+ # We wanted something that acted like this
+ # But without the ugly 'sub' keyword
+ field email => sub {
+
+ has_type 'varchar';
+ has_default 'Frank';
+};
+
+---
+#mode perl
+# We cculd do this, but it used a hash
+# not a block
+
+field phone => {
+ has_type 'varchar';
+};
+
+field employee_id => {
+ refers_to_a Sample::Employee;
+}
+---
+#mode perl
+
+# This is ugly and verbose
+
+package Sample::Employee;
+
+use base qw/Jifty::DBI::Record/;
+
+__PACKAGE__->db_table 'employees';
+
+__PACKAGE__->field name => has_type 'varchar';
+
+__PACKAGE__->field dexterity => { has_type 'integer'};
+
+---
+#title In the end...
+We ended up with Jifty::DBI columns
+---
+#mode perl
+use Jifty::DBI::Record schema {
+column auth_token => type is 'text',
+ render as 'Unrendered';
+
+column score => type is 'int',
+ is immutable,
+ label is 'Score';
+
+column time_zone =>
+ label is 'Time zone',
+ since '0.0.12',
+ default is 'America/New_York',
+ valid are formatted_timezones();
+};
+---
+We implemented the DSL twice
+---
+#title
+Take 1
+---
+#title Take 1
+Jifty::DBI::Schema
+---
+#title Take 1: Jifty::DBI::Schema
+Our first DSL in Perl
+---
+We beat the parser into submission with a few tricks
+---
+Injection of functions
+---
+We saw that a moment ago
+---
+Clever function prototypes
+---
+Let's have a look at that
+---
+#mode perl
+# The syntax we wanted
+
+score => type is 'int',
+ is immutable,
+ default is '0',
+ render as 'text',
+ label is 'Score',
+ since is '0.0.7';
+---
+#mode perl
+# perl -MO=Deparse parses that as:
+
+'is'->type('int',
+ 'immutable'->is,
+ 'is'->default('0',
+ 'as'->render('text',
+ 'is'->label('Score',
+ 'is'->since('0.0.7')))));
+---
+How can we fix that?
+---
+Prototype hacking!
+---
+#mode perl
+sub is ($) { return shift };
+sub as ($) { return shift };
+sub since ($) { }
+sub type ($) { }
+sub render ($) {}
+sub label ($) {}
+sub default ($) {}
+---
+#mode perl
+
+# Now, perl -MO=Deparse parses that as:
+
+ type(is('int')),
+ is('immutable'),
+ default(is('0')),
+ render(as('text')),
+ label(is('Score')),
+ since(is('0.0.7'));
+---
+Downsides
+---
+Limited flexibility
+---
+Needs new functions for every attribute
+---
+#title Take 2
+#`mpg123 ~/katamari.mp3`
+Object::Declare
+---
+#title Take 2: Object::Declare
+Katamari for Code
+---
+#mode perl
+use Jifty::DBI::Record schema {
+
+ column score => type is 'int',
+ is immutable,
+ render as 'text',
+ default is '0',
+ label is 'Score',
+ since is '0.0.7';
+};
+---
+# mode perl
+# perl -MO=Deparse parses that as:
+
+'is'->type('int',
+ 'immutable'->is,
+ 'is'->default('0',
+ 'as'->render('text',
+ 'is'->label('Score',
+ 'is'->since('0.0.7')))));
+---
+Why fight the parser?
+---
+Perl gives us all the rope we need
+---
+UNIVERSAL:: and ::AUTOLOAD
+---
+What actually happens at compile time:
+
+---
+The 'schema' function in our baseclass takes a code block
+---
+...and returns a closure
+---
+Jifty::DBI::Record::import takes over:
+---
+it takes the closure
+---
+it installs some methods...
+---
+...is::AUTOLOAD and UNIVERSAL::is and as::AUTOLOAD
+---
+it runs the closure
+---
+it hands the result off to a method of your choice
+---
+it removes its magic symbols
+---
+...and then your program gets control back
+---
+#title Jifty::DBI::Schema - end
+That's Jifty::DBI::Schema.
+---
+#title
+Template::Declare
+---
+#title Template::Declare
+A pure Perl Templating Language
+---
+What it looks like
+---
+#mode perl
+template '/pages/mypage.html' => sub {
+ html {
+ head {};
+ body {
+ h1 {'Hey, this is text'};
+ }
+ }
+};
+---
+#mode perl
+template choices => page {
+ h1 { 'My Choices' }
+ dl {
+ my $choices = Doxory::Model::ChoiceCollection->new;
+ $choices->limit(
+ column => 'asked_by',
+ value => Jifty->web->current_user->id,
+ );
+ while (my $c = $choices->next) {
+ dt { $c->name, ' (', $c->asked_by->name, ')' }
+ dd { b { $c->a } em { 'vs' } b { $c->b } }
+ }
+ }
+};
+---
+But!
+---
+Content! Templates!
+---
+Design! Code!
+---
+OMGWTF!? THAT'S WRONG!
+---
+The person who told you it's wrong was lying to you.
+---
+We're Perl hackers
+---
+Why are we writing our templates in another language?
+---
+This is not 1997
+---
+It's 2007
+---
+People use CSS for design now
+---
+Programmers still have to make templates
+---
+Templates run like CODE
+---
+Because they ARE code
+---
+Let's use our CODING tools to work with them
+---
+#mode perl
+#title Refactoring
+
+template 'mypage.html' => page {
+ h1 { 'Two choices' };
+ div { attr { class => 'item' };
+ h2 { 'Item 1'};
+ };
+ div { attr { class => 'item' };
+ h2 { 'Item 2'};
+ };
+};
+---
+#title Refactoring
+#mode perl
+
+template 'mypage.html' => page {
+ h1 { 'Two choices' };
+ for ("Item 1", "Item 2") { item($_); }
+};
+
+sub item {
+ my $content = shift;
+ div {
+ attr { class => 'item' };
+ h2 {$content};
+ };
+
+}
+---
+We can refactor templates!
+---
+Have you ever tried to refactor HTML?
+---
+Our HTML is magically valid
+---
+(Syntax errors are...Syntax Errors)
+---
+#title Stashing our templates
+#mode perl
+template '/foo/index.html' => sub {... };
+---
+'sub template' takes a name and a coderef
+---
+But where do we put these?
+---
+We need a global stash
+---
+It needs to be per package
+(Don't want to mix things together)
+---
+Basically, we need a symbol table
+---
+It's Perl
+---
+We have THE symbol table
+---
+But URLs have characters that are illegal in sub names. :/
+---
+Actually, Perl doesn't care
+---
+#mode perl
+no strict 'refs';
+*{ $class . '::' . $subname } = $coderef;
+---
+That just works.
+---
+Even if your sub is named './\\foo#title <>'
+---
+But how do you call it?
+---
+#mode perl
+# perldoc UNIVERSAL
+---
+CLASS->can( METHOD )
+"can" checks if the object or class has a method called "METHOD".
+If it does then a reference to the sub is returned.
+---
+#title Closures
+Now, about that syntax.
+---
+HTML tags take blocks of content
+---
+Our tag methods take blocks of Perl
+---
+They return closures when you want them to
+---
+They run and output their content when you want them to
+---
+#mode perl
+sub h1 (&;$) {
+ my $code = shift;
+
+ ...
+
+ if (defined wantarray) {
+ return sub { ...closure around $code...};
+ } else {
+ # Actually do our work, run $code and return the output
+ return $code->();
+ }
+}
+---
+We install methods for every HTML tag
+---
+(Except 'tr'. Anybody know why?)
+---
+#mode perl
+use CGI ();
+install_tag($_)
+ for ( @CGI::EXPORT_TAGS{
+ qw/:html2 :html3 :html4
+ :netscape :form/}
+);
+---
+#title Not everything is roses
+(Here's where it all goes wrong)
+---
+HTML Attributes
+---
+# mode perl
+# What we've got:
+
+div { attr { id => 'my-div'};
+ ...
+};
+
+# and
+
+with ( id => 'my-div'), div {
+...
+};
+---
+# mode perl
+# What I think I'd like:
+
+div ( id => 'my-div' ), {
+...
+}
+---
+So, what's the big problem?
+---
+Just change the prototype
+---
+In Perl, the (&) in a prototype MUST come first
+---
+ORZ
+---
+Can anybody help me?
+---
+#title Template::Declare - end
+That's Template::Declare
+---
+#title
+Test::WWW::Declare
+---
+#title Test::WWW::Declare
+A language for testing web applications
+---
+In early development
+---
+It might change
+---
+Web test scripts are UGLY
+---
+Test::WWW::Declare is PRETTY
+---
+Simple, declarative web testing
+---
+Easy to read
+---
+Easy to write
+---
+Looks more like what users do
+---
+#mode perl
+# Test::WWW::Mechanize
+
+my $server=Jifty::Test->make_server;
+isa_ok($server, 'Jifty::Server');
+my $URL = $server->started_ok;
+my $mech = Jifty::Test::WWW::Mechanize->new;
+$mech->get_html_ok($URL);
+like($mech->uri, qr{splash},
+ 'Redirected to splash page');
+---
+The insides are great
+---
+The syntax ain't
+---
+We built on Test::More and WWW::Mechanize
+---
+#mode perl
+
+# Test::WWW::Declare
+
+session "search" => run {
+ flow "google searches work" => check {
+ get 'http://google.com/ncr';
+ fill form 'f' => {
+ q => 'Squeamish ossifrage' };
+ click button 'Google Search';
+ }
+};
+---
+Regular tests keep running on failure
+---
+Makes no sense when a failure means you lose context
+---
+Every 'check' block aborts on failure
+---
+Abort means 'failing test'
+---
+Every 'session' has a cookie jar and WWW::Mechanize
+---
+#mode perl
+session "check logins" => run {
+ flow "basic connectivity" => check {
+ get 'http://fsck.com';
+ content should match qr{fsck.com};
+ click href qr{book};
+ content should match qr{RT Essentials}i;
+ };
+};
+---
+What's the weird syntax?
+---
+# mode perl
+content should match qr{RT Essentials}i;
+---
+#mode perl
+content should match qr{RT Essentials}i;
+
+# vs
+
+ok($req->content =~ /RT Essentials/i);
+---
+# mode perl
+# How do we make this valid perl?
+
+content should match qr{RT Essentials}i;
+---
+Prototypes
+---
+#mode perl
+sub match ($) {
+ return shift;
+}
+---
+#mode perl
+sub should ($) {
+ my $item = shift;
+ return $item;
+}
+---
+#mode perl
+sub content ($) {
+ my $regex = shift;
+ unless ( mech()->content =~ /$regex/ ) {
+ die "Content did not match $regex";
+ }
+}
+---
+#title Test::WWW::Declare - end
+That's Test::WWW::Declare
+---
+#title Conclusion
+Creating DSLs is lots of fun
+---
+Creating DSLs can be a lot of work
+---
+Creating DSLs helps you learn Perl internals
+---
+Creating DSLs helps find bugs in Perl
+---
+DSLs can make coding more fun
+---
+Challenge: CPAN some Japanese DSLs
+---
+Thanks
+---
From jifty-commit at lists.jifty.org Sun Apr 15 12:07:51 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 12:07:57 2007
Subject: [Jifty-commit] r3132 - in jifty/trunk: t/TestApp/t
Message-ID: <20070415160751.37B5B4D8005@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 12:07:49 2007
New Revision: 3132
Modified:
jifty/trunk/ (props changed)
jifty/trunk/t/TestApp/t/15-template-subclass.t
Log:
r55446@pinglin: jesse | 2007-04-15 12:06:10 -0400
* Todoifying tests for release
Modified: jifty/trunk/t/TestApp/t/15-template-subclass.t
==============================================================================
--- jifty/trunk/t/TestApp/t/15-template-subclass.t (original)
+++ jifty/trunk/t/TestApp/t/15-template-subclass.t Sun Apr 15 12:07:49 2007
@@ -68,8 +68,14 @@
isa_ok( $server, 'Jifty::Server' );
my $URL = $server->started_ok;
+TODO: {
+
+local $TODO = " Template subclassing needs some love";
+
my $mech = Jifty::Test::WWW::Mechanize->new;
foreach my $test (@tests) {
$mech->get_ok( $URL . $test->{url}, "get '$URL: /jifty/jifty/trunk/t/TestApp/t/15-template-subclass.t $test->{url}'" );
$mech->content_contains( $test->{text}, "found content '$test->{text}'" );
}
+
+};
From jifty-commit at lists.jifty.org Sun Apr 15 12:32:05 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 12:32:08 2007
Subject: [Jifty-commit] r3133 - jifty/trunk
Message-ID: <20070415163205.EF62B4D8071@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 12:32:05 2007
New Revision: 3133
Modified:
jifty/trunk/ (props changed)
jifty/trunk/Makefile.PL
Log:
r55450@pinglin: jesse | 2007-04-15 12:31:42 -0400
* Some of our 'optional' deps are required for Jifty's tests. Thanks to Nicholas Clark
Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL (original)
+++ jifty/trunk/Makefile.PL Sun Apr 15 12:32:05 2007
@@ -61,6 +61,10 @@
requires('SQL::ReservedWords');
requires('Template::Declare' => '0.06'); # Template::Declare::Tags
requires('Test::Base');
+requires('Test::More' => 0.62 ),
+requires('Test::Pod::Coverage'),
+requires('Test::WWW::Mechanize' => 1.04 ),
+requires('WWW::Mechanize' => 1.12 ),
requires('UNIVERSAL::require');
requires('URI');
requires('XML::Writer' => '0.601');
@@ -93,12 +97,8 @@
recommends('Module::Install::Admin' => '0.50'),
($^O ne 'MSWin32' ? recommends('Test::HTTP::Server::Simple' => '0.02' ) : ()),
recommends('Test::HTML::Lint'),
- recommends('Test::More' => 0.62 ),
recommends('Test::MockModule' => '0.05'),
recommends('Test::MockObject' => '1.07'),
- recommends('Test::Pod::Coverage'),
- recommends('Test::WWW::Mechanize' => 1.04 ),
- recommends('WWW::Mechanize' => 1.12 ),
recommends('Module::Refresh' => '0.09')
],
'Development of the jifty framework' => [
From jifty-commit at lists.jifty.org Sun Apr 15 12:55:48 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 12:55:50 2007
Subject: [Jifty-commit] r3134 - in jifty/trunk: lib
Message-ID: <20070415165548.A06D44D80C4@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 12:55:47 2007
New Revision: 3134
Modified:
jifty/trunk/ (props changed)
jifty/trunk/Changelog
jifty/trunk/Makefile.PL
jifty/trunk/lib/Jifty.pm
Log:
r55452@pinglin: jesse | 2007-04-15 12:54:47 -0400
* Require current T::D
r55453@pinglin: jesse | 2007-04-15 12:54:59 -0400
* Bump for release
r55454@pinglin: jesse | 2007-04-15 12:55:21 -0400
* Require new Jifty::DBI
Modified: jifty/trunk/Changelog
==============================================================================
--- jifty/trunk/Changelog (original)
+++ jifty/trunk/Changelog Sun Apr 15 12:55:47 2007
@@ -1,3 +1,238 @@
+Jifty 0.70415
+ * zh-tw L10N for authen/passwd/user plugins.
+ * WWW::Mechanize 1.22 removed the form method.
+ thanks to hdp for noticing/poking
+ * render_region should have default empty path.
+ * Jifty::Plugin::REST::Dispatcher - Gugod pointed out that we don't need to
+ stringify() the object-to-data output, because (esp for nested structures)
+ it's far more convenient to have the $accept-specific formatter (e.g.
+ YAML or JSON) to render it.
+ * Added render_as_yui_menubar in Menu.pm
+ * Upgraded YUI to 2.2.1
+ * NOTICE: if you are using yui tabview,
+ please use tabview.css instead of tabs.css
+ * Added yui/element-beta.js and yui/menu.js in Web.pm
+ * Allow '->superuser' to be both an object and class method.
+ * added audreyt's Doxory demo app from doc/talks/yapcasia2007-doxory.pdf
+ * Add doc and prefork dependency so the doc and dep tests pass
+ * Preforking server support for Jifty::Server
+ * Refactoring to support more template engines
+ * fix "open" class in menu - active menu item doesn't imply current open item
+ * Jifty::Plugin - Authentication::Password now auto-loads LetMe and User.
+ * added a "SkipAccessControl" framework directive
+ * Doc: Add section on using models/actions outside of a Jifty app
+ * fix handling of multi-line data when encoded in JSON -- they should never
+ wrap over multiple lines in generated output
+ * helpers improvements for T::D
+ * Make CurrentUser->new work as a method on an instance, so that
+ as_superuser works.
+ * Added a 'None' session type for when your application doesn't need sessions
+ * Can't just check to see if the config exists to decide whether to
+ initialze the Jifty object
+ * Make render_region resolve relative template in current context.
+ * We load the config on demand now, so it always exists. Test for
+ classloader existence, instead of config existence, to tell whether or
+ not we need to Jifty->new.
+ * Refactor the I18N plugin stuff to not fail tests.
+ * Make sure test coverage copes with new jifty->config
+ * Better plugin I18N
+ * Plugin paths don't need to convert because File::ShareDir::module_dir
+ always returns an absolute path. I have added also modification checking
+ to the Jifty::I18N::refresh for plugin po files. -- Alexey Grebenschikov
+ * Log::Log4perl::Appender::String (used in tests) was only added in 1.02;
+ require at least that
+ * Switch Jifty->config to automatic instantiation
+ * Added a basic test stub for Jifty::Test::WWW::Mechanize. -sterling
+ * don't require a bunch of unused modules that don't trickle to the templates
+ * don't set the Home tab twice
+ * use Pod::Simple::HTML where we need it
+ * Administration and Online docs tabs are set in Jifty/Plugin/*/Dispatcher.pm
+ * When running coverage, don't use Class::Accessor::Named as it uses
+ Hook::LexWrap
+ * don't load up PodSimple and other friends unless you've actually enabled
+ AdminMode and brought OnlineDocs into the picture
+ * Modified submit_html_ok to make it behave like the documentation says it
+ should.
+ * Don't create a new config object every time we look at the db version
+ * Added the ability to have a return button that looks like a submit button
+ on a form.
+ * When you rest a lost password, email address is implicitly confirmed
+ * extracted dump_rules into DumpDispatcher plugin -dpavlin
+ * more quieting down of "couldn't drop that database that shouldn't have
+ existed in the first place" warnings
+ * keep old LDAP and CAS plugins usable,
+ THIS COULD BREAK APP MODELS NAME
+ LDAPUser and CASUser models are now User -yves
+ * Autogenerate Package::Action when we need it
+ * Jifty: We now depend on Scalar::Defer 0.10 to not break the *_
+ localization.
+ * Jifty::DBI::Param::Schema - Mention how to use "defer".
+ * Remove legacy naming from the Auth::Password plugin # nelhage++
+ * The plugin classloader is wrong. it's going away forever
+ * LetMes need to deal with user objects as superuser to get their tokens
+ * next major round of work on the login plugin. signup now works
+ slightly better debug logging from the jifty dispatcher
+ * Slightly better mail sending defaults
+ * When we use App::Class, actually require the module, to save the user some
+ typing
+ * Changes to the dispatching to templates:
+ * only add '/index.html' to the path given if there is no template that can
+ handle the given path.
+ * template_exists now checks for Template::Declare templates too
+ * tests that check that T::D templates are preferred over Mason templates.
+ * Set some svn:ignore properties so that generated files don't litter the
+ tree
+ * Include the jifty skeleton app by default.
+ * make the 'hey! it's admin mode' bit not overwrite the menu
+ * TD fragments and unicode needed some massage.
+ * Next pass at a login/signup password auth plugin. Now supports login and
+ logout and signup
+ * Jifty::CurrentUser now has a default "_init" behaviour.
+ * The password auth plugin now works
+ * Updated the 'feeds' section in J:M::Cookbook to not lie about the way
+ XML::Feed actually works. Arguably it /should/ work the way we described
+ ("your implementation is showing"), but fixing the docs was easier than
+ submitting a patch to someone else's module.
+ * Now we can inherit actions from plugins
+ * fixed incorrect documentation of _ and added a SYNOPSIS
+ * "final" Mergedown of the Template-Declare branch of Jifty.
+ - New Template::Declare based templating system (optional)
+ - Significant work on plugins
+ - Significant refactoring
+ - Many jifty features extracted to 'mandatory' plugin applets.
+ (These should be made optional or removable over time)
+ * Doc patch for how to do multiple "onclick" actions - jpollack@gmail.com
+ * Log::Log4perl::Appender::String (used in tests) was only added in
+ 1.02; require at least that
+ * add doc to manage a superuser group
+ * add doc to emulate updated_on
+ * Add note to cookbook showing how to change other fields using ajax
+ canonicalization
+ * Basic handler for running Jifty under mod_perl2. Tested under Unbuntu
+ Feisty, with a default Apache2/MP2 install. Requires a config change,
+ explained in the perldoc. -rodi
+ * examples/{Chat,Clock,Ping}/: Use Jifty::Server::Fork instead of
+ stub ::Server subclasses.
+ * Jifty::Server::Fork - New module to conveniently express
+ a forking builtin server.
+ * Plugin templates should override the core, but not application templates
+ * Since we use the schema tool to manage jifty's database, it's important
+ that it be able to be called from running code (including a DESTROY block). As it was, we were initializing (reinitializing) Jifty from within the
+ DESTROY. That doesn't work so well.
+ * Better test for "jifty already initted"
+ * Fix adding columns during an upgrade.
+ * added a Deploying page to the manual based on the process I have found
+ successful
+ * updated the upgrading manual and added a few extra glossary items
+ * DBD::pg passes postgres' warnings up, so try to convert their various
+ logging levels back to Log4Perl levels.
+ Completely heuristic, probably wants more guarding so it doesn't
+ reach out and bite someone.
+ * This quiets some of the most annoting warns revealed when I removed
+ the log-level downing in Script/Schema.pm
+ * Added support for schema_version() in records
+ * Updated the schema upgrade process to handle renames more nicely
+ * Added a simple test for upgrading
+ * YAML.pm is currently required even if YAML::Syck is present.
+ The Makefile now requires YAML even if you have a C compiler
+ and are installing YAML::Syck.
+ * added a CUSTOMIZATION section to the Jifty::Action docs
+ * upping require for IPC::PubSub to 0.23 due to use of disconnect
+ * Disconnect PubSub before dropping the database
+ * Solve copious global destruction warnings
+ * send correct HTTP/1.1 headers for caching when running Jifty with
+ DevelMode: 0
+ * Support POSTing to /=/model/Foo to create items without specifying a PK
+ * lib/Jifty/Manual/TutorialRest.pod - quick overview of REST plugin
+ * don't double warn. Now that we stopped schema creation from suppressing
+ warnings this *shouldn't* be necesary
+ * stop hiding messages/warns from the database during tests
+ * default to only showing WARN and higher when running tests
+ (rather than our more normal INFO)
+ * Added the ability to force arguments and path when rengering a region.
+ This lets developers force override something passed in via ajax or a
+ "sticky" value from a previous request.
+ * Jifty::Script - Assume "jifty fastcgi" when we are running under cgi.
+ * I18N and zh-* L10N for menu and halo.
+ * fix JScript conditional compilation bug. Jifty.Utils.isMSIE works now.
+ * strict, warnings, and redefinition warning avoidance for
+ J::Module::Pluggable.
+ * Alternate implementation of Module::Pluggable::Object's _require method to
+ avoid a useless string eval.
+ * Actually carp from within our log warning handler, to not swallow critical
+ debugging into
+ * Jifty::Logger - Properly respect previous $SIG{__WARN__} handler
+ if Log4Perl isn't yet initialized; that means we won't silently
+ discard compile-time errors from our model classes, though they
+ are still demoted as warnings.
+ * Refactored Jifty::Script::Schema to use extracted column, table and db
+ manipulation routines
+ * Extract the "load model related classes" logic in the class loader to its
+ own function
+ * A new method provides a tantalizing glimpse of jifty's forthcoming "load
+ models from the database" support
+ * Added table and column schema generation methods to Jifty::Record, based on an extraction of Jifty::Script::Schema
+ * Added "create db" and "drop db" methods to Jifty::Handle
+ * Added the 'bootstrap' option to vanilla Jifty::CurrentUser. Now there's one fewer cases where you need a custom CurrentUser class
+ * Jifty::Util - Add a generate_uuid method and use it to generate
+ ApplicationUUID.
+ * Jifty::Script::App - Make the generated Makefile.PL more canonical.
+ * Jifty::Util - only requires ExtUtils::MM at request.
+ * Jifty::Util - fixed the broken Win32 logic:
+ - use ExtUtils::MM before calling MM->maybe_command
+ - ignore the case of letters when comparing file names
+ * Change all tests for the literal Driver string "SQLite"
+ to a regex match to /SQLite/, in anticipation of fancy
+ drivers such as SVK::SQLite.
+ * enable UTF-8 flag awarness in JSON libraries to fix problem in validation
+ of values during creating a record via the admin interface when column has
+ valid values with unicode chars.
+ * include iepngfix 1.0
+ * add MIME type text/x-component for .htc file
+ * howto document for iepngfix
+ * Our fallback I18N handle needs to specify that it should autocreate keys
+ if they're not found
+ * Jifty::I18N: Provide a default fallback lexicon class for "en"
+ so Locale::Maketext won't clobber our $@ stack.
+ * Jifty::I18N - Avoid naked eval{} that clobbers $@.
+ * Jifty::Web - Add private accessor for _state_variables to
+ avoid typo-prone ->{'state_variables'}.
+ * REST: Implementation for PUT and DELETE on model items
+ * Canonicalize/validate after typing and blurring, too
+ * Modernization of model declarations for compatibility with new
+ Object::Declare based Jifty::DBI
+ * updating to 'max_length' name for the parameter formerly known as 'length'
+ * Jifty: Deprecate ->length in web form and param fields;
+ write ->max_length instead.
+ * Allow create, load_or_create and load_by_cols to be used as class methods.
+ * REST: Show an action HTML form when rendering /=/action/App.Action.Foo as
+ HTML
+ * Fix running actions (checking for allowed-ness was done wrong)
+ * Cut down on a lot of the crap that we outputed and fix up structure
+ * Make it possible to request XML from the URL like the other data formats
+ * Show action params in any data format instead of just an HTML form
+ * Only allow method calls if the "field" is actually a column
+ * Force stringification so that we don't segfault trying to output blessed
+ references and what not
+ * added the update method which reconstructs the locale
+ handle (used by Jifty::Handler::handle_request) [Jifty::I18N]
+ * &_(loc) now uses the global locale handle instead of
+ the one set up during Jifty::I18N->new(). [Jifty::I18N]
+ * Audrey's refresh method now always calls C
+ either directly or indirectly (via C) [Jifty::I18N]
+ * C now always calls
+ Jifty::I18N->update directly or indirectly
+ (via Crefresh>) [Jifty::Handler]
+ * Misc minor startup-time performance improvements
+ * Only run onsubmit() if we have an onsubmit property
+ * Support for controlling browser-based autocomplete on form fields
+ * Fix how fake buttons submit forms -trs
+ * Gotta double-quote keybinding labels if they have embedded newlines.
+ * Warnings when a developer puts a "show" into a "before" or "after"
+ dispatcher rule.
+
+
+
Jifty 0.70117
Dependencies:
* Bumped the minimum required version of Jifty::DBI to 0.30
Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL (original)
+++ jifty/trunk/Makefile.PL Sun Apr 15 12:55:47 2007
@@ -42,7 +42,7 @@
requires('Hash::Merge');
requires('Hook::LexWrap');
requires('IPC::PubSub' => '0.23' );
-requires('Jifty::DBI' => '0.31' ); # Jifty::DBI::Collection Jifty::DBI::Handle Jifty::DBI::Record::Cachable Jifty::DBI::SchemaGenerator
+requires('Jifty::DBI' => '0.40' ); # Jifty::DBI::Collection Jifty::DBI::Handle Jifty::DBI::Record::Cachable Jifty::DBI::SchemaGenerator
requires('Locale::Maketext::Extract' => '0.20');
requires('Locale::Maketext::Lexicon' => '0.60');
requires('Log::Log4perl' => '1.04');
@@ -59,7 +59,7 @@
requires('Shell::Command');
requires('String::Koremutake');
requires('SQL::ReservedWords');
-requires('Template::Declare' => '0.06'); # Template::Declare::Tags
+requires('Template::Declare' => '0.07'); # Template::Declare::Tags
requires('Test::Base');
requires('Test::More' => 0.62 ),
requires('Test::Pod::Coverage'),
Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm (original)
+++ jifty/trunk/lib/Jifty.pm Sun Apr 15 12:55:47 2007
@@ -11,7 +11,7 @@
require Time::Local;
# Declare early to make sure Jifty::Record::schema_version works
- $Jifty::VERSION = '0.70117';
+ $Jifty::VERSION = '0.70415';
}
=head1 NAME
From jifty-commit at lists.jifty.org Sun Apr 15 13:02:55 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 13:02:57 2007
Subject: [Jifty-commit] r3135 - jifty/trunk
Message-ID: <20070415170255.820664D8005@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 13:02:55 2007
New Revision: 3135
Modified:
jifty/trunk/ (props changed)
jifty/trunk/MANIFEST
Log:
r55456@pinglin: jesse | 2007-04-15 13:01:48 -0400
manifest update
Modified: jifty/trunk/MANIFEST
==============================================================================
--- jifty/trunk/MANIFEST (original)
+++ jifty/trunk/MANIFEST Sun Apr 15 13:02:55 2007
@@ -27,6 +27,7 @@
doc/jifty-model-svk
doc/jifty-plugins-2.0
doc/jifty-web-form-etc
+doc/notes-on-distributed-operations
doc/packaging
doc/plugin-requirements
doc/plugin-syntax
@@ -54,6 +55,29 @@
examples/Clock/Makefile.PL
examples/Clock/share/web/templates/fragments/time
examples/Clock/share/web/templates/index.html
+examples/Doxory/bin/jifty
+examples/Doxory/doxory
+examples/Doxory/etc/config.yml
+examples/Doxory/lib/Doxory/Dispatcher.pm
+examples/Doxory/lib/Doxory/Model/Choice.pm
+examples/Doxory/lib/Doxory/Model/User.pm
+examples/Doxory/lib/Doxory/Model/Vote.pm
+examples/Doxory/lib/Doxory/View.pm
+examples/Doxory/Makefile.PL
+examples/Doxory/share/po/zh_cn.po
+examples/Doxory/share/po/zh_tw.po
+examples/Doxory/t/00-model-User.t
+examples/Example-Todo/bin/jifty
+examples/Example-Todo/etc/config.yml
+examples/Example-Todo/example_todo
+examples/Example-Todo/inc/Module/Install.pm
+examples/Example-Todo/inc/Module/Install/Base.pm
+examples/Example-Todo/inc/Module/Install/Metadata.pm
+examples/Example-Todo/inc/Module/Install/WriteAll.pm
+examples/Example-Todo/lib/Example/Todo/Model/Todo.pm
+examples/Example-Todo/Makefile.PL
+examples/Example-Todo/META.yml
+examples/Example-Todo/t/00-model-Todo.t
examples/HelloKitty/bin/jifty
examples/HelloKitty/etc/config.yml
examples/HelloKitty/hellokitty
@@ -153,23 +177,37 @@
lib/Jifty/Plugin/AdminUI.pm
lib/Jifty/Plugin/AdminUI/View-not-yet.pm
lib/Jifty/Plugin/Authentication/Password.pm
+lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm
lib/Jifty/Plugin/Authentication/Password/Action/GeneratePasswordToken.pm
lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
-lib/Jifty/Plugin/Authentication/Password/Model/User.pm
+lib/Jifty/Plugin/Authentication/Password/Action/Logout.pm
+lib/Jifty/Plugin/Authentication/Password/Action/ResendConfirmation.pm
+lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm
+lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm
+lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm
+lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm
+lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm
+lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm
+lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm
+lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmLostPassword.pm
+lib/Jifty/Plugin/Authentication/Password/View.pm
lib/Jifty/Plugin/ClassLoader.pm
lib/Jifty/Plugin/CompressedCSSandJS.pm
lib/Jifty/Plugin/CompressedCSSandJS/Dispatcher.pm
lib/Jifty/Plugin/ErrorTemplates.pm
lib/Jifty/Plugin/ErrorTemplates/View.pm
lib/Jifty/Plugin/Halo.pm
+lib/Jifty/Plugin/LetMe.pm
+lib/Jifty/Plugin/LetMe/Dispatcher.pm
lib/Jifty/Plugin/OnlineDocs.pm
+lib/Jifty/Plugin/OnlineDocs/Dispatcher.pm
lib/Jifty/Plugin/REST.pm
lib/Jifty/Plugin/REST/Dispatcher.pm
lib/Jifty/Plugin/SkeletonApp.pm
lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm
lib/Jifty/Plugin/SkeletonApp/View.pm
lib/Jifty/Plugin/User.pm
-lib/Jifty/Plugin/User/Model/User.pm
+lib/Jifty/Plugin/User/Mixin/Model/User.pm
lib/Jifty/Plugin/Yullio/View.pm
lib/Jifty/Record.pm
lib/Jifty/Request.pm
@@ -193,6 +231,8 @@
lib/Jifty/Script/Server.pm
lib/Jifty/Server.pm
lib/Jifty/Server/Fork.pm
+lib/Jifty/Server/Prefork.pm
+lib/Jifty/Server/Prefork/NetServer.pm
lib/Jifty/Subs.pm
lib/Jifty/Subs/Render.pm
lib/Jifty/Test.pm
@@ -232,6 +272,7 @@
lib/Jifty/Web/PageRegion.pm
lib/Jifty/Web/Session.pm
lib/Jifty/Web/Session/ClientSide.pm
+lib/Jifty/Web/Session/None.pm
lib/Jifty/YAML.pm
Makefile.PL
MANIFEST This list of files
@@ -263,7 +304,7 @@
plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/Action/CASLogout.pm
plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/CurrentUser.pm
plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/Dispatcher.pm
-plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/Model/CASUser.pm
+plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/Model/User.pm
plugins/AuthCASOnly/Makefile.PL
plugins/AuthCASOnly/MANIFEST
plugins/AuthCASOnly/share/web/templates/caslogin
@@ -295,7 +336,7 @@
plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/Action/LDAPLogout.pm
plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/CurrentUser.pm
plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/Dispatcher.pm
-plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/Model/LDAPUser.pm
+plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/Model/User.pm
plugins/AuthLDAPOnly/Makefile.PL
plugins/AuthLDAPOnly/MANIFEST
plugins/AuthLDAPOnly/share/po/en.po
@@ -312,6 +353,8 @@
plugins/AuthzLDAP/share/po/fr.po
plugins/AuthzLDAP/share/web/templates/error/AccessDenied
plugins/AuthzLDAP/t/00-load.t
+plugins/DumpDispatcher/lib/Jifty/Plugin/DumpDispatcher.pm
+plugins/DumpDispatcher/Makefile.PL
plugins/EditInPlace/debian/changelog
plugins/EditInPlace/debian/compat
plugins/EditInPlace/debian/control
@@ -432,8 +475,22 @@
share/web/static/css/nav.css
share/web/static/css/notices.css
share/web/static/css/yui/calendar/calendar.css
+share/web/static/css/yui/menu/map.gif
+share/web/static/css/yui/menu/menu.css
+share/web/static/css/yui/menu/menuarodwn8_dim_1.gif
+share/web/static/css/yui/menu/menuarodwn8_hov_1.gif
+share/web/static/css/yui/menu/menuarodwn8_nrm_1.gif
+share/web/static/css/yui/menu/menuarorght8_dim_1.gif
+share/web/static/css/yui/menu/menuarorght8_hov_1.gif
+share/web/static/css/yui/menu/menuarorght8_nrm_1.gif
+share/web/static/css/yui/menu/menuaroup8_dim_1.gif
+share/web/static/css/yui/menu/menuaroup8_nrm_1.gif
+share/web/static/css/yui/menu/menuchk8_dim_1.gif
+share/web/static/css/yui/menu/menuchk8_hov_1.gif
+share/web/static/css/yui/menu/menuchk8_nrm_1.gif
share/web/static/css/yui/tabview/border_tabs.css
share/web/static/css/yui/tabview/tabs.css
+share/web/static/css/yui/tabview/tabview.css
share/web/static/favicon.ico
share/web/static/images/css/bullet_arrow_down.png
share/web/static/images/css/bullet_arrow_up.png
@@ -495,7 +552,9 @@
share/web/static/js/yui/calendar.js
share/web/static/js/yui/container.js
share/web/static/js/yui/dom.js
+share/web/static/js/yui/element-beta.js
share/web/static/js/yui/event.js
+share/web/static/js/yui/menu.js
share/web/static/js/yui/tabview.js
share/web/static/js/yui/yahoo.js
share/web/templates/=/subs
@@ -527,6 +586,7 @@
SIGNATURE
t/00-load.t
t/01-dependencies.t
+t/01-test-mechanize.t
t/01-test-web.t
t/01-version_checks.t
t/02-connect.t
@@ -577,9 +637,12 @@
t/TestApp-Plugin-PasswordAuth/etc/config.yml
t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/FasterSwallow.pm
t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/FavoriteColor.pm
+t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Bootstrap.pm
+t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Dispatcher.pm
t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Model/User.pm
t/TestApp-Plugin-PasswordAuth/Makefile.PL
t/TestApp-Plugin-PasswordAuth/t/00-model-User.t
+t/TestApp-Plugin-PasswordAuth/t/01-tokengen.t
t/TestApp-Plugin-REST/bin/jifty
t/TestApp-Plugin-REST/etc/config.yml
t/TestApp-Plugin-REST/lib/TestApp/Plugin/REST/Action/DoSomething.pm
@@ -598,6 +661,8 @@
t/TestApp/lib/TestApp/Model/User.pm
t/TestApp/lib/TestApp/Upgrade.pm
t/TestApp/lib/TestApp/View.pm
+t/TestApp/lib/TestApp/View/base.pm
+t/TestApp/lib/TestApp/View/instance.pm
t/TestApp/share/web/static/images/pony.jpg
t/TestApp/share/web/templates/concrete.html
t/TestApp/share/web/templates/currentuser
@@ -607,6 +672,10 @@
t/TestApp/share/web/templates/editform
t/TestApp/share/web/templates/index.html
t/TestApp/share/web/templates/manual_redirect
+t/TestApp/share/web/templates/path_test/foo/index.html
+t/TestApp/share/web/templates/path_test/in_both
+t/TestApp/share/web/templates/path_test/mason_only
+t/TestApp/share/web/templates/redirected
t/TestApp/share/web/templates/regions/list
t/TestApp/share/web/templates/regions/long
t/TestApp/share/web/templates/regions/short
@@ -629,9 +698,12 @@
t/TestApp/t/11-current_user.t
t/TestApp/t/12-search.t
t/TestApp/t/13-page-regions.t
+t/TestApp/t/14-template-paths.t
+t/TestApp/t/15-template-subclass.t
t/TestApp/t/config-Cachable
t/TestApp/t/config-Record
t/TestApp/t/i18n-standalone.t
t/TestApp/t/instance_id.t
t/TestApp/t/regex_meta_in_path_info.t
t/TestApp/t/upgrade.t
+t/TestApp/testapp
From jifty-commit at lists.jifty.org Sun Apr 15 13:03:26 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 13:03:32 2007
Subject: [Jifty-commit] r3136 - jifty/trunk
Message-ID: <20070415170326.A58D34D80C4@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 13:03:06 2007
New Revision: 3136
Modified:
jifty/trunk/ (props changed)
jifty/trunk/SIGNATURE
Log:
r55457@pinglin: jesse | 2007-04-15 13:02:08 -0400
* signature update
Modified: jifty/trunk/SIGNATURE
==============================================================================
--- jifty/trunk/SIGNATURE (original)
+++ jifty/trunk/SIGNATURE Sun Apr 15 13:03:06 2007
@@ -1,12 +1,12 @@
This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.41.
+signed via the Module::Signature module, version 0.55.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
-It would check each file's integrity, as well as the signature's
+It will check each file's integrity, as well as the signature's
validity. If "==> Signature verified OK! <==" is not displayed,
the distribution may already have been compromised, and you should
not run its Makefile.PL or Build.PL.
@@ -14,12 +14,12 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 ef933bd94b1e449d781c19e74a92412f08e602c5 AUTHORS
-SHA1 fc571a41cf0774f0099bd365a6e21607a2da0151 Changelog
-SHA1 8c31edaf5f07a1bae38d787bbdf2d79bb17d6f7c MANIFEST
+SHA1 ce845a63328d2beca5037d7e4c5f85e448ac30cb AUTHORS
+SHA1 eb4c3ff97242a76492fe3bab14edd70cc07bdff4 Changelog
+SHA1 15cda5b2850ca7f68dda47ba92ed468b80068392 MANIFEST
SHA1 d4adbf5948041cd460da5cb7ad21394a790e2022 MANIFEST.SKIP
-SHA1 f7177c83690e1bac7930f31b96c991afb6adbc8b META.yml
-SHA1 767b1c8e6573516120842aabb2033fddab178d39 Makefile.PL
+SHA1 bc24fc24c0358e61c1eb3208e7179852c8bd75ec META.yml
+SHA1 e28bb282ca513c79a7154e6f861d4b06ab1d9b00 Makefile.PL
SHA1 e395a2eabaf8faf8266dedc664c1eb52c6c589cf README
SHA1 aaf8f7a1025fc97077072672f325e2a5f3c03a41 bin/build_par
SHA1 f7f44f9a7337def0c97f981073e3ed970851d9ae bin/jifty
@@ -27,9 +27,9 @@
SHA1 9a91a81e3db1a12368153fed9e504aad492cd971 bin/service
SHA1 543a2677f66d3c8ca671b790509b6c1721ac6270 bin/xgettext
SHA1 1c042485ba8a21f0f124dd8ed412d43d3805430e debian/README
-SHA1 43b4786695f70ebd8ee74aac9e7eb270b4641b63 debian/changelog
+SHA1 6bd60ecb05472d3f17593ca1d476e698e16ee013 debian/changelog
SHA1 5d9474c0309b7ca09a182d888f73b37a8fe1362c debian/compat
-SHA1 73f845d1185d0d977dd5bea3f046a0ae53451363 debian/control
+SHA1 02d0106879c919581172403287a557076c07037e debian/control
SHA1 8fc130ffa6d53c47d94eab1616887c511d54d61f debian/rules
SHA1 b8bb315ef8fbdd2f069b6339ad0461b5d933d7da doc/ajax-upgraded-links
SHA1 a0d03921821ca39ea461f1f9fa812fdbb5f501a0 doc/building_a_par
@@ -45,8 +45,10 @@
SHA1 0eab037e835b3d998df54883377b58802cb78f7a doc/jifty-action-record-search
SHA1 4f01bbe985a1ad3742b48563992bdbf032a6ce4d doc/jifty-dispatcher.graffle
SHA1 b07f1666f9da714a9007058ea74d0d4cfa31ebfe doc/jifty-dispatcher.svg
+SHA1 b62f3916546fc54639e277434646b8d4f253d6d7 doc/jifty-model-svk
SHA1 29514abbc940365a861d196d8b1f35ee34f91526 doc/jifty-plugins-2.0
SHA1 94a787c12228136c7797f81fef39e9bb52786067 doc/jifty-web-form-etc
+SHA1 fc7ea00184c4632731c3131f225fded7eeedfa0f doc/notes-on-distributed-operations
SHA1 44839f806443cbb6469f3610f9a6c488d1777f60 doc/packaging
SHA1 3ec038720e82a1297a3a5db6a0e1b24fe0aa13c2 doc/plugin-requirements
SHA1 3de2d7f062e78fc8b543f6b93e79852274c6c657 doc/plugin-syntax
@@ -59,10 +61,9 @@
SHA1 9db8566a4bacf0f3be943b9b3a84c45439c45337 etc/site_config.yml
SHA1 3d3cce325969be4618e89c976aa9f950618ff39a examples/Chat/Makefile.PL
SHA1 a7dc1f376cac630ea28d2965e561469deb951cc7 examples/Chat/bin/jifty
-SHA1 418a81711645390f06a417a0e4328901c9c92dc4 examples/Chat/etc/config.yml
+SHA1 c163b8cb161f5e9db259b4045249416f70ea4e01 examples/Chat/etc/config.yml
SHA1 08043c294b69d1a2e23940346034283e6f686e14 examples/Chat/lib/Chat/Action/Send.pm
SHA1 63f552215f7ed2d75278509fab4324dddda90591 examples/Chat/lib/Chat/Event/Message.pm
-SHA1 a8c6b5a40ec985c240db0cfc56922d534b9dd60d examples/Chat/lib/Chat/Server.pm
SHA1 f6f5a7db0d950b19cb3a0e2f0776ac4fc0186082 examples/Chat/share/web/templates/fragments/message
SHA1 ceb9ecbd5ba19436ff3cfe423e688bcc0d4b1adc examples/Chat/share/web/templates/fragments/sender
SHA1 047c066b5f143e1a80056fa158e172448ee912e5 examples/Chat/share/web/templates/index.html
@@ -71,11 +72,38 @@
SHA1 3d3cce325969be4618e89c976aa9f950618ff39a examples/Clock/Makefile.PL
SHA1 a7dc1f376cac630ea28d2965e561469deb951cc7 examples/Clock/bin/jifty
SHA1 faca2e649d4d9b4b00f5f6bf8932a7610c698415 examples/Clock/clockserv.pl
-SHA1 793ef4d540d2df071daad4ad73514c75d8e9aa51 examples/Clock/etc/config.yml
+SHA1 fc48886cd6416e638542c6827570643eb7cdff9e examples/Clock/etc/config.yml
SHA1 72feb5e40abfac4e87793b427f9de45c03cfaca4 examples/Clock/lib/Clock/Event/Tick.pm
-SHA1 c2e597a83448804e04989db290404766180033ab examples/Clock/lib/Clock/Server.pm
SHA1 e70cea658fbef26cdeb5558b89dd9c6890fbd9db examples/Clock/share/web/templates/fragments/time
SHA1 bddc300d6e81f578c85a8807156822d682c61efe examples/Clock/share/web/templates/index.html
+SHA1 8fe8876037756db9f78ab1d6668bfcc23617414d examples/Doxory/Makefile.PL
+SHA1 f7f44f9a7337def0c97f981073e3ed970851d9ae examples/Doxory/bin/jifty
+SHA1 8a919440feae546381249bc49d9404559b7cf616 examples/Doxory/doxory
+SHA1 7996887eb81370c19d58a348632797c1c1d976f5 examples/Doxory/etc/config.yml
+SHA1 148918761e3d8e6a993f3d0f64e66f384dc8e5ea examples/Doxory/lib/Doxory/Dispatcher.pm
+SHA1 f0a1cfd87b47f0d040768abd07b885735ced7781 examples/Doxory/lib/Doxory/Model/Choice.pm
+SHA1 63105b35272344140c78a4d49c99fb6329fdfee0 examples/Doxory/lib/Doxory/Model/User.pm
+SHA1 4dcb58ff5b7e88c3e503a0b21923ead70936677c examples/Doxory/lib/Doxory/Model/Vote.pm
+SHA1 bf67169daeeadc6a18d6b948830d440a89c00176 examples/Doxory/lib/Doxory/View.pm
+SHA1 149b55cfb72c0def0ab7b495445baf8c631ce621 examples/Doxory/share/po/zh_cn.po
+SHA1 bec6af6333016377d442c59bdaaf32ab65a31e4a examples/Doxory/share/po/zh_tw.po
+SHA1 561110ddd8574426cb578a3c81d356bdc4fa47f3 examples/Doxory/t/00-model-User.t
+SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709 examples/Example-Todo/META.yml
+SHA1 aef127e349b9e06adaad2bec98622582c175e795 examples/Example-Todo/Makefile.PL
+SHA1 f7f44f9a7337def0c97f981073e3ed970851d9ae examples/Example-Todo/bin/jifty
+SHA1 3edcfa5651b780a6e31e4c0e6ad28f3bf22c45ea examples/Example-Todo/etc/config.yml
+SHA1 751fdf0397a92d3bc7f034b3fd08b3438b0eb27f examples/Example-Todo/example_todo
+SHA1 9b2f9d83bcf77860f53a0c07c90a4a59ad9f5df1 examples/Example-Todo/inc/Module/Install.pm
+SHA1 abe32855d75ab13747cf65765af9947b7a8c3057 examples/Example-Todo/inc/Module/Install/Base.pm
+SHA1 381bb98ea3877bba49ae85e7a7ea130645fd3dbf examples/Example-Todo/inc/Module/Install/Metadata.pm
+SHA1 e827d6d43771032fa3df35c0ad5e5698d0e54cda examples/Example-Todo/inc/Module/Install/WriteAll.pm
+SHA1 46730854dc7241dc334b546eef267fde8df24aea examples/Example-Todo/lib/Example/Todo/Model/Todo.pm
+SHA1 61d12c9d3bb174aad4856349686c9e71e75fa7e0 examples/Example-Todo/t/00-model-Todo.t
+SHA1 3b22513afb560789fb0f38f50c55249d70f1b06d examples/HelloKitty/Makefile.PL
+SHA1 a7dc1f376cac630ea28d2965e561469deb951cc7 examples/HelloKitty/bin/jifty
+SHA1 dd97d225e86ab1cb13eabaab12a9b1bfb2410cff examples/HelloKitty/etc/config.yml
+SHA1 24d7e3ade49a5a3a7dd4f2dd74e836bafcbbbedf examples/HelloKitty/hellokitty
+SHA1 2ac96cfdb02f3a3fe5550ceb0442d9a30f7120c9 examples/HelloKitty/lib/HelloKitty/View.pm
SHA1 4db882e66864fa40a6532ce5b83699839804b062 examples/MyWeblog/Makefile.PL
SHA1 a7dc1f376cac630ea28d2965e561469deb951cc7 examples/MyWeblog/bin/jifty
SHA1 d1394cef410a14394a05e2a6e6a9b32c059cb5d6 examples/MyWeblog/etc/config.yml
@@ -87,12 +115,11 @@
SHA1 242c000d466ce6782ac759b7baea86c3b4c902bd examples/MyWeblog/t/00-model-Post.t
SHA1 37ff983ec74bee20ce6a6425e2cbd2effa55e586 examples/Ping/Makefile.PL
SHA1 a7dc1f376cac630ea28d2965e561469deb951cc7 examples/Ping/bin/jifty
-SHA1 2630087e4914b7d8a7fa8bea82e778fab51735dd examples/Ping/etc/config.yml
+SHA1 a86e4873a4c6be33cf919be8cbbf4b0990720b7e examples/Ping/etc/config.yml
SHA1 9b143bab7499c4ebde34e88e635a59bd205a1bf0 examples/Ping/lib/Ping/Action/AddPing.pm
SHA1 fc630086e84277cf19a9e9eb382c79e41d0dd810 examples/Ping/lib/Ping/Action/CancelPing.pm
SHA1 918d401c046480483ca935728529e016de6d73f6 examples/Ping/lib/Ping/Event/Pong.pm
SHA1 ba3f1840a56742c011e96890a327ccbe7ecb3a4d examples/Ping/lib/Ping/PingServer.pm
-SHA1 85e03a9df32331e713be7d637c04fa3ca1a24626 examples/Ping/lib/Ping/Server.pm
SHA1 dc0966379ee2dc74c10ee8d5688cec5b1db17ac4 examples/Ping/share/web/templates/fragments/pong
SHA1 05ac283a14e76750d63678d0864a0403aa18fd28 examples/Ping/share/web/templates/index.html
SHA1 53c8822ddf426e82fe239e4470574913411b1355 examples/Ping/t/00compile.t
@@ -111,98 +138,143 @@
SHA1 0c2118868ef82ac517eb6d9c3bd93e6eb9bbf83e inc/Module/Install/Win32.pm
SHA1 e827d6d43771032fa3df35c0ad5e5698d0e54cda inc/Module/Install/WriteAll.pm
SHA1 c17e8f3cf8ebe1eb4929fd2bd2fd530a9de1abd0 lib/Email/Send/Jifty/Test.pm
-SHA1 9380a1872911cf469d08049e4c76645eecef63f8 lib/Jifty.pm
-SHA1 f2db715c8a15d0c7c5c7cf30511dac6547f72fc5 lib/Jifty/API.pm
-SHA1 25ed41c1b89c6d39a8e6d027a9120b3e35785951 lib/Jifty/Action.pm
-SHA1 a6d9d87b4fa06cfab36f249a67946b45669dcee7 lib/Jifty/Action/Autocomplete.pm
-SHA1 19147544734762a243ba7e8b603168930aad9c62 lib/Jifty/Action/Record.pm
-SHA1 39d9bca03c6502e128b453fe3bda5e1d4173f343 lib/Jifty/Action/Record/Create.pm
+SHA1 adbf92540d5b7f15174945b6f84c8ab936d1c1a1 lib/Jifty.pm
+SHA1 337627c441c5639405a2d2cc751c63616d25c221 lib/Jifty/API.pm
+SHA1 7dc39eb45149bd3c9b7e1f19047657dbf84688df lib/Jifty/Action.pm
+SHA1 d73654ad2f7edc2f1661ab866b1db609d83806b3 lib/Jifty/Action/Autocomplete.pm
+SHA1 a96809977dac6f6c644b4b265ce510c13130264c lib/Jifty/Action/Record.pm
+SHA1 9afca5c5a9b57f11eb276afadea614b1be4570f6 lib/Jifty/Action/Record/Create.pm
SHA1 224f3ed1a4710fb13e4627acd22067e2fa5c35c6 lib/Jifty/Action/Record/Delete.pm
SHA1 1e400299405a06d3d09bb7548d97c52b850b7f43 lib/Jifty/Action/Record/Search.pm
SHA1 821d06cdd92876efd01e08800eae46e52e13c2a6 lib/Jifty/Action/Record/Update.pm
SHA1 ab7a0e0bae4cd1ecbda260b339a4116e65708a7f lib/Jifty/Action/Redirect.pm
-SHA1 cf349fcfe9ee28216eae2213ab0016ceaffaf2a7 lib/Jifty/Bootstrap.pm
-SHA1 f6e9cb12da25b65df8bc2762423d1fcc9d41ec3e lib/Jifty/ClassLoader.pm
+SHA1 0334c7ad4458bca073fa22372b4775937a0852e1 lib/Jifty/Bootstrap.pm
+SHA1 cfda40c105abc7f0e5df0ab05895173be4dce03c lib/Jifty/ClassLoader.pm
SHA1 1009fa942a8cf3da853694f321d6f67d70613a79 lib/Jifty/Client.pm
SHA1 a4e91b327848fe1c5b76e4ffaa926300e4c1ef2f lib/Jifty/Collection.pm
-SHA1 ce2f398600582262a2f5562a1de77bc03f6e2676 lib/Jifty/Config.pm
-SHA1 48514a496198c022aff7e4d1c578824addda7c91 lib/Jifty/Continuation.pm
-SHA1 15970f85b57eab885568a71f164dc627c791287c lib/Jifty/CurrentUser.pm
-SHA1 4521a0e9a145697c836e2247fbdb4e93b8966366 lib/Jifty/DateTime.pm
-SHA1 9595652e061d4066615b1ac811700da46394ea65 lib/Jifty/Dispatcher.pm
+SHA1 70ed11fa2fe5a196b5d5ee18e162e0f561dc7780 lib/Jifty/Config.pm
+SHA1 c6d8ac5f2dc450636478bc3051724f7eac74fce6 lib/Jifty/Continuation.pm
+SHA1 3fc7f4db180481c109248941a65f224c8e346aa8 lib/Jifty/CurrentUser.pm
+SHA1 c3ee8cd867481561dd7359d8f609687746e3b5dd lib/Jifty/DateTime.pm
+SHA1 24425ca3e82abf17e15182b8e13240d9ab102b47 lib/Jifty/Dispatcher.pm
SHA1 c9c904906c35def343f14c0c216b62771c07f842 lib/Jifty/Event.pm
SHA1 fb9f33e2838fbff0cd5b5a784adee8b0fc347ebc lib/Jifty/Event/Model.pm
-SHA1 5a6b765e4e61e1a098cc997127c9a5e9405ea32d lib/Jifty/Everything.pm
+SHA1 121cc604741f5a674cbbc2a55dfb6d4c8cf11bb8 lib/Jifty/Everything.pm
SHA1 818bd0aa6afeb39bf96e0068fe3222c74133b4d8 lib/Jifty/Filter/DateTime.pm
-SHA1 8f83cbce4937acba8d2f5c944d3d3a95a0156d9c lib/Jifty/Handle.pm
-SHA1 0c5f2e31fc9cdd266ff3c10bc3ff6715a3b77c9d lib/Jifty/Handler.pm
-SHA1 89fb4f3164b4ea84eb8084829bbca9e93d2259b1 lib/Jifty/I18N.pm
-SHA1 7ce311e2005ef0df27d71b1d80a4f05237dda9f4 lib/Jifty/JSON.pm
-SHA1 3af93349fe8a236c714d88367077f88af11f5d32 lib/Jifty/LetMe.pm
-SHA1 f76b940651eb2c53bce0af9be451a24b0358fec9 lib/Jifty/Logger.pm
-SHA1 858723b0874be436d44be113934f182eff7e9388 lib/Jifty/Manual/AccessControl.pod
+SHA1 45fa3790eb4737497dd728510cc92aa76017e350 lib/Jifty/Handle.pm
+SHA1 947e5aee7b981e19042f3343050a129600b88772 lib/Jifty/Handler.pm
+SHA1 c413c80506fe0a1da3154739249a9351982b1db2 lib/Jifty/I18N.pm
+SHA1 fe370e2c51ca0f20cb0bce133b8c9067c02a524a lib/Jifty/JSON.pm
+SHA1 2ba1cebdcb72532f12f28f59754d75adc5e54e01 lib/Jifty/LetMe.pm
+SHA1 1687a979438f24c95a6b857ab5305910108bfb49 lib/Jifty/Logger.pm
+SHA1 b03feba360a2fd7b7c9b8318a2680c62b0a42cdb lib/Jifty/Manual/AccessControl.pod
SHA1 ef9ff36385a9f780ac0204bffb9425818d78b789 lib/Jifty/Manual/Actions.pod
SHA1 d320630f6613f4aa1ec3b9537129fd9ca847fb61 lib/Jifty/Manual/Continuations.pod
-SHA1 976198d6f93f9c46625c3fd1bd9d89a13ab89f40 lib/Jifty/Manual/Cookbook.pod
+SHA1 99848cf166e90d9c0963a65d09a627ba11a3613e lib/Jifty/Manual/Cookbook.pod
+SHA1 ace7259a8fc39a43174e3292a8003baa43670da8 lib/Jifty/Manual/Deploying.pod
SHA1 38a90072f4a25eac8d4480b00290b069e6397673 lib/Jifty/Manual/FAQ.pod
-SHA1 0f95658ca3d4ed3deb1951f514774446a583247f lib/Jifty/Manual/Glossary.pod
+SHA1 910f64961a65608ab8575a08aa4eab6b1862579b lib/Jifty/Manual/Glossary.pod
SHA1 f272be20cc67acaf01c116f432a8f42d82c57877 lib/Jifty/Manual/Models.pod
SHA1 1204d70c868084ac3114fae277e98a756f83f819 lib/Jifty/Manual/ObjectModel.pod
-SHA1 537017160a444f84bf1673cc3722db644c2b662e lib/Jifty/Manual/PageRegions.pod
+SHA1 60ee994e58dfb4e9190badc16c96c4760e5669cb lib/Jifty/Manual/PageRegions.pod
SHA1 8ba19a0760196ceb1afbeaa06e7314e254bef258 lib/Jifty/Manual/RequestHandling.pod
SHA1 11c2a307f398203ebd804cee990a89e940c406f6 lib/Jifty/Manual/Style.pod
-SHA1 69c995fe4da233dc1b54655813cb6e51d979b759 lib/Jifty/Manual/Tutorial.pod
+SHA1 6920f173d2460fed1957019be295acb588fff9a1 lib/Jifty/Manual/Tutorial.pod
+SHA1 bfdb8da4b149a60d30700a7494e67ea7367a9417 lib/Jifty/Manual/TutorialRest.pod
SHA1 4ad61c8957fdfed1aa5cc60294cbfb43a359e2d2 lib/Jifty/Manual/Tutorial_de.pod
SHA1 45f95f61826365d39a5eab2cc119967273d17077 lib/Jifty/Manual/Tutorial_ja.pod
-SHA1 0398a7d053b6c78f7d769f7251d3a01af80cbe57 lib/Jifty/Manual/Upgrading.pod
+SHA1 2b4c79b6656658b7198ba579b58e3a599d404b01 lib/Jifty/Manual/Upgrading.pod
SHA1 d0b7a4277c8a3d1a393d7c51fff48b059461f87c lib/Jifty/Manual/UsingCSSandJS.pod
SHA1 59ce74460e9c1fe8aa1114c2e874348583b76548 lib/Jifty/Mason/Halo.pm
-SHA1 809ace5bafff5ad2461d5495464863ba808dfd19 lib/Jifty/Model/Metadata.pm
-SHA1 36de25464ae4eb07675f453cc590b634c6ff5a37 lib/Jifty/Model/Session.pm
+SHA1 c7a9988b0826f9c55af2415c7d314ff546193cee lib/Jifty/Model/Metadata.pm
+SHA1 4b89786af61d1490286bc02c4c3a8edb95aa0b60 lib/Jifty/Model/Session.pm
SHA1 0efcdf22d66e521cf250c1398caf3aba93ed795d lib/Jifty/Model/SessionCollection.pm
-SHA1 e24506b3e0fbdb450e55f3935980813c9c9e2bee lib/Jifty/Module/Pluggable.pm
-SHA1 f0090580d6a54fd8114b8fc1b4cb644c8c3dd2f5 lib/Jifty/Notification.pm
+SHA1 95bf129e6c19868a63cf52f073bbe47db6d3f969 lib/Jifty/Module/Pluggable.pm
+SHA1 f7c511c6b0c6ccfc3c5fdc0bf0a4e224d78a9c40 lib/Jifty/Notification.pm
SHA1 7223070583b1b15f651db7a71b97e039e084aa4f lib/Jifty/Object.pm
SHA1 c3fde2a862013cd6284637d79c751c3c2e360720 lib/Jifty/Param.pm
-SHA1 11d4de5da85ee53e6f3f434a5a519ebc574cedab lib/Jifty/Param/Schema.pm
-SHA1 69708ae740a40953c50217c37e23740179da80be lib/Jifty/Plugin.pm
-SHA1 d80065a87ec1dd8b0bbcd1853e9a7192a18a04f5 lib/Jifty/Plugin/ClassLoader.pm
-SHA1 20d3f35b391236d9a0e554e62368b4f6fd1383dc lib/Jifty/Plugin/REST.pm
-SHA1 690d1ca831e42d1b1810875abdbae0ff480620e2 lib/Jifty/Plugin/REST/Dispatcher.pm
-SHA1 3fccef02727c8e75a0b4c93f940e9e18e0a499d4 lib/Jifty/Record.pm
-SHA1 0283384c06b36339143690b4beb7830ab4648e0f lib/Jifty/Request.pm
+SHA1 c4c0387640f7eafb35b346798c5e150c6ecb7496 lib/Jifty/Param/Schema.pm
+SHA1 134c5535e4b1f5ef0a5a8f78259b36c4bf247bed lib/Jifty/Plugin.pm
+SHA1 328b724a1f266999eb1f12e60a7ac6fcc533d177 lib/Jifty/Plugin/AdminUI.pm
+SHA1 00ed9668344ab64d8bccebd640525da71cd1c798 lib/Jifty/Plugin/AdminUI/View-not-yet.pm
+SHA1 00354893bf1283e9cf1b52de5b41bdfb57a78811 lib/Jifty/Plugin/Authentication/Password.pm
+SHA1 9f078a684545d3a9c075d83812cffeca0a3b633e lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm
+SHA1 de9208f8911bc09594299b618a7ce05c71cac57e lib/Jifty/Plugin/Authentication/Password/Action/GeneratePasswordToken.pm
+SHA1 fe301993be96d5f1bcde396ee7e3826e6aeb4c32 lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
+SHA1 3ccf33cfd732343cfeeda7f2acc1df7c7da721fe lib/Jifty/Plugin/Authentication/Password/Action/Logout.pm
+SHA1 074fe2fa59464a78b69558f2c20b39fe45a6e56e lib/Jifty/Plugin/Authentication/Password/Action/ResendConfirmation.pm
+SHA1 eb20b698db12db185f08e4d0e0a6c39dc2c1432f lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm
+SHA1 89d74967f85b631644d039393920646cfb772f2a lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm
+SHA1 28604b89817992c647042420090a59fee0fe06bd lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm
+SHA1 3d0b444280c3b0ae577e0ada5cb3fd2eb8803f9f lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm
+SHA1 1d30106db1d074278fd646c378cc155b8e97716f lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm
+SHA1 4defcd42e3416040108a61bbd059ad9e51a88532 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm
+SHA1 9711ece6f3637e972708c8bda313aaa57fd1b405 lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm
+SHA1 f8e1724e5d0d3e490439f0ad761a96155ff1b5a4 lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmLostPassword.pm
+SHA1 3b912f2b6f80d5431c9e263dc16f77c0b36ebeb6 lib/Jifty/Plugin/Authentication/Password/View.pm
+SHA1 da70c7fbcd78d7ae9bd53deb74a022d0eeea4a12 lib/Jifty/Plugin/ClassLoader.pm
+SHA1 25d4c8b9459c9c299fb181d41539475a854309f0 lib/Jifty/Plugin/CompressedCSSandJS.pm
+SHA1 3b6cb101e9e3465cefdb843fb9108cb126644284 lib/Jifty/Plugin/CompressedCSSandJS/Dispatcher.pm
+SHA1 b6a34618e94885dac38d0a6b501a63f5c0184008 lib/Jifty/Plugin/ErrorTemplates.pm
+SHA1 07037bce896482134852dcfb6c15a8bbb8fa6adc lib/Jifty/Plugin/ErrorTemplates/View.pm
+SHA1 f13f769cb4d6d529bcfc46647512544eaaa54774 lib/Jifty/Plugin/Halo.pm
+SHA1 432d5c6343b4390dcd135918d7f729d2c01eee5c lib/Jifty/Plugin/LetMe.pm
+SHA1 8692eb8735e17f6f9a25f41c368da4a6839363c8 lib/Jifty/Plugin/LetMe/Dispatcher.pm
+SHA1 af733b25eee3cc4e0e6b087a76bfd965534a2343 lib/Jifty/Plugin/OnlineDocs.pm
+SHA1 fcc3ccbee7c9646745fc79475d53f67e81d7c0db lib/Jifty/Plugin/OnlineDocs/Dispatcher.pm
+SHA1 df332565b291fd458fab232414b24283f379ac16 lib/Jifty/Plugin/REST.pm
+SHA1 053b6f7d44ade4ed7567a4a0c444e777108b26c3 lib/Jifty/Plugin/REST/Dispatcher.pm
+SHA1 7fa0c5fa1ef6dbe8f1c4a351133f74ca32a70507 lib/Jifty/Plugin/SkeletonApp.pm
+SHA1 1b07ce39502e28564f41d8dd27a4c0094de9f354 lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm
+SHA1 81362e19c903ba6c98c3cd84bc7b4b8f5615d05e lib/Jifty/Plugin/SkeletonApp/View.pm
+SHA1 a51b4791f28c6f64ba00ac21fc05933b32e19015 lib/Jifty/Plugin/User.pm
+SHA1 a1c827266b0db910b02476eee76f6a5a4663e2ba lib/Jifty/Plugin/User/Mixin/Model/User.pm
+SHA1 c77500585cddf1c520b0438384481a1b68d13c57 lib/Jifty/Plugin/Yullio/View.pm
+SHA1 26b636ef6291098364119287e7363be9f58990f7 lib/Jifty/Record.pm
+SHA1 8ba38d25e9f6ead360e20baa457f119694584edd lib/Jifty/Request.pm
SHA1 7e4d83147f5f665bb0e8d290ea70340b82a205c2 lib/Jifty/Request/Mapper.pm
SHA1 0a92b4cdb402463e303b897195c9ad914767c27f lib/Jifty/Response.pm
-SHA1 56988d89d24e33a5ed2c2c6539b02593cc9e3344 lib/Jifty/Result.pm
-SHA1 85de033731ae63d0b3efec515a3608337cbc5c31 lib/Jifty/RightsFrom.pm
-SHA1 0306af64a6289796db4b5ff2b8c5e7c23506a9e3 lib/Jifty/Script.pm
-SHA1 a576b768487f81889ade60cb10f89eb2073adadc lib/Jifty/Script/Action.pm
-SHA1 17bb02c22e126df9ff783843e5921e46b060c2be lib/Jifty/Script/App.pm
+SHA1 669b0956c14105b4178875d6856b129b75941328 lib/Jifty/Result.pm
+SHA1 126fb131c36f6ff7dc6cc4193b0c9a402168a832 lib/Jifty/RightsFrom.pm
+SHA1 83f1a04d22cb553f0af2842b7fe603277441f72b lib/Jifty/Script.pm
+SHA1 f97fb67cd7db7aa2374ef4a0f1b8b9705e3ce153 lib/Jifty/Script/Action.pm
+SHA1 3aa3a449b282e05dfb312cf266572edabf2bae17 lib/Jifty/Script/Adopt.pm
+SHA1 84a9ddd8c2f9d738daed65201ae938cb5e0a45de lib/Jifty/Script/App.pm
SHA1 1ad9937d9e28f1568954bcffac500be87f3cb355 lib/Jifty/Script/Deps.pm
-SHA1 cb42aff8740412f9e7a26915a4e852817aa39af8 lib/Jifty/Script/FastCGI.pm
+SHA1 3c26ea2d6e25c42ecd7edae41d4ad2fc552f1451 lib/Jifty/Script/Env.pm
+SHA1 79fbed4c7b6e3b85cd78afbc69bd990f45f97a01 lib/Jifty/Script/FastCGI.pm
SHA1 e25a259fc9fd3183a7981236f428f54ac4c4f49e lib/Jifty/Script/Help.pm
-SHA1 be1f648841609388f48214e632e0b169216dd58a lib/Jifty/Script/Model.pm
+SHA1 29d16baf7dbf778f6082f8852723b6ef82842ef0 lib/Jifty/Script/ModPerl2.pm
+SHA1 ae7d6a97f55a111e10cbc127d3174c48dc896afc lib/Jifty/Script/Model.pm
SHA1 77c221bb4b7162b2fc95c841ceeea04194afb264 lib/Jifty/Script/Plugin.pm
-SHA1 eba3c96bcfae42ea6a9e5d2cbef6bca19617b47e lib/Jifty/Script/Po.pm
-SHA1 afb4c37e7503e53676773bb3d6f65fde111679fc lib/Jifty/Script/Schema.pm
-SHA1 4bbe2362a6cd195fac119a37cd71119afb5516f6 lib/Jifty/Script/Server.pm
-SHA1 0646a96ca5f3da1585e3fb1dcc9b3540d2b8f50f lib/Jifty/Server.pm
+SHA1 3365d06f92ffe40175f2c9d7fa4175c48cd42ed9 lib/Jifty/Script/Po.pm
+SHA1 cf7d62a4634d32342e5b4581ceb1dc8c78439943 lib/Jifty/Script/Schema.pm
+SHA1 50e6a73afeb945145576c079d14d3707d13b4344 lib/Jifty/Script/Server.pm
+SHA1 48a8889b44c0450ccb2d27cbb0b7c7f3ae26a426 lib/Jifty/Server.pm
+SHA1 b49ae221b107519b3019b3f5e5ab5b7e8c6b4332 lib/Jifty/Server/Fork.pm
+SHA1 9a8c2f2cdc88fc00baaafaa72bc3413e086c0448 lib/Jifty/Server/Prefork.pm
+SHA1 e7453a3cda290e60d5432e60e53bec8b92a91772 lib/Jifty/Server/Prefork/NetServer.pm
SHA1 4c51d2df15281788b74d080488b0c5959cd95a1a lib/Jifty/Subs.pm
-SHA1 43277d31da2a30afd160dbe2077314285898438f lib/Jifty/Subs/Render.pm
-SHA1 df6cadbfbd91dcbf91d334a2132882821d9b3741 lib/Jifty/Test.pm
-SHA1 24eb481ac109ce0639496d6e16311ae2af0bb0da lib/Jifty/Test/WWW/Mechanize.pm
-SHA1 bacce10076cd7790405d29b0cabd99cae06b739e lib/Jifty/TestServer.pm
-SHA1 206e12811205063b22fcaaf0cd04dd66321d793c lib/Jifty/Upgrade.pm
+SHA1 b3d122eed10c4ac3cba561913a42220c2f5ee085 lib/Jifty/Subs/Render.pm
+SHA1 2dac24c8d464f0823c2847ce382a967f017fd637 lib/Jifty/Test.pm
+SHA1 0d6d53b5084bb89baea771d3e9d602a195255e37 lib/Jifty/Test/WWW/Mechanize.pm
+SHA1 47c5840fafd56473a0e1a9228f169d3813317c13 lib/Jifty/TestServer.pm
+SHA1 4614193951790ed53fc8682135cdb1b40d3fa975 lib/Jifty/Upgrade.pm
SHA1 f3957ac04ad92737d68b2a63f068679b4bacafed lib/Jifty/Upgrade/Internal.pm
-SHA1 01e8cf19fef0094b917712165d5ae0acf37fa31d lib/Jifty/Util.pm
-SHA1 bf4cbc6a7c94597cadb101b609f80004bfb64eef lib/Jifty/View/Mason/Handler.pm
-SHA1 91b4185b0570453805f15b0eb0ce0f50a6f1eef3 lib/Jifty/View/Static/Handler.pm
-SHA1 1b62b886ec2a10b9b078535a7782bd01507bf6a6 lib/Jifty/Web.pm
-SHA1 93f70b329f4e05105edd6a2bacb1d71ed59c5449 lib/Jifty/Web/Form.pm
-SHA1 07cea2d1e0075a331d4f028fee34c5fd1bdda618 lib/Jifty/Web/Form/Clickable.pm
-SHA1 9065dcef2d3e755bcefbc5ec1481bf92e883c287 lib/Jifty/Web/Form/Element.pm
-SHA1 f7b910dc62f6265d4df1a8ec937d902549f1ee49 lib/Jifty/Web/Form/Field.pm
-SHA1 ba87c27d5432a8393ffeaf39323ac80c0f4facab lib/Jifty/Web/Form/Field/Button.pm
+SHA1 d42ff4531e36438208cd8242d15f7d210928ff6b lib/Jifty/Util.pm
+SHA1 05af258e63bbb8ea166e845b8028546b858fcecb lib/Jifty/View/Declare.pm
+SHA1 dd7596d3d4cc8df03c074a44a0cd0813a5cf0a89 lib/Jifty/View/Declare/BaseClass.pm
+SHA1 912220dc62ae0d21d78ed499626a235a14db09a6 lib/Jifty/View/Declare/CoreTemplates.pm
+SHA1 88c62ed42916e58a344e1d09e9a0019436e34cb6 lib/Jifty/View/Declare/Handler.pm
+SHA1 bba1390f47745aa843a72565fbdf1adce3afd241 lib/Jifty/View/Declare/Helpers.pm
+SHA1 1df8f813bdc979dd182a455e9953254abcd247ed lib/Jifty/View/Mason/Handler.pm
+SHA1 2e97fd90420ade1dcdc6d5b815a352cd83c23671 lib/Jifty/View/Static/Handler.pm
+SHA1 94172b92971ea2a5fcdc3f11ebcc94a8274688c6 lib/Jifty/Web.pm
+SHA1 5dbb5f45d0ff0e0ddfabe91d6152c1aa507dbc9b lib/Jifty/Web/Form.pm
+SHA1 f073670eb2f206f99bd1f1377740965cd5da5ac1 lib/Jifty/Web/Form/Clickable.pm
+SHA1 d77f222ad036fe8b39715c85fab009b7a283e1b9 lib/Jifty/Web/Form/Element.pm
+SHA1 a823ab5fae50fa6222c4d3143779d2288e1cc3da lib/Jifty/Web/Form/Field.pm
+SHA1 bb9dc120af472abe3a35f89c772728c75ed8a3c2 lib/Jifty/Web/Form/Field/Button.pm
SHA1 c1071263839a663d44d7f922c7c24b5bcc132a82 lib/Jifty/Web/Form/Field/Checkbox.pm
SHA1 b21ef4e33a628f5d6c54adf5f47f75e69a861644 lib/Jifty/Web/Form/Field/Combobox.pm
SHA1 cc86a97a80c6c9e22183a099979a712a3900a39a lib/Jifty/Web/Form/Field/Date.pm
@@ -217,10 +289,11 @@
SHA1 2548412d5bfbd08050d53ab5c58e0d962d4b2448 lib/Jifty/Web/Form/Field/Unrendered.pm
SHA1 e37541952c969f2e74f942782d483de75e9265f9 lib/Jifty/Web/Form/Field/Upload.pm
SHA1 16cff04150ba0ae8bffe04c1c661d80972876248 lib/Jifty/Web/Form/Link.pm
-SHA1 e4baa13068c7de8e4737efa4dbc18f1f059e6047 lib/Jifty/Web/Menu.pm
-SHA1 e17189fe3d525c4fe2a251db20a5a6eabbc7c786 lib/Jifty/Web/PageRegion.pm
-SHA1 093ab860163f03e9d85c8bb366d694830b7d940a lib/Jifty/Web/Session.pm
+SHA1 a4787c85a11c091f8560d1960edce1aaeeced2c9 lib/Jifty/Web/Menu.pm
+SHA1 e912f7c224380aaf79c6cece6219670a973fe85e lib/Jifty/Web/PageRegion.pm
+SHA1 0fb24e6615e89b7f3b2b0af7457c4aaa61a48ad9 lib/Jifty/Web/Session.pm
SHA1 f655fb9734715ebf51fb5e9b554c02b9e4e2ac61 lib/Jifty/Web/Session/ClientSide.pm
+SHA1 d7a8f92ddbc614904ad6aa53d818b0bd5df03317 lib/Jifty/Web/Session/None.pm
SHA1 c4de1ef964243aae5ab90d0a5a6dd9c213eb9f80 lib/Jifty/YAML.pm
SHA1 feeb00d6502ca54367036767f5e3f20275580291 plugins/AuthCASLogin/MANIFEST
SHA1 f7ee4953b3c05710fe531cc9b579f65ed04af761 plugins/AuthCASLogin/Makefile.PL
@@ -237,21 +310,20 @@
SHA1 36215b6306dd37ebbf6206f526e9464d2d261d2a plugins/AuthCASLogin/share/web/templates/caslogin
SHA1 f971aec45ba679dc55a9955077324f5c0ea75cca plugins/AuthCASLogin/share/web/templates/caslogout
SHA1 c93e6f367c6a110cb05f8fefa4cb37881daeebe7 plugins/AuthCASLogin/t/00-load.t
-SHA1 96e2b7d839f54a14c42dd421516a267d7e2c4b94 plugins/AuthCASOnly/MANIFEST
-SHA1 62ee3ecfa8b4923ee68aa5f3179f2b3c5c8551dd plugins/AuthCASOnly/META.yml
+SHA1 215e0e0faa081e206560b09cf4570ab949b298a9 plugins/AuthCASOnly/MANIFEST
SHA1 9e218ee17e541c947ceb6f78d4714fc4baa43895 plugins/AuthCASOnly/Makefile.PL
-SHA1 0211277b86a7c26952a44da5ea55945a32ca2689 plugins/AuthCASOnly/debian/changelog
+SHA1 a21e7eea5a3b6a3b129c0e8d0ebb87d6b4af86a3 plugins/AuthCASOnly/debian/changelog
SHA1 9c6b057a2b9d96a4067a749ee3b3b0158d390cf1 plugins/AuthCASOnly/debian/compat
SHA1 df5baa3318d61d253b6256a2a3abb06aa28669a5 plugins/AuthCASOnly/debian/control
SHA1 c361200ede7340a93f131034eaaaa71f36bf1617 plugins/AuthCASOnly/debian/copyright
-SHA1 6178f211c12057c7f8bf110ae4d9ae9961ba90c7 plugins/AuthCASOnly/debian/files
+SHA1 dda59a9600b41022496d69c03b2d7eb9106705fa plugins/AuthCASOnly/debian/files
SHA1 df2b684174a5e8bdf6d14b985020057702b4c884 plugins/AuthCASOnly/debian/rules
-SHA1 e324ade45843a878b10cc5bd78061401dcf56685 plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly.pm
+SHA1 919c785814ab3c9f848f89b44184fe599d58fe74 plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly.pm
SHA1 827a868f825e94c7630368d4cd98d591edacc188 plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/Action/CASLogin.pm
SHA1 cc9279734210b6a8de3312716ee36868d437f7db plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/Action/CASLogout.pm
SHA1 b401b903bece0f11a45c7fe129ada9e6e2681f4b plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/CurrentUser.pm
SHA1 d0a159254cb3d99a5d3664ffd8c8d42c3daa40f1 plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/Dispatcher.pm
-SHA1 67aea2e30d74af4e01b66ef5bebb4d69d78f2b37 plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/Model/CASUser.pm
+SHA1 263c412cfe48db61500f5566a0174fbb284e46fd plugins/AuthCASOnly/lib/Jifty/Plugin/AuthCASOnly/Model/User.pm
SHA1 36215b6306dd37ebbf6206f526e9464d2d261d2a plugins/AuthCASOnly/share/web/templates/caslogin
SHA1 f971aec45ba679dc55a9955077324f5c0ea75cca plugins/AuthCASOnly/share/web/templates/caslogout
SHA1 de334fd98ec8b7bf6b72b9f4d98da1405f2fd9a9 plugins/AuthCASOnly/t/00-load.t
@@ -271,19 +343,19 @@
SHA1 a52f49740c6a0c5dfb5ef2413b26d40c71e8dba0 plugins/AuthLDAPLogin/share/web/templates/ldaplogin
SHA1 f971aec45ba679dc55a9955077324f5c0ea75cca plugins/AuthLDAPLogin/share/web/templates/ldaplogout
SHA1 43c8998946172ac32eeefdfbf95a663d6e60e40a plugins/AuthLDAPLogin/t/00-load.t
-SHA1 8c487e541a3d5115e8b04f35ac6555cca05de933 plugins/AuthLDAPOnly/MANIFEST
+SHA1 56ea69fc320fe797b3ee0abe744e838783156e38 plugins/AuthLDAPOnly/MANIFEST
SHA1 76658d43f96759a30895e9ab9116d3fe2ec475bf plugins/AuthLDAPOnly/Makefile.PL
-SHA1 6490648ff1114d79ba05a70e8106d5d0226d72ae plugins/AuthLDAPOnly/debian/changelog
+SHA1 03bd8afc22d6fc4dfadf240f683004d5d1cf7261 plugins/AuthLDAPOnly/debian/changelog
SHA1 9c6b057a2b9d96a4067a749ee3b3b0158d390cf1 plugins/AuthLDAPOnly/debian/compat
SHA1 e256f776a58f8ca1de7a20082e855e03bace79d8 plugins/AuthLDAPOnly/debian/control
SHA1 c361200ede7340a93f131034eaaaa71f36bf1617 plugins/AuthLDAPOnly/debian/copyright
SHA1 68dfa9d87a39ca9c6480d8a93e7efb18565b4db3 plugins/AuthLDAPOnly/debian/rules
-SHA1 69f53febd6a99e6e61e5b87a387139a74f509b8d plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly.pm
+SHA1 3bd9e35fc165eddb6d6f007bfda1d18dc45855e5 plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly.pm
SHA1 3a1a5ac6571c49fd766eba8f8fb94dbc35081192 plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/Action/LDAPLogin.pm
SHA1 8709ec6fd348b2229eecab4778fe52b9e3f5f241 plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/Action/LDAPLogout.pm
SHA1 5776159e43fe28077ebe66359d888620c1a78c30 plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/CurrentUser.pm
SHA1 11063de8ce0267140e4eeacc8caa552de893d435 plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/Dispatcher.pm
-SHA1 be8d85f7423aabd9e504feb4e759d412990c4f5a plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/Model/LDAPUser.pm
+SHA1 a03143b94d7abae6c6b162b4353c9eb7ddaf2143 plugins/AuthLDAPOnly/lib/Jifty/Plugin/AuthLDAPOnly/Model/User.pm
SHA1 645c578bde4a89f2a47ffbff048863a52691ad11 plugins/AuthLDAPOnly/share/po/en.po
SHA1 42fa3dbdbfd9c34dd1260df7d70fd215aeb3d987 plugins/AuthLDAPOnly/share/po/fr.po
SHA1 a52f49740c6a0c5dfb5ef2413b26d40c71e8dba0 plugins/AuthLDAPOnly/share/web/templates/ldaplogin
@@ -293,11 +365,13 @@
SHA1 0086fe18fd01b6ace92636034ea606008ab5a374 plugins/AuthzLDAP/Makefile.PL
SHA1 d9d714781bef6a0e3892f258350f9d6797eafa9a plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP.pm
SHA1 a63d50ed4f93a1d9909af9889fc30d8b3e9140a4 plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP/Action/LDAPValidate.pm
-SHA1 5b391191e624c0d2e8c16f19c531a2c2993ba49e plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP/Model/LDAPFilter.pm
+SHA1 b43a3b2208f34d92fe6d86cc43ca8fecdf44dc30 plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP/Model/LDAPFilter.pm
SHA1 dc50e07d76934884116843767a1784571accac4e plugins/AuthzLDAP/share/po/en.po
SHA1 18be32490b494470824534cccd87b034cd790987 plugins/AuthzLDAP/share/po/fr.po
SHA1 cd21439e1906eb58e9c576a477a8a31e05340c05 plugins/AuthzLDAP/share/web/templates/error/AccessDenied
SHA1 289f295702910035ed2b122279ecf8b3b6a6389b plugins/AuthzLDAP/t/00-load.t
+SHA1 90adb765b74e3b0d115b33a4a6da8ed38a6eb179 plugins/DumpDispatcher/Makefile.PL
+SHA1 94f0d477bc64ce6e88e0023cccc228c4f5ed1cf9 plugins/DumpDispatcher/lib/Jifty/Plugin/DumpDispatcher.pm
SHA1 e8ce16205eccb1b99224ca81d3a3496163a98864 plugins/EditInPlace/Makefile.PL
SHA1 f2d5b6fb2d7628c2dd7207a8a7fb3dab1ea2f4bf plugins/EditInPlace/debian/changelog
SHA1 9c6b057a2b9d96a4067a749ee3b3b0158d390cf1 plugins/EditInPlace/debian/compat
@@ -317,7 +391,7 @@
SHA1 0c2118868ef82ac517eb6d9c3bd93e6eb9bbf83e plugins/EditInPlace/inc/Module/Install/Win32.pm
SHA1 e827d6d43771032fa3df35c0ad5e5698d0e54cda plugins/EditInPlace/inc/Module/Install/WriteAll.pm
SHA1 312dfe93d52daa4c72257cf2299aee35f61b0a16 plugins/EditInPlace/lib/Jifty/Plugin/EditInPlace.pm
-SHA1 187cd200affbf8861a91d008273eb9de664a9d60 plugins/EditInPlace/lib/Jifty/Plugin/EditInPlace/Action/FileEditor.pm
+SHA1 5cb6593e89cc253b5f3a99eb8e08366b3b7bd119 plugins/EditInPlace/lib/Jifty/Plugin/EditInPlace/Action/FileEditor.pm
SHA1 69ff778cc486bfd14a97f7690a7706633dbc2e6b plugins/EditInPlace/lib/Jifty/Plugin/EditInPlace/Dispatcher.pm
SHA1 6f363a3b2826ee1fb01921fefebaf99b111a1c31 plugins/EditInPlace/share/web/templates/__jifty/create_file_inline
SHA1 dc4e60f93e56496f8010ae81888e84e3352e979f plugins/EditInPlace/share/web/templates/__jifty/edit_file
@@ -334,10 +408,10 @@
SHA1 5ece7af558c3a7bc83f535e948b7a6b24372daec plugins/Login/MANIFEST
SHA1 4439300be4c8a1b99726658ceed25674216a079e plugins/Login/META.yml
SHA1 5d7bbe469fc6a8e0c5f303539c1d235f7c4f50a2 plugins/Login/Makefile.PL
-SHA1 4c552f502b762c8e1a12848423a36ddff99bd38b plugins/Login/debian/changelog
+SHA1 1951523a33e3f0b137db99e76c64c755efcf99d5 plugins/Login/debian/changelog
SHA1 9c6b057a2b9d96a4067a749ee3b3b0158d390cf1 plugins/Login/debian/compat
SHA1 90e2e662014841fff93a7e346908f66178dfcc07 plugins/Login/debian/control
-SHA1 df2b684174a5e8bdf6d14b985020057702b4c884 plugins/Login/debian/rules
+SHA1 68dfa9d87a39ca9c6480d8a93e7efb18565b4db3 plugins/Login/debian/rules
SHA1 017bedfcba1e0c72b36301e6ef21b8712b84d175 plugins/Login/inc/Module/Install.pm
SHA1 b1a70869c098ba602151631386fc510b5bfd3511 plugins/Login/inc/Module/Install/Base.pm
SHA1 dd7313db23119d49ae78593bfa576554fb5b0fd8 plugins/Login/inc/Module/Install/Can.pm
@@ -356,10 +430,10 @@
SHA1 122c7769c6ba202aa4e791f9f34972e58fc1fcd2 plugins/Login/lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm
SHA1 c2438302917e04b15f940d12452a3d07328ba95d plugins/Login/lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm
SHA1 e238cc4ec479aefb8864ca99984cdea4c76141cf plugins/Login/lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm
-SHA1 6a41bfe4d8c024874b16f4c8f01d5d16fb77fcd3 plugins/Login/lib/Jifty/Plugin/Login/Action/Signup.pm
+SHA1 9c668df7d6e4453fe5815548aa977e3c2803f21a plugins/Login/lib/Jifty/Plugin/Login/Action/Signup.pm
SHA1 81875f6ab2d807bfe4671af084b4f238d383464c plugins/Login/lib/Jifty/Plugin/Login/CurrentUser.pm
SHA1 525f9e063afd64961982b513c5eab0a85909c917 plugins/Login/lib/Jifty/Plugin/Login/Dispatcher.pm
-SHA1 26715ae2299b714b2eeaad1b0d9d709623c2b05d plugins/Login/lib/Jifty/Plugin/Login/Model/User.pm
+SHA1 5f90d761bd912c6baabc81174c2f459fba7a21b3 plugins/Login/lib/Jifty/Plugin/Login/Model/User.pm
SHA1 3a8233f78d474c2671121f87c7e20bc01ba3090a plugins/Login/lib/Jifty/Plugin/Login/Notification/ConfirmAddress.pm
SHA1 dd2d89075e1d29eb0e20cfc43fba7db98ef02529 plugins/Login/lib/Jifty/Plugin/Login/Notification/ConfirmLostPassword.pm
SHA1 c67dcd72acc2f4e5b43863c7480697cc711b5e57 plugins/Login/share/po/en.po
@@ -382,33 +456,63 @@
SHA1 62229286e03ec35c922c8a7f9f3bb68412a78a55 share/dtd/xhtml-special.ent
SHA1 e7749f99989ec8a9608f6cfbd41a5e5dddc18aec share/dtd/xhtml-symbol.ent
SHA1 b4a6d708f6b55a48526e9483c718f2ed820df75c share/dtd/xhtml1-strict.dtd
-SHA1 ddc3a6849e3db2ff2c5e1113a36d6e9869718dc4 share/po/en.po
-SHA1 a2f3d82acc9d343569eb0bc53a1517650c446189 share/po/fr.po
-SHA1 44b99ffe0fd8b2410b3ea5c988ebc61f07d30a38 share/po/ja.po
-SHA1 434c54b1132635916b8f6c70227685661593615d share/po/zh_cn.po
-SHA1 55bf7ecd5ef87fe38e5e3c6d6a0df3b7d8041994 share/po/zh_tw.po
+SHA1 5cfcf2d84b5548b2990efa52e51d3f15a47816b4 share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/_elements/nav
+SHA1 6a096f8d324464e6ad6407442faf7b2af0ecdc7e share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/action/dhandler
+SHA1 1b55e3945405d09df59f0a40182f06f8f59a2e97 share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/autohandler
+SHA1 51eb5ec4ebe6ad25eac8461c132193ded8ca2640 share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/fragments/list/header
+SHA1 80a5f7d081589dba73766f86a79145e997500655 share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/fragments/list/list
+SHA1 a73b777585f562210eccba19f007e2ac89b428c4 share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/fragments/list/new_item
+SHA1 ed176f653007f8a08e88355bfd68e1b0fc645723 share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/fragments/list/search
+SHA1 a118ac016c645629ed720d9626b36266089eee58 share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/fragments/list/update
+SHA1 9d339e7acebf3e929b15c1d8b4642ecbddf7f4b6 share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/fragments/list/view
+SHA1 559940ee5c2e5b56f3a438f377ea110018e20b18 share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/index.html
+SHA1 99ce3e69e2201664a1363ca2535dcc51a64a1f92 share/plugins/Jifty/Plugin/AdminUI/web/templates/__jifty/admin/model/dhandler
+SHA1 7efa4f24d875a19035963c3955f2fc4e613b8cfe share/plugins/Jifty/Plugin/OnlineDocs/web/templates/__jifty/online_docs/autohandler
+SHA1 608c393b35a8884b4d32a4c855bbcc73478dc849 share/plugins/Jifty/Plugin/OnlineDocs/web/templates/__jifty/online_docs/content.html
+SHA1 58a4059cc383f792108986d2386a5e7edc81363f share/plugins/Jifty/Plugin/OnlineDocs/web/templates/__jifty/online_docs/index.html
+SHA1 37555dd5c3acfbaecfc28416e0fa21b0aa6e1d77 share/plugins/Jifty/Plugin/OnlineDocs/web/templates/__jifty/online_docs/toc.html
+SHA1 7c9254ebc9576276665394ce0394a1f22a98e702 share/po/en.po
+SHA1 be64ba2089eed8163afc23145fc13aca072eb740 share/po/fr.po
+SHA1 8e1828aa8acbe74346907e759d1d48c547140e0d share/po/ja.po
+SHA1 59df94d159ce45bc55d4fe47eae42ab30bc1ec41 share/po/zh_cn.po
+SHA1 623dbb738a8db1e79de6127fc3af2c918d2c93e6 share/po/zh_tw.po
SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709 share/web/static/css/app-base.css
SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709 share/web/static/css/app.css
SHA1 c566d7ab5005e82dcf2f90809ae757e07d338138 share/web/static/css/autocomplete.css
SHA1 5f569fc23eb815ee6f6d086aa6df87f6c38952d3 share/web/static/css/autohandler
-SHA1 c8f7207fab0b74a53a2a798bcedd2f9d94ecc32e share/web/static/css/base.css
+SHA1 98bd4a5fc5cdcf84794d85da8e6a91f13df875cc share/web/static/css/base.css
SHA1 669f07ab36d148383013733d8230d49e7e7b25ec share/web/static/css/calendar.css
SHA1 bf48b6bda86f359b95b29a7c3451a3c1b5721385 share/web/static/css/combobox.css
SHA1 6b4d4cbc063731dabe50356a3560eae6a9f25aef share/web/static/css/context-menus.css
-SHA1 9da37a3dea2259252e33e0cd72198baa04d17530 share/web/static/css/forms.css
+SHA1 4cb352032878df021a9f42e5e6288a00beb259f6 share/web/static/css/forms.css
SHA1 52ddd83ee7c511d78537454a097f0264a7db3c1c share/web/static/css/halos.css
SHA1 c7eede0c22f68e4417748bb0903b48195648f4c0 share/web/static/css/keybindings.css
-SHA1 91cd2873a5521bbc172389d8af2c29f33578fcc9 share/web/static/css/main.css
+SHA1 a67bd8704c0c8e8866e01de8a98feb9788b853bd share/web/static/css/main.css
SHA1 903069dae3de35d6a3226b8272ff317b8eebd58c share/web/static/css/nav.css
SHA1 45861338bc40888737738521a44d4adf286b1204 share/web/static/css/notices.css
-SHA1 4389605ead1cf3e51a96f69d700ca70b3be6ca32 share/web/static/css/yui/calendar/calendar.css
-SHA1 b8074785c5372a76038c88feed271f1dd839b561 share/web/static/css/yui/tabview/border_tabs.css
-SHA1 2008bf0af63ee36885dd8bbc5fb134bc09b58135 share/web/static/css/yui/tabview/tabs.css
+SHA1 6af7922df30a9bcbba91de135280f35020c3de75 share/web/static/css/yui/calendar/calendar.css
+SHA1 c38a3f0ee9c3177b3b57c8a12259583937596252 share/web/static/css/yui/menu/map.gif
+SHA1 454d5a1fc8a75cfdfda8da84fcdb3ad61bc28ecf share/web/static/css/yui/menu/menu.css
+SHA1 fdb3816246f3a83ea855647ac7522b0fd81fc0f0 share/web/static/css/yui/menu/menuarodwn8_dim_1.gif
+SHA1 e5a3092b0e537c55f6d51fa4a205be40f991c27c share/web/static/css/yui/menu/menuarodwn8_hov_1.gif
+SHA1 49ce21aef759cf5c5c845db503da90be12061f47 share/web/static/css/yui/menu/menuarodwn8_nrm_1.gif
+SHA1 5cd80daf67d57e4ded027501824953e9e1c28c24 share/web/static/css/yui/menu/menuarorght8_dim_1.gif
+SHA1 a5384dbfde3bf5fd601e864a1a3a73f449b84796 share/web/static/css/yui/menu/menuarorght8_hov_1.gif
+SHA1 7946437245912ed7b12586fb9ae304cb34fb2e0a share/web/static/css/yui/menu/menuarorght8_nrm_1.gif
+SHA1 00f9004f9b673c61e0be4017ef4f4fe07d3ad8ba share/web/static/css/yui/menu/menuaroup8_dim_1.gif
+SHA1 88249494fd9e0a44b1f4ec690bb43765bbdddc9c share/web/static/css/yui/menu/menuaroup8_nrm_1.gif
+SHA1 babea44b546e05e156f0808b54e813c6ed611df6 share/web/static/css/yui/menu/menuchk8_dim_1.gif
+SHA1 595dcc3d40dba222b2126d4bda8aa58c655f3eeb share/web/static/css/yui/menu/menuchk8_hov_1.gif
+SHA1 bdbf9997513356f1f4177bc9136f95070a817557 share/web/static/css/yui/menu/menuchk8_nrm_1.gif
+SHA1 e94bf097120743a57f5ab76c35572ce40d354a3f share/web/static/css/yui/tabview/border_tabs.css
+SHA1 ea3e3690200169f41bf24679a3569ad31d664980 share/web/static/css/yui/tabview/tabs.css
+SHA1 4a07b35df98279d126d06236308c29a7bfa69d42 share/web/static/css/yui/tabview/tabview.css
SHA1 2f28dd2d59fe5486abce194e6fe68da0e49b1084 share/web/static/favicon.ico
SHA1 6197eb13b4254f77f16833e1a9a8640e939d574c share/web/static/images/css/bullet_arrow_down.png
SHA1 fdab0053425ba609387dffb0e2529a8feacc3906 share/web/static/images/css/bullet_arrow_up.png
SHA1 3410d5156716e13443770cce0f3384eacfdb5adb share/web/static/images/css/fieldbg-autocomplete.gif
SHA1 97c94d7dfb0683f9d2ac7f9406ca36495fa638e0 share/web/static/images/css/fieldbg.gif
+SHA1 a1fdee122b95748d81cee426d717c05b5174fe96 share/web/static/images/iepngfix/blank.gif
SHA1 67f41db40d62b81d71cb60c542695e0d7e6d393d share/web/static/images/pony.jpg
SHA1 6197eb13b4254f77f16833e1a9a8640e939d574c share/web/static/images/silk/bullet_arrow_down.png
SHA1 fdab0053425ba609387dffb0e2529a8feacc3906 share/web/static/images/silk/bullet_arrow_up.png
@@ -425,24 +529,25 @@
SHA1 eb756c931be8ef70fc27ba0046375f32022e3b6d share/web/static/js/app.js
SHA1 716b6f8326bd5cd05c31e521351197b5038e052e share/web/static/js/app_behaviour.js
SHA1 2b28f63068ff486e7fd7937f725f47e886d01831 share/web/static/js/behaviour.js
-SHA1 aa6192ac38a0c708ea0efb60bb98c666d9687423 share/web/static/js/bps_util.js
-SHA1 6b09c590f5e94b238fd99031e6b57ec57e70bd3f share/web/static/js/calendar.js
+SHA1 47cd1a7e3c41b4032cc1712f12b8564cdac12d37 share/web/static/js/bps_util.js
+SHA1 c5fe967d89bc082af093d1ea4eaa2ef3cbfa4e79 share/web/static/js/calendar.js
SHA1 e9f9931abe8ddf86cf5cfddd1f0e963bb5bf0ccb share/web/static/js/combobox.js
SHA1 cd5a80e098d28f7cf0b74cee38f08bd336ccdc95 share/web/static/js/context_menu.js
SHA1 b03b1f06f9c972cfb083c3d87b3dc74e4d85bf77 share/web/static/js/css_browser_selector.js
-SHA1 a90d3ffbc606979282dba3296599f582715021ab share/web/static/js/cssquery/cssQuery-level2.js
-SHA1 ba5ff2e1484476981ccf311ff8fe0062a9b2ac01 share/web/static/js/cssquery/cssQuery-level3.js
+SHA1 efa1e9f561fb31ec520e32e7d623e8e41afb7dfc share/web/static/js/cssquery/cssQuery-level2.js
+SHA1 37cfa3bfdb37450d3a89a88387c4e04baefff271 share/web/static/js/cssquery/cssQuery-level3.js
SHA1 a80e117cfca6644bde2bb8bd8d48a093e784a731 share/web/static/js/cssquery/cssQuery-standard.js
SHA1 95408c5aa294bdbc7b857d35772c1bd888b87b33 share/web/static/js/cssquery/cssQuery.js
-SHA1 d542a217ef9c527340d25bfffbccce27927d1259 share/web/static/js/dom-drag.js
+SHA1 e72565db2119b617c9ca0af948956a399caa5720 share/web/static/js/dom-drag.js
SHA1 4553f3cb184b09228ed4362898e9d30200a2a585 share/web/static/js/formatDate.js
SHA1 a1d2c6292d656c275383b97aad6ca913b8a1b031 share/web/static/js/halo.js
-SHA1 44bac00f46d4e6809892fc03c42487bd275be71e share/web/static/js/jifty.js
+SHA1 08b20563e958e72c3e8a221d91614c412bdd068b share/web/static/js/iepngfix.htc
+SHA1 8160deda9af812be79ea1f8a30d8cf8d67055777 share/web/static/js/jifty.js
SHA1 29fe34f11192976f1a388562188b1eb9af7f4497 share/web/static/js/jifty_smoothscroll.js
SHA1 8723bf251531e79ab109ea0d3fb2187a8dac8cb6 share/web/static/js/jifty_subs.js
-SHA1 2fd261c3c30a0b17e02e6af79d7c7c587dfe2f2a share/web/static/js/jifty_utils.js
-SHA1 d6c17ef3717315c08659082144a2caf2e970b23d share/web/static/js/jsTrace.js
-SHA1 2d8acba4acfd5508381461ccabe954c2e9df086c share/web/static/js/jsan/DOM/Events.js
+SHA1 1a4ccf6b5d376984d91c439e1642bd2b7fb11115 share/web/static/js/jifty_utils.js
+SHA1 49478568d1f258c9d061faa30c2181fd999b07f0 share/web/static/js/jsTrace.js
+SHA1 3b3493afbf46fc8afba58f541e338836bedbdd0b share/web/static/js/jsan/DOM/Events.js
SHA1 36b2a3f1966b97fcc338b557830106bf2d490485 share/web/static/js/jsan/JSAN.js
SHA1 679d9c011aa8403cfc0ba945a9143c2e9cacccfa share/web/static/js/jsan/Push.js
SHA1 4d3474847360cb00edc1ae4745ea6b56a7ec1a2b share/web/static/js/jsan/Upgrade.js
@@ -460,26 +565,16 @@
SHA1 cc2e31820eed69ae87b1b2befa50e8c4a8519342 share/web/static/js/scriptaculous/slider.js
SHA1 6b42a40cac7d45f9fd6665e18c4e494704eff9e3 share/web/static/js/scriptaculous/unittest.js
SHA1 f254696f59ab11c2373c79ba0e6f303d8ac4f71e share/web/static/js/setup_jsan.js
-SHA1 9872547d7c43a3ddb3280fe4e022912b06d59239 share/web/static/js/yui/calendar.js
-SHA1 b378c19c0bbde98f1c7873ca61bb749a63159235 share/web/static/js/yui/container.js
-SHA1 7ddb98d87fa5e228e19c0ce9da2c8d14c8fb8be1 share/web/static/js/yui/dom.js
-SHA1 cb5c1c0e7e8803c95c2f0e313bbeb5a3431f1fba share/web/static/js/yui/event.js
-SHA1 2d81827326f37e25ba95c248498096759f3433c5 share/web/static/js/yui/tabview.js
-SHA1 71c27fdb9e3d24f628a820638ff529098cdd7821 share/web/static/js/yui/yahoo.js
+SHA1 4f45c2546592411e46e149a73d347e176d0c7ad6 share/web/static/js/yui/calendar.js
+SHA1 4d8516305e94d483884ebdfca238d5ea51d0998c share/web/static/js/yui/container.js
+SHA1 dcffe77f6896444b0d71fcb1e8be0ad559256a3e share/web/static/js/yui/dom.js
+SHA1 7b3e21d1cab9fd5da64911838295429d16415797 share/web/static/js/yui/element-beta.js
+SHA1 96f4c1ab0670c62a11e1be261dce68f33064bd67 share/web/static/js/yui/event.js
+SHA1 bfe29fd94ccc2d6b6c008245b3a4ce3f8ed651f2 share/web/static/js/yui/menu.js
+SHA1 ae99956060eb7a5a7b8b0856cd1013a3ef5b0189 share/web/static/js/yui/tabview.js
+SHA1 d246ffa31cb6ef0218be0cbec5fd0ba8438ef6cc share/web/static/js/yui/yahoo.js
SHA1 05359f0e32b4bebd965707788228704167689d3c share/web/templates/=/subs
-SHA1 5cfcf2d84b5548b2990efa52e51d3f15a47816b4 share/web/templates/__jifty/admin/_elements/nav
-SHA1 6a096f8d324464e6ad6407442faf7b2af0ecdc7e share/web/templates/__jifty/admin/action/dhandler
-SHA1 1b55e3945405d09df59f0a40182f06f8f59a2e97 share/web/templates/__jifty/admin/autohandler
-SHA1 51eb5ec4ebe6ad25eac8461c132193ded8ca2640 share/web/templates/__jifty/admin/fragments/list/header
-SHA1 80a5f7d081589dba73766f86a79145e997500655 share/web/templates/__jifty/admin/fragments/list/list
-SHA1 a73b777585f562210eccba19f007e2ac89b428c4 share/web/templates/__jifty/admin/fragments/list/new_item
-SHA1 ed176f653007f8a08e88355bfd68e1b0fc645723 share/web/templates/__jifty/admin/fragments/list/search
-SHA1 a118ac016c645629ed720d9626b36266089eee58 share/web/templates/__jifty/admin/fragments/list/update
-SHA1 9d339e7acebf3e929b15c1d8b4642ecbddf7f4b6 share/web/templates/__jifty/admin/fragments/list/view
-SHA1 559940ee5c2e5b56f3a438f377ea110018e20b18 share/web/templates/__jifty/admin/index.html
-SHA1 b0ceaf320862d14064c55a17f72e91024690371d share/web/templates/__jifty/admin/model/dhandler
SHA1 bdaeeff0c2522a8509d4da45be703d1e8cf5c96c share/web/templates/__jifty/autocomplete.xml
-SHA1 bfeb6c28df0bc0c78119c9ff90f8051e5f6adcc2 share/web/templates/__jifty/css/dhandler
SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709 share/web/templates/__jifty/empty
SHA1 f85d8cae8a2df3ee51b868a744a9e9af21925e0c share/web/templates/__jifty/error/_elements/error_text
SHA1 e2d761b0b92f818eb2bbb91a15cef0a2471d2245 share/web/templates/__jifty/error/_elements/wrapper
@@ -487,20 +582,15 @@
SHA1 0cf3e3f2f8447ea5f66fd22d325c578448129718 share/web/templates/__jifty/error/dhandler
SHA1 78e1e0af483fa3bdac2de4e5a9d82486d67b8537 share/web/templates/__jifty/error/error.css
SHA1 6834dbbfe494846bb3a70f1f8d6735c4f8c1b326 share/web/templates/__jifty/error/mason_internal_error
-SHA1 b8793db1dd47943dc83173f02f2227f9ca310235 share/web/templates/__jifty/halo
-SHA1 7fbdc70a9c0481d1e67b6154178173d434206fd9 share/web/templates/__jifty/js/dhandler
-SHA1 6a50927b6d7c7f5f2048a691299585cb2dd05677 share/web/templates/__jifty/online_docs/autohandler
-SHA1 d0116574b44622720db7a9efc7fafdf4002ed012 share/web/templates/__jifty/online_docs/content.html
-SHA1 bd81ff4e458c5e1a76c131dce40ffd71fd6a76f7 share/web/templates/__jifty/online_docs/index.html
-SHA1 630b516dede6767e8185de8211e6affd7b564cfe share/web/templates/__jifty/online_docs/toc.html
-SHA1 c31026ba4fa88814a705651878cb89f086f43f9d share/web/templates/__jifty/validator.xml
+SHA1 36736d4597f9a4259b84618f49122a3e2c2790a0 share/web/templates/__jifty/halo
+SHA1 d56aea6b4ec690cc9078873da2f93bcbb88d2921 share/web/templates/__jifty/validator.xml
SHA1 8ec2abf3fb43be8217f7a0af4054cf40f7e1e47e share/web/templates/__jifty/webservices/json
SHA1 bbe1d4af8ab26a9e7d528d819bb271b591172f3c share/web/templates/__jifty/webservices/xml
SHA1 c7384fcdf1ee7a3e347388c6619f6aa2f297656e share/web/templates/__jifty/webservices/yaml
SHA1 8145ab6043a7bbd70e1bfa33e068fb741f4ee3a5 share/web/templates/_elements/header
SHA1 f36e8e0557117d8fdcebad74694fac718101ce27 share/web/templates/_elements/keybindings
SHA1 0d84d7af43685d7161fc800a2c8b464b8586c57d share/web/templates/_elements/menu
-SHA1 4da6700ff1fdc390436ff05906f4df979c44d572 share/web/templates/_elements/nav
+SHA1 9a63bfc72a36bc01d3d480d24d695ca5a3fe9169 share/web/templates/_elements/nav
SHA1 b74c8647eb89e1e189d3cefbbfae51da608edcff share/web/templates/_elements/page_nav
SHA1 c255d8da7c3eb68fc66f9f7c041c92b247489fcc share/web/templates/_elements/sidebar
SHA1 bc8991085ddd0c664bb57a1ad4a79e9bca1807ea share/web/templates/_elements/wrapper
@@ -508,8 +598,10 @@
SHA1 106fc0286e2aff5a01d9a623c37fc807451f2037 share/web/templates/dhandler
SHA1 347e3ad8491b742c4cd8e63e77fb4cae2152034c share/web/templates/helpers/calendar.html
SHA1 1bd17a07884f71740a048c41b67ac9b06915bf76 share/web/templates/index.html
+SHA1 c118e782947f715afec7b5cffa4ebc413e990c12 share/web/transform_templates
SHA1 7f9dae91a9bfc2743eec1d7aaf78e16fc9f1baba t/00-load.t
SHA1 1e1a7b63b3ea8d2712214eb28b5fe69aae76da1d t/01-dependencies.t
+SHA1 777e40e7d3c591c21883d0ed880df8712dd50ff3 t/01-test-mechanize.t
SHA1 ade22974f54a6e0991e14be587be0c9797e72ed5 t/01-test-web.t
SHA1 95fe956e7bae756a7bc25e65a6761ee0c64981e7 t/01-version_checks.t
SHA1 4fa0e0143339298278c5e22a58236c6b71555508 t/02-connect.t
@@ -523,9 +615,9 @@
SHA1 0712de44cbe60eea251a1955b0bcb218f22adf4a t/07-limit-actions.t
SHA1 38ab90a10fc0cbbbfc3205e543312950302f37a2 t/08-client.t
SHA1 ea9587b57587f6b9b5e02e3d30b96807f7b62200 t/09-url.t
-SHA1 a7e9e7792684ccbd1500b4ad88c97a5bc1f7dd54 t/10-i18n.t
+SHA1 7ca6fdf97c470ec1360425d3121690b9a4e93790 t/10-i18n.t
SHA1 d571f6fae9d1a33060fda8c89951492a02b1af01 t/11-config-files.t
-SHA1 3b834f5b8a6371c502eb0dc1f1cb9d79a5257c7a t/12-param-schema.t
+SHA1 bd4520e6f2bfdabc6dba2d27e0cb6d33453f82e7 t/12-param-schema.t
SHA1 59c44900b1cb957d262f96363ceff21b46e0d598 t/99-pod-coverage.t
SHA1 bb0da54f2b3f2d7955baa41ee458cb3d1887f475 t/99-pod.t
SHA1 a7dc1f376cac630ea28d2965e561469deb951cc7 t/Continuations/bin/jifty
@@ -554,35 +646,58 @@
SHA1 14a865ad9c903f69dffa595c463f343dd29f62e2 t/Mapper/share/web/templates/index.html
SHA1 3b7b51b4428dcbf0b9b1d55c39fd139a3ee4868a t/Mapper/t/00-prototype.t
SHA1 548bf96ee16a84e3793d89cc0dd68ab67bd03f66 t/Mapper/t/01-raw-api.t
-SHA1 c9c9c8fa7e4284baecf87967eef108715068d249 t/Mapper/t/02-api.t
+SHA1 cdc883e2e3ff2997c1efc01f688638f8d983edd9 t/Mapper/t/02-api.t
+SHA1 5151dae3d7ac5f80dcfaf39fdeea0157af85f189 t/TestApp-Plugin-PasswordAuth/Makefile.PL
+SHA1 f7f44f9a7337def0c97f981073e3ed970851d9ae t/TestApp-Plugin-PasswordAuth/bin/jifty
+SHA1 2ad861771e8cc20e90a5820cb4d3d0837a4fc047 t/TestApp-Plugin-PasswordAuth/etc/config.yml
+SHA1 deb71812bd1042f4ac4260a7b67340ff5f6e5c4d t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/FasterSwallow.pm
+SHA1 f34586dcd0217789759de64af7720695c1d50a9a t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/FavoriteColor.pm
+SHA1 a83f69587be10ffe3191bc04ed94f2b817b54ce4 t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Bootstrap.pm
+SHA1 54c886b94c444a3aaad3a593ab5bbf74b693c9ee t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Dispatcher.pm
+SHA1 d2cc091e340ec51e11212f7f11c4fdb9f7fa23ff t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Model/User.pm
+SHA1 bde1e56638abc9cb70b4f0de63eee14fea0ae766 t/TestApp-Plugin-PasswordAuth/t/00-model-User.t
+SHA1 cd358dc97050649f35034d8363590798a543799d t/TestApp-Plugin-PasswordAuth/t/01-tokengen.t
SHA1 a7dc1f376cac630ea28d2965e561469deb951cc7 t/TestApp-Plugin-REST/bin/jifty
SHA1 4762d5e154fcbeb0b188a1ecb90c4997403c9d24 t/TestApp-Plugin-REST/etc/config.yml
SHA1 61845f11966aadecf3bb885fcc5b33ef66e9637f t/TestApp-Plugin-REST/lib/TestApp/Plugin/REST/Action/DoSomething.pm
SHA1 3670c345f54846479d42b9636e0484130e1e72c1 t/TestApp-Plugin-REST/lib/TestApp/Plugin/REST/Dispatcher.pm
SHA1 2bc709eb73c4f72267835a06f07de3bc9fe0adba t/TestApp-Plugin-REST/lib/TestApp/Plugin/REST/Model/Group.pm
-SHA1 4ed01e5665fe265e1d45bfcce37a57e8c3087605 t/TestApp-Plugin-REST/lib/TestApp/Plugin/REST/Model/User.pm
+SHA1 d98ae3b792d679e71ad61d9281e4c70337fb3593 t/TestApp-Plugin-REST/lib/TestApp/Plugin/REST/Model/User.pm
SHA1 5184bbae7c9a4653841156f54b34bac4abf7d54f t/TestApp-Plugin-REST/t/00-model-User.t
SHA1 3b7b51b4428dcbf0b9b1d55c39fd139a3ee4868a t/TestApp-Plugin-REST/t/00-prototype.t
SHA1 b6c65e7f47ff136c7d370b85cf01f27537dd81ff t/TestApp-Plugin-REST/t/01-config.t
-SHA1 3e915c7d6a7c7a0fee3246da9b1f8e782b5a317a t/TestApp-Plugin-REST/t/02-basic-use.t
+SHA1 daa99f581a0b42976ce7ae4fe8c3f4d79d799827 t/TestApp-Plugin-REST/t/02-basic-use.t
SHA1 a7dc1f376cac630ea28d2965e561469deb951cc7 t/TestApp/bin/jifty
SHA1 f9a9321b803e4f248ecdd86fd71613164c01bd86 t/TestApp/lib/TestApp/Action/DoSomething.pm
SHA1 f93118ca17be86a7c171ee47864d7149baf7344c t/TestApp/lib/TestApp/Action/DoSomethingElse.pm
SHA1 6e27f855429d18181d6c5a0de6b83492fa5c6219 t/TestApp/lib/TestApp/CurrentUser.pm
-SHA1 de8a0bb9c5dfe2ceb00f38c6baf66627f3b361b2 t/TestApp/lib/TestApp/Dispatcher.pm
-SHA1 3424b48c4def8e714a6508afa7a43569075131c8 t/TestApp/lib/TestApp/Model/User.pm
+SHA1 7e5dfbfaf1fc9c867e3bb3471597e9d744218949 t/TestApp/lib/TestApp/Dispatcher.pm
+SHA1 5e1331569dbfafb56c4bbd26e0e2ad58e2f3b3cd t/TestApp/lib/TestApp/Model/User.pm
+SHA1 b2d3474949dae7c171157e8697dbb208ef3805f8 t/TestApp/lib/TestApp/Upgrade.pm
+SHA1 0807d39d56ad1c603d5fda36c26f92f32709feb0 t/TestApp/lib/TestApp/View.pm
+SHA1 1a738a666e1bd83a6f6791d069738d0a90e724d4 t/TestApp/lib/TestApp/View/base.pm
+SHA1 0838ac6deac43ed66fb6bfb358051b716e12e7a8 t/TestApp/lib/TestApp/View/instance.pm
SHA1 67f41db40d62b81d71cb60c542695e0d7e6d393d t/TestApp/share/web/static/images/pony.jpg
+SHA1 5a47fc9c85527214f6eaf2c8f8dd84bfb80fef61 t/TestApp/share/web/templates/concrete.html
SHA1 1e4b29a138e61f49c1ceffe50c15ed0a087613fc t/TestApp/share/web/templates/currentuser
SHA1 a2e7bf8d2d52bbaf360af24b4ffc00c68d7e31f2 t/TestApp/share/web/templates/dispatch/basic
SHA1 d1e244371109ce216bfd6b9ac03374737461577c t/TestApp/share/web/templates/dispatch/basic-show
SHA1 44795ddb863c9c32c05678bf8288c9816e3366a9 t/TestApp/share/web/templates/dosomethingelse
SHA1 f5870c2fb3222b86d97f14bdf8155821c887987b t/TestApp/share/web/templates/editform
-SHA1 ef0db81c421ba89231ea6d72f355b7dd8fd5e8e2 t/TestApp/share/web/templates/index.html
+SHA1 9cea9df8bd6b4644b100259b9290f5e52f874d0d t/TestApp/share/web/templates/index.html
SHA1 2f721db97a3b571d0006f6ed9a0d0c8bffef8642 t/TestApp/share/web/templates/manual_redirect
+SHA1 70e9bbbe8ad7df2db3352073ec840a93c4d6d6fb t/TestApp/share/web/templates/path_test/foo/index.html
+SHA1 4e9416993c5e56de1f9688061648ec6a164b1734 t/TestApp/share/web/templates/path_test/in_both
+SHA1 0aa10de36e1c4b34d3e00ca954d10f2c532a1e25 t/TestApp/share/web/templates/path_test/mason_only
+SHA1 1f95e8e0f677fd2571dfcf6e66688b52f0e22184 t/TestApp/share/web/templates/redirected
+SHA1 55438c7d68b465f08c9774aacacbc2aa62cced8f t/TestApp/share/web/templates/regions/list
+SHA1 cc7e1174609f5ae92b441c4ecf7a4734cf5a9436 t/TestApp/share/web/templates/regions/long
+SHA1 f7b091879df762cccacaf827fbadc1ad4b6294b1 t/TestApp/share/web/templates/regions/short
SHA1 9a50bb56338896f9cd50b7098a9e28397ad28a34 t/TestApp/share/web/templates/somedir/dhandler
SHA1 350ab77f7c18d826ed91eaf251f3f80ebd9605ba t/TestApp/t/00-model-User.t
SHA1 3b7b51b4428dcbf0b9b1d55c39fd139a3ee4868a t/TestApp/t/00-prototype.t
SHA1 94a1fe86cc34fbdce9087f30a69a859063ca8714 t/TestApp/t/01-config.t
+SHA1 840b50a023f9bc45b2345e0c664949d55d056b15 t/TestApp/t/02-dispatch-show-rule-in-wrong-ruleset.t
SHA1 6c6726cd87697675c80828825ff34109daec7f86 t/TestApp/t/02-dispatch.t
SHA1 d438a2c8aa2fa15c80da4f2a44ecfe65856b58f8 t/TestApp/t/03-static.t
SHA1 dc8e0ea29839c6dd50843d7c95a907874f6d5472 t/TestApp/t/04-sessions.t
@@ -596,15 +711,21 @@
SHA1 55ba141d6c73a6dfa7ccccb6cb9f32253ed8decb t/TestApp/t/10-compress.t
SHA1 18667b3bdcbe7b9dd2715e16c8bbffe51c28548f t/TestApp/t/11-current_user.t
SHA1 019605c6e627bf65ee3d2ed1b8d2b34fc8e10853 t/TestApp/t/12-search.t
+SHA1 1c80b396277bf78134c2aa3de9e0f375e7efef75 t/TestApp/t/13-page-regions.t
+SHA1 b57b4cf6832d53a3777fe65e56f9ae076f474b0a t/TestApp/t/14-template-paths.t
+SHA1 16ed87389b38b2e7993bb4a6a418fc1611a90dc6 t/TestApp/t/15-template-subclass.t
SHA1 69401ad0579fa743f087731536229d2806dd1d6a t/TestApp/t/config-Cachable
SHA1 710c4b0faaea46f90a7b071e5396541a59ed0ff1 t/TestApp/t/config-Record
+SHA1 6c16e68284cc30d81eba755c6986675690b78f77 t/TestApp/t/i18n-standalone.t
SHA1 30274351a6eb9342daef843ffb8a2aafee38afb4 t/TestApp/t/instance_id.t
SHA1 ee548850452b377e08f36a9269c1b8f7911bdb2d t/TestApp/t/regex_meta_in_path_info.t
+SHA1 f502e4937629f7525cf90cf982cadd29bc60ed5a t/TestApp/t/upgrade.t
+SHA1 aa8319f0acdd5c8e8c60b34d360cff834029e570 t/TestApp/testapp
SHA1 c8fb21f31b593627b38129ee9dd41eaf9c556ced t/lib/Jifty/SubTest.pm
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.3 (GNU/Linux)
+Version: GnuPG v1.4.3 (Darwin)
-iD4DBQFFromfEi9d9xCOQEYRAjV1AJ9gxbyucs3vXDll+msp25TGsP4ZlwCUDDbz
-1ktLZJXD6wX2Hkn/232QNg==
-=ItK4
+iD8DBQFGIlqJEi9d9xCOQEYRAvp9AKC6Bt6TSh2IVj3eAKEck5r8ZZGcygCghMLD
+Q/dcuotigPAg5/wd/IXmbVc=
+=zvIQ
-----END PGP SIGNATURE-----
From jifty-commit at lists.jifty.org Sun Apr 15 13:06:23 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 13:06:26 2007
Subject: [Jifty-commit] r3137 - in Jifty-DBI/trunk: lib/Jifty
Message-ID: <20070415170623.4A1A24D8005@diesel.bestpractical.com>
Author: jesse
Date: Sun Apr 15 13:06:22 2007
New Revision: 3137
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/Changes
Jifty-DBI/trunk/MANIFEST
Jifty-DBI/trunk/SIGNATURE
Jifty-DBI/trunk/lib/Jifty/DBI.pm
Log:
r55443@pinglin: jesse | 2007-04-15 11:23:06 -0400
0.40
Modified: Jifty-DBI/trunk/Changes
==============================================================================
--- Jifty-DBI/trunk/Changes (original)
+++ Jifty-DBI/trunk/Changes Sun Apr 15 13:06:22 2007
@@ -1,5 +1,59 @@
Revision history for Perl extension Jifty::DBI.
+0.40 Sun Apr 15 11:19:45 EDT 2007
+
+ * Added sample code to POD for 'before_create' and 'after_create' to make it easier for users to implement by copy and pasting. -evdb
+
+ * Better non-lower()ing of non-string types on search. -jesse
+
+ * Fix up and add POD so that POD coverage tests pass -trs
+
+ * Kill unused JiftyRecord filter -trs
+
+ * Fixed documentation coverage for Jifty::DBI::Handle::Informix. -sterling
+
+ * Commented out incomplete apply_limits method in the Sybase handle. -sterling
+
+ * Fixed documentation coverage in Jifty::DBI::Record::Cachable. -sterling
+
+ * Fixed documentation coverage for Jifty::DBI::Record::Memcached. -sterling
+
+ * Added pod-coverage.t to encourage better documentation. Added documentation to Jifty::DBI::Record::Plugin. -sterling
+
+ * Added better handling of schema versioning -sterling
+
+ * Added _init_methods_for_columns to explicitly handle accessor/mutator creation for all columns attached to a record -sterling
+
+ * Applications employing JDBI can specify schema_version() in a sub-class of record to add better handling of "since" and "till" in both schema and code generation -sterling
+
+ * Modified columns() on records to only return active columns -sterling
+
+ * Added all_columns() to retrieve all columns on a record, even inactive ones -sterling
+
+ * Added the active() method to columns to test to see if a column is active for the current schema version -sterling
+
+ * Jifty::DBI now requires on Scalar::Defer 0.10. -audreyt
+
+ * Jifty::DBI::Schema - Don't rescind &defer and &lazy after the schema{...} block and talks about how to use it. -sterling
+
+ * debian changes -yves
+
+ * export of defer in Jifty::DB::Schema kills symbols for other use (thx audreyt) -yves
+
+ * Make load_by_cols work when a given value is undef by turning the query into IS NULL. -clkao
+
+ * Completely finish porting Jifty::DBI::Schema to use Object::Declare. clkao, audreyt
+
+ Visible differences are:
+
+ - "refers App::Class" is now an alias for "refers_to App::Class".
+
+ - In refers/refers_to it is no longer neccessary to load App::Class
+ beforehand; therefore circular references can now be expressed.
+
+ - "length is 30" is now invalid; a compile-time exception will be
+ raised that tells the user to use "maxlength is 40" instead.
+
0.39_9999 Fri Jan 26 21:30:48 CST 2007
- Removed unneccessary use of Devel::SimpleTrace.
Modified: Jifty-DBI/trunk/MANIFEST
==============================================================================
--- Jifty-DBI/trunk/MANIFEST (original)
+++ Jifty-DBI/trunk/MANIFEST Sun Apr 15 13:06:22 2007
@@ -20,6 +20,7 @@
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
lib/Jifty/DBI.pm
+lib/Jifty/DBI/Class/Trigger.pm
lib/Jifty/DBI/Collection.pm
lib/Jifty/DBI/Collection/Union.pm
lib/Jifty/DBI/Collection/Unique.pm
@@ -33,6 +34,7 @@
lib/Jifty/DBI/Filter/Time.pm
lib/Jifty/DBI/Filter/Truncate.pm
lib/Jifty/DBI/Filter/utf8.pm
+lib/Jifty/DBI/Filter/YAML.pm
lib/Jifty/DBI/Handle.pm
lib/Jifty/DBI/Handle/Informix.pm
lib/Jifty/DBI/Handle/mysql.pm
@@ -46,6 +48,7 @@
lib/Jifty/DBI/Record.pm
lib/Jifty/DBI/Record/Cachable.pm
lib/Jifty/DBI/Record/Memcached.pm
+lib/Jifty/DBI/Record/Plugin.pm
lib/Jifty/DBI/Schema.pm
lib/Jifty/DBI/SchemaGenerator.pm
Makefile.PL
@@ -66,8 +69,10 @@
t/04memcached.t
t/06filter.t
t/06filter_datetime.t
+t/06filter_storable.t
t/06filter_truncate.t
t/06filter_utf8.t
+t/06filter_yaml.t
t/10schema.t
t/11schema_records.t
t/12prefetch.t
@@ -75,6 +80,7 @@
t/14handle-pg.t
t/15types.t
t/16inheritance.t
+t/pod-coverage.t
t/pod.t
t/testmodels.pl
t/utils.pl
Modified: Jifty-DBI/trunk/SIGNATURE
==============================================================================
--- Jifty-DBI/trunk/SIGNATURE (original)
+++ Jifty-DBI/trunk/SIGNATURE Sun Apr 15 13:06:22 2007
@@ -1,12 +1,12 @@
This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.41.
+signed via the Module::Signature module, version 0.55.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
-It would check each file's integrity, as well as the signature's
+It will check each file's integrity, as well as the signature's
validity. If "==> Signature verified OK! <==" is not displayed,
the distribution may already have been compromised, and you should
not run its Makefile.PL or Build.PL.
@@ -14,16 +14,16 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 6cdd320e5387932cd7b6305d5b5068ac31cef0cb Changes
-SHA1 3bf592c9da2a5718e9be45c822f200bea821746b MANIFEST
-SHA1 59ce3857a0aa37277227ea09964d213bbb3bfd29 META.yml
-SHA1 45d5f1856267d73c7a4a21f8f584b15cfd1bae9b Makefile.PL
+SHA1 c75bb322c18f8549aa07f18da5dc5adceff0c48d Changes
+SHA1 59f221e6d6cbc2ba7d2a2f5c83115478d52ee18d MANIFEST
+SHA1 eece448e6f8738d5f9ecb0eb6a121ddee99a1d42 META.yml
+SHA1 e31bff7164109c3bb4ed1ea05eb2e6fa06ee0425 Makefile.PL
SHA1 d0943ab047f543c92405564ab77ba008052544e6 README
SHA1 82d6ac3f6def48558d09f8b6e3b53ed4194d8c81 ROADMAP
SHA1 9d304f35438f847863969f6a069598379f5a9db2 debian/README
-SHA1 9c58e250307d4ff61d3aa2e6f2250fbacf094d07 debian/changelog
+SHA1 81a512363ab486707897241134179cdd53e59116 debian/changelog
SHA1 5d9474c0309b7ca09a182d888f73b37a8fe1362c debian/compat
-SHA1 24cc11618a487ebaa24b7538eca0c066a51ad513 debian/control
+SHA1 c77ea854fe4acc7f8d63cf249b331f67cf41a030 debian/control
SHA1 c1085db4f95bd6e7e7470ccab55f8adba10d5024 debian/rules
SHA1 c28087e498978a1a314dfcaa584844703f31ac8c doc/notes/on_intuitive_schema_definitions
SHA1 584c0f6cdebcbf760dfca8413c94783586120214 ex/Example/Model/Address.pm
@@ -40,62 +40,69 @@
SHA1 f1d4e1bbcb40bb269f36e6dc011b3ca25d3829b7 inc/Module/Install/Metadata.pm
SHA1 0c2118868ef82ac517eb6d9c3bd93e6eb9bbf83e inc/Module/Install/Win32.pm
SHA1 e827d6d43771032fa3df35c0ad5e5698d0e54cda inc/Module/Install/WriteAll.pm
-SHA1 83f0a75d698ab7ab174f42bb19e346b23fb4ba5e lib/Jifty/DBI.pm
-SHA1 b9ad69976fe3438c0528057fe972bb5741824af6 lib/Jifty/DBI/Collection.pm
-SHA1 ecfae7430da875a856113e0c233daa0e31073000 lib/Jifty/DBI/Collection/Union.pm
-SHA1 07115934091da72e0025c9c754714fc0ceedbef5 lib/Jifty/DBI/Collection/Unique.pm
-SHA1 ef9a50bac5f2dfa90936c5d155d1be82b7f4dced lib/Jifty/DBI/Column.pm
+SHA1 b07fccc963d411c16138a417cfc524590abe9c93 lib/Jifty/DBI.pm
+SHA1 46d3dafdc13341ffe1230c654a66eeb329f96093 lib/Jifty/DBI/Class/Trigger.pm
+SHA1 fcbea0817e692158efa1090c85feaf6e6cbea7d3 lib/Jifty/DBI/Collection.pm
+SHA1 da7059734dc429040250589d704a8ad5d786c916 lib/Jifty/DBI/Collection/Union.pm
+SHA1 bcba77fd2bacf0475aea1de97f57365c8de92ca6 lib/Jifty/DBI/Collection/Unique.pm
+SHA1 ba2b05a10ca41fa8491421009350ab227a19cc76 lib/Jifty/DBI/Column.pm
SHA1 a2c16702f3467a220e9ba96ac5e086cc2e7779d1 lib/Jifty/DBI/Filter.pm
SHA1 87192bf64a224cbea78770f4209ecae9981f3f5c lib/Jifty/DBI/Filter/Date.pm
SHA1 e7d1ddfa3a55f69680d8637071b53d516ad0fc7d lib/Jifty/DBI/Filter/DateTime.pm
-SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709 lib/Jifty/DBI/Filter/JiftyRecord.pm
SHA1 79649ca3fb9f8aa9d2fdda00d6d7c7c99fe4092f lib/Jifty/DBI/Filter/SaltHash.pm
SHA1 45ff3c7d2c03136acf98b74c659e2fe8c734d929 lib/Jifty/DBI/Filter/Storable.pm
SHA1 13837e1f389b4e2e60e8b2395b327604ec7e25b6 lib/Jifty/DBI/Filter/Time.pm
-SHA1 78091020a1d4cbc25be8243d1389f0faecddd501 lib/Jifty/DBI/Filter/Truncate.pm
+SHA1 faf3c393d9980a33aa87991ad235a385cdd05a53 lib/Jifty/DBI/Filter/Truncate.pm
+SHA1 d05dc7bc82040704770386705fdbdfd2fc326a57 lib/Jifty/DBI/Filter/YAML.pm
SHA1 9a6fd17e677321904436fefec4d434e17a4685b1 lib/Jifty/DBI/Filter/base64.pm
SHA1 deb33fa7b35f3542aac3e2d7fb4b5d3070dc3917 lib/Jifty/DBI/Filter/utf8.pm
-SHA1 33aea3e61edb254858fd318d05fa24a0a91aeb3c lib/Jifty/DBI/Handle.pm
-SHA1 f5a11742afc4772af9b9dbe11db1c63528170d17 lib/Jifty/DBI/Handle/Informix.pm
+SHA1 5ec6fa1efcdfac7398b84939826084d950a85040 lib/Jifty/DBI/Handle.pm
+SHA1 9d07c7e4f629bd75d41a1ba88a7890fedaf8a9d3 lib/Jifty/DBI/Handle/Informix.pm
SHA1 b924dfc77946ec22c292a405d4a26b46b457f775 lib/Jifty/DBI/Handle/ODBC.pm
SHA1 65ea774794a6d7f5bd3f14cb790d6a915903ee80 lib/Jifty/DBI/Handle/Oracle.pm
-SHA1 b84b36231efc9aa08a82747f8951afc8dadf513f lib/Jifty/DBI/Handle/Pg.pm
+SHA1 ec835b0bc23f74991012bbd6bbad08535d38c326 lib/Jifty/DBI/Handle/Pg.pm
SHA1 28ce52fe0d1f765d37591710be696deff9a1705d lib/Jifty/DBI/Handle/SQLite.pm
-SHA1 8aaa3deb93cd5064699b74a19a4a9dd3c0bcb7a9 lib/Jifty/DBI/Handle/Sybase.pm
+SHA1 483de5eefde5ef2d194d18ad81a44b411122ad27 lib/Jifty/DBI/Handle/Sybase.pm
SHA1 e6041a34c3044ed8b9691a5629ecf146fed95257 lib/Jifty/DBI/Handle/mysql.pm
SHA1 f2cc4fcce79c9a88a023d4e6bd96c2089eef1ced lib/Jifty/DBI/Handle/mysqlPP.pm
SHA1 0e975f9ec5480ca09025c592c06d484058e637df lib/Jifty/DBI/HasFilters.pm
-SHA1 da3d76a58bdb72d26fff9717b4e29a3e058d4641 lib/Jifty/DBI/Record.pm
-SHA1 eb7085a11cc38f6a1e4b0256b43e590730666b29 lib/Jifty/DBI/Record/Cachable.pm
-SHA1 91bf502236779f5e3aa04f6c7cabdcffc413ab81 lib/Jifty/DBI/Record/Memcached.pm
-SHA1 6bdf9f32e1555c08d47e06782428b151b37b28ad lib/Jifty/DBI/Schema.pm
-SHA1 3a967c8385ad5e8ecb76b0c6374cfa2a092dffe3 lib/Jifty/DBI/SchemaGenerator.pm
+SHA1 52f177e8a33484f91c6ff505bbe0aaf80e3d3ee2 lib/Jifty/DBI/Record.pm
+SHA1 968bc51f282bfe9f9b069a0db6830b49fef99941 lib/Jifty/DBI/Record/Cachable.pm
+SHA1 f4ec61cd857cb1cead8c9c5551047dc78734b73a lib/Jifty/DBI/Record/Memcached.pm
+SHA1 85342548af141aa7121e261faaf294c8485df718 lib/Jifty/DBI/Record/Plugin.pm
+SHA1 7efba3db34611c4df677eb5acfed569cea4eedaf lib/Jifty/DBI/Schema.pm
+SHA1 c4f05cbe77cb45dcfa1229e4cfeaa1cab8f15e8d lib/Jifty/DBI/SchemaGenerator.pm
SHA1 32834b7c4cf5a8d131382fccc8db341be8768291 t/00.load.t
SHA1 9aa7fed2b2409faa4c71d2a45db210721f47403e t/01-version_checks.t
SHA1 13c9fe3eeec0d000a7c86ea2474e30186cbc37e2 t/01basics.t
-SHA1 5acefb1e751c4a21e38ceb9fa37063c07d2d37dc t/01records.t
+SHA1 63c991bec4864e02a239bf6577a8ffc9be1b4eee t/01records.t
SHA1 b1d9bb663d106e6874c0c454d64819e6b67d56d2 t/01searches.t
SHA1 933ebc7f0cfcaf03a2092a7c8271f98b2385f785 t/02-column_constraints.t
-SHA1 70fbf72948bdd7cabcfcf128d8f51365abb33e9c t/02records_cachable.t
-SHA1 fc0233b7806aead4e38d167d04ef076cf810ea9f t/02records_object.t
+SHA1 392422249cf3b3f0e26d94ab7a890efe8abc877e t/02records_cachable.t
+SHA1 a95a9329bb1b8dbcf4ba1cefea85c974a912e91f t/02records_object.t
SHA1 f1f330dd8b4144e3437aba1455053903306bd0bc t/03rebless.t
SHA1 472ff16f7c3dc34238d9abd625cbb6e0108956fd t/04memcached.t
SHA1 a2d00943d47d52d3ad92efe67a52a9b8e1522903 t/06filter.t
-SHA1 412294299e189fe2254472f69c83e8214d6146cc t/06filter_datetime.t
+SHA1 8d464426f2c5b0ab5ecc5a0a0331e5f77669c2dc t/06filter_datetime.t
+SHA1 1c0727c29fb58462710e4578a237d557b8453a07 t/06filter_storable.t
SHA1 f0f6ce9d48f419de6ac6154684f9065f32e30ddd t/06filter_truncate.t
SHA1 2e9777a47e3a920d063bfbf9d56375c67c5b89c5 t/06filter_utf8.t
-SHA1 824e48c66d2e18120b377934177745680785525b t/10schema.t
-SHA1 423461800861653032758627a82465426968da8e t/11schema_records.t
-SHA1 7356c3470a6b493e061df45bd75dd23bf574dd5a t/12prefetch.t
+SHA1 bb91f506a251d7b27d2fcd29c482a345318ef04f t/06filter_yaml.t
+SHA1 820a59b4e94a6a92275d4d0029827b36b8f0e69b t/10schema.t
+SHA1 09029344467af5bd30e6cd4dedbe0da8f0894e04 t/11schema_records.t
+SHA1 c3bbf4e58ae6653c55d1e302bcf5843f7d7239b7 t/12prefetch.t
SHA1 a93e0ee622b2291f797887f663f33c30fc7339f6 t/13collection.t
SHA1 f057b643275b0370ae18d47b3a1b394791c850d6 t/14handle-pg.t
+SHA1 4f41229caa246bf6ebb369010deb0c1eb8809666 t/15types.t
+SHA1 5958e59e29d29fbf3862b5d3471472cbd82d191e t/16inheritance.t
+SHA1 59c44900b1cb957d262f96363ceff21b46e0d598 t/pod-coverage.t
SHA1 e9c6a5881fc60173fbc8d479c1afd2ce3b43bef1 t/pod.t
-SHA1 2f14a9a3247219233d5406ecb5e1950c757bc33b t/testmodels.pl
+SHA1 17f75f50d9cb40ad8477ec8d77c75cca844a17b5 t/testmodels.pl
SHA1 9b6cf7d135201f3f5ac4e29eaf180c85ba2e2bbf t/utils.pl
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.3 (GNU/Linux)
+Version: GnuPG v1.4.3 (Darwin)
-iD8DBQFFugMLtLPdNzw1AaARAke3AKCaJeRcBcCuOf5DEFLK+q9JgVaa7gCdFeH5
-zofu7nWSY/r9+A4aXHcIhfQ=
-=3gHU
+iD8DBQFGIkNTEi9d9xCOQEYRApRiAJ43s+rFHBpQMYB2aj+PFKLwRTrD2QCgmN4y
+RMu4DmzGnpTJCUFgbks43Vc=
+=PbbA
-----END PGP SIGNATURE-----
Modified: Jifty-DBI/trunk/lib/Jifty/DBI.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI.pm Sun Apr 15 13:06:22 2007
@@ -2,7 +2,7 @@
use warnings;
use strict;
-$Jifty::DBI::VERSION = '0.39_9999';
+$Jifty::DBI::VERSION = '0.40';
=head1 NAME
From jifty-commit at lists.jifty.org Sun Apr 15 15:14:57 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 15:14:59 2007
Subject: [Jifty-commit] r3138 - Jifty-DBI/trunk/debian
Message-ID: <20070415191457.6EAC94D8005@diesel.bestpractical.com>
Author: yves
Date: Sun Apr 15 15:14:56 2007
New Revision: 3138
Modified:
Jifty-DBI/trunk/debian/changelog
Log:
0.40 debian package
Modified: Jifty-DBI/trunk/debian/changelog
==============================================================================
--- Jifty-DBI/trunk/debian/changelog (original)
+++ Jifty-DBI/trunk/debian/changelog Sun Apr 15 15:14:56 2007
@@ -1,3 +1,9 @@
+libjifty-dbi-perl (0.40-1) unstable; urgency=low
+
+ * 0.40
+
+ -- Agostini yves Sun, 15 Apr 2007 21:10:58 +0200
+
libjifty-dbi-perl (0.39-1) unstable; urgency=low
* 0.39
From jifty-commit at lists.jifty.org Sun Apr 15 17:05:14 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 15 17:05:17 2007
Subject: [Jifty-commit] r3139 - jifty/trunk/debian
Message-ID: <20070415210514.7466A4D80C2@diesel.bestpractical.com>
Author: yves
Date: Sun Apr 15 17:05:12 2007
New Revision: 3139
Modified:
jifty/trunk/debian/changelog
jifty/trunk/debian/control
Log:
changes for debian packages
Modified: jifty/trunk/debian/changelog
==============================================================================
--- jifty/trunk/debian/changelog (original)
+++ jifty/trunk/debian/changelog Sun Apr 15 17:05:12 2007
@@ -1,4 +1,8 @@
- -- AGOSTINI Yves Fri, 16 Mar 2007 18:22:23 +0100
+jifty (0.70415-1) unstable; urgency=low
+
+ * New cpan release
+
+ -- Agostini yves Sun, 15 Apr 2007 22:59:09 +0200
jifty (0.70317-1) unstable; urgency=low
Modified: jifty/trunk/debian/control
==============================================================================
--- jifty/trunk/debian/control (original)
+++ jifty/trunk/debian/control Sun Apr 15 17:05:12 2007
@@ -64,14 +64,14 @@
libhtml-lint-perl, libhtml-mason-perl (>> 1.31),
libwww-perl, libhttp-server-simple-perl (>> 0.26),
libhttp-server-simple-recorder-perl, libhash-merge-perl, libhook-lexwrap-perl,
- libipc-pubsub-perl (>> 0.23), libjifty-dbi-perl (>> 0.31),
+ libipc-pubsub-perl (>> 0.23), libjifty-dbi-perl (>> 0.40),
liblocale-maketext-lexicon-perl, liblog-log4perl-perl,
libmime-types-perl, libmodule-pluggable-perl (>> 3.1),
libmodule-corelist-perl, libmodule-refresh-perl,
libmodule-scandeps-perl, libobject-declare-perl (>> 0.22),
libparams-validate-perl, libscalar-defer-perl (>> 0.10),
libstring-koremutake-perl, libsql-reservedwords-perl,
- libtemplate-declare-perl (>> 0.06),
+ libtemplate-declare-perl (>> 0.07),
libtest-base-perl, libuniversal-require-perl, liburi-perl,
libxml-writer-perl (>> 0.601), libxml-simple-perl,
libxml-xpath-perl, libversion-perl, libyaml-syck-perl (>> 0.72),
From jifty-commit at lists.jifty.org Mon Apr 16 04:32:38 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 16 04:32:39 2007
Subject: [Jifty-commit] r3140 - Jifty-DBI/trunk
Message-ID: <20070416083238.1458A4D80CF@diesel.bestpractical.com>
Author: clkao
Date: Mon Apr 16 04:32:35 2007
New Revision: 3140
Modified:
Jifty-DBI/trunk/Makefile.PL
Log:
Add Hash::Merge to Makefile.PL.
Reported by: SAPER@cpan.org
Modified: Jifty-DBI/trunk/Makefile.PL
==============================================================================
--- Jifty-DBI/trunk/Makefile.PL (original)
+++ Jifty-DBI/trunk/Makefile.PL Mon Apr 16 04:32:35 2007
@@ -16,6 +16,7 @@
requires('DateTime::Format::Strptime');
requires('Encode' => 2.10);
requires('Exporter::Lite');
+requires('Hash::Merge');
requires('Lingua::EN::Inflect');
requires('Object::Declare' => 0.22);
requires('UNIVERSAL::require');
From jifty-commit at lists.jifty.org Mon Apr 16 08:36:14 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 16 08:36:18 2007
Subject: [Jifty-commit] r3141 - jifty/trunk
Message-ID: <20070416123614.948F34D80DB@diesel.bestpractical.com>
Author: clkao
Date: Mon Apr 16 08:36:13 2007
New Revision: 3141
Modified:
jifty/trunk/Makefile.PL
Log:
* no_index for examples/.
* remove implicit no_index.
Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL (original)
+++ jifty/trunk/Makefile.PL Mon Apr 16 08:36:13 2007
@@ -128,11 +128,8 @@
);
-no_index directory => 'share';
-no_index directory => 't';
+no_index( directory => qw< debian doc examples > );
no_index package => 'DB';
-no_index package => 'inc';
-no_index directory => 'doc';
version_from('lib/Jifty.pm');
#&auto_bundle_deps();
From jifty-commit at lists.jifty.org Mon Apr 16 08:41:50 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 16 08:41:54 2007
Subject: [Jifty-commit] r3142 - in jifty/trunk: . inc/Module
Message-ID: <20070416124150.748964D80B3@diesel.bestpractical.com>
Author: clkao
Date: Mon Apr 16 08:41:49 2007
New Revision: 3142
Modified:
jifty/trunk/META.yml
jifty/trunk/inc/Module/Install.pm
jifty/trunk/inc/Module/Install/AutoInstall.pm
jifty/trunk/inc/Module/Install/Base.pm
jifty/trunk/inc/Module/Install/Can.pm
jifty/trunk/inc/Module/Install/Fetch.pm
jifty/trunk/inc/Module/Install/Include.pm
jifty/trunk/inc/Module/Install/Makefile.pm
jifty/trunk/inc/Module/Install/Metadata.pm
jifty/trunk/inc/Module/Install/Scripts.pm
jifty/trunk/inc/Module/Install/Share.pm
jifty/trunk/inc/Module/Install/Win32.pm
jifty/trunk/inc/Module/Install/WriteAll.pm
Log:
Update MI and META.yml.
Modified: jifty/trunk/META.yml
==============================================================================
--- jifty/trunk/META.yml (original)
+++ jifty/trunk/META.yml Mon Apr 16 08:41:49 2007
@@ -1,19 +1,22 @@
+---
build_requires:
ExtUtils::MakeMaker: 6.11
distribution_type: module
-generated_by: Module::Install version 0.640
+generated_by: Module::Install version 0.650
license: Perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
name: Jifty
no_index:
directory:
- - share
- - t
+ - debian
- doc
+ - examples
- inc
- t
package:
- DB
- - inc
recommends:
Apache2::Const: 0
Class::Accessor::Named: 0
@@ -23,16 +26,13 @@
Module::Install::Admin: 0.50
Module::Refresh: 0.09
Net::Server::Fork: 0
+ Net::Server::PreFork: 0
PAR::Dist::FromCPAN: 0
Test::Base: 0.44
Test::HTML::Lint: 0
Test::HTTP::Server::Simple: 0.02
Test::MockModule: 0.05
Test::MockObject: 1.07
- Test::More: 0.62
- Test::Pod::Coverage: 0
- Test::WWW::Mechanize: 1.04
- WWW::Mechanize: 1.12
requires:
App::CLI: 0.03
CGI: 3.19
@@ -75,7 +75,7 @@
Hook::LexWrap: 0
IPC::PubSub: 0.23
JSON::Syck: 0.15
- Jifty::DBI: 0.31
+ Jifty::DBI: 0.40
LWP::UserAgent: 0
Locale::Maketext::Extract: 0.20
Locale::Maketext::Lexicon: 0.60
@@ -90,13 +90,17 @@
Params::Validate: 0
Pod::Simple: 0
SQL::ReservedWords: 0
- Scalar::Defer: 0.06
+ Scalar::Defer: 0.10
Shell::Command: 0
String::Koremutake: 0
- Template::Declare: 0.06
+ Template::Declare: 0.07
Test::Base: 0
+ Test::More: 0.62
+ Test::Pod::Coverage: 0
+ Test::WWW::Mechanize: 1.04
UNIVERSAL::require: 0
URI: 0
+ WWW::Mechanize: 1.12
XML::Simple: 0
XML::Writer: 0.601
XML::XPath: 0
@@ -105,4 +109,4 @@
perl: 5.8.3
version: 0
tests: t/*.t t/*/t/*.t
-version: 0.70117
+version: 0.70415
Modified: jifty/trunk/inc/Module/Install.pm
==============================================================================
--- jifty/trunk/inc/Module/Install.pm (original)
+++ jifty/trunk/inc/Module/Install.pm Mon Apr 16 08:41:49 2007
@@ -28,7 +28,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.64';
+ $VERSION = '0.65';
}
# Whether or not inc::Module::Install is actually loaded, the
Modified: jifty/trunk/inc/Module/Install/AutoInstall.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/AutoInstall.pm (original)
+++ jifty/trunk/inc/Module/Install/AutoInstall.pm Mon Apr 16 08:41:49 2007
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.65';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: jifty/trunk/inc/Module/Install/Base.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/Base.pm (original)
+++ jifty/trunk/inc/Module/Install/Base.pm Mon Apr 16 08:41:49 2007
@@ -1,7 +1,7 @@
#line 1
package Module::Install::Base;
-$VERSION = '0.64';
+$VERSION = '0.65';
# Suspend handler for "redefined" warnings
BEGIN {
Modified: jifty/trunk/inc/Module/Install/Can.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/Can.pm (original)
+++ jifty/trunk/inc/Module/Install/Can.pm Mon Apr 16 08:41:49 2007
@@ -11,7 +11,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.65';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: jifty/trunk/inc/Module/Install/Fetch.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/Fetch.pm (original)
+++ jifty/trunk/inc/Module/Install/Fetch.pm Mon Apr 16 08:41:49 2007
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.65';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: jifty/trunk/inc/Module/Install/Include.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/Include.pm (original)
+++ jifty/trunk/inc/Module/Install/Include.pm Mon Apr 16 08:41:49 2007
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.65';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: jifty/trunk/inc/Module/Install/Makefile.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/Makefile.pm (original)
+++ jifty/trunk/inc/Module/Install/Makefile.pm Mon Apr 16 08:41:49 2007
@@ -7,7 +7,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.65';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -136,9 +136,13 @@
. "but we need version >= $perl_version";
}
+ $args->{INSTALLDIRS} = $self->installdirs;
+
my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
- if ($self->admin->preop) {
- $args{dist} = $self->admin->preop;
+
+ my $user_preop = delete $args{dist}->{PREOP};
+ if (my $preop = $self->admin->preop($user_preop)) {
+ $args{dist} = $preop;
}
my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
@@ -205,4 +209,4 @@
__END__
-#line 334
+#line 338
Modified: jifty/trunk/inc/Module/Install/Metadata.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/Metadata.pm (original)
+++ jifty/trunk/inc/Module/Install/Metadata.pm Mon Apr 16 08:41:49 2007
@@ -6,14 +6,14 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.65';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
my @scalar_keys = qw{
name module_name abstract author version license
- distribution_type perl_version tests
+ distribution_type perl_version tests installdirs
};
my @tuple_keys = qw{
@@ -56,6 +56,11 @@
};
}
+sub install_as_core { $_[0]->installdirs('perl') }
+sub install_as_cpan { $_[0]->installdirs('site') }
+sub install_as_site { $_[0]->installdirs('site') }
+sub install_as_vendor { $_[0]->installdirs('vendor') }
+
sub sign {
my $self = shift;
return $self->{'values'}{'sign'} if defined wantarray and !@_;
@@ -279,9 +284,11 @@
if (
$self->_slurp($file) =~ m/
- =head \d \s+
- (?:licen[cs]e|licensing|copyright|legal)\b
- (.*?)
+ (
+ =head \d \s+
+ (?:licen[cs]e|licensing|copyright|legal)\b
+ .*?
+ )
(=head\\d.*|=cut.*|)
\z
/ixms
@@ -298,6 +305,7 @@
'LGPL' => 'lgpl',
'BSD' => 'bsd',
'Artistic' => 'artistic',
+ 'MIT' => 'MIT',
);
while ( my ( $pattern, $license ) = splice( @phrases, 0, 2 ) ) {
$pattern =~ s{\s+}{\\s+}g;
Modified: jifty/trunk/inc/Module/Install/Scripts.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/Scripts.pm (original)
+++ jifty/trunk/inc/Module/Install/Scripts.pm Mon Apr 16 08:41:49 2007
@@ -7,7 +7,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.65';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: jifty/trunk/inc/Module/Install/Share.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/Share.pm (original)
+++ jifty/trunk/inc/Module/Install/Share.pm Mon Apr 16 08:41:49 2007
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.65';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -22,7 +22,7 @@
$self->postamble(<<"END_MAKEFILE");
config ::
\t\$(NOECHO) \$(MOD_INSTALL) \\
-\t\t\"$dir\" \$(INST_AUTODIR)
+\t\t"$dir" \$(INST_AUTODIR)
END_MAKEFILE
Modified: jifty/trunk/inc/Module/Install/Win32.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/Win32.pm (original)
+++ jifty/trunk/inc/Module/Install/Win32.pm Mon Apr 16 08:41:49 2007
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.65';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: jifty/trunk/inc/Module/Install/WriteAll.pm
==============================================================================
--- jifty/trunk/inc/Module/Install/WriteAll.pm (original)
+++ jifty/trunk/inc/Module/Install/WriteAll.pm Mon Apr 16 08:41:49 2007
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.64';
+ $VERSION = '0.65';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
From jifty-commit at lists.jifty.org Mon Apr 16 08:46:04 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 16 08:46:05 2007
Subject: [Jifty-commit] r3143 - jifty/trunk
Message-ID: <20070416124604.7793E4D80B3@diesel.bestpractical.com>
Author: clkao
Date: Mon Apr 16 08:46:04 2007
New Revision: 3143
Modified:
jifty/trunk/Makefile.PL
Log:
Missed share/ in no_index.
Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL (original)
+++ jifty/trunk/Makefile.PL Mon Apr 16 08:46:04 2007
@@ -128,7 +128,7 @@
);
-no_index( directory => qw< debian doc examples > );
+no_index( directory => qw< debian doc examples share > );
no_index package => 'DB';
version_from('lib/Jifty.pm');
From jifty-commit at lists.jifty.org Mon Apr 16 13:59:58 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 16 15:18:47 2007
Subject: [Jifty-commit] r3144 - in jifty/trunk/plugins/ExtJS: . doc lib
lib/Jifty lib/Jifty/Plugin lib/Jifty/Plugin/ExtJS
lib/Jifty/Plugin/ExtJS/Action lib/Jifty/Plugin/ExtJS/Model
share share/po share/web share/web/static
share/web/static/css share/web/static/css/extjs
share/web/static/images share/web/static/images/extjs
share/web/static/images/extjs/aero
share/web/static/images/extjs/aero/basic-dialog
share/web/static/images/extjs/aero/grid
share/web/static/images/extjs/aero/layout
share/web/static/images/extjs/aero/qtip
share/web/static/images/extjs/aero/sizer
share/web/static/images/extjs/aero/tabs
share/web/static/images/extjs/aero/toolbar
share/web/static/images/extjs/default
share/web/static/images/extjs/default/basic-dialog
share/web/static/images/extjs/default/box
share/web/static/images/extjs/default/dd
share/web/static/images/extjs/default/form
share/web/static/images/extjs/default/grid
share/web/static/images/extjs/default/layout
share/web/static/images/extjs/default/menu
share/web/static/images/extjs/default/qtip
share/web/static/images/extjs/default/shared
share/web/static/images/extjs/default/sizer
share/web/static/images/extjs/default/tabs
share/web/static/images/extjs/default/toolbar
share/web/static/images/extjs/default/tree
share/web/static/images/extjs/gray
share/web/static/images/extjs/gray/grid
share/web/static/images/extjs/gray/layout
share/web/static/images/extjs/gray/menu
share/web/static/images/extjs/gray/qtip
share/web/static/images/extjs/gray/sizer
share/web/static/images/extjs/gray/tabs
share/web/static/images/extjs/gray/toolbar
share/web/static/images/extjs/vista
share/web/static/images/extjs/vista/basic-dialog
share/web/static/images/extjs/vista/grid
share/web/static/images/extjs/vista/layout
share/web/static/images/extjs/vista/qtip
share/web/static/images/extjs/vista/sizer
share/web/static/images/extjs/vista/tabs
share/web/static/images/extjs/vista/toolbar
share/web/static/js share/web/static/js/extjs
share/web/static/js/extjs/adapter
share/web/static/js/extjs/adapter/jquery
share/web/static/js/extjs/adapter/prototype
share/web/static/js/extjs/adapter/yui share/web/templates t
Message-ID: <20070416175958.6C3F64D80E0@diesel.bestpractical.com>
Author: hlb
Date: Mon Apr 16 13:59:52 2007
New Revision: 3144
Added:
jifty/trunk/plugins/ExtJS/
jifty/trunk/plugins/ExtJS/Makefile.PL
jifty/trunk/plugins/ExtJS/doc/
jifty/trunk/plugins/ExtJS/lib/
jifty/trunk/plugins/ExtJS/lib/Jifty/
jifty/trunk/plugins/ExtJS/lib/Jifty/Plugin/
jifty/trunk/plugins/ExtJS/lib/Jifty/Plugin/ExtJS/
jifty/trunk/plugins/ExtJS/lib/Jifty/Plugin/ExtJS.pm
jifty/trunk/plugins/ExtJS/lib/Jifty/Plugin/ExtJS/Action/
jifty/trunk/plugins/ExtJS/lib/Jifty/Plugin/ExtJS/Dispatcher.pm
jifty/trunk/plugins/ExtJS/lib/Jifty/Plugin/ExtJS/Model/
jifty/trunk/plugins/ExtJS/share/
jifty/trunk/plugins/ExtJS/share/po/
jifty/trunk/plugins/ExtJS/share/web/
jifty/trunk/plugins/ExtJS/share/web/static/
jifty/trunk/plugins/ExtJS/share/web/static/css/
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/README.txt
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/basic-dialog.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/box.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/button.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/combo.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/core.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/date-picker.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/dd.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/debug.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ext-all.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/form.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/grid.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/layout.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/menu.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/qtips.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/reset-min.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/resizable.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/tabs.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/toolbar.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/tree.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ytheme-aero.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ytheme-gray.css
jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ytheme-vista.css
jifty/trunk/plugins/ExtJS/share/web/static/images/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/aero-close-over.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/aero-close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/bg-center.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/bg-left.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/bg-right.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/collapse-over.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/e-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/expand-over.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/hd-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/s-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/se-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/w-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/gradient-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/grid-blue-split.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/grid-hrow.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/grid-split.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/grid-vista-hd.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/pspbrwse.jbf (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/sort-col-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/sort_asc.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/sort_desc.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/gradient-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/ns-collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/ns-expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/panel-close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/panel-title-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/panel-title-light-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/tab-close-on.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/tab-close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/qtip/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/qtip/bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/s.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/e-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/e-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/ne-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/ne-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/nw-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/nw-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/s-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/s-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/se-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/se-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/sw-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/sw-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-btm-inactive-left-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-btm-inactive-right-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-btm-left-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-btm-right-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-strip-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-strip-bg.png (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-strip-btm-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/toolbar/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/toolbar/bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/toolbar/tb-btn-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/btn-arrow.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/btn-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/e-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/hd-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/progress.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/progress2.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/s-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/se-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/corners-blue.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/corners.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/l-blue.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/l.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/r-blue.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/r.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/tb-blue.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/tb.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/dd/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/dd/drop-add.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/dd/drop-no.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/dd/drop-yes.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/date-trigger.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/error-tip-corners.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/exclamation.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/text-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/trigger.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/gradient-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/Thumbs.db (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/arrow-left-white.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/arrow-right-white.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/col-move-bottom.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/col-move-top.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/dirty.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/done.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/drop-no.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/drop-yes.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/footer-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-blue-hd.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-blue-split.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-hrow.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-loading.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-split.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-vista-hd.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-asc.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-desc.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-lock.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-lock.png (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-unlock.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-unlock.png (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/invalid_line.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/loading.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/mso-hd.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/nowait.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-first-disabled.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-first.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-last-disabled.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-last.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-next-disabled.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-next.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-prev-disabled.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-prev.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/pick-button.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/refresh.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/sort_asc.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/sort_desc.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/wait.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/gradient-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/ns-collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/ns-expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/panel-close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/panel-title-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/panel-title-light-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/stick.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/stuck.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/tab-close-on.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/tab-close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/checked.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/group-checked.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/menu-parent.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/menu.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/unchecked.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/qtip/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/qtip/bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/qtip/close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/qtip/tip-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/s.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shadow-lr.png (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shadow.png (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shared/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shared/calendar.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shared/left-btn.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shared/right-btn.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shared/warning.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/e-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/e-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/ne-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/ne-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/nw-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/nw-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/s-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/s-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/se-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/se-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/square.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/sw-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/sw-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/tab-btm-inactive-left-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/tab-btm-inactive-right-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/tab-btm-left-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/tab-btm-right-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/tab-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/btn-arrow-light.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/btn-arrow.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/btn-over-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/gray-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/tb-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/tb-btn-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-add.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-between.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-no.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-over.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-under.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-yes.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-end-minus-nl.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-end-minus.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-end-plus-nl.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-end-plus.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-end.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-line.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-minus-nl.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-minus.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-plus-nl.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-plus.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/folder-open.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/folder.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/leaf.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/loading.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/s.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/dlg-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/e-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/hd-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/s-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/se-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/gradient-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/grid/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/grid/grid-hrow.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/gradient-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/ns-collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/ns-expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/panel-close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/panel-title-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/panel-title-light-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/stick.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/tab-close-on.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/tab-close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/checked.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/group-checked.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/menu-parent.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/menu.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/unchecked.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/qtip/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/qtip/bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/qtip/tip-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/s.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/e-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/e-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/ne-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/ne-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/nw-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/nw-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/s-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/s-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/se-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/se-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/sw-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/sw-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/tab-btm-inactive-left-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/tab-btm-inactive-right-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/tab-btm-left-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/tab-btm-right-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/tab-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/toolbar/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/toolbar/gray-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/toolbar/tb-btn-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/bg-center.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/bg-left.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/bg-right.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/dlg-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/e-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/hd-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/s-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/se-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/w-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/gradient-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/grid/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/grid/grid-split.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/grid/grid-vista-hd.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/gradient-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/ns-collapse.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/ns-expand.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/panel-close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/panel-title-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/panel-title-light-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/stick.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/tab-close-on.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/tab-close.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/qtip/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/qtip/bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/qtip/tip-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/s.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/e-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/e-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/ne-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/ne-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/nw-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/nw-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/s-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/s-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/se-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/se-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/sw-handle-dark.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/sw-handle.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/tab-btm-inactive-left-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/tab-btm-inactive-right-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/tab-btm-left-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/tab-btm-right-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/tab-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/toolbar/
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/toolbar/gray-bg.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/toolbar/tb-btn-sprite.gif (contents, props changed)
jifty/trunk/plugins/ExtJS/share/web/static/js/
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/jquery/
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/jquery/ext-jquery-adapter.js
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/prototype/
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/prototype/ext-prototype-adapter.js
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/yui/
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/yui/ext-yui-adapter.js
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/yui/yui-utilities.js
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/ext-all.js
jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/ext-config.js
jifty/trunk/plugins/ExtJS/share/web/templates/
jifty/trunk/plugins/ExtJS/t/
Log:
* Jifty::Plugins::ExtJS - it contains necessary files to run Ext JavaScript
library. It comes with Ext v1.0.
Added: jifty/trunk/plugins/ExtJS/Makefile.PL
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/Makefile.PL Mon Apr 16 13:59:52 2007
@@ -0,0 +1,9 @@
+use inc::Module::Install;
+name('Jifty-Plugin-ExtJS');
+version('0.01');
+license('Perl');
+requires('Jifty' => '0.60722');
+
+install_share;
+
+WriteAll;
Added: jifty/trunk/plugins/ExtJS/lib/Jifty/Plugin/ExtJS.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/lib/Jifty/Plugin/ExtJS.pm Mon Apr 16 13:59:52 2007
@@ -0,0 +1,59 @@
+use strict;
+use warnings;
+
+=head1 NAME
+
+Jifty::Plugin::ExtJS
+
+=cut
+
+package Jifty::Plugin::ExtJS;
+use base qw/Jifty::Plugin/;
+
+=head1 SYNOPSIS
+
+In etc/config.yml
+
+ Plugins:
+ - ExtJS: {}
+
+If you want to include javascript files by hand:
+
+ Plugins:
+ - ExtJS:
+ IncludeDefault: 0
+
+You have to include Ext's CSS file by hand. Just add this line in main.css:
+
+ @import "extjs/ext-all.css";
+
+
+=head1 DESCRIPTION
+
+ExtJS plugin contains necessary files to run Ext JavaScript library.
+Ext supports YUI, prototype and jQuery. This plugin uses YUI by default.
+
+ Ext: http://extjs.com/
+
+
+=cut
+
+# Your plugin goes here. If takes any configuration or arguments, you
+# probably want to override L.
+
+sub init {
+ my $self = shift;
+ my %args = (IncludeDefault => 1, @_);
+
+ return unless $args{IncludeDefault};
+
+ Jifty->web->javascript_libs([
+ "extjs/adapter/yui/yui-utilities.js",
+ "extjs/adapter/yui/ext-yui-adapter.js",
+ "extjs/ext-all.js",
+ "extjs/ext-config.js",
+ @{ Jifty->web->javascript_libs }
+ ]);
+}
+
+1;
Added: jifty/trunk/plugins/ExtJS/lib/Jifty/Plugin/ExtJS/Dispatcher.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/lib/Jifty/Plugin/ExtJS/Dispatcher.pm Mon Apr 16 13:59:52 2007
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::ExtJS::Dispatcher;
+use Jifty::Dispatcher -base;
+
+# Put any plugin-specific dispatcher rules here.
+
+1;
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/README.txt
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/README.txt Mon Apr 16 13:59:52 2007
@@ -0,0 +1,3 @@
+2006-11-21 jvs:
+ext-all.css contains all of the other css files combined and stripped of comments (except themes).
+
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/basic-dialog.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/basic-dialog.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,263 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-dlg-proxy {
+ background-image: url(/static/images/extjs/default/gradient-bg.gif);
+ background-color:#c3daf9;
+ border:1px solid #6593cf;
+ z-index:10001;
+ overflow:hidden;
+ position:absolute;
+ left:0;top:0;
+}
+.x-dlg-shadow{
+ background:#aaaaaa;
+ position:absolute;
+ left:0;top:0;
+}
+.x-dlg-focus{
+ -moz-outline:0 none;
+ outline:0 none;
+ width:0;
+ height:0;
+ overflow:hidden;
+ position:absolute;
+ top:0;
+ left:0;
+}
+.x-dlg-mask{
+ z-index:10000;
+ display:none;
+ position:absolute;
+ top:0;
+ left:0;
+ -moz-opacity: 0.5;
+ opacity:.50;
+ filter: alpha(opacity=50);
+ background-color:#CCC;
+}
+body.x-body-masked select {
+ visibility:hidden;
+}
+body.x-body-masked .x-dlg select {
+ visibility:visible;
+}
+.x-dlg{
+ z-index:10001;
+ overflow:hidden;
+ position:absolute;
+ left:300;top:0;
+}
+.x-dlg .x-dlg-hd {
+ background: url(/static/images/extjs/default/basic-dialog/hd-sprite.gif) repeat-x 0 -82px;
+ background-color:navy;
+ color:#FFF;
+ font:bold 12px "sans serif", tahoma, verdana, helvetica;
+ overflow:hidden;
+ padding:5px;
+ white-space: nowrap;
+}
+.x-dlg .x-dlg-hd-left {
+ background: url(/static/images/extjs/default/basic-dialog/hd-sprite.gif) no-repeat 0 -41px;
+ padding-left:3px;
+ margin:0;
+}
+.x-dlg .x-dlg-hd-right {
+ background: url(/static/images/extjs/default/basic-dialog/hd-sprite.gif) no-repeat right 0;
+ padding-right:3px;
+}
+.x-dlg .x-dlg-dlg-body{
+ background:url(/static/images/extjs/default/layout/gradient-bg.gif);
+ border:1px solid #6593cf;
+ border-top:0 none;
+ padding:10px;
+ position:absolute;
+ top:24px;left:0;
+ z-index:1;
+ overflow:hidden;
+}
+.x-dlg-collapsed .x-resizable-handle{
+ display:none;
+}
+.x-dlg .x-dlg-bd{
+ overflow:hidden;
+}
+.x-dlg .x-dlg-ft{
+ overflow:hidden;
+ padding:5px;
+ padding-bottom:0;
+}
+.x-dlg .x-tabs-body{
+ background:white;
+ overflow:auto;
+}
+.x-dlg .x-tabs-top .x-tabs-body{
+ border:1px solid #6593cf;
+ border-top:0 none;
+}
+.x-dlg .x-tabs-bottom .x-tabs-body{
+ border:1px solid #6593cf;
+ border-bottom:0 none;
+}
+.x-dlg .x-layout-container .x-tabs-body{
+ border:0 none;
+}
+.x-dlg .inner-tab{
+ margin:5px;
+}
+.x-dlg .x-dlg-ft .x-btn{
+ margin-right:5px;
+ float:right;
+ clear:none;
+}
+.x-dlg .x-dlg-ft .x-dlg-btns td {
+ border:0;
+ padding:0;
+}
+.x-dlg .x-dlg-ft .x-dlg-btns-right table{
+ float:right;
+ clear:none;
+}
+.x-dlg .x-dlg-ft .x-dlg-btns-left table{
+ float:left;
+ clear:none;
+}
+.x-dlg .x-dlg-ft .x-dlg-btns-center{
+ text-align:center; /*ie*/
+}
+.x-dlg .x-dlg-ft .x-dlg-btns-center table{
+ margin:0 auto; /*everyone else*/
+}
+.x-dlg-draggable .x-dlg-hd{
+ cursor:move;
+}
+.x-dlg-closable .x-dlg-hd{
+ padding-right:22px;
+}
+.x-dlg-toolbox {
+ position:absolute;
+ top:4px;
+ right:4px;
+ z-index:6;
+ width:40px;
+ cursor:default;
+ height:15px;
+ background:transparent;
+}
+.x-dlg .x-dlg-close, .x-dlg .x-dlg-collapse {
+ float:right;
+ height:15px;
+ width:15px;
+ margin:0;
+ margin-left:2px;
+ padding:0;
+ line-height:1px;
+ font-size:1px;
+ background-repeat:no-repeat;
+ cursor:pointer;
+ visibility:inherit;
+}
+.x-dlg .x-dlg-close {
+ background-image:url(/static/images/extjs/default/basic-dialog/close.gif);
+}
+.x-dlg .x-dlg-collapse {
+ background-image:url(/static/images/extjs/default/basic-dialog/collapse.gif);
+}
+.x-dlg-collapsed .x-dlg-collapse {
+ background-image:url(/static/images/extjs/default/basic-dialog/expand.gif);
+}
+.x-dlg .x-dlg-close-over, .x-dlg .x-dlg-collapse-over {
+
+}
+.x-dlg div.x-resizable-handle-east{
+ background-image:url(/static/images/extjs/default/basic-dialog/e-handle.gif);
+ border:0;
+ background-position:right;
+ margin-right:0;
+}
+.x-dlg div.x-resizable-handle-south{
+ background-image:url(/static/images/extjs/default/sizer/s-handle-dark.gif);
+ border:0;
+ height:6px;
+}
+.x-dlg div.x-resizable-handle-west{
+ background-image:url(/static/images/extjs/default/basic-dialog/e-handle.gif);
+ border:0;
+ background-position:1px;
+}
+.x-dlg div.x-resizable-handle-north{
+ background-image:url(/static/images/extjs/default/s.gif);
+ border:0;
+}
+.x-dlg div.x-resizable-handle-northeast, .ytheme-gray .x-dlg div.x-resizable-handle-northeast{
+ background-image:url(/static/images/extjs/default/s.gif);
+ border:0;
+}
+.x-dlg div.x-resizable-handle-northwest, .ytheme-gray .x-dlg div.x-resizable-handle-northwest{
+ background-image:url(/static/images/extjs/default/s.gif);
+ border:0;
+}
+.x-dlg div.x-resizable-handle-southeast{
+ background-image:url(/static/images/extjs/default/basic-dialog/se-handle.gif);
+ background-position: bottom right;
+ width:8px;
+ height:8px;
+ border:0;
+}
+.x-dlg div.x-resizable-handle-southwest{
+ background-image:url(/static/images/extjs/default/sizer/sw-handle-dark.gif);
+ background-position: top right;
+ margin-left:1px;
+ margin-bottom:1px;
+ border:0;
+}
+
+#x-msg-box .x-dlg-ft .x-btn{
+ float:none;
+ clear:none;
+ margin:0 3px;
+}
+
+#x-msg-box .x-dlg-bd {
+ padding:5px;
+ overflow:hidden !important;
+ font:normal 13px verdana,tahoma,sans-serif;
+}
+#x-msg-box .ext-mb-input {
+ margin-top:4px;
+ width:95%;
+}
+#x-msg-box .ext-mb-textarea {
+ margin-top:4px;
+ font:normal 13px verdana,tahoma,sans-serif;
+}
+#x-msg-box .ext-mb-progress-wrap {
+ margin-top:4px;
+ border:1px solid #6593cf;
+}
+#x-msg-box .ext-mb-progress {
+ height:18px;
+ background: #e0e8f3 url(/static/images/extjs/default/qtip/bg.gif) repeat-x;
+}
+#x-msg-box .ext-mb-progress-bar {
+ height:18px;
+ overflow:hidden;
+ width:0;
+ background:#8BB8F3;
+ border-top:1px solid #B2D0F7;
+ border-bottom:1px solid #65A1EF;
+ border-right:1px solid #65A1EF;
+}
+
+#x-msg-box .x-msg-box-wait {
+ background: transparent url(/static/images/extjs/default/grid/loading.gif) no-repeat left;
+ display:block;
+ width:300px;
+ padding-left:18px;
+ line-height:18px;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/box.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/box.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,111 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+/*
+ Creates rounded, raised boxes like on the Ext website - the markup isn't pretty:
+
+
+
+
YOUR TITLE HERE (optional)
+
YOUR CONTENT HERE
+
+
+
+ */
+
+.x-box-tl {
+ background: transparent url(/static/images/extjs/default/box/corners.gif) no-repeat 0 0;
+ zoom:1;
+}
+
+.x-box-tc {
+ height: 8px;
+ background: transparent url(/static/images/extjs/default/box/tb.gif) repeat-x 0 0;
+ overflow: hidden;
+}
+
+.x-box-tr {
+ background: transparent url(/static/images/extjs/default/box/corners.gif) no-repeat right -8px;
+}
+
+.x-box-ml {
+ background: transparent url(/static/images/extjs/default/box/l.gif) repeat-y 0;
+ padding-left: 4px;
+ overflow: hidden;
+ zoom:1;
+}
+
+.x-box-mc {
+ background: #eee url(/static/images/extjs/default/box/tb.gif) repeat-x 0 -16px;
+ padding: 4px 10px;
+ font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;
+ color: #393939;
+ font-size: 12px;
+}
+
+.x-box-mc h3 {
+ font-size: 14px;
+ font-weight: bold;
+ margin: 0 0 4 0;
+ zoom:1;
+}
+
+.x-box-mr {
+ background: transparent url(/static/images/extjs/default/box/r.gif) repeat-y right;
+ padding-right: 4px;
+ overflow: hidden;
+}
+
+.x-box-bl {
+ background: transparent url(/static/images/extjs/default/box/corners.gif) no-repeat 0 -16px;
+ zoom:1;
+}
+
+.x-box-bc {
+ background: transparent url(/static/images/extjs/default/box/tb.gif) repeat-x 0 -8px;
+ height: 8px;
+ overflow: hidden;
+}
+
+.x-box-br {
+ background: transparent url(/static/images/extjs/default/box/corners.gif) no-repeat right -24px;
+}
+
+.x-box-tl, .x-box-bl {
+ padding-left: 8px;
+ overflow: hidden;
+}
+
+.x-box-tr, .x-box-br {
+ padding-right: 8px;
+ overflow: hidden;
+}
+
+.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr {
+ background-image: url(/static/images/extjs/default/box/corners-blue.gif);
+}
+
+.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc {
+ background-image: url(/static/images/extjs/default/box/tb-blue.gif);
+}
+
+.x-box-blue .x-box-mc {
+ background-color: #c3daf9;
+}
+
+.x-box-blue .x-box-mc h3 {
+ color: #17385b;
+}
+
+.x-box-blue .x-box-ml {
+ background-image: url(/static/images/extjs/default/box/l-blue.gif);
+}
+
+.x-box-blue .x-box-mr {
+ background-image: url(/static/images/extjs/default/box/r-blue.gif);
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/button.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/button.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,154 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-btn{
+ font:normal 11px tahoma, verdana, helvetica;
+ cursor:pointer;
+ white-space: nowrap;
+}
+.x-btn button{
+ border:0 none;
+ background:transparent;
+ font:normal 11px tahoma,verdana,helvetica;
+ padding-left:3px;
+ padding-right:3px;
+ cursor:pointer;
+ margin:0;
+ overflow:visible;
+ width:auto;
+ -moz-outline:0 none;
+ outline:0 none;
+}
+* html .ext-ie .x-btn button {
+ width:1px;
+}
+.ext-gecko .x-btn button {
+ padding-left:0;
+ padding-right:0;
+}
+/*
+ Predefined css class for buttons with only icon. Add this class (x-btn-icon) and a class with a background-image
+ to your button for a button with just an icon.
+ e.g.
+ .my-class .x-btn-text { background-image: url(foo.gif); }
+ */
+
+.x-btn-icon .x-btn-center .x-btn-text{
+ background-position: center;
+ background-repeat: no-repeat;
+ height: 16px;
+ width: 16px;
+ cursor:pointer;
+ white-space: nowrap;
+ padding:0;
+}
+.x-btn-icon .x-btn-center{
+ padding:1px;
+}
+.x-btn em {
+ font-style:normal;
+ font-weight:normal;
+}
+/*
+ Button class for icon and text. Add this class (x-btn-text-icon) and a class with a background-image
+ to your button for both text and icon.
+*/
+
+.x-btn-text-icon .x-btn-center .x-btn-text{
+ background-position: 0 2px;
+ background-repeat: no-repeat;
+ padding-left:18px;
+ padding-top:3px;
+ padding-bottom:3px;
+ padding-right:0;
+}
+
+.x-btn-left, .x-btn-right{
+ font-size:1px;
+ line-height:1px;
+}
+.x-btn-left{
+ width:3px;
+ height:21px;
+ background:url(/static/images/extjs/default/basic-dialog/btn-sprite.gif) no-repeat 0 0;
+}
+.x-btn-right{
+ width:3px;
+ height:21px;
+ background:url(/static/images/extjs/default/basic-dialog/btn-sprite.gif) no-repeat 0 -21px;
+}
+.x-btn-left i, .x-btn-right i{
+ display:block;
+ width:3px;
+ overflow:hidden;
+ font-size:1px;
+ line-height:1px;
+}
+.x-btn-center{
+ background:url(/static/images/extjs/default/basic-dialog/btn-sprite.gif) repeat-x 0 -42px;
+ vertical-align: middle;
+ text-align:center;
+ padding:0 5px;
+ cursor:pointer;
+ white-space:nowrap;
+}
+.x-btn-focus .x-btn-left{
+ background-position:0 -126px;
+}
+.x-btn-focus .x-btn-right{
+ background-position:0 -147px;
+}
+.x-btn-focus .x-btn-center{
+ background-position:0 -168px;
+}
+.x-btn-over .x-btn-left{
+ background-position:0 -63px;
+}
+.x-btn-over .x-btn-right{
+ background-position:0 -84px;
+}
+.x-btn-over .x-btn-center{
+ background-position:0 -105px;
+}
+.x-btn-click .x-btn-center, .x-btn-menu-active .x-btn-center{
+ background-position:0 -126px;
+}
+.x-btn-disabled *{
+ color:gray !important;
+ cursor:default !important;
+}
+.x-btn-menu-text-wrap .x-btn-center {
+ padding:0 3px;
+}
+.ext-gecko .x-btn-menu-text-wrap .x-btn-center {
+ padding:0 1px;
+}
+.x-btn-menu-arrow-wrap .x-btn-center {
+ padding:0;
+}
+.x-btn-menu-arrow-wrap .x-btn-center button {
+ width:12px !important;
+ height:21px;
+ padding:0 !important;
+ display:block;
+ background:transparent url(/static/images/extjs/default/basic-dialog/btn-arrow.gif) no-repeat left 3px;
+}
+.x-btn-with-menu .x-btn-center {
+ padding-right:2px !important;
+}
+.x-btn-with-menu .x-btn-center em {
+ display:block;
+ background:transparent url(/static/images/extjs/default/toolbar/btn-arrow.gif) no-repeat right 0;
+ padding-right:10px;
+}
+
+.x-btn-text-icon .x-btn-with-menu .x-btn-center em {
+ display:block;
+ background:transparent url(/static/images/extjs/default/toolbar/btn-arrow.gif) no-repeat right 3px;
+ padding-right:10px;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/combo.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/combo.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,46 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-combo-list {
+ border:1px solid #98c0f4;
+ background:#ddecfe;
+ zoom:1;
+ overflow:hidden;
+}
+.x-combo-list-inner {
+ overflow:auto;
+ background:white;
+ position:relative; /* for calculating scroll offsets */
+}
+.x-combo-list-hd {
+ font:bold 11px tahoma, arial, helvetica, sans-serif;
+ color:#15428b;
+ background-image: url(/static/images/extjs/default/layout/panel-title-light-bg.gif);
+ border-bottom:1px solid #98c0f4;
+ padding:3px;
+}
+.x-resizable-pinned .x-combo-list-inner {
+ border-bottom:1px solid #98c0f4;
+}
+.x-combo-list-item {
+ font:normal 12px tahoma, arial, helvetica, sans-serif;
+ padding:2px;
+ border:1px solid #fff;
+ zoom:1;
+ white-space: nowrap;
+ overflow:hidden;
+ text-overflow: ellipsis;
+}
+.x-combo-list .x-combo-selected{
+ background-color: #c3daf9 !important;
+ cursor:pointer;
+ border:1px solid #336699;
+}
+.x-combo-noedit{
+ cursor:pointer;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/core.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/core.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,271 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.ext-el-mask {
+ z-index: 20000;
+ position: absolute;
+ top: 0;
+ left: 0;
+ -moz-opacity: 0.5;
+ opacity: .50;
+ filter: alpha(opacity=50);
+ background-color: #CCC;
+ width: 100%;
+ height: 100%;
+ zoom: 1;
+}
+.ext-el-mask-msg {
+ z-index: 20001;
+ position: absolute;
+ top: 0;
+ left: 0;
+ border:1px solid #6593cf;
+ background: #c3daf9 url(/static/images/extjs/default/box/tb-blue.gif) repeat-x 0 -16px;
+ padding:2px;
+}
+.ext-el-mask-msg div {
+ padding:5px 10px 5px 10px;
+ background: #eee;
+ border:1px solid #a3bad9;
+ color:#333;
+ font:normal 12px tahoma, arial, helvetica, sans-serif;
+ cursor:wait;
+}
+
+
+.x-mask-loading div {
+ padding:5px 10px 5px 25px;
+ background: #eee url( '/static/images/extjs/default/grid/loading.gif' ) no-repeat 5px 5px;
+ line-height: 16px;
+}
+
+/* class for hiding elements without using display:none */
+.x-hidden {
+ position:absolute;
+ left:-2000px;
+ top:-2000px;
+ visibility:hidden;
+}
+
+.x-masked {
+ overflow: hidden !important;
+}
+
+.x-masked select, .x-masked object, .x-masked embed {
+ visibility: hidden;
+}
+
+.x-layer {
+ visibility: hidden;
+}
+
+.x-unselectable, .x-unselectable * {
+ -moz-user-select: none;
+ -khtml-user-select: none;
+}
+
+.x-repaint {
+ zoom: 1;
+ background-color: transparent;
+ -moz-outline: none;
+}
+
+.x-item-disabled {
+ color: gray;
+ cursor: default;
+ opacity: .6;
+ -moz-opacity: .6;
+ filter: alpha(opacity=60);
+}
+
+.x-item-disabled * {
+ color: gray;
+ cursor: default !important;
+}
+
+.x-splitbar-proxy {
+ position: absolute;
+ visibility: hidden;
+ z-index: 20001;
+ background: #aaa;
+ zoom: 1;
+ line-height: 1px;
+ font-size: 1px;
+ overflow: hidden;
+}
+
+.x-splitbar-h, .x-splitbar-proxy-h {
+ cursor: e-resize;
+ cursor: col-resize;
+}
+
+.x-splitbar-v, .x-splitbar-proxy-v {
+ cursor: s-resize;
+ cursor: row-resize;
+}
+
+.x-color-palette {
+ width: 150px;
+ height: 92px;
+}
+
+.x-color-palette a {
+ border: 1px solid #fff;
+ float: left;
+ padding: 2px;
+ text-decoration: none;
+ -moz-outline: 0 none;
+ outline: 0 none;
+}
+
+.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel {
+ border: 1px solid #8BB8F3;
+ background: #deecfd;
+}
+
+.x-color-palette em {
+ display: block;
+ border: 1px solid #ACA899;
+}
+
+.x-color-palette em span {
+ cursor: pointer;
+ display: block;
+ height: 10px;
+ line-height: 10px;
+ width: 10px;
+}
+
+.x-shadow {
+ display: none;
+ position: absolute;
+ overflow: hidden;
+}
+
+.x-shadow * {
+ overflow: hidden;
+}
+
+.x-shadow * {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ clear: none;
+ zoom: 1;
+}
+
+/* top bottom */
+.x-shadow .xstc, .x-shadow .xsbc {
+ height: 6px;
+ float: left;
+}
+
+/* corners */
+.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr {
+ width: 6px;
+ height: 6px;
+ float: left;
+}
+
+/* sides */
+.x-shadow .xsc {
+ width: 100%;
+}
+
+.x-shadow .xsml, .x-shadow .xsmr {
+ width: 6px;
+ float: left;
+ height: 100%;
+}
+
+.x-shadow .xsmc {
+ float: left;
+ height: 100%;
+ background: #333333;
+ opacity: .35;
+ -moz-opacity: .35;
+ filter: alpha(opacity=25);
+}
+
+.x-shadow .xst, .x-shadow .xsb {
+ height: 6px;
+ overflow: hidden;
+ width: 100%;
+}
+
+.x-shadow .xsml {
+ background: transparent url( /static/images/extjs/default/shadow-lr.png ) repeat-y 0 0;
+}
+
+.x-shadow .xsmr {
+ background: transparent url( /static/images/extjs/default/shadow-lr.png ) repeat-y -6px 0;
+}
+
+.x-shadow .xstl {
+ background: transparent url( /static/images/extjs/default/shadow.png ) no-repeat 0 0;
+}
+
+.x-shadow .xstc {
+ background: transparent url( /static/images/extjs/default/shadow.png ) repeat-x 0 -30px;
+}
+
+.x-shadow .xstr {
+ background: transparent url( /static/images/extjs/default/shadow.png ) repeat-x 0 -18px;
+}
+
+.x-shadow .xsbl {
+ background: transparent url( /static/images/extjs/default/shadow.png ) no-repeat 0 -12px;
+}
+
+.x-shadow .xsbc {
+ background: transparent url( /static/images/extjs/default/shadow.png ) repeat-x 0 -36px;
+}
+
+.x-shadow .xsbr {
+ background: transparent url( /static/images/extjs/default/shadow.png ) repeat-x 0 -6px;
+}
+
+.loading-indicator {
+ font-size: 11px;
+ background-image: url( '/static/images/extjs/default/grid/loading.gif' );
+ background-repeat: no-repeat;
+ background-position: left;
+ padding-left: 20px;
+ line-height: 16px;
+ margin: 3px;
+}
+
+.x-text-resize {
+ position: absolute;
+ left: -1000px;
+ top: -1000px;
+ visibility: hidden;
+ zoom: 1;
+}
+
+.x-drag-overlay {
+ width: 100%;
+ height: 100%;
+ display: none;
+ position: absolute;
+ left: 0;
+ top: 0;
+ background: white;
+ z-index: 20000;
+ -moz-opacity: 0;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+
+.x-clear {
+ clear:both;
+ height:0;
+ overflow:hidden;
+ line-height:0;
+ font-size:0;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/date-picker.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/date-picker.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,155 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-date-picker {
+ border: 1px solid #1b376c;
+ border-top:0 none;
+ background:#fff;
+}
+.x-date-picker a {
+ -moz-outline:0 none;
+ outline:0 none;
+}
+.x-date-inner, .x-date-inner td, .x-date-inner th{
+ border-collapse:separate;
+}
+.x-date-middle,.x-date-left,.x-date-right {
+ background: url(/static/images/extjs/default/basic-dialog/hd-sprite.gif) repeat-x 0 -83px;
+ color:#FFF;
+ font:bold 11px "sans serif", tahoma, verdana, helvetica;
+ overflow:hidden;
+}
+
+.x-date-middle .x-btn-left,.x-date-middle .x-btn-center,.x-date-middle .x-btn-right{
+ background:transparent !important;
+ vertical-align:middle;
+}
+.x-date-middle .x-btn .x-btn-text {
+ color:#fff;
+}
+.x-date-middle .x-btn-with-menu .x-btn-center em {
+ background:transparent url(/static/images/extjs/default/toolbar/btn-arrow-light.gif) no-repeat right 0;
+}
+.x-date-right, .x-date-left {
+ width:18px;
+}
+.x-date-right{
+ text-align:right;
+}
+.x-date-middle {
+ padding-top:2px;padding-bottom:2px;
+}
+.x-date-right a, .x-date-left a{
+ display:block;
+ width:16px;
+ height:16px;
+ background-position: center;
+ background-repeat: no-repeat;
+ cursor:pointer;
+ -moz-opacity: 0.6;
+ opacity:.6;
+ filter: alpha(opacity=60);
+}
+.x-date-right a:hover, .x-date-left a:hover{
+ -moz-opacity: 1;
+ opacity:1;
+ filter: alpha(opacity=100);
+}
+.x-date-right a {
+ background-image: url(/static/images/extjs/default/shared/right-btn.gif);
+ margin-right:2px;
+}
+.x-date-left a{
+ background-image: url(/static/images/extjs/default/shared/left-btn.gif);
+ margin-left:2px;
+}
+table.x-date-inner {
+ width:100%;
+ table-layout:fixed;
+}
+.x-date-inner th {
+ width:25px;
+}
+.x-date-inner th {
+ background: #c3daf9;
+ text-align:right !important;
+ border-bottom: 1px solid #a3bad9;
+ font:normal 10px arial, helvetica,tahoma,sans-serif;
+ color:#233d6d;
+ cursor:default;
+ padding:0;
+ border-collapse:separate;
+}
+.x-date-inner th span {
+ display:block;
+ padding:2px;
+ padding-right:7px;
+}
+.x-date-inner td {
+ border: 1px solid #fff;
+ text-align:right;
+ padding:0;
+}
+.x-date-inner a {
+ padding:2px 5px;
+ display:block;
+ font:normal 11px arial, helvetica,tahoma,sans-serif;
+ text-decoration:none;
+ color:black;
+ text-align:right;
+ zoom:1;
+}
+.x-date-inner .x-date-active{
+ cursor:pointer;
+ color:black;
+}
+.x-date-inner .x-date-selected a{
+ background: #ddecfe;
+ border: 1px solid #a3bad9;
+ padding:1px 4px;
+}
+.x-date-inner .x-date-today a{
+ border: 1px solid darkred;
+ padding:1px 4px;
+}
+.x-date-inner .x-date-selected span{
+ font-weight:bold;
+}
+.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a {
+ color:#aaaaaa;
+}
+.x-date-bottom {
+ padding:4px;
+ border-top: 1px solid #a3bad9;
+ background: #c3daf9;
+}
+
+.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{
+ text-decoration:none;
+ color:black;
+ background: #ddecfe;
+}
+
+.x-date-inner .x-date-disabled a {
+ cursor:default;
+ background:#eeeeee;
+ color:#bbbbbb;
+}
+.x-date-mmenu{
+ background:#eeeeee !important;
+}
+.x-date-mmenu .x-menu-item {
+ font-size:10px;
+ padding:1px 24px 1px 4px;
+ white-space: nowrap;
+ color:#000;
+}
+.x-date-mmenu .x-menu-item .x-menu-item-icon {
+ width:10px;height:10px;margin-right:5px;
+ background-position:center -4px !important;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/dd.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/dd.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,61 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-dd-drag-proxy{
+ position:absolute;
+ left:0;top:0;
+ visibility:hidden;
+ z-index:15000;
+}
+.x-dd-drag-ghost{
+ color: black;
+ font: normal 11px arial, helvetica, sans-serif;
+ -moz-opacity: 0.85;
+ opacity:.85;
+ filter: alpha(opacity=85);
+ border-top:1px solid #dddddd;
+ border-left:1px solid #dddddd;
+ border-right:1px solid #bbbbbb;
+ border-bottom:1px solid #bbbbbb;
+ padding:3px;
+ padding-left:20px;
+ background-color:white;
+ white-space:nowrap;
+}
+.x-dd-drag-repair .x-dd-drag-ghost{
+ -moz-opacity: 0.4;
+ opacity:.4;
+ filter: alpha(opacity=40);
+ border:0 none;
+ padding:0;
+ background-color:transparent;
+}
+.x-dd-drag-repair .x-dd-drop-icon{
+ visibility:hidden;
+}
+.x-dd-drop-icon{
+ position:absolute;
+ top:3px;
+ left:3px;
+ display:block;
+ width:16px;
+ height:16px;
+ background-color:transparent;
+ background-position: center;
+ background-repeat: no-repeat;
+ z-index:1;
+}
+.x-dd-drop-nodrop .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/dd/drop-no.gif);
+}
+.x-dd-drop-ok .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/dd/drop-yes.gif);
+}
+.x-dd-drop-ok-add .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/dd/drop-add.gif);
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/debug.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/debug.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,55 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+#x-debug-browser .x-tree .x-tree-node a span {
+ color:#222297;
+ font-size:12px;
+ padding-top:2px;
+ font-family:"courier","courier new";
+ line-height:18px;
+}
+#x-debug-browser .x-tree a i {
+ color:#FF4545;
+ font-style:normal;
+}
+#x-debug-browser .x-tree a em {
+ color:#999;
+}
+#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{
+ background:#c3daf9;
+}
+#x-debug-browser pre, .x-debug-browser pre xmp {
+ font:normal 11px tahoma, arial, helvetica, sans-serif !important;
+ white-space: -moz-pre-wrap;
+ white-space: -pre-wrap;
+ white-space: -o-pre-wrap;
+ word-wrap: break-word;
+}
+#x-debug-browser pre {
+ display:block;
+ padding:5px !important;
+ border-bottom:1px solid #eeeeee !important;
+}
+#x-debug-browser pre xmp {
+ padding:0 !important;
+ margin:0 !important;
+}
+#x-debug-console .x-layout-panel-center, #x-debug-inspector .x-layout-panel-center {
+ border-right:1px solid #98c0f4;
+}
+#x-debug-console textarea {
+ border: 0 none;
+ font-size:12px;
+ font-family:"courier","courier new";
+ padding-top:4px;
+ padding-left:4px;
+}
+.x-debug-frame {
+ background:#eeeeee;
+ border:1px dashed #aaaaaa;
+}
\ No newline at end of file
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ext-all.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ext-all.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,2711 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';}
+.ext-el-mask {
+ z-index: 20000;
+ position: absolute;
+ top: 0;
+ left: 0;
+ -moz-opacity: 0.5;
+ opacity: .50;
+ filter: alpha(opacity=50);
+ background-color: #CCC;
+ width: 100%;
+ height: 100%;
+ zoom: 1;
+}
+.ext-el-mask-msg {
+ z-index: 20001;
+ position: absolute;
+ top: 0;
+ left: 0;
+ border:1px solid #6593cf;
+ background: #c3daf9 url(/static/images/extjs/default/box/tb-blue.gif) repeat-x 0 -16px;
+ padding:2px;
+}
+.ext-el-mask-msg div {
+ padding:5px 10px 5px 10px;
+ background: #eee;
+ border:1px solid #a3bad9;
+ color:#333;
+ font:normal 12px tahoma, arial, helvetica, sans-serif;
+ cursor:wait;
+}
+
+
+.x-mask-loading div {
+ padding:5px 10px 5px 25px;
+ background: #eee url( '/static/images/extjs/default/grid/loading.gif' ) no-repeat 5px 5px;
+ line-height: 16px;
+}
+
+
+.x-hidden {
+ position:absolute;
+ left:-2000px;
+ top:-2000px;
+ visibility:hidden;
+}
+
+.x-masked {
+ overflow: hidden !important;
+}
+
+.x-masked select, .x-masked object, .x-masked embed {
+ visibility: hidden;
+}
+
+.x-layer {
+ visibility: hidden;
+}
+
+.x-unselectable, .x-unselectable * {
+ -moz-user-select: none;
+ -khtml-user-select: none;
+}
+
+.x-repaint {
+ zoom: 1;
+ background-color: transparent;
+ -moz-outline: none;
+}
+
+.x-item-disabled {
+ color: gray;
+ cursor: default;
+ opacity: .6;
+ -moz-opacity: .6;
+ filter: alpha(opacity=60);
+}
+
+.x-item-disabled * {
+ color: gray;
+ cursor: default !important;
+}
+
+.x-splitbar-proxy {
+ position: absolute;
+ visibility: hidden;
+ z-index: 20001;
+ background: #aaa;
+ zoom: 1;
+ line-height: 1px;
+ font-size: 1px;
+ overflow: hidden;
+}
+
+.x-splitbar-h, .x-splitbar-proxy-h {
+ cursor: e-resize;
+ cursor: col-resize;
+}
+
+.x-splitbar-v, .x-splitbar-proxy-v {
+ cursor: s-resize;
+ cursor: row-resize;
+}
+
+.x-color-palette {
+ width: 150px;
+ height: 92px;
+}
+
+.x-color-palette a {
+ border: 1px solid #fff;
+ float: left;
+ padding: 2px;
+ text-decoration: none;
+ -moz-outline: 0 none;
+ outline: 0 none;
+}
+
+.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel {
+ border: 1px solid #8BB8F3;
+ background: #deecfd;
+}
+
+.x-color-palette em {
+ display: block;
+ border: 1px solid #ACA899;
+}
+
+.x-color-palette em span {
+ cursor: pointer;
+ display: block;
+ height: 10px;
+ line-height: 10px;
+ width: 10px;
+}
+
+.x-shadow {
+ display: none;
+ position: absolute;
+ overflow: hidden;
+}
+
+.x-shadow * {
+ overflow: hidden;
+}
+
+.x-shadow * {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ clear: none;
+ zoom: 1;
+}
+
+
+.x-shadow .xstc, .x-shadow .xsbc {
+ height: 6px;
+ float: left;
+}
+
+
+.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr {
+ width: 6px;
+ height: 6px;
+ float: left;
+}
+
+
+.x-shadow .xsc {
+ width: 100%;
+}
+
+.x-shadow .xsml, .x-shadow .xsmr {
+ width: 6px;
+ float: left;
+ height: 100%;
+}
+
+.x-shadow .xsmc {
+ float: left;
+ height: 100%;
+ background: #333333;
+ opacity: .35;
+ -moz-opacity: .35;
+ filter: alpha(opacity=25);
+}
+
+.x-shadow .xst, .x-shadow .xsb {
+ height: 6px;
+ overflow: hidden;
+ width: 100%;
+}
+
+.x-shadow .xsml {
+ background: transparent url( /static/images/extjs/default/shadow-lr.png ) repeat-y 0 0;
+}
+
+.x-shadow .xsmr {
+ background: transparent url( /static/images/extjs/default/shadow-lr.png ) repeat-y -6px 0;
+}
+
+.x-shadow .xstl {
+ background: transparent url( /static/images/extjs/default/shadow.png ) no-repeat 0 0;
+}
+
+.x-shadow .xstc {
+ background: transparent url( /static/images/extjs/default/shadow.png ) repeat-x 0 -30px;
+}
+
+.x-shadow .xstr {
+ background: transparent url( /static/images/extjs/default/shadow.png ) repeat-x 0 -18px;
+}
+
+.x-shadow .xsbl {
+ background: transparent url( /static/images/extjs/default/shadow.png ) no-repeat 0 -12px;
+}
+
+.x-shadow .xsbc {
+ background: transparent url( /static/images/extjs/default/shadow.png ) repeat-x 0 -36px;
+}
+
+.x-shadow .xsbr {
+ background: transparent url( /static/images/extjs/default/shadow.png ) repeat-x 0 -6px;
+}
+
+.loading-indicator {
+ font-size: 11px;
+ background-image: url( '/static/images/extjs/default/grid/loading.gif' );
+ background-repeat: no-repeat;
+ background-position: left;
+ padding-left: 20px;
+ line-height: 16px;
+ margin: 3px;
+}
+
+.x-text-resize {
+ position: absolute;
+ left: -1000px;
+ top: -1000px;
+ visibility: hidden;
+ zoom: 1;
+}
+
+.x-drag-overlay {
+ width: 100%;
+ height: 100%;
+ display: none;
+ position: absolute;
+ left: 0;
+ top: 0;
+ background: white;
+ z-index: 20000;
+ -moz-opacity: 0;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+
+.x-clear {
+ clear:both;
+ height:0;
+ overflow:hidden;
+ line-height:0;
+ font-size:0;
+}
+
+.x-tabs-wrap {
+ border-bottom:1px solid #6593cf;
+ padding-top:2px;
+}
+.x-tabs-strip-wrap{
+ width:100%;
+}
+.x-tabs-wrap table{
+ position:relative;
+ top:0; left:0;
+}
+.x-tabs-strip td{
+ padding:0;
+ padding-left:2px;
+}
+.x-tabs-strip a, .x-tabs-strip span, .x-tabs-strip em {
+ display:block;
+}
+.x-tabs-strip a {
+ text-decoration:none !important;
+ -moz-outline: none;
+ outline: none;
+ cursor:pointer;
+}
+.x-tabs-strip .x-tabs-text {
+ font:bold 11px tahoma,arial,helvetica;
+ color:#666;
+ overflow:hidden;
+ white-space: nowrap;
+ cursor:pointer;
+ text-overflow: ellipsis;
+}
+.x-tabs-strip .on .x-tabs-text {
+ cursor:default;
+ color:#083772;
+}
+.x-tabs-strip .disabled .x-tabs-text {
+ cursor:default;
+ color:#aaaaaa;
+}
+.x-tabs-strip .x-tabs-inner {
+ padding:4px 10px;
+}
+
+.x-tabs-strip .on .x-tabs-right {
+ background: url(/static/images/extjs/default/tabs/tab-sprite.gif) no-repeat right 0;
+}
+.x-tabs-strip .on .x-tabs-left {
+ background: url(/static/images/extjs/default/tabs/tab-sprite.gif) no-repeat 0 -100px;
+}
+.x-tabs-strip .x-tabs-right {
+ background: url(/static/images/extjs/default/tabs/tab-sprite.gif) no-repeat right -50px;
+}
+.x-tabs-strip .x-tabs-left {
+ background: url(/static/images/extjs/default/tabs/tab-sprite.gif) no-repeat 0 -150px;
+}
+
+.x-tabs-strip a {
+ position:relative;
+ top:1px; left:0;
+}
+.x-tabs-strip .on a {
+ position:relative;
+}
+.x-tabs-strip .on .x-tabs-inner {
+ padding-bottom:5px;
+}
+
+.x-tabs-strip .x-tabs-closable .x-tabs-inner{
+ padding-right:22px;
+ position:relative;
+}
+.x-tabs-strip .x-tabs-closable .close-icon{
+ line-height: 1px;
+ font-size:1px;
+ background-image:url(/static/images/extjs/default/layout/tab-close.gif);
+ display:block;
+ position:absolute;
+ right:5px;top:4px;
+ width:11px;height:11px;
+ cursor:pointer;
+}
+.x-tabs-strip .on .close-icon{
+ background-image:url(/static/images/extjs/default/layout/tab-close-on.gif);
+}
+.x-tabs-strip .x-tabs-closable .close-over{
+ background-image:url(/static/images/extjs/default/layout/tab-close-on.gif);
+}
+.x-tabs-body {
+ border:1px solid #6593cf;
+ border-top:0 none;
+}
+.x-tabs-bottom .x-tabs-wrap {
+ border-top:1px solid #6593cf;
+ border-bottom:0 none;
+ padding-top:0;
+ padding-bottom:2px;
+}
+.x-tabs-bottom .x-tabs-strip .x-tabs-right {
+ background: url(/static/images/extjs/default/tabs/tab-btm-inactive-right-bg.gif) no-repeat bottom left;
+}
+.x-tabs-bottom .x-tabs-strip .x-tabs-left {
+ background: url(/static/images/extjs/default/tabs/tab-btm-inactive-left-bg.gif) no-repeat bottom right;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-right {
+ background: url(/static/images/extjs/default/tabs/tab-btm-right-bg.gif) no-repeat bottom left;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-left {
+ background: url(/static/images/extjs/default/tabs/tab-btm-left-bg.gif) no-repeat bottom right;
+}
+.x-tabs-bottom .x-tabs-strip a {
+ position:relative;
+ top:0; left:0;
+}
+.x-tabs-bottom .x-tabs-strip .on a {
+ margin-top:-1px;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-inner {
+ padding-top:5px;
+}
+
+.x-tabs-bottom .x-tabs-body {
+ border:1px solid #6593cf;
+ border-bottom:0 none;
+}
+
+
+
+.x-form-field{
+ margin: 0 0 0 0;
+ font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+
+.x-form-text, textarea.x-form-field{
+ padding: 1px 3px;
+ background:#fff url(/static/images/extjs/default/form/text-bg.gif) repeat-x 0 0;
+ border: 1px solid #B5B8C8;
+}
+.x-form-text {
+ height:22px;
+ line-height:18px;
+ vertical-align:middle;
+}
+.ext-ie .x-form-text {
+ margin-top:-1px;
+ margin-bottom:-1px;
+ height:22px;
+ line-height:18px;
+}
+.ext-strict .x-form-text {
+ height:18px;
+}
+.ext-safari .x-form-text {
+ height:20px;
+}
+.ext-gecko .x-form-text {
+ padding-top:2px;
+ padding-bottom:0;
+}
+
+
+.x-form-select-one {
+ height:20px;
+ line-height:18px;
+ vertical-align:middle;
+ background-color:#fff;
+ border: 1px solid #B5B8C8;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.x-form-field-wrap {
+ position:relative;
+ zoom:1;
+ white-space: nowrap;
+}
+
+.x-editor .x-form-check-wrap {
+ background:#fff;
+}
+.x-form-field-wrap .x-form-trigger{
+ width:17px;
+ height:21px;
+ border:0;
+ background:transparent url(/static/images/extjs/default/form/trigger.gif) no-repeat 0 0;
+ cursor:pointer;
+ border-bottom: 1px solid #B5B8C8;
+ position:absolute;
+ top:0;
+}
+.ext-safari .x-form-field-wrap .x-form-trigger{
+ height:19px;
+}
+.x-form-field-wrap .x-form-trigger-over{
+ background-position:-17px 0;
+}
+.x-form-field-wrap .x-form-trigger-click{
+ background-position:-34px 0;
+}
+.x-item-disabled .x-form-trigger-over{
+ background-position:0 0 !important;
+}
+.x-item-disabled .x-form-trigger-click{
+ background-position:0 0 !important;
+}
+.x-form-field-wrap .x-form-date-trigger{
+ background:transparent url(/static/images/extjs/default/form/date-trigger.gif) no-repeat 0 0;
+ cursor:pointer;
+}
+.ext-safari .x-form-field-wrap .x-form-date-trigger{
+ right:0;
+}
+
+
+.x-form-focus{
+ border: 1px solid #7eadd9;
+}
+
+
+.x-form-invalid{
+ background:#fff url(/static/images/extjs/default/grid/invalid_line.gif) repeat-x bottom;
+ border: 1px solid #dd7870;
+}
+.ext-safari .x-form-invalid{
+ background-color:#ffeeee;
+ border: 1px solid #ff7870;
+}
+
+
+
+.x-editor {
+ visibility:hidden;
+ padding:0;
+ margin:0;
+}
+.x-form-check-wrap {
+ line-height:18px;
+}
+.ext-ie .x-form-check-wrap input {
+ width:15px;
+ height:15px;
+}
+.x-editor .x-form-check-wrap {
+ padding:3px;
+}
+.x-editor .x-form-checkbox {
+ height:13px;
+ border: 0 none;
+}
+
+.x-form-grow-sizer {
+ font:normal 12px tahoma, arial, helvetica, sans-serif;
+ left: -10000px;
+ padding: 8px 3px;
+ position: absolute;
+ visibility:hidden;
+ top: -10000px;
+ white-space: pre-wrap;
+ white-space: -moz-pre-wrap;
+ white-space: -pre-wrap;
+ white-space: -o-pre-wrap;
+ word-wrap: break-word;
+ zoom:1;
+}
+
+
+
+.x-form-item {
+ font:normal 12px tahoma, arial, helvetica, sans-serif;
+ display:block;
+ margin-bottom:4px;
+}
+
+.x-form-item label {
+ display:block;
+ float:left;
+ width:100px;
+ padding:3px;
+ padding-left:0;
+ clear:left;
+}
+
+.x-form-element {
+ padding-left:105px;
+ position:relative;
+}
+
+.x-form-invalid-msg {
+ color:#ee0000;
+ padding:2px;
+ padding-left:18px;
+ font:normal 11px tahoma, arial, helvetica, sans-serif;
+ background: transparent url(/static/images/extjs/default/shared/warning.gif) no-repeat 0 2px;
+ line-height:16px;
+ width:200px;
+}
+
+.x-form-label-right label {
+ text-align:right;
+}
+
+.x-form-label-top .x-form-item label {
+ width:auto;
+ float:none;
+ clear:none;
+ display:inline;
+ margin-bottom:4px;
+}
+.x-form-label-top .x-form-element {
+ padding-left:0;
+ padding-top:4px;
+}
+.x-form-label-top .x-form-item {
+ padding-bottom:4px;
+}
+.x-form fieldset {
+ border:1px solid #B5B8C8;
+ padding:10px 10px 5px 10px;
+ margin-bottom:10px;
+}
+.x-form fieldset legend {
+ font:bold 11px tahoma, arial, helvetica, sans-serif;
+ color:#15428b;
+}
+.ext-ie .x-form fieldset legend {
+ margin-bottom:10px;
+}
+.x-form-empty-field {
+ color:gray;
+}
+
+.x-small-editor .x-form-field {
+ font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+.x-small-editor .x-form-text {
+ height:20px;
+ line-height:16px;
+ vertical-align:middle;
+}
+.ext-ie .x-small-editor .x-form-text {
+ margin-top:-1px !important;
+ margin-bottom:-1px !important;
+ height:20px !important;
+ line-height:16px !important;
+}
+.ext-strict .x-small-editor .x-form-text {
+ height:16px !important;
+}
+.ext-safari .x-small-editor .x-form-field {
+
+ font:normal 12px arial, tahoma, helvetica, sans-serif;
+}
+.ext-ie .x-small-editor .x-form-text {
+ height:20px;
+ line-height:16px;
+}
+.ext-border-box .x-small-editor .x-form-text {
+ height:20px;
+}
+
+.x-small-editor .x-form-select-one {
+ height:20px;
+ line-height:16px;
+ vertical-align:middle;
+}
+.x-small-editor .x-form-num-field {
+ text-align:right;
+}
+.x-small-editor .x-form-field-wrap .x-form-trigger{
+ height:19px;
+}
+
+
+.x-form-clear {
+ clear:both;
+ height:0;
+ overflow:hidden;
+ line-height:0;
+ font-size:0;
+}
+.x-form-clear-left {
+ clear:left;
+ height:0;
+ overflow:hidden;
+ line-height:0;
+ font-size:0;
+}
+
+.x-form-cb-label {
+ width:'auto' !important;
+ float:none !important;
+ clear:none !important;
+ display:inline !important;
+ margin-left:4px;
+}
+
+.x-form-column {
+ float:left;
+ padding:0;
+ margin:0;
+ width:48%;
+ overflow:hidden;
+ zoom:1;
+}
+
+
+.x-form .x-form-btns-ct .x-btn{
+ float:right;
+ clear:none;
+}
+.x-form .x-form-btns-ct .x-form-btns td {
+ border:0;
+ padding:0;
+}
+.x-form .x-form-btns-ct .x-form-btns-right table{
+ float:right;
+ clear:none;
+}
+.x-form .x-form-btns-ct .x-form-btns-left table{
+ float:left;
+ clear:none;
+}
+.x-form .x-form-btns-ct .x-form-btns-center{
+ text-align:center;
+}
+.x-form .x-form-btns-ct .x-form-btns-center table{
+ margin:0 auto;
+}
+.x-form .x-form-btns-ct table td.x-form-btn-td{
+ padding:3px;
+}
+
+.x-form-invalid-icon {
+ width:16px;
+ height:18px;
+ visibility:hidden;
+ position:absolute;
+ left:0;
+ top:0;
+ display:block;
+ background:transparent url(/static/images/extjs/default/form/exclamation.gif) no-repeat 0 2px;
+}
+.x-btn{
+ font:normal 11px tahoma, verdana, helvetica;
+ cursor:pointer;
+ white-space: nowrap;
+}
+.x-btn button{
+ border:0 none;
+ background:transparent;
+ font:normal 11px tahoma,verdana,helvetica;
+ padding-left:3px;
+ padding-right:3px;
+ cursor:pointer;
+ margin:0;
+ overflow:visible;
+ width:auto;
+ -moz-outline:0 none;
+ outline:0 none;
+}
+* html .ext-ie .x-btn button {
+ width:1px;
+}
+.ext-gecko .x-btn button {
+ padding-left:0;
+ padding-right:0;
+}
+
+
+.x-btn-icon .x-btn-center .x-btn-text{
+ background-position: center;
+ background-repeat: no-repeat;
+ height: 16px;
+ width: 16px;
+ cursor:pointer;
+ white-space: nowrap;
+ padding:0;
+}
+.x-btn-icon .x-btn-center{
+ padding:1px;
+}
+.x-btn em {
+ font-style:normal;
+ font-weight:normal;
+}
+
+
+.x-btn-text-icon .x-btn-center .x-btn-text{
+ background-position: 0 2px;
+ background-repeat: no-repeat;
+ padding-left:18px;
+ padding-top:3px;
+ padding-bottom:3px;
+ padding-right:0;
+}
+
+.x-btn-left, .x-btn-right{
+ font-size:1px;
+ line-height:1px;
+}
+.x-btn-left{
+ width:3px;
+ height:21px;
+ background:url(/static/images/extjs/default/basic-dialog/btn-sprite.gif) no-repeat 0 0;
+}
+.x-btn-right{
+ width:3px;
+ height:21px;
+ background:url(/static/images/extjs/default/basic-dialog/btn-sprite.gif) no-repeat 0 -21px;
+}
+.x-btn-left i, .x-btn-right i{
+ display:block;
+ width:3px;
+ overflow:hidden;
+ font-size:1px;
+ line-height:1px;
+}
+.x-btn-center{
+ background:url(/static/images/extjs/default/basic-dialog/btn-sprite.gif) repeat-x 0 -42px;
+ vertical-align: middle;
+ text-align:center;
+ padding:0 5px;
+ cursor:pointer;
+ white-space:nowrap;
+}
+.x-btn-focus .x-btn-left{
+ background-position:0 -126px;
+}
+.x-btn-focus .x-btn-right{
+ background-position:0 -147px;
+}
+.x-btn-focus .x-btn-center{
+ background-position:0 -168px;
+}
+.x-btn-over .x-btn-left{
+ background-position:0 -63px;
+}
+.x-btn-over .x-btn-right{
+ background-position:0 -84px;
+}
+.x-btn-over .x-btn-center{
+ background-position:0 -105px;
+}
+.x-btn-click .x-btn-center, .x-btn-menu-active .x-btn-center{
+ background-position:0 -126px;
+}
+.x-btn-disabled *{
+ color:gray !important;
+ cursor:default !important;
+}
+.x-btn-menu-text-wrap .x-btn-center {
+ padding:0 3px;
+}
+.ext-gecko .x-btn-menu-text-wrap .x-btn-center {
+ padding:0 1px;
+}
+.x-btn-menu-arrow-wrap .x-btn-center {
+ padding:0;
+}
+.x-btn-menu-arrow-wrap .x-btn-center button {
+ width:12px !important;
+ height:21px;
+ padding:0 !important;
+ display:block;
+ background:transparent url(/static/images/extjs/default/basic-dialog/btn-arrow.gif) no-repeat left 3px;
+}
+.x-btn-with-menu .x-btn-center {
+ padding-right:2px !important;
+}
+.x-btn-with-menu .x-btn-center em {
+ display:block;
+ background:transparent url(/static/images/extjs/default/toolbar/btn-arrow.gif) no-repeat right 0;
+ padding-right:10px;
+}
+
+.x-btn-text-icon .x-btn-with-menu .x-btn-center em {
+ display:block;
+ background:transparent url(/static/images/extjs/default/toolbar/btn-arrow.gif) no-repeat right 3px;
+ padding-right:10px;
+}
+.x-toolbar{
+ border: 1px solid;
+ border-color:#eaf0f7 #eaf0f7 #a9bfd3 #eaf0f7;
+ display: block;
+ padding:2px;
+ background:#d0def0 url(/static/images/extjs/default/layout/panel-title-light-bg.gif) repeat-x;
+}
+.x-toolbar td {
+ vertical-align:middle;
+}
+.mso .x-toolbar, .x-grid-mso .x-toolbar{
+ border: 0 none;
+ background: url(/static/images/extjs/default/grid/mso-hd.gif);
+}
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{
+ white-space: nowrap;
+ font:normal 11px tahoma, arial, helvetica, sans-serif;
+}
+.x-toolbar .x-item-disabled {
+ color:gray;
+ cursor:default;
+ opacity:.6;
+ -moz-opacity:.6;
+ filter:alpha(opacity=60);
+}
+.x-toolbar .x-item-disabled * {
+ color:gray;
+ cursor:default;
+}
+.x-toolbar .x-btn-left{
+ background:none;
+}
+.x-toolbar .x-btn-right{
+ background:none;
+}
+.x-toolbar .x-btn-center{
+ background:none;
+ padding:0 0;
+}
+.x-toolbar .x-btn-menu-text-wrap .x-btn-center button{
+ padding-right:2px;
+}
+.ext-gecko .x-toolbar .x-btn-menu-text-wrap .x-btn-center button{
+ padding-right:0;
+}
+.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button{
+ padding:0 2px;
+}
+.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button {
+ width:12px;
+ background:transparent url(/static/images/extjs/default/toolbar/btn-arrow.gif) no-repeat 0 3px;
+}
+.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button {
+ width:12px;
+ background:transparent url(/static/images/extjs/default/toolbar/btn-arrow.gif) no-repeat 0 3px;
+}
+.x-toolbar .x-btn-over .x-btn-menu-arrow-wrap .x-btn-center button {
+ background-position: 0 -47px;
+}
+.x-toolbar .x-btn-over .x-btn-left{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) no-repeat 0 0;
+}
+.x-toolbar .x-btn-over .x-btn-right{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -21px;
+}
+.x-toolbar .x-btn-over .x-btn-center{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -42px;
+}
+
+.x-toolbar .x-btn-click .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -63px;
+}
+.x-toolbar .x-btn-click .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -84px;
+}
+.x-toolbar .x-btn-click .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -105px;
+}
+
+.x-toolbar .ytb-text{
+ padding:2px;
+}
+.x-toolbar .ytb-sep {
+ background-image: url(/static/images/extjs/default/grid/grid-split.gif);
+ background-position: center;
+ background-repeat: no-repeat;
+ display: block;
+ font-size: 1px;
+ height: 16px;
+ width:4px;
+ overflow: hidden;
+ cursor:default;
+ margin: 0 2px 0;
+ border:0;
+}
+.x-toolbar .ytb-spacer {
+ width:2px;
+}
+.mso .x-toolbar .ytb-sep, .x-grid-mso .x-toolbar .ytb-sep{
+ background-image: url(/static/images/extjs/default/grid/grid-blue-split.gif);
+}
+
+
+.ext-ie .x-toolbar .x-form-field-wrap {
+ padding-bottom:1px;
+}
+.ext-ie .x-toolbar .x-form-field-wrap .x-form-trigger {
+ top:1px;
+}
+
+
+
+.x-grid-page-number{
+ width:24px;
+ height:14px;
+}
+.x-grid-page-first .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-first.gif);
+}
+.x-grid-loading .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/done.gif);
+}
+.x-grid-page-last .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-last.gif);
+}
+.x-grid-page-next .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-next.gif);
+}
+.x-grid-page-prev .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-prev.gif);
+}
+.x-item-disabled .x-grid-loading .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/loading.gif);
+}
+.x-item-disabled .x-grid-page-first .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-first-disabled.gif);
+}
+.x-item-disabled .x-grid-page-last .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-last-disabled.gif);
+}
+.x-item-disabled .x-grid-page-next .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-next-disabled.gif);
+}
+.x-item-disabled .x-grid-page-prev .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-prev-disabled.gif);
+}
+.x-paging-info {
+ position:absolute;
+ top:8px;
+ right: 8px;
+ color:#15428b;
+}
+
+.x-resizable-handle {
+ position:absolute;
+ z-index:100;
+
+ font-size:1px;
+ line-height:6px;
+ overflow:hidden;
+ background:white;
+ filter:alpha(opacity=0);
+ opacity:0;
+ zoom:1;
+}
+.x-resizable-handle-east{
+ width:6px;
+ cursor:e-resize;
+ right:0;
+ top:0;
+ height:100%;
+}
+.ext-ie .x-resizable-handle-east {
+ margin-right:-1px;
+}
+.x-resizable-handle-south{
+ width:100%;
+ cursor:s-resize;
+ left:0;
+ bottom:0;
+ height:6px;
+}
+.ext-ie .x-resizable-handle-south {
+ margin-bottom:-1px;
+}
+.x-resizable-handle-west{
+ width:6px;
+ cursor:w-resize;
+ left:0;
+ top:0;
+ height:100%;
+}
+.x-resizable-handle-north{
+ width:100%;
+ cursor:n-resize;
+ left:0;
+ top:0;
+ height:6px;
+}
+.x-resizable-handle-southeast{
+ width:6px;
+ cursor:se-resize;
+ right:0;
+ bottom:0;
+ height:6px;
+ z-index:101;
+}
+.x-resizable-handle-northwest{
+ width:6px;
+ cursor:nw-resize;
+ left:0;
+ top:0;
+ height:6px;
+ z-index:101;
+}
+.x-resizable-handle-northeast{
+ width:6px;
+ cursor:ne-resize;
+ right:0;
+ top:0;
+ height:6px;
+ z-index:101;
+}
+.x-resizable-handle-southwest{
+ width:6px;
+ cursor:sw-resize;
+ left:0;
+ bottom:0;
+ height:6px;
+ z-index:101;
+}
+.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{
+ filter:alpha(opacity=100);
+ opacity:1;
+}
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east{
+ background:url(/static/images/extjs/default/sizer/e-handle.gif);
+ background-position: left;
+}
+.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west{
+ background:url(/static/images/extjs/default/sizer/e-handle.gif);
+ background-position: left;
+}
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south{
+ background:url(/static/images/extjs/default/sizer/s-handle.gif);
+ background-position: top;
+}
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{
+ background:url(/static/images/extjs/default/sizer/s-handle.gif);
+ background-position: top;
+}
+.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{
+ background:url(/static/images/extjs/default/sizer/se-handle.gif);
+ background-position: top left;
+}
+.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{
+ background:url(/static/images/extjs/default/sizer/nw-handle.gif);
+ background-position:bottom right;
+}
+.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{
+ background:url(/static/images/extjs/default/sizer/ne-handle.gif);
+ background-position: bottom left;
+}
+.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{
+ background:url(/static/images/extjs/default/sizer/sw-handle.gif);
+ background-position: top right;
+}
+.x-resizable-proxy{
+ border: 1px dashed #6593cf;
+ position:absolute;
+ overflow:hidden;
+ visibility:hidden;
+ left:0;top:0;
+ z-index:50000;
+}
+.x-resizable-overlay{
+ width:100%;
+ height:100%;
+ display:none;
+ position:absolute;
+ left:0;
+ top:0;
+ background:white;
+ z-index:200000;
+ -moz-opacity: 0;
+ opacity:0;
+ filter: alpha(opacity=0);
+}
+
+
+.x-grid {
+ position:relative;
+ overflow:hidden;
+ background:#fff;
+}
+.x-grid-scroller {
+ overflow:auto;
+}
+.x-grid-viewport, .x-grid-locked{
+ position:absolute;
+ left:0; top: 0;
+ z-index:2;
+ overflow:hidden;
+ visibility:hidden;
+}
+.x-grid-cell-inner, .x-grid-hd-inner{
+ overflow:hidden;
+ -o-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+}
+.x-grid-hd-row td, .x-grid-row td{
+ font:normal 11px arial, tahoma, helvetica, sans-serif;
+ line-height:13px;
+ white-space: nowrap;
+ vertical-align: top;
+ -moz-outline: none;
+ -moz-user-focus: normal;
+}
+.x-grid-hd-row td {
+ line-height:14px;
+}
+.x-grid-col {
+ border-right: 1px solid #ebebeb;
+ border-bottom: 1px solid #ebebeb;
+}
+
+
+.x-grid-locked .x-grid-body td {
+ background: #FBFDFF;
+ border-right: 1px solid #deecfd;
+ border-bottom: 1px solid #deecfd !important;
+}
+.x-grid-locked .x-grid-body td .x-grid-cell-inner {
+ border-top:0 none;
+}
+.x-grid-locked .x-grid-row-alt td{
+ background: #F5FAFE;
+}
+
+.x-grid-locked .x-grid-header table{
+ border-right:1px solid transparent;
+}
+.x-grid-locked .x-grid-body table{
+ border-right:1px solid #c3daf9;
+}
+
+.x-grid-locked .x-grid-body td .x-grid-cell-inner {
+
+}
+.x-grid-row {
+ cursor: default;
+}
+.x-grid-row-alt{
+ background:#f1f1f1;
+}
+.x-grid-row-over td{
+ background:#d9e8fb;
+}
+.x-grid-resize-proxy {
+ width:3px;
+ background:#cccccc;
+ cursor: e-resize;
+ cursor: col-resize;
+ position:absolute;
+ top:0;
+ height:100px;
+ overflow:hidden;
+ visibility:hidden;
+ border:0 none;
+ z-index:7;
+}
+.x-grid-focus {
+ position:absolute;
+ top:0;
+ -moz-outline:0 none;
+ outline:0 none;
+ -moz-user-select: normal;
+ -khtml-user-select: normal;
+}
+
+
+.x-grid-header{
+ background: #ebeadb url(/static/images/extjs/default/grid/grid-hrow.gif) repeat-x;
+ overflow:hidden;
+ position:relative;
+ cursor:default;
+ width:100%;
+}
+.x-grid-hd-row{
+ height:22px;
+}
+.x-grid-hd {
+ padding-right:1px;
+}
+.x-grid-hd-over .x-grid-hd-inner {
+ border-bottom: 1px solid #c3daf9;
+}
+.x-grid-hd-over .x-grid-hd-text {
+ background: #fafafa url(/static/images/extjs/default/grid/grid-hrow.gif) repeat-x 0 1px;
+ padding-bottom:1px;
+ border-bottom: 1px solid #b3cae9;
+}
+.x-grid-sort-icon{
+ background-repeat: no-repeat;
+ display: none;
+ height: 4px;
+ width: 13px;
+ margin-left:3px;
+ vertical-align: middle;
+}
+.x-grid-header .sort-asc .x-grid-sort-icon {
+ background-image: url(/static/images/extjs/default/grid/sort_asc.gif);
+ display: inline;
+}
+.x-grid-header .sort-desc .x-grid-sort-icon {
+ background-image: url(/static/images/extjs/default/grid/sort_desc.gif);
+ display: inline;
+}
+
+
+.x-grid-body {
+ overflow:hidden;
+ position:relative;
+ width:100%;
+ zoom:1;
+}
+
+.x-grid-cell-text,.x-grid-hd-text {
+ display: block;
+ padding: 3px 5px 3px 5px;
+ -moz-user-select: none;
+ -khtml-user-select: none;
+ color:black;
+}
+.x-grid-hd-text {
+ padding-top:4px;
+}
+.x-grid-split {
+ background-image: url(/static/images/extjs/default/grid/grid-split.gif);
+ background-position: center;
+ background-repeat: no-repeat;
+ cursor: e-resize;
+ cursor: col-resize;
+ display: block;
+ font-size: 1px;
+ height: 16px;
+ overflow: hidden;
+ position: absolute;
+ top: 2px;
+ width: 6px;
+ z-index: 3;
+}
+
+.x-grid-hd-text {
+ color:#15428b;
+}
+
+.x-dd-drag-proxy .x-grid-hd-inner{
+ background: #ebeadb url(/static/images/extjs/default/grid/grid-hrow.gif) repeat-x;
+ height:22px;
+ width:120px;
+}
+
+.col-move-top, .col-move-bottom{
+ width:9px;
+ height:9px;
+ position:absolute;
+ top:0;
+ line-height:1px;
+ font-size:1px;
+ overflow:hidden;
+ visibility:hidden;
+ z-index:20000;
+}
+.col-move-top{
+ background:transparent url(/static/images/extjs/default/grid/col-move-top.gif) no-repeat left top;
+}
+.col-move-bottom{
+ background:transparent url(/static/images/extjs/default/grid/col-move-bottom.gif) no-repeat left top;
+}
+
+
+.x-grid-row-selected td, .x-grid-locked .x-grid-row-selected td{
+ background-color: #316ac5 !important;
+ color: white;
+}
+.x-grid-row-selected span, .x-grid-row-selected b, .x-grid-row-selected div, .x-grid-row-selected strong, .x-grid-row-selected i{
+ color: white !important;
+}
+.x-grid-row-selected .x-grid-cell-text{
+ color: white;
+}
+.x-grid-cell-selected{
+ background-color: #316ac5 !important;
+ color: white;
+}
+.x-grid-cell-selected span{
+ color: white !important;
+}
+.x-grid-cell-selected .x-grid-cell-text{
+ color: white;
+}
+
+.x-grid-locked td.x-grid-row-marker, .x-grid-locked .x-grid-row-selected td.x-grid-row-marker{
+ background: #ebeadb url(/static/images/extjs/default/grid/grid-hrow.gif) repeat-x 0 bottom !important;
+ vertical-align:middle !important;
+ color:black;
+ padding:0;
+ border-top:1px solid white;
+ border-bottom:none !important;
+ border-right:1px solid #6fa0df !important;
+ text-align:center;
+}
+.x-grid-locked td.x-grid-row-marker div, .x-grid-locked .x-grid-row-selected td.x-grid-row-marker div{
+ padding:0 4px;
+ color:#15428b !important;
+ text-align:center;
+}
+
+
+.x-grid-dirty-cell {
+ background: transparent url(/static/images/extjs/default/grid/dirty.gif) no-repeat 0 0;
+}
+
+
+.x-grid-topbar, .x-grid-bottombar{
+ font:normal 11px arial, tahoma, helvetica, sans-serif;
+ overflow:hidden;
+ display:none;
+ zoom:1;
+ position:relative;
+}
+.x-grid-topbar .x-toolbar{
+ border-right:0 none;
+}
+.x-grid-bottombar .x-toolbar{
+ border-right:0 none;
+ border-bottom:0 none;
+ border-top:1px solid #a9bfd3;
+}
+
+.x-props-grid .x-grid-cell-selected .x-grid-cell-text{
+ background-color: #316ac5 !important;
+}
+.x-props-grid .x-grid-col-value .x-grid-cell-text{
+ background-color: white;
+}
+.x-props-grid .x-grid-col-name{
+ background-color: #c3daf9;
+}
+.x-props-grid .x-grid-col-name .x-grid-cell-text{
+ background-color: white;
+ margin-left:10px;
+}
+.x-props-grid .x-grid-split-value {
+ visibility:hidden;
+}
+
+
+.xg-hmenu-sort-asc .x-menu-item-icon{
+ background-image: url(/static/images/extjs/default/grid/hmenu-asc.gif);
+}
+.xg-hmenu-sort-desc .x-menu-item-icon{
+ background-image: url(/static/images/extjs/default/grid/hmenu-desc.gif);
+}
+.xg-hmenu-lock .x-menu-item-icon{
+ background-image: url(/static/images/extjs/default/grid/hmenu-lock.gif);
+}
+.xg-hmenu-unlock .x-menu-item-icon{
+ background-image: url(/static/images/extjs/default/grid/hmenu-unlock.gif);
+}
+
+
+.x-dd-drag-ghost .x-grid-dd-wrap {
+ padding:1px 3px 3px 1px;
+}
+.x-layout-container{
+ width:100%;
+ height:100%;
+ overflow:hidden;
+ background-color:#c3daf9;
+}
+.x-layout-container .x-layout-tabs-body{
+ border:0 none;
+}
+.x-layout-collapsed{
+ position:absolute;
+ left:-10000px;
+ top:-10000px;
+ visibility:hidden;
+ background-color:#c3daf9;
+ width:20px;
+ height:20px;
+ overflow:hidden;
+ border:1px solid #98c0f4;
+ z-index:20;
+}
+.ext-border-box .x-layout-collapsed{
+ width:22px;
+ height:22px;
+}
+.x-layout-collapsed-over{
+ cursor:pointer;
+ background-color:#d9e8fb;
+}
+.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{
+ position:absolute;
+ top:0;
+ left:0;
+ width:20px;
+ height:20px;
+}
+.x-layout-collapsed-north .x-layout-collapsed-tools, .x-layout-collapsed-south .x-layout-collapsed-tools{
+ position:absolute;
+ top:0;
+ right:0;
+ width:20px;
+ height:20px;
+}
+.x-layout-collapsed .x-layout-tools-button{
+ margin:0;
+}
+.x-layout-collapsed .x-layout-tools-button-inner{
+ width:16px;
+ height:16px;
+}
+.x-layout-inactive-content{
+ position:absolute;
+ left:-10000px;
+ top:-10000px;
+ visibility:hidden;
+}
+.x-layout-active-content{
+ visibility:visible;
+}
+.x-layout-panel{
+ position:absolute;border:1px solid #98c0f4;overflow:hidden;background-color:white;
+}
+.x-layout-panel-east, .x-layout-panel-west {
+ z-index:10;
+}
+.x-layout-panel-north, .x-layout-panel-south {
+ z-index:11;
+}
+.x-layout-collapsed-north, .x-layout-collapsed-south, .x-layout-collapsed-east, .x-layout-collapsed-west {
+ z-index:12;
+}
+.x-layout-panel-body{
+ overflow:hidden;
+}
+.x-layout-grid-wrapper{
+
+}
+.x-layout-split{
+ position:absolute;
+ height:5px;
+ width:5px;
+ line-height:1px;
+ font-size:1px;
+ z-index:3;
+ background-color:#c3daf9;
+}
+.x-layout-panel-hd{
+ background-image: url(/static/images/extjs/default/layout/panel-title-light-bg.gif);
+ color: black;
+ border-bottom:1px solid #98c0f4;
+ position:relative;
+}
+.x-layout-panel-hd-text{
+ font:normal 11px tahoma, verdana, helvetica;
+ padding: 4px;
+ padding-left: 4px;
+ display:block;
+ white-space:nowrap;
+}
+.x-layout-panel-hd-tools{
+ position:absolute;
+ right:0;
+ top:0;
+ text-align:right;
+ padding-top:2px;
+ padding-right:2px;
+ width:60px;
+}
+.x-layout-tools-button{
+ z-index:6;
+ padding:2px;
+ cursor:pointer;
+ float:right;
+}
+.x-layout-tools-button-over{
+ padding:1px;
+ border:1px solid #98c0f4;
+ background-color:white;
+}
+.x-layout-tools-button-inner{
+ height:12px;
+ width:12px;
+ line-height:1px;
+ font-size:1px;
+ background-repeat:no-repeat;
+ background-position:center;
+}
+.x-layout-close{
+ background-image:url(/static/images/extjs/default/layout/panel-close.gif);
+}
+.x-layout-stick{
+ background-image:url(/static/images/extjs/default/layout/stick.gif);
+}
+.x-layout-collapse-west,.x-layout-expand-east{
+ background-image:url(/static/images/extjs/default/layout/collapse.gif);
+}
+.x-layout-expand-west,.x-layout-collapse-east{
+ background-image:url(/static/images/extjs/default/layout/expand.gif);
+}
+.x-layout-collapse-north,.x-layout-expand-south{
+ background-image:url(/static/images/extjs/default/layout/ns-collapse.gif);
+}
+.x-layout-expand-north,.x-layout-collapse-south{
+ background-image:url(/static/images/extjs/default/layout/ns-expand.gif);
+}
+.x-layout-split-h{
+ background-image:url(/static/images/extjs/default/sizer/e-handle.gif);
+ background-position: left;
+}
+.x-layout-split-v{
+ background-image:url(/static/images/extjs/default/sizer/s-handle.gif);
+ background-position: top;
+}
+.x-layout-panel .x-tabs-wrap{
+ background:url(/static/images/extjs/default/layout/gradient-bg.gif);
+}
+.x-layout-panel .x-tabs-body {
+ background-color:white;
+ overflow:auto;height:100%;
+}
+.x-layout-component-panel, .x-layout-nested-layout {
+ position:relative;
+ padding:0;
+ overflow:hidden;
+ width:200px;
+ height:200px;
+}
+.x-layout-nested-layout .x-layout-panel {
+ border:0 none;
+}
+.x-layout-nested-layout .x-layout-panel-north {
+ border-bottom:1px solid #98c0f4;
+}
+.x-layout-nested-layout .x-layout-panel-south {
+ border-top:1px solid #98c0f4;
+}
+.x-layout-nested-layout .x-layout-panel-east {
+ border-left:1px solid #98c0f4;
+}
+.x-layout-nested-layout .x-layout-panel-west {
+ border-right:1px solid #98c0f4;
+}
+
+.x-layout-panel-dragover {
+ border: 2px solid #6593cf;
+}
+.x-layout-panel-proxy {
+ background-image: url(/static/images/extjs/default/layout/gradient-bg.gif);
+ background-color:#c3daf9;
+ border:1px dashed #6593cf;
+ z-index:10001;
+ overflow:hidden;
+ position:absolute;
+ left:0;top:0;
+}
+.x-layout-slider {
+ z-index:15;
+ overflow:hidden;
+ position:absolute;
+}
+
+.x-scroller-up, .x-scroller-down {
+ background-color:#c3daf9;
+ border: 1px solid #6593cf;
+ border-top-color: #fff;
+ border-left-color: #fff;
+ border-right:0 none;
+ cursor:pointer;
+ overflow:hidden;
+ line-height:16px;
+}
+.x-scroller-down {
+ border-bottom: 0 none;
+ border-top: 1px solid #6593cf;
+}
+.x-scroller-btn-over {
+ background-color: #d9e8f8;
+}
+.x-scroller-btn-click {
+ background-color: #AECEF7;
+}
+.x-scroller-btn-disabled {
+ cursor:default;
+ background-color: #c3daf9;
+ -moz-opacity: 0.3;
+ opacity:.30;
+ filter: alpha(opacity=30);
+}
+
+
+
+.x-reader .x-layout-panel-north {
+ border:0 none;
+}
+.x-reader .x-layout-panel-center{
+ border:0 none;
+}
+.x-reader .x-layout-nested-layout .x-layout-panel-center{
+ border:1px solid #99bbe8;
+ border-top:0 none;
+}
+.x-reader .x-layout-nested-layout .x-layout-panel-south{
+ border:1px solid #99bbe8;
+}
+.x-dlg-proxy {
+ background-image: url(/static/images/extjs/default/gradient-bg.gif);
+ background-color:#c3daf9;
+ border:1px solid #6593cf;
+ z-index:10001;
+ overflow:hidden;
+ position:absolute;
+ left:0;top:0;
+}
+.x-dlg-shadow{
+ background:#aaaaaa;
+ position:absolute;
+ left:0;top:0;
+}
+.x-dlg-focus{
+ -moz-outline:0 none;
+ outline:0 none;
+ width:0;
+ height:0;
+ overflow:hidden;
+ position:absolute;
+ top:0;
+ left:0;
+}
+.x-dlg-mask{
+ z-index:10000;
+ display:none;
+ position:absolute;
+ top:0;
+ left:0;
+ -moz-opacity: 0.5;
+ opacity:.50;
+ filter: alpha(opacity=50);
+ background-color:#CCC;
+}
+body.x-body-masked select {
+ visibility:hidden;
+}
+body.x-body-masked .x-dlg select {
+ visibility:visible;
+}
+.x-dlg{
+ z-index:10001;
+ overflow:hidden;
+ position:absolute;
+ left:300;top:0;
+}
+.x-dlg .x-dlg-hd {
+ background: url(/static/images/extjs/default/basic-dialog/hd-sprite.gif) repeat-x 0 -82px;
+ background-color:navy;
+ color:#FFF;
+ font:bold 12px "sans serif", tahoma, verdana, helvetica;
+ overflow:hidden;
+ padding:5px;
+ white-space: nowrap;
+}
+.x-dlg .x-dlg-hd-left {
+ background: url(/static/images/extjs/default/basic-dialog/hd-sprite.gif) no-repeat 0 -41px;
+ padding-left:3px;
+ margin:0;
+}
+.x-dlg .x-dlg-hd-right {
+ background: url(/static/images/extjs/default/basic-dialog/hd-sprite.gif) no-repeat right 0;
+ padding-right:3px;
+}
+.x-dlg .x-dlg-dlg-body{
+ background:url(/static/images/extjs/default/layout/gradient-bg.gif);
+ border:1px solid #6593cf;
+ border-top:0 none;
+ padding:10px;
+ position:absolute;
+ top:24px;left:0;
+ z-index:1;
+ overflow:hidden;
+}
+.x-dlg-collapsed .x-resizable-handle{
+ display:none;
+}
+.x-dlg .x-dlg-bd{
+ overflow:hidden;
+}
+.x-dlg .x-dlg-ft{
+ overflow:hidden;
+ padding:5px;
+ padding-bottom:0;
+}
+.x-dlg .x-tabs-body{
+ background:white;
+ overflow:auto;
+}
+.x-dlg .x-tabs-top .x-tabs-body{
+ border:1px solid #6593cf;
+ border-top:0 none;
+}
+.x-dlg .x-tabs-bottom .x-tabs-body{
+ border:1px solid #6593cf;
+ border-bottom:0 none;
+}
+.x-dlg .x-layout-container .x-tabs-body{
+ border:0 none;
+}
+.x-dlg .inner-tab{
+ margin:5px;
+}
+.x-dlg .x-dlg-ft .x-btn{
+ margin-right:5px;
+ float:right;
+ clear:none;
+}
+.x-dlg .x-dlg-ft .x-dlg-btns td {
+ border:0;
+ padding:0;
+}
+.x-dlg .x-dlg-ft .x-dlg-btns-right table{
+ float:right;
+ clear:none;
+}
+.x-dlg .x-dlg-ft .x-dlg-btns-left table{
+ float:left;
+ clear:none;
+}
+.x-dlg .x-dlg-ft .x-dlg-btns-center{
+ text-align:center;
+}
+.x-dlg .x-dlg-ft .x-dlg-btns-center table{
+ margin:0 auto;
+}
+.x-dlg-draggable .x-dlg-hd{
+ cursor:move;
+}
+.x-dlg-closable .x-dlg-hd{
+ padding-right:22px;
+}
+.x-dlg-toolbox {
+ position:absolute;
+ top:4px;
+ right:4px;
+ z-index:6;
+ width:40px;
+ cursor:default;
+ height:15px;
+ background:transparent;
+}
+.x-dlg .x-dlg-close, .x-dlg .x-dlg-collapse {
+ float:right;
+ height:15px;
+ width:15px;
+ margin:0;
+ margin-left:2px;
+ padding:0;
+ line-height:1px;
+ font-size:1px;
+ background-repeat:no-repeat;
+ cursor:pointer;
+ visibility:inherit;
+}
+.x-dlg .x-dlg-close {
+ background-image:url(/static/images/extjs/default/basic-dialog/close.gif);
+}
+.x-dlg .x-dlg-collapse {
+ background-image:url(/static/images/extjs/default/basic-dialog/collapse.gif);
+}
+.x-dlg-collapsed .x-dlg-collapse {
+ background-image:url(/static/images/extjs/default/basic-dialog/expand.gif);
+}
+.x-dlg .x-dlg-close-over, .x-dlg .x-dlg-collapse-over {
+
+}
+.x-dlg div.x-resizable-handle-east{
+ background-image:url(/static/images/extjs/default/basic-dialog/e-handle.gif);
+ border:0;
+ background-position:right;
+ margin-right:0;
+}
+.x-dlg div.x-resizable-handle-south{
+ background-image:url(/static/images/extjs/default/sizer/s-handle-dark.gif);
+ border:0;
+ height:6px;
+}
+.x-dlg div.x-resizable-handle-west{
+ background-image:url(/static/images/extjs/default/basic-dialog/e-handle.gif);
+ border:0;
+ background-position:1px;
+}
+.x-dlg div.x-resizable-handle-north{
+ background-image:url(/static/images/extjs/default/s.gif);
+ border:0;
+}
+.x-dlg div.x-resizable-handle-northeast, .ytheme-gray .x-dlg div.x-resizable-handle-northeast{
+ background-image:url(/static/images/extjs/default/s.gif);
+ border:0;
+}
+.x-dlg div.x-resizable-handle-northwest, .ytheme-gray .x-dlg div.x-resizable-handle-northwest{
+ background-image:url(/static/images/extjs/default/s.gif);
+ border:0;
+}
+.x-dlg div.x-resizable-handle-southeast{
+ background-image:url(/static/images/extjs/default/basic-dialog/se-handle.gif);
+ background-position: bottom right;
+ width:8px;
+ height:8px;
+ border:0;
+}
+.x-dlg div.x-resizable-handle-southwest{
+ background-image:url(/static/images/extjs/default/sizer/sw-handle-dark.gif);
+ background-position: top right;
+ margin-left:1px;
+ margin-bottom:1px;
+ border:0;
+}
+
+#x-msg-box .x-dlg-ft .x-btn{
+ float:none;
+ clear:none;
+ margin:0 3px;
+}
+
+#x-msg-box .x-dlg-bd {
+ padding:5px;
+ overflow:hidden !important;
+ font:normal 13px verdana,tahoma,sans-serif;
+}
+#x-msg-box .ext-mb-input {
+ margin-top:4px;
+ width:95%;
+}
+#x-msg-box .ext-mb-textarea {
+ margin-top:4px;
+ font:normal 13px verdana,tahoma,sans-serif;
+}
+#x-msg-box .ext-mb-progress-wrap {
+ margin-top:4px;
+ border:1px solid #6593cf;
+}
+#x-msg-box .ext-mb-progress {
+ height:18px;
+ background: #e0e8f3 url(/static/images/extjs/default/qtip/bg.gif) repeat-x;
+}
+#x-msg-box .ext-mb-progress-bar {
+ height:18px;
+ overflow:hidden;
+ width:0;
+ background:#8BB8F3;
+ border-top:1px solid #B2D0F7;
+ border-bottom:1px solid #65A1EF;
+ border-right:1px solid #65A1EF;
+}
+
+#x-msg-box .x-msg-box-wait {
+ background: transparent url(/static/images/extjs/default/grid/loading.gif) no-repeat left;
+ display:block;
+ width:300px;
+ padding-left:18px;
+ line-height:18px;
+}
+.x-dd-drag-proxy{
+ position:absolute;
+ left:0;top:0;
+ visibility:hidden;
+ z-index:15000;
+}
+.x-dd-drag-ghost{
+ color: black;
+ font: normal 11px arial, helvetica, sans-serif;
+ -moz-opacity: 0.85;
+ opacity:.85;
+ filter: alpha(opacity=85);
+ border-top:1px solid #dddddd;
+ border-left:1px solid #dddddd;
+ border-right:1px solid #bbbbbb;
+ border-bottom:1px solid #bbbbbb;
+ padding:3px;
+ padding-left:20px;
+ background-color:white;
+ white-space:nowrap;
+}
+.x-dd-drag-repair .x-dd-drag-ghost{
+ -moz-opacity: 0.4;
+ opacity:.4;
+ filter: alpha(opacity=40);
+ border:0 none;
+ padding:0;
+ background-color:transparent;
+}
+.x-dd-drag-repair .x-dd-drop-icon{
+ visibility:hidden;
+}
+.x-dd-drop-icon{
+ position:absolute;
+ top:3px;
+ left:3px;
+ display:block;
+ width:16px;
+ height:16px;
+ background-color:transparent;
+ background-position: center;
+ background-repeat: no-repeat;
+ z-index:1;
+}
+.x-dd-drop-nodrop .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/dd/drop-no.gif);
+}
+.x-dd-drop-ok .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/dd/drop-yes.gif);
+}
+.x-dd-drop-ok-add .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/dd/drop-add.gif);
+}
+.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{
+ border: 0 none;
+ height: 18px;
+ margin: 0;
+ padding: 0;
+ vertical-align: middle;
+ width: 16px;
+ background-repeat: no-repeat;
+}
+.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{
+ border: 0 none;
+ height: 18px;
+ margin: 0;
+ padding: 0;
+ vertical-align: middle;
+ width: 16px;
+ background-position:center;
+ background-repeat: no-repeat;
+}
+
+
+.x-tree-node-collapsed .x-tree-node-icon{
+ background-image:url(/static/images/extjs/default/tree/folder.gif);
+}
+.x-tree-node-expanded .x-tree-node-icon{
+ background-image:url(/static/images/extjs/default/tree/folder-open.gif);
+}
+.x-tree-node-leaf .x-tree-node-icon{
+ background-image:url(/static/images/extjs/default/tree/leaf.gif);
+}
+
+.x-tree-noicon .x-tree-node-icon{
+ width:0; height:0;
+}
+
+.x-tree-node-loading .x-tree-node-icon{
+ background-image:url(/static/images/extjs/default/tree/loading.gif) !important;
+}
+.x-tree-node-loading a span{
+ font-style: italic;
+ color:#444444;
+}
+
+
+.x-tree-lines .x-tree-elbow{
+ background-image:url(/static/images/extjs/default/tree/elbow.gif);
+}
+.x-tree-lines .x-tree-elbow-plus{
+ background-image:url(/static/images/extjs/default/tree/elbow-plus.gif);
+}
+.x-tree-lines .x-tree-elbow-minus{
+ background-image:url(/static/images/extjs/default/tree/elbow-minus.gif);
+}
+.x-tree-lines .x-tree-elbow-end{
+ background-image:url(/static/images/extjs/default/tree/elbow-end.gif);
+}
+.x-tree-lines .x-tree-elbow-end-plus{
+ background-image:url(/static/images/extjs/default/tree/elbow-end-plus.gif);
+}
+.x-tree-lines .x-tree-elbow-end-minus{
+ background-image:url(/static/images/extjs/default/tree/elbow-end-minus.gif);
+}
+.x-tree-lines .x-tree-elbow-line{
+ background-image:url(/static/images/extjs/default/tree/elbow-line.gif);
+}
+
+
+.x-tree-no-lines .x-tree-elbow{
+ background:transparent;
+}
+.x-tree-no-lines .x-tree-elbow-plus{
+ background-image:url(/static/images/extjs/default/tree/elbow-plus-nl.gif);
+}
+.x-tree-no-lines .x-tree-elbow-minus{
+ background-image:url(/static/images/extjs/default/tree/elbow-minus-nl.gif);
+}
+.x-tree-no-lines .x-tree-elbow-end{
+ background:transparent;
+}
+.x-tree-no-lines .x-tree-elbow-end-plus{
+ background-image:url(/static/images/extjs/default/tree/elbow-end-plus-nl.gif);
+}
+.x-tree-no-lines .x-tree-elbow-end-minus{
+ background-image:url(/static/images/extjs/default/tree/elbow-end-minus-nl.gif);
+}
+.x-tree-no-lines .x-tree-elbow-line{
+ background:transparent;
+}
+
+.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{
+ cursor:pointer;
+}
+.ext-ie ul.x-tree-node-ct{
+ font-size:0;
+ line-height:0;
+}
+.x-tree-node{
+ color: black;
+ font: normal 11px arial, tahoma, helvetica, sans-serif;
+ white-space: nowrap;
+}
+.x-tree-node a, .x-dd-drag-ghost a{
+ text-decoration:none;
+ color:black;
+ -khtml-user-select:none;
+ -moz-user-select:none;
+ -kthml-user-focus:normal;
+ -moz-user-focus:normal;
+ -moz-outline: 0 none;
+ outline:0 none;
+}
+.x-tree-node a span, .x-dd-drag-ghost a span{
+ text-decoration:none;
+ color:black;
+ padding:1px 3px 1px 2px;
+}
+.x-tree-node .x-tree-node-disabled a span{
+ color:gray !important;
+}
+.x-tree-node .x-tree-node-disabled .x-tree-node-icon{
+ -moz-opacity: 0.5;
+ opacity:.5;
+ filter: alpha(opacity=50);
+}
+.x-tree-node .x-tree-node-inline-icon{
+ background:transparent;
+}
+.x-tree-node a:hover, .x-dd-drag-ghost a:hover{
+ text-decoration:none;
+}
+.x-tree-node div.x-tree-drag-insert-below{
+ border-bottom:1px dotted #3366cc;
+}
+.x-tree-node div.x-tree-drag-insert-above{
+ border-top:1px dotted #3366cc;
+}
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{
+ border-bottom:0 none;
+}
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{
+ border-top:0 none;
+}
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{
+ border-bottom:2px solid #3366cc;
+}
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{
+ border-top:2px solid #3366cc;
+}
+.x-tree-node .x-tree-drag-append a span{
+ background:#dddddd;
+ border:1px dotted gray;
+}
+.x-tree-node .x-tree-selected a span{
+ background:#3366cc;
+ color:white;
+}
+.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{
+ display:none !important;
+}
+.x-tree-drop-ok-append .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/tree/drop-add.gif);
+}
+.x-tree-drop-ok-above .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/tree/drop-over.gif);
+}
+.x-tree-drop-ok-below .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/tree/drop-under.gif);
+}
+.x-tree-drop-ok-between .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/tree/drop-between.gif);
+}
+
+.x-tip{
+ position: absolute;
+ top: 0;
+ left:0;
+ visibility: hidden;
+ z-index: 20000;
+ border:0 none;
+}
+.x-tip .x-tip-close{
+ background-image: url(/static/images/extjs/default/qtip/close.gif);
+ height: 15px;
+ float:right;
+ width: 15px;
+ margin:0 0 2px 2px;
+ cursor:pointer;
+ display:none;
+}
+.x-tip .x-tip-top {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat 0 -12px;
+ height:6px;
+ overflow:hidden;
+}
+.x-tip .x-tip-top-left {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat 0 0;
+ padding-left:6px;
+ zoom:1;
+}
+.x-tip .x-tip-top-right {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat right 0;
+ padding-right:6px;
+ zoom:1;
+}
+.x-tip .x-tip-ft {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat 0 -18px;
+ height:6px;
+ overflow:hidden;
+}
+.x-tip .x-tip-ft-left {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat 0 -6px;
+ padding-left:6px;
+ zoom:1;
+}
+.x-tip .x-tip-ft-right {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat right -6px;
+ padding-right:6px;
+ zoom:1;
+}
+.x-tip .x-tip-bd {
+ border:0 none;
+ font: normal 11px tahoma,arial,helvetica,sans-serif;
+}
+.x-tip .x-tip-bd-left {
+ background: #fff url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat 0 -24px;
+ padding-left:6px;
+ zoom:1;
+}
+.x-tip .x-tip-bd-right {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat right -24px;
+ padding-right:6px;
+ zoom:1;
+}
+
+.x-tip h3 {
+ font: bold 12px tahoma,arial,helvetica,sans-serif;
+ margin:0;
+ padding:2px 2px;
+ color:#222;
+}
+.x-tip .x-tip-bd-inner {
+ margin:0 !important;
+ line-height:14px;
+ color:#222;
+ padding:0;
+ float:left;
+}
+
+
+.x-form-invalid-tip {
+}
+
+.x-form-invalid-tip .x-tip-top {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-top-left {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-top-right {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-ft {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-ft-left {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-ft-right {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-bd-left {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-bd-right {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-bd .x-tip-bd-inner {
+ padding-left:24px;
+ background:transparent url(/static/images/extjs/default/form/exclamation.gif) no-repeat 2px 2px;
+}
+.x-form-invalid-tip .x-tip-bd-inner {
+ padding:2px;
+}
+.x-date-picker {
+ border: 1px solid #1b376c;
+ border-top:0 none;
+ background:#fff;
+}
+.x-date-picker a {
+ -moz-outline:0 none;
+ outline:0 none;
+}
+.x-date-inner, .x-date-inner td, .x-date-inner th{
+ border-collapse:separate;
+}
+.x-date-middle,.x-date-left,.x-date-right {
+ background: url(/static/images/extjs/default/basic-dialog/hd-sprite.gif) repeat-x 0 -83px;
+ color:#FFF;
+ font:bold 11px "sans serif", tahoma, verdana, helvetica;
+ overflow:hidden;
+}
+
+.x-date-middle .x-btn-left,.x-date-middle .x-btn-center,.x-date-middle .x-btn-right{
+ background:transparent !important;
+ vertical-align:middle;
+}
+.x-date-middle .x-btn .x-btn-text {
+ color:#fff;
+}
+.x-date-middle .x-btn-with-menu .x-btn-center em {
+ background:transparent url(/static/images/extjs/default/toolbar/btn-arrow-light.gif) no-repeat right 0;
+}
+.x-date-right, .x-date-left {
+ width:18px;
+}
+.x-date-right{
+ text-align:right;
+}
+.x-date-middle {
+ padding-top:2px;padding-bottom:2px;
+}
+.x-date-right a, .x-date-left a{
+ display:block;
+ width:16px;
+ height:16px;
+ background-position: center;
+ background-repeat: no-repeat;
+ cursor:pointer;
+ -moz-opacity: 0.6;
+ opacity:.6;
+ filter: alpha(opacity=60);
+}
+.x-date-right a:hover, .x-date-left a:hover{
+ -moz-opacity: 1;
+ opacity:1;
+ filter: alpha(opacity=100);
+}
+.x-date-right a {
+ background-image: url(/static/images/extjs/default/shared/right-btn.gif);
+ margin-right:2px;
+}
+.x-date-left a{
+ background-image: url(/static/images/extjs/default/shared/left-btn.gif);
+ margin-left:2px;
+}
+table.x-date-inner {
+ width:100%;
+ table-layout:fixed;
+}
+.x-date-inner th {
+ width:25px;
+}
+.x-date-inner th {
+ background: #c3daf9;
+ text-align:right !important;
+ border-bottom: 1px solid #a3bad9;
+ font:normal 10px arial, helvetica,tahoma,sans-serif;
+ color:#233d6d;
+ cursor:default;
+ padding:0;
+ border-collapse:separate;
+}
+.x-date-inner th span {
+ display:block;
+ padding:2px;
+ padding-right:7px;
+}
+.x-date-inner td {
+ border: 1px solid #fff;
+ text-align:right;
+ padding:0;
+}
+.x-date-inner a {
+ padding:2px 5px;
+ display:block;
+ font:normal 11px arial, helvetica,tahoma,sans-serif;
+ text-decoration:none;
+ color:black;
+ text-align:right;
+ zoom:1;
+}
+.x-date-inner .x-date-active{
+ cursor:pointer;
+ color:black;
+}
+.x-date-inner .x-date-selected a{
+ background: #ddecfe;
+ border: 1px solid #a3bad9;
+ padding:1px 4px;
+}
+.x-date-inner .x-date-today a{
+ border: 1px solid darkred;
+ padding:1px 4px;
+}
+.x-date-inner .x-date-selected span{
+ font-weight:bold;
+}
+.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a {
+ color:#aaaaaa;
+}
+.x-date-bottom {
+ padding:4px;
+ border-top: 1px solid #a3bad9;
+ background: #c3daf9;
+}
+
+.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{
+ text-decoration:none;
+ color:black;
+ background: #ddecfe;
+}
+
+.x-date-inner .x-date-disabled a {
+ cursor:default;
+ background:#eeeeee;
+ color:#bbbbbb;
+}
+.x-date-mmenu{
+ background:#eeeeee !important;
+}
+.x-date-mmenu .x-menu-item {
+ font-size:10px;
+ padding:1px 24px 1px 4px;
+ white-space: nowrap;
+ color:#000;
+}
+.x-date-mmenu .x-menu-item .x-menu-item-icon {
+ width:10px;height:10px;margin-right:5px;
+ background-position:center -4px !important;
+}
+.x-menu {
+ border:1px solid;
+ border-color: #a3bad9 #8BB8F3 #8BB8F3 #a3bad9;
+ z-index: 15000;
+ background: #fff url(/static/images/extjs/default/menu/menu.gif) repeat-y;
+}
+.ext-ie .x-menu {
+ zoom:1;
+ overflow:hidden;
+}
+.x-menu-list{
+ border:1px solid #fff;
+}
+.x-menu li{
+ line-height:100%;
+}
+.x-menu li.x-menu-sep-li{
+ line-height:1px;
+}
+.x-menu-list-item{
+ font:normal 11px "Segoe UI",tahoma,"Lucida Sans Unicode",arial, sans-serif;
+ white-space: nowrap;
+ -moz-user-select: none;
+ -khtml-user-select: none;
+ display:block;
+ padding:1px;
+}
+.x-menu-item-arrow{
+ background:transparent url(/static/images/extjs/default/menu/menu-parent.gif) no-repeat right;
+}
+.x-menu-sep {
+ display:block;
+ font-size:1px;
+ background:#c3daf9;
+ margin: 3px 3px 3px 32px;
+ height:1px;
+}
+.x-menu-focus {
+ position:absolute;
+ left:0;
+ top:-5px;
+ width:0;
+ height:0;
+ line-height:1px;
+}
+.x-menu-item {
+ display:block;
+ line-height:14px;
+ padding:3px 21px 3px 3px;
+ white-space: nowrap;
+ text-decoration:none;
+ color:#233d6d;
+ -moz-outline: 0 none;
+ outline: 0 none;
+ cursor:pointer;
+}
+.x-menu-item-active {
+ color:#233d6d;
+ background:#c3daf9;
+ border:1px solid #8BB8F3;
+ padding:0;
+}
+.x-menu-item-icon {
+ border: 0 none;
+ height: 16px;
+ padding: 0;
+ vertical-align: middle;
+ width: 16px;
+ margin: 0 11px 0 0;
+ background-position:center;
+}
+
+.x-menu-check-item .x-menu-item-icon{
+ background: transparent url(/static/images/extjs/default/menu/unchecked.gif) no-repeat center;
+}
+
+.x-menu-item-checked .x-menu-item-icon{
+ background-image:url(/static/images/extjs/default/menu/checked.gif);
+}
+.x-menu-group-item .x-menu-item-icon{
+ background: transparent;
+}
+
+.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{
+ background: transparent url(/static/images/extjs/default/menu/group-checked.gif) no-repeat center;
+}
+
+.x-menu-plain {
+ background:#fff;
+}
+.x-menu-date-item{
+ padding:0;
+}
+
+.x-menu .x-color-palette, .x-menu .x-date-picker{
+ margin-left:32px;
+ margin-right:4px;
+}
+.x-menu .x-date-picker{
+ border:1px solid #a3bad9;
+ margin-top:2px;
+ margin-bottom:2px;
+}
+.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{
+ margin:0;
+ border:0 none;
+}
+
+
+
+.x-box-tl {
+ background: transparent url(/static/images/extjs/default/box/corners.gif) no-repeat 0 0;
+ zoom:1;
+}
+
+.x-box-tc {
+ height: 8px;
+ background: transparent url(/static/images/extjs/default/box/tb.gif) repeat-x 0 0;
+ overflow: hidden;
+}
+
+.x-box-tr {
+ background: transparent url(/static/images/extjs/default/box/corners.gif) no-repeat right -8px;
+}
+
+.x-box-ml {
+ background: transparent url(/static/images/extjs/default/box/l.gif) repeat-y 0;
+ padding-left: 4px;
+ overflow: hidden;
+ zoom:1;
+}
+
+.x-box-mc {
+ background: #eee url(/static/images/extjs/default/box/tb.gif) repeat-x 0 -16px;
+ padding: 4px 10px;
+ font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;
+ color: #393939;
+ font-size: 12px;
+}
+
+.x-box-mc h3 {
+ font-size: 14px;
+ font-weight: bold;
+ margin: 0 0 4 0;
+ zoom:1;
+}
+
+.x-box-mr {
+ background: transparent url(/static/images/extjs/default/box/r.gif) repeat-y right;
+ padding-right: 4px;
+ overflow: hidden;
+}
+
+.x-box-bl {
+ background: transparent url(/static/images/extjs/default/box/corners.gif) no-repeat 0 -16px;
+ zoom:1;
+}
+
+.x-box-bc {
+ background: transparent url(/static/images/extjs/default/box/tb.gif) repeat-x 0 -8px;
+ height: 8px;
+ overflow: hidden;
+}
+
+.x-box-br {
+ background: transparent url(/static/images/extjs/default/box/corners.gif) no-repeat right -24px;
+}
+
+.x-box-tl, .x-box-bl {
+ padding-left: 8px;
+ overflow: hidden;
+}
+
+.x-box-tr, .x-box-br {
+ padding-right: 8px;
+ overflow: hidden;
+}
+
+.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr {
+ background-image: url(/static/images/extjs/default/box/corners-blue.gif);
+}
+
+.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc {
+ background-image: url(/static/images/extjs/default/box/tb-blue.gif);
+}
+
+.x-box-blue .x-box-mc {
+ background-color: #c3daf9;
+}
+
+.x-box-blue .x-box-mc h3 {
+ color: #17385b;
+}
+
+.x-box-blue .x-box-ml {
+ background-image: url(/static/images/extjs/default/box/l-blue.gif);
+}
+
+.x-box-blue .x-box-mr {
+ background-image: url(/static/images/extjs/default/box/r-blue.gif);
+}
+#x-debug-browser .x-tree .x-tree-node a span {
+ color:#222297;
+ font-size:12px;
+ padding-top:2px;
+ font-family:"courier","courier new";
+ line-height:18px;
+}
+#x-debug-browser .x-tree a i {
+ color:#FF4545;
+ font-style:normal;
+}
+#x-debug-browser .x-tree a em {
+ color:#999;
+}
+#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{
+ background:#c3daf9;
+}
+#x-debug-browser pre, .x-debug-browser pre xmp {
+ font:normal 11px tahoma, arial, helvetica, sans-serif !important;
+ white-space: -moz-pre-wrap;
+ white-space: -pre-wrap;
+ white-space: -o-pre-wrap;
+ word-wrap: break-word;
+}
+#x-debug-browser pre {
+ display:block;
+ padding:5px !important;
+ border-bottom:1px solid #eeeeee !important;
+}
+#x-debug-browser pre xmp {
+ padding:0 !important;
+ margin:0 !important;
+}
+#x-debug-console .x-layout-panel-center, #x-debug-inspector .x-layout-panel-center {
+ border-right:1px solid #98c0f4;
+}
+#x-debug-console textarea {
+ border: 0 none;
+ font-size:12px;
+ font-family:"courier","courier new";
+ padding-top:4px;
+ padding-left:4px;
+}
+.x-debug-frame {
+ background:#eeeeee;
+ border:1px dashed #aaaaaa;
+}
+.x-combo-list {
+ border:1px solid #98c0f4;
+ background:#ddecfe;
+ zoom:1;
+ overflow:hidden;
+}
+.x-combo-list-inner {
+ overflow:auto;
+ background:white;
+ position:relative;
+}
+.x-combo-list-hd {
+ font:bold 11px tahoma, arial, helvetica, sans-serif;
+ color:#15428b;
+ background-image: url(/static/images/extjs/default/layout/panel-title-light-bg.gif);
+ border-bottom:1px solid #98c0f4;
+ padding:3px;
+}
+.x-resizable-pinned .x-combo-list-inner {
+ border-bottom:1px solid #98c0f4;
+}
+.x-combo-list-item {
+ font:normal 12px tahoma, arial, helvetica, sans-serif;
+ padding:2px;
+ border:1px solid #fff;
+ zoom:1;
+ white-space: nowrap;
+ overflow:hidden;
+ text-overflow: ellipsis;
+}
+.x-combo-list .x-combo-selected{
+ background-color: #c3daf9 !important;
+ cursor:pointer;
+ border:1px solid #336699;
+}
+.x-combo-noedit{
+ cursor:pointer;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/form.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/form.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,337 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+/* all fields */
+.x-form-field{
+ margin: 0 0 0 0;
+ font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+/* ---- text fields ---- */
+.x-form-text, textarea.x-form-field{
+ padding: 1px 3px;
+ background:#fff url(/static/images/extjs/default/form/text-bg.gif) repeat-x 0 0;
+ border: 1px solid #B5B8C8;
+}
+.x-form-text {
+ height:22px;
+ line-height:18px;
+ vertical-align:middle;
+}
+.ext-ie .x-form-text {
+ margin-top:-1px; /* ie bogus margin bug */
+ margin-bottom:-1px;
+ height:22px; /* ie quirks */
+ line-height:18px;
+}
+.ext-strict .x-form-text {
+ height:18px;
+}
+.ext-safari .x-form-text {
+ height:20px; /* safari always same size */
+}
+.ext-gecko .x-form-text {
+ padding-top:2px; /* FF won't center the text vertically */
+ padding-bottom:0;
+}
+/* select boxes */
+
+.x-form-select-one {
+ height:20px;
+ line-height:18px;
+ vertical-align:middle;
+ background-color:#fff; /* opera */
+ border: 1px solid #B5B8C8;
+}
+
+/* multi select boxes */
+
+/* --- TODO --- */
+
+/* checkboxes */
+
+/* --- TODO --- */
+
+/* radios */
+
+/* --- TODO --- */
+
+
+/* wrapped fields and triggers */
+
+.x-form-field-wrap {
+ position:relative;
+ zoom:1;
+ white-space: nowrap;
+}
+
+.x-editor .x-form-check-wrap {
+ background:#fff;
+}
+.x-form-field-wrap .x-form-trigger{
+ width:17px;
+ height:21px;
+ border:0;
+ background:transparent url(/static/images/extjs/default/form/trigger.gif) no-repeat 0 0;
+ cursor:pointer;
+ border-bottom: 1px solid #B5B8C8;
+ position:absolute;
+ top:0;
+}
+.ext-safari .x-form-field-wrap .x-form-trigger{
+ height:19px; /* safari doesn't allow height adjustments to the fields, so adjust trigger */
+}
+.x-form-field-wrap .x-form-trigger-over{
+ background-position:-17px 0;
+}
+.x-form-field-wrap .x-form-trigger-click{
+ background-position:-34px 0;
+}
+.x-item-disabled .x-form-trigger-over{
+ background-position:0 0 !important;
+}
+.x-item-disabled .x-form-trigger-click{
+ background-position:0 0 !important;
+}
+.x-form-field-wrap .x-form-date-trigger{
+ background:transparent url(/static/images/extjs/default/form/date-trigger.gif) no-repeat 0 0;
+ cursor:pointer;
+}
+.ext-safari .x-form-field-wrap .x-form-date-trigger{
+ right:0;
+}
+
+/* field focus style */
+.x-form-focus{
+ border: 1px solid #7eadd9;
+}
+
+/* invalid fields */
+.x-form-invalid{
+ background:#fff url(/static/images/extjs/default/grid/invalid_line.gif) repeat-x bottom;
+ border: 1px solid #dd7870;
+}
+.ext-safari .x-form-invalid{
+ background-color:#ffeeee;
+ border: 1px solid #ff7870;
+}
+
+/* editors */
+
+.x-editor {
+ visibility:hidden;
+ padding:0;
+ margin:0;
+}
+.x-form-check-wrap {
+ line-height:18px;
+}
+.ext-ie .x-form-check-wrap input {
+ width:15px;
+ height:15px;
+}
+.x-editor .x-form-check-wrap {
+ padding:3px;
+}
+.x-editor .x-form-checkbox {
+ height:13px;
+ border: 0 none;
+}
+/* If you override the default field font above, you would need to change this font as well */
+.x-form-grow-sizer {
+ font:normal 12px tahoma, arial, helvetica, sans-serif;
+ left: -10000px;
+ padding: 8px 3px;
+ position: absolute;
+ visibility:hidden;
+ top: -10000px;
+ white-space: pre-wrap;
+ white-space: -moz-pre-wrap;
+ white-space: -pre-wrap;
+ white-space: -o-pre-wrap;
+ word-wrap: break-word;
+ zoom:1;
+}
+
+/* This CSS is not final and is subject to change - jvs 03/07/07 */
+
+.x-form-item {
+ font:normal 12px tahoma, arial, helvetica, sans-serif;
+ display:block;
+ margin-bottom:4px;
+}
+
+.x-form-item label {
+ display:block;
+ float:left;
+ width:100px;
+ padding:3px;
+ padding-left:0;
+ clear:left;
+}
+
+.x-form-element {
+ padding-left:105px;
+ position:relative;
+}
+
+.x-form-invalid-msg {
+ color:#ee0000;
+ padding:2px;
+ padding-left:18px;
+ font:normal 11px tahoma, arial, helvetica, sans-serif;
+ background: transparent url(/static/images/extjs/default/shared/warning.gif) no-repeat 0 2px;
+ line-height:16px;
+ width:200px;
+}
+
+.x-form-label-right label {
+ text-align:right;
+}
+
+.x-form-label-top .x-form-item label {
+ width:auto;
+ float:none;
+ clear:none;
+ display:inline;
+ margin-bottom:4px;
+}
+.x-form-label-top .x-form-element {
+ padding-left:0;
+ padding-top:4px;
+}
+.x-form-label-top .x-form-item {
+ padding-bottom:4px;
+}
+.x-form fieldset {
+ border:1px solid #B5B8C8;
+ padding:10px 10px 5px 10px;
+ margin-bottom:10px;
+}
+.x-form fieldset legend {
+ font:bold 11px tahoma, arial, helvetica, sans-serif;
+ color:#15428b;
+}
+.ext-ie .x-form fieldset legend {
+ margin-bottom:10px;
+}
+.x-form-empty-field {
+ color:gray;
+}
+/* Editor small font for grid, toolbar and tree */
+.x-small-editor .x-form-field {
+ font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+.x-small-editor .x-form-text {
+ height:20px;
+ line-height:16px;
+ vertical-align:middle;
+}
+.ext-ie .x-small-editor .x-form-text {
+ margin-top:-1px !important; /* ie bogus margin bug */
+ margin-bottom:-1px !important;
+ height:20px !important; /* ie quirks */
+ line-height:16px !important;
+}
+.ext-strict .x-small-editor .x-form-text {
+ height:16px !important;
+}
+.ext-safari .x-small-editor .x-form-field {
+ /* safari text field will not size so needs bigger font */
+ font:normal 12px arial, tahoma, helvetica, sans-serif;
+}
+.ext-ie .x-small-editor .x-form-text {
+ height:20px;
+ line-height:16px;
+}
+.ext-border-box .x-small-editor .x-form-text {
+ height:20px;
+}
+
+.x-small-editor .x-form-select-one {
+ height:20px;
+ line-height:16px;
+ vertical-align:middle;
+}
+.x-small-editor .x-form-num-field {
+ text-align:right;
+}
+.x-small-editor .x-form-field-wrap .x-form-trigger{
+ height:19px;
+}
+
+
+.x-form-clear {
+ clear:both;
+ height:0;
+ overflow:hidden;
+ line-height:0;
+ font-size:0;
+}
+.x-form-clear-left {
+ clear:left;
+ height:0;
+ overflow:hidden;
+ line-height:0;
+ font-size:0;
+}
+
+.x-form-cb-label {
+ width:'auto' !important;
+ float:none !important;
+ clear:none !important;
+ display:inline !important;
+ margin-left:4px;
+}
+
+.x-form-column {
+ float:left;
+ padding:0;
+ margin:0;
+ width:48%;
+ overflow:hidden;
+ zoom:1;
+}
+
+/* buttons */
+.x-form .x-form-btns-ct .x-btn{
+ float:right;
+ clear:none;
+}
+.x-form .x-form-btns-ct .x-form-btns td {
+ border:0;
+ padding:0;
+}
+.x-form .x-form-btns-ct .x-form-btns-right table{
+ float:right;
+ clear:none;
+}
+.x-form .x-form-btns-ct .x-form-btns-left table{
+ float:left;
+ clear:none;
+}
+.x-form .x-form-btns-ct .x-form-btns-center{
+ text-align:center; /*ie*/
+}
+.x-form .x-form-btns-ct .x-form-btns-center table{
+ margin:0 auto; /*everyone else*/
+}
+.x-form .x-form-btns-ct table td.x-form-btn-td{
+ padding:3px;
+}
+
+.x-form-invalid-icon {
+ width:16px;
+ height:18px;
+ visibility:hidden;
+ position:absolute;
+ left:0;
+ top:0;
+ display:block;
+ background:transparent url(/static/images/extjs/default/form/exclamation.gif) no-repeat 0 2px;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/grid.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/grid.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,295 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+/* Grid2 styles */
+.x-grid {
+ position:relative;
+ overflow:hidden;
+ background:#fff;
+}
+.x-grid-scroller {
+ overflow:auto;
+}
+.x-grid-viewport, .x-grid-locked{
+ position:absolute;
+ left:0; top: 0;
+ z-index:2;
+ overflow:hidden;
+ visibility:hidden;
+}
+.x-grid-cell-inner, .x-grid-hd-inner{
+ overflow:hidden;
+ -o-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+}
+.x-grid-hd-row td, .x-grid-row td{
+ font:normal 11px arial, tahoma, helvetica, sans-serif;
+ line-height:13px;
+ white-space: nowrap;
+ vertical-align: top;
+ -moz-outline: none;
+ -moz-user-focus: normal;
+}
+.x-grid-hd-row td {
+ line-height:14px;
+}
+.x-grid-col {
+ border-right: 1px solid #ebebeb;
+ border-bottom: 1px solid #ebebeb;
+}
+/* Locked styles */
+
+.x-grid-locked .x-grid-body td {
+ background: #FBFDFF;
+ border-right: 1px solid #deecfd;
+ border-bottom: 1px solid #deecfd !important;
+}
+.x-grid-locked .x-grid-body td .x-grid-cell-inner {
+ border-top:0 none;
+}
+.x-grid-locked .x-grid-row-alt td{
+ background: #F5FAFE;
+}
+
+.x-grid-locked .x-grid-header table{
+ border-right:1px solid transparent;
+}
+.x-grid-locked .x-grid-body table{
+ border-right:1px solid #c3daf9;
+}
+
+.x-grid-locked .x-grid-body td .x-grid-cell-inner {
+
+}
+.x-grid-row {
+ cursor: default;
+}
+.x-grid-row-alt{
+ background:#f1f1f1;
+}
+.x-grid-row-over td{
+ background:#d9e8fb;
+}
+.x-grid-resize-proxy {
+ width:3px;
+ background:#cccccc;
+ cursor: e-resize;
+ cursor: col-resize;
+ position:absolute;
+ top:0;
+ height:100px;
+ overflow:hidden;
+ visibility:hidden;
+ border:0 none;
+ z-index:7;
+}
+.x-grid-focus {
+ position:absolute;
+ top:0;
+ -moz-outline:0 none;
+ outline:0 none;
+ -moz-user-select: normal;
+ -khtml-user-select: normal;
+}
+
+/* header styles */
+.x-grid-header{
+ background: #ebeadb url(/static/images/extjs/default/grid/grid-hrow.gif) repeat-x;
+ overflow:hidden;
+ position:relative;
+ cursor:default;
+ width:100%;
+}
+.x-grid-hd-row{
+ height:22px;
+}
+.x-grid-hd {
+ padding-right:1px;
+}
+.x-grid-hd-over .x-grid-hd-inner {
+ border-bottom: 1px solid #c3daf9;
+}
+.x-grid-hd-over .x-grid-hd-text {
+ background: #fafafa url(/static/images/extjs/default/grid/grid-hrow.gif) repeat-x 0 1px;
+ padding-bottom:1px;
+ border-bottom: 1px solid #b3cae9;
+}
+.x-grid-sort-icon{
+ background-repeat: no-repeat;
+ display: none;
+ height: 4px;
+ width: 13px;
+ margin-left:3px;
+ vertical-align: middle;
+}
+.x-grid-header .sort-asc .x-grid-sort-icon {
+ background-image: url(/static/images/extjs/default/grid/sort_asc.gif);
+ display: inline;
+}
+.x-grid-header .sort-desc .x-grid-sort-icon {
+ background-image: url(/static/images/extjs/default/grid/sort_desc.gif);
+ display: inline;
+}
+
+/* Body Styles */
+.x-grid-body {
+ overflow:hidden;
+ position:relative;
+ width:100%;
+ zoom:1;
+}
+
+.x-grid-cell-text,.x-grid-hd-text {
+ display: block;
+ padding: 3px 5px 3px 5px;
+ -moz-user-select: none;
+ -khtml-user-select: none;
+ color:black;
+}
+.x-grid-hd-text {
+ padding-top:4px;
+}
+.x-grid-split {
+ background-image: url(/static/images/extjs/default/grid/grid-split.gif);
+ background-position: center;
+ background-repeat: no-repeat;
+ cursor: e-resize;
+ cursor: col-resize;
+ display: block;
+ font-size: 1px;
+ height: 16px;
+ overflow: hidden;
+ position: absolute;
+ top: 2px;
+ width: 6px;
+ z-index: 3;
+}
+
+.x-grid-hd-text {
+ color:#15428b;
+}
+/* Column Reorder DD */
+.x-dd-drag-proxy .x-grid-hd-inner{
+ background: #ebeadb url(/static/images/extjs/default/grid/grid-hrow.gif) repeat-x;
+ height:22px;
+ width:120px;
+}
+
+.col-move-top, .col-move-bottom{
+ width:9px;
+ height:9px;
+ position:absolute;
+ top:0;
+ line-height:1px;
+ font-size:1px;
+ overflow:hidden;
+ visibility:hidden;
+ z-index:20000;
+}
+.col-move-top{
+ background:transparent url(/static/images/extjs/default/grid/col-move-top.gif) no-repeat left top;
+}
+.col-move-bottom{
+ background:transparent url(/static/images/extjs/default/grid/col-move-bottom.gif) no-repeat left top;
+}
+
+/* Selection Styles */
+.x-grid-row-selected td, .x-grid-locked .x-grid-row-selected td{
+ background-color: #316ac5 !important;
+ color: white;
+}
+.x-grid-row-selected span, .x-grid-row-selected b, .x-grid-row-selected div, .x-grid-row-selected strong, .x-grid-row-selected i{
+ color: white !important;
+}
+.x-grid-row-selected .x-grid-cell-text{
+ color: white;
+}
+.x-grid-cell-selected{
+ background-color: #316ac5 !important;
+ color: white;
+}
+.x-grid-cell-selected span{
+ color: white !important;
+}
+.x-grid-cell-selected .x-grid-cell-text{
+ color: white;
+}
+
+.x-grid-locked td.x-grid-row-marker, .x-grid-locked .x-grid-row-selected td.x-grid-row-marker{
+ background: #ebeadb url(/static/images/extjs/default/grid/grid-hrow.gif) repeat-x 0 bottom !important;
+ vertical-align:middle !important;
+ color:black;
+ padding:0;
+ border-top:1px solid white;
+ border-bottom:none !important;
+ border-right:1px solid #6fa0df !important;
+ text-align:center;
+}
+.x-grid-locked td.x-grid-row-marker div, .x-grid-locked .x-grid-row-selected td.x-grid-row-marker div{
+ padding:0 4px;
+ color:#15428b !important;
+ text-align:center;
+}
+
+/* dirty cells */
+.x-grid-dirty-cell {
+ background: transparent url(/static/images/extjs/default/grid/dirty.gif) no-repeat 0 0;
+}
+
+/* Grid Toolbars */
+.x-grid-topbar, .x-grid-bottombar{
+ font:normal 11px arial, tahoma, helvetica, sans-serif;
+ overflow:hidden;
+ display:none;
+ zoom:1;
+ position:relative;
+}
+.x-grid-topbar .x-toolbar{
+ border-right:0 none;
+}
+.x-grid-bottombar .x-toolbar{
+ border-right:0 none;
+ border-bottom:0 none;
+ border-top:1px solid #a9bfd3;
+}
+/* Props Grid Styles */
+.x-props-grid .x-grid-cell-selected .x-grid-cell-text{
+ background-color: #316ac5 !important;
+}
+.x-props-grid .x-grid-col-value .x-grid-cell-text{
+ background-color: white;
+}
+.x-props-grid .x-grid-col-name{
+ background-color: #c3daf9;
+}
+.x-props-grid .x-grid-col-name .x-grid-cell-text{
+ background-color: white;
+ margin-left:10px;
+}
+.x-props-grid .x-grid-split-value {
+ visibility:hidden;
+}
+
+/* header menu */
+.xg-hmenu-sort-asc .x-menu-item-icon{
+ background-image: url(/static/images/extjs/default/grid/hmenu-asc.gif);
+}
+.xg-hmenu-sort-desc .x-menu-item-icon{
+ background-image: url(/static/images/extjs/default/grid/hmenu-desc.gif);
+}
+.xg-hmenu-lock .x-menu-item-icon{
+ background-image: url(/static/images/extjs/default/grid/hmenu-lock.gif);
+}
+.xg-hmenu-unlock .x-menu-item-icon{
+ background-image: url(/static/images/extjs/default/grid/hmenu-unlock.gif);
+}
+
+/* dd */
+.x-dd-drag-ghost .x-grid-dd-wrap {
+ padding:1px 3px 3px 1px;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/layout.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/layout.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,252 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-layout-container{
+ width:100%;
+ height:100%;
+ overflow:hidden;
+ background-color:#c3daf9;
+}
+.x-layout-container .x-layout-tabs-body{
+ border:0 none;
+}
+.x-layout-collapsed{
+ position:absolute;
+ left:-10000px;
+ top:-10000px;
+ visibility:hidden;
+ background-color:#c3daf9;
+ width:20px;
+ height:20px;
+ overflow:hidden;
+ border:1px solid #98c0f4;
+ z-index:20;
+}
+.ext-border-box .x-layout-collapsed{
+ width:22px;
+ height:22px;
+}
+.x-layout-collapsed-over{
+ cursor:pointer;
+ background-color:#d9e8fb;
+}
+.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{
+ position:absolute;
+ top:0;
+ left:0;
+ width:20px;
+ height:20px;
+}
+.x-layout-collapsed-north .x-layout-collapsed-tools, .x-layout-collapsed-south .x-layout-collapsed-tools{
+ position:absolute;
+ top:0;
+ right:0;
+ width:20px;
+ height:20px;
+}
+.x-layout-collapsed .x-layout-tools-button{
+ margin:0;
+}
+.x-layout-collapsed .x-layout-tools-button-inner{
+ width:16px;
+ height:16px;
+}
+.x-layout-inactive-content{
+ position:absolute;
+ left:-10000px;
+ top:-10000px;
+ visibility:hidden;
+}
+.x-layout-active-content{
+ visibility:visible;
+}
+.x-layout-panel{
+ position:absolute;border:1px solid #98c0f4;overflow:hidden;background-color:white;
+}
+.x-layout-panel-east, .x-layout-panel-west {
+ z-index:10;
+}
+.x-layout-panel-north, .x-layout-panel-south {
+ z-index:11;
+}
+.x-layout-collapsed-north, .x-layout-collapsed-south, .x-layout-collapsed-east, .x-layout-collapsed-west {
+ z-index:12;
+}
+.x-layout-panel-body{
+ overflow:hidden;
+}
+.x-layout-grid-wrapper{
+
+}
+.x-layout-split{
+ position:absolute;
+ height:5px;
+ width:5px;
+ line-height:1px;
+ font-size:1px;
+ z-index:3;
+ background-color:#c3daf9;
+}
+.x-layout-panel-hd{
+ background-image: url(/static/images/extjs/default/layout/panel-title-light-bg.gif);
+ color: black;
+ border-bottom:1px solid #98c0f4;
+ position:relative;
+}
+.x-layout-panel-hd-text{
+ font:normal 11px tahoma, verdana, helvetica;
+ padding: 4px;
+ padding-left: 4px;
+ display:block;
+ white-space:nowrap;
+}
+.x-layout-panel-hd-tools{
+ position:absolute;
+ right:0;
+ top:0;
+ text-align:right;
+ padding-top:2px;
+ padding-right:2px;
+ width:60px;
+}
+.x-layout-tools-button{
+ z-index:6;
+ padding:2px;
+ cursor:pointer;
+ float:right;
+}
+.x-layout-tools-button-over{
+ padding:1px;
+ border:1px solid #98c0f4;
+ background-color:white;
+}
+.x-layout-tools-button-inner{
+ height:12px;
+ width:12px;
+ line-height:1px;
+ font-size:1px;
+ background-repeat:no-repeat;
+ background-position:center;
+}
+.x-layout-close{
+ background-image:url(/static/images/extjs/default/layout/panel-close.gif);
+}
+.x-layout-stick{
+ background-image:url(/static/images/extjs/default/layout/stick.gif);
+}
+.x-layout-collapse-west,.x-layout-expand-east{
+ background-image:url(/static/images/extjs/default/layout/collapse.gif);
+}
+.x-layout-expand-west,.x-layout-collapse-east{
+ background-image:url(/static/images/extjs/default/layout/expand.gif);
+}
+.x-layout-collapse-north,.x-layout-expand-south{
+ background-image:url(/static/images/extjs/default/layout/ns-collapse.gif);
+}
+.x-layout-expand-north,.x-layout-collapse-south{
+ background-image:url(/static/images/extjs/default/layout/ns-expand.gif);
+}
+.x-layout-split-h{
+ background-image:url(/static/images/extjs/default/sizer/e-handle.gif);
+ background-position: left;
+}
+.x-layout-split-v{
+ background-image:url(/static/images/extjs/default/sizer/s-handle.gif);
+ background-position: top;
+}
+.x-layout-panel .x-tabs-wrap{
+ background:url(/static/images/extjs/default/layout/gradient-bg.gif);
+}
+.x-layout-panel .x-tabs-body {
+ background-color:white;
+ overflow:auto;height:100%;
+}
+.x-layout-component-panel, .x-layout-nested-layout {
+ position:relative;
+ padding:0;
+ overflow:hidden;
+ width:200px;
+ height:200px;
+}
+.x-layout-nested-layout .x-layout-panel {
+ border:0 none;
+}
+.x-layout-nested-layout .x-layout-panel-north {
+ border-bottom:1px solid #98c0f4;
+}
+.x-layout-nested-layout .x-layout-panel-south {
+ border-top:1px solid #98c0f4;
+}
+.x-layout-nested-layout .x-layout-panel-east {
+ border-left:1px solid #98c0f4;
+}
+.x-layout-nested-layout .x-layout-panel-west {
+ border-right:1px solid #98c0f4;
+}
+
+.x-layout-panel-dragover {
+ border: 2px solid #6593cf;
+}
+.x-layout-panel-proxy {
+ background-image: url(/static/images/extjs/default/layout/gradient-bg.gif);
+ background-color:#c3daf9;
+ border:1px dashed #6593cf;
+ z-index:10001;
+ overflow:hidden;
+ position:absolute;
+ left:0;top:0;
+}
+.x-layout-slider {
+ z-index:15;
+ overflow:hidden;
+ position:absolute;
+}
+
+.x-scroller-up, .x-scroller-down {
+ background-color:#c3daf9;
+ border: 1px solid #6593cf;
+ border-top-color: #fff;
+ border-left-color: #fff;
+ border-right:0 none;
+ cursor:pointer;
+ overflow:hidden;
+ line-height:16px;
+}
+.x-scroller-down {
+ border-bottom: 0 none;
+ border-top: 1px solid #6593cf;
+}
+.x-scroller-btn-over {
+ background-color: #d9e8f8;
+}
+.x-scroller-btn-click {
+ background-color: #AECEF7;
+}
+.x-scroller-btn-disabled {
+ cursor:default;
+ background-color: #c3daf9;
+ -moz-opacity: 0.3;
+ opacity:.30;
+ filter: alpha(opacity=30);
+}
+
+/* Reader Layout */
+
+.x-reader .x-layout-panel-north {
+ border:0 none;
+}
+.x-reader .x-layout-panel-center{
+ border:0 none;
+}
+.x-reader .x-layout-nested-layout .x-layout-panel-center{
+ border:1px solid #99bbe8;
+ border-top:0 none;
+}
+.x-reader .x-layout-nested-layout .x-layout-panel-south{
+ border:1px solid #99bbe8;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/menu.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/menu.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,115 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-menu {
+ border:1px solid;
+ border-color: #a3bad9 #8BB8F3 #8BB8F3 #a3bad9;
+ z-index: 15000;
+ background: #fff url(/static/images/extjs/default/menu/menu.gif) repeat-y;
+}
+.ext-ie .x-menu {
+ zoom:1;
+ overflow:hidden;
+}
+.x-menu-list{
+ border:1px solid #fff;
+}
+.x-menu li{
+ line-height:100%;
+}
+.x-menu li.x-menu-sep-li{
+ line-height:1px;
+}
+.x-menu-list-item{
+ font:normal 11px "Segoe UI",tahoma,"Lucida Sans Unicode",arial, sans-serif;
+ white-space: nowrap;
+ -moz-user-select: none;
+ -khtml-user-select: none;
+ display:block;
+ padding:1px;
+}
+.x-menu-item-arrow{
+ background:transparent url(/static/images/extjs/default/menu/menu-parent.gif) no-repeat right;
+}
+.x-menu-sep {
+ display:block;
+ font-size:1px;
+ background:#c3daf9;
+ margin: 3px 3px 3px 32px;
+ height:1px;
+}
+.x-menu-focus {
+ position:absolute;
+ left:0;
+ top:-5px;
+ width:0;
+ height:0;
+ line-height:1px;
+}
+.x-menu-item {
+ display:block;
+ line-height:14px;
+ padding:3px 21px 3px 3px;
+ white-space: nowrap;
+ text-decoration:none;
+ color:#233d6d;
+ -moz-outline: 0 none;
+ outline: 0 none;
+ cursor:pointer;
+}
+.x-menu-item-active {
+ color:#233d6d;
+ background:#c3daf9;
+ border:1px solid #8BB8F3;
+ padding:0;
+}
+.x-menu-item-icon {
+ border: 0 none;
+ height: 16px;
+ padding: 0;
+ vertical-align: middle;
+ width: 16px;
+ margin: 0 11px 0 0;
+ background-position:center;
+}
+
+.x-menu-check-item .x-menu-item-icon{
+ background: transparent url(/static/images/extjs/default/menu/unchecked.gif) no-repeat center;
+}
+
+.x-menu-item-checked .x-menu-item-icon{
+ background-image:url(/static/images/extjs/default/menu/checked.gif);
+}
+.x-menu-group-item .x-menu-item-icon{
+ background: transparent;
+}
+
+.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{
+ background: transparent url(/static/images/extjs/default/menu/group-checked.gif) no-repeat center;
+}
+
+.x-menu-plain {
+ background:#fff;
+}
+.x-menu-date-item{
+ padding:0;
+}
+
+.x-menu .x-color-palette, .x-menu .x-date-picker{
+ margin-left:32px;
+ margin-right:4px;
+}
+.x-menu .x-date-picker{
+ border:1px solid #a3bad9;
+ margin-top:2px;
+ margin-bottom:2px;
+}
+.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{
+ margin:0;
+ border:0 none;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/qtips.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/qtips.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,119 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-tip{
+ position: absolute;
+ top: 0;
+ left:0;
+ visibility: hidden;
+ z-index: 20000;
+ border:0 none;
+}
+.x-tip .x-tip-close{
+ background-image: url(/static/images/extjs/default/qtip/close.gif);
+ height: 15px;
+ float:right;
+ width: 15px;
+ margin:0 0 2px 2px;
+ cursor:pointer;
+ display:none;
+}
+.x-tip .x-tip-top {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat 0 -12px;
+ height:6px;
+ overflow:hidden;
+}
+.x-tip .x-tip-top-left {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat 0 0;
+ padding-left:6px;
+ zoom:1;
+}
+.x-tip .x-tip-top-right {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat right 0;
+ padding-right:6px;
+ zoom:1;
+}
+.x-tip .x-tip-ft {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat 0 -18px;
+ height:6px;
+ overflow:hidden;
+}
+.x-tip .x-tip-ft-left {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat 0 -6px;
+ padding-left:6px;
+ zoom:1;
+}
+.x-tip .x-tip-ft-right {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat right -6px;
+ padding-right:6px;
+ zoom:1;
+}
+.x-tip .x-tip-bd {
+ border:0 none;
+ font: normal 11px tahoma,arial,helvetica,sans-serif;
+}
+.x-tip .x-tip-bd-left {
+ background: #fff url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat 0 -24px;
+ padding-left:6px;
+ zoom:1;
+}
+.x-tip .x-tip-bd-right {
+ background: transparent url(/static/images/extjs/default/qtip/tip-sprite.gif) no-repeat right -24px;
+ padding-right:6px;
+ zoom:1;
+}
+
+.x-tip h3 {
+ font: bold 12px tahoma,arial,helvetica,sans-serif;
+ margin:0;
+ padding:2px 2px;
+ color:#222;
+}
+.x-tip .x-tip-bd-inner {
+ margin:0 !important;
+ line-height:14px;
+ color:#222;
+ padding:0;
+ float:left;
+}
+
+
+.x-form-invalid-tip {
+}
+
+.x-form-invalid-tip .x-tip-top {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-top-left {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-top-right {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-ft {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-ft-left {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-ft-right {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-bd-left {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-bd-right {
+ background-image: url(/static/images/extjs/default/form/error-tip-corners.gif);
+}
+.x-form-invalid-tip .x-tip-bd .x-tip-bd-inner {
+ padding-left:24px;
+ background:transparent url(/static/images/extjs/default/form/exclamation.gif) no-repeat 2px 2px;
+}
+.x-form-invalid-tip .x-tip-bd-inner {
+ padding:2px;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/reset-min.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/reset-min.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,9 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';}
\ No newline at end of file
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/resizable.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/resizable.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,143 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-resizable-handle {
+ position:absolute;
+ z-index:100;
+ /* ie needs these */
+ font-size:1px;
+ line-height:6px;
+ overflow:hidden;
+ background:white;
+ filter:alpha(opacity=0);
+ opacity:0;
+ zoom:1;
+}
+.x-resizable-handle-east{
+ width:6px;
+ cursor:e-resize;
+ right:0;
+ top:0;
+ height:100%;
+}
+.ext-ie .x-resizable-handle-east {
+ margin-right:-1px; /*IE rounding error*/
+}
+.x-resizable-handle-south{
+ width:100%;
+ cursor:s-resize;
+ left:0;
+ bottom:0;
+ height:6px;
+}
+.ext-ie .x-resizable-handle-south {
+ margin-bottom:-1px; /*IE rounding error*/
+}
+.x-resizable-handle-west{
+ width:6px;
+ cursor:w-resize;
+ left:0;
+ top:0;
+ height:100%;
+}
+.x-resizable-handle-north{
+ width:100%;
+ cursor:n-resize;
+ left:0;
+ top:0;
+ height:6px;
+}
+.x-resizable-handle-southeast{
+ width:6px;
+ cursor:se-resize;
+ right:0;
+ bottom:0;
+ height:6px;
+ z-index:101;
+}
+.x-resizable-handle-northwest{
+ width:6px;
+ cursor:nw-resize;
+ left:0;
+ top:0;
+ height:6px;
+ z-index:101;
+}
+.x-resizable-handle-northeast{
+ width:6px;
+ cursor:ne-resize;
+ right:0;
+ top:0;
+ height:6px;
+ z-index:101;
+}
+.x-resizable-handle-southwest{
+ width:6px;
+ cursor:sw-resize;
+ left:0;
+ bottom:0;
+ height:6px;
+ z-index:101;
+}
+.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{
+ filter:alpha(opacity=100);
+ opacity:1;
+}
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east{
+ background:url(/static/images/extjs/default/sizer/e-handle.gif);
+ background-position: left;
+}
+.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west{
+ background:url(/static/images/extjs/default/sizer/e-handle.gif);
+ background-position: left;
+}
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south{
+ background:url(/static/images/extjs/default/sizer/s-handle.gif);
+ background-position: top;
+}
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{
+ background:url(/static/images/extjs/default/sizer/s-handle.gif);
+ background-position: top;
+}
+.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{
+ background:url(/static/images/extjs/default/sizer/se-handle.gif);
+ background-position: top left;
+}
+.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{
+ background:url(/static/images/extjs/default/sizer/nw-handle.gif);
+ background-position:bottom right;
+}
+.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{
+ background:url(/static/images/extjs/default/sizer/ne-handle.gif);
+ background-position: bottom left;
+}
+.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{
+ background:url(/static/images/extjs/default/sizer/sw-handle.gif);
+ background-position: top right;
+}
+.x-resizable-proxy{
+ border: 1px dashed #6593cf;
+ position:absolute;
+ overflow:hidden;
+ visibility:hidden;
+ left:0;top:0;
+ z-index:50000;
+}
+.x-resizable-overlay{
+ width:100%;
+ height:100%;
+ display:none;
+ position:absolute;
+ left:0;
+ top:0;
+ background:white;
+ z-index:200000;
+ -moz-opacity: 0;
+ opacity:0;
+ filter: alpha(opacity=0);
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/tabs.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/tabs.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,134 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-tabs-wrap {
+ border-bottom:1px solid #6593cf;
+ padding-top:2px;
+}
+.x-tabs-strip-wrap{
+ width:100%;
+}
+.x-tabs-wrap table{
+ position:relative;
+ top:0; left:0;
+}
+.x-tabs-strip td{
+ padding:0;
+ padding-left:2px;
+}
+.x-tabs-strip a, .x-tabs-strip span, .x-tabs-strip em {
+ display:block;
+}
+.x-tabs-strip a {
+ text-decoration:none !important;
+ -moz-outline: none;
+ outline: none;
+ cursor:pointer;
+}
+.x-tabs-strip .x-tabs-text {
+ font:bold 11px tahoma,arial,helvetica;
+ color:#666;
+ overflow:hidden;
+ white-space: nowrap;
+ cursor:pointer;
+ text-overflow: ellipsis;
+}
+.x-tabs-strip .on .x-tabs-text {
+ cursor:default;
+ color:#083772;
+}
+.x-tabs-strip .disabled .x-tabs-text {
+ cursor:default;
+ color:#aaaaaa;
+}
+.x-tabs-strip .x-tabs-inner {
+ padding:4px 10px;
+}
+
+.x-tabs-strip .on .x-tabs-right {
+ background: url(/static/images/extjs/default/tabs/tab-sprite.gif) no-repeat right 0;
+}
+.x-tabs-strip .on .x-tabs-left {
+ background: url(/static/images/extjs/default/tabs/tab-sprite.gif) no-repeat 0 -100px;
+}
+.x-tabs-strip .x-tabs-right {
+ background: url(/static/images/extjs/default/tabs/tab-sprite.gif) no-repeat right -50px;
+}
+.x-tabs-strip .x-tabs-left {
+ background: url(/static/images/extjs/default/tabs/tab-sprite.gif) no-repeat 0 -150px;
+}
+
+.x-tabs-strip a {
+ position:relative;
+ top:1px; left:0;
+}
+.x-tabs-strip .on a {
+ position:relative;
+}
+.x-tabs-strip .on .x-tabs-inner {
+ padding-bottom:5px;
+}
+/** closable tabs */
+.x-tabs-strip .x-tabs-closable .x-tabs-inner{
+ padding-right:22px;
+ position:relative;
+}
+.x-tabs-strip .x-tabs-closable .close-icon{
+ line-height: 1px;
+ font-size:1px;
+ background-image:url(/static/images/extjs/default/layout/tab-close.gif);
+ display:block;
+ position:absolute;
+ right:5px;top:4px;
+ width:11px;height:11px;
+ cursor:pointer;
+}
+.x-tabs-strip .on .close-icon{
+ background-image:url(/static/images/extjs/default/layout/tab-close-on.gif);
+}
+.x-tabs-strip .x-tabs-closable .close-over{
+ background-image:url(/static/images/extjs/default/layout/tab-close-on.gif);
+}
+.x-tabs-body {
+ border:1px solid #6593cf;
+ border-top:0 none;
+}
+.x-tabs-bottom .x-tabs-wrap {
+ border-top:1px solid #6593cf;
+ border-bottom:0 none;
+ padding-top:0;
+ padding-bottom:2px;
+}
+.x-tabs-bottom .x-tabs-strip .x-tabs-right {
+ background: url(/static/images/extjs/default/tabs/tab-btm-inactive-right-bg.gif) no-repeat bottom left;
+}
+.x-tabs-bottom .x-tabs-strip .x-tabs-left {
+ background: url(/static/images/extjs/default/tabs/tab-btm-inactive-left-bg.gif) no-repeat bottom right;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-right {
+ background: url(/static/images/extjs/default/tabs/tab-btm-right-bg.gif) no-repeat bottom left;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-left {
+ background: url(/static/images/extjs/default/tabs/tab-btm-left-bg.gif) no-repeat bottom right;
+}
+.x-tabs-bottom .x-tabs-strip a {
+ position:relative;
+ top:0; left:0;
+}
+.x-tabs-bottom .x-tabs-strip .on a {
+ margin-top:-1px;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-inner {
+ padding-top:5px;
+}
+
+.x-tabs-bottom .x-tabs-body {
+ border:1px solid #6593cf;
+ border-bottom:0 none;
+}
+
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/toolbar.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/toolbar.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,160 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-toolbar{
+ border: 1px solid;
+ border-color:#eaf0f7 #eaf0f7 #a9bfd3 #eaf0f7;
+ display: block;
+ padding:2px;
+ background:#d0def0 url(/static/images/extjs/default/layout/panel-title-light-bg.gif) repeat-x;
+}
+.x-toolbar td {
+ vertical-align:middle;
+}
+.mso .x-toolbar, .x-grid-mso .x-toolbar{
+ border: 0 none;
+ background: url(/static/images/extjs/default/grid/mso-hd.gif);
+}
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{
+ white-space: nowrap;
+ font:normal 11px tahoma, arial, helvetica, sans-serif;
+}
+.x-toolbar .x-item-disabled {
+ color:gray;
+ cursor:default;
+ opacity:.6;
+ -moz-opacity:.6;
+ filter:alpha(opacity=60);
+}
+.x-toolbar .x-item-disabled * {
+ color:gray;
+ cursor:default;
+}
+.x-toolbar .x-btn-left{
+ background:none;
+}
+.x-toolbar .x-btn-right{
+ background:none;
+}
+.x-toolbar .x-btn-center{
+ background:none;
+ padding:0 0;
+}
+.x-toolbar .x-btn-menu-text-wrap .x-btn-center button{
+ padding-right:2px;
+}
+.ext-gecko .x-toolbar .x-btn-menu-text-wrap .x-btn-center button{
+ padding-right:0;
+}
+.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button{
+ padding:0 2px;
+}
+.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button {
+ width:12px;
+ background:transparent url(/static/images/extjs/default/toolbar/btn-arrow.gif) no-repeat 0 3px;
+}
+.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button {
+ width:12px;
+ background:transparent url(/static/images/extjs/default/toolbar/btn-arrow.gif) no-repeat 0 3px;
+}
+.x-toolbar .x-btn-over .x-btn-menu-arrow-wrap .x-btn-center button {
+ background-position: 0 -47px;
+}
+.x-toolbar .x-btn-over .x-btn-left{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) no-repeat 0 0;
+}
+.x-toolbar .x-btn-over .x-btn-right{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -21px;
+}
+.x-toolbar .x-btn-over .x-btn-center{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -42px;
+}
+
+.x-toolbar .x-btn-click .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -63px;
+}
+.x-toolbar .x-btn-click .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -84px;
+}
+.x-toolbar .x-btn-click .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{
+ background:url(/static/images/extjs/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -105px;
+}
+
+.x-toolbar .ytb-text{
+ padding:2px;
+}
+.x-toolbar .ytb-sep {
+ background-image: url(/static/images/extjs/default/grid/grid-split.gif);
+ background-position: center;
+ background-repeat: no-repeat;
+ display: block;
+ font-size: 1px;
+ height: 16px;
+ width:4px;
+ overflow: hidden;
+ cursor:default;
+ margin: 0 2px 0;
+ border:0;
+}
+.x-toolbar .ytb-spacer {
+ width:2px;
+}
+.mso .x-toolbar .ytb-sep, .x-grid-mso .x-toolbar .ytb-sep{
+ background-image: url(/static/images/extjs/default/grid/grid-blue-split.gif);
+}
+
+/* IE refuses to respect the negative margins in the toolbar */
+.ext-ie .x-toolbar .x-form-field-wrap {
+ padding-bottom:1px;
+}
+.ext-ie .x-toolbar .x-form-field-wrap .x-form-trigger {
+ top:1px;
+}
+
+/* Paging Toolbar */
+
+.x-grid-page-number{
+ width:24px;
+ height:14px;
+}
+.x-grid-page-first .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-first.gif);
+}
+.x-grid-loading .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/done.gif);
+}
+.x-grid-page-last .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-last.gif);
+}
+.x-grid-page-next .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-next.gif);
+}
+.x-grid-page-prev .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-prev.gif);
+}
+.x-item-disabled .x-grid-loading .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/loading.gif);
+}
+.x-item-disabled .x-grid-page-first .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-first-disabled.gif);
+}
+.x-item-disabled .x-grid-page-last .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-last-disabled.gif);
+}
+.x-item-disabled .x-grid-page-next .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-next-disabled.gif);
+}
+.x-item-disabled .x-grid-page-prev .x-btn-text{
+ background-image: url(/static/images/extjs/default/grid/page-prev-disabled.gif);
+}
+.x-paging-info {
+ position:absolute;
+ top:8px;
+ right: 8px;
+ color:#15428b;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/tree.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/tree.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,179 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{
+ border: 0 none;
+ height: 18px;
+ margin: 0;
+ padding: 0;
+ vertical-align: middle;
+ width: 16px;
+ background-repeat: no-repeat;
+}
+.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{
+ border: 0 none;
+ height: 18px;
+ margin: 0;
+ padding: 0;
+ vertical-align: middle;
+ width: 16px;
+ background-position:center;
+ background-repeat: no-repeat;
+}
+
+/* some default icons for leaf/folder */
+.x-tree-node-collapsed .x-tree-node-icon{
+ background-image:url(/static/images/extjs/default/tree/folder.gif);
+}
+.x-tree-node-expanded .x-tree-node-icon{
+ background-image:url(/static/images/extjs/default/tree/folder-open.gif);
+}
+.x-tree-node-leaf .x-tree-node-icon{
+ background-image:url(/static/images/extjs/default/tree/leaf.gif);
+}
+
+.x-tree-noicon .x-tree-node-icon{
+ width:0; height:0;
+}
+/* loading icon */
+.x-tree-node-loading .x-tree-node-icon{
+ background-image:url(/static/images/extjs/default/tree/loading.gif) !important;
+}
+.x-tree-node-loading a span{
+ font-style: italic;
+ color:#444444;
+}
+
+/* Line styles */
+.x-tree-lines .x-tree-elbow{
+ background-image:url(/static/images/extjs/default/tree/elbow.gif);
+}
+.x-tree-lines .x-tree-elbow-plus{
+ background-image:url(/static/images/extjs/default/tree/elbow-plus.gif);
+}
+.x-tree-lines .x-tree-elbow-minus{
+ background-image:url(/static/images/extjs/default/tree/elbow-minus.gif);
+}
+.x-tree-lines .x-tree-elbow-end{
+ background-image:url(/static/images/extjs/default/tree/elbow-end.gif);
+}
+.x-tree-lines .x-tree-elbow-end-plus{
+ background-image:url(/static/images/extjs/default/tree/elbow-end-plus.gif);
+}
+.x-tree-lines .x-tree-elbow-end-minus{
+ background-image:url(/static/images/extjs/default/tree/elbow-end-minus.gif);
+}
+.x-tree-lines .x-tree-elbow-line{
+ background-image:url(/static/images/extjs/default/tree/elbow-line.gif);
+}
+
+/* No line styles */
+.x-tree-no-lines .x-tree-elbow{
+ background:transparent;
+}
+.x-tree-no-lines .x-tree-elbow-plus{
+ background-image:url(/static/images/extjs/default/tree/elbow-plus-nl.gif);
+}
+.x-tree-no-lines .x-tree-elbow-minus{
+ background-image:url(/static/images/extjs/default/tree/elbow-minus-nl.gif);
+}
+.x-tree-no-lines .x-tree-elbow-end{
+ background:transparent;
+}
+.x-tree-no-lines .x-tree-elbow-end-plus{
+ background-image:url(/static/images/extjs/default/tree/elbow-end-plus-nl.gif);
+}
+.x-tree-no-lines .x-tree-elbow-end-minus{
+ background-image:url(/static/images/extjs/default/tree/elbow-end-minus-nl.gif);
+}
+.x-tree-no-lines .x-tree-elbow-line{
+ background:transparent;
+}
+
+.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{
+ cursor:pointer;
+}
+.ext-ie ul.x-tree-node-ct{
+ font-size:0;
+ line-height:0;
+}
+.x-tree-node{
+ color: black;
+ font: normal 11px arial, tahoma, helvetica, sans-serif;
+ white-space: nowrap;
+}
+.x-tree-node a, .x-dd-drag-ghost a{
+ text-decoration:none;
+ color:black;
+ -khtml-user-select:none;
+ -moz-user-select:none;
+ -kthml-user-focus:normal;
+ -moz-user-focus:normal;
+ -moz-outline: 0 none;
+ outline:0 none;
+}
+.x-tree-node a span, .x-dd-drag-ghost a span{
+ text-decoration:none;
+ color:black;
+ padding:1px 3px 1px 2px;
+}
+.x-tree-node .x-tree-node-disabled a span{
+ color:gray !important;
+}
+.x-tree-node .x-tree-node-disabled .x-tree-node-icon{
+ -moz-opacity: 0.5;
+ opacity:.5;
+ filter: alpha(opacity=50);
+}
+.x-tree-node .x-tree-node-inline-icon{
+ background:transparent;
+}
+.x-tree-node a:hover, .x-dd-drag-ghost a:hover{
+ text-decoration:none;
+}
+.x-tree-node div.x-tree-drag-insert-below{
+ border-bottom:1px dotted #3366cc;
+}
+.x-tree-node div.x-tree-drag-insert-above{
+ border-top:1px dotted #3366cc;
+}
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{
+ border-bottom:0 none;
+}
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{
+ border-top:0 none;
+}
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{
+ border-bottom:2px solid #3366cc;
+}
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{
+ border-top:2px solid #3366cc;
+}
+.x-tree-node .x-tree-drag-append a span{
+ background:#dddddd;
+ border:1px dotted gray;
+}
+.x-tree-node .x-tree-selected a span{
+ background:#3366cc;
+ color:white;
+}
+.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{
+ display:none !important;
+}
+.x-tree-drop-ok-append .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/tree/drop-add.gif);
+}
+.x-tree-drop-ok-above .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/tree/drop-over.gif);
+}
+.x-tree-drop-ok-below .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/tree/drop-under.gif);
+}
+.x-tree-drop-ok-between .x-dd-drop-icon{
+ background-image: url(/static/images/extjs/default/tree/drop-between.gif);
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ytheme-aero.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ytheme-aero.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,499 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+/* menus */
+.x-menu {
+ border:1px solid;
+ border-color: #96b9e6 #8BB8F3 #8BB8F3 #96b9e6;
+ z-index: 15000;
+ zoom:1;
+ background:#c3daf9;
+ padding:2px;
+
+}
+.x-menu-list{
+ background: #fafafa;
+ border:1px solid #fff;
+ border-color:#a3bad9;
+}
+.x-menu-item-icon {
+ margin-right:8px;
+}
+.x-menu-sep {
+ margin-left:3px;
+}
+.x-menu-item-active {
+ color:#233d6d;
+ background:#c3daf9;
+ border:1px solid #fff;
+ padding:0;
+}
+
+.x-date-mmenu .x-menu-list{
+ padding:0;
+}
+.x-date-mmenu .x-menu-list{
+ border:0 none;
+}
+
+.x-menu .x-color-palette, .x-menu .x-date-picker{
+ margin-left:26px;
+}
+.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{
+ margin:0;
+ border:0 none;
+}
+/**
+* Tabs
+*/
+.x-tabs-wrap, .x-layout-panel .x-tabs-top .x-tabs-wrap {
+ background:#deecfd;
+ border:1px solid #8db2e3;
+ padding-bottom:2px;
+ padding-top:0;
+}
+.x-tabs-strip-wrap{
+ padding-top:1px;
+ background:#cedff5 url(/static/images/extjs/aero/tabs/tab-strip-bg.gif) repeat-x bottom;
+ border-bottom:1px solid #8db2e3;
+}
+.x-tabs-strip .x-tabs-text {
+ color:#15428b;
+ font:bold 11px tahoma,arial,verdana,sans-serif;
+}
+.x-tabs-strip .on .x-tabs-text {
+ cursor:default;
+ color:#15428b;
+}
+.x-tabs-top .x-tabs-strip .on .x-tabs-right {
+ background: url(/static/images/extjs/aero/tabs/tab-sprite.gif) no-repeat right 0;
+}
+.x-tabs-top .x-tabs-strip .on .x-tabs-left,.x-tabs-top .x-tabs-strip .on a:hover .x-tabs-left{
+ background: url(/static/images/extjs/aero/tabs/tab-sprite.gif) no-repeat 0 -100px;
+}
+.x-tabs-top .x-tabs-strip .x-tabs-right {
+ background:transparent url(/static/images/extjs/aero/tabs/tab-sprite.gif) no-repeat right -50px;
+}
+.x-tabs-top .x-tabs-strip .x-tabs-left {
+ background:transparent url(/static/images/extjs/aero/tabs/tab-sprite.gif) no-repeat 0 -150px;
+}
+.x-tabs-top .x-tabs-body {
+ border:1px solid #8db2e3;
+ border-top:0 none;
+}
+.x-tabs-bottom .x-tabs-wrap, .x-layout-panel .x-tabs-bottom .x-tabs-wrap {
+ background:#deecfd;
+ border:1px solid #8db2e3;
+ padding-top:2px;
+ padding-bottom:0;
+}
+.x-tabs-bottom .x-tabs-strip-wrap{
+ padding-top:0;
+ padding-bottom:1px;
+ background:#cedff5 url(/static/images/extjs/aero/tabs/tab-strip-btm-bg.gif) repeat-x top;
+ border-top:1px solid #8db2e3;
+ border-bottom:0 none;
+}
+.x-tabs-bottom .x-tabs-strip .x-tabs-right {
+ background:transparent url(/static/images/extjs/aero/tabs/tab-btm-inactive-right-bg.gif) no-repeat bottom right;
+}
+.x-tabs-bottom .x-tabs-strip .x-tabs-left {
+ background:transparent url(/static/images/extjs/aero/tabs/tab-btm-inactive-left-bg.gif) no-repeat bottom left;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-right,.x-tabs-bottom .x-tabs-strip .on a:hover {
+ background: url(/static/images/extjs/aero/tabs/tab-btm-right-bg.gif) no-repeat bottom left;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-left,.x-tabs-bottom .x-tabs-strip .on a:hover .x-tabs-left {
+ background: url(/static/images/extjs/aero/tabs/tab-btm-left-bg.gif) no-repeat bottom right;
+}
+.x-tabs-bottom .x-tabs-body {
+ border:1px solid #8db2e3;
+ border-bottom:0 none;
+}
+/*
+* Basic-Dialog
+*/
+.x-dlg-proxy {
+ background:#C7DFFC;
+ border:1px solid #A5CCF9;
+}
+.x-dlg-shadow{
+ background:#cccccc;
+ opacity:.3;
+ -moz-opacity:.3;
+ filter: alpha(opacity=30);
+}
+.x-dlg {
+ background:transparent;
+}
+.x-dlg .x-dlg-hd {
+ background: url(/static/images/extjs/aero/basic-dialog/hd-sprite.gif) repeat-x 0 -82px;
+ background-color:#aabaca;
+ color:#15428b;
+ zoom:1;
+ padding-top:7px;
+}
+.x-dlg .x-dlg-hd-left {
+ opacity:.85;
+ -moz-opacity:.85;
+ filter:alpha(opacity=80);
+ background: url(/static/images/extjs/aero/basic-dialog/hd-sprite.gif) no-repeat 0 -41px;
+ zoom:1;
+}
+.x-dlg-modal .x-dlg-hd-left {
+ opacity:.75;
+ -moz-opacity:.75;
+ filter:alpha(opacity=70);
+}
+
+.x-dlg .x-dlg-hd-right {
+ background: url(/static/images/extjs/aero/basic-dialog/hd-sprite.gif) no-repeat right 0;
+ zoom:1;
+}
+.x-dlg .x-dlg-dlg-body{
+ padding:0 0 0;
+ position:absolute;
+ top:24px;left:0;
+ z-index:1;
+ border:0 none;
+ background:transparent;
+}
+.x-dlg .x-dlg-bd{
+ background:#fff;
+ border:1px solid #96b9e6;
+}
+.x-dlg .x-dlg-ft{
+ border:0 none;
+ background:transparent;
+ padding-bottom:8px;
+}
+.x-dlg .x-dlg-bg{
+ filter:alpha(opacity=80);
+ opacity:.85;
+ -moz-opacity:.85;
+ zoom:1;
+}
+.x-dlg-modal .x-dlg-bg {
+ opacity:.75;
+ -moz-opacity:.75;
+ filter:alpha(opacity=70);
+}
+.x-dlg .x-dlg-bg-center {
+ padding: 2px 7px 7px 7px;
+ background:transparent url(/static/images/extjs/aero/basic-dialog/bg-center.gif) repeat-x bottom;
+ zoom:1;
+}
+.x-dlg .x-dlg-bg-left{
+ padding-left:7px;
+ background:transparent url(/static/images/extjs/aero/basic-dialog/bg-left.gif) no-repeat bottom left;
+ zoom:1;
+}
+.x-dlg .x-dlg-bg-right{
+ padding-right:7px;
+ background:transparent url(/static/images/extjs/aero/basic-dialog/bg-right.gif) no-repeat bottom right;
+ zoom:1;
+}
+.x-dlg-auto-tabs .x-dlg-dlg-body, .x-dlg-auto-layout .x-dlg-dlg-body{
+ background:transparent;
+ border:0 none;
+}
+.x-dlg-auto-tabs .x-dlg-bd, .x-dlg-auto-layout .x-dlg-bd{
+ background:#fff;
+ border:1px solid #e9f3f5;
+}
+.x-dlg-auto-tabs .x-tabs-top .x-tabs-body,.x-dlg-auto-tabs .x-tabs-bottom .x-tabs-body{
+ border-color:#8db2e3;
+}
+.x-dlg-auto-tabs .x-tabs-top .x-tabs-wrap,.x-dlg-auto-tabs .x-tabs-bottom .x-tabs-wrap{
+ border-color:#8db2e3;
+}
+.x-dlg .x-dlg-toolbox {
+ width:50px;
+ height:20px;
+ right:5px;
+ top:5px;
+}
+.x-dlg .x-dlg-close, .x-dlg .x-dlg-collapse {
+ width:21px;
+ height:20px;
+ margin:0;
+}
+.x-dlg .x-dlg-close {
+ background-image:url(/static/images/extjs/aero/basic-dialog/aero-close.gif);
+}
+.x-dlg .x-dlg-collapse {
+ background-image:url(/static/images/extjs/aero/basic-dialog/collapse.gif);
+}
+.x-dlg-collapsed {
+ border-bottom:1px solid #96b9e6;
+}
+.x-dlg .x-dlg-close-over {
+ background-image:url(/static/images/extjs/aero/basic-dialog/aero-close-over.gif);
+}
+.x-dlg .x-dlg-collapse-over {
+ background-image:url(/static/images/extjs/aero/basic-dialog/collapse-over.gif);
+}
+.x-dlg-collapsed .x-dlg-collapse {
+ background-image:url(/static/images/extjs/aero/basic-dialog/expand.gif);
+}
+.x-dlg-collapsed .x-dlg-collapse-over {
+ background-image:url(/static/images/extjs/aero/basic-dialog/expand-over.gif);
+}
+.x-dlg div.x-resizable-handle-east{
+ background-image:url(/static/images/extjs/aero/s.gif);
+ border:0 none;
+}
+.x-dlg div.x-resizable-handle-south{
+ background-image:url(/static/images/extjs/aero/s.gif);
+ border:0 none;
+}
+.x-dlg div.x-resizable-handle-west{
+ background-image:url(/static/images/extjs/aero/s.gif);
+ border:0 none;
+}
+.x-dlg div.x-resizable-handle-southeast{
+ background-image:url(/static/images/extjs/aero/basic-dialog/se-handle.gif);
+ background-position: bottom right;
+ width:9px;
+ height:9px;
+ border:0;
+ right:2px;
+ bottom:2px;
+}
+.x-dlg div.x-resizable-handle-southwest{
+ background-image:url(/static/images/extjs/aero/s.gif);
+ background-position: top right;
+ margin-left:1px;
+ margin-bottom:1px;
+ border:0;
+}
+.x-dlg div.x-resizable-handle-north{
+ background-image:url(/static/images/extjs/aero/s.gif);
+ border:0 none;
+}
+
+#x-msg-box .x-dlg-bd{
+ background:#CFE0F5;
+ border:0 none;
+}
+body.x-masked #x-msg-box .x-dlg-bd, body.x-body-masked #x-msg-box .x-dlg-bd{
+ background:#c4d2e3;
+ border:0 none;
+}
+/* BorderLayout */
+
+.x-layout-container{
+ background:#deecfd;
+}
+.x-layout-collapsed{
+ background-color:#deecfd;
+ border:1px solid #99bbe8;
+}
+.x-layout-collapsed-over{
+ background-color:#F5F9FE;
+}
+.x-layout-panel{
+ border:1px solid #99bbe8;
+}
+.x-layout-nested-layout .x-layout-panel {
+ border:0 none;
+}
+.x-layout-split{
+ background-color:#deecfd;
+}
+.x-layout-panel-hd{
+ background: #ebeadb url(/static/images/extjs/aero/grid/grid-hrow.gif) repeat-x;
+ border-bottom:1px solid #99bbe8;
+}
+.x-layout-panel-hd-text {
+ color:#15428b;
+ font:bold 11px tahoma,arial,verdana,sans-serif;
+}
+
+.x-layout-split-h{
+ background:#deecfd;
+}
+.x-layout-split-v{
+ background:#deecfd;
+}
+.x-layout-panel .x-tabs-top .x-tabs-wrap{
+ border:0 none;
+ border-bottom:1px solid #8db2e3;
+}
+.x-layout-panel .x-tabs-bottom .x-tabs-wrap{
+ border:0 none;
+ border-top:1px solid #8db2e3;
+}
+
+.x-layout-nested-layout .x-layout-panel-north {
+ border-bottom:1px solid #99bbe8;
+}
+.x-layout-nested-layout .x-layout-panel-south {
+ border-top:1px solid #99bbe8;
+}
+.x-layout-nested-layout .x-layout-panel-east {
+ border-left:1px solid #99bbe8;
+}
+.x-layout-nested-layout .x-layout-panel-west {
+ border-right:1px solid #99bbe8;
+}
+.x-layout-panel-dragover {
+ border: 2px solid #99bbe8;
+}
+.x-layout-panel-proxy {
+ background-image: url(/static/images/extjs/aero/layout/gradient-bg.gif);
+ background-color:#f3f2e7;
+ border:1px dashed #99bbe8;
+}
+
+.x-layout-container .x-layout-tabs-body{
+ border:0 none;
+}
+/** Resizable */
+
+.x-resizable-proxy{
+ border: 1px dashed #3b5a82;
+}
+
+/* grid */
+.x-grid-hd-text {
+ color:#15428b;
+ font-weight:bold;
+}
+.x-grid-locked .x-grid-body td {
+ background: #FBFDFF;
+ border-right: 1px solid #deecfd;
+ border-bottom: 1px solid #deecfd !important;
+}
+.x-grid-locked .x-grid-body td .x-grid-cell-inner {
+ border-top:0 none;
+}
+.x-grid-locked .x-grid-row-alt td{
+ background: #F5FAFE;
+}
+.x-grid-locked .x-grid-row-selected td{
+ color: #fff !important;
+ background-color: #316ac5 !important;
+}
+.x-grid-hd{
+ border-bottom:0;
+ background:none;
+}
+.x-grid-hd-row{
+ height:auto;
+}
+.x-grid-hd-over {
+ border-bottom:0 none;
+}
+.x-grid-hd-over .x-grid-hd-body{
+ background:none;
+ border-bottom:0 none;
+}
+.x-grid-hd-over .x-grid-hd-body{
+ background-color: transparent;
+ border-bottom:0;
+}
+.x-grid-split {
+ background-image: url(/static/images/extjs/aero/grid/grid-blue-split.gif);
+}
+.x-grid-header{
+ background: url(/static/images/extjs/aero/grid/grid-hrow.gif);
+ border:0 none;
+ border-bottom:1px solid #6f99cf;
+}
+.x-grid-row-alt{
+ background-color: #f5f5f5;
+}
+.x-grid-row-over td, .x-grid-locked .x-grid-row-over td{
+ background:#d9e8fb;
+}
+.x-grid-col {
+ border-right: 1px solid #eee;
+ border-bottom: 1px solid #eee;
+}
+.x-grid-header .x-grid-hd-inner {
+ padding-bottom: 1px;
+}
+.x-grid-header .x-grid-hd-text {
+ padding-bottom: 3px;
+}
+.x-grid-hd-over .x-grid-hd-inner {
+ border-bottom: 1px solid #316ac5;
+ padding-bottom: 0;
+}
+.x-grid-hd-over .x-grid-hd-text {
+ background: #d5e4f5;
+ border-bottom: 1px solid #fff;
+ padding-bottom: 2px;
+}
+.x-grid-header .sort-asc .x-grid-hd-inner, .x-grid-header .sort-desc .x-grid-hd-inner {
+ border-bottom: 1px solid #316ac5;
+ padding-bottom: 0;
+}
+.x-grid-header .sort-asc .x-grid-hd-text, .x-grid-header .sort-desc .x-grid-hd-text {
+ border-bottom: 0 none;
+ padding-bottom: 3px;
+}
+.x-grid-header .sort-asc .x-grid-sort-icon {
+ background-image: url(/static/images/extjs/aero/grid/sort_asc.gif);
+}
+.x-grid-header .sort-desc .x-grid-sort-icon {
+ background-image: url(/static/images/extjs/aero/grid/sort_desc.gif);
+}
+.x-dd-drag-proxy .x-grid-hd-inner{
+ background: #ebeadb url(/static/images/extjs/aero/grid/grid-hrow.gif) repeat-x;
+ height:22px;
+ width:120px;
+}
+
+
+.x-grid-locked td.x-grid-row-marker, .x-grid-locked .x-grid-row-selected td.x-grid-row-marker{
+ background: #ebeadb url(/static/images/extjs/aero/grid/grid-hrow.gif) repeat-x 0 0 !important;
+ vertical-align:middle !important;
+ color:black;
+ padding:0;
+ border-top:1px solid white;
+ border-bottom:1px solid #6f99cf !important;
+ border-right:1px solid #6f99cf !important;
+ text-align:center;
+}
+.x-grid-locked td.x-grid-row-marker div, .x-grid-locked .x-grid-row-selected td.x-grid-row-marker div{
+ padding:0 4px;
+ color:#15428b !important;
+ text-align:center;
+}
+
+/** Toolbar */
+.x-toolbar{
+ padding:2px 2px 2px 2px;
+ background:#d0def0 url(/static/images/extjs/default/toolbar/tb-bg.gif) repeat-x;
+}
+
+.x-toolbar .ytb-sep{
+ background-image: url(/static/images/extjs/aero/grid/grid-blue-split.gif);
+}
+
+.x-toolbar .x-btn-over .x-btn-left{
+ background:url(/static/images/extjs/aero/toolbar/tb-btn-sprite.gif) no-repeat 0 0;
+}
+.x-toolbar .x-btn-over .x-btn-right{
+ background:url(/static/images/extjs/aero/toolbar/tb-btn-sprite.gif) no-repeat 0 -21px;
+}
+.x-toolbar .x-btn-over .x-btn-center{
+ background:url(/static/images/extjs/aero/toolbar/tb-btn-sprite.gif) repeat-x 0 -42px;
+}
+
+.x-toolbar .x-btn-click .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{
+ background:url(/static/images/extjs/aero/toolbar/tb-btn-sprite.gif) no-repeat 0 -63px;
+}
+.x-toolbar .x-btn-click .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{
+ background:url(/static/images/extjs/aero/toolbar/tb-btn-sprite.gif) no-repeat 0 -84px;
+}
+.x-toolbar .x-btn-click .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{
+ background:url(/static/images/extjs/aero/toolbar/tb-btn-sprite.gif) repeat-x 0 -105px;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ytheme-gray.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ytheme-gray.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,438 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+
+.ext-el-mask-msg {
+ border:1px solid #aaa;
+ background: #ddd url(/static/images/extjs/default/box/tb.gif) repeat-x 0 -16px;
+}
+.ext-el-mask-msg div {
+ border:1px solid #ccc;
+}
+
+/*
+ Menu
+ */
+.x-menu {
+ border-color: #999 #999 #999 #999;
+ background-image:url(/static/images/extjs/gray/menu/menu.gif);
+}
+.x-menu-item-arrow{
+ background-image:url(/static/images/extjs/gray/menu/menu-parent.gif);
+}
+.x-menu-item {
+ color:#222;
+}
+.x-menu-item-active {
+ background:#ddd;
+ border:1px solid #aaa;
+}
+.x-menu-sep {
+ background:#aaa;
+}
+
+/* grid */
+.x-grid-header{
+ background: #ebeadb url(/static/images/extjs/gray/grid/grid-hrow.gif) repeat-x;
+ overflow:hidden;
+ position:relative;
+ cursor:default;
+ width:100%;
+}
+.x-grid-hd-row{
+ height:22px;
+}
+.x-grid-hd {
+ padding-right:1px;
+}
+.x-grid-hd-over .x-grid-hd-inner {
+ border-bottom: 1px solid #fcc247;
+}
+.x-grid-hd-over .x-grid-hd-text {
+ background: #faf9f4;
+ padding-bottom:1px;
+ border-bottom: 1px solid #f9a900;
+}
+
+.x-grid-hd-text {
+ color:#000000;
+}
+
+.x-grid-col {
+ border-right: 1px solid #f1efe2;
+ border-bottom: 1px solid #f1efe2;
+}
+.x-grid-row-alt{
+ background:#fcfaf6;
+}
+.x-grid-row-over td{
+ background:#f1f1f1;
+}
+
+
+.x-grid-locked .x-grid-body td {
+ background: #f0efe4;
+ border-right: 1px solid #D6D2C2;
+ border-bottom: 1px solid #D6D2C2 !important;
+}
+
+.x-grid-locked .x-grid-header table{
+ border-right:1px solid transparent;
+}
+.x-grid-locked .x-grid-body table{
+ border-right:1px solid #c6c2b2;
+}
+
+.x-grid-bottombar .x-toolbar{
+ border-right:0 none;
+ border-bottom:0 none;
+ border-top:1px solid #f1efe2;
+}
+
+.x-props-grid .x-grid-col-name{
+ background-color: #f1efe2;
+}
+
+
+
+.x-grid-locked td.x-grid-row-marker, .x-grid-locked .x-grid-row-selected td.x-grid-row-marker{
+ background: #ebeadb url(/static/images/extjs/gray/grid/grid-hrow.gif) repeat-x 0 bottom !important;
+ vertical-align:middle !important;
+ color:black;
+ padding:0;
+ border-top:1px solid white;
+ border-bottom:none !important;
+ border-right:1px solid #d6d2c2 !important;
+ text-align:center;
+}
+.x-grid-locked td.x-grid-row-marker div, .x-grid-locked .x-grid-row-selected td.x-grid-row-marker div{
+ padding:0 4px;
+ color:black !important;
+ text-align:center;
+}
+
+/**
+* Basic-Dialog
+*/
+.x-dlg-proxy {
+ background-image: url(/static/images/extjs/gray/layout/gradient-bg.gif);
+ background-color:#EAE8D5;
+ border:1px solid #b3b6b0;
+}
+.x-dlg-shadow{
+ background:#aaaaaa;
+}
+.x-dlg-proxy .tabset{
+ background:url(/static/images/extjs/gray/layout/gradient-bg.gif);
+}
+.x-dlg .x-dlg-hd {
+ background: url(/static/images/extjs/gray/basic-dialog/hd-sprite.gif) repeat-x 0 -82px;
+ background-color:#333333;
+}
+.x-dlg .x-dlg-hd-left {
+ background: url(/static/images/extjs/gray/basic-dialog/hd-sprite.gif) no-repeat 0 -41px;
+}
+.x-dlg .x-dlg-hd-right {
+ background: url(/static/images/extjs/gray/basic-dialog/hd-sprite.gif) no-repeat right 0;
+}
+.x-dlg .x-dlg-dlg-body{
+ background:#efefec;
+ border:1px solid #b3b6b0;
+ border-top:0 none;
+}
+.x-dlg .x-tabs-top .x-tabs-body{
+ border:1px solid #b3b6b0;
+ border-top:0 none;
+}
+.x-dlg .x-tabs-bottom .x-tabs-body{
+ border:1px solid #b3b6b0;
+ border-bottom:0 none;
+}
+.x-dlg .x-layout-container .x-tabs-body{
+ border:0 none;
+}
+.x-dlg .x-dlg-close {
+ background-image:url(/static/images/extjs/gray/basic-dialog/close.gif);
+}
+.x-dlg .x-dlg-collapse {
+ background-image:url(/static/images/extjs/gray/basic-dialog/collapse.gif);
+}
+.x-dlg-collapsed .x-dlg-collapse {
+ background-image:url(/static/images/extjs/gray/basic-dialog/expand.gif);
+}
+.x-dlg div.x-resizable-handle-east{
+ background-image:url(/static/images/extjs/gray/basic-dialog/e-handle.gif);
+ border:0 none;
+}
+.x-dlg div.x-resizable-handle-south{
+ background-image:url(/static/images/extjs/gray/basic-dialog/s-handle.gif);
+ border:0 none;
+}
+.x-dlg div.x-resizable-handle-west{
+ background-image:url(/static/images/extjs/gray/basic-dialog/e-handle.gif);
+ border:0 none;
+}
+.x-dlg div.x-resizable-handle-southeast{
+ background-image:url(/static/images/extjs/gray/basic-dialog/se-handle.gif);
+ background-position: bottom right;
+ width:8px;
+ height:8px;
+ border:0;
+}
+.x-dlg div.x-resizable-handle-southwest{
+ background-image:url(/static/images/extjs/gray/sizer/sw-handle-dark.gif);
+ background-position: top right;
+ margin-left:1px;
+ margin-bottom:1px;
+ border:0;
+}
+.x-dlg div.x-resizable-handle-north{
+ background-image:url(/static/images/extjs/gray/s.gif);
+ border:0 none;
+}
+
+/**
+* Tabs
+*/
+.x-tabs-wrap {
+ border-bottom:1px solid #aca899;
+}
+.x-tabs-strip .on .x-tabs-text {
+ cursor:default;
+ color:#333333;
+}
+.x-tabs-top .x-tabs-strip .on .x-tabs-right {
+ background: url(/static/images/extjs/gray/tabs/tab-sprite.gif) no-repeat right 0;
+}
+.x-tabs-top .x-tabs-strip .on .x-tabs-left {
+ background: url(/static/images/extjs/gray/tabs/tab-sprite.gif) no-repeat 0px -100px;
+}
+.x-tabs-top .x-tabs-strip .x-tabs-right {
+ background: url(/static/images/extjs/gray/tabs/tab-sprite.gif) no-repeat right -50px;
+}
+.x-tabs-top .x-tabs-strip .x-tabs-left {
+ background: url(/static/images/extjs/gray/tabs/tab-sprite.gif) no-repeat 0px -150px;
+}
+.x-tabs-strip .x-tabs-closable .close-icon{
+ background-image:url(/static/images/extjs/gray/layout/tab-close.gif);
+}
+.x-tabs-strip .on .close-icon{
+ background-image:url(/static/images/extjs/gray/layout/tab-close-on.gif);
+}
+.x-tabs-strip .x-tabs-closable .close-over{
+ background-image:url(/static/images/extjs/gray/layout/tab-close-on.gif);
+}
+.x-tabs-body {
+ border:1px solid #aca899;
+ border-top:0 none;
+}
+.x-tabs-bottom .x-tabs-wrap {
+ border-bottom:0 none;
+ padding-top:0;
+ border-top:1px solid #aca899;
+}
+.x-tabs-bottom .x-tabs-strip .x-tabs-right {
+ background: url(/static/images/extjs/gray/tabs/tab-btm-inactive-right-bg.gif) no-repeat bottom left;
+}
+.x-tabs-bottom .x-tabs-strip .x-tabs-left {
+ background: url(/static/images/extjs/gray/tabs/tab-btm-inactive-left-bg.gif) no-repeat bottom right;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-right {
+ background: url(/static/images/extjs/gray/tabs/tab-btm-right-bg.gif) no-repeat bottom left;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-left {
+ background: url(/static/images/extjs/gray/tabs/tab-btm-left-bg.gif) no-repeat bottom right;
+}
+
+.x-tabs-bottom .x-tabs-body {
+ border:1px solid #aca899;
+ border-bottom:0 none;
+}
+
+.x-layout-container .x-layout-tabs-body{
+ border:0 none;
+}
+/* QuickTips */
+
+.x-tip .x-tip-top {
+ background-image: url(/static/images/extjs/gray/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-top-left {
+ background-image: url(/static/images/extjs/gray/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-top-right {
+ background-image: url(/static/images/extjs/gray/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-ft {
+ background-image: url(/static/images/extjs/gray/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-ft-left {
+ background-image: url(/static/images/extjs/gray/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-ft-right {
+ background-image: url(/static/images/extjs/gray/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-bd-left {
+ background-image: url(/static/images/extjs/gray/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-bd-right {
+ background-image: url(/static/images/extjs/gray/qtip/tip-sprite.gif);
+}
+
+/* BorderLayout */
+
+.x-layout-container{
+ background-color:#f3f2e7;
+}
+.x-layout-collapsed{
+ background-color:#f3f2e7;
+ border:1px solid #aca899;
+}
+.x-layout-collapsed-over{
+ background-color:#fbfbef;
+}
+.x-layout-panel{
+ border:1px solid #aca899;
+}
+.x-layout-nested-layout .x-layout-panel {
+ border:0 none;
+}
+.x-layout-split{
+ background-color:#f3f2e7;
+}
+.x-layout-panel-hd{
+ background-image: url(/static/images/extjs/gray/layout/panel-title-light-bg.gif);
+ border-bottom:1px solid #aca899;
+}
+.x-layout-tools-button-over{
+ border:1px solid #aca899;
+}
+.x-layout-close{
+ background-image:url(/static/images/extjs/gray/layout/panel-close.gif);
+}
+.x-layout-stick{
+ background-image:url(/static/images/extjs/gray/layout/stick.gif);
+}
+.x-layout-collapse-west,.x-layout-expand-east{
+ background-image:url(/static/images/extjs/gray/layout/collapse.gif);
+}
+.x-layout-expand-west,.x-layout-collapse-east{
+ background-image:url(/static/images/extjs/gray/layout/expand.gif);
+}
+.x-layout-collapse-north,.x-layout-expand-south{
+ background-image:url(/static/images/extjs/gray/layout/ns-collapse.gif);
+}
+.x-layout-expand-north,.x-layout-collapse-south{
+ background-image:url(/static/images/extjs/gray/layout/ns-expand.gif);
+}
+.x-layout-split-h{
+ background-image:url(/static/images/extjs/gray/sizer/e-handle-dark.gif);
+}
+.x-layout-split-v{
+ background-image:url(/static/images/extjs/gray/sizer/s-handle-dark.gif);
+}
+.x-layout-panel .x-tabs-wrap{
+ background:url(/static/images/extjs/gray/layout/gradient-bg.gif);
+}
+.x-layout-nested-layout .x-layout-panel-north {
+ border-bottom:1px solid #aca899;
+}
+.x-layout-nested-layout .x-layout-panel-south {
+ border-top:1px solid #aca899;
+}
+.x-layout-nested-layout .x-layout-panel-east {
+ border-left:1px solid #aca899;
+}
+.x-layout-nested-layout .x-layout-panel-west {
+ border-right:1px solid #aca899;
+}
+.x-layout-panel-dragover {
+ border: 2px solid #aca899;
+}
+.x-layout-panel-proxy {
+ background-image: url(/static/images/extjs/gray/layout/gradient-bg.gif);
+ background-color:#f3f2e7;
+ border:1px dashed #aca899;
+}
+/** Resizable */
+
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east{
+ background:url(/static/images/extjs/gray/sizer/e-handle.gif);
+ background-position: left;
+}
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-west{
+ background:url(/static/images/extjs/gray/sizer/e-handle.gif);
+ background-position: left;
+}
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south{
+ background:url(/static/images/extjs/gray/sizer/s-handle.gif);
+ background-position: top;
+}
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-north{
+ background:url(/static/images/extjs/gray/sizer/s-handle.gif);
+ background-position: top;
+}
+.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{
+ background:url(/static/images/extjs/gray/sizer/se-handle.gif);
+ background-position: top left;
+}
+.x-resizable-over .x-resizable-handle-northwest,.x-resizable-pinned .x-resizable-handle-northwest{
+ background:url(/static/images/extjs/gray/sizer/nw-handle.gif);
+ background-position:bottom right;
+}
+.x-resizable-over .x-resizable-handle-northeast,.x-resizable-pinned .x-resizable-handle-northeast{
+ background:url(/static/images/extjs/gray/sizer/ne-handle.gif);
+ background-position: bottom left;
+}
+.x-resizable-over .x-resizable-handle-southwest,.x-resizable-pinned .x-resizable-handle-southwest{
+ background:url(/static/images/extjs/gray/sizer/sw-handle.gif);
+ background-position: top right;
+}
+.x-resizable-proxy{
+ border: 1px dashed #615e55;
+}
+
+/** Toolbar */
+.x-toolbar{
+ border:0 none;
+ background: #efefe3 url(/static/images/extjs/gray/toolbar/gray-bg.gif) repeat-x;
+ padding:3px;
+}
+.x-toolbar .x-btn-over .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{
+ background:url(/static/images/extjs/gray/toolbar/tb-btn-sprite.gif) no-repeat 0 0;
+}
+.x-toolbar .x-btn-over .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{
+ background:url(/static/images/extjs/gray/toolbar/tb-btn-sprite.gif) no-repeat 0 -21px;
+}
+.x-toolbar .x-btn-over .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{
+ background:url(/static/images/extjs/gray/toolbar/tb-btn-sprite.gif) repeat-x 0 -42px;
+}
+.x-toolbar .x-btn-over .x-btn-menu-arrow-wrap .x-btn-center button {
+ background-position: 0 -47px;
+}
+.x-paging-info {
+ color:#222222;
+}
+
+/* combo box */
+.x-combo-list {
+ border:1px solid #999;
+ background:#dddddd;
+}
+.x-combo-list-hd {
+ color:#222;
+ background-image: url(/static/images/extjs/gray/layout/panel-title-light-bg.gif);
+ border-bottom:1px solid #aca899;
+}
+.x-resizable-pinned .x-combo-list-inner {
+ border-bottom:1px solid #aaa;
+}
+.x-combo-list .x-combo-selected{
+ background:#ddd !important;
+ border:1px solid #aaa;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ytheme-vista.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/css/extjs/ytheme-vista.css Mon Apr 16 13:59:52 2007
@@ -0,0 +1,511 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+.ext-el-mask-msg {
+ border:1px solid #aaa;
+ background: #ddd url(/static/images/extjs/default/box/tb.gif) repeat-x 0 -16px;
+}
+.ext-el-mask-msg div {
+ border:1px solid #ccc;
+}
+/*
+ Menu
+ */
+.x-menu {
+ border-color: #999 #999 #999 #999;
+ background-image:url(/static/images/extjs/gray/menu/menu.gif);
+}
+.x-menu-item-arrow{
+ background-image:url(/static/images/extjs/gray/menu/menu-parent.gif);
+}
+.x-menu-item {
+ color:#222;
+}
+.x-menu-item-active {
+ background:#ddd;
+ border:1px solid #aaa;
+}
+.x-menu-sep {
+ background:#aaa;
+}
+/**
+* Tabs
+*/
+.x-tabs-wrap {
+ background:#4f4f4f;
+ border-bottom:1px solid #b3b6b0;
+}
+.x-tabs-strip .x-tabs-text {
+ color:white;
+ font-weight:normal;
+}
+.x-tabs-strip .on .x-tabs-text {
+ cursor:default;
+ color:#333333;
+}
+.x-tabs-top .x-tabs-strip a.x-tabs-right {
+ background:transparent url(/static/images/extjs/vista/tabs/tab-sprite.gif) no-repeat right -50px;
+}
+.x-tabs-top .x-tabs-strip a .x-tabs-left{
+ background:transparent url(/static/images/extjs/vista/tabs/tab-sprite.gif) no-repeat 0px -150px;
+}
+.x-tabs-top .x-tabs-strip .on .x-tabs-right {
+ background: url(/static/images/extjs/vista/tabs/tab-sprite.gif) no-repeat right 0;
+}
+.x-tabs-top .x-tabs-strip .on .x-tabs-left{
+ background: url(/static/images/extjs/vista/tabs/tab-sprite.gif) no-repeat 0px -100px;
+}
+.x-tabs-strip .x-tabs-closable .close-icon{
+ background-image:url(/static/images/extjs/vista/layout/tab-close.gif);
+}
+.x-tabs-strip .on .close-icon{
+ background-image:url(/static/images/extjs/vista/layout/tab-close-on.gif);
+}
+.x-tabs-strip .x-tabs-closable .close-over{
+ background-image:url(/static/images/extjs/vista/layout/tab-close-on.gif);
+}
+.x-tabs-body {
+ border:1px solid #b3b6b0;
+ border-top:0 none;
+}
+
+.x-tabs-bottom .x-tabs-strip {
+ background:#4f4f4f;
+}
+.x-tabs-bottom .x-tabs-strip a.x-tabs-right {
+ background:transparent url(/static/images/extjs/vista/tabs/tab-btm-inactive-right-bg.gif) no-repeat bottom right;
+}
+.x-tabs-bottom .x-tabs-strip a .x-tabs-left{
+ background:transparent url(/static/images/extjs/vista/tabs/tab-btm-inactive-left-bg.gif) no-repeat bottom left;
+}
+.x-tabs-bottom .x-tabs-wrap {
+ border-bottom:0 none;
+ padding-top:0;
+ border-top:1px solid #b3b6b0;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-right {
+ background: url(/static/images/extjs/vista/tabs/tab-btm-right-bg.gif) no-repeat bottom left;
+}
+.x-tabs-bottom .x-tabs-strip .on .x-tabs-left {
+ background: url(/static/images/extjs/vista/tabs/tab-btm-left-bg.gif) no-repeat bottom right;
+}
+
+.x-tabs-bottom .x-tabs-body {
+ border:1px solid #b3b6b0;
+ border-bottom:0 none;
+}
+/**
+* Basic-Dialog
+*/
+.x-dlg-proxy {
+ background:#d3d6d0;
+ border:2px solid #b3b6b0;
+}
+.x-dlg-shadow{
+ background:#cccccc;
+ opacity:.3;
+ -moz-opacity:.3;
+ filter: alpha(opacity=30);
+}
+.x-dlg .x-dlg-hd {
+ background: url(/static/images/extjs/vista/basic-dialog/hd-sprite.gif) repeat-x 0 -82px;
+ background-color:#333333;
+ zoom:1;
+}
+.x-dlg .x-dlg-hd-left {
+ opacity:.95;-moz-opacity:.95;filter:alpha(opacity=90);
+ background: url(/static/images/extjs/vista/basic-dialog/hd-sprite.gif) no-repeat 0 -41px;
+ zoom:1;
+}
+.x-dlg .x-dlg-hd-right {
+ background: url(/static/images/extjs/vista/basic-dialog/hd-sprite.gif) no-repeat right 0;
+ zoom:1;
+}
+.x-dlg .x-dlg-dlg-body{
+ background:#fff;
+ border:0 none;
+ border-top:0 none;
+ padding:0 0px 0px;
+ position:absolute;
+ top:24px;left:0;
+ z-index:1;
+}
+.x-dlg-auto-tabs .x-dlg-dlg-body{
+ background:transparent;
+}
+.x-dlg-auto-tabs .x-tabs-top .x-tabs-wrap{
+ background:transparent;
+}
+.x-dlg .x-dlg-ft{
+ border-top:1px solid #b3b6b0;
+ background:#F0F0F0;
+ padding-bottom:8px;
+}
+.x-dlg .x-dlg-bg{
+ opacity:.90;-moz-opacity:.90;filter:alpha(opacity=85);
+ zoom:1;
+}
+.x-dlg .x-dlg-bg-left,.x-dlg .x-dlg-bg-center,.x-dlg .x-dlg-bg-right{
+}
+.x-dlg .x-dlg-bg-center {
+ padding: 0px 4px 4px 4px;
+ background:transparent url(/static/images/extjs/vista/basic-dialog/bg-center.gif) repeat-x bottom;
+ zoom:1;
+}
+.x-dlg .x-dlg-bg-left{
+ padding-left:4px;
+ background:transparent url(/static/images/extjs/vista/basic-dialog/bg-left.gif) no-repeat bottom left;
+ zoom:1;
+}
+.x-dlg .x-dlg-bg-right{
+ padding-right:4px;
+ background:transparent url(/static/images/extjs/vista/basic-dialog/bg-right.gif) no-repeat bottom right;
+ zoom:1;
+}
+.x-dlg .x-tabs-top .x-tabs-body{
+ border:0 none;
+}
+.x-dlg .x-tabs-bottom .x-tabs-body{
+ border:1px solid #b3b6b0;
+ border-bottom:0 none;
+}
+.x-dlg .x-layout-container .x-tabs-body{
+ border:0 none;
+}
+.x-dlg .x-dlg-close {
+ background-image:url(/static/images/extjs/vista/basic-dialog/close.gif);
+}
+.x-dlg .x-dlg-collapse {
+ background-image:url(/static/images/extjs/vista/basic-dialog/collapse.gif);
+}
+.x-dlg-collapsed .x-dlg-collapse {
+ background-image:url(/static/images/extjs/vista/basic-dialog/expand.gif);
+}
+.x-dlg div.x-resizable-handle-east{
+ background-image:url(/static/images/extjs/vista/s.gif);
+ border:0 none;
+}
+.x-dlg div.x-resizable-handle-south{
+ background-image:url(/static/images/extjs/vista/s.gif);
+ border:0 none;
+}
+.x-dlg div.x-resizable-handle-west{
+ background-image:url(/static/images/extjs/vista/s.gif);
+ border:0 none;
+}
+.x-dlg div.x-resizable-handle-southeast{
+ background-image:url(/static/images/extjs/vista/s.gif);
+ background-position: bottom right;
+ width:8px;
+ height:8px;
+ border:0;
+}
+.x-dlg div.x-resizable-handle-southwest{
+ background-image:url(/static/images/extjs/vista/s.gif);
+ background-position: top right;
+ margin-left:1px;
+ margin-bottom:1px;
+ border:0;
+}
+.x-dlg div.x-resizable-handle-north{
+ background-image:url(/static/images/extjs/vista/s.gif);
+ border:0 none;
+}
+
+/* QuickTips */
+
+.x-tip .x-tip-top {
+ background-image: url(/static/images/extjs/vista/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-top-left {
+ background-image: url(/static/images/extjs/vista/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-top-right {
+ background-image: url(/static/images/extjs/vista/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-ft {
+ background-image: url(/static/images/extjs/vista/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-ft-left {
+ background-image: url(/static/images/extjs/vista/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-ft-right {
+ background-image: url(/static/images/extjs/vista/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-bd-left {
+ background-image: url(/static/images/extjs/vista/qtip/tip-sprite.gif);
+}
+.x-tip .x-tip-bd-right {
+ background-image: url(/static/images/extjs/vista/qtip/tip-sprite.gif);
+}
+
+.x-tip .x-tip-bd-inner {
+ padding:2px;
+}
+
+/* BorderLayout */
+.x-layout-container{
+ background:#4f4f4f;
+}
+.x-layout-collapsed{
+ background-color:#9f9f9f;
+ border:1px solid #4c535c;
+}
+.x-layout-collapsed-over{
+ background-color:#bfbfbf;
+}
+.x-layout-panel{
+ border:1px solid #4c535c;
+}
+.x-layout-nested-layout .x-layout-panel {
+ border:0 none;
+}
+.x-layout-split{
+ background-color:#f3f2e7;
+}
+.x-layout-panel-hd{
+ background-image: url(/static/images/extjs/vista/layout/panel-title-bg.gif);
+ border-bottom:1px solid #b5bac1;
+ color:white;
+}
+.x-layout-panel-hd-text{
+ color:white;
+}
+.x-layout-tools-button-over{
+ border:1px solid #4c535c;
+ background:#9f9f9f url(/static/images/extjs/vista/layout/panel-title-bg.gif) repeat-x;
+}
+.x-layout-close{
+ background-image:url(/static/images/extjs/vista/layout/tab-close.gif);
+}
+
+.x-layout-stick{
+ background-image:url(/static/images/extjs/vista/layout/stick.gif);
+}
+.x-layout-collapse-west,.x-layout-expand-east{
+ background-image:url(/static/images/extjs/vista/layout/collapse.gif);
+}
+.x-layout-expand-west,.x-layout-collapse-east{
+ background-image:url(/static/images/extjs/vista/layout/expand.gif);
+}
+.x-layout-collapse-north,.x-layout-expand-south{
+ background-image:url(/static/images/extjs/vista/layout/ns-collapse.gif);
+}
+.x-layout-expand-north,.x-layout-collapse-south{
+ background-image:url(/static/images/extjs/vista/layout/ns-expand.gif);
+}
+.x-layout-split-h{
+ background:#9f9f9f;
+}
+.x-layout-split-v{
+ background:#9f9f9f;
+}
+.x-layout-panel .x-tabs-wrap{
+ background:#4f4f4f;
+}
+.x-layout-nested-layout .x-layout-panel-north {
+ border-bottom:1px solid #4c535c;
+}
+.x-layout-nested-layout .x-layout-panel-south {
+ border-top:1px solid #4c535c;
+}
+.x-layout-nested-layout .x-layout-panel-east {
+ border-left:1px solid #4c535c;
+}
+.x-layout-nested-layout .x-layout-panel-west {
+ border-right:1px solid #4c535c;
+}
+.x-layout-panel-dragover {
+ border: 2px solid #4c535c;
+}
+.x-layout-panel-proxy {
+ background-image: url(/static/images/extjs/vista/layout/gradient-bg.gif);
+ background-color:#f3f2e7;
+ border:1px dashed #4c535c;
+}
+
+.x-layout-container .x-layout-tabs-body{
+ border:0 none;
+}
+/** Resizable */
+
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east{
+ background:url(/static/images/extjs/vista/sizer/e-handle.gif);
+ background-position: left;
+}
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-west{
+ background:url(/static/images/extjs/vista/sizer/e-handle.gif);
+ background-position: left;
+}
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south{
+ background:url(/static/images/extjs/vista/sizer/s-handle.gif);
+ background-position: top;
+}
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-north{
+ background:url(/static/images/extjs/vista/sizer/s-handle.gif);
+ background-position: top;
+}
+.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{
+ background:url(/static/images/extjs/vista/sizer/se-handle.gif);
+ background-position: top left;
+}
+.x-resizable-over .x-resizable-handle-northwest,.x-resizable-pinned .x-resizable-handle-northwest{
+ background:url(/static/images/extjs/vista/sizer/nw-handle.gif);
+ background-position:bottom right;
+}
+.x-resizable-over .x-resizable-handle-northeast,.x-resizable-pinned .x-resizable-handle-northeast{
+ background:url(/static/images/extjs/vista/sizer/ne-handle.gif);
+ background-position: bottom left;
+}
+.x-resizable-over .x-resizable-handle-southwest,.x-resizable-pinned .x-resizable-handle-southwest{
+ background:url(/static/images/extjs/vista/sizer/sw-handle.gif);
+ background-position: top right;
+}
+.x-resizable-proxy{
+ border: 1px dashed #615e55;
+}
+
+/** Toolbar */
+.x-toolbar{
+ border:0 none;
+ background: #efefe3 url(/static/images/extjs/vista/toolbar/gray-bg.gif) repeat-x;
+ padding:3px;
+}
+.x-toolbar .ytb-button-over{
+ border:1px solid transparent;
+ border-bottom:1px solid #bbbbbb;
+ border-top:1px solid #eeeeee;
+ background:#9f9f9f url(/static/images/extjs/vista/grid/grid-vista-hd.gif) repeat-x;
+}
+
+.x-paging-info {
+ color:#000;
+}
+/* grid */
+.x-grid-topbar .x-toolbar{
+ border:0;
+ border-bottom:1px solid #555;
+}
+.x-grid-bottombar .x-toolbar{
+ border:0;
+ border-top:1px solid #555;
+}
+.x-grid-locked .x-grid-body td {
+ background: #fafafa;
+ border-right: 1px solid #e1e1e1;
+ border-bottom: 1px solid #e1e1e1 !important;
+}
+.x-grid-locked .x-grid-body td .x-grid-cell-inner {
+ border-top:0 none;
+}
+.x-grid-locked .x-grid-row-alt td{
+ background: #f1f1f1;
+}
+.x-grid-locked .x-grid-row-selected td{
+ color: #fff !important;
+ background-color: #316ac5 !important;
+}
+.x-grid-hd{
+ border-bottom:0;
+ background:none;
+}
+.x-grid-hd-row{
+ height:auto;
+}
+.x-grid-split {
+ background-image: url(/static/images/extjs/vista/grid/grid-split.gif);
+}
+.x-grid-header{
+ background: url(/static/images/extjs/vista/grid/grid-vista-hd.gif);
+ border:0 none;
+ border-bottom:1px solid #555;
+}
+.x-grid-row-alt{
+ background-color: #f5f5f5;
+}
+.x-grid-row-over td{
+ background:#eeeeee;
+}
+.x-grid-col {
+ border-right: 1px solid #eee;
+ border-bottom: 1px solid #eee;
+}
+.x-grid-header .x-grid-hd-inner {
+ padding-bottom: 1px;
+}
+.x-grid-header .x-grid-hd-text {
+ padding-bottom: 3px;
+ color:#333333;
+}
+.x-grid-hd-over .x-grid-hd-inner {
+ border-bottom: 1px solid #555;
+ padding-bottom: 0;
+}
+.x-grid-hd-over .x-grid-hd-text {
+ background-color: #fafafa;
+ border-bottom: 1px solid #555;
+ padding-bottom: 2px;
+}
+.x-grid-header .sort-asc .x-grid-hd-inner, .x-grid-header .sort-desc .x-grid-hd-inner {
+ border-bottom: 1px solid #555;
+ padding-bottom: 0;
+}
+.x-grid-header .sort-asc .x-grid-hd-text, .x-grid-header .sort-desc .x-grid-hd-text {
+ border-bottom: 1px solid #3b5a82;
+ padding-bottom: 2px;
+}
+.x-dd-drag-proxy .x-grid-hd-inner{
+ background: url(/static/images/extjs/vista/grid/grid-vista-hd.gif) repeat-x;
+ height:22px;
+ width:120px;
+}
+.x-props-grid .x-grid-col-name{
+ background-color: #eee;
+}
+/* toolbar */
+.x-toolbar .ytb-sep{
+ background-image: url(/static/images/extjs/vista/grid/grid-split.gif);
+}
+
+.x-toolbar .x-btn-over .x-btn-left{
+ background:url(/static/images/extjs/vista/toolbar/tb-btn-sprite.gif) no-repeat 0 0px;
+}
+.x-toolbar .x-btn-over .x-btn-right{
+ background:url(/static/images/extjs/vista/toolbar/tb-btn-sprite.gif) no-repeat 0 -21px;
+}
+.x-toolbar .x-btn-over .x-btn-center{
+ background:url(/static/images/extjs/vista/toolbar/tb-btn-sprite.gif) repeat-x 0 -42px;
+}
+
+.x-toolbar .x-btn-click .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{
+ background:url(/static/images/extjs/vista/toolbar/tb-btn-sprite.gif) no-repeat 0 -63px;
+}
+.x-toolbar .x-btn-click .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{
+ background:url(/static/images/extjs/vista/toolbar/tb-btn-sprite.gif) no-repeat 0 -84px;
+}
+.x-toolbar .x-btn-click .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{
+ background:url(/static/images/extjs/vista/toolbar/tb-btn-sprite.gif) repeat-x 0 -105px;
+}
+
+/* combo box */
+.x-combo-list {
+ border:1px solid #999;
+ background:#dddddd;
+}
+.x-combo-list-hd {
+ background-image: url(/static/images/extjs/vista/layout/panel-title-bg.gif);
+ border-bottom:1px solid #b5bac1;
+ color:white;
+}
+.x-resizable-pinned .x-combo-list-inner {
+ border-bottom:1px solid #aaa;
+}
+.x-combo-list .x-combo-selected{
+ background:#ddd !important;
+ border:1px solid #aaa;
+}
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/aero-close-over.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/aero-close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/bg-center.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/bg-left.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/bg-right.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/collapse-over.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/e-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/expand-over.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/hd-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/s-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/se-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/basic-dialog/w-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/gradient-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/grid-blue-split.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/grid-hrow.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/grid-split.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/grid-vista-hd.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/pspbrwse.jbf
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/sort-col-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/sort_asc.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/grid/sort_desc.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/gradient-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/ns-collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/ns-expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/panel-close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/panel-title-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/panel-title-light-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/tab-close-on.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/layout/tab-close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/qtip/bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/s.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/e-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/e-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/ne-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/ne-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/nw-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/nw-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/s-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/s-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/se-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/se-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/sw-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/sizer/sw-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-btm-inactive-left-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-btm-inactive-right-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-btm-left-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-btm-right-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-strip-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-strip-bg.png
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/tabs/tab-strip-btm-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/toolbar/bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/aero/toolbar/tb-btn-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/btn-arrow.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/btn-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/e-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/hd-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/progress.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/progress2.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/s-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/basic-dialog/se-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/corners-blue.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/corners.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/l-blue.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/l.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/r-blue.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/r.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/tb-blue.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/box/tb.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/dd/drop-add.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/dd/drop-no.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/dd/drop-yes.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/date-trigger.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/error-tip-corners.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/exclamation.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/text-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/form/trigger.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/gradient-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/Thumbs.db
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/arrow-left-white.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/arrow-right-white.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/col-move-bottom.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/col-move-top.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/dirty.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/done.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/drop-no.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/drop-yes.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/footer-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-blue-hd.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-blue-split.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-hrow.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-loading.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-split.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/grid-vista-hd.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-asc.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-desc.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-lock.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-lock.png
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-unlock.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/hmenu-unlock.png
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/invalid_line.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/loading.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/mso-hd.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/nowait.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-first-disabled.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-first.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-last-disabled.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-last.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-next-disabled.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-next.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-prev-disabled.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/page-prev.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/pick-button.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/refresh.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/sort_asc.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/sort_desc.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/grid/wait.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/gradient-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/ns-collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/ns-expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/panel-close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/panel-title-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/panel-title-light-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/stick.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/stuck.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/tab-close-on.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/layout/tab-close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/checked.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/group-checked.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/menu-parent.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/menu.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/menu/unchecked.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/qtip/bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/qtip/close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/qtip/tip-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/s.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shadow-lr.png
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shadow.png
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shared/calendar.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shared/left-btn.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shared/right-btn.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/shared/warning.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/e-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/e-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/ne-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/ne-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/nw-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/nw-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/s-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/s-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/se-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/se-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/square.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/sw-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/sizer/sw-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/tab-btm-inactive-left-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/tab-btm-inactive-right-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/tab-btm-left-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/tab-btm-right-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tabs/tab-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/btn-arrow-light.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/btn-arrow.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/btn-over-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/gray-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/tb-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/toolbar/tb-btn-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-add.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-between.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-no.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-over.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-under.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/drop-yes.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-end-minus-nl.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-end-minus.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-end-plus-nl.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-end-plus.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-end.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-line.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-minus-nl.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-minus.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-plus-nl.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow-plus.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/elbow.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/folder-open.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/folder.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/leaf.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/loading.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/default/tree/s.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/dlg-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/e-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/hd-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/s-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/basic-dialog/se-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/gradient-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/grid/grid-hrow.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/gradient-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/ns-collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/ns-expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/panel-close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/panel-title-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/panel-title-light-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/stick.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/tab-close-on.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/layout/tab-close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/checked.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/group-checked.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/menu-parent.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/menu.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/menu/unchecked.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/qtip/bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/qtip/tip-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/s.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/e-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/e-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/ne-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/ne-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/nw-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/nw-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/s-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/s-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/se-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/se-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/sw-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/sizer/sw-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/tab-btm-inactive-left-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/tab-btm-inactive-right-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/tab-btm-left-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/tab-btm-right-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/tabs/tab-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/toolbar/gray-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/gray/toolbar/tb-btn-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/bg-center.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/bg-left.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/bg-right.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/dlg-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/e-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/hd-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/s-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/se-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/basic-dialog/w-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/gradient-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/grid/grid-split.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/grid/grid-vista-hd.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/gradient-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/ns-collapse.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/ns-expand.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/panel-close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/panel-title-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/panel-title-light-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/stick.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/tab-close-on.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/layout/tab-close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/qtip/bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/qtip/tip-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/s.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/e-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/e-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/ne-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/ne-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/nw-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/nw-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/s-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/s-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/se-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/se-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/sw-handle-dark.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/sizer/sw-handle.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/tab-btm-inactive-left-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/tab-btm-inactive-right-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/tab-btm-left-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/tab-btm-right-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/tabs/tab-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/toolbar/gray-bg.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/images/extjs/vista/toolbar/tb-btn-sprite.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/jquery/ext-jquery-adapter.js
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/jquery/ext-jquery-adapter.js Mon Apr 16 13:59:52 2007
@@ -0,0 +1,12 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+Ext={};window["undefined"]=window["undefined"];Ext.apply=function(o,c,_3){if(_3){Ext.apply(o,_3);}if(o&&c&&typeof c=="object"){for(var p in c){o[p]=c[p];}}return o;};(function(){var _5=0;var ua=navigator.userAgent.toLowerCase();var _7=document.compatMode=="CSS1Compat",_8=ua.indexOf("opera")>-1,_9=(/webkit|khtml/).test(ua),_a=ua.indexOf("msie")>-1,_b=ua.indexOf("msie 7")>-1,_c=!_9&&ua.indexOf("gecko")>-1,_d=_a&&!_7,_e=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),_f=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1);if(_a&&!_b){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}Ext.apply(Ext,{isStrict:_7,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p];}}}return o;},id:function(el,_14){_14=_14||"ext-gen";el=Ext.getDom(el);var id=_14+(++_5);return el?(el.id?el.id:(el.id=id)):id;},extend:function(){var io=function(o){for(var m in o){this[m]=o[m];}};return function(sc,sp,_1b){var F=function(){},scp,spp=sp.prototype;F.prototype=spp;scp=sc.prototype=new F();scp.constructor=sc;sc.superclass=spp;if(spp.constructor==Object.prototype.constructor){spp.constructor=sp;}sc.override=function(o){Ext.override(sc,o);};scp.override=io;Ext.override(sc,_1b);return sc;};}(),override:function(_20,_21){if(_21){var p=_20.prototype;for(var _23 in _21){p[_23]=_21[_23];}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i10000){clearInterval(iid);}var el=document.getElementById(id);if(el){clearInterval(iid);fn.call(_24||window,el);}};var iid=setInterval(f,50);},resolveTextNode:function(_29){if(_29&&3==_29.nodeType){return _29.parentNode;}else{return _29;}},getRelatedTarget:function(ev){ev=ev.browserEvent||ev;var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else{if(ev.type=="mouseover"){t=ev.fromElement;}}}return this.resolveTextNode(t);}};Ext.lib.Ajax=function(){var _2c=function(cb){return function(xhr,_2f){if((_2f=="error"||_2f=="timeout")&&cb.failure){cb.failure.call(cb.scope||window,{responseText:xhr.responseText,responseXML:xhr.responseXML,argument:cb.argument});}else{if(cb.success){cb.success.call(cb.scope||window,{responseText:xhr.responseText,responseXML:xhr.responseXML,argument:cb.argument});}}};};return {request:function(_30,uri,cb,_33){jQuery.ajax({type:_30,url:uri,data:_33,timeout:cb.timeout,complete:_2c(cb)});},formRequest:function(_34,uri,cb,_37,_38,_39){jQuery.ajax({type:"POST",url:uri,data:jQuery(_34).formSerialize()+(_37?"&"+_37:""),timeout:cb.timeout,complete:_2c(cb)});},isCallInProgress:function(_3a){return false;},abort:function(_3b){return false;},serializeForm:function(_3c){return jQuery(_3c.dom||_3c).formSerialize();}};}();Ext.lib.Anim=function(){var _3d=function(cb,_3f){var _40=true;return {stop:function(_41){},isAnimated:function(){return _40;},proxyCallback:function(){_40=false;Ext.callback(cb,_3f);}};};return {scroll:function(el,_43,_44,_45,cb,_47){var _48=_3d(cb,_47);el=Ext.getDom(el);el.scrollLeft=_43.to[0];el.scrollTop=_43.to[1];_48.proxyCallback();return _48;},motion:function(el,_4a,_4b,_4c,cb,_4e){return this.run(el,_4a,_4b,_4c,cb,_4e);},color:function(el,_50,_51,_52,cb,_54){var _55=_3d(cb,_54);_55.proxyCallback();return _55;},run:function(el,_57,_58,_59,cb,_5b,_5c){var _5d=_3d(cb,_5b);var o={};for(var k in _57){switch(k){case "points":var by,pts,e=Ext.fly(el,"_animrun");e.position();if(by=_57.points.by){var xy=e.getXY();pts=e.translatePoints([xy[0]+by[0],xy[1]+by[1]]);}else{pts=e.translatePoints(_57.points.to);}o.left=pts.left;o.top=pts.top;if(!parseInt(e.getStyle("left"),10)){e.setLeft(0);}if(!parseInt(e.getStyle("top"),10)){e.setTop(0);}break;case "width":o.width=_57.width.to;break;case "height":o.height=_57.height.to;break;case "opacity":o.opacity=_57.opacity.to;break;default:o[k]=_57[k].to;break;}}jQuery(el).animate(o,_58*1000,undefined,_5d.proxyCallback);return _5d;}};}();Ext.lib.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};Ext.lib.Region.prototype={contains:function(_68){return (_68.left>=this.left&&_68.right<=this.right&&_68.top>=this.top&&_68.bottom<=this.bottom);},getArea:function(){return ((this.bottom-this.top)*(this.right-this.left));},intersect:function(_69){var t=Math.max(this.top,_69.top);var r=Math.min(this.right,_69.right);var b=Math.min(this.bottom,_69.bottom);var l=Math.max(this.left,_69.left);if(b>=t&&r>=l){return new Ext.lib.Region(t,r,b,l);}else{return null;}},union:function(_6e){var t=Math.min(this.top,_6e.top);var r=Math.max(this.right,_6e.right);var b=Math.max(this.bottom,_6e.bottom);var l=Math.min(this.left,_6e.left);return new Ext.lib.Region(t,r,b,l);},adjust:function(t,l,b,r){this.top+=t;this.left+=l;this.right+=r;this.bottom+=b;return this;}};Ext.lib.Region.getRegion=function(el){var p=Ext.lib.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new Ext.lib.Region(t,r,b,l);};Ext.lib.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};Ext.lib.Point.prototype=new Ext.lib.Region();if(Ext.isIE){jQuery(window).unload(function(){var p=Function.prototype;delete p.createSequence;delete p.defer;delete p.createDelegate;delete p.createCallback;delete p.createInterceptor;});}})();
+
Added: jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/prototype/ext-prototype-adapter.js
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/prototype/ext-prototype-adapter.js Mon Apr 16 13:59:52 2007
@@ -0,0 +1,12 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+Ext={};window["undefined"]=window["undefined"];Ext.apply=function(o,c,_3){if(_3){Ext.apply(o,_3);}if(o&&c&&typeof c=="object"){for(var p in c){o[p]=c[p];}}return o;};(function(){var _5=0;var ua=navigator.userAgent.toLowerCase();var _7=document.compatMode=="CSS1Compat",_8=ua.indexOf("opera")>-1,_9=(/webkit|khtml/).test(ua),_a=ua.indexOf("msie")>-1,_b=ua.indexOf("msie 7")>-1,_c=!_9&&ua.indexOf("gecko")>-1,_d=_a&&!_7,_e=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),_f=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1);if(_a&&!_b){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}Ext.apply(Ext,{isStrict:_7,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p];}}}return o;},id:function(el,_14){_14=_14||"ext-gen";el=Ext.getDom(el);var id=_14+(++_5);return el?(el.id?el.id:(el.id=id)):id;},extend:function(){var io=function(o){for(var m in o){this[m]=o[m];}};return function(sc,sp,_1b){var F=function(){},scp,spp=sp.prototype;F.prototype=spp;scp=sc.prototype=new F();scp.constructor=sc;sc.superclass=spp;if(spp.constructor==Object.prototype.constructor){spp.constructor=sp;}sc.override=function(o){Ext.override(sc,o);};scp.override=io;Ext.override(sc,_1b);return sc;};}(),override:function(_20,_21){if(_21){var p=_20.prototype;for(var _23 in _21){p[_23]=_21[_23];}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i10000){clearInterval(iid);}var el=document.getElementById(id);if(el){clearInterval(iid);fn.call(_35||window,el);}};iid=setInterval(f,50);}};Ext.lib.Ajax=function(){var _3b=function(cb){return cb.success?function(xhr){cb.success.call(cb.scope||window,{responseText:xhr.responseText,responseXML:xhr.responseXML,argument:cb.argument});}:Ext.emptyFn;};var _3e=function(cb){return cb.failure?function(xhr){cb.failure.call(cb.scope||window,{responseText:xhr.responseText,responseXML:xhr.responseXML,argument:cb.argument});}:Ext.emptyFn;};return {request:function(_41,uri,cb,_44){new Ajax.Request(uri,{method:_41,parameters:_44||"",timeout:cb.timeout,onSuccess:_3b(cb),onFailure:_3e(cb)});},formRequest:function(_45,uri,cb,_48,_49,_4a){new Ajax.Request(uri,{method:"POST",parameters:Form.serialize(_45)+(_48?"&"+_48:""),timeout:cb.timeout,onSuccess:_3b(cb),onFailure:_3e(cb)});},isCallInProgress:function(_4b){return false;},abort:function(_4c){return false;},serializeForm:function(_4d){return Form.serialize(_4d.dom||_4d,true);}};}();Ext.lib.Anim=function(){var _4e={easeOut:function(pos){return 1-Math.pow(1-pos,2);},easeIn:function(pos){return 1-Math.pow(1-pos,2);}};var _51=function(cb,_53){return {stop:function(_54){this.effect.cancel();},isAnimated:function(){return this.effect.state=="running";},proxyCallback:function(){Ext.callback(cb,_53);}};};return {scroll:function(el,_56,_57,_58,cb,_5a){var _5b=_51(cb,_5a);el=Ext.getDom(el);el.scrollLeft=_56.to[0];el.scrollTop=_56.to[1];_5b.proxyCallback();return _5b;},motion:function(el,_5d,_5e,_5f,cb,_61){return this.run(el,_5d,_5e,_5f,cb,_61);},color:function(el,_63,_64,_65,cb,_67){return this.run(el,_63,_64,_65,cb,_67);},run:function(el,_69,_6a,_6b,cb,_6d,_6e){var o={};for(var k in _69){switch(k){case "points":var by,pts,e=Ext.fly(el,"_animrun");e.position();if(by=_69.points.by){var xy=e.getXY();pts=e.translatePoints([xy[0]+by[0],xy[1]+by[1]]);}else{pts=e.translatePoints(_69.points.to);}o.left=pts.left+"px";o.top=pts.top+"px";break;case "width":o.width=_69.width.to+"px";break;case "height":o.height=_69.height.to+"px";break;case "opacity":o.opacity=String(_69.opacity.to);break;default:o[k]=String(_69[k].to);break;}}var _75=_51(cb,_6d);_75.effect=new Effect.Morph(Ext.id(el),{duration:_6a,afterFinish:_75.proxyCallback,transition:_4e[_6b]||Effect.Transitions.linear,style:o});return _75;}};}();function fly(el){if(!_1){_1=new Ext.Element.Flyweight();}_1.dom=el;return _1;}Ext.lib.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};Ext.lib.Region.prototype={contains:function(_7b){return (_7b.left>=this.left&&_7b.right<=this.right&&_7b.top>=this.top&&_7b.bottom<=this.bottom);},getArea:function(){return ((this.bottom-this.top)*(this.right-this.left));},intersect:function(_7c){var t=Math.max(this.top,_7c.top);var r=Math.min(this.right,_7c.right);var b=Math.min(this.bottom,_7c.bottom);var l=Math.max(this.left,_7c.left);if(b>=t&&r>=l){return new Ext.lib.Region(t,r,b,l);}else{return null;}},union:function(_81){var t=Math.min(this.top,_81.top);var r=Math.max(this.right,_81.right);var b=Math.max(this.bottom,_81.bottom);var l=Math.min(this.left,_81.left);return new Ext.lib.Region(t,r,b,l);},adjust:function(t,l,b,r){this.top+=t;this.left+=l;this.right+=r;this.bottom+=b;return this;}};Ext.lib.Region.getRegion=function(el){var p=Ext.lib.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new Ext.lib.Region(t,r,b,l);};Ext.lib.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};Ext.lib.Point.prototype=new Ext.lib.Region();if(Ext.isIE){Event.observe(window,"unload",function(){var p=Function.prototype;delete p.createSequence;delete p.defer;delete p.createDelegate;delete p.createCallback;delete p.createInterceptor;});}})();
+
Added: jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/yui/ext-yui-adapter.js
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/adapter/yui/ext-yui-adapter.js Mon Apr 16 13:59:52 2007
@@ -0,0 +1,12 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+Ext={};window["undefined"]=window["undefined"];Ext.apply=function(o,c,_3){if(_3){Ext.apply(o,_3);}if(o&&c&&typeof c=="object"){for(var p in c){o[p]=c[p];}}return o;};(function(){var _5=0;var ua=navigator.userAgent.toLowerCase();var _7=document.compatMode=="CSS1Compat",_8=ua.indexOf("opera")>-1,_9=(/webkit|khtml/).test(ua),_a=ua.indexOf("msie")>-1,_b=ua.indexOf("msie 7")>-1,_c=!_9&&ua.indexOf("gecko")>-1,_d=_a&&!_7,_e=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),_f=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1);if(_a&&!_b){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}Ext.apply(Ext,{isStrict:_7,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p];}}}return o;},id:function(el,_14){_14=_14||"ext-gen";el=Ext.getDom(el);var id=_14+(++_5);return el?(el.id?el.id:(el.id=id)):id;},extend:function(){var io=function(o){for(var m in o){this[m]=o[m];}};return function(sc,sp,_1b){var F=function(){},scp,spp=sp.prototype;F.prototype=spp;scp=sc.prototype=new F();scp.constructor=sc;sc.superclass=spp;if(spp.constructor==Object.prototype.constructor){spp.constructor=sp;}sc.override=function(o){Ext.override(sc,o);};scp.override=io;Ext.override(sc,_1b);return sc;};}(),override:function(_20,_21){if(_21){var p=_20.prototype;for(var _23 in _21){p[_23]=_21[_23];}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i-1){return true;}else{return YAHOO.lang.isObject(obj)&&obj.constructor==Array;}},isBoolean:function(obj){return typeof obj=="boolean";},isFunction:function(obj){return typeof obj=="function";},isNull:function(obj){return obj===null;},isNumber:function(obj){return typeof obj=="number"&&isFinite(obj);},isObject:function(obj){return typeof obj=="object"||YAHOO.lang.isFunction(obj);},isString:function(obj){return typeof obj=="string";},isUndefined:function(obj){return typeof obj=="undefined";},hasOwnProperty:function(obj,_21){if(Object.prototype.hasOwnProperty){return obj.hasOwnProperty(_21);}return !YAHOO.lang.isUndefined(obj[_21])&&obj.constructor.prototype[_21]!==obj[_21];},extend:function(_22,_23,_24){var F=function(){};F.prototype=_23.prototype;_22.prototype=new F();_22.prototype.constructor=_22;_22.superclass=_23.prototype;if(_23.prototype.constructor==Object.prototype.constructor){_23.prototype.constructor=_23;}if(_24){for(var i in _24){_22.prototype[i]=_24[i];}}},augment:function(r,s){var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i-1),_8=(ua.indexOf("safari")>-1),_9=(!_7&&!_8&&ua.indexOf("gecko")>-1),_a=(!_7&&ua.indexOf("msie")>-1);var _b={HYPHEN:/(-[a-z])/i};var _c=function(_d){if(!_b.HYPHEN.test(_d)){return _d;}if(_5[_d]){return _5[_d];}while(_b.HYPHEN.exec(_d)){_d=_d.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}_5[_d]=_d;return _d;};if(document.defaultView&&document.defaultView.getComputedStyle){_2=function(el,_f){var _10=null;var _11=document.defaultView.getComputedStyle(el,"");if(_11){_10=_11[_c(_f)];}return el.style[_f]||_10;};}else{if(document.documentElement.currentStyle&&_a){_2=function(el,_13){switch(_c(_13)){case "opacity":var val=100;try{val=el.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(e){try{val=el.filters("alpha").opacity;}catch(e){}}return val/100;break;default:var _15=el.currentStyle?el.currentStyle[_13]:null;return (el.style[_13]||_15);}};}else{_2=function(el,_17){return el.style[_17];};}}if(_a){_3=function(el,_19,val){switch(_19){case "opacity":if(typeof el.style.filter=="string"){el.style.filter="alpha(opacity="+val*100+")";if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}break;default:el.style[_19]=val;}};}else{_3=function(el,_1c,val){el.style[_1c]=val;};}YAHOO.util.Dom={get:function(el){if(!el){return null;}if(typeof el!="string"&&!(el instanceof Array)){return el;}if(typeof el=="string"){return document.getElementById(el);}else{var _1f=[];for(var i=0,len=el.length;i=this.left&&_8d.right<=this.right&&_8d.top>=this.top&&_8d.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return ((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(_8e){var t=Math.max(this.top,_8e.top);var r=Math.min(this.right,_8e.right);var b=Math.min(this.bottom,_8e.bottom);var l=Math.max(this.left,_8e.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(_93){var t=Math.min(this.top,_93.top);var r=Math.max(this.right,_93.right);var b=Math.max(this.bottom,_93.bottom);var l=Math.min(this.left,_93.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return ("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.0",build:"127"});
+
+if(!YAHOO.util.Event){YAHOO.util.Event=function(){var _1=false;var _2=[];var _3=[];var _4=[];var _5=[];var _6=0;var _7=[];var _8=[];var _9=0;var _a=null;return {POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/KHTML/gi).test(navigator.userAgent),webkit:function(){var v=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);if(v&&v[1]){return v[1];}return null;}(),isIE:(!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var _c=this;var _d=function(){_c._tryPreloadAttach();};this._interval=setInterval(_d,this.POLL_INTERVAL);}},onAvailable:function(_e,_f,_10,_11){_7.push({id:_e,fn:_f,obj:_10,override:_11,checkReady:false});_6=this.POLL_RETRYS;this.startInterval();},onContentReady:function(_12,_13,_14,_15){_7.push({id:_12,fn:_13,obj:_14,override:_15,checkReady:true});_6=this.POLL_RETRYS;this.startInterval();},addListener:function(el,_17,fn,obj,_1a){if(!fn||!fn.call){return false;}if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i=0){_3d=_2[_3e];}if(!el||!_3d){return false;}if(this.useLegacyEvent(el,_37)){var _3f=this.getLegacyIndex(el,_37);var _40=_5[_3f];if(_40){for(i=0,len=_40.length;i0);}var _62=[];for(var i=0,len=_7.length;i0){for(var i=0,len=_74.length;i0){j=_2.length;while(j){_7e=j-1;l=_2[_7e];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],_7e);}j=j-1;}l=null;EU.clearCache();}for(i=0,len=_4.length;i0){_a7=_a1[0];}ret=s.fn.call(_a6,_a7,s.obj);}else{ret=s.fn.call(_a6,this.type,_a1,s.obj);}if(false===ret){if(!this.silent){}return false;}}}return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i=200&&_16<300){_17=this.createResponseObject(o,_14.argument);if(_14.success){if(!_14.scope){_14.success(_17);}else{_14.success.apply(_14.scope,[_17]);}}}else{switch(_16){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:_17=this.createExceptionObject(o.tId,_14.argument,(_15?_15:false));if(_14.failure){if(!_14.scope){_14.failure(_17);}else{_14.failure.apply(_14.scope,[_17]);}}break;default:_17=this.createResponseObject(o,_14.argument);if(_14.failure){if(!_14.scope){_14.failure(_17);}else{_14.failure.apply(_14.scope,[_17]);}}}}this.releaseObject(o);_17=null;},createResponseObject:function(o,_19){var obj={};var _1b={};try{var _1c=o.conn.getAllResponseHeaders();var _1d=_1c.split("\n");for(var i=0;i<_1d.length;i++){var _1f=_1d[i].indexOf(":");if(_1f!=-1){_1b[_1d[i].substring(0,_1f)]=_1d[i].substring(_1f+2);}}}catch(e){}obj.tId=o.tId;obj.status=o.conn.status;obj.statusText=o.conn.statusText;obj.getResponseHeader=_1b;obj.getAllResponseHeaders=_1c;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof _19!==undefined){obj.argument=_19;}return obj;},createExceptionObject:function(tId,_21,_22){var _23=0;var _24="communication failure";var _25=-1;var _26="transaction aborted";var obj={};obj.tId=tId;if(_22){obj.status=_25;obj.statusText=_26;}else{obj.status=_23;obj.statusText=_24;}if(_21){obj.argument=_21;}return obj;},initHeader:function(_28,_29,_2a){var _2b=(_2a)?this._default_headers:this._http_headers;if(_2b[_28]===undefined){_2b[_28]=_29;}else{_2b[_28]=_29+","+_2b[_28];}if(_2a){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(o){if(this._has_default_headers){for(var _2d in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,_2d)){o.conn.setRequestHeader(_2d,this._default_headers[_2d]);}}}if(this._has_http_headers){for(var _2d in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,_2d)){o.conn.setRequestHeader(_2d,this._http_headers[_2d]);}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(_2e,_2f,_30){this.resetFormState();var _31;if(typeof _2e=="string"){_31=(document.getElementById(_2e)||document.forms[_2e]);}else{if(typeof _2e=="object"){_31=_2e;}else{return;}}if(_2f){this.createFrame(_30?_30:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=_31;return;}var _32,_33,_34,_35;var _36=false;for(var i=0;i<_31.elements.length;i++){_32=_31.elements[i];_35=_31.elements[i].disabled;_33=_31.elements[i].name;_34=_31.elements[i].value;if(!_35&&_33){switch(_32.type){case "select-one":case "select-multiple":for(var j=0;j<_32.options.length;j++){if(_32.options[j].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(_33)+"="+encodeURIComponent(_32.options[j].attributes["value"].specified?_32.options[j].value:_32.options[j].text)+"&";}else{this._sFormData+=encodeURIComponent(_33)+"="+encodeURIComponent(_32.options[j].hasAttribute("value")?_32.options[j].value:_32.options[j].text)+"&";}}}break;case "radio":case "checkbox":if(_32.checked){this._sFormData+=encodeURIComponent(_33)+"="+encodeURIComponent(_34)+"&";}break;case "file":case undefined:case "reset":case "button":break;case "submit":if(_36==false){this._sFormData+=encodeURIComponent(_33)+"="+encodeURIComponent(_34)+"&";_36=true;}break;default:this._sFormData+=encodeURIComponent(_33)+"="+encodeURIComponent(_34)+"&";break;}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(_39){var _3a="yuiIO"+this._transaction_id;if(window.ActiveXObject){var io=document.createElement("");if(typeof _39=="boolean"){io.src="javascript:false";}else{if(typeof secureURI=="string"){io.src=_39;}}}else{var io=document.createElement("iframe");io.id=_3a;io.name=_3a;}io.style.position="absolute";io.style.top="-1000px";io.style.left="-1000px";document.body.appendChild(io);},appendPostData:function(_3c){var _3d=[];var _3e=_3c.split("&");for(var i=0;i<_3e.length;i++){var _40=_3e[i].indexOf("=");if(_40!=-1){_3d[i]=document.createElement("input");_3d[i].type="hidden";_3d[i].name=_3e[i].substring(0,_40);_3d[i].value=_3e[i].substring(_40+1);this._formNode.appendChild(_3d[i]);}}return _3d;},uploadFile:function(id,_42,uri,_44){var _45="yuiIO"+id;var _46="multipart/form-data";var io=document.getElementById(_45);this._formNode.action=uri;this._formNode.method="POST";this._formNode.target=_45;if(this._formNode.encoding){this._formNode.encoding=_46;}else{this._formNode.enctype=_46;}if(_44){var _48=this.appendPostData(_44);}this._formNode.submit();if(_48&&_48.length>0){for(var i=0;i<_48.length;i++){this._formNode.removeChild(_48[i]);}}this.resetFormState();var _4a=function(){var obj={};obj.tId=id;obj.argument=_42.argument;try{obj.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;obj.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;}catch(e){}if(_42&&_42.upload){if(!_42.scope){_42.upload(obj);}else{_42.upload.apply(_42.scope,[obj]);}}if(YAHOO.util.Event){YAHOO.util.Event.removeListener(io,"load",_4a);}else{if(window.detachEvent){io.detachEvent("onload",_4a);}else{io.removeEventListener("load",_4a,false);}}setTimeout(function(){document.body.removeChild(io);},100);};if(YAHOO.util.Event){YAHOO.util.Event.addListener(io,"load",_4a);}else{if(window.attachEvent){io.attachEvent("onload",_4a);}else{io.addEventListener("load",_4a,false);}}},abort:function(o,_4d,_4e){if(this.isCallInProgress(o)){o.conn.abort();window.clearInterval(this._poll[o.tId]);delete this._poll[o.tId];if(_4e){delete this._timeOut[o.tId];}this.handleTransactionResponse(o,_4d,true);return true;}else{return false;}},isCallInProgress:function(o){if(o.conn){return o.conn.readyState!=4&&o.conn.readyState!=0;}else{return false;}},releaseObject:function(o){o.conn=null;o=null;}};YAHOO.register("connection",YAHOO.widget.Module,{version:"2.2.0",build:"127"});
+
+YAHOO.util.Anim=function(el,_2,_3,_4){if(el){this.init(el,_2,_3,_4);}};YAHOO.util.Anim.prototype={toString:function(){var el=this.getEl();var id=el.id||el.tagName;return ("Anim "+id);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(_7,_8,_9){return this.method(this.currentFrame,_8,_9-_8,this.totalFrames);},setAttribute:function(_a,_b,_c){if(this.patterns.noNegatives.test(_a)){_b=(_b>0)?_b:0;}YAHOO.util.Dom.setStyle(this.getEl(),_a,_b+_c);},getAttribute:function(_d){var el=this.getEl();var _f=YAHOO.util.Dom.getStyle(el,_d);if(_f!=="auto"&&!this.patterns.offsetUnit.test(_f)){return parseFloat(_f);}var a=this.patterns.offsetAttribute.exec(_d)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,"position")=="absolute"&&pos)){_f=el["offset"+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{_f=0;}return _f;},getDefaultUnit:function(_13){if(this.patterns.defaultUnit.test(_13)){return "px";}return "";},setRuntimeAttribute:function(_14){var _15;var end;var _17=this.attributes;this.runtimeAttributes[_14]={};var _18=function(_19){return (typeof _19!=="undefined");};if(!_18(_17[_14]["to"])&&!_18(_17[_14]["by"])){return false;}_15=(_18(_17[_14]["from"]))?_17[_14]["from"]:this.getAttribute(_14);if(_18(_17[_14]["to"])){end=_17[_14]["to"];}else{if(_18(_17[_14]["by"])){if(_15.constructor==Array){end=[];for(var i=0,len=_15.length;i0&&isFinite(_43)){if(_3e.currentFrame+_43>=_3f){_43=_3f-(_40+1);}_3e.currentFrame+=_43;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(_44,t){var n=_44.length;var tmp=[];for(var i=0;i0&&!(_c8[0] instanceof Array)){_c8=[_c8];}else{var tmp=[];for(i=0,len=_c8.length;i0){this.runtimeAttributes[_c4]=this.runtimeAttributes[_c4].concat(_c8);}this.runtimeAttributes[_c4][this.runtimeAttributes[_c4].length]=end;}else{_b6.setRuntimeAttribute.call(this,_c4);}};var _ce=function(val,_d1){var _d2=Y.Dom.getXY(this.getEl());val=[val[0]-_d2[0]+_d1[0],val[1]-_d2[1]+_d1[1]];return val;};var _cd=function(_d3){return (typeof _d3!=="undefined");};})();(function(){YAHOO.util.Scroll=function(el,_d5,_d6,_d7){if(el){YAHOO.util.Scroll.superclass.constructor.call(this,el,_d5,_d6,_d7);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var Y=YAHOO.util;var _d9=Y.Scroll.superclass;var _da=Y.Scroll.prototype;_da.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return ("Scroll "+id);};_da.doMethod=function(_dd,_de,end){var val=null;if(_dd=="scroll"){val=[this.method(this.currentFrame,_de[0],end[0]-_de[0],this.totalFrames),this.method(this.currentFrame,_de[1],end[1]-_de[1],this.totalFrames)];}else{val=_d9.doMethod.call(this,_dd,_de,end);}return val;};_da.getAttribute=function(_e1){var val=null;var el=this.getEl();if(_e1=="scroll"){val=[el.scrollLeft,el.scrollTop];}else{val=_d9.getAttribute.call(this,_e1);}return val;};_da.setAttribute=function(_e4,val,_e6){var el=this.getEl();if(_e4=="scroll"){el.scrollLeft=val[0];el.scrollTop=val[1];}else{_d9.setAttribute.call(this,_e4,val,_e6);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.2.0",build:"127"});
+
Added: jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/ext-all.js
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/ExtJS/share/web/static/js/extjs/ext-all.js Mon Apr 16 13:59:52 2007
@@ -0,0 +1,254 @@
+/*
+ * Ext JS Library 1.0
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+Ext.DomHelper=function(){var _1=null;var _2=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var _3=function(o){if(typeof o=="string"){return o;}var b="";if(!o.tag){o.tag="div";}b+="<"+o.tag;for(var _6 in o){if(_6=="tag"||_6=="children"||_6=="cn"||_6=="html"||typeof o[_6]=="function"){continue;}if(_6=="style"){var s=o["style"];if(typeof s=="function"){s=s.call();}if(typeof s=="string"){b+=" style=\""+s+"\"";}else{if(typeof s=="object"){b+=" style=\"";for(var _8 in s){if(typeof s[_8]!="function"){b+=_8+":"+s[_8]+";";}}b+="\"";}}}else{if(_6=="cls"){b+=" class=\""+o["cls"]+"\"";}else{if(_6=="htmlFor"){b+=" for=\""+o["htmlFor"]+"\"";}else{b+=" "+_6+"=\""+o[_6]+"\"";}}}}if(_2.test(o.tag)){b+="/>";}else{b+=">";var cn=o.children||o.cn;if(cn){if(cn instanceof Array){for(var i=0,_b=cn.length;i<_b;i++){b+=_3(cn[i],b);}}else{b+=_3(cn,b);}}if(o.html){b+=o.html;}b+=""+o.tag+">";}return b;};var _c=function(o,_e){var el=document.createElement(o.tag);var _10=el.setAttribute?true:false;for(var _11 in o){if(_11=="tag"||_11=="children"||_11=="cn"||_11=="html"||_11=="style"||typeof o[_11]=="function"){continue;}if(_11=="cls"){el.className=o["cls"];}else{if(_10){el.setAttribute(_11,o[_11]);}else{el[_11]=o[_11];}}}Ext.DomHelper.applyStyles(el,o.style);var cn=o.children||o.cn;if(cn){if(cn instanceof Array){for(var i=0,len=cn.length;i",tbs=ts+"",tbe=" "+te,trs=tbs+"",tre=" "+tbe;var _22=function(tag,_24,el,_26){if(!_1){_1=document.createElement("div");}var _27;var _28=null;if(tag=="td"){if(_24=="afterbegin"||_24=="beforeend"){return;}if(_24=="beforebegin"){_28=el;el=el.parentNode;}else{_28=el.nextSibling;el=el.parentNode;}_27=_15(4,trs,_26,tre);}else{if(tag=="tr"){if(_24=="beforebegin"){_28=el;el=el.parentNode;_27=_15(3,tbs,_26,tbe);}else{if(_24=="afterend"){_28=el.nextSibling;el=el.parentNode;_27=_15(3,tbs,_26,tbe);}else{if(_24=="afterbegin"){_28=el.firstChild;}_27=_15(4,trs,_26,tre);}}}else{if(tag=="tbody"){if(_24=="beforebegin"){_28=el;el=el.parentNode;_27=_15(2,ts,_26,te);}else{if(_24=="afterend"){_28=el.nextSibling;el=el.parentNode;_27=_15(2,ts,_26,te);}else{if(_24=="afterbegin"){_28=el.firstChild;}_27=_15(3,tbs,_26,tbe);}}}else{if(_24=="beforebegin"||_24=="afterend"){return;}if(_24=="afterbegin"){_28=el.firstChild;}_27=_15(2,ts,_26,te);}}}el.insertBefore(_27,_28);return _27;};return {useDom:false,markup:function(o){return _3(o);},applyStyles:function(el,_2b){if(_2b){el=Ext.fly(el);if(typeof _2b=="string"){var re=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var _2d;while((_2d=re.exec(_2b))!=null){el.setStyle(_2d[1],_2d[2]);}}else{if(typeof _2b=="object"){for(var _2e in _2b){el.setStyle(_2e,_2b[_2e]);}}else{if(typeof _2b=="function"){Ext.DomHelper.applyStyles(el,_2b.call());}}}}},insertHtml:function(_2f,el,_31){_2f=_2f.toLowerCase();if(el.insertAdjacentHTML){var tag=el.tagName.toLowerCase();if(tag=="table"||tag=="tbody"||tag=="tr"||tag=="td"){var rs;if(rs=_22(tag,_2f,el,_31)){return rs;}}switch(_2f){case "beforebegin":el.insertAdjacentHTML(_2f,_31);return el.previousSibling;case "afterbegin":el.insertAdjacentHTML(_2f,_31);return el.firstChild;case "beforeend":el.insertAdjacentHTML(_2f,_31);return el.lastChild;case "afterend":el.insertAdjacentHTML(_2f,_31);return el.nextSibling;}throw "Illegal insertion point -> \""+_2f+"\"";}var _34=el.ownerDocument.createRange();var _35;switch(_2f){case "beforebegin":_34.setStartBefore(el);_35=_34.createContextualFragment(_31);el.parentNode.insertBefore(_35,el);return el.previousSibling;case "afterbegin":if(el.firstChild){_34.setStartBefore(el.firstChild);}else{_34.selectNodeContents(el);_34.collapse(true);}_35=_34.createContextualFragment(_31);el.insertBefore(_35,el.firstChild);return el.firstChild;case "beforeend":if(el.lastChild){_34.setStartAfter(el.lastChild);}else{_34.selectNodeContents(el);_34.collapse(false);}_35=_34.createContextualFragment(_31);el.appendChild(_35);return el.lastChild;case "afterend":_34.setStartAfter(el);_35=_34.createContextualFragment(_31);el.parentNode.insertBefore(_35,el.nextSibling);return el.nextSibling;}throw "Illegal insertion point -> \""+_2f+"\"";},insertBefore:function(el,o,_38){return this.doInsert(el,o,_38,"beforeBegin");},insertAfter:function(el,o,_3b){return this.doInsert(el,o,_3b,"afterEnd","nextSibling");},insertFirst:function(el,o,_3e){return this.doInsert(el,o,_3e,"afterBegin");},doInsert:function(el,o,_41,pos,_43){el=Ext.getDom(el);var _44;if(this.useDom){_44=_c(o,null);el.parentNode.insertBefore(_44,_43?el[_43]:el);}else{var _45=_3(o);_44=this.insertHtml(pos,el,_45);}return _41?Ext.get(_44,true):_44;},append:function(el,o,_48){el=Ext.getDom(el);var _49;if(this.useDom){_49=_c(o,null);el.appendChild(_49);}else{var _4a=_3(o);_49=this.insertHtml("beforeEnd",el,_4a);}return _48?Ext.get(_49,true):_49;},overwrite:function(el,o,_4d){el=Ext.getDom(el);el.innerHTML=_3(o);return _4d?Ext.get(el.firstChild,true):el.firstChild;},createTemplate:function(o){var _4f=_3(o);return new Ext.Template(_4f);}};}();
+
+Ext.Template=function(_1){if(_1 instanceof Array){_1=_1.join("");}else{if(arguments.length>1){_1=Array.prototype.join.call(arguments,"");}}this.html=_1;};Ext.Template.prototype={applyTemplate:function(_2){if(this.compiled){return this.compiled(_2);}var _3=this.disableFormats!==true;var fm=Ext.util.Format,_5=this;var fn=function(m,_8,_9,_a){if(_9&&_3){if(_9.substr(0,5)=="this."){return _5.call(_9.substr(5),_2[_8]);}else{if(_a){var re=/^\s*['"](.*)["']\s*$/;_a=_a.split(",");for(var i=0,_d=_a.length;i<_d;i++){_a[i]=_a[i].replace(re,"$1");}_a=[_2[_8]].concat(_a);}else{_a=[_2[_8]];}return fm[_9].apply(fm,_a);}}else{return _2[_8]!==undefined?_2[_8]:"";}};return this.html.replace(this.re,fn);},set:function(_e,_f){this.html=_e;this.compiled=null;if(_f){this.compile();}return this;},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Ext.util.Format;var _11=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,_15,_16,_17){if(_16&&_11){_17=_17?","+_17:"";if(_16.substr(0,5)!="this."){_16="fm."+_16+"(";}else{_16="this.call(\""+_16.substr(5)+"\", ";_17="";}}else{_17="",_16="(values['"+_15+"'] == undefined ? '' : ";}return "'"+sep+_16+"values['"+_15+"']"+_17+")"+sep+"'";};var _18;if(Ext.isGecko){_18="this.compiled = function(values){ return '"+this.html.replace(/(\r\n|\n)/g,"\\n").replace("'","\\'").replace(this.re,fn)+"';};";}else{_18=["this.compiled = function(values){ return ['"];_18.push(this.html.replace(/(\r\n|\n)/g,"\\n").replace("'","\\'").replace(this.re,fn));_18.push("'].join('');};");_18=_18.join("");}eval(_18);return this;},call:function(_19,_1a){return this[_19](_1a);},insertBefore:function(el,_1c,_1d){el=Ext.getDom(el);var _1e=Ext.DomHelper.insertHtml("beforeBegin",el,this.applyTemplate(_1c));return _1d?Ext.get(_1e,true):_1e;},insertAfter:function(el,_20,_21){el=Ext.getDom(el);var _22=Ext.DomHelper.insertHtml("afterEnd",el,this.applyTemplate(_20));return _21?Ext.get(_22,true):_22;},append:function(el,_24,_25){el=Ext.getDom(el);var _26=Ext.DomHelper.insertHtml("beforeEnd",el,this.applyTemplate(_24));return _25?Ext.get(_26,true):_26;},overwrite:function(el,_28,_29){el=Ext.getDom(el);el.innerHTML=this.applyTemplate(_28);return _29?Ext.get(el.firstChild,true):el.firstChild;}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomHelper.Template=Ext.Template;Ext.Template.from=function(el){el=Ext.getDom(el);return new Ext.Template(el.value||el.innerHTML);};Ext.MasterTemplate=function(){Ext.MasterTemplate.superclass.constructor.apply(this,arguments);this.originalHtml=this.html;var st={};var m,re=this.subTemplateRe;re.lastIndex=0;var _2e=0;while(m=re.exec(this.html)){var _2f=m[1],_30=m[2];st[_2e]={name:_2f,index:_2e,buffer:[],tpl:new Ext.Template(_30)};if(_2f){st[_2f]=st[_2e];}st[_2e].tpl.compile();st[_2e].tpl.call=this.call.createDelegate(this);_2e++;}this.subCount=_2e;this.subs=st;};Ext.extend(Ext.MasterTemplate,Ext.Template,{subTemplateRe:/((?:.|\n)*?)<\/tpl>/gi,add:function(_31,_32){if(arguments.length==1){_32=arguments[0];_31=0;}var s=this.subs[_31];s.buffer[s.buffer.length]=s.tpl.apply(_32);return this;},fill:function(_34,_35,_36){var a=arguments;if(a.length==1||(a.length==2&&typeof a[1]=="boolean")){_35=a[0];_34=0;_36=a[1];}if(_36){this.reset();}for(var i=0,len=_35.length;i]\s?|\s|$)/;var _8=/^(#)?([\w-\*]+)/;function child(p,_a){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(++i==_a){return n;}}n=n.nextSibling;}return null;}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n;}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n;}function clean(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!_4.test(n.nodeValue)){d.removeChild(n);}else{n.nodeIndex=++ni;}n=nx;}return this;}function byClassName(c,a,v,re,cn){if(!v){return c;}var r=[];for(var i=0,ci;ci=c[i];i++){cn=ci.className;if(cn&&(" "+cn+" ").indexOf(v)!=-1){r[r.length]=ci;}}return r;}function attrValue(n,_1c){if(!n.tagName&&typeof n.length!="undefined"){n=n[0];}if(!n){return null;}if(_1c=="for"){return n.htmlFor;}if(_1c=="class"||_1c=="className"){return n.className;}return n.getAttribute(_1c)||n[_1c];}function getNodes(ns,_1e,_1f){var _20=[],cs;if(!ns){return _20;}_1e=_1e?_1e.replace(_5,""):"";_1f=_1f||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns];}if(_1e!="/"&&_1e!=">"){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(_1f);for(var j=0,ci;ci=cs[j];j++){_20[_20.length]=ci;}}}else{for(var i=0,ni;ni=ns[i];i++){var cn=ni.getElementsByTagName(_1f);for(var j=0,cj;cj=cn[j];j++){if(cj.parentNode==ni){_20[_20.length]=cj;}}}}return _20;}function concat(a,b){if(b.slice){return a.concat(b);}for(var i=0,l=b.length;i0);},filter:function(els,ss,_92){ss=ss.replace(_5,"");if(!_2[ss]){_2[ss]=Ext.DomQuery.compile(ss,"simple");}var _93=_2[ss](els);return _92?quickDiff(_93,els):_93;},matchers:[{re:/^\.([\w-]+)/,select:"n = byClassName(n, null, \" {1} \");"},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:"n = byPseudo(n, \"{1}\", \"{2}\");"},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:"n = byAttribute(n, \"{2}\", \"{4}\", \"{3}\", \"{1}\");"},{re:/^#([\w-]+)/,select:"n = byId(n, null, \"{1}\");"},{re:/^@([\w-]+)/,select:"return {firstChild:{nodeValue:attrValue(n, \"{1}\")}};"}],operators:{"=":function(a,v){return a==v;},"!=":function(a,v){return a!=v;},"^=":function(a,v){return a&&a.substr(0,v.length)==v;},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v;},"*=":function(a,v){return a&&a.indexOf(v)!==-1;},"%=":function(a,v){return (a%v)==0;}},pseudos:{"first-child":function(c){var r=[],n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[r.length]=ci;}}return r;},"last-child":function(c){var r=[];for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[r.length]=ci;}}return r;},"nth-child":function(c,a){var r=[];if(a!="odd"&&a!="even"){for(var i=0,ci;ci=c[i];i++){var m=child(ci.parentNode,a);if(m==ci){r[r.length]=m;}}return r;}var p;for(var i=0,l=c.length;i0){r[r.length]=ci;}}return r;},"next":function(c,ss){var is=Ext.DomQuery.is;var r=[];for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[r.length]=ci;}}return r;},"prev":function(c,ss){var is=Ext.DomQuery.is;var r=[];for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[r.length]=ci;}}return r;}}};}();Ext.query=Ext.DomQuery.select;
+
+Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners;}};Ext.util.Observable.prototype={fireEvent:function(){var ce=this.events[arguments[0].toLowerCase()];if(typeof ce=="object"){return ce.fire.apply(ce,Array.prototype.slice.call(arguments,1));}else{return true;}},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(_2,fn,_4,o){if(typeof _2=="object"){o=_2;for(var e in o){if(this.filterOptRe.test(e)){continue;}if(typeof o[e]=="function"){this.addListener(e,o[e],o.scope,o);}else{this.addListener(e,o[e].fn,o[e].scope,o[e]);}}return;}o=(!o||typeof o=="boolean")?{}:o;_2=_2.toLowerCase();var ce=this.events[_2]||true;if(typeof ce=="boolean"){ce=new Ext.util.Event(this,_2);this.events[_2]=ce;}ce.addListener(fn,_4,o);},removeListener:function(_8,fn,_a){var ce=this.events[_8.toLowerCase()];if(typeof ce=="object"){ce.removeListener(fn,_a);}},purgeListeners:function(){for(var _c in this.events){if(typeof this.events[_c]=="object"){this.events[_c].clearListeners();}}},relayEvents:function(o,_e){var _f=function(_10){return function(){return this.fireEvent.apply(this,Ext.combine(_10,Array.prototype.slice.call(arguments,0)));};};for(var i=0,len=_e.length;i0;}};Ext.util.Observable.prototype.on=Ext.util.Observable.prototype.addListener;Ext.util.Observable.prototype.un=Ext.util.Observable.prototype.removeListener;Ext.util.Observable.capture=function(o,fn,_19){o.fireEvent=o.fireEvent.createInterceptor(fn,_19);};Ext.util.Observable.releaseCapture=function(o){o.fireEvent=Ext.util.Observable.prototype.fireEvent;};(function(){var _1b=function(h,o,_1e){var _1f=new Ext.util.DelayedTask();return function(){_1f.delay(o.buffer,h,_1e,Array.prototype.slice.call(arguments,0));};};var _20=function(h,e,fn,_24){return function(){e.removeListener(fn,_24);return h.apply(_24,arguments);};};var _25=function(h,o,_28){return function(){var _29=Array.prototype.slice.call(arguments,0);setTimeout(function(){h.apply(_28,_29);},o.delay||10);};};Ext.util.Event=function(obj,_2b){this.name=_2b;this.obj=obj;this.listeners=[];};Ext.util.Event.prototype={addListener:function(fn,_2d,_2e){var o=_2e||{};_2d=_2d||this.obj;if(!this.isListening(fn,_2d)){var l={fn:fn,scope:_2d,options:o};var h=fn;if(o.delay){h=_25(h,o,_2d);}if(o.single){h=_20(h,this,fn,_2d);}if(o.buffer){h=_1b(h,o,_2d);}l.fireFn=h;if(!this.firing){this.listeners.push(l);}else{this.listeners=this.listeners.slice(0);this.listeners.push(l);}}},findListener:function(fn,_33){_33=_33||this.obj;var ls=this.listeners;for(var i=0,len=ls.length;i0){this.firing=true;var _40=Array.prototype.slice.call(arguments,0);for(var i=0;i");E.on("ie-deferred-loader","readystatechange",function(){if(this.readyState=="complete"){_a();}});}else{if(Ext.isSafari){_2=setInterval(function(){var rs=document.readyState;if(rs=="complete"){_a();}},10);}}}E.on(window,"load",_a);};var _d=function(h,o){var _10=new Ext.util.DelayedTask(h);return function(e){e=new Ext.EventObjectImpl(e);_10.delay(o.buffer,h,null,[e]);};};var _12=function(h,el,_15,fn){return function(e){Ext.EventManager.removeListener(el,_15,fn);h(e);};};var _18=function(h,o){return function(e){e=new Ext.EventObjectImpl(e);setTimeout(function(){h(e);},o.delay||10);};};var _1c=function(_1d,_1e,opt,fn,_21){var o=(!opt||typeof opt=="boolean")?{}:opt;fn=fn||o.fn;_21=_21||o.scope;var el=Ext.getDom(_1d);if(!el){throw "Error listening for "+_1e+". Element "+_1d+" doesn't exist.";}var h=function(e){e=Ext.EventObject.setEvent(e);var t;if(o.delegate){t=e.getTarget(o.delegate,el);if(!t){return;}}else{t=e.target;}if(o.stopEvent===true){e.stopEvent();}if(o.preventDefault===true){e.preventDefault();}if(o.stopPropagation===true){e.stopPropagation();}if(o.normalized===false){e=e.browserEvent;}fn.call(_21||el,e,t,o);};if(o.delay){h=_18(h,o);}if(o.single){h=_12(h,el,_1e,fn);}if(o.buffer){h=_d(h,o);}fn._handlers=fn._handlers||[];fn._handlers.push([Ext.id(el),_1e,h]);E.on(el,_1e,h);if(_1e=="mousewheel"&&el.addEventListener){el.addEventListener("DOMMouseScroll",h,false);E.on(window,"unload",function(){el.removeEventListener("DOMMouseScroll",h,false);});}if(_1e=="mousedown"&&el==document){Ext.EventManager.stoppedMouseDownEvent.addListener(h);}return h;};var _27=function(el,_29,fn){var id=Ext.id(el),hds=fn._handlers;if(hds){for(var i=0,len=hds.length;i=33&&k<=40)||k==this.RETURN||k==this.TAB||k==this.ESC;},isSpecialKey:function(){var k=this.keyCode;return k==9||k==13||k==40||k==27||(k==16)||(k==17)||(k>=18&&k<=20)||(k>=33&&k<=35)||(k>=36&&k<=39)||(k>=44&&k<=45);},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this);}E.stopPropagation(this.browserEvent);}},getCharCode:function(){return this.charCode||this.keyCode;},getKey:function(){var k=this.keyCode||this.charCode;return Ext.isSafari?(_50[k]||k):k;},getPageX:function(){return this.xy[0];},getPageY:function(){return this.xy[1];},getTime:function(){if(this.browserEvent){return E.getTime(this.browserEvent);}return null;},getXY:function(){return this.xy;},getTarget:function(_57,_58,_59){return _57?Ext.fly(this.target).findParent(_57,_58,_59):this.target;},getRelatedTarget:function(){if(this.browserEvent){return E.getRelatedTarget(this.browserEvent);}return null;},getWheelDelta:function(){var e=this.browserEvent;var _5b=0;if(e.wheelDelta){_5b=e.wheelDelta/120;if(window.opera){_5b=-_5b;}}else{if(e.detail){_5b=-e.detail/3;}}return _5b;},hasModifier:function(){return ((this.ctrlKey||this.altKey)||this.shiftKey)?true:false;},within:function(el,_5d){var t=this[_5d?"getRelatedTarget":"getTarget"]();return t&&Ext.fly(el).contains(t);},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1]);}};return new Ext.EventObjectImpl();}();
+
+(function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var _4={};var _5=/(-[a-z])/gi;var _6=function(m,a){return a.charAt(1).toUpperCase();};var _9=document.defaultView;Ext.Element=function(_a,_b){var _c=typeof _a=="string"?document.getElementById(_a):_a;if(!_c){return null;}if(!_b&&Ext.Element.cache[_c.id]){return Ext.Element.cache[_c.id];}this.dom=_c;this.id=_c.id||Ext.id(_c);};var El=Ext.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(_e){this.visibilityMode=_e;return this;},enableDisplayMode:function(_f){this.setVisibilityMode(El.DISPLAY);if(typeof _f!="undefined"){this.originalDisplay=_f;}return this;},findParent:function(_10,_11,_12){var p=this.dom,b=document.body,_15=0,dq=Ext.DomQuery,_17;_11=_11||50;if(typeof _11!="number"){_17=Ext.getDom(_11);_11=10;}while(p&&p.nodeType==1&&_15<_11&&p!=b&&p!=_17){if(dq.is(p,_10)){return _12?Ext.get(p):p;}_15++;p=p.parentNode;}return null;},findParentNode:function(_18,_19,_1a){var p=Ext.fly(this.dom.parentNode,"_internal");return p?p.findParent(_18,_19,_1a):null;},up:function(_1c,_1d){return this.findParentNode(_1c,_1d,true);},is:function(_1e){return Ext.DomQuery.is(this.dom,_1e);},animate:function(_1f,_20,_21,_22,_23){this.anim(_1f,{duration:_20,callback:_21,easing:_22},_23);return this;},anim:function(_24,opt,_26,_27,_28,cb){_26=_26||"run";opt=opt||{};var _2a=Ext.lib.Anim[_26](this.dom,_24,(opt.duration||_27)||0.35,(opt.easing||_28)||"easeOut",function(){Ext.callback(cb,this);Ext.callback(opt.callback,opt.scope||this,[this,opt]);},this);opt.anim=_2a;return _2a;},preanim:function(a,i){return !a[i]?false:(typeof a[i]=="object"?a[i]:{duration:a[i+1],callback:a[i+2],easing:a[i+3]});},clean:function(_2d){if(this.isCleaned&&_2d!==true){return this;}var ns=/\S/;var d=this.dom,n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!ns.test(n.nodeValue)){d.removeChild(n);}else{n.nodeIndex=++ni;}n=nx;}this.isCleaned=true;return this;},calcOffsetsTo:function(el){el=Ext.get(el),d=el.dom;var _34=false;if(el.getStyle("position")=="static"){el.position("relative");_34=true;}var x=0,y=0;var op=this.dom;while(op&&op!=d&&op.tagName!="HTML"){x+=op.offsetLeft;y+=op.offsetTop;op=op.offsetParent;}if(_34){el.position("static");}return [x,y];},scrollIntoView:function(_38,_39){var c=Ext.getDom(_38)||document.body;var el=this.dom;var o=this.calcOffsetsTo(c),l=o[0],t=o[1],b=t+el.offsetHeight,r=l+el.offsetWidth;var ch=c.clientHeight;var ct=parseInt(c.scrollTop,10);var cl=parseInt(c.scrollLeft,10);var cb=ct+ch;var cr=cl+c.clientWidth;if(tcb){c.scrollTop=b-ch;}}if(_39!==false){if(lcr){c.scrollLeft=r-c.clientWidth;}}}return this;},scrollChildIntoView:function(_46){Ext.fly(_46,"_scrollChildIntoView").scrollIntoView(this);},autoHeight:function(_47,_48,_49,_4a){var _4b=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var _4c=parseInt(this.dom.scrollHeight,10);if(!_47){this.setHeight(_4c);this.unclip();if(typeof _49=="function"){_49();}}else{this.setHeight(_4b);this.setHeight(_4c,_47,_48,function(){this.unclip();if(typeof _49=="function"){_49();}}.createDelegate(this),_4a);}}.createDelegate(this),0);return this;},contains:function(el){if(!el){return false;}return D.isAncestor(this.dom,el.dom?el.dom:el);},isVisible:function(_4e){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");if(_4e!==true||!vis){return vis;}var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="body"){if(!Ext.fly(p,"_isVisible").isVisible()){return false;}p=p.parentNode;}return true;},select:function(_51,_52){return El.select("#"+Ext.id(this.dom)+" "+_51,_52);},query:function(_53,_54){return Ext.DomQuery.select(_53,this.dom);},child:function(_55,_56){var n=Ext.DomQuery.selectNode(_55,this.dom);return _56?n:Ext.get(n);},initDD:function(_58,_59,_5a){var dd=new Ext.dd.DD(Ext.id(this.dom),_58,_59);return Ext.apply(dd,_5a);},initDDProxy:function(_5c,_5d,_5e){var dd=new Ext.dd.DDProxy(Ext.id(this.dom),_5c,_5d);return Ext.apply(dd,_5e);},initDDTarget:function(_60,_61,_62){var dd=new Ext.dd.DDTarget(Ext.id(this.dom),_60,_61);return Ext.apply(dd,_62);},setVisible:function(_64,_65){if(!_65||!A){if(this.visibilityMode==El.DISPLAY){this.setDisplayed(_64);}else{this.fixDisplay();this.dom.style.visibility=_64?"visible":"hidden";}}else{var dom=this.dom;var _67=this.visibilityMode;if(_64){this.setOpacity(0.01);this.setVisible(true);}this.anim({opacity:{to:(_64?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!_64){if(_67==El.DISPLAY){dom.style.display="none";}else{dom.style.visibility="hidden";}Ext.get(dom).setOpacity(1);}});}return this;},isDisplayed:function(){return this.getStyle("display")!="none";},toggle:function(_68){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this;},setDisplayed:function(_69){if(typeof _69=="boolean"){_69=_69?this.originalDisplay:"none";}this.setStyle("display",_69);return this;},focus:function(){try{this.dom.focus();}catch(e){}return this;},blur:function(){try{this.dom.blur();}catch(e){}return this;},addClass:function(_6a){if(_6a instanceof Array){for(var i=0,len=_6a.length;idw){x=_f7?r.left-w:dw-w;}if(x<_f9){x=_f7?r.right:_f9;}if((y+h)>dh){y=_f6?r.top-h:dh-h;}if(y<_fa){y=_f6?r.bottom:_fa;}}return [x,y];},alignTo:function(_fb,_fc,_fd,_fe){var xy=this.getAlignToXY(_fb,_fc,_fd);this.setXY(xy,this.preanim(arguments,3));return this;},anchorTo:function(el,_101,_102,_103,_104,_105){var _106=function(){this.alignTo(el,_101,_102,_103);Ext.callback(_105,this);};Ext.EventManager.onWindowResize(_106,this);var tm=typeof _104;if(tm!="undefined"){Ext.EventManager.on(window,"scroll",_106,this,{buffer:tm=="number"?_104:50});}_106.call(this);return this;},clearOpacity:function(){if(window.ActiveXObject){this.dom.style.filter="";}else{this.dom.style.opacity="";this.dom.style["-moz-opacity"]="";this.dom.style["-khtml-opacity"]="";}return this;},hide:function(_108){this.setVisible(false,this.preanim(arguments,0));return this;},show:function(_109){this.setVisible(true,this.preanim(arguments,0));return this;},addUnits:function(size){return Ext.Element.addUnits(size,this.defaultUnit);},beginMeasure:function(){var el=this.dom;if(el.offsetWidth||el.offsetHeight){return this;}var _10c=[];var p=this.dom,b=document.body;while((!el.offsetWidth&&!el.offsetHeight)&&p&&p.tagName&&p!=b){var pe=Ext.get(p);if(pe.getStyle("display")=="none"){_10c.push({el:p,visibility:pe.getStyle("visibility")});p.style.visibility="hidden";p.style.display="block";}p=p.parentNode;}this._measureChanged=_10c;return this;},endMeasure:function(){var _110=this._measureChanged;if(_110){for(var i=0,len=_110.length;i";E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:");
return '';
From jifty-commit at lists.jifty.org Thu Apr 26 23:38:36 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Thu Apr 26 23:38:39 2007
Subject: [Jifty-commit] r3169 - in wifty/trunk: bin
Message-ID: <20070427033836.CA7204D80A3@diesel.bestpractical.com>
Author: kevinr
Date: Thu Apr 26 23:38:35 2007
New Revision: 3169
Modified:
wifty/trunk/ (props changed)
wifty/trunk/bin/jifty
Log:
r19918@sad-girl-in-snow: kevinr | 2007-04-26 23:38:12 -0400
* bin/jifty was out of date
Modified: wifty/trunk/bin/jifty
==============================================================================
--- wifty/trunk/bin/jifty (original)
+++ wifty/trunk/bin/jifty Thu Apr 26 23:38:35 2007
@@ -1,14 +1,15 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use warnings;
use strict;
use File::Basename qw(dirname);
+use UNIVERSAL::require;
BEGIN {
- my $dir = dirname(__FILE__);
- unshift @INC, "$dir/../../Jifty/lib";
- unshift @INC, "$dir/../lib";
- push @INC, "$dir/../../Jifty/deps";
+ Jifty::Util->require or die $UNIVERSAL::require::ERROR;
+ my $root = Jifty::Util->app_root;
+ unshift @INC, "$root/lib" if ($root);
}
use Jifty::Script;
+local $SIG{INT} = sub { warn "Stopped\n"; exit; };
Jifty::Script->dispatch();
From jifty-commit at lists.jifty.org Fri Apr 27 15:40:35 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 27 15:40:39 2007
Subject: [Jifty-commit] r3170 - in jifty/trunk: lib
Message-ID: <20070427194035.870524D809E@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 27 15:39:49 2007
New Revision: 3170
Modified:
jifty/trunk/ (props changed)
jifty/trunk/Changelog
jifty/trunk/MANIFEST
jifty/trunk/SIGNATURE
jifty/trunk/lib/Jifty.pm
Log:
r55834@pinglin: jesse | 2007-04-22 21:05:00 -0400
* 0.70422 releng
Modified: jifty/trunk/Changelog
==============================================================================
--- jifty/trunk/Changelog (original)
+++ jifty/trunk/Changelog Fri Apr 27 15:39:49 2007
@@ -1,3 +1,24 @@
+Jifty 0.70422
+
+[Password Authentication plugin]
+
+* Better "password reset" behaviour
+* added regression test for bug fix in Jifty::Plugin::Authentication::Password::Action::Signup
+* change manual for access control with user and authentication::password plugins
+* Revert the bogus warning silencing in 0.70416 as it kills Doxory example.
+ (reported by semifor++)
+
+[Core]
+
+* More debugging info for broken letmes
+* Added duck typing to the Jifty::Handle constructor to prevent difficult
+ to trace error messages when the driver name is mispelt or fails to load.
+* Jifty::Upgrade - Defensive programming against tables that did
+ not have "create table" in its schema for SQLite column renaming.
+* Jifty::Module::Pluggable - Silence the @ISA warnings.
+* Doc updates for Jifty::ClassLoader -- David Good
+* Created a method that can be over-ridden for custom test database setup
+* debian stuff, fr.po update
Jifty 0.70416
* New ExtJS plugin (For yahoo-ui ext)
Modified: jifty/trunk/MANIFEST
==============================================================================
--- jifty/trunk/MANIFEST (original)
+++ jifty/trunk/MANIFEST Fri Apr 27 15:39:49 2007
@@ -963,11 +963,14 @@
t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/FasterSwallow.pm
t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/FavoriteColor.pm
t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Bootstrap.pm
+t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/CurrentUser.pm
t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Dispatcher.pm
t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Model/User.pm
t/TestApp-Plugin-PasswordAuth/Makefile.PL
t/TestApp-Plugin-PasswordAuth/t/00-model-User.t
t/TestApp-Plugin-PasswordAuth/t/01-tokengen.t
+t/TestApp-Plugin-PasswordAuth/t/11-current_user.t
+t/TestApp-Plugin-PasswordAuth/t/12-signup.t
t/TestApp-Plugin-REST/bin/jifty
t/TestApp-Plugin-REST/etc/config.yml
t/TestApp-Plugin-REST/lib/TestApp/Plugin/REST/Action/DoSomething.pm
Modified: jifty/trunk/SIGNATURE
==============================================================================
--- jifty/trunk/SIGNATURE (original)
+++ jifty/trunk/SIGNATURE Fri Apr 27 15:39:49 2007
@@ -14,9 +14,9 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 ce845a63328d2beca5037d7e4c5f85e448ac30cb AUTHORS
-SHA1 8475e5958f8dedbb349027498a85d2c69a952e10 Changelog
-SHA1 155a4bc60d49b6a028bf53c17209dffbbd8f699b MANIFEST
+SHA1 7ce15e058bb6a72aa237ac58e0fbce934b2fef5c AUTHORS
+SHA1 876166ca6f2cf7bfa6a6137070beb1b55b4bc4ce Changelog
+SHA1 ed26a91a1edcc0aed0509bc7384b2d24cfd13d89 MANIFEST
SHA1 d4adbf5948041cd460da5cb7ad21394a790e2022 MANIFEST.SKIP
SHA1 85f15b04e047acd8c86edfca3f7760fa4c001584 META.yml
SHA1 c11c8ba944d2d9410d04593112e7ab951648d4fd Makefile.PL
@@ -27,7 +27,7 @@
SHA1 9a91a81e3db1a12368153fed9e504aad492cd971 bin/service
SHA1 543a2677f66d3c8ca671b790509b6c1721ac6270 bin/xgettext
SHA1 1c042485ba8a21f0f124dd8ed412d43d3805430e debian/README
-SHA1 dfcbf0974ad02c0e64e82d7f9b2bec91278634f3 debian/changelog
+SHA1 dee0467ffdb9142223c49789a447ba5dd299c28d debian/changelog
SHA1 5d9474c0309b7ca09a182d888f73b37a8fe1362c debian/compat
SHA1 c9a13c7f88cc191d5167bbdeebf5e7abbd776b0b debian/control
SHA1 8fc130ffa6d53c47d94eab1616887c511d54d61f debian/rules
@@ -138,7 +138,7 @@
SHA1 fe6780ea5cfd67c79140699fbd4f0fe262255d57 inc/Module/Install/Win32.pm
SHA1 51d43bffcfd7ffdecb8c8e9f97f3896c31b2e1b2 inc/Module/Install/WriteAll.pm
SHA1 c17e8f3cf8ebe1eb4929fd2bd2fd530a9de1abd0 lib/Email/Send/Jifty/Test.pm
-SHA1 5ec25871fb379024dbdaa0ed8b7147f18ffda8ac lib/Jifty.pm
+SHA1 0eb6271f949efa613d516c73cb672f7392c336b5 lib/Jifty.pm
SHA1 337627c441c5639405a2d2cc751c63616d25c221 lib/Jifty/API.pm
SHA1 7dc39eb45149bd3c9b7e1f19047657dbf84688df lib/Jifty/Action.pm
SHA1 d73654ad2f7edc2f1661ab866b1db609d83806b3 lib/Jifty/Action/Autocomplete.pm
@@ -149,7 +149,7 @@
SHA1 821d06cdd92876efd01e08800eae46e52e13c2a6 lib/Jifty/Action/Record/Update.pm
SHA1 ab7a0e0bae4cd1ecbda260b339a4116e65708a7f lib/Jifty/Action/Redirect.pm
SHA1 0334c7ad4458bca073fa22372b4775937a0852e1 lib/Jifty/Bootstrap.pm
-SHA1 cfda40c105abc7f0e5df0ab05895173be4dce03c lib/Jifty/ClassLoader.pm
+SHA1 7a3849fb30ecb9bb7c0c382b7cc44b6216516de2 lib/Jifty/ClassLoader.pm
SHA1 1009fa942a8cf3da853694f321d6f67d70613a79 lib/Jifty/Client.pm
SHA1 a4e91b327848fe1c5b76e4ffaa926300e4c1ef2f lib/Jifty/Collection.pm
SHA1 70ed11fa2fe5a196b5d5ee18e162e0f561dc7780 lib/Jifty/Config.pm
@@ -165,9 +165,9 @@
SHA1 947e5aee7b981e19042f3343050a129600b88772 lib/Jifty/Handler.pm
SHA1 c413c80506fe0a1da3154739249a9351982b1db2 lib/Jifty/I18N.pm
SHA1 fe370e2c51ca0f20cb0bce133b8c9067c02a524a lib/Jifty/JSON.pm
-SHA1 2ba1cebdcb72532f12f28f59754d75adc5e54e01 lib/Jifty/LetMe.pm
+SHA1 93d009a7d9a25975786b9ded3dcd5fdac90c9389 lib/Jifty/LetMe.pm
SHA1 1687a979438f24c95a6b857ab5305910108bfb49 lib/Jifty/Logger.pm
-SHA1 b03feba360a2fd7b7c9b8318a2680c62b0a42cdb lib/Jifty/Manual/AccessControl.pod
+SHA1 9a01a2e586aa5799fdc0f04c6240220d9dd953b9 lib/Jifty/Manual/AccessControl.pod
SHA1 ef9ff36385a9f780ac0204bffb9425818d78b789 lib/Jifty/Manual/Actions.pod
SHA1 d320630f6613f4aa1ec3b9537129fd9ca847fb61 lib/Jifty/Manual/Continuations.pod
SHA1 99848cf166e90d9c0963a65d09a627ba11a3613e lib/Jifty/Manual/Cookbook.pod
@@ -189,7 +189,7 @@
SHA1 c7a9988b0826f9c55af2415c7d314ff546193cee lib/Jifty/Model/Metadata.pm
SHA1 4b89786af61d1490286bc02c4c3a8edb95aa0b60 lib/Jifty/Model/Session.pm
SHA1 0efcdf22d66e521cf250c1398caf3aba93ed795d lib/Jifty/Model/SessionCollection.pm
-SHA1 95bf129e6c19868a63cf52f073bbe47db6d3f969 lib/Jifty/Module/Pluggable.pm
+SHA1 d15fc44fc8af2c4a7db3c2f08e1d69d6f397e734 lib/Jifty/Module/Pluggable.pm
SHA1 f7c511c6b0c6ccfc3c5fdc0bf0a4e224d78a9c40 lib/Jifty/Notification.pm
SHA1 7223070583b1b15f651db7a71b97e039e084aa4f lib/Jifty/Object.pm
SHA1 c3fde2a862013cd6284637d79c751c3c2e360720 lib/Jifty/Param.pm
@@ -199,18 +199,18 @@
SHA1 00354893bf1283e9cf1b52de5b41bdfb57a78811 lib/Jifty/Plugin/Authentication/Password.pm
SHA1 9f078a684545d3a9c075d83812cffeca0a3b633e lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm
SHA1 de9208f8911bc09594299b618a7ce05c71cac57e lib/Jifty/Plugin/Authentication/Password/Action/GeneratePasswordToken.pm
-SHA1 fe301993be96d5f1bcde396ee7e3826e6aeb4c32 lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
+SHA1 2da111cb0154fe09287b9c8db251b5d8720d0379 lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
SHA1 3ccf33cfd732343cfeeda7f2acc1df7c7da721fe lib/Jifty/Plugin/Authentication/Password/Action/Logout.pm
SHA1 074fe2fa59464a78b69558f2c20b39fe45a6e56e lib/Jifty/Plugin/Authentication/Password/Action/ResendConfirmation.pm
SHA1 eb20b698db12db185f08e4d0e0a6c39dc2c1432f lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm
SHA1 89d74967f85b631644d039393920646cfb772f2a lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm
SHA1 28604b89817992c647042420090a59fee0fe06bd lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm
-SHA1 96ea2fafc80417b27e9691bcf020103fdc7482b5 lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm
-SHA1 1d30106db1d074278fd646c378cc155b8e97716f lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm
-SHA1 4defcd42e3416040108a61bbd059ad9e51a88532 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm
+SHA1 3d0b444280c3b0ae577e0ada5cb3fd2eb8803f9f lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm
+SHA1 b0ccc1d001aeca18ad7466b531081805408b2010 lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm
+SHA1 3191af60483a20faf1d624da37929e3310ced14c lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm
SHA1 9711ece6f3637e972708c8bda313aaa57fd1b405 lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm
SHA1 f8e1724e5d0d3e490439f0ad761a96155ff1b5a4 lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmLostPassword.pm
-SHA1 3b912f2b6f80d5431c9e263dc16f77c0b36ebeb6 lib/Jifty/Plugin/Authentication/Password/View.pm
+SHA1 91272a6c9926cdacbfc10afe8624a35868a8e8be lib/Jifty/Plugin/Authentication/Password/View.pm
SHA1 da70c7fbcd78d7ae9bd53deb74a022d0eeea4a12 lib/Jifty/Plugin/ClassLoader.pm
SHA1 25d4c8b9459c9c299fb181d41539475a854309f0 lib/Jifty/Plugin/CompressedCSSandJS.pm
SHA1 3b6cb101e9e3465cefdb843fb9108cb126644284 lib/Jifty/Plugin/CompressedCSSandJS/Dispatcher.pm
@@ -255,7 +255,7 @@
SHA1 e7453a3cda290e60d5432e60e53bec8b92a91772 lib/Jifty/Server/Prefork/NetServer.pm
SHA1 4c51d2df15281788b74d080488b0c5959cd95a1a lib/Jifty/Subs.pm
SHA1 b3d122eed10c4ac3cba561913a42220c2f5ee085 lib/Jifty/Subs/Render.pm
-SHA1 2dac24c8d464f0823c2847ce382a967f017fd637 lib/Jifty/Test.pm
+SHA1 e15bde68ba67b141ae1565be066f1e1f171f63ec lib/Jifty/Test.pm
SHA1 0d6d53b5084bb89baea771d3e9d602a195255e37 lib/Jifty/Test/WWW/Mechanize.pm
SHA1 47c5840fafd56473a0e1a9228f169d3813317c13 lib/Jifty/TestServer.pm
SHA1 4614193951790ed53fc8682135cdb1b40d3fa975 lib/Jifty/Upgrade.pm
@@ -796,10 +796,10 @@
SHA1 608c393b35a8884b4d32a4c855bbcc73478dc849 share/plugins/Jifty/Plugin/OnlineDocs/web/templates/__jifty/online_docs/content.html
SHA1 58a4059cc383f792108986d2386a5e7edc81363f share/plugins/Jifty/Plugin/OnlineDocs/web/templates/__jifty/online_docs/index.html
SHA1 37555dd5c3acfbaecfc28416e0fa21b0aa6e1d77 share/plugins/Jifty/Plugin/OnlineDocs/web/templates/__jifty/online_docs/toc.html
-SHA1 7c9254ebc9576276665394ce0394a1f22a98e702 share/po/en.po
-SHA1 be64ba2089eed8163afc23145fc13aca072eb740 share/po/fr.po
-SHA1 8e1828aa8acbe74346907e759d1d48c547140e0d share/po/ja.po
-SHA1 59df94d159ce45bc55d4fe47eae42ab30bc1ec41 share/po/zh_cn.po
+SHA1 0da91e5da11aa851363d08a8f9aeade85f72aeb7 share/po/en.po
+SHA1 63a333ff328933df4082e868ba9115b3c0fa24bd share/po/fr.po
+SHA1 88408a7350d0599fd4e7cd7f709fd918b55b6b27 share/po/ja.po
+SHA1 94151e35cbd50a82e09f33718dad3f15fdb0416f share/po/zh_cn.po
SHA1 623dbb738a8db1e79de6127fc3af2c918d2c93e6 share/po/zh_tw.po
SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709 share/web/static/css/app-base.css
SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709 share/web/static/css/app.css
@@ -978,10 +978,13 @@
SHA1 deb71812bd1042f4ac4260a7b67340ff5f6e5c4d t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/FasterSwallow.pm
SHA1 f34586dcd0217789759de64af7720695c1d50a9a t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/FavoriteColor.pm
SHA1 a83f69587be10ffe3191bc04ed94f2b817b54ce4 t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Bootstrap.pm
-SHA1 54c886b94c444a3aaad3a593ab5bbf74b693c9ee t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Dispatcher.pm
-SHA1 d2cc091e340ec51e11212f7f11c4fdb9f7fa23ff t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Model/User.pm
-SHA1 bde1e56638abc9cb70b4f0de63eee14fea0ae766 t/TestApp-Plugin-PasswordAuth/t/00-model-User.t
+SHA1 9f38d7dd23e7568ec3979216f928a0ef7bdee0ed t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/CurrentUser.pm
+SHA1 62e2f19a611b7c87b3abcee1a4653c29caf7bc90 t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Dispatcher.pm
+SHA1 eb74aab3f1577160a69f5d5073ec07da7fda041e t/TestApp-Plugin-PasswordAuth/lib/TestApp/Plugin/PasswordAuth/Model/User.pm
+SHA1 7513161b6944b864a0d06f74ce230907e2064cf7 t/TestApp-Plugin-PasswordAuth/t/00-model-User.t
SHA1 cd358dc97050649f35034d8363590798a543799d t/TestApp-Plugin-PasswordAuth/t/01-tokengen.t
+SHA1 fda1f40fc6869572331ab18da6b57679b847d3f0 t/TestApp-Plugin-PasswordAuth/t/11-current_user.t
+SHA1 e39787081ffb2783de44db32157c6f3bf1631047 t/TestApp-Plugin-PasswordAuth/t/12-signup.t
SHA1 a7dc1f376cac630ea28d2965e561469deb951cc7 t/TestApp-Plugin-REST/bin/jifty
SHA1 4762d5e154fcbeb0b188a1ecb90c4997403c9d24 t/TestApp-Plugin-REST/etc/config.yml
SHA1 61845f11966aadecf3bb885fcc5b33ef66e9637f t/TestApp-Plugin-REST/lib/TestApp/Plugin/REST/Action/DoSomething.pm
@@ -1050,7 +1053,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
-iD8DBQFGI9myEi9d9xCOQEYRAu5RAKCwtRgYvLnplDFqWLDWu8ZKAHa37ACgtZ7h
-ecsyXp1y9GhIan806U5GAB8=
-=wNRA
+iD8DBQFGLAX/Ei9d9xCOQEYRAnSsAKC6QQRZGQFzdh1RYF6eRAfYxjg1KQCfU8ih
+Lh9Xz380qhLKc6AxFRUaZkM=
+=RTdf
-----END PGP SIGNATURE-----
Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm (original)
+++ jifty/trunk/lib/Jifty.pm Fri Apr 27 15:39:49 2007
@@ -11,7 +11,7 @@
require Time::Local;
# Declare early to make sure Jifty::Record::schema_version works
- $Jifty::VERSION = '0.70416';
+ $Jifty::VERSION = '0.70422';
}
=head1 NAME
From jifty-commit at lists.jifty.org Fri Apr 27 15:42:32 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Fri Apr 27 15:42:35 2007
Subject: [Jifty-commit] r3171 - in jifty/trunk:
lib/Jifty/Plugin/Authentication/Password
Message-ID: <20070427194232.9F01E4D809E@diesel.bestpractical.com>
Author: jesse
Date: Fri Apr 27 15:42:32 2007
New Revision: 3171
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm
Log:
r56083@pinglin: jesse | 2007-04-27 15:39:25 -0400
* remove debugging output
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm Fri Apr 27 15:42:32 2007
@@ -76,7 +76,6 @@
my $action = Jifty->web->new_action( class => 'ResetLostPassword' );
Jifty->web->form->start( call => $next );
- outs_raw($next);
render_param( $action => $_ ) for ( $action->argument_names );
form_return( label => _("New password"), submit => $action );
Jifty->web->form->end();
From jifty-commit at lists.jifty.org Sun Apr 29 05:11:36 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Sun Apr 29 05:11:39 2007
Subject: [Jifty-commit] r3172 - jifty/trunk/lib/Jifty/Web/Form/Field
Message-ID: <20070429091136.059044D80C7@diesel.bestpractical.com>
Author: gugod
Date: Sun Apr 29 05:11:35 2007
New Revision: 3172
Added:
jifty/trunk/lib/Jifty/Web/Form/Field/Collection.pm
Log:
This module is for rendering a collection of input fields at once
as a single widget. The major goal is to let developer say like:
column bars =>
refers_to "My::Model::BarCollection",
render as "Collection"
availables are defer {
retrieve_some_bars()
};
in their model class, and it'll just display a nice form to input
the value for a list of available bars.
Added: jifty/trunk/lib/Jifty/Web/Form/Field/Collection.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Web/Form/Field/Collection.pm Sun Apr 29 05:11:35 2007
@@ -0,0 +1,68 @@
+use warnings;
+use strict;
+
+package Jifty::Web::Form::Field::Collection;
+
+use base qw/Jifty::Web::Form::Field/;
+
+=head2 render_widget
+
+Renders the whole collection of available values.
+
+=cut
+
+sub render_widget {
+ my $self = shift;
+
+ for my $opt (@{ $self->action->available_values($self->name) }) {
+ $self->render_option($opt);
+ }
+}
+
+=head2 render_label
+
+Render a label for our own. We need to output the label as a span
+instead since the labels are associated with the individual options.
+
+=cut
+
+sub render_label {
+ my $self = shift;
+ Jifty->web->out(
+ qq!@{[_($self->label) ]} \n!
+ );
+
+ return '';
+}
+
+=head2 render_option option
+
+Renders a normal input field.
+
+=cut
+
+sub render_option {
+ my $self = shift;
+ my $opt = shift;
+ my $display = $opt->{'display'};
+ my $value = defined $opt->{'value'} ? $opt->{'value'} : "0";
+
+ my $id = $self->element_id . "-" . $value;
+ $id =~ s/\s+/_/;
+ my $field = qq! _widget_class;
+
+ $field .= qq{ />_widget_class;
+ $field .= qq{ >$display \n };
+
+ $field = qq{$field };
+
+ Jifty->web->out($field);
+ '';
+}
+
+1;
From jifty-commit at lists.jifty.org Mon Apr 30 09:39:26 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 09:39:31 2007
Subject: [Jifty-commit] r3173 - in jifty/trunk: lib/Jifty
lib/Jifty/View/Static
Message-ID: <20070430133926.0BA934D8158@diesel.bestpractical.com>
Author: jesse
Date: Mon Apr 30 09:39:25 2007
New Revision: 3173
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Dispatcher.pm
jifty/trunk/lib/Jifty/Handler.pm
jifty/trunk/lib/Jifty/View/Static/Handler.pm
Log:
r56108@pinglin: jesse | 2007-04-27 20:14:23 -0400
* More refactoring toward making view handlers plugins
Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm Mon Apr 30 09:39:25 2007
@@ -1127,8 +1127,8 @@
my $self = shift;
my $template = shift;
- foreach my $handler ( Jifty->handler->_template_handlers) {
- if ( Jifty->handler->$handler->template_exists($template) ) {
+ foreach my $handler ( Jifty->handler->template_handlers) {
+ if ( Jifty->handler->view($handler)->template_exists($template) ) {
return 1;
}
}
@@ -1146,21 +1146,21 @@
=cut
sub render_template {
- my $self = shift;
+ my $self = shift;
my $template = shift;
- my $showed = 0;
- eval {
- foreach my $handler (Jifty->handler->_template_handlers ) {
- if (Jifty->handler->$handler->template_exists($template) ) {
- $showed = 1;
- Jifty->handler->$handler->show($template);
- last;
- }
- }
- if (not $showed and my $fallback_handler = Jifty->handler->_fallback_template_handler) {
- Jifty->handler->$fallback_handler->show($template);
- }
-
+ my $showed = 0;
+ eval {
+ foreach my $handler ( Jifty->handler->template_handlers ) {
+ if ( Jifty->handler->view($handler)->template_exists($template) ) {
+ $showed = 1;
+ Jifty->handler->view($handler)->show($template);
+ last;
+ }
+ }
+ if ( not $showed and my $fallback_handler = Jifty->handler->_fallback_template_handler ) {
+ $fallback_handler->show($template);
+ }
+
};
my $err = $@;
@@ -1180,8 +1180,7 @@
# Redirect with a continuation
Jifty->web->_redirect( "/__jifty/error/mason_internal_error?J:C=" . $c->id );
- }
- elsif ($err) {
+ } elsif ($err) {
die $err;
}
Modified: jifty/trunk/lib/Jifty/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/Handler.pm Mon Apr 30 09:39:25 2007
@@ -48,7 +48,13 @@
-__PACKAGE__->mk_accessors(qw(mason dispatcher declare_handler static_handler cgi apache stash));
+__PACKAGE__->mk_accessors(qw(dispatcher view_handlers cgi apache stash));
+
+sub mason {
+ my $self = shift;
+ return $self->view_handlers()->{'Jifty::View::Mason::Handler'};
+}
+
=head2 new
@@ -72,8 +78,8 @@
return $self;
}
-sub _template_handlers { qw(declare_handler mason) }
-sub _fallback_template_handler { 'mason' }
+sub template_handlers { qw(Jifty::View::Static::Handler Jifty::View::Declare::Handler Jifty::View::Mason::Handler)}
+sub _fallback_template_handler { my $self = shift; return $self->mason; }
=head2 setup_view_handlers
@@ -86,9 +92,19 @@
sub setup_view_handlers {
my $self = shift;
- $self->declare_handler( Jifty::View::Declare::Handler->new());
- $self->mason( Jifty::View::Mason::Handler->new());
- $self->static_handler(Jifty::View::Static::Handler->new());
+ $self->view_handlers({});
+ foreach my $class ($self->template_handlers()) {
+ $self->view_handlers->{$class} = $class->new();
+ }
+
+}
+
+sub view {
+ my $self = shift;
+ my $class = shift;
+
+ return $self->view_handlers->{$class};
+
}
@@ -153,30 +169,22 @@
$self->apache( HTML::Mason::FakeApache->new( cgi => $self->cgi ) );
# Build a new stash for the life of this request
- $self->stash({});
+ $self->stash( {} );
local $HTML::Mason::Commands::JiftyWeb = Jifty::Web->new();
Jifty->web->request( Jifty::Request->new()->fill( $self->cgi ) );
Jifty->web->response( Jifty::Response->new );
Jifty->api->reset;
- $_->new_request for Jifty->plugins;
-
+ for ( Jifty->plugins ) {
+ $_->new_request;
+ }
Jifty->log->debug( "Received request for " . Jifty->web->request->path );
- my $sent_response = 0;
- $sent_response
- = $self->static_handler->handle_request( Jifty->web->request->path )
- if ( Jifty->config->framework('Web')->{'ServeStaticFiles'} );
-
- Jifty->web->setup_session unless $sent_response;
+ Jifty->web->setup_session;
# Return from the continuation if need be
Jifty->web->request->return_from_continuation;
-
- unless ($sent_response) {
- Jifty->web->session->set_cookie;
- $self->dispatcher->handle_request()
- }
-
+ Jifty->web->session->set_cookie;
+ $self->dispatcher->handle_request();
$self->cleanup_request();
}
Modified: jifty/trunk/lib/Jifty/View/Static/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Static/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/View/Static/Handler.pm Mon Apr 30 09:39:25 2007
@@ -62,6 +62,10 @@
=cut
+sub show {
+ shift->handle_request(@_);
+}
+
sub handle_request {
my $self = shift;
my $path = shift;
@@ -113,6 +117,10 @@
=cut
+sub template_exists {
+ shift->file_path(@_);
+}
+
sub file_path {
my $self = shift;
my $file = shift;
From jifty-commit at lists.jifty.org Mon Apr 30 09:39:37 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 09:39:38 2007
Subject: [Jifty-commit] r3174 - in jifty/trunk: lib/Jifty
Message-ID: <20070430133937.30F024D815C@diesel.bestpractical.com>
Author: jesse
Date: Mon Apr 30 09:39:36 2007
New Revision: 3174
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/LetMe.pm
Log:
r56109@pinglin: jesse | 2007-04-27 20:14:41 -0400
* quiet some warnings
Modified: jifty/trunk/lib/Jifty/LetMe.pm
==============================================================================
--- jifty/trunk/lib/Jifty/LetMe.pm (original)
+++ jifty/trunk/lib/Jifty/LetMe.pm Mon Apr 30 09:39:36 2007
@@ -97,7 +97,6 @@
return '' unless ($user->auth_token);
- Jifty->log->debug($user->id."Creating a digest of", join (', ', $user->auth_token, $self->path, $self->until));
# build an md5sum of the email token and until and our secret
my $digest = Digest::MD5->new();
$digest->add( $user->auth_token );
@@ -221,7 +220,6 @@
sub _generate_token {
my $self = shift;
my %args = (email => undef, @_);
- warn "Generating a token for ".YAML::Dump(\%args);
return join ('/',
$args{'email'},
$self->path,
From jifty-commit at lists.jifty.org Mon Apr 30 09:39:46 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 09:39:56 2007
Subject: [Jifty-commit] r3175 - jifty/trunk
Message-ID: <20070430133946.689434D815A@diesel.bestpractical.com>
Author: jesse
Date: Mon Apr 30 09:39:45 2007
New Revision: 3175
Modified:
jifty/trunk/ (props changed)
jifty/trunk/Makefile.PL
Log:
r56110@pinglin: jesse | 2007-04-27 20:15:05 -0400
* don't index plugins' test directories
Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL (original)
+++ jifty/trunk/Makefile.PL Mon Apr 30 09:39:45 2007
@@ -128,7 +128,7 @@
);
-no_index( directory => qw< debian doc examples share > );
+no_index( directory => qw< debian doc examples share plugins/*/t> );
no_index package => 'DB';
version_from('lib/Jifty.pm');
From jifty-commit at lists.jifty.org Mon Apr 30 09:40:02 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 09:40:03 2007
Subject: [Jifty-commit] r3176 - in jifty/trunk: lib/Jifty
lib/Jifty/View/Static
Message-ID: <20070430134002.854F04D8158@diesel.bestpractical.com>
Author: jesse
Date: Mon Apr 30 09:40:02 2007
New Revision: 3176
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Dispatcher.pm
jifty/trunk/lib/Jifty/Handler.pm
jifty/trunk/lib/Jifty/Util.pm
jifty/trunk/lib/Jifty/View/Static/Handler.pm
Log:
r56150@pinglin: jesse | 2007-04-30 09:23:11 -0400
* More refactoring in support of adding new view handlers.
Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm Mon Apr 30 09:40:02 2007
@@ -1127,7 +1127,7 @@
my $self = shift;
my $template = shift;
- foreach my $handler ( Jifty->handler->template_handlers) {
+ foreach my $handler ( Jifty->handler->view_handlers) {
if ( Jifty->handler->view($handler)->template_exists($template) ) {
return 1;
}
@@ -1150,14 +1150,14 @@
my $template = shift;
my $showed = 0;
eval {
- foreach my $handler ( Jifty->handler->template_handlers ) {
+ foreach my $handler ( Jifty->handler->view_handlers ) {
if ( Jifty->handler->view($handler)->template_exists($template) ) {
$showed = 1;
Jifty->handler->view($handler)->show($template);
last;
}
}
- if ( not $showed and my $fallback_handler = Jifty->handler->_fallback_template_handler ) {
+ if ( not $showed and my $fallback_handler = Jifty->handler->fallback_view_handler ) {
$fallback_handler->show($template);
}
Modified: jifty/trunk/lib/Jifty/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/Handler.pm Mon Apr 30 09:40:02 2007
@@ -48,11 +48,19 @@
-__PACKAGE__->mk_accessors(qw(dispatcher view_handlers cgi apache stash));
+__PACKAGE__->mk_accessors(qw(dispatcher _view_handlers cgi apache stash));
+
+=head2 mason
+
+
+Returns the Jifty c handler. While this "should" be just another template handler,
+we still rely on it for little bits of Jifty infrastructure. Patches welcome.
+
+=cut
sub mason {
my $self = shift;
- return $self->view_handlers()->{'Jifty::View::Mason::Handler'};
+ return $self->view('Jifty::View::Mason::Handler');
}
@@ -78,32 +86,57 @@
return $self;
}
-sub template_handlers { qw(Jifty::View::Static::Handler Jifty::View::Declare::Handler Jifty::View::Mason::Handler)}
-sub _fallback_template_handler { my $self = shift; return $self->mason; }
+
+=head2 view_handlers
+
+Returns a list of modules implementing view for your Jifty application.
+
+XXX TODO: this should take pluggable views
+
+=cut
+
+
+sub view_handlers { qw(Jifty::View::Static::Handler Jifty::View::Declare::Handler Jifty::View::Mason::Handler)}
+
+
+=head2 fallback_view_handler
+
+Returns the object for our "last-resort" view handler. By default, this is the L handler.
+
+=cut
+
+
+
+sub fallback_view_handler { my $self = shift; return $self->view('Jifty::View::Mason::Handler') }
=head2 setup_view_handlers
Initialize all of our view handlers.
-XXX TODO: this should take pluggable views
=cut
sub setup_view_handlers {
my $self = shift;
- $self->view_handlers({});
- foreach my $class ($self->template_handlers()) {
- $self->view_handlers->{$class} = $class->new();
+ $self->_view_handlers({});
+ foreach my $class ($self->view_handlers()) {
+ $self->_view_handlers->{$class} = $class->new();
}
}
+=head2 view ClassName
+
+
+Returns the Jifty view handler for C.
+
+=cut
+
sub view {
my $self = shift;
my $class = shift;
-
- return $self->view_handlers->{$class};
+ return $self->_view_handlers->{$class};
}
Modified: jifty/trunk/lib/Jifty/Util.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Util.pm (original)
+++ jifty/trunk/lib/Jifty/Util.pm Mon Apr 30 09:40:02 2007
@@ -201,7 +201,7 @@
=head2 make_path PATH
When handed a directory, creates that directory, starting as far up the
-chain as necessary. (This is what 'mkdir -p' does in your shell)
+chain as necessary. (This is what 'mkdir -p' does in your shell).
=cut
Modified: jifty/trunk/lib/Jifty/View/Static/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Static/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/View/Static/Handler.pm Mon Apr 30 09:40:02 2007
@@ -55,13 +55,21 @@
}
-=head2 handle_request $path
+=head2 show $path
Handle a request for C<$path>. If we can't find a static file of that name, return undef.
=cut
+=head2 handle_request $path
+
+
+An alias for L
+
+=cut
+
+
sub show {
shift->handle_request(@_);
}
@@ -117,6 +125,12 @@
=cut
+=head2 template_exists $path
+
+An alias for L.
+
+=cut
+
sub template_exists {
shift->file_path(@_);
}
From jifty-commit at lists.jifty.org Mon Apr 30 11:55:47 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 11:55:55 2007
Subject: [Jifty-commit] r3177 - jifty/trunk/lib/Jifty/Web/Form
Message-ID: <20070430155547.636174D8198@diesel.bestpractical.com>
Author: yves
Date: Mon Apr 30 11:55:39 2007
New Revision: 3177
Modified:
jifty/trunk/lib/Jifty/Web/Form/Element.pm
Log:
add the ability to have some code before a javascript click :
onclick => [ { beforeclick => ";" }, { args => ...
Modified: jifty/trunk/lib/Jifty/Web/Form/Element.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Element.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Element.pm Mon Apr 30 11:55:39 2007
@@ -111,6 +111,10 @@
A hashref of arguments to pass to the effect when it is created. These
can be used to change the duration of the effect, for instance.
+=item beforeclick => STRING
+
+String contains some Javascript code to be used before a click.
+
=item confirm => STRING
Prompt the user with a Javascript confirm dialog with the given text
@@ -234,6 +238,7 @@
my @fragments;
my %actions; # Maps actions => disable?
my $confirm;
+ my $beforeclick;
for my $hook (grep {ref $_ eq "HASH"} (@{$value})) {
@@ -254,6 +259,11 @@
$confirm = $hook->{confirm};
}
+ # Some code usable before onclick
+ if ($hook->{beforeclick}) {
+ $beforeclick = $hook->{beforeclick};
+ }
+
# Placement
if (exists $hook->{append}) {
@args{qw/mode path/} = ('Bottom', $hook->{append});
@@ -315,6 +325,9 @@
if ($confirm) {
$string = Jifty->web->escape("if(!confirm(" . Jifty::JSON::objToJson($confirm, {singlequote => 1}) . ")) { Event.stop(event); return false }") . $string;
}
+ if ($beforeclick) {
+ $string = Jifty->web->escape($beforeclick) . $string;
+ }
$response .= qq| $trigger="$string"|;
}
return $response;
From jifty-commit at lists.jifty.org Mon Apr 30 11:58:08 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 11:58:27 2007
Subject: [Jifty-commit] r3177 - jifty/trunk/lib/Jifty/Web/Form
In-Reply-To: <20070430155547.636174D8198@diesel.bestpractical.com>
References: <20070430155547.636174D8198@diesel.bestpractical.com>
Message-ID: <9446F86B-EC43-4818-B902-C9649382E3BE@bestpractical.com>
Any reason not to lift this so that 'beforeclick' is at the same
level as 'onclick'?
On Apr 30, 2007, at 11:55 AM, jifty-commit@lists.jifty.org wrote:
> Author: yves
> Date: Mon Apr 30 11:55:39 2007
> New Revision: 3177
>
> Modified:
> jifty/trunk/lib/Jifty/Web/Form/Element.pm
>
> Log:
> add the ability to have some code before a javascript click :
> onclick => [ { beforeclick => ";" }, { args => ...
>
>
> Modified: jifty/trunk/lib/Jifty/Web/Form/Element.pm
> ======================================================================
> ========
> --- jifty/trunk/lib/Jifty/Web/Form/Element.pm (original)
> +++ jifty/trunk/lib/Jifty/Web/Form/Element.pm Mon Apr 30 11:55:39 2007
> @@ -111,6 +111,10 @@
> A hashref of arguments to pass to the effect when it is created.
> These
> can be used to change the duration of the effect, for instance.
>
> +=item beforeclick => STRING
> +
> +String contains some Javascript code to be used before a click.
> +
> =item confirm => STRING
>
> Prompt the user with a Javascript confirm dialog with the given text
> @@ -234,6 +238,7 @@
> my @fragments;
> my %actions; # Maps actions => disable?
> my $confirm;
> + my $beforeclick;
>
> for my $hook (grep {ref $_ eq "HASH"} (@{$value})) {
>
> @@ -254,6 +259,11 @@
> $confirm = $hook->{confirm};
> }
>
> + # Some code usable before onclick
> + if ($hook->{beforeclick}) {
> + $beforeclick = $hook->{beforeclick};
> + }
> +
> # Placement
> if (exists $hook->{append}) {
> @args{qw/mode path/} = ('Bottom', $hook->{append});
> @@ -315,6 +325,9 @@
> if ($confirm) {
> $string = Jifty->web->escape("if(!confirm(" .
> Jifty::JSON::objToJson($confirm, {singlequote => 1}) . "))
> { Event.stop(event); return false }") . $string;
> }
> + if ($beforeclick) {
> + $string = Jifty->web->escape($beforeclick) . $string;
> + }
> $response .= qq| $trigger="$string"|;
> }
> return $response;
> _______________________________________________
> Jifty-commit mailing list
> Jifty-commit@lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-commit
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-commit/attachments/20070430/b4e054f2/PGP.pgp
From jifty-commit at lists.jifty.org Mon Apr 30 16:10:33 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 16:10:36 2007
Subject: [Jifty-commit] r3178 - in jifty/trunk: lib/Jifty/Script
Message-ID: <20070430201033.D90EA4D8084@diesel.bestpractical.com>
Author: jesse
Date: Mon Apr 30 16:10:33 2007
New Revision: 3178
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Script/FastCGI.pm
Log:
r56170@pinglin: jesse | 2007-04-30 16:10:24 -0400
* initial environment that makes fastcgi work got deleted
Modified: jifty/trunk/lib/Jifty/Script/FastCGI.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/FastCGI.pm (original)
+++ jifty/trunk/lib/Jifty/Script/FastCGI.pm Mon Apr 30 16:10:33 2007
@@ -21,7 +21,7 @@
# These two lines are FastCGI-specific; skip them to run in vanilla CGI mode
AddHandler fastcgi-script fcgi
- FastCgiServer /path/to/your/jifty/app/bin/jifty
+ FastCgiServer /path/to/your/jifty/app/bin/jifty -initial-env JIFTY_COMMAND=fastcgi
DocumentRoot /path/to/your/jifty/app/share/web/templates
ScriptAlias / /path/to/your/jifty/app/bin/jifty/
From jifty-commit at lists.jifty.org Mon Apr 30 16:31:31 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 16:31:34 2007
Subject: [Jifty-commit] r3179 - in jifty/trunk: lib/Jifty/View/Declare
Message-ID: <20070430203131.144D54D8084@diesel.bestpractical.com>
Author: jesse
Date: Mon Apr 30 16:31:31 2007
New Revision: 3179
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/View/Declare/Handler.pm
Log:
r56177@pinglin: jesse | 2007-04-30 16:31:23 -0400
* utf8::downgrade() content about to be sent out from a Template::Declare template. THIS WANTS A COMMENT FROM AUDREYT OR MIYAGAWA
Modified: jifty/trunk/lib/Jifty/View/Declare/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/View/Declare/Handler.pm Mon Apr 30 16:31:31 2007
@@ -5,7 +5,7 @@
use base qw/Jifty::Object Class::Accessor/;
use Template::Declare;
-use Encode ();
+use utf8 ();
__PACKAGE__->mk_accessors(qw/root_class/);
@@ -79,8 +79,8 @@
unless ( Jifty->handler->apache->http_header_sent ||Jifty->web->request->is_subrequest ) {
Jifty->handler->apache->send_http_header();
}
+ utf8::downgrade($content, 'FAILURE IS OK'); # Just before we go to stdout, we REALLY want to convert to octets.
print STDOUT $content;
- Encode::_utf8_on($content);
return undef;
}
From jifty-commit at lists.jifty.org Mon Apr 30 16:50:06 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 16:50:08 2007
Subject: [Jifty-commit] r3180 - in jifty/trunk: lib/Jifty/View/Declare
Message-ID: <20070430205006.3D6AD4D8084@diesel.bestpractical.com>
Author: jesse
Date: Mon Apr 30 16:50:05 2007
New Revision: 3180
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/View/Declare/Handler.pm
Log:
r56179@pinglin: jesse | 2007-04-30 16:49:58 -0400
* Miyagawa++ points out that 'use utf8' is wrong.
Modified: jifty/trunk/lib/Jifty/View/Declare/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/View/Declare/Handler.pm Mon Apr 30 16:50:05 2007
@@ -5,7 +5,6 @@
use base qw/Jifty::Object Class::Accessor/;
use Template::Declare;
-use utf8 ();
__PACKAGE__->mk_accessors(qw/root_class/);
From jifty-commit at lists.jifty.org Mon Apr 30 17:56:19 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 17:56:20 2007
Subject: [Jifty-commit] r3181 - in jifty/trunk/plugins/WyzzEditor: doc lib
lib/Jifty lib/Jifty/Plugin lib/Jifty/Plugin/WyzzEditor share
share/po share/web share/web/static share/web/static/img
share/web/static/img/wyzzicons share/web/static/js
share/web/static/js/wyzz share/web/static/wyzzstyles
share/web/templates t
Message-ID: <20070430215619.41A634D8084@diesel.bestpractical.com>
Author: yves
Date: Mon Apr 30 17:56:18 2007
New Revision: 3181
Added:
jifty/trunk/plugins/WyzzEditor/
jifty/trunk/plugins/WyzzEditor/Makefile.PL
jifty/trunk/plugins/WyzzEditor/doc/
jifty/trunk/plugins/WyzzEditor/lib/
jifty/trunk/plugins/WyzzEditor/lib/Jifty/
jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/
jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/WyzzEditor/
jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/WyzzEditor.pm
jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/WyzzEditor/Dispatcher.pm
jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/WyzzEditor/Textarea.pm
jifty/trunk/plugins/WyzzEditor/share/
jifty/trunk/plugins/WyzzEditor/share/po/
jifty/trunk/plugins/WyzzEditor/share/web/
jifty/trunk/plugins/WyzzEditor/share/web/static/
jifty/trunk/plugins/WyzzEditor/share/web/static/img/
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/backcolor.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/bold.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/close.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/copy.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/cut.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/downsize.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/font.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/forecolor.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/headers.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/help.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/htmlmode.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/indent.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/inserthorizontalrule.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/insertimage.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/insertorderedlist.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/insertunorderedlist.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/italic.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/justifycenter.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/justifyfull.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/justifyleft.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/justifyright.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/link.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/outdent.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/paste.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/redo.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/removeformat.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/specialchar.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/strikethrough.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/subscript.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/superscript.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/underline.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/undo.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/upsize.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/wyzzicon.gif (contents, props changed)
jifty/trunk/plugins/WyzzEditor/share/web/static/js/
jifty/trunk/plugins/WyzzEditor/share/web/static/js/wyzz/
jifty/trunk/plugins/WyzzEditor/share/web/static/js/wyzz.js
jifty/trunk/plugins/WyzzEditor/share/web/static/wyzzstyles/
jifty/trunk/plugins/WyzzEditor/share/web/static/wyzzstyles/editarea.css
jifty/trunk/plugins/WyzzEditor/share/web/static/wyzzstyles/style.css
jifty/trunk/plugins/WyzzEditor/share/web/templates/
jifty/trunk/plugins/WyzzEditor/t/
Log:
plugin to use Wyzz online wyziwig editor to render textaera for test and comments
Added: jifty/trunk/plugins/WyzzEditor/Makefile.PL
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/WyzzEditor/Makefile.PL Mon Apr 30 17:56:18 2007
@@ -0,0 +1,8 @@
+use inc::Module::Install;
+name('Jifty-Plugin-WyzzEditor');
+version('0.01');
+requires('Jifty' => '0.70416');
+
+install_share;
+
+WriteAll;
Added: jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/WyzzEditor.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/WyzzEditor.pm Mon Apr 30 17:56:18 2007
@@ -0,0 +1,49 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::WyzzEditor;
+use base qw/Jifty::Plugin/;
+
+=head1 SYNOPSIS
+
+In etc/config.yml
+
+ Plugins:
+ - WyzzEditor: {}
+
+In your Model instead of
+
+ render_as 'teaxterea';
+
+use
+
+ render_as 'Jifty::Plugin::WyzzEditor::Textarea';
+
+
+In your View
+
+ Jifty->web->link(
+ label => _("Save"),
+ onclick => [
+ { beforeclick =>
+ "updateTextArea('".$action->form_field('myfield')->element_id."');" },
+ { args => .... }
+ ]
+ );
+
+=head1 DESCRIPTION
+
+Wyzz, simple WYSIWYG online editor usable in fragments
+
+=cut
+
+
+sub init {
+ my $self = shift;
+ Jifty->web->javascript_libs([
+ @{ Jifty->web->javascript_libs },
+ "wyzz.js",
+ ]);
+}
+
+1;
Added: jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/WyzzEditor/Dispatcher.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/WyzzEditor/Dispatcher.pm Mon Apr 30 17:56:18 2007
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::WyzzEditor::Dispatcher;
+use Jifty::Dispatcher -base;
+
+# Put any plugin-specific dispatcher rules here.
+
+1;
Added: jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/WyzzEditor/Textarea.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/WyzzEditor/lib/Jifty/Plugin/WyzzEditor/Textarea.pm Mon Apr 30 17:56:18 2007
@@ -0,0 +1,25 @@
+package Jifty::Plugin::WyzzEditor::Textarea;
+use base qw(Jifty::Web::Form::Field::Textarea);
+
+sub render_widget {
+ my $self = shift;
+ my $field;
+ $field .= qq!\n!;
+ $field .= qq!\n!;
+
+ Jifty->web->out($field);
+ '';
+}
+
+
+1;
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/backcolor.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/bold.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/close.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/copy.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/cut.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/downsize.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/font.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/forecolor.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/headers.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/help.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/htmlmode.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/indent.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/inserthorizontalrule.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/insertimage.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/insertorderedlist.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/insertunorderedlist.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/italic.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/justifycenter.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/justifyfull.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/justifyleft.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/justifyright.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/link.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/outdent.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/paste.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/redo.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/removeformat.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/specialchar.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/strikethrough.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/subscript.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/superscript.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/underline.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/undo.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/upsize.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/img/wyzzicons/wyzzicon.gif
==============================================================================
Binary file. No diff available.
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/js/wyzz.js
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/WyzzEditor/share/web/static/js/wyzz.js Mon Apr 30 17:56:18 2007
@@ -0,0 +1,732 @@
+
+// WYZZ Copyright (c) 2007 The Mouse Whisperer
+// Contains code Copyright (c) 2006 openWebWare.com
+// This copyright notice MUST stay intact for use.
+//
+// An open source WYSIWYG editor for use in web based applications.
+// For full source code and docs, visit http://www.wyzz.info
+//
+// This library is free software; you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation; either version 2.1 of the License, or
+// (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+// License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License along
+// with this library; if not, write to the Free Software Foundation, Inc., 59
+// Temple Place, Suite 330, Boston, MA 02111-1307 USA
+/****************************************************************************************/
+// MODIFY THE PARAMETERS IN THE FOLLOWING SECTION TO SUIT YOUR APPLICATION ///////////////
+
+// Editor Width and Height
+wyzzW = 600;
+wyzzH = 200;
+
+// Number of toolbars - must be either 1 or 2
+// If set to 1, the first tooolbar (defined in array buttonName below) will be ignored
+toolbarCount = 2;
+
+// Edit region stylesheet
+editstyle = '/static/wyzzstyles/editarea.css';
+
+// Do we want to try to clean the code to emulate xhtml? 1=Yes, 0=No
+xhtml_out = 1;
+
+// Style Sheet
+document.write(' \n');
+
+// TOOLBARS ARRAYS
+// Order of available commands in toolbar
+// Remove from this any buttons not required in your application
+var buttonName = new Array("font","headers","separator","bold","italic","underline","strikethrough","separator","cut","copy","paste","separator","subscript","superscript","separator","justifyleft","justifycenter","justifyright","justifyfull","indent","outdent","separator","insertunorderedlist","insertorderedlist","separator","link","insertimage","separator","undo","redo");
+
+// Order of available commands in toolbar2
+// Remove from this any buttons not required in your application
+var buttonName2 = new Array("specialchar","separator","forecolor","backcolor","separator","inserthorizontalrule","separator","removeformat","separator","upsize","downsize","separator","htmlmode","separator","help");
+
+var myFonts = new Array("Andale Mono","Georgia","Verdana","Arial","Arial Black","impact","Times New Roman","Courier New","Comic Sans MS","Helvetica","Trebuchet MS","Tahoma");
+
+var specialChars = new Array("©","®","","à","á","ç","è","é","ë","ì","í","ñ","ò","ó","ö","ù","ú","ü","£","¢","¥","€","","","«","»","","","
","¶","†","‡","×","÷","°","±","¼","½","¾","¬","<",">","Δ","λ","Φ","Ψ","Σ","∫","α","β","Ω","μ","π","θ","↔","∞","√","≈","≠","≡","≤","≥","¡","¿","♠","♣","♥","♦");
+
+// DON'T MODIFY BEYOND THIS LINE unless you know what you are doing //////////////
+/********************************************************************************/
+
+version = "0.62"; // Please leave this
+
+var Headers = new Array("P","PRE","H1","H2","H3","H4","H5","H6");
+
+// Mode wysiwyg = 1 or sourcecode = 0
+mode = 1;
+
+// Get browser
+browserName = navigator.appName;
+
+nlBefore = new Array("div","p","li","h1","h2","h3","h4","h5","h6","hr","ul","ol");
+
+function h2x(node,inPre) { // we will pass the node containing the Wyzz-generated html
+ var xout = '';
+ var i;
+ var j;
+ // for each child of the node
+ for(i=0;i';
+ xout += h2x(node.childNodes[i],tagname=='pre'?true:false);
+ xout += '' + tagname + '>';
+ } else {
+ if(tagname == 'style'||tagname == 'title'||tagname=='script'||tagname=='textarea'||tagname=='a') {
+ xout += '>';
+ var innertext;
+ if(tagname=='script') {
+ innertext = node.childNodes[i].text;
+ } else {
+ innertext = node.childNodes[i].innerHTML;
+ }
+ if(tagname=='style') {
+ innertext = String(innertext).replace(/[\n]+/g,'\n');
+ }
+ xout += innertext + '' + tagname + '>';
+ } else {
+ xout += '/>';
+ }
+ }
+ break;
+ }
+// else if(node.childNodes[i].nodeType == 2) { // for attribute nodes
+
+// }
+ case 3: { // for text nodes
+ if(!inPre) { // don't change inside a tag
+ if(node.childNodes[i] != '\n') {
+ xout += fixents(fixtext(node.childNodes[i].nodeValue));
+ }
+ } else {
+ xout += node.childNodes[i].nodeValue;
+ break;
+ }
+ }
+ default:
+ break;
+ }
+ }
+ return xout;
+}
+
+function fixents(text) {
+ var i;
+ var ents = {8364 : "euro",402 : "fnof",8240 : "permil",352 : "Scaron",338 : "OElig",381 : "#381",8482 : "trade",353 : "scaron",339 : "oelig",382 : "#382",376 : "Yuml",162 : "cent",163 : "pound",164 : "curren",165 : "yen",166 : "brvbar",167 : "sect",168 : "uml",169 : "copy",170 : "ordf",171 : "laquo",172 : "not",173 : "shy",174 : "reg",175 : "macr",176 : "deg",177 : "plusmn",178 : "sup2",179 : "sup3",180 : "acute",181 : "micro",182 : "para",183 : "middot",184 : "cedil",185 : "sup1",186 : "ordm",187 : "raquo",188 : "frac14",189 : "frac12",190 : "frac34",191 : "iquest",192 : "Agrave",193 : "Aacute",194 : "Acirc",195 : "Atilde",196 : "Auml",197 : "Aring",198 : "AElig",199 : "Ccedil",200 : "Egrave",201 : "Eacute",202 : "Ecirc",203 : "Euml",204 : "Igrave",205 : "Iacute",206 : "Icirc",207 : "Iuml",208 : "ETH",209 : "Ntilde",210 : "Ograve",211 : "Oacute",212 : "Ocirc",213 : "Otilde",214 : "Ouml",215 : "times",216 : "Oslash",217 : "Ugrave",218 : "Uacute",219 : "Ucirc",220 : "Uuml",221 : "Yacute",222 : "THORN",223 : "szlig",224 : "agrave",225 : "aacute",226 : "acirc",227 : "atilde",228 : "auml",229 : "aring",230 : "aelig",231 : "ccedil",232 : "egrave",233 : "eacute",234 : "ecirc",235 : "euml",236 : "igrave",237 : "iacute",238 : "icirc",239 : "iuml",240 : "eth",241 : "ntilde",242 : "ograve",243 : "oacute",244 : "ocirc",245 : "otilde",246 : "ouml",247 : "divide",248 : "oslash",249 : "ugrave",250 : "uacute",251 : "ucirc",252 : "uuml",253 : "yacute",254 : "thorn",255 : "yuml",913 : "Alpha",914 : "Beta",915 : "Gamma",916 : "Delta",917 : "Epsilon",918 : "Zeta",919 : "Eta",920 : "Theta",921 : "Iota",922 : "Kappa",923 : "Lambda",924 : "Mu",925 : "Nu",926 : "Xi",927 : "Omicron",928 : "Pi",929 : "Rho", 931 : "Sigma",932 : "Tau",933 : "Upsilon",934 : "Phi",935 : "Chi",936 : "Psi",937 : "Omega",8756 : "there4",8869 : "perp",945 : "alpha",946 : "beta",947 : "gamma",948 : "delta",949 : "epsilon",950 : "zeta",951 : "eta",952 : "theta",953 : "iota",954 : "kappa",955 : "lambda",956 : "mu",957 : "nu",968 : "xi",969 : "omicron",960 : "pi",961 : "rho",962 : "sigmaf",963 : "sigma",964 : "tau",965 : "upsilon",966 : "phi",967 : "chi",968 : "psi",969 : "omega",8254 : "oline",8804 : "le",8260 : "frasl",8734 : "infin",8747 : "int",9827 : "clubs",9830 : "diams",9829 : "hearts",9824 : "spades",8596 : "harr",8592 : "larr",8594 : "rarr",8593 : "uarr",8595 : "darr",8220 : "ldquo",8221 : "rdquo",8222 : "bdquo",8805 : "ge",8733 : "prop",8706 : "part",8226 : "bull",8800 : "ne",8801 : "equiv",8776 : "asymp",8230 : "hellip",8212 : "mdash",8745 : "cap",8746 : "cup",8835 : "sup",8839 : "supe",8834 : "sub",8838 : "sube",8712 : "isin",8715 : "ni",8736 : "ang",8711 : "nabla",8719 : "prod",8730 : "radic",8743 : "and",8744 : "or",8660 : "hArr",8658 : "rArr",9674 : "loz",8721 : "sum",8704 : "forall",8707 : "exist",8216 : "lsquo",8217 : "rsquo",161 : "iexcl",977 : "thetasym",978 : "upsih",982 : "piv",8242 : "prime",8243 : "Prime",8472 : "weierp",8465 : "image",8476 : "real",8501 : "alefsym",8629 : "crarr",8656 : "lArr",8657 : "uArr",8659 : "dArr",8709 : "empty",8713 : "notin",8727 : "lowast",8764 : "sim",8773 : "cong",8836 : "nsub",8853 : "oplus",8855 : "otimes",8901 : "sdot",8968 : "lceil",8969 : "rceil",8970 : "lfloor",8971 : "rfloor",9001 : "lang",9002 : "rang",710 : "circ",732 : "tilde",8194 : "ensp",8195 : "emsp",8201 : "thinsp",8204 : "zwnj",8205 : "zwj",8206 : "lrm",8207 : "rlm",8211 : "ndash",8218 : "sbquo",8224 : "dagger",8225 : "Dagger",8249 : "lsaquo",8250 : "rsaquo"};
+
+ var new_text = '';
+
+ var temp = new RegExp();
+ temp.compile("[a]|[^a]", "g");
+
+ var parts = text.match(temp);
+
+ if (!parts) return text;
+ for (i=0; i/g,">").replace(/\u00A0/g," ");
+ return temptext.replace(/#h2x_lt/g,"&alt;").replace(/#h2x_gt/g,">");
+}
+
+function fixatt(text) {
+ var temptext = String(text).replace(/\</g,"#h2x_lt").replace(/\>/g,"#h2x_gt");
+ temptext = temptext.replace(/\&/g,"&").replace(//g,">").replace(/\"/g,""");
+ return temptext.replace(/#h2x_lt/g,"&alt;").replace(/#h2x_gt/g,">");
+}
+
+function indexOf(thisarray, value)
+{
+ var i;
+ for (i=0; i < thisarray.length; i++) {
+ if (thisarray[i] == value) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+// Color picker - here we make an array of all websafe colors
+// If you want to limit the colors available to users (e.g. to fit in with
+// a site design) then use a restricted array of colors
+// e.g. var buttonName = new Array("336699","66abff", .... etc
+var buttonColors = new Array(216);
+
+// Colors - replace this function with your own if you have special requirements for colors
+function getColorArray() {
+// Color code table
+c = new Array('00', '33', '66', '99', 'cc', 'ff');
+var count = 0;
+// Iterate red
+for (r = 0; r < 6; r++)
+ {
+ // Iterate green
+ for (g = 0; g < 6; g++)
+ {
+ // Iterate blue
+ for (b = 0; b < 6; b++)
+ {
+ // Get RGB color
+ buttonColors[count] = c[r] + c[g] + c[b];
+ count++;
+ }
+ }
+ }
+}
+
+getColorArray();
+
+/* Emulates insertAdjacentHTML(), insertAdjacentText() and insertAdjacentElement() three functions
+so they work with Netscape 6/Mozilla - By Thor Larholm me@jscript.dk */
+if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.insertAdjacentElement) {
+ HTMLElement.prototype.insertAdjacentElement = function (where,parsedNode) {
+ switch (where) {
+ case 'beforeBegin':
+ this.parentNode.insertBefore(parsedNode,this)
+ break;
+ case 'afterBegin':
+ this.insertBefore(parsedNode,this.firstChild);
+ break;
+ case 'beforeEnd':
+ this.appendChild(parsedNode);
+ break;
+ case 'afterEnd':
+ if (this.nextSibling) {
+ this.parentNode.insertBefore(parsedNode,this.nextSibling);
+ } else {
+ this.parentNode.appendChild(parsedNode);
+ break;
+ }
+ }
+ }
+
+ HTMLElement.prototype.insertAdjacentHTML = function (where,htmlStr) {
+ var r = this.ownerDocument.createRange();
+ r.setStartBefore(this);
+ var parsedHTML = r.createContextualFragment(htmlStr);
+ this.insertAdjacentElement(where,parsedHTML)
+ }
+
+ HTMLElement.prototype.insertAdjacentText = function (where,txtStr) {
+ var parsedText = document.createTextNode(txtStr)
+ this.insertAdjacentElement(where,parsedText)
+ }
+}
+
+function closeColorPicker(thisid) {
+ document.getElementById(thisid).style.display = "none";
+}
+
+// the hyperlink dialog
+function insertLink(n) {
+ var newWindow = '';
+ var linkurl = '';
+ var linktitle = '';
+ var targetText = grabSelectedText(n);
+ var linkurl = prompt('Enter the target URL of the link:');
+ var linktitle = prompt('Please give a title for the link:');
+ var openNew = confirm('Should this link open in a new window?\n\nOK = Open in NEW Window\nCancel = Open in THIS window');
+ if(openNew) {
+ newWindow = "blank";
+ } else {
+ newWindow = "self";
+ }
+ if(newWindow==''||linkurl==''||linktitle=='') {
+ alert('Please enter all the required information.');
+ insertLink(n);
+ } else {
+ var hyperLink = '' + targetText + ' ';
+ insertHTML(hyperLink, n);
+ }
+}
+
+function insertImage(n) {
+ var imgurl = prompt('Enter the target URL of the image:');
+ var imgtitle = prompt('Please give a title for the link:');
+ var theImage = ' ';
+ insertHTML(theImage, n); }
+
+function make_wyzz(textareaID) {
+
+ // Hide the textarea
+ document.getElementById(textareaID).style.display = 'none';
+
+ // get textareaID
+ var n = textareaID;
+
+ // Toolbars width is 2 pixels wider than the editor
+ toolbarWidth = parseFloat(wyzzW) + 2;
+
+ var toolbar = '';
+
+ // We only generate toolbar 1 if toolbarCount is set to 2
+ if(toolbarCount == 2) {
+ // Generate WYSIWYG toolbar
+ toolbar = '';
+ }
+
+
+ // Generate WYSIWYG toolbar2
+ var toolbar2 = '';
+
+// Create iframe for editor
+var iframe = '\n';
+
+ // Insert toolbar after the textArea
+ document.getElementById(n).insertAdjacentHTML("afterEnd", toolbar + toolbar2 + iframe);
+
+ // Give the iframe the required height and width
+ document.getElementById("wysiwyg" + n).style.height = wyzzH + "px";
+ document.getElementById("wysiwyg" + n).style.width = wyzzW + "px";
+
+ // Pass the textarea's existing text into the editor
+ var content = document.getElementById(n).value;
+ var doc = document.getElementById("wysiwyg" + n).contentWindow.document;
+
+ // Write the textarea's content into the iframe
+ doc.open();
+ if (browserName == "Microsoft Internet Explorer") {
+ doc.write(' ' + content);
+ } else {
+ doc.write(' ' + content + ' ');
+ }
+ doc.close();
+
+// var browserName = navigator.appName;
+ if (browserName == "Microsoft Internet Explorer"||browserName == "Opera") {
+ // Make the iframe editable
+ doc.body.contentEditable = true;
+ } else {
+ // Make the iframe editable
+ doc.designMode = "on";
+ }
+
+ // Update the textarea with content in WYSIWYG when user submits form
+ // var browserName = navigator.appName;
+ if (browserName == "Microsoft Internet Explorer"||browserName == "Opera") {
+ for (var idx=0; idx < document.forms.length; idx++) {
+ document.forms[idx].attachEvent('onsubmit', function() { updateTextArea(n); });
+ }
+ }
+ else {
+ for (var idx=0; idx < document.forms.length; idx++) {
+ document.forms[idx].addEventListener('submit',function OnSumbmit() { updateTextArea(n); }, true);
+ }
+ }
+}
+
+function formatTextColor(color, n, selected) {
+ document.getElementById('wysiwyg' + n).contentWindow.document.execCommand('forecolor', false, color);
+ document.getElementById('colorpicker' + n).style.display = "none";
+}
+
+function formatBackColor(color, n, selected) {
+ if (browserName == "Microsoft Internet Explorer") {
+ document.getElementById('wysiwyg' + n).contentWindow.document.execCommand('backcolor', false, color);
+ } else {
+ document.getElementById('wysiwyg' + n).contentWindow.document.execCommand('hilitecolor', false, color);
+ }
+ document.getElementById('colorbackpicker' + n).style.display = "none";
+}
+
+function formatFontName(fontname, n, selected) {
+ document.getElementById('wysiwyg' + n).contentWindow.document.execCommand('fontName', false, fontname);
+ document.getElementById('fontpicker' + n).style.display = "none";
+}
+
+function formatSpecialChar(charname, n, selected) {
+ insertHTML(charname, n);
+ document.getElementById('specialpicker' + n).style.display = "none";
+}
+
+function formatHeader(headername, n, selected) {
+ document.getElementById('wysiwyg' + n).contentWindow.document.execCommand('formatBlock', false, '<'+headername+'>');
+ document.getElementById('headerpicker' + n).style.display = "none";
+}
+
+function formatText(id, n, selected) {
+ if(mode==0&&id!='htmlmode') {
+ alert('Function unavailable in "View Source" mode');
+ } else {
+ // When user clicks button make sure it always targets correct textarea
+ document.getElementById("wysiwyg" + n).contentWindow.focus();
+ if(id=="upsize") {
+ var currentFontSize = document.getElementById("wysiwyg"+n).contentWindow.document.queryCommandValue("FontSize");
+ if(currentFontSize == ''||!currentFontSize) currentFontSize = 3; // fudge for FF
+ if(currentFontSize < 7) {
+ var newFontSize = parseInt(currentFontSize) + 1;
+ } else {
+ var newFontSize = currentFontSize;
+ }
+ document.getElementById("wysiwyg" + n).contentWindow.document.execCommand("FontSize", false, newFontSize);
+ }
+ else if(id=="downsize") {
+ var currentFontSize = document.getElementById("wysiwyg"+n).contentWindow.document.queryCommandValue("FontSize");
+ if(currentFontSize > 1) {
+ var newFontSize = currentFontSize - 1;
+ } else {
+ var newFontSize = currentFontSize;
+ }
+ document.getElementById("wysiwyg" + n).contentWindow.document.execCommand("FontSize", false, newFontSize);
+ }
+ else if(id=="forecolor"){
+ if(document.getElementById('colorpicker' + n).style.display == ""){
+ document.getElementById('colorpicker' + n).style.display = "none";
+ } else {
+ document.getElementById('colorpicker' + n).style.display = "";
+ }
+ }
+ else if(id=="backcolor"){
+ if(document.getElementById('colorbackpicker' + n).style.display == ""){
+ document.getElementById('colorbackpicker' + n).style.display = "none";
+ } else {
+ document.getElementById('colorbackpicker' + n).style.display = "";
+ }
+ }
+ else if(id=="font"){
+ if(document.getElementById('fontpicker' + n).style.display == ""){
+ document.getElementById('fontpicker' + n).style.display = "none";
+ } else {
+ document.getElementById('fontpicker' + n).style.display = "";
+ }
+ }
+ else if(id=="specialchar"){
+ if(document.getElementById('specialpicker' + n).style.display == ""){
+ document.getElementById('specialpicker' + n).style.display = "none";
+ } else {
+ document.getElementById('specialpicker' + n).style.display = "";
+ }
+ }
+ else if(id=="headers"){
+ if(document.getElementById('headerpicker' + n).style.display == ""){
+ document.getElementById('headerpicker' + n).style.display = "none";
+ } else {
+ document.getElementById('headerpicker' + n).style.display = "";
+ }
+ }
+ else if(id=="htmlmode"){
+ var getDoc = document.getElementById("wysiwyg" + n).contentWindow.document;
+ if(mode == 1) {
+ if(navigator.appName == "Microsoft Internet Explorer"||browserName == "Opera") {
+ var iHTML = getDoc.body.innerHTML;
+ getDoc.body.innerText = iHTML;
+ } else {
+ var html = document.createTextNode(getDoc.body.innerHTML);
+ getDoc.body.innerHTML = "";
+ getDoc.body.appendChild(html);
+ }
+ getDoc.body.style.fontSize = "12px";
+ getDoc.body.style.fontFamily = "Courier New";
+ mode = 0;
+ } else {
+ if(navigator.appName == "Microsoft Internet Explorer"||browserName == "Opera") {
+ var iText = getDoc.body.innerText;
+ getDoc.body.innerHTML = iText;
+ } else {
+ var html = getDoc.body.ownerDocument.createRange();
+ html.selectNodeContents(getDoc.body);
+ getDoc.body.innerHTML = html.toString();
+ }
+ mode = 1;
+ }
+ }
+ else if(id=="help"){
+ if(document.getElementById('helpbox' + n).style.display == ""){
+ document.getElementById('helpbox' + n).style.display = "none";
+ } else {
+ document.getElementById('helpbox' + n).style.display = "";
+ }
+ }
+ else if(id=="link"){
+ // var browserName = navigator.appName;
+ if (browserName == "Microsoft Internet Explorer") {
+ var target = confirm('Should this link open in a new window?\n\nOK = Open in NEW Window\nCancel = Open in THIS window');
+ document.getElementById("wysiwyg" + n).contentWindow.document.execCommand('createLink',true,' ');
+ if(target == true)
+ {
+ document.getElementById("wysiwyg" + n).contentWindow.document.selection.createRange().parentElement().target="_blank";
+ }
+ } else {
+ insertLink(n);
+ }
+ }
+ else if(id=="insertimage") {
+ // var browserName = navigator.appName;
+ if (browserName == "Microsoft Internet Explorer") {
+ document.getElementById("wysiwyg" + n).contentWindow.document.execCommand(id, true, null);
+ } else {
+ insertImage(n);
+ }
+ }
+ else {
+ document.getElementById("wysiwyg" + n).contentWindow.document.execCommand(id, false, null);
+ }
+ }
+}
+
+function insertHTML(html, n) {
+ // var browserName = navigator.appName;
+ if (browserName == "Microsoft Internet Explorer") {
+ document.getElementById('wysiwyg' + n).contentWindow.document.selection.createRange().pasteHTML(html);
+ }
+
+ else {
+ var div = document.getElementById('wysiwyg' + n).contentWindow.document.createElement("span");
+
+ div.innerHTML = html;
+ var node = insertNodeAtSelection(div, n);
+ }
+}
+
+function insertNodeAtSelection(insertNode, n) {
+ // get current selection
+ var sel = document.getElementById('wysiwyg' + n).contentWindow.getSelection();
+
+ // get the first range of the selection (there's almost always only one range)
+ var range = sel.getRangeAt(0);
+
+ // deselect everything
+ sel.removeAllRanges();
+
+ // remove content of current selection from document
+ range.deleteContents();
+
+ // get location of current selection
+ var container = range.startContainer;
+ var pos = range.startOffset;
+
+ // make a new range for the new selection
+ range = document.createRange();
+
+ if (container.nodeType==3 && insertNode.nodeType==3) {
+
+ // if we insert text in a textnode, do optimized insertion
+ container.insertData(pos, insertNode.nodeValue);
+
+ // put cursor after inserted text
+ range.setEnd(container, pos+insertNode.length);
+ range.setStart(container, pos+insertNode.length);
+ }
+
+ else {
+ var afterNode;
+
+ if (container.nodeType==3) {
+ // when inserting into a textnode we create 2 new textnodes and put the insertNode in between
+ var textNode = container;
+ container = textNode.parentNode;
+ var text = textNode.nodeValue;
+
+ // text before the split
+ var textBefore = text.substr(0,pos);
+
+ // text after the split
+ var textAfter = text.substr(pos);
+
+ var beforeNode = document.createTextNode(textBefore);
+ afterNode = document.createTextNode(textAfter);
+
+ // insert the 3 new nodes before the old one
+ container.insertBefore(afterNode, textNode);
+ container.insertBefore(insertNode, afterNode);
+ container.insertBefore(beforeNode, insertNode);
+
+ // remove the old node
+ container.removeChild(textNode);
+ }
+
+ else {
+ // else simply insert the node
+ afterNode = container.childNodes[pos];
+ container.insertBefore(insertNode, afterNode);
+ }
+
+ range.setEnd(afterNode, 0);
+ range.setStart(afterNode, 0);
+ }
+
+ sel.addRange(range);
+}
+
+function updateTextArea(n) {
+ if(xhtml_out == 1) {
+ document.getElementById(n).value = h2x(document.getElementById("wysiwyg" + n).contentWindow.document.body);
+ } else {
+ document.getElementById(n).value = document.getElementById("wysiwyg" + n).contentWindow.document.body.innerHTML;
+ }
+}
+
+
+function grabSelectedText(n){
+ // var browserName = navigator.appName;
+ var selectedText = '';
+ // for IE
+ if (browserName == "Microsoft Internet Explorer"||browserName == "Opera") {
+ var theText = document.getElementById("wysiwyg" + n).contentWindow.document.selection;
+ if(theText.type =='Text') {
+ var newText = theText.createRange();
+ selectedText = newText.text;
+ }
+ }
+ // for Mozilla/Netscape
+ else {
+ var selectedText = document.getElementById("wysiwyg" + n).contentWindow.document.getSelection();
+ }
+ return selectedText;
+}
+
+/*var myrules = {
+ 'input[type=submit]' : function(element){
+ element.onclick = function(){
+ // Your onclick event goes here - eg;
+ // load a page - do an AJAX etc.;
+ }
+ }
+ };
+
+Behaviour.register(myrules);*/
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/wyzzstyles/editarea.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/WyzzEditor/share/web/static/wyzzstyles/editarea.css Mon Apr 30 17:56:18 2007
@@ -0,0 +1,79 @@
+/**************** body and tag styles ****************/
+ body, p {
+ margin-top: 0px;
+ margin-bottom: 30px;
+ background-color: #fefefe;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ color: #333333;
+ font-size: 13px;
+ }
+
+ #container {
+ width: 750px;
+ margin: 0 auto;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ line-height: 1.6em;
+ color: #666666;
+ background-color: #FFFFFF;
+ }
+
+ #container2 {
+ width: 746px;
+ margin: 0 auto;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ line-height: 1.6em;
+ color: #666666;
+ background-color: #FFFFFF;
+ border-bottom: 2px solid #2763A5;
+ }
+
+ pre {
+ font-family: "courier new", sans-serif;
+ font-weight: normal;
+ font-size: 12px;
+ color: #6DA6E2;
+ background-color: #FFFFFF;
+ }
+
+ h1 {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ font-size: 32px;
+ color: #6DA6E2;
+ margin-bottom: 30px;
+ background-color: #FFFFFF;
+ }
+
+ h2 {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ font-size: 28px;
+ color: #6DA6E2;
+ margin-bottom: 30px;
+ background-color: #FFFFFF;
+ }
+
+ h3 {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ font-size: 24px;
+ color: #6DA6E2;
+ margin-bottom: 30px;
+ background-color: #FFFFFF;
+ }
+
+ a {
+ color: #6DA6E2;
+ background-color: #FFFFFF;
+ text-decoration: none;
+ font-weight: bold;
+ }
+
+ a:hover {
+ background-color: #FFFFFF;
+ color: inherit;
+ font-weight: bold;
+ text-decoration: underline;
+ }
\ No newline at end of file
Added: jifty/trunk/plugins/WyzzEditor/share/web/static/wyzzstyles/style.css
==============================================================================
--- (empty file)
+++ jifty/trunk/plugins/WyzzEditor/share/web/static/wyzzstyles/style.css Mon Apr 30 17:56:18 2007
@@ -0,0 +1,24 @@
+/* WYSIWYG EDITOR */
+
+/* Toolbar */
+.toolbar { border: 1px solid #999999; height: 24px; background-color:#cccccc; }
+.wyzz_alleditor { display: block; border:1px #aaa solid; width:520px; background:#e0e0e0; padding:2px;position:relative;}
+.wyzz_alleditor div { display:block;}
+
+/* Command Buttons */
+.cmdbutton { width: 20px; height: 20px; border: 1px solid transparent; margin: 0px; padding: 0px; background: transparent; }
+.closebutton { float:right; padding: 2px; }
+.buttonOver { width: 20px; height: 20px; border: 1px solid #999999; margin: 0px; padding: 0px; }
+.separator { width: 2px; border-left: 1px solid #eeeeee; margin: 0px; padding: 0px; }
+
+/* others */
+.colorpicker, .colorbackpicker, .fontpicker, .headerpicker, .helpbox, .linkdialog { position:absolute; width: 216px; background:#eee; display:block; padding:0px; margin-top:0px; border:1px #555 solid;line-height:1.4}
+.specialpicker { position:absolute; width: 216px; background:#eee; display:block; padding-top:20px;padding-left:20px; margin-top:0px; border:1px #555 solid;line-height:1.4}
+.help {margin: 10px; font: 12px bold verdana,helvetica,arial,sans-serif black; text-align:center }
+.help h4 {font: 18px bold verdana,helvetica,arial,sans-serif black; padding-top:10px}
+.colorpicker a, .colorbackpicker a { border:1px #fff solid; height:10px; width:10px; font-size:0.01em; display:block;float:left; margin-right:0px;}
+.colorpicker a:hover, .colorbackpicker a:hover { border:1px #f00 solid;}
+.fontpicker a, .headerpicker a { color:#333;text-decoration:none;background:#eee;}
+.fontpicker a:hover, .headerpicker a:hover, .specialpicker a:hover { color: #666 }
+.specialpicker a { color:#333;font-family:arial;text-decoration:none;background:#eee;height:13px; width:12px;font-size:14px}
+.charbutton { width:12px;height:14px; }
From jifty-commit at lists.jifty.org Mon Apr 30 18:42:44 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 18:42:47 2007
Subject: [Jifty-commit] r3182 - jifty/trunk/lib/Jifty/View/Declare
Message-ID: <20070430224244.596204D8084@diesel.bestpractical.com>
Author: ruz
Date: Mon Apr 30 18:42:44 2007
New Revision: 3182
Modified:
jifty/trunk/lib/Jifty/View/Declare/Handler.pm
Log:
* utf8::downgrade doesn't like strings as FAIL_OK, only integers, 1 is not that
cool as 'FAILURE IS OK', but works
Modified: jifty/trunk/lib/Jifty/View/Declare/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/View/Declare/Handler.pm Mon Apr 30 18:42:44 2007
@@ -78,7 +78,7 @@
unless ( Jifty->handler->apache->http_header_sent ||Jifty->web->request->is_subrequest ) {
Jifty->handler->apache->send_http_header();
}
- utf8::downgrade($content, 'FAILURE IS OK'); # Just before we go to stdout, we REALLY want to convert to octets.
+ utf8::downgrade($content, 1); # Just before we go to stdout, we REALLY want to convert to octets.
print STDOUT $content;
return undef;
}
From jifty-commit at lists.jifty.org Mon Apr 30 21:26:59 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 21:27:02 2007
Subject: [Jifty-commit] r3183 - jifty/trunk/lib/Jifty/Plugin/Authentication
Message-ID: <20070501012659.D3C9C4D80B5@diesel.bestpractical.com>
Author: ruz
Date: Mon Apr 30 21:26:58 2007
New Revision: 3183
Modified:
jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm
Log:
* linked POD++
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm Mon Apr 30 21:26:58 2007
@@ -24,7 +24,7 @@
=head2 prereq_plugins
-This plugin depends on the C and C plugins.
+This plugin depends on the L and L plugins.
=cut
From jifty-commit at lists.jifty.org Mon Apr 30 21:27:42 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 21:27:44 2007
Subject: [Jifty-commit] r3184 -
jifty/trunk/lib/Jifty/Plugin/Authentication/Password
Message-ID: <20070501012742.AB6F14D80B5@diesel.bestpractical.com>
Author: ruz
Date: Mon Apr 30 21:27:42 2007
New Revision: 3184
Modified:
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm
Log:
* my dict has no word signup, but has 'sign up'
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/View.pm Mon Apr 30 21:27:42 2007
@@ -27,12 +27,12 @@
template 'signup' => page {
- title is _('Signup');
+ title is _('Sign up');
my ( $action, $next ) = get(qw(action next));
Jifty->web->form->start( call => $next );
render_param( $action => 'name' , focus => 1);
render_param( $action => $_ ) for ( grep {$_ ne 'name'} $action->argument_names );
- form_return( label => _('Signup'), submit => $action );
+ form_return( label => _('Sign up'), submit => $action );
Jifty->web->form->end();
};
From jifty-commit at lists.jifty.org Mon Apr 30 21:28:25 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 21:28:27 2007
Subject: [Jifty-commit] r3185 -
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action
Message-ID: <20070501012825.91DD64D80B5@diesel.bestpractical.com>
Author: ruz
Date: Mon Apr 30 21:28:25 2007
New Revision: 3185
Modified:
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm
Log:
* delete trailing space to avoid translating the same string twice
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm Mon Apr 30 21:28:25 2007
@@ -54,7 +54,7 @@
}
# Set up our login message
- $self->result->message( _("Welcome to %1, %2. " , Jifty->config->framework('ApplicationName') , $u->name) ." "
+ $self->result->message( _("Welcome to %1, %2." , Jifty->config->framework('ApplicationName') , $u->name) ." "
. _(". Your email address has now been confirmed.") );
# Actually do the login thing.
From jifty-commit at lists.jifty.org Mon Apr 30 21:29:34 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 21:29:37 2007
Subject: [Jifty-commit] r3186 -
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action
Message-ID: <20070501012934.8DE2B4D80B5@diesel.bestpractical.com>
Author: ruz
Date: Mon Apr 30 21:29:32 2007
New Revision: 3186
Modified:
jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
Log:
* two very similar strings in one place, use the same, easier for translation
Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm Mon Apr 30 21:29:32 2007
@@ -149,7 +149,7 @@
Jifty->web->session->set( login_token => '' );
} else { # no password hashing over the wire
unless ( $user->id && $user->password_is($password) ) {
- $self->result->error( _('You may have mistyped your email address or password. Give it another shot.'));
+ $self->result->error( _('You may have mistyped your email or password. Give it another shot.'));
return;
}
}
From jifty-commit at lists.jifty.org Mon Apr 30 21:30:10 2007
From: jifty-commit at lists.jifty.org (jifty-commit@lists.jifty.org)
Date: Mon Apr 30 21:30:13 2007
Subject: [Jifty-commit] r3187 - jifty/trunk/share/po
Message-ID: <20070501013010.498AF4D80B5@diesel.bestpractical.com>
Author: ruz
Date: Mon Apr 30 21:30:08 2007
New Revision: 3187
Added:
jifty/trunk/share/po/ru.po
Log:
* ru.po
Added: jifty/trunk/share/po/ru.po
==============================================================================
--- (empty file)
+++ jifty/trunk/share/po/ru.po Mon Apr 30 21:30:08 2007
@@ -0,0 +1,583 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Ruslan Zakirov .
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.01\n"
+"POT-Creation-Date: 2007-05-01 03:09+0400\n"
+"PO-Revision-Date: 2007-05-01 03:09+0400\n"
+"Last-Translator: Ruslan Zakirov \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmLostPassword.pm:38
+#. ($appname,$confirm_url)
+msgid ""
+"\n"
+"You're getting this message because you (or somebody claiming to be you)\n"
+"request to reset your password for %1.\n"
+"\n"
+"If you don't want to reset your password just ignore this message.\n"
+"\n"
+"To reset your password, click on the link below:\n"
+"\n"
+"%2\n"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm:41
+#. ($appname,$confirm_url)
+msgid ""
+"\n"
+"You're getting this message because you (or somebody claiming to be you)\n"
+"wants to use %1. \n"
+"\n"
+"We need to make sure that we got your email address right. Click on the link below to get started:\n"
+"\n"
+"%2\n"
+msgstr ""
+
+#: lib/Jifty/Action/Record/Search.pm:125
+msgid "!=>< allowed"
+msgstr "????????? !=><"
+
+#: lib/Jifty/Notification.pm:94
+#. ($appname, Jifty->config->framework('AdminEmail')
+msgid "%1 <%2>"
+msgstr ""
+
+#: lib/Jifty/Action/Record/Search.pm:115
+#. ($label)
+msgid "%1 after"
+msgstr "%1 ?????"
+
+#: lib/Jifty/Action/Record/Search.pm:116
+#. ($label)
+msgid "%1 before"
+msgstr "%1 ??"
+
+#: lib/Jifty/Action/Record/Search.pm:112
+#. ($label)
+msgid "%1 contains"
+msgstr "%1 ????????"
+
+#: lib/Jifty/Action/Record/Search.pm:123
+#. ($label)
+msgid "%1 greater or equal to"
+msgstr "%1 ?????? ??? ?????"
+
+#: lib/Jifty/Action/Record/Search.pm:121
+#. ($label)
+msgid "%1 greater than"
+msgstr "%1 ?????? ???"
+
+#: lib/Jifty/Action/Record/Search.pm:108
+#. ($label)
+msgid "%1 is not"
+msgstr "%1 ??"
+
+#: lib/Jifty/Action/Record/Search.pm:113
+#. ($label)
+msgid "%1 lacks"
+msgstr "%1 ?? ????????"
+
+#: lib/Jifty/Action/Record/Search.pm:124
+#. ($label)
+msgid "%1 less or equal to"
+msgstr "%1 ?????? ??? ?????"
+
+#: lib/Jifty/Action/Record/Search.pm:122
+#. ($label)
+msgid "%1 less than"
+msgstr "%1 ?????? ???"
+
+#: share/web/templates/__jifty/error/mason_internal_error:31 share/web/templates/__jifty/error/mason_internal_error:35 share/web/templates/__jifty/error/mason_internal_error:39
+#. ($path, $line)
+#. ($file, $line)
+msgid "%1 line %2"
+msgstr "%1 ?????? %2"
+
+#: share/web/templates/__jifty/halo:119
+#. ($_->[3])
+msgid "%1 seconds"
+msgstr "%1 ??????"
+
+#: lib/Jifty/Action/Record/Search.pm:117
+#. ($label)
+msgid "%1 since"
+msgstr "%1 ?????"
+
+#: lib/Jifty/Action/Record/Search.pm:118
+#. ($label)
+msgid "%1 until"
+msgstr "%1 ??"
+
+#: lib/Jifty/Action/Record/Search.pm:77
+msgid "(any)"
+msgstr "(?????)"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm:58
+msgid ". Your email address has now been confirmed."
+msgstr ". ??? ????? ??? ???????????."
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:96
+msgid "A link to reset your password has been sent to your email account."
+msgstr "?????? ??? ?????? ?????? ???? ?????????? ?? ??? ???????? ????."
+
+#: lib/Jifty/Notification.pm:96
+#. ($appname)
+msgid "A notification from %1!"
+msgstr "??????????? ?? %1!"
+
+#: lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm:28
+msgid "Administration"
+msgstr "?????????????????"
+
+#: lib/Jifty/View/Declare/Helpers.pm:363 share/web/templates/_elements/wrapper:11
+msgid "Administration mode is enabled."
+msgstr "????? ????????????????? ???????????."
+
+#: lib/Jifty/View/Declare/Helpers.pm:360 share/web/templates/_elements/wrapper:11
+msgid "Alert"
+msgstr ""
+
+#: lib/Jifty/Action/Record/Create.pm:82
+msgid "An error occurred. Try again later"
+msgstr "????????? ??????. ?????????? ?????"
+
+#: lib/Jifty/Action/Record/Search.pm:129
+msgid "Any field contains"
+msgstr "????? ???? ????????"
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:131
+msgid "Anyway, the software has logged this error."
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:19
+msgid "Authentication token"
+msgstr ""
+
+#: share/web/templates/__jifty/halo:117
+msgid "Bindings"
+msgstr ""
+
+#: share/web/templates/helpers/calendar.html:4
+#. (_ &>$method()
+msgid "Hiya, %1."
+msgstr "?????, %1."
+
+#: lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm:23
+msgid "Home"
+msgstr ""
+
+#: lib/Jifty/Plugin/User/Mixin/Model/User.pm:30
+msgid "How should I display your name to other users?"
+msgstr "??? ??? ???????????? ?????? ??????????????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:64
+msgid "I'm not sure how this happened."
+msgstr "? ?? ??????, ??? ??? ?????????."
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:62
+msgid "Internal error"
+msgstr "?????????? ??????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:63 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:78 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
+msgid "It doesn't look like there's an account by that name."
+msgstr "??????? ? ??????? ??? ???????????? ? ????? ??????."
+
+#: lib/Jifty/Plugin/User/Mixin/Model/User.pm:89
+msgid "It looks like somebody else is using that address. Is there a chance you have another account?"
+msgstr "??? ?????? ??? ?????????? ???? ?????. ????? ???? ? ??? ??? ???? ??????? ???????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:75
+msgid "It looks like you already have an account. Perhaps you want to log in instead?"
+msgstr "?????? ? ??? ??? ???? ??????? ??????. ???????? ?? ?????? ????? ?"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:75
+msgid "It looks like you didn't enter the same password into both boxes. Give it another shot?"
+msgstr "?? ????? ?????? ?????? ? ??? ????. ????? ??? ??????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:82
+msgid "It looks like you're already confirmed."
+msgstr "?? ??? ????????????"
+
+#: lib/Jifty/View/Declare/Helpers.pm:375 share/web/templates/_elements/wrapper:18
+msgid "Loading..."
+msgstr "????????..."
+
+#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:109
+msgid "Login"
+msgstr "????"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:55
+msgid "Login with a password"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:40
+msgid "Login!"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:126
+msgid "Logout"
+msgstr "?????"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:63
+msgid "Lost your password?"
+msgstr "?????? ???????"
+
+#: share/web/templates/__jifty/error/mason_internal_error:1
+msgid "Mason error"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:80
+msgid "New password"
+msgstr "????? ??????"
+
+#: lib/Jifty/Plugin/User/Mixin/Model/User.pm:29
+msgid "Nickname"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:52
+msgid "No account yet? It's quick and easy. "
+msgstr "??? ??????? ??????? ??? ?????? ? ?????. "
+
+#: lib/Jifty/Action/Record/Search.pm:130
+msgid "No field contains"
+msgstr ""
+
+#: lib/Jifty/Web.pm:302
+msgid "No request to handle"
+msgstr ""
+
+#: lib/Jifty/Plugin/OnlineDocs/Dispatcher.pm:26
+msgid "Online docs"
+msgstr "Online ????????????"
+
+#: share/web/templates/__jifty/halo:1
+msgid "Page info"
+msgstr "?????????? ? ????????"
+
+#: share/web/templates/__jifty/halo:72
+msgid "Parent"
+msgstr "????????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:29 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:26
+msgid "Password"
+msgstr "??????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:88
+msgid "Passwords need to be at least six characters long"
+msgstr "?????? ?????? ???? ?? ????? ????? ????????"
+
+#: lib/Jifty/Record.pm:272 lib/Jifty/Record.pm:351 lib/Jifty/Record.pm:70
+msgid "Permission denied"
+msgstr "?????? ????????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:66
+msgid "Please email us!"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:65
+msgid "Really, really sorry."
+msgstr "????? ????????."
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:37
+msgid "Remember me?"
+msgstr "??????????"
+
+#: share/web/templates/__jifty/halo:69
+#. ($frame->{'render_time'})
+msgid "Rendered in %1s"
+msgstr "????????????? ?? %1 ???."
+
+#: share/web/templates/__jifty/halo:111
+msgid "SQL Statements"
+msgstr "SQL ???????"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:118
+msgid "Send"
+msgstr "?????????"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:96
+msgid "Send a link to reset your password"
+msgstr "????????? ?????? ?????? ??????"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:108 lib/Jifty/Plugin/Authentication/Password/View.pm:113
+msgid "Send a password reminder"
+msgstr "????????? ??????????? ??????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:114
+msgid "Sign up"
+msgstr "??????? ??????? ??????"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:53
+msgid "Sign up for an account!"
+msgstr "??????? ??????? ??????!"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:30 lib/Jifty/Plugin/Authentication/Password/View.pm:35
+msgid "Signup"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:108
+#. ($msg)
+msgid "Something bad happened and we couldn't create your account: %1"
+msgstr "???-?? ???????????? ????????? ? ?? ?? ?????? ??????? ???? ??????? ??????: %1"
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:149
+msgid "Something went awry"
+msgstr "???-?? ????? ???????????"
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:124 share/web/templates/dhandler:1
+msgid "Something's not quite right"
+msgstr "???-?? ?? ?????? ?????"
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:132
+msgid "Sorry about this."
+msgstr "???????? ?? ????."
+
+#: lib/Jifty/Plugin/User/Mixin/Model/User.pm:82
+#. ($new_email)
+msgid "That %1 doesn't look like an email address."
+msgstr "?????? %1 ?? ?????? ?? ????? ?????"
+
+#: lib/Jifty/Action.pm:878
+msgid "That doesn't look like a correct value"
+msgstr "?? ?????? ?? ?????????? ????????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:71 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:72 lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:70
+msgid "That doesn't look like an email address."
+msgstr "?? ?????? ?? ???????? ?????"
+
+#: lib/Jifty/Action/Record.pm:249
+msgid "That doesn't look right, but I don't know why"
+msgstr "???????????, ?? ?????????? ??????"
+
+#: lib/Jifty/Action/Record.pm:181
+msgid "The passwords you typed didn't match each other"
+msgstr "????????? ?????? ?? ?????????"
+
+#: lib/Jifty/Web.pm:365
+msgid "There was an error completing the request. Please try again later."
+msgstr "?? ????? ????????? ??????? ????????? ??????. ?????????? ?????????? ?????."
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:81
+msgid "There was an error setting your password."
+msgstr "?? ?????????? ?????????? ??????."
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:37
+msgid "There's a pretty good chance that error message doesn't mean anything to you, but we'd rather you have a little bit of information about what went wrong than nothing. We've logged this error, so we know we need to write something friendly explaining just what happened and how to fix it."
+msgstr ""
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:173 share/web/templates/__jifty/error/mason_internal_error:6
+msgid "Try again"
+msgstr "??????????? ???"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:108
+msgid "Try again later. We're really, really sorry."
+msgstr "?????????? ??? ?????. ?? ?????-????? ????????."
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:53
+msgid "Type that again?"
+msgstr "??????? ??? ???"
+
+#: lib/Jifty/Action/Record/Update.pm:156
+msgid "Updated"
+msgstr "??????????"
+
+#: share/web/templates/__jifty/halo:93
+msgid "Variables"
+msgstr "??????????"
+
+#: lib/Jifty.pm:27
+msgid "W00t"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:114
+msgid "We've sent a confirmation message to your email box."
+msgstr "?? ??????? ????????? ??? ?????????????? ?? ??? ??????????? ?????."
+
+#: lib/Jifty/I18N.pm:31
+#. ('Bob', 'World')
+msgid "Welcome %1 to the %2"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:181
+#. ($user->name)
+msgid "Welcome back, %1."
+msgstr "???? ??? ?????? ?????, %1."
+
+#: lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm:40
+#. ($appname)
+msgid "Welcome to %1!"
+msgstr "????? ?????????? ?? ???? %1!"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:113
+#. (Jifty->config->framework('ApplicationName')
+msgid "Welcome to %1, %2."
+msgstr "????? ?????????? ?? ???? %1, %2."
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm:57
+#. (Jifty->config->framework('ApplicationName')
+msgid "Welcome to %1, %2. "
+msgstr ""
+
+#: lib/Jifty/Plugin/SkeletonApp/View.pm:75 share/web/templates/index.html:1
+msgid "Welcome to your new Jifty application"
+msgstr "????? ?????????? ? ???? ????? Jifty-??????????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:63
+msgid "You don't exist."
+msgstr "?? ?? ???????????."
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:130
+msgid "You got to a page that we don't think exists."
+msgstr "?? ??????? ?? ????????, ??????? ?? ??????????."
+
+#: share/web/templates/dhandler:5
+msgid "You got to a page that we don't think exists. Anyway, the software has logged this error. Sorry about this."
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ConfirmEmail.pm:44
+msgid "You have already confirmed your account."
+msgstr "?? ??? ???????????? ??????? ??????."
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:97
+msgid "You lost your password. A link to reset it will be sent to the following email address:"
+msgstr "?? ?????? ??????. ?????? ??? ?????? ?????? ????? ?????????? ?? ?????: %1"
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:114
+msgid "You lost your password. A reminder will be send to the following mail:"
+msgstr "?? ?????? ??????. ??????????? ????? ?????????? ?? ?????: %1"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:146
+msgid "You may have mistyped your email or password. Give it another shot."
+msgstr "?????? ???? ?? ????? ??????????? ????? ??? ??????. ?????????? ??? ?????."
+
+#: lib/Jifty/Action.pm:865
+msgid "You need to fill in this field"
+msgstr "?? ?????? ????????? ??? ????"
+
+#: lib/Jifty/Plugin/SkeletonApp/View.pm:75 share/web/templates/index.html:3
+#. ('http://hdl.loc.gov/loc.pnp/cph.3c13461')
+msgid "You said you wanted a pony. (Source %1)"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/View.pm:69
+msgid "You're already logged in."
+msgstr "?? ??? ?????."
+
+#: lib/Jifty/Plugin/SkeletonApp/View.pm:34 share/web/templates/_elements/sidebar:7
+msgid "You're not currently signed in."
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:38
+msgid "Your browser can remember your login for you"
+msgstr "??? ??????? ????? ????????? ??? ????? ?? ???"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:87
+msgid "Your password has been reset. Welcome back."
+msgstr "??? ?????? ??? ???????. ?? ???? ??? ????? ??????."
+
+#: lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:28
+msgid "Your password should be at least six characters"
+msgstr "??? ?????? ?????? ???????? ?? ????? ???????? ???????"
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:31
+msgid "email address"
+msgstr "????? ?????"
+
+#: lib/Jifty/Plugin/ErrorTemplates/View.pm:46
+msgid "for now, and try to forget that we let you down."
+msgstr ""
+
+#: lib/Jifty/Manual/PageRegions.pod:188
+msgid "text of the link"
+msgstr "????? ??????"
+
+#: lib/Jifty/Manual/PageRegions.pod:225
+msgid "text of the link that hides"
+msgstr ""
+
+#: lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:37
+msgid "type your password again"
+msgstr "??????? ??? ?????? ?????"
+
+#: lib/Jifty/Action.pm:1050
+msgid "warning"
+msgstr "??????????????"