repo
string
commit
string
message
string
diff
string
auduny/statpipe
079a530910aba23e93c7265b99c84c1a6a28fde5
I don't really need -r for regexp
diff --git a/pipestat b/pipestat index 9015cef..7fea39d 100755 --- a/pipestat +++ b/pipestat @@ -1,279 +1,276 @@ #!/usr/bin/perl # Pipestat, A nice tool to get statistics from any text in a pipe # Copyright Audun Ytterdal <audun@ytterdal.net> # Licenced under GPL Version 2. # TODO: field 4-5 4,6 etc # TODO: Merge ($1) ($2) etc. # TODO: Remove hits/s when cat'ing files # TODO: Removing stuff like where field='S' etc use Getopt::Long; #use Data::Dumper; use Time::HiRes qw( time ); # Unbuffered output $| = 1; # Catch Ctrl-C and friends $SIG{INT} = \&end_pipe; my $opt_linefreq; # Default none my $opt_timefreq=5; # Default every 5 second my $opt_maxtime=60; # Default 60 seconds my $opt_maxlines=5000000; # Stop at five million lines my $opt_maxkeys=500000; my $opt_regex = 0; my $opt_case = 0; my $opt_limit = 30; my $opt_field; my $opt_delimiter = '\s+'; #Default delimiter is one or more spaces my $opt_help = 0; my $opt_clear=0; #Don't clean screen my $opt_hits=1; # show hits per second my $result = GetOptions( "t|timefreq=i" => \$opt_timefreq, # how often do we update in time "m|maxtime=i" => \$opt_maxtime, # when to stop "maxlines=i" => \$opt_maxlines, # when to stop "linefreq=i" => \$opt_linefreq, # how often do we update in lines -"r|regex" => \$opt_regex, # regexp as key "maxkeys=i" => \$opt_maxkeys, # maxkeys (default 5000) "n|not=s" => \$opt_not, # Not these "s|case" => \$opt_case, # key sensetive? "c|clear" => \$opt_clear, # clear and updatescreen? "f|field=s" => \$opt_field, # what field to use? "d|delimiter=s" => \$opt_delimiter, # What delimiter to use "h|hits" => \$opt_hits, # show hits/s "l|limit=i" => \$opt_limit, # how many do we print "h|help" => \$opt_help # Print help ); if ($opt_help) { &help; } # The hash where we store objects my $objects; # counters my $freqcount = 0; my $starttime = time(); my $freqtime = $starttime; my $lines = 0; my $keys = 0; my $now = time(); while (<STDIN>) { $now = time(); $lines++; if ($opt_maxkeys) { $keys = keys %$objects; if ($keys > $opt_maxkeys) { print "Maxkeys ($opt_maxkeys) reached\n"; &end_pipe; } } if ($opt_maxtime) { if ($now - $starttime >= $opt_maxtime) { print "Maxtime of $opt_maxtime seconds reached.\n"; &end_pipe; } } if ($opt_maxlines) { if ($lines >= $opt_maxlines) { print "Maxlines of $opt_maxlines reached.\n\n"; &end_pipe; } } my $line = $_; chomp $line; # remove trailing newlines if ($opt_not) { if ($line =~ m/$opt_not/) { next; } } for my $reg (@ARGV) { if ($opt_case) { if ( $line =~ m/$reg/ ) { - if ($opt_regex) { - - $objects->{$reg}++; # add regex as key - } - else { + if ($1) { $objects->{$1}++; # add match as key + } else { + $objects->{$reg}++; # add regex as key } } } else { if ( $line =~ m/$reg/i ) { # caseinsensetive is default - if ($opt_regex) { - $objects->{$reg}++; # add regexp as key - } - else { + if ($1) { $objects->{$1}++; # add match as key + } else { + $objects->{$reg}++; # add regexp as key } } } } if ( !@ARGV ) { # we didn't send regexp, count every line if ($opt_field) { # which field to use my @fields = split(",",$opt_field); my @fieldlist = split(/$opt_delimiter/,$line); my $object; for my $field (@fields) { $object .= "$fieldlist[($field-1)] "; } chop($object); $objects->{$object}++; } else { $objects->{$line}++; } } $freqcount++; if ($opt_linefreq) { # print out every <n> lines printout( $objects, $lines, $starttime ) if ( $freqcount >= $opt_linefreq ); $freqcount = 0; } if ($opt_timefreq) { # print out every <n> seconds if ( time() - $freqtime >= $opt_timefreq ) { printout( $objects, $lines, $starttime ); $freqtime = time(); } } } &end_pipe; # we only get here if the pipe is closed. sub printout { my ( $objects, $lines, $starttime ) = @_; my $diff = time() - $starttime; my $hitsum = 0; my $limit = 0; my $hitlimit; my $limitedhits = 0; if ($opt_clear) { # if set, clear screen between prints my $clear = `tput clear`; print $clear; } # sort the hash values and print descending for my $reg ( sort { $objects->{$b} <=> $objects->{$a} } keys %$objects ) { $hitsum += $objects->{$reg}; if ( !$hitlimit ) { # only print untill we hit the limit if ($opt_hits) { printf( "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", $reg, ( $objects->{$reg} / $lines ) * 100, $objects->{$reg} / $diff, $objects->{$reg}, $lines ); } else { printf( "%-25s : (%.1f%%) (%d hits / %d)\n", $reg, ( $objects->{$reg} / $lines ) * 100, $objects->{$reg}, $lines ); } } else { $limitedhits += $objects->{$reg}; } $limit++; if ( $opt_limit && $limit >= $opt_limit ) { $hitlimit++; } } if ($hitlimit) { if ($opt_hits) { printf( "%-25s : (%.1f%%) (%.1f hits/s) (%d(%d) hits(uniq) / %d)\n", "<limited>", ( $limitedhits / $lines ) * 100, $limitedhits / $diff, $limitedhits, $hitlimit, $lines ); } else { printf( "%-25s : (%.1f%%) (%d(%d) hits(uniq) / %d)\n", "<limited>", ( $limitedhits / $lines ) * 100, $limitedhits, $hitlimit, $lines ); } } my $rest = $lines - $hitsum; if ($rest) { if ($opt_hits) { printf( "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", "<rest>", ( $rest / $lines ) * 100, $rest / $diff, $rest, $lines ); } else { printf( "%-25s : (%.1f%%) (%d hits / %d)\n", "<rest>", ( $rest / $lines ) * 100, $rest, $lines ); } } if ($opt_hits) { printf( "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", "<total>", 100, $hitsum / $diff, $hitsum, $lines ); } else { printf( "%-25s : (%.1f%%) (%d hits / %d)\n", $reg, ( $objects->{$reg} / $lines ) * 100, $objects->{$reg}, $lines ); } print "\n"; } sub end_pipe { print "\n"; printout( $objects, $lines, $starttime ); my $diff = time() - $starttime; printf( "Parsed %d lines in %.2f secs (%.1f lines/s)\n", $lines, $diff, $lines / $diff ); exit; } sub help { print "pipestat usage\n"; print "someprogram | pipestat [options] [regexps]\n"; print "options:\n"; - print " -r|--regex # Use Regexp as key\n"; print " -t|--timefreq # How often do we update in time (default: 5 seconds)\n"; print " -m|--maxtime # Stop after this number of seconds (default: 60 seconds)\n"; print " --linefreq # How often do we update in lines (default: never\n"; print " --maxlines # Max number of lines do we read (default 5 million)\n"; print " -s|--case # Be case sensetive (default: caseinsensetive)\n"; print " -c|--clear # Clear screen between updates (default: no)\n"; print " -f|--field # what field to use?\n"; print " -d|--delimiter # What regex delimiter to use (default: space)\n"; print " -h|--hits # Show hits/s (default: on\n"; print " -l|--limit # Limit how many to print (default: 30)\n"; print " -n|--not # Exclude lines with this regexp\n"; print " -h|--help # Show this help\n"; print "\n"; print "Examples\n"; - print "tail -f /var/log/httpd/access.log | pipestat 'JPG\n"; + print "tail -f /var/log/httpd/access.log | pipestat 'gif' 'jpe?g'"; + print "tail -f /var/log/httpd/access.log | pipestat 'gif' '(jpe?g)'"; print "tail -f /var/log/httpd/access.log | pipestat --field 6"; + print "tail -f /var/log/httpd/access.log | pipestat --field 1 --not '127\.0\.0\.1"; exit; }
auduny/statpipe
b251ccfe99e7065fef235f96bf1b52d0c69f3d00
Added not keyword
diff --git a/pipestat b/pipestat index dd0a77e..9015cef 100755 --- a/pipestat +++ b/pipestat @@ -1,244 +1,279 @@ #!/usr/bin/perl # Pipestat, A nice tool to get statistics from any text in a pipe # Copyright Audun Ytterdal <audun@ytterdal.net> # Licenced under GPL Version 2. # TODO: field 4-5 4,6 etc # TODO: Merge ($1) ($2) etc. # TODO: Remove hits/s when cat'ing files # TODO: Removing stuff like where field='S' etc use Getopt::Long; #use Data::Dumper; use Time::HiRes qw( time ); # Unbuffered output $| = 1; # Catch Ctrl-C and friends $SIG{INT} = \&end_pipe; my $opt_linefreq; # Default none my $opt_timefreq=5; # Default every 5 second my $opt_maxtime=60; # Default 60 seconds my $opt_maxlines=5000000; # Stop at five million lines +my $opt_maxkeys=500000; my $opt_regex = 0; my $opt_case = 0; -my $opt_limit = 0; +my $opt_limit = 30; my $opt_field; my $opt_delimiter = '\s+'; #Default delimiter is one or more spaces my $opt_help = 0; my $opt_clear=0; #Don't clean screen my $opt_hits=1; # show hits per second my $result = GetOptions( "t|timefreq=i" => \$opt_timefreq, # how often do we update in time "m|maxtime=i" => \$opt_maxtime, # when to stop "maxlines=i" => \$opt_maxlines, # when to stop "linefreq=i" => \$opt_linefreq, # how often do we update in lines -"r|regex" => \$opt_regex, # regexp or match as key +"r|regex" => \$opt_regex, # regexp as key +"maxkeys=i" => \$opt_maxkeys, # maxkeys (default 5000) +"n|not=s" => \$opt_not, # Not these "s|case" => \$opt_case, # key sensetive? "c|clear" => \$opt_clear, # clear and updatescreen? "f|field=s" => \$opt_field, # what field to use? "d|delimiter=s" => \$opt_delimiter, # What delimiter to use "h|hits" => \$opt_hits, # show hits/s "l|limit=i" => \$opt_limit, # how many do we print "h|help" => \$opt_help # Print help ); if ($opt_help) { &help; } # The hash where we store objects my $objects; # counters my $freqcount = 0; my $starttime = time(); my $freqtime = $starttime; my $lines = 0; +my $keys = 0; my $now = time(); while (<STDIN>) { $now = time(); + $lines++; + if ($opt_maxkeys) { + $keys = keys %$objects; + if ($keys > $opt_maxkeys) { + print "Maxkeys ($opt_maxkeys) reached\n"; + &end_pipe; + } + } if ($opt_maxtime) { if ($now - $starttime >= $opt_maxtime) { - print "Maxtime of $opt_maxtime seconds reached.\n\n"; + print "Maxtime of $opt_maxtime seconds reached.\n"; &end_pipe; } } if ($opt_maxlines) { if ($lines >= $opt_maxlines) { print "Maxlines of $opt_maxlines reached.\n\n"; &end_pipe; } } my $line = $_; chomp $line; # remove trailing newlines + if ($opt_not) { + if ($line =~ m/$opt_not/) { + next; + } + } for my $reg (@ARGV) { if ($opt_case) { if ( $line =~ m/$reg/ ) { if ($opt_regex) { - $objects->{$1}++; # add match as key + $objects->{$reg}++; # add regex as key } else { - $objects->{$reg}++; # add regexp as key + $objects->{$1}++; # add match as key } } } else { if ( $line =~ m/$reg/i ) { # caseinsensetive is default if ($opt_regex) { - $objects->{$1}++; # add match as key + $objects->{$reg}++; # add regexp as key } else { - $objects->{$reg}++; # add regexps as key + $objects->{$1}++; # add match as key } } } } if ( !@ARGV ) { # we didn't send regexp, count every line if ($opt_field) { # which field to use my @fields = split(",",$opt_field); my @fieldlist = split(/$opt_delimiter/,$line); my $object; for my $field (@fields) { $object .= "$fieldlist[($field-1)] "; } chop($object); $objects->{$object}++; } else { $objects->{$line}++; } } $freqcount++; if ($opt_linefreq) { # print out every <n> lines printout( $objects, $lines, $starttime ) if ( $freqcount >= $opt_linefreq ); $freqcount = 0; } if ($opt_timefreq) { # print out every <n> seconds if ( time() - $freqtime >= $opt_timefreq ) { printout( $objects, $lines, $starttime ); $freqtime = time(); } } - $lines++; } &end_pipe; # we only get here if the pipe is closed. sub printout { my ( $objects, $lines, $starttime ) = @_; my $diff = time() - $starttime; my $hitsum = 0; my $limit = 0; my $hitlimit; my $limitedhits = 0; if ($opt_clear) { # if set, clear screen between prints my $clear = `tput clear`; print $clear; } # sort the hash values and print descending for my $reg ( sort { $objects->{$b} <=> $objects->{$a} } keys %$objects ) { $hitsum += $objects->{$reg}; if ( !$hitlimit ) { # only print untill we hit the limit if ($opt_hits) { printf( "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", $reg, ( $objects->{$reg} / $lines ) * 100, $objects->{$reg} / $diff, $objects->{$reg}, $lines ); } else { printf( "%-25s : (%.1f%%) (%d hits / %d)\n", $reg, ( $objects->{$reg} / $lines ) * 100, $objects->{$reg}, $lines ); } } else { $limitedhits += $objects->{$reg}; } $limit++; if ( $opt_limit && $limit >= $opt_limit ) { $hitlimit++; } } if ($hitlimit) { if ($opt_hits) { printf( "%-25s : (%.1f%%) (%.1f hits/s) (%d(%d) hits(uniq) / %d)\n", "<limited>", ( $limitedhits / $lines ) * 100, $limitedhits / $diff, $limitedhits, $hitlimit, $lines ); } else { printf( "%-25s : (%.1f%%) (%d(%d) hits(uniq) / %d)\n", "<limited>", ( $limitedhits / $lines ) * 100, $limitedhits, $hitlimit, $lines ); } } my $rest = $lines - $hitsum; if ($rest) { if ($opt_hits) { printf( "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", "<rest>", ( $rest / $lines ) * 100, $rest / $diff, $rest, $lines ); } else { printf( "%-25s : (%.1f%%) (%d hits / %d)\n", "<rest>", ( $rest / $lines ) * 100, $rest, $lines ); } } + if ($opt_hits) { + printf( + "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", + "<total>", + 100, + $hitsum / $diff, + $hitsum, $lines + ); + } + else { + printf( + "%-25s : (%.1f%%) (%d hits / %d)\n", + $reg, ( $objects->{$reg} / $lines ) * 100, + $objects->{$reg}, $lines + ); + } + print "\n"; } sub end_pipe { + print "\n"; printout( $objects, $lines, $starttime ); my $diff = time() - $starttime; printf( "Parsed %d lines in %.2f secs (%.1f lines/s)\n", $lines, $diff, $lines / $diff ); exit; } sub help { print "pipestat usage\n"; print "someprogram | pipestat [options] [regexps]\n"; print "options:\n"; - print " -r|--regex # Create key from match\n"; + print " -r|--regex # Use Regexp as key\n"; print " -t|--timefreq # How often do we update in time (default: 5 seconds)\n"; print " -m|--maxtime # Stop after this number of seconds (default: 60 seconds)\n"; - print " --linefreq # How often do we update in lines (default: never\n"; - print " --maxlines # Max number of lines do we read (default 5 million)\n"; + print " --linefreq # How often do we update in lines (default: never\n"; + print " --maxlines # Max number of lines do we read (default 5 million)\n"; print " -s|--case # Be case sensetive (default: caseinsensetive)\n"; print " -c|--clear # Clear screen between updates (default: no)\n"; print " -f|--field # what field to use?\n"; print " -d|--delimiter # What regex delimiter to use (default: space)\n"; print " -h|--hits # Show hits/s (default: on\n"; - print " -l|--limit # Limit how many to print (default: all)\n"; + print " -l|--limit # Limit how many to print (default: 30)\n"; + print " -n|--not # Exclude lines with this regexp\n"; print " -h|--help # Show this help\n"; print "\n"; print "Examples\n"; - print "tail -f /var/log/httpd/access.log | pipestat -r 'GET ([^\s]+)'\n"; + print "tail -f /var/log/httpd/access.log | pipestat 'JPG\n"; print "tail -f /var/log/httpd/access.log | pipestat --field 6"; exit; }
auduny/statpipe
37e3321352914af4a2d5c88a071a7a29dde3ee64
More cleanup, changed -m to -r since it's a regexp
diff --git a/pipestat b/pipestat index 4a67827..dd0a77e 100755 --- a/pipestat +++ b/pipestat @@ -1,256 +1,244 @@ #!/usr/bin/perl # Pipestat, A nice tool to get statistics from any text in a pipe # Copyright Audun Ytterdal <audun@ytterdal.net> # Licenced under GPL Version 2. # TODO: field 4-5 4,6 etc # TODO: Merge ($1) ($2) etc. # TODO: Remove hits/s when cat'ing files # TODO: Removing stuff like where field='S' etc use Getopt::Long; #use Data::Dumper; use Time::HiRes qw( time ); # Unbuffered output $| = 1; # Catch Ctrl-C and friends $SIG{INT} = \&end_pipe; -my $opt_linefreq; -my $opt_timefreq=5; -my $opt_maxtime; +my $opt_linefreq; # Default none +my $opt_timefreq=5; # Default every 5 second +my $opt_maxtime=60; # Default 60 seconds my $opt_maxlines=5000000; # Stop at five million lines -my $opt_match = 0; +my $opt_regex = 0; my $opt_case = 0; my $opt_limit = 0; my $opt_field; -my $opt_delimiter = '\s+'; +my $opt_delimiter = '\s+'; #Default delimiter is one or more spaces my $opt_help = 0; -my $opt_clear; -my $opt_hits=1; - -my $options = { -"t|timefreq=i" => \$opt_timefreq, # how often do we update in time -"m|maxtime=i" => \$opt_maxtime, # when to stop -"maxlines=i" => \$opt_maxlines, # when to stop -"linefreq=i" => \$opt_linefreq, # how often do we update in lines -"r|match" => \$opt_match, # regexp or match as key -"s|case" => \$opt_case, # key sensetive? -"c|clear" => \$opt_clear, # clear and updatescreen? -"f|field=s" => \$opt_field, # what field to use? -"d|delimiter=s" => \$opt_delimiter, # What delimiter to use -"h|hits" => \$opt_hits, # show hits/s -"l|limit=i" => \$opt_limit, # how many do we print -"h|help" => \$opt_help -}; - - - +my $opt_clear=0; #Don't clean screen +my $opt_hits=1; # show hits per second my $result = GetOptions( -"t|timefreq=i" => \$opt_timefreq, # how often do we update in time -"m|maxtime=i" => \$opt_maxtime, # when to stop -"maxlines=i" => \$opt_maxlines, # when to stop -"linefreq=i" => \$opt_linefreq, # how often do we update in lines -"r|match" => \$opt_match, # regexp or match as key -"s|case" => \$opt_case, # key sensetive? -"c|clear" => \$opt_clear, # clear and updatescreen? -"f|field=s" => \$opt_field, # what field to use? -"d|delimiter=s" => \$opt_delimiter, # What delimiter to use -"h|hits" => \$opt_hits, # show hits/s -"l|limit=i" => \$opt_limit, # how many do we print -"h|help" => \$opt_help -); # print help +"t|timefreq=i" => \$opt_timefreq, # how often do we update in time +"m|maxtime=i" => \$opt_maxtime, # when to stop +"maxlines=i" => \$opt_maxlines, # when to stop +"linefreq=i" => \$opt_linefreq, # how often do we update in lines +"r|regex" => \$opt_regex, # regexp or match as key +"s|case" => \$opt_case, # key sensetive? +"c|clear" => \$opt_clear, # clear and updatescreen? +"f|field=s" => \$opt_field, # what field to use? +"d|delimiter=s" => \$opt_delimiter, # What delimiter to use +"h|hits" => \$opt_hits, # show hits/s +"l|limit=i" => \$opt_limit, # how many do we print +"h|help" => \$opt_help # Print help +); if ($opt_help) { &help; } # The hash where we store objects my $objects; # counters my $freqcount = 0; my $starttime = time(); my $freqtime = $starttime; my $lines = 0; my $now = time(); while (<STDIN>) { $now = time(); if ($opt_maxtime) { if ($now - $starttime >= $opt_maxtime) { print "Maxtime of $opt_maxtime seconds reached.\n\n"; &end_pipe; } } if ($opt_maxlines) { if ($lines >= $opt_maxlines) { print "Maxlines of $opt_maxlines reached.\n\n"; &end_pipe; } } my $line = $_; chomp $line; # remove trailing newlines for my $reg (@ARGV) { if ($opt_case) { if ( $line =~ m/$reg/ ) { - if ($opt_match) { + if ($opt_regex) { $objects->{$1}++; # add match as key } else { $objects->{$reg}++; # add regexp as key } } } else { if ( $line =~ m/$reg/i ) { # caseinsensetive is default - if ($opt_match) { + if ($opt_regex) { $objects->{$1}++; # add match as key } else { $objects->{$reg}++; # add regexps as key } } } } if ( !@ARGV ) { # we didn't send regexp, count every line if ($opt_field) { # which field to use my @fields = split(",",$opt_field); my @fieldlist = split(/$opt_delimiter/,$line); my $object; for my $field (@fields) { $object .= "$fieldlist[($field-1)] "; } chop($object); $objects->{$object}++; } else { $objects->{$line}++; } } $freqcount++; if ($opt_linefreq) { # print out every <n> lines printout( $objects, $lines, $starttime ) if ( $freqcount >= $opt_linefreq ); $freqcount = 0; } if ($opt_timefreq) { # print out every <n> seconds if ( time() - $freqtime >= $opt_timefreq ) { printout( $objects, $lines, $starttime ); $freqtime = time(); } } $lines++; } &end_pipe; # we only get here if the pipe is closed. sub printout { my ( $objects, $lines, $starttime ) = @_; my $diff = time() - $starttime; my $hitsum = 0; my $limit = 0; my $hitlimit; my $limitedhits = 0; if ($opt_clear) { # if set, clear screen between prints my $clear = `tput clear`; print $clear; } # sort the hash values and print descending for my $reg ( sort { $objects->{$b} <=> $objects->{$a} } keys %$objects ) { $hitsum += $objects->{$reg}; if ( !$hitlimit ) { # only print untill we hit the limit if ($opt_hits) { printf( "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", $reg, ( $objects->{$reg} / $lines ) * 100, $objects->{$reg} / $diff, $objects->{$reg}, $lines ); } else { printf( "%-25s : (%.1f%%) (%d hits / %d)\n", $reg, ( $objects->{$reg} / $lines ) * 100, $objects->{$reg}, $lines ); } } else { $limitedhits += $objects->{$reg}; } $limit++; if ( $opt_limit && $limit >= $opt_limit ) { $hitlimit++; } } if ($hitlimit) { if ($opt_hits) { printf( "%-25s : (%.1f%%) (%.1f hits/s) (%d(%d) hits(uniq) / %d)\n", "<limited>", ( $limitedhits / $lines ) * 100, $limitedhits / $diff, $limitedhits, $hitlimit, $lines ); } else { printf( "%-25s : (%.1f%%) (%d(%d) hits(uniq) / %d)\n", "<limited>", ( $limitedhits / $lines ) * 100, $limitedhits, $hitlimit, $lines ); } } my $rest = $lines - $hitsum; if ($rest) { if ($opt_hits) { printf( "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", "<rest>", ( $rest / $lines ) * 100, $rest / $diff, $rest, $lines ); } else { printf( "%-25s : (%.1f%%) (%d hits / %d)\n", "<rest>", ( $rest / $lines ) * 100, $rest, $lines ); } } print "\n"; } sub end_pipe { printout( $objects, $lines, $starttime ); my $diff = time() - $starttime; printf( "Parsed %d lines in %.2f secs (%.1f lines/s)\n", $lines, $diff, $lines / $diff ); exit; } sub help { print "pipestat usage\n"; print "someprogram | pipestat [options] [regexps]\n"; print "options:\n"; - print "--freq <n> - How often to update in lines, default never\n"; - print "--time|t - How often to update in seconds, default never\n"; - print "--runtime|r <n> - How long to run in seconds, default forever\n"; - print "--runlines <n> - How long to run in lines, default forever\n"; - print "--match|m - Use regexp match as key instead of regexps\n"; - print - "--case|s - Use casesensetive matching - default insensetive\n"; - print "--field|f <n> - if not using regexp, use this field from line\n"; - print "--limit|l <n> - Only show the top <n> hits\n"; - print "--help|h - This helpscreen\n"; + print " -r|--regex # Create key from match\n"; + print " -t|--timefreq # How often do we update in time (default: 5 seconds)\n"; + print " -m|--maxtime # Stop after this number of seconds (default: 60 seconds)\n"; + print " --linefreq # How often do we update in lines (default: never\n"; + print " --maxlines # Max number of lines do we read (default 5 million)\n"; + print " -s|--case # Be case sensetive (default: caseinsensetive)\n"; + print " -c|--clear # Clear screen between updates (default: no)\n"; + print " -f|--field # what field to use?\n"; + print " -d|--delimiter # What regex delimiter to use (default: space)\n"; + print " -h|--hits # Show hits/s (default: on\n"; + print " -l|--limit # Limit how many to print (default: all)\n"; + print " -h|--help # Show this help\n"; + print "\n"; + print "Examples\n"; + print "tail -f /var/log/httpd/access.log | pipestat -r 'GET ([^\s]+)'\n"; + print "tail -f /var/log/httpd/access.log | pipestat --field 6"; exit; }
auduny/statpipe
27806096d28a699ef8732a4c6e22d031a9c53309
Clean up
diff --git a/pipestat b/pipestat index 68c8911..4a67827 100755 --- a/pipestat +++ b/pipestat @@ -1,228 +1,256 @@ #!/usr/bin/perl # Pipestat, A nice tool to get statistics from any text in a pipe # Copyright Audun Ytterdal <audun@ytterdal.net> # Licenced under GPL Version 2. # TODO: field 4-5 4,6 etc # TODO: Merge ($1) ($2) etc. # TODO: Remove hits/s when cat'ing files # TODO: Removing stuff like where field='S' etc use Getopt::Long; -use Data::Dumper; +#use Data::Dumper; use Time::HiRes qw( time ); # Unbuffered output $| = 1; # Catch Ctrl-C and friends $SIG{INT} = \&end_pipe; -my $opt_freq; +my $opt_linefreq; +my $opt_timefreq=5; +my $opt_maxtime; +my $opt_maxlines=5000000; # Stop at five million lines my $opt_match = 0; my $opt_case = 0; my $opt_limit = 0; my $opt_field; +my $opt_delimiter = '\s+'; my $opt_help = 0; -my $opt_freqtime; my $opt_clear; -my $opt_runtime; -my $opt_runlines; my $opt_hits=1; +my $options = { +"t|timefreq=i" => \$opt_timefreq, # how often do we update in time +"m|maxtime=i" => \$opt_maxtime, # when to stop +"maxlines=i" => \$opt_maxlines, # when to stop +"linefreq=i" => \$opt_linefreq, # how often do we update in lines +"r|match" => \$opt_match, # regexp or match as key +"s|case" => \$opt_case, # key sensetive? +"c|clear" => \$opt_clear, # clear and updatescreen? +"f|field=s" => \$opt_field, # what field to use? +"d|delimiter=s" => \$opt_delimiter, # What delimiter to use +"h|hits" => \$opt_hits, # show hits/s +"l|limit=i" => \$opt_limit, # how many do we print +"h|help" => \$opt_help +}; + + + + my $result = GetOptions( - "freq=i" => \$opt_freq, # how often do we update in lines - "t|time=i" => \$opt_freqtime, # how often do we update in time - "r|runtime=i" => \$opt_runtime, # when to stop - "runlines=i" => \$opt_runlines, # when to stop - "m|match" => \$opt_match, # regexp or match as key - "s|case" => \$opt_case, # key sensetive? - "c|clear" => \$opt_clear, # clear and updatescreen? - "f|field=s" => \$opt_field, # what field to use? - "h|hits" => \$opt_hits, # show hits/s - "l|limit=i" => \$opt_limit, # how many do we print - "h|help" => \$opt_help +"t|timefreq=i" => \$opt_timefreq, # how often do we update in time +"m|maxtime=i" => \$opt_maxtime, # when to stop +"maxlines=i" => \$opt_maxlines, # when to stop +"linefreq=i" => \$opt_linefreq, # how often do we update in lines +"r|match" => \$opt_match, # regexp or match as key +"s|case" => \$opt_case, # key sensetive? +"c|clear" => \$opt_clear, # clear and updatescreen? +"f|field=s" => \$opt_field, # what field to use? +"d|delimiter=s" => \$opt_delimiter, # What delimiter to use +"h|hits" => \$opt_hits, # show hits/s +"l|limit=i" => \$opt_limit, # how many do we print +"h|help" => \$opt_help ); # print help if ($opt_help) { - &help; + &help; } # The hash where we store objects my $objects; # counters my $freqcount = 0; my $starttime = time(); my $freqtime = $starttime; my $lines = 0; +my $now = time(); while (<STDIN>) { - if ($opt_runtime) { # end if we've run out of $opt_runtime; - &end_pipe if ( time() - $starttime >= $opt_runtime ); - } - $lines++; - if ($opt_runlines) { # end if we've run out of $opt_runlines; - &end_pipe if ( $lines >= $opt_runlines ); - } - my $line = $_; - chomp $line; # remove trailing newlines - for my $reg (@ARGV) { - if ($opt_case) { - if ( $line =~ m/$reg/ ) { - if ($opt_match) { - - $objects->{$1}++; # add match as key - } - else { - $objects->{$reg}++; # add regexp as key - } - } - } - else { - if ( $line =~ m/$reg/i ) { # caseinsensetive is default - if ($opt_match) { - $objects->{$1}++; # add match as key - } - else { - $objects->{$reg}++; # add regexps as key - } - } - } - } - if ( !@ARGV ) { # we didn't send regexp, count every line - if ($opt_field) { # which field to use - my @fields = split(",",$opt_field); - my @fieldlist = split(/\s+/,$line); - my $object; - for my $field (@fields) { - $object .= "$fieldlist[($field-1)] "; - } - chop($object); - $objects->{$object}++; - } - else { - $objects->{$line}++; - } - } - $freqcount++; - if ($opt_freq) { # print out every <n> lines - printout( $objects, $lines, $starttime ) if ( $freqcount >= $opt_freq ); - $freqcount = 0; - } - if ($opt_freqtime) { # print out every <n> seconds - if ( time() - $freqtime >= $opt_freqtime ) { - printout( $objects, $lines, $starttime ); - $freqtime = time(); - } - - } + $now = time(); + if ($opt_maxtime) { + if ($now - $starttime >= $opt_maxtime) { + print "Maxtime of $opt_maxtime seconds reached.\n\n"; + &end_pipe; + } + } + if ($opt_maxlines) { + if ($lines >= $opt_maxlines) { + print "Maxlines of $opt_maxlines reached.\n\n"; + &end_pipe; + } + } + my $line = $_; + chomp $line; # remove trailing newlines + for my $reg (@ARGV) { + if ($opt_case) { + if ( $line =~ m/$reg/ ) { + if ($opt_match) { + + $objects->{$1}++; # add match as key + } + else { + $objects->{$reg}++; # add regexp as key + } + } + } + else { + if ( $line =~ m/$reg/i ) { # caseinsensetive is default + if ($opt_match) { + $objects->{$1}++; # add match as key + } + else { + $objects->{$reg}++; # add regexps as key + } + } + } + } + if ( !@ARGV ) { # we didn't send regexp, count every line + if ($opt_field) { # which field to use + my @fields = split(",",$opt_field); + my @fieldlist = split(/$opt_delimiter/,$line); + my $object; + for my $field (@fields) { + $object .= "$fieldlist[($field-1)] "; + } + chop($object); + $objects->{$object}++; + } + else { + $objects->{$line}++; + } + } + $freqcount++; + if ($opt_linefreq) { # print out every <n> lines + printout( $objects, $lines, $starttime ) if ( $freqcount >= $opt_linefreq ); + $freqcount = 0; + } + if ($opt_timefreq) { # print out every <n> seconds + if ( time() - $freqtime >= $opt_timefreq ) { + printout( $objects, $lines, $starttime ); + $freqtime = time(); + } + + } + $lines++; } &end_pipe; # we only get here if the pipe is closed. sub printout { - my ( $objects, $lines, $starttime ) = @_; - my $diff = time() - $starttime; - my $hitsum = 0; - my $limit = 0; - my $hitlimit; - my $limitedhits = 0; - if ($opt_clear) { # if set, clear screen between prints - my $clear = `tput clear`; - print $clear; - } - - # sort the hash values and print descending - for my $reg ( sort { $objects->{$b} <=> $objects->{$a} } keys %$objects ) { - $hitsum += $objects->{$reg}; - if ( !$hitlimit ) { # only print untill we hit the limit - if ($opt_hits) { - printf( - "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", - $reg, - ( $objects->{$reg} / $lines ) * 100, - $objects->{$reg} / $diff, - $objects->{$reg}, $lines - ); - } - else { - printf( - "%-25s : (%.1f%%) (%d hits / %d)\n", - $reg, ( $objects->{$reg} / $lines ) * 100, - $objects->{$reg}, $lines - ); - } - } - else { - $limitedhits += $objects->{$reg}; - } - $limit++; - if ( $opt_limit && $limit >= $opt_limit ) { - $hitlimit++; - } - } - if ($hitlimit) { - if ($opt_hits) { - printf( - "%-25s : (%.1f%%) (%.1f hits/s) (%d(%d) hits(uniq) / %d)\n", - "<limited>", - ( $limitedhits / $lines ) * 100, - $limitedhits / $diff, - $limitedhits, $hitlimit, $lines - ); - } - else { - printf( - "%-25s : (%.1f%%) (%d(%d) hits(uniq) / %d)\n", - "<limited>", ( $limitedhits / $lines ) * 100, - $limitedhits, $hitlimit, $lines - ); - } - } - my $rest = $lines - $hitsum; - if ($rest) { - if ($opt_hits) { - printf( - "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", - "<rest>", - ( $rest / $lines ) * 100, - $rest / $diff, - $rest, $lines - ); - } - else { - printf( - "%-25s : (%.1f%%) (%d hits / %d)\n", - "<rest>", ( $rest / $lines ) * 100, - $rest, $lines - ); - } - } - print "\n"; + my ( $objects, $lines, $starttime ) = @_; + my $diff = time() - $starttime; + my $hitsum = 0; + my $limit = 0; + my $hitlimit; + my $limitedhits = 0; + if ($opt_clear) { # if set, clear screen between prints + my $clear = `tput clear`; + print $clear; + } + + # sort the hash values and print descending + for my $reg ( sort { $objects->{$b} <=> $objects->{$a} } keys %$objects ) { + $hitsum += $objects->{$reg}; + if ( !$hitlimit ) { # only print untill we hit the limit + if ($opt_hits) { + printf( + "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", + $reg, + ( $objects->{$reg} / $lines ) * 100, + $objects->{$reg} / $diff, + $objects->{$reg}, $lines + ); + } + else { + printf( + "%-25s : (%.1f%%) (%d hits / %d)\n", + $reg, ( $objects->{$reg} / $lines ) * 100, + $objects->{$reg}, $lines + ); + } + } + else { + $limitedhits += $objects->{$reg}; + } + $limit++; + if ( $opt_limit && $limit >= $opt_limit ) { + $hitlimit++; + } + } + if ($hitlimit) { + if ($opt_hits) { + printf( + "%-25s : (%.1f%%) (%.1f hits/s) (%d(%d) hits(uniq) / %d)\n", + "<limited>", + ( $limitedhits / $lines ) * 100, + $limitedhits / $diff, + $limitedhits, $hitlimit, $lines + ); + } + else { + printf( + "%-25s : (%.1f%%) (%d(%d) hits(uniq) / %d)\n", + "<limited>", ( $limitedhits / $lines ) * 100, + $limitedhits, $hitlimit, $lines + ); + } + } + my $rest = $lines - $hitsum; + if ($rest) { + if ($opt_hits) { + printf( + "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", + "<rest>", + ( $rest / $lines ) * 100, + $rest / $diff, + $rest, $lines + ); + } + else { + printf( + "%-25s : (%.1f%%) (%d hits / %d)\n", + "<rest>", ( $rest / $lines ) * 100, + $rest, $lines + ); + } + } + print "\n"; } sub end_pipe { - printout( $objects, $lines, $starttime ); - my $diff = time() - $starttime; - printf( "Parsed %d lines in %.2f secs (%.1f lines/s)\n", - $lines, $diff, $lines / $diff ); - exit; + printout( $objects, $lines, $starttime ); + my $diff = time() - $starttime; + printf( "Parsed %d lines in %.2f secs (%.1f lines/s)\n", + $lines, $diff, $lines / $diff ); + exit; } sub help { - print "pipestat usage\n"; - print "someprogram | pipestat [options] [regexps]\n"; - print "options:\n"; - print "--freq <n> - How often to update in lines, default never\n"; - print "--time|t - How often to update in seconds, default never\n"; - print "--runtime|r <n> - How long to run in seconds, default forever\n"; - print "--runlines <n> - How long to run in lines, default forever\n"; - print "--match|m - Use regexp match as key instead of regexps\n"; - print - "--case|s - Use casesensetive matching - default insensetive\n"; - print "--field|f <n> - if not using regexp, use this field from line\n"; - print "--limit|l <n> - Only show the top <n> hits\n"; - print "--help|h - This helpscreen\n"; - exit; + print "pipestat usage\n"; + print "someprogram | pipestat [options] [regexps]\n"; + print "options:\n"; + print "--freq <n> - How often to update in lines, default never\n"; + print "--time|t - How often to update in seconds, default never\n"; + print "--runtime|r <n> - How long to run in seconds, default forever\n"; + print "--runlines <n> - How long to run in lines, default forever\n"; + print "--match|m - Use regexp match as key instead of regexps\n"; + print + "--case|s - Use casesensetive matching - default insensetive\n"; + print "--field|f <n> - if not using regexp, use this field from line\n"; + print "--limit|l <n> - Only show the top <n> hits\n"; + print "--help|h - This helpscreen\n"; + exit; }
auduny/statpipe
2e781f27e7bcce78f299fde70bfef04dc664557c
Just playin with git
diff --git a/README b/README index e69de29..531a3e2 100644 --- a/README +++ b/README @@ -0,0 +1 @@ +Tool to be do statistics on pipes from tails of logs and stuff
auduny/statpipe
814f58c4c8d1eccd9354213762d35437f1c705a0
Adding first commit
diff --git a/pipestat b/pipestat new file mode 100755 index 0000000..68c8911 --- /dev/null +++ b/pipestat @@ -0,0 +1,228 @@ +#!/usr/bin/perl +# Pipestat, A nice tool to get statistics from any text in a pipe +# Copyright Audun Ytterdal <audun@ytterdal.net> +# Licenced under GPL Version 2. + +# TODO: field 4-5 4,6 etc +# TODO: Merge ($1) ($2) etc. +# TODO: Remove hits/s when cat'ing files +# TODO: Removing stuff like where field='S' etc + +use Getopt::Long; +use Data::Dumper; +use Time::HiRes qw( time ); + +# Unbuffered output +$| = 1; + +# Catch Ctrl-C and friends +$SIG{INT} = \&end_pipe; + +my $opt_freq; +my $opt_match = 0; +my $opt_case = 0; +my $opt_limit = 0; +my $opt_field; +my $opt_help = 0; +my $opt_freqtime; +my $opt_clear; +my $opt_runtime; +my $opt_runlines; +my $opt_hits=1; + +my $result = GetOptions( + "freq=i" => \$opt_freq, # how often do we update in lines + "t|time=i" => \$opt_freqtime, # how often do we update in time + "r|runtime=i" => \$opt_runtime, # when to stop + "runlines=i" => \$opt_runlines, # when to stop + "m|match" => \$opt_match, # regexp or match as key + "s|case" => \$opt_case, # key sensetive? + "c|clear" => \$opt_clear, # clear and updatescreen? + "f|field=s" => \$opt_field, # what field to use? + "h|hits" => \$opt_hits, # show hits/s + "l|limit=i" => \$opt_limit, # how many do we print + "h|help" => \$opt_help +); # print help + +if ($opt_help) { + &help; +} + +# The hash where we store objects +my $objects; + +# counters +my $freqcount = 0; +my $starttime = time(); +my $freqtime = $starttime; +my $lines = 0; + +while (<STDIN>) { + if ($opt_runtime) { # end if we've run out of $opt_runtime; + &end_pipe if ( time() - $starttime >= $opt_runtime ); + } + $lines++; + if ($opt_runlines) { # end if we've run out of $opt_runlines; + &end_pipe if ( $lines >= $opt_runlines ); + } + my $line = $_; + chomp $line; # remove trailing newlines + for my $reg (@ARGV) { + if ($opt_case) { + if ( $line =~ m/$reg/ ) { + if ($opt_match) { + + $objects->{$1}++; # add match as key + } + else { + $objects->{$reg}++; # add regexp as key + } + } + } + else { + if ( $line =~ m/$reg/i ) { # caseinsensetive is default + if ($opt_match) { + $objects->{$1}++; # add match as key + } + else { + $objects->{$reg}++; # add regexps as key + } + } + } + } + if ( !@ARGV ) { # we didn't send regexp, count every line + if ($opt_field) { # which field to use + my @fields = split(",",$opt_field); + my @fieldlist = split(/\s+/,$line); + my $object; + for my $field (@fields) { + $object .= "$fieldlist[($field-1)] "; + } + chop($object); + $objects->{$object}++; + } + else { + $objects->{$line}++; + } + } + $freqcount++; + if ($opt_freq) { # print out every <n> lines + printout( $objects, $lines, $starttime ) if ( $freqcount >= $opt_freq ); + $freqcount = 0; + } + if ($opt_freqtime) { # print out every <n> seconds + if ( time() - $freqtime >= $opt_freqtime ) { + printout( $objects, $lines, $starttime ); + $freqtime = time(); + } + + } + +} +&end_pipe; # we only get here if the pipe is closed. + +sub printout { + my ( $objects, $lines, $starttime ) = @_; + my $diff = time() - $starttime; + my $hitsum = 0; + my $limit = 0; + my $hitlimit; + my $limitedhits = 0; + if ($opt_clear) { # if set, clear screen between prints + my $clear = `tput clear`; + print $clear; + } + + # sort the hash values and print descending + for my $reg ( sort { $objects->{$b} <=> $objects->{$a} } keys %$objects ) { + $hitsum += $objects->{$reg}; + if ( !$hitlimit ) { # only print untill we hit the limit + if ($opt_hits) { + printf( + "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", + $reg, + ( $objects->{$reg} / $lines ) * 100, + $objects->{$reg} / $diff, + $objects->{$reg}, $lines + ); + } + else { + printf( + "%-25s : (%.1f%%) (%d hits / %d)\n", + $reg, ( $objects->{$reg} / $lines ) * 100, + $objects->{$reg}, $lines + ); + } + } + else { + $limitedhits += $objects->{$reg}; + } + $limit++; + if ( $opt_limit && $limit >= $opt_limit ) { + $hitlimit++; + } + } + if ($hitlimit) { + if ($opt_hits) { + printf( + "%-25s : (%.1f%%) (%.1f hits/s) (%d(%d) hits(uniq) / %d)\n", + "<limited>", + ( $limitedhits / $lines ) * 100, + $limitedhits / $diff, + $limitedhits, $hitlimit, $lines + ); + } + else { + printf( + "%-25s : (%.1f%%) (%d(%d) hits(uniq) / %d)\n", + "<limited>", ( $limitedhits / $lines ) * 100, + $limitedhits, $hitlimit, $lines + ); + } + } + my $rest = $lines - $hitsum; + if ($rest) { + if ($opt_hits) { + printf( + "%-25s : (%.1f%%) (%.1f hits/s) (%d hits / %d)\n", + "<rest>", + ( $rest / $lines ) * 100, + $rest / $diff, + $rest, $lines + ); + } + else { + printf( + "%-25s : (%.1f%%) (%d hits / %d)\n", + "<rest>", ( $rest / $lines ) * 100, + $rest, $lines + ); + } + } + print "\n"; +} + +sub end_pipe { + printout( $objects, $lines, $starttime ); + my $diff = time() - $starttime; + printf( "Parsed %d lines in %.2f secs (%.1f lines/s)\n", + $lines, $diff, $lines / $diff ); + exit; +} + +sub help { + print "pipestat usage\n"; + print "someprogram | pipestat [options] [regexps]\n"; + print "options:\n"; + print "--freq <n> - How often to update in lines, default never\n"; + print "--time|t - How often to update in seconds, default never\n"; + print "--runtime|r <n> - How long to run in seconds, default forever\n"; + print "--runlines <n> - How long to run in lines, default forever\n"; + print "--match|m - Use regexp match as key instead of regexps\n"; + print + "--case|s - Use casesensetive matching - default insensetive\n"; + print "--field|f <n> - if not using regexp, use this field from line\n"; + print "--limit|l <n> - Only show the top <n> hits\n"; + print "--help|h - This helpscreen\n"; + exit; +}
maff/sampletex
783c281adf52d00c4f5fe3b3f1e5e056f7658ef8
change paper.tex to http://pangea.stanford.edu/computerinfo/unix/formatting/latexexample.html
diff --git a/src/paper.tex b/src/paper.tex index 84d4654..192f06d 100755 --- a/src/paper.tex +++ b/src/paper.tex @@ -1,344 +1,271 @@ -\documentclass[12pt]{article} - -\usepackage{amsmath} % need for subequations -\usepackage{graphicx} % need for figures -\usepackage{verbatim} % useful for program listings -\usepackage{color} % use if color is used in text -\usepackage{subfigure} % use for side-by-side figures -\usepackage{hyperref} % use for hypertext links, including those to external documents and URLs - -% don't need the following. simply use defaults -\setlength{\baselineskip}{16.0pt} % 16 pt usual spacing between lines - -\setlength{\parskip}{3pt plus 2pt} -\setlength{\parindent}{20pt} -\setlength{\oddsidemargin}{0.5cm} -\setlength{\evensidemargin}{0.5cm} -\setlength{\marginparsep}{0.75cm} -\setlength{\marginparwidth}{2.5cm} -\setlength{\marginparpush}{1.0cm} -\setlength{\textwidth}{150mm} - -\begin{comment} -\pagestyle{empty} % use if page numbers not wanted -\end{comment} - -% above is the preamble - +% Example LaTeX document for GP111 - note % sign indicates a comment +\documentstyle[11pt]{article} +% Default margins are too wide all the way around. I reset them here +\setlength{\topmargin}{-.5in} +\setlength{\textheight}{9in} +\setlength{\oddsidemargin}{.125in} +\setlength{\textwidth}{6.25in} \begin{document} +\title{LaTeX Typesetting By Example} +\author{Phil Farrell\\ +Stanford University School of Earth Sciences} +\renewcommand{\today}{November 2, 1994} +\maketitle +This article demonstrates a basic set of LaTeX formatting commands. +Compare the typeset output side-by-side with the input document. + +\section {Plain Text} +Type your text in free-format; lines can be as long +or as short +as you wish. + You can indent or space out + your input + text in + any way you like to highlight the structure + of your manuscript and make it easier to edit. +LaTeX fills lines and adjusts spacing between words to produce an +aesthetically pleasing result. + +Completely blank lines in the input file break your text into +paragraphs. +To change the font for a single character, word, or set of words, +enclose the word and the font changing command within braces, +{\em like this}. +A font changing command not enclosed in braces, like the change to \bf +bold here, keeps that change in effect until the end of the document or +until countermanded by another font switch, like this change back to +\rm roman. + +\section {Displayed Text} +Use the ``quote'' and ``quotation'' environments for typesetting quoted +material or any other text that should be slightly indented and set off +from the normal text. +\begin{quotation} +The quote and quotation environments are similar, but use different +settings for paragraph indentation and spacing. + +\em When in doubt, consult the manual. +\end{quotation} + +So far, I have demonstrated titles, paragraphs, font changes, and +section headings. +Now, I am going to show lists and tables. +\begin{enumerate} +\item +The ``enumerate'' environment numbers the list elements, like this. + +Items in a list can contain multiple paragraphs. +These paragraphs are appropriately spaced and indented according to their +position in the list. + \begin{itemize} + \item The ``itemize'' environment sets off list items with ``bullets'', +like this. Finally, the ``description'' environment lets you put your own + \begin{description} + \item[A] label on each item, like this ``A''. + \item[If the label is long,] the first line of the item text will +be spaced over to the right as needed. + \end{description} + \item Of course, lists can be nested, each type up to at least four levels. +One type of list can be nested within another type. + \begin{itemize} + \item Nested lists of the same type will change style of numbering +or ``bullets'' as needed. + \end{itemize} + \end{itemize} +\item Don't forget to close off all list environments with the +appropriate \verb+\end{...}+ command. +Indenting \verb+\begin{...}+, \verb+\item+, and \verb+\end{...}+ +commands in the input document according to their nesting level can help +clarify the structure. +\end{enumerate} +Here is a very simple table showing data lined up in columns. +Notice that I include the table in a ``center'' environment to display +it properly. +The title is created simply as another paragraph in the center environment, +rather than as part of the table itself. \begin{center} -{\large Introduction to \LaTeX} \\ % \\ = new line -\copyright 2006 by Harvey Gould \\ -December 5, 2006 -\end{center} - -\section{Introduction} -\TeX\ looks more difficult than it is. It is -almost as easy as $\pi$. See how easy it is to make special -symbols such as $\alpha$, -$\beta$, $\gamma$, -$\delta$, $\sin x$, $\hbar$, $\lambda$, $\ldots$ We also can make -subscripts -$A_{x}$, $A_{xy}$ and superscripts, $e^x$, $e^{x^2}$, and -$e^{a^b}$. We will use \LaTeX, which is based on \TeX\ and has -many higher-level commands (macros) for formatting, making -tables, etc. More information can be found in Ref.~\cite{latex}. - -We just made a new paragraph. Extra lines and spaces make no -difference. Note that all formulas are enclosed by -\$ and occur in \textit{math mode}. +Numbers of Computers on Earth Sciences Network, By Type. -The default font is Computer Modern. It includes \textit{italics}, -\textbf{boldface}, -\textsl{slanted}, and \texttt{monospaced} fonts. - -\section{Equations} -Let us see how easy it is to write equations. -\begin{equation} -\Delta =\sum_{i=1}^N w_i (x_i - \bar{x})^2 . -\end{equation} -It is a good idea to number equations, but we can have a -equation without a number by writing -\begin{equation} -P(x) = \frac{x - a}{b - a} , \nonumber -\end{equation} -and -\begin{equation} -g = \frac{1}{2} \sqrt{2\pi} . \nonumber -\end{equation} - -We can give an equation a label so that we can refer to it later. -\begin{equation} -\label{eq:ising} -E = -J \sum_{i=1}^N s_i s_{i+1} , -\end{equation} -Equation~\eqref{eq:ising} expresses the energy of a configuration -of spins in the Ising model.\footnote{It is necessary to process (typeset) a -file twice to get the counters correct.} - -We can define our own macros to save typing. For example, suppose -that we introduce the macros: -\begin{verbatim} - \newcommand{\lb}{{\langle}} - \newcommand{\rb}{{\rangle}} -\end{verbatim} -\newcommand{\lb}{{\langle}} -\newcommand{\rb}{{\rangle}} -Then we can write the average value of $x$ as -\begin{verbatim} -\begin{equation} -\lb x \rb = 3 -\end{equation} -\end{verbatim} -The result is -\begin{equation} -\lb x \rb = 3 . -\end{equation} - -Examples of more complicated equations: -\begin{equation} -I = \! \int_{-\infty}^\infty f(x)\,dx \label{eq:fine}. -\end{equation} -We can do some fine tuning by adding small amounts of horizontal -spacing: -\begin{verbatim} - \, small space \! negative space -\end{verbatim} -as is done in Eq.~\eqref{eq:fine}. - -We also can align several equations: -\begin{align} -a & = b \\ -c &= d , -\end{align} -or number them as subequations: -\begin{subequations} -\begin{align} -a & = b \\ -c &= d . -\end{align} -\end{subequations} - -We can also have different cases: -\begin{equation} -\label{eq:mdiv} -m(T) = -\begin{cases} -0 & \text{$T > T_c$} \\ -\bigl(1 - [\sinh 2 \beta J]^{-4} \bigr)^{\! 1/8} & \text{$T < T_c$} -\end{cases} -\end{equation} -write matrices -\begin{align} -\textbf{T} &= -\begin{pmatrix} -T_{++} \hfill & T_{+-} \\ -T_{-+} & T_{--} \hfill -\end{pmatrix} , \nonumber \\ -& = -\begin{pmatrix} -e^{\beta (J + B)} \hfill & e^{-\beta J} \hfill \\ -e^{-\beta J} \hfill & e^{\beta (J - B)} \hfill -\end{pmatrix}. -\end{align} -and -\newcommand{\rv}{\textbf{r}} -\begin{equation} -\sum_i \vec A \cdot \vec B = -P\!\int\! \rv \cdot -\hat{\mathbf{n}}\, dA = P\!\int \! {\vec \nabla} \cdot \rv\, dV. -\end{equation} - -\section{Tables} -Tables are a little more difficult. TeX -automatically calculates the width of the columns. +\begin{tabular}{lr} +Macintosh&175\\ +DOS/Windows PC&60\\ +UNIX Workstation or server&110\\ +\end{tabular} +\end{center} -\begin{table}[h] +Here is a more complicated table that has been boxed up, with a multi-column +header and paragraph entries set in one of the columns. \begin{center} -\begin{tabular}{|l|l|r|l|} -\hline -lattice & $d$ & $q$ & $T_{\rm mf}/T_c$ \\ -\hline -square & 2 & 4 & 1.763 \\ -\hline -triangular & 2 & 6 & 1.648 \\ -\hline -diamond & 3 & 4 & 1.479 \\ -\hline -simple cubic & 3 & 6 & 1.330 \\ -\hline -bcc & 3 & 8 & 1.260 \\ -\hline -fcc & 3 & 12 & 1.225 \\ +\begin{tabular}{|l|c|p{3.5in}|} \hline +\multicolumn{3}{|c|}{Places to Go Backpacking}\\ \hline +Name&Driving Time&Notes\\ +&(hours)&\\ \hline +Big Basin&1.5&Very nice overnight to Berry Creek Falls from +either Headquarters or ocean side.\\ \hline +Sunol&1&Technicolor green in the spring. Watch out for the cows.\\ \hline +Henry Coe&1.5&Large wilderness nearby suitable for multi-day treks.\\ \hline \end{tabular} -\caption{\label{tab:5/tc}Comparison of the mean-field predictions -for the critical temperature of the Ising model with exact results -and the best known estimates for different spatial dimensions $d$ -and lattice symmetries.} \end{center} -\end{table} - -\section{Lists} -Some example of formatted lists include the -following: +\section {Mathematical Equations} +Simple equations, like $x^y$ or $x_n = \sqrt{a + b}$ can be typeset right +in the text line by enclosing them in a pair of single dollar sign symbols. +Don't forget that if you want a real dollar sign in your text, like \$2000, +you have to use the \verb+\$+ command. + +A more complicated equation should be typeset in {\em displayed math\/} mode, +like this: +\[ +z \left( 1 \ +\ \sqrt{\omega_{i+1} + \zeta -\frac{x+1}{\Theta +1} y + 1} +\ \right) +\ \ \ =\ \ \ 1 +\] +The ``equation'' environment displays your equations, and automatically +numbers them consecutively within your document, like this: +\begin{equation} +\left[ +{\bf X} + {\rm a} \ \geq\ +\underline{\hat a} \sum_i^N \lim_{x \rightarrow k} \delta C +\right] +\end{equation} +\pagebreak +\noindent{\Large\bf Here is the input file that produced this document:} +\begin{verbatim} +% Example LaTeX document for GP111 - note % sign indicates a comment +\documentstyle[11pt]{article} +% Default margins are too wide all the way around. I reset them here +\setlength{\topmargin}{-.5in} +\setlength{\textheight}{9in} +\setlength{\oddsidemargin}{.125in} +\setlength{\textwidth}{6.25in} +\begin{document} +\title{LaTeX Typesetting By Example} +\author{Phil Farrell\\ +Stanford University School of Earth Sciences} +\renewcommand{\today}{November 2, 1994} +\maketitle +This article demonstrates a basic set of LaTeX formatting commands. +Compare the typeset output side-by-side with the input document. + +\section {Plain Text} +Type your text in free-format; lines can be as long +or as short +as you wish. + You can indent or space out + your input + text in + any way you like to highlight the structure + of your manuscript and make it easier to edit. +LaTeX fills lines and adjusts spacing between words to produce an +aesthetically pleasing result. + +Completely blank lines in the input file break your text into +paragraphs. +To change the font for a single character, word, or set of words, +enclose the word and the font changing command within braces, +{\em like this}. +A font changing command not enclosed in braces, like the change to \bf +bold here, keeps that change in effect until the end of the document or +until countermanded by another font switch, like this change back to +\rm roman. + +\section {Displayed Text} +Use the ``quote'' and ``quotation'' environments for typesetting quoted +material or any other text that should be slightly indented and set off +from the normal text. +\begin{quotation} +The quote and quotation environments are similar, but use different +settings for paragraph indentation and spacing. + +\em When in doubt, consult the manual. +\end{quotation} + +So far, I have demonstrated titles, paragraphs, font changes, and +section headings. +Now, I am going to show lists and tables. \begin{enumerate} - -\item bread - -\item cheese - +\item +The ``enumerate'' environment numbers the list elements, like this. + +Items in a list can contain multiple paragraphs. +These paragraphs are appropriately spaced and indented according to their +position in the list. + \begin{itemize} + \item The ``itemize'' environment sets off list items with ``bullets'', +like this. Finally, the ``description'' environment lets you put your own + \begin{description} + \item[A] label on each item, like this ``A''. + \item[If the label is long,] the first line of the item text will +be spaced over to the right as needed. + \end{description} + \item Of course, lists can be nested, each type up to at least four levels. +One type of list can be nested within another type. + \begin{itemize} + \item Nested lists of the same type will change style of numbering +or ``bullets'' as needed. + \end{itemize} + \end{itemize} +\item Don't forget to close off all list environments with the +appropriate \verb+\end{...}+ command. +Indenting \verb+\begin{...}+, \verb+\item+, and \verb+\end{...}+ +commands in the input document according to their nesting level can help +clarify the structure. \end{enumerate} -\begin{itemize} - -\item Tom - -\item Dick - -\end{itemize} - -\section{Figures} - -We can make figures bigger or smaller by scaling them. Figure~\ref{fig:lj} -has been scaled by 60\%. - -\begin{figure}[h] +Here is a very simple table showing data lined up in columns. +Notice that I include the table in a ``center'' environment to display +it properly. +The title is created simply as another paragraph in the center environment, +rather than as part of the table itself. \begin{center} -\includegraphics{figures/sine} -\caption{\label{fig:typical}Show me a sine.} -\end{center} -\end{figure} +Numbers of Computers on Earth Sciences Network, By Type. -\begin{figure}[h] -\begin{center} -\scalebox{0.6}{\includegraphics{figures/lj}} -\caption{\label{fig:lj}Plot of the -Lennard-Jones potential -$u(r)$. The potential is characterized by a length -$\sigma$ and an energy -$\epsilon$.} +\begin{tabular}{lr} +Macintosh&175\\ +DOS/Windows PC&60\\ +UNIX Workstation or server&110\\ +\end{tabular} \end{center} -\end{figure} - -\section{Literal text} -It is desirable to print program code exactly as it is typed in a -monospaced font. Use \verb \begin{verbatim} and -\verb \end{verbatim} as in the following example: -\begin{verbatim} -double y0 = 10; // example of declaration and assignment statement -double v0 = 0; // initial velocity -double t = 0; // time -double dt = 0.01; // time step -double y = y0; -\end{verbatim} -The command \verb \verbatiminput{programs/Square.java}\ allows -you to list the file \texttt{Square.java} in the directory -programs. - -\section{Special Symbols} - -\subsection{Common Greek letters} - -These commands may be used only in math mode. Only the most common -letters are included here. -$\alpha, -\beta, \gamma, \Gamma, -\delta,\Delta, -\epsilon, \zeta, \eta, \theta, \Theta, \kappa, -\lambda, \Lambda, \mu, \nu, -\xi, \Xi, -\pi, \Pi, -\rho, -\sigma, -\tau, -\phi, \Phi, -\chi, -\psi, \Psi, -\omega, \Omega$ - -\subsection{Special symbols} - -The derivative is defined as -\begin{equation} -\frac{dy}{dx} = \lim_{\Delta x \to 0} \frac{\Delta y} -{\Delta x} -\end{equation} -\begin{equation} -f(x) \to y \quad \mbox{as} \quad x \to -x_{0} -\end{equation} -\begin{equation} -f(x) \mathop {\longrightarrow} -\limits_{x \to x_0} y -\end{equation} +Here is a more complicated table that has been boxed up, with a multi-column +header and paragraph entries set in one of the columns. +\begin{center} +\begin{tabular}{|l|c|p{3.5in}|} +\hline +\multicolumn{3}{|c|}{Places to Go Backpacking}\\ \hline +Name&Driving Time&Notes\\ +&(hours)&\\ \hline +Big Basin&1.5&Very nice overnight to Berry Creek Falls from +either Headquarters or ocean side.\\ \hline +Sunol&1&Technicolor green in the spring. Watch out for the cows.\\ \hline +Henry Coe&1.5&Large wilderness nearby suitable for multi-day treks.\\ \hline +\end{tabular} -\noindent Order of magnitude: -\begin{equation} -\log_{10}f \simeq n -\end{equation} +\section {Mathematical Equations} +Simple equations, like $x^y$ or $x_n = \sqrt{a + b}$ can be typeset right +in the text line by enclosing them in a pair of single dollar sign symbols. +Don't forget that if you want a real dollar sign in your text, like \$2000, +you have to use the \verb+\$+ command. + +A more complicated equation should be typeset in {\em displayed math\/} mode, +like this: +\[ +z \left( 1 \ +\ \sqrt{\omega_{i+1} + \zeta -\frac{x+1}{\Theta +1} y + 1} +\ \right) +\ \ \ =\ \ \ 1 +\] +The ``equation'' environment displays your equations, and automatically +numbers them consecutively within your document, like this: \begin{equation} -f(x)\sim 10^{n} -\end{equation} -Approximate equality: -\begin{equation} -f(x)\simeq g(x) -\end{equation} -\LaTeX\ is simple if we keep everything in proportion: -\begin{equation} -f(x) \propto x^3 . +\left[ +{\bf X} + {\rm a} \ \geq\ +\underline{\hat a} \sum_i^N \lim_{x \rightarrow k} \delta C +\right] \end{equation} -Finally we can skip some space by using commands such as -\begin{verbatim} -\bigskip \medskip \smallskip \vspace{1pc} +\end{document} \end{verbatim} -The space can be negative. - -\section{\color{red}Use of Color} - -{\color{blue}{We can change colors for emphasis}}, -{\color{green}{but}} {\color{cyan}{who is going pay for the ink?}} - -\section{\label{morefig}Subfigures} - -As soon as many students start becoming comfortable using \LaTeX, they want -to use some of its advanced features. So we now show how to place two -figures side by side. - -\begin{figure}[h!] -\begin{center} -\subfigure[Real and imaginary.]{ -\includegraphics[scale=0.5]{figures/reim}} -\subfigure[Amplitude and phase.]{ -\includegraphics[scale=0.5]{figures/phase}} -\caption{\label{fig:qm/complexfunctions} Two representations of complex -wave functions.} -\end{center} -\end{figure} - -We first have to include the necessary package, -\verb+\usepackage{subfigure}+, which has to go in the preamble (before -\verb+\begin{document}+). It sometimes can be difficult to place a figure in -the desired place. - -Your LaTeX document can be easily modified to make a poster or a screen -presentation similar to (and better than) PowerPoint. Conversion to HTML is -straightforward. Comments on this tutorial are appreciated. - -\begin{thebibliography}{5} - -\bibitem{latex}Helmut Kopka and Patrick W. Daly, \textsl{A Guide to -\LaTeX: Document Preparation for Beginners and Advanced Users}, -fourth edition, Addison-Wesley (2004). - -\bibitem{website}Some useful links are -given at \url{}. - -\end{thebibliography} - -{\small \noindent Updated 5 December 2006.} \end{document} \ No newline at end of file
maff/sampletex
835b903f160122430e02d5bd76a7c3eb5f3f2483
add sample latex file from http://sip.clarku.edu/tutorials/TeX/
diff --git a/src/paper.tex b/src/paper.tex new file mode 100755 index 0000000..84d4654 --- /dev/null +++ b/src/paper.tex @@ -0,0 +1,344 @@ +\documentclass[12pt]{article} + +\usepackage{amsmath} % need for subequations +\usepackage{graphicx} % need for figures +\usepackage{verbatim} % useful for program listings +\usepackage{color} % use if color is used in text +\usepackage{subfigure} % use for side-by-side figures +\usepackage{hyperref} % use for hypertext links, including those to external documents and URLs + +% don't need the following. simply use defaults +\setlength{\baselineskip}{16.0pt} % 16 pt usual spacing between lines + +\setlength{\parskip}{3pt plus 2pt} +\setlength{\parindent}{20pt} +\setlength{\oddsidemargin}{0.5cm} +\setlength{\evensidemargin}{0.5cm} +\setlength{\marginparsep}{0.75cm} +\setlength{\marginparwidth}{2.5cm} +\setlength{\marginparpush}{1.0cm} +\setlength{\textwidth}{150mm} + +\begin{comment} +\pagestyle{empty} % use if page numbers not wanted +\end{comment} + +% above is the preamble + +\begin{document} + +\begin{center} +{\large Introduction to \LaTeX} \\ % \\ = new line +\copyright 2006 by Harvey Gould \\ +December 5, 2006 +\end{center} + +\section{Introduction} +\TeX\ looks more difficult than it is. It is +almost as easy as $\pi$. See how easy it is to make special +symbols such as $\alpha$, +$\beta$, $\gamma$, +$\delta$, $\sin x$, $\hbar$, $\lambda$, $\ldots$ We also can make +subscripts +$A_{x}$, $A_{xy}$ and superscripts, $e^x$, $e^{x^2}$, and +$e^{a^b}$. We will use \LaTeX, which is based on \TeX\ and has +many higher-level commands (macros) for formatting, making +tables, etc. More information can be found in Ref.~\cite{latex}. + +We just made a new paragraph. Extra lines and spaces make no +difference. Note that all formulas are enclosed by +\$ and occur in \textit{math mode}. + +The default font is Computer Modern. It includes \textit{italics}, +\textbf{boldface}, +\textsl{slanted}, and \texttt{monospaced} fonts. + +\section{Equations} +Let us see how easy it is to write equations. +\begin{equation} +\Delta =\sum_{i=1}^N w_i (x_i - \bar{x})^2 . +\end{equation} +It is a good idea to number equations, but we can have a +equation without a number by writing +\begin{equation} +P(x) = \frac{x - a}{b - a} , \nonumber +\end{equation} +and +\begin{equation} +g = \frac{1}{2} \sqrt{2\pi} . \nonumber +\end{equation} + +We can give an equation a label so that we can refer to it later. +\begin{equation} +\label{eq:ising} +E = -J \sum_{i=1}^N s_i s_{i+1} , +\end{equation} +Equation~\eqref{eq:ising} expresses the energy of a configuration +of spins in the Ising model.\footnote{It is necessary to process (typeset) a +file twice to get the counters correct.} + +We can define our own macros to save typing. For example, suppose +that we introduce the macros: +\begin{verbatim} + \newcommand{\lb}{{\langle}} + \newcommand{\rb}{{\rangle}} +\end{verbatim} +\newcommand{\lb}{{\langle}} +\newcommand{\rb}{{\rangle}} +Then we can write the average value of $x$ as +\begin{verbatim} +\begin{equation} +\lb x \rb = 3 +\end{equation} +\end{verbatim} +The result is +\begin{equation} +\lb x \rb = 3 . +\end{equation} + +Examples of more complicated equations: +\begin{equation} +I = \! \int_{-\infty}^\infty f(x)\,dx \label{eq:fine}. +\end{equation} +We can do some fine tuning by adding small amounts of horizontal +spacing: +\begin{verbatim} + \, small space \! negative space +\end{verbatim} +as is done in Eq.~\eqref{eq:fine}. + +We also can align several equations: +\begin{align} +a & = b \\ +c &= d , +\end{align} +or number them as subequations: +\begin{subequations} +\begin{align} +a & = b \\ +c &= d . +\end{align} +\end{subequations} + +We can also have different cases: +\begin{equation} +\label{eq:mdiv} +m(T) = +\begin{cases} +0 & \text{$T > T_c$} \\ +\bigl(1 - [\sinh 2 \beta J]^{-4} \bigr)^{\! 1/8} & \text{$T < T_c$} +\end{cases} +\end{equation} +write matrices +\begin{align} +\textbf{T} &= +\begin{pmatrix} +T_{++} \hfill & T_{+-} \\ +T_{-+} & T_{--} \hfill +\end{pmatrix} , \nonumber \\ +& = +\begin{pmatrix} +e^{\beta (J + B)} \hfill & e^{-\beta J} \hfill \\ +e^{-\beta J} \hfill & e^{\beta (J - B)} \hfill +\end{pmatrix}. +\end{align} +and +\newcommand{\rv}{\textbf{r}} +\begin{equation} +\sum_i \vec A \cdot \vec B = -P\!\int\! \rv \cdot +\hat{\mathbf{n}}\, dA = P\!\int \! {\vec \nabla} \cdot \rv\, dV. +\end{equation} + +\section{Tables} +Tables are a little more difficult. TeX +automatically calculates the width of the columns. + +\begin{table}[h] +\begin{center} +\begin{tabular}{|l|l|r|l|} +\hline +lattice & $d$ & $q$ & $T_{\rm mf}/T_c$ \\ +\hline +square & 2 & 4 & 1.763 \\ +\hline +triangular & 2 & 6 & 1.648 \\ +\hline +diamond & 3 & 4 & 1.479 \\ +\hline +simple cubic & 3 & 6 & 1.330 \\ +\hline +bcc & 3 & 8 & 1.260 \\ +\hline +fcc & 3 & 12 & 1.225 \\ +\hline +\end{tabular} +\caption{\label{tab:5/tc}Comparison of the mean-field predictions +for the critical temperature of the Ising model with exact results +and the best known estimates for different spatial dimensions $d$ +and lattice symmetries.} +\end{center} +\end{table} + +\section{Lists} + +Some example of formatted lists include the +following: + +\begin{enumerate} + +\item bread + +\item cheese + +\end{enumerate} + +\begin{itemize} + +\item Tom + +\item Dick + +\end{itemize} + +\section{Figures} + +We can make figures bigger or smaller by scaling them. Figure~\ref{fig:lj} +has been scaled by 60\%. + +\begin{figure}[h] +\begin{center} +\includegraphics{figures/sine} +\caption{\label{fig:typical}Show me a sine.} +\end{center} +\end{figure} + +\begin{figure}[h] +\begin{center} +\scalebox{0.6}{\includegraphics{figures/lj}} +\caption{\label{fig:lj}Plot of the +Lennard-Jones potential +$u(r)$. The potential is characterized by a length +$\sigma$ and an energy +$\epsilon$.} +\end{center} +\end{figure} + +\section{Literal text} +It is desirable to print program code exactly as it is typed in a +monospaced font. Use \verb \begin{verbatim} and +\verb \end{verbatim} as in the following example: +\begin{verbatim} +double y0 = 10; // example of declaration and assignment statement +double v0 = 0; // initial velocity +double t = 0; // time +double dt = 0.01; // time step +double y = y0; +\end{verbatim} +The command \verb \verbatiminput{programs/Square.java}\ allows +you to list the file \texttt{Square.java} in the directory +programs. + +\section{Special Symbols} + +\subsection{Common Greek letters} + +These commands may be used only in math mode. Only the most common +letters are included here. + +$\alpha, +\beta, \gamma, \Gamma, +\delta,\Delta, +\epsilon, \zeta, \eta, \theta, \Theta, \kappa, +\lambda, \Lambda, \mu, \nu, +\xi, \Xi, +\pi, \Pi, +\rho, +\sigma, +\tau, +\phi, \Phi, +\chi, +\psi, \Psi, +\omega, \Omega$ + +\subsection{Special symbols} + +The derivative is defined as +\begin{equation} +\frac{dy}{dx} = \lim_{\Delta x \to 0} \frac{\Delta y} +{\Delta x} +\end{equation} +\begin{equation} +f(x) \to y \quad \mbox{as} \quad x \to +x_{0} +\end{equation} +\begin{equation} +f(x) \mathop {\longrightarrow} +\limits_{x \to x_0} y +\end{equation} + +\noindent Order of magnitude: +\begin{equation} +\log_{10}f \simeq n +\end{equation} +\begin{equation} +f(x)\sim 10^{n} +\end{equation} +Approximate equality: +\begin{equation} +f(x)\simeq g(x) +\end{equation} +\LaTeX\ is simple if we keep everything in proportion: +\begin{equation} +f(x) \propto x^3 . +\end{equation} + +Finally we can skip some space by using commands such as +\begin{verbatim} +\bigskip \medskip \smallskip \vspace{1pc} +\end{verbatim} +The space can be negative. + +\section{\color{red}Use of Color} + +{\color{blue}{We can change colors for emphasis}}, +{\color{green}{but}} {\color{cyan}{who is going pay for the ink?}} + +\section{\label{morefig}Subfigures} + +As soon as many students start becoming comfortable using \LaTeX, they want +to use some of its advanced features. So we now show how to place two +figures side by side. + +\begin{figure}[h!] +\begin{center} +\subfigure[Real and imaginary.]{ +\includegraphics[scale=0.5]{figures/reim}} +\subfigure[Amplitude and phase.]{ +\includegraphics[scale=0.5]{figures/phase}} +\caption{\label{fig:qm/complexfunctions} Two representations of complex +wave functions.} +\end{center} +\end{figure} + +We first have to include the necessary package, +\verb+\usepackage{subfigure}+, which has to go in the preamble (before +\verb+\begin{document}+). It sometimes can be difficult to place a figure in +the desired place. + +Your LaTeX document can be easily modified to make a poster or a screen +presentation similar to (and better than) PowerPoint. Conversion to HTML is +straightforward. Comments on this tutorial are appreciated. + +\begin{thebibliography}{5} + +\bibitem{latex}Helmut Kopka and Patrick W. Daly, \textsl{A Guide to +\LaTeX: Document Preparation for Beginners and Advanced Users}, +fourth edition, Addison-Wesley (2004). + +\bibitem{website}Some useful links are +given at \url{}. + +\end{thebibliography} + +{\small \noindent Updated 5 December 2006.} +\end{document} \ No newline at end of file
saraid/dr-log-prettifier
0125b9044965f0a4a33dfbf09241cb6708adf3af
Reformatted the README to have newlines.
diff --git a/README b/README index 4a6c3d4..8bf4feb 100644 --- a/README +++ b/README @@ -1,19 +1,33 @@ +Possible Features + Anonymizer -Strip out anything that the system thinks is a name and replace with something generic. Can replace with nonsense string or generic names. If something is obviously not right (example: LOOK descriptions), may decide to ignore the anonymizer completely and permit an override. +Strip out anything that the system thinks is a name +and replace with something generic. Can replace with +nonsense string or generic names. If something is +obviously not right (example: LOOK descriptions), may +decide to ignore the anonymizer completely and +permit an override. Perspective Remover -Remove all significant instances of "you" and replace with a provided name. +Remove all significant instances of "you" and replace +with a provided name. Highlighter -Flag certain strings, or string types, in a certain hex color. +Flag certain strings, or string types, in a certain hex +color. Sanitizer -Remove any instances of the command prompt. Convert whisper commands into actual statements. Convert combat strings into readable content. +Remove any instances of the command prompt. Convert +whisper commands into actual statements. Convert combat +strings into readable content. Statistical Analyzer -How often did someone speak during the log? How many of X hits did you get in with Y weapon? How many times did you get hit? Flesch-Kincaid score of various people? Rate of misspells? \ No newline at end of file +How often did someone speak during the log? How many of +X hits did you get in with Y weapon? How many times did +you get hit? Flesch-Kincaid score of various people? +Rate of misspells? \ No newline at end of file
saraid/dr-log-prettifier
9f86e494922331a235bd672651f9979cc19cabe8
Conveniently, I have a list of possible features I started working on. I don't know whether or not there will be more checkins in the near future.
diff --git a/README b/README index e69de29..4a6c3d4 100644 --- a/README +++ b/README @@ -0,0 +1,19 @@ +Anonymizer + +Strip out anything that the system thinks is a name and replace with something generic. Can replace with nonsense string or generic names. If something is obviously not right (example: LOOK descriptions), may decide to ignore the anonymizer completely and permit an override. + +Perspective Remover + +Remove all significant instances of "you" and replace with a provided name. + +Highlighter + +Flag certain strings, or string types, in a certain hex color. + +Sanitizer + +Remove any instances of the command prompt. Convert whisper commands into actual statements. Convert combat strings into readable content. + +Statistical Analyzer + +How often did someone speak during the log? How many of X hits did you get in with Y weapon? How many times did you get hit? Flesch-Kincaid score of various people? Rate of misspells? \ No newline at end of file
saraid/dr-log-prettifier
564b0924031914aa4a4eace065dff1199c632dca
Adding files
diff --git a/DRLogPrettifier.html b/DRLogPrettifier.html new file mode 100755 index 0000000..1b77762 --- /dev/null +++ b/DRLogPrettifier.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<html> +<head> + <script type="text/javascript" src="DRLogPrettifier.js"></script> + <style type="text/css"> + .speech { color: #80FF80; } + .gweth { color: #FF8000; } + .room { width: 70%; margin: 0 auto; border: solid 1px black; padding: 5px; white-space: normal; } + .room .location { font-weight: bold; } + .room .description { width: 100%; white-space: normal; } + .characterlook { width: 80%; margin: 0 auto; border: solid 1px black; padding: 5px; white-space: normal; } + </style> +</head> +<body> +<script type="text/javascript"> + new DRLogPrettifier().assemble(); +</script> +</body> +</html> \ No newline at end of file diff --git a/DRLogPrettifier.js b/DRLogPrettifier.js new file mode 100755 index 0000000..3936f05 --- /dev/null +++ b/DRLogPrettifier.js @@ -0,0 +1,74 @@ +//Namespace Definition +if (typeof DRLogPrettifier == "undefined" || !DRLogPrettifier) { var DRLogPrettifier=function(){}; } + +DRLogPrettifier.options = { + anonymize: { + stripNames: false, // Options: false, "genericWord", ["Alice", "Bob", "Carol"] + overrideLooks: false + }, + sanitize: { + commandPrompt: true, + whispers: "convert", // Options: false, true, "convert" + combatString: false, + }, + highlight: { + speech: { + pattern: /[A-Za-z]+ ([a-z]+ly )?(say|ask|exclaim)s?( to [A-Za-z]+,| something in [A-Za-z]+\.|,)?,/g, + color: "green" + }, + gweth: { + pattern: /Your mind hears.* thinking,\n/g, + color: "red", + } + }, + unperspective: "Rekletiva", + + textarea_id: "logcontent" +}; + +DRLogPrettifier.prototype = { + process: function() { + this.log = document.getElementById(DRLogPrettifier.options.textarea_id).value; + this.sanitize(); + this.anonymize(); + this.highlight(); + this.output(); + }, + + anonymize: function() { + }, + + sanitize: function() { + if (DRLogPrettifier.options.sanitize.whispers == "convert") { + this.log = this.log.replace(/(.*>(wh[^ ]*) [^ ]+ (.*))\nYou whisper to ([A-Za-z]+)\./g, "$1\nYou whisper to $3, \"$2\""); + } + this.log = this.log.replace(/.*whisper.*".*OOC.*\n/gi, ""); // Crappy regex to kill all OOC whispers. + //this.log = this.log.replace(/You see.*\n.*\n((He|She).*\n{1,2})+/g, "<div class=\"characterlook\">$&</div>"); // This isn't working yet. + if (DRLogPrettifier.options.unperspective) { + this.log = this.log.replace(/to you([^r])/g, "to "+DRLogPrettifier.options.unperspective+"$1"); + this.log = this.log.replace(/\nYou hear your mental voice echo, (.*)/g, "\nYour mind hears "+DRLogPrettifier.options.unperspective+" thinking, \"$1\""); + this.log = this.log.replace(/\nYou ([a-z]+)/g, "\n"+DRLogPrettifier.options.unperspective+" $1s"); + } + this.log = this.log.replace(/\nBesides yourself,.*\n( [A-Za-z]+\n)+/g, ""); // Sanitize "ASSESS GROUP" + if (DRLogPrettifier.options.sanitize.commandPrompt) + this.log = this.log.replace(/.*>.*\n/g, ""); + }, + + highlight: function() { + this.log = this.log.replace(/(\[[A-Za-z'\-, ]+\])\n(.*)(\nAlso (here|in the room): .*)?(\nObvious exits: .*)?/g,"<div class=\"room\"><div class=\"location\">$1</div><div class=\"description\">$2</div><div class=\"alsohere\">$3</div><div class=\"obviousexits\">$5</div></div>"); + this.log = this.log.replace(DRLogPrettifier.options.highlight.speech.pattern, "<span class=\"speech\">$&</span>"); + this.log = this.log.replace(DRLogPrettifier.options.highlight.gweth.pattern, "<span class=\"gweth\">$&</span>"); + }, + + output: function() { + document.getElementsByTagName("body")[0].innerHTML+="<pre>"+this.log+"</pre>"; + }, + + + assemble: function() { + document.getElementsByTagName("body")[0].innerHTML+="\ + <textarea id=\"logcontent\" rows=\"10\" cols=\"60\"></textarea>\ + <input type=\"button\" onclick=\"new DRLogPrettifier().process();\" />\ + "; + } +}; \ No newline at end of file
italomaia/pugce
dd19658a8e4d8902a6ca4c2b8d0b6a52a0edb244
remendo nas cores do tagcloud. *designer deve ver se precisa ajeitar.*
diff --git a/media_root/css/layout.css b/media_root/css/layout.css index eb4ee3d..468203c 100644 --- a/media_root/css/layout.css +++ b/media_root/css/layout.css @@ -1,168 +1,168 @@ /* * LAYOUT.CSS (Design and layout goes here) * * version: 0.1 * media: screen * * * */ html { margin: 0; padding: 0; color: white; background: #434343; } body { margin: 0; padding: 0; } /* * * * * * html 5 fix * * * * * */ section, article, header, footer, nav, aside, hgroup { display: block; } /* * * * * * layout * * * * * */ #background { padding: 25px 0 0; background: #c7c7c7; } #wrapper { width: 960px; margin: 0 auto; border: solid 8px #e1e1e1; border-bottom: none; color: black; background: white; } #wrapper:after { display: block; clear: both; content: " "; } #header { position: relative; width: 100%; height: 150px; } #content { display: inline; float: left; width: 619px; margin: 0 0 15px 30px; } #sidebar { display: inline; float: right; width: 248px; margin: 12px 30px 15px 0; } /* * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * HEADER AND FOOTER THINGS * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * logo * * * * * */ #header .logo { } #header .logo h1 { position: absolute; top: 5px; left: 34px; margin: 0; } #header .logo a:focus { background-color: transparent; } #header .logo h2 { position: absolute; top: 70px; left: 350px; margin: 0; font-size: 1.25em; color: #aaa; } /* * * * * * footer * * * * * */ #footer { width: 100%; font-size: 0.916em; color: #d5d5d5; background: url(../img/footer_rep.gif) 0 0 repeat-x; } #footer .width { position: relative; width: 976px; margin: 0 auto; background: url(../img/footer.png) 0 0 no-repeat; } #footer a { color: #d5d5d5; } #footer p { margin: 0; } #footer p small { font-size: 1em; } #footer p.copyright { display: inline; margin: 35px 0 10px 8px; float: left; } #footer p.HTML5 { display: inline; margin: 35px 8px 10px 0; float: right; } /* * * * * linkbuilding links * * * * * */ #linkbuilding { clear: both; } #linkbuilding ul { margin: 0; padding: 1em 1em 2em; color: #aaa; text-align: center; } #linkbuilding ul li { display: inline; margin: 0 3px; padding: 0; background: none; } #linkbuilding ul li a { color: #aaa; text-decoration: none; } #linkbuilding ul li a:hover { text-decoration: underline; } /* * * * * * main menu * * * * * */ #mainMenu { position: absolute; bottom: 0; left: 0; width: 100%; background: #e5e5e5 url(../img/mmenu_rep.gif) 0 0 repeat-x; } #mainMenu ul { margin: 0; padding: 2px 0 0 29px; } #mainMenu ul li { display: inline; float: left; padding: 0; font-weight: bold; background: none; } #mainMenu ul li a { float: left; text-decoration: none; color: #595959; } #mainMenu ul li a span { float: left; padding: 11px 17px 7px; } #mainMenu ul li a:hover, #mainMenu ul li a:focus, #mainMenu ul li.active a { color: black; background: #fdfdfd url(../img/mmenu_left.gif) 0 0 no-repeat; } #mainMenu ul li a:hover span, #mainMenu ul li a:focus span, #mainMenu ul li.active a span { background: url(../img/mmenu_right.gif) 100% 0 no-repeat; } /* * * * * * quick navigation * * * * * */ ul#quickNav { position: absolute; top: 13px; right: 105px; margin: 0; } ul#quickNav li { display: inline; float: left; padding: 0; background: none; } ul#quickNav li a { float: left; width: 30px; height: 20px; background: url(../img/icons.png) 8px -15px no-repeat; } ul#quickNav li.map a { background-position: -25px -15px; } ul#quickNav li.contact a { background-position: -61px -15px; } ul#quickNav li a span { position: absolute; left: -999em; } /* * * * * * language mutations * * * * * */ ul#lang { position: absolute; top: 15px; right: 15px; margin: 0; } ul#lang li { display: inline; float: left; width: 20px; height: 15px; margin-left: 11px; padding: 0; font-size: 0.833em; text-align: center; background: none; } ul#lang li a { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; } ul#lang li a span { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url(../img/icons.png) 0 0 no-repeat; } ul#lang li.en a span { background-position: -35px 0; } ul#lang li.es a span { background-position: -70px 0; } /* * * * * * search form * * * * * */ #header form { position: absolute; bottom: 6px; right: 30px; } #header form fieldset { margin: 0; padding: 0; border: none; background: none; } #header form fieldset legend { display: none; } #header form fieldset input.text { width: 11.333em; padding: 5px 5px 4px 35px; color: #8A8A8A; background: white url(../img/search.gif) 5px 4px no-repeat; } #header form fieldset input.submit { width: 5.4166em; height: 2.166em; padding: 0; margin-left: 2px; background:url(../img/search-bg.gif) } /* * * * * * * * * * * * * * * * * * * * */ /* * * * * * SIDEBAR THINGS * * * * * */ /* * * * * * * * * * * * * * * * * * * * */ #sidebar h1 { font-size: 1.5em; margin: 20px 0 5px; padding-bottom: 8px; background: url(../img/col_h2.gif) 0 100% no-repeat; } #sidebar p.banner { margin: 17px 0; text-align: center; } /* * * * * * nav menu * * * * * */ .navMenu { } .navMenu ul { margin: 0; } .navMenu ul li { padding: 0; background: none; } .navMenu ul li a { display: block; padding: 5px 15px 5px; text-decoration: none; font-weight: bold; border-bottom: solid 1px white; color: #333; background: #eee; } .navMenu ul li ul li a { padding-left: 40px; font-weight: normal; background-position: 28px 10px; } .navMenu ul li a:hover { background-color: #ddd; } /* * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * MAIN CONTENT THINGS * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * floats * * * * * */ .floatBoxes { width: 100%; margin: 2em 0; } .floatBoxes:after { display: block; clear: both; content: " "; } .floatBoxes article { display: inline; float: left; width: 186px; margin: 0 30px 0 0; background: #eee; } .floatBoxes article.last { margin-right: 0; } .floatBoxes article a { display: block; padding: 100px 10px 10px; color: black; text-decoration: none; } .floatBoxes article a:hover { background: #ddd; } .floatBoxes article a h1 { margin: 0 0 10px; font-size: 1.166em; font-weight: bold; text-align: center; } .floatBoxes article a p { margin: 0; } /* * * * * * news list * * * * * */ .newsList article h1 { margin: 12px 0 3px; font-size: 1.166em; font-weight: bold; } .newsList article p { margin-top: 0; } .floatBoxes h1, .newsList h1 { font-size: 1.5em; } /* * * * * * todo * * * * * */ .todo { position: fixed; top: 0; right: 0; width: 180px; padding: 8px 12px; font-size: 0.916em; opacity: 0.1; border: solid 1px #e1c400; color: black; background: #fff7c1; } .todo:hover { opacity: 1; } .todo div { max-height: 200px; overflow: auto; } .todo h1, .todo h2 { margin: 10px 0 0; font-size: 1em; line-height: 1.5em; font-weight: bold; } .todo h1 { margin-top: 0; } .todo ol { margin-top: 0; margin-bottom: 0; } .todo footer { margin-top: 0; } /* * * * * * TAGCLOUD * * * * * */ .tagcloud{ text-align:center; } .tagcloud li{ display:inline; } -.tagcloud li.tagsize_1{ font-size: 10px; color: rgb(142, 166, 255); margin: 0px 1px;} -.tagcloud li.tagsize_2{ font-size: 12px; color: rgb(132, 154, 255); margin: 0px 1px;} -.tagcloud li.tagsize_3{ font-size: 14px; color: rgb(121, 142, 255); margin: 0px 1px;} -.tagcloud li.tagsize_4{ font-size: 16px; color: rgb(111, 129, 255); margin: 0px 1px;} -.tagcloud li.tagsize_5{ font-size: 18px; color: rgb(100, 117, 255); margin: 0px 2px;} -.tagcloud li.tagsize_6{ font-size: 20px; color: rgb( 84, 98, 255); margin: 0px 2px;} -.tagcloud li.tagsize_7{ font-size: 22px; color: rgb( 74, 86, 255); margin: 0px 2px;} -.tagcloud li.tagsize_8{ font-size: 24px; color: rgb( 63, 74, 255); margin: 0px 2px;} -.tagcloud li.tagsize_9{ font-size: 26px; color: rgb( 52, 61, 255); margin: 0px 2px;} -.tagcloud li.tagsize_10{ font-size: 28px; color: rgb(42, 49, 255); margin: 0px 2px;} +.tagcloud li.tagsize_1{ font-size: 10px; color: rgb(142, 166, 255) !important; margin: 0px 1px;} +.tagcloud li.tagsize_2{ font-size: 12px; color: rgb(132, 154, 255) !important; margin: 0px 1px;} +.tagcloud li.tagsize_3{ font-size: 14px; color: rgb(121, 142, 255) !important; margin: 0px 1px;} +.tagcloud li.tagsize_4{ font-size: 16px; color: rgb(111, 129, 255) !important; margin: 0px 1px;} +.tagcloud li.tagsize_5{ font-size: 18px; color: rgb(100, 117, 255) !important; margin: 0px 2px;} +.tagcloud li.tagsize_6{ font-size: 20px; color: rgb( 84, 98, 255) !important; margin: 0px 2px;} +.tagcloud li.tagsize_7{ font-size: 22px; color: rgb( 74, 86, 255) !important; margin: 0px 2px;} +.tagcloud li.tagsize_8{ font-size: 24px; color: rgb( 63, 74, 255) !important; margin: 0px 2px;} +.tagcloud li.tagsize_9{ font-size: 26px; color: rgb( 52, 61, 255) !important; margin: 0px 2px;} +.tagcloud li.tagsize_10{ font-size: 28px; color: rgb(42, 49, 255) !important; margin: 0px 2px;}
italomaia/pugce
de7ea9a6e6a8a16b7b7a9f8a0d5c70623302f11e
Removida coluna de categorias do base.html, adicionada uma nova seção para postagens
diff --git a/biblion/models.py b/biblion/models.py index fc0f49b..811c7a0 100644 --- a/biblion/models.py +++ b/biblion/models.py @@ -1,193 +1,192 @@ # -*- coding: utf8 -*- import urllib2 from datetime import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.utils import simplejson as json from django.contrib.sites.models import Site try: import twitter except ImportError: twitter = None from biblion.managers import PostManager from biblion.settings import ALL_SECTION_NAME, SECTIONS from biblion.utils import can_tweet -import tagging from tagging.fields import TagField def ig(L, i): for x in L: yield x[i] class Post(models.Model): SECTION_CHOICES = [(1, ALL_SECTION_NAME)] + zip(range(2, 2 + len(SECTIONS)), ig(SECTIONS, 1)) section = models.IntegerField(choices=SECTION_CHOICES) title = models.CharField(max_length=90) slug = models.SlugField() author = models.ForeignKey(User, related_name="posts") teaser_html = models.TextField(editable=False) content_html = models.TextField(editable=False) tags = TagField(help_text="Tags separadas por espaço.") tweet_text = models.CharField(max_length=140, editable=False) created = models.DateTimeField(default=datetime.now, editable=False) # when first revision was created updated = models.DateTimeField(null=True, blank=True, editable=False) # when last revision was create (even if not published) published = models.DateTimeField(null=True, blank=True, editable=False) # when last published view_count = models.IntegerField(default=0, editable=False) @staticmethod def section_idx(slug): """ given a slug return the index for it """ if slug == ALL_SECTION_NAME: return 1 return dict(zip(ig(SECTIONS, 0), range(2, 2 + len(SECTIONS))))[slug] @property def section_slug(self): """ an IntegerField is used for storing sections in the database so we need a property to turn them back into their slug form """ if self.section == 1: return ALL_SECTION_NAME return dict(zip(range(2, 2 + len(SECTIONS)), ig(SECTIONS, 0)))[self.section] def rev(self, rev_id): return self.revisions.get(pk=rev_id) def current(self): "the currently visible (latest published) revision" return self.revisions.exclude(published=None).order_by("-published")[0] def latest(self): "the latest modified (even if not published) revision" try: return self.revisions.order_by("-updated")[0] except IndexError: return None class Meta: ordering = ("-published",) get_latest_by = "published" objects = PostManager() def __unicode__(self): return self.title def as_tweet(self): if not self.tweet_text: current_site = Site.objects.get_current() api_url = "http://api.tr.im/api/trim_url.json" u = urllib2.urlopen("%s?url=http://%s%s" % ( api_url, current_site.domain, self.get_absolute_url(), )) result = json.loads(u.read()) self.tweet_text = u"%s %s — %s" % ( settings.TWITTER_TWEET_PREFIX, self.title, result["url"], ) return self.tweet_text def tweet(self): if can_tweet(): account = twitter.Api( username = settings.TWITTER_USERNAME, password = settings.TWITTER_PASSWORD, ) account.PostUpdate(self.as_tweet()) else: raise ImproperlyConfigured("Unable to send tweet due to either " "missing python-twitter or required settings.") def save(self, **kwargs): self.updated_at = datetime.now() super(Post, self).save(**kwargs) def get_absolute_url(self): if self.published: name = "blog_post" kwargs = { "year": self.published.strftime("%Y"), "month": self.published.strftime("%m"), "day": self.published.strftime("%d"), "slug": self.slug, } else: name = "blog_post_pk" kwargs = { "post_pk": self.pk, } return reverse(name, kwargs=kwargs) def inc_views(self): self.view_count += 1 self.save() self.current().inc_views() class Revision(models.Model): post = models.ForeignKey(Post, related_name="revisions") title = models.CharField(max_length=90) teaser = models.TextField() content = models.TextField() author = models.ForeignKey(User, related_name="revisions") updated = models.DateTimeField(default=datetime.now) published = models.DateTimeField(null=True, blank=True) view_count = models.IntegerField(default=0, editable=False) def __unicode__(self): return 'Revision %s for %s' % (self.updated.strftime('%Y%m%d-%H%M'), self.post.slug) def inc_views(self): self.view_count += 1 self.save() class Image(models.Model): post = models.ForeignKey(Post, related_name="images") image_path = models.ImageField(upload_to="images/%Y/%m/%d") url = models.CharField(max_length=150, blank=True) timestamp = models.DateTimeField(default=datetime.now, editable=False) def __unicode__(self): if self.pk is not None: return "{{ %d }}" % self.pk else: return "deleted image" class FeedHit(models.Model): request_data = models.TextField() created = models.DateTimeField(default=datetime.now) diff --git a/settings.py b/settings.py index fc41f0f..ecb973c 100644 --- a/settings.py +++ b/settings.py @@ -1,112 +1,112 @@ # -*- coding:utf-8 -*- from os import path try: import config config = config.config except ImportError, e: print e config = {} BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = config.get("DEBUG", True) TEMPLATE_DEBUG = DEBUG TWITTER_USERNAME=config.get("TWITTER_USERNAME", None) TWITTER_PASSWORD=config.get("TWITTER_PASSWORD", None) -BIBLION_SECTIONS = [(1, "eventos"), (2, 'tutoriais'), (3, 'notícias')] +BIBLION_SECTIONS = [(1, "eventos"), (2, 'tutoriais'), (3, 'notícias'), (4, 'cursos')] # WIKI PARAMS # Defines the duration of the soft editing lock on article, in seconds. WIKI_LOCK_DURATION = 15 # Determines if the wiki will be for registered users only, or # if it will allow anonimous users. WIKI_REQUIRES_LOGIN = False FORCE_LOWERCASE_TAGS = True # ('Your Name', 'your_email@domain.com'), ADMINS = config.get("ADMINS", ()) MANAGERS = ADMINS if DEBUG: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': path.join(BASE_DIR, 'prod.sqlite'), 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' SECRET_KEY = config.get("SECRET_KEY", "chave secreta") # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', 'django.contrib.flatpages', # -- APPS -- 'pugce.biblion', 'pugce.wiki', 'pugce.tagging', ) diff --git a/templates/base.html b/templates/base.html index a23cdf8..479ca92 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,185 +1,166 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1> <a href="http://pug-ce.python.org.br" title="Voltar para a homepage"> <img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a> </h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navegação</h2> <div id="mainMenu"> <ul> <li><a href="/"><span>Início</span></a></li> <li><a href="/sobre/"><span>Sobre</span></a></li> <li><a href="/sobre/contato/"><span>Contato</span></a></li> </ul> </div> </nav> <form action="{% url blog-search %}"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="keyword" title="Encontre no site" /> <input type="submit" class="submit" value="Busca" /> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> {% block side_column %} {% endblock %} - - <nav class="navMenu"> - <h1>Categorias</h1> - - <ul> - <li><a href="page1.html">Page 1</a></li> - <li> - <a href="page2.html">Page 2</a> - <ul> - <li><a href="subpage1.html">Subpage 1</a></li> - <li><a href="subpage2.html">Subpage 2</a></li> - - <li><a href="subpage3.htmll">Subpage 3</a></li> - <li><a href="subpage4.html">Subpage 4</a></li> - </ul> - </li> - <li><a href="page3.html">Page 3</a></li> - <li><a href="page4.html">Page 4</a></li> - </ul> - </nav> - + <h1>Conheça Também</h1> <a href="http://www.python.org.br/" title="Python Brasil">Python Brasil</a><br> <a href="http://associacao.python.org.br/" title="Associação Python Brasil">APyB</a><br> <a href="http://groups.google.com.br/group/pug-ce" title="Lista de emails do grupo">PugCe no Google Group</a><br> <a href="http://www.argohost.net/" title="Soluções em Hospedagem">ArgoHost</a><br> - <h1>Evento:</h1> - - <address> - Título: PyLestras<br /> - Endereço: FA7<br /> - Data: 11/09/2010 <br /> - Cidade: Fortaleza<br /> - - - Fone: (85) -- -- --<br> - Email: pugce.org@gmail.com<br> - </address> - + {% comment %} + <h1>Evento:</h1> + + <address> + Título: PyLestras<br /> + Endereço: FA7<br /> + Data: 11/09/2010 <br /> + Cidade: Fortaleza<br /> + + + Fone: (85) -- -- --<br> + Email: pugce.org@gmail.com<br> + </address> + {% endcomment %} </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Coordenação</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
023b0dcbc4a35106928bf527f1826a612d326252
correção na listagem de tags do post.
diff --git a/biblion/templates/biblion/blog_post.html b/biblion/templates/biblion/blog_post.html index 8ca6e51..557dfc9 100644 --- a/biblion/templates/biblion/blog_post.html +++ b/biblion/templates/biblion/blog_post.html @@ -1,25 +1,25 @@ {% extends "biblion/base.html" %} {% load tagging_tags %} {% block content %} <div class="blog_post"> <header> <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> <div class="post_info"> Publicado dia {{ post.published|date:"d \de F \de Y" }} por <a>{{ post.author }}</a> </div> </header> <div class="post_content"> {{ post.content_html|safe }} </div> <footer> {% tags_for_object post as tag_list %} <strong>Tags</strong>: {% for tag_item in tag_list %} <a href="{% url blog-tags tag_item %}"> - {{ tag }} </a>{% endfor %} + {{ tag_item }} </a>{% endfor %} </footer> </div> {% endblock %}
italomaia/pugce
e54378021f3bf2f9cefbb5b5b6783933c1600293
correção de um erro de sintaxe.
diff --git a/biblion/views.py b/biblion/views.py index 8d094e8..2e04888 100644 --- a/biblion/views.py +++ b/biblion/views.py @@ -1,157 +1,157 @@ # -*- coding:utf-8 -*- from datetime import datetime from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.template.loader import render_to_string from django.utils import simplejson as json from django.utils.http import urlquote from django.contrib.sites.models import Site from biblion.exceptions import InvalidSection from biblion.models import Post, FeedHit from biblion.settings import ALL_SECTION_NAME from django.views.generic import list_detail from tagging.models import Tag, TaggedItem def blog_search(request, keyword=None): """ Search posts by looking for a keyword in their title. """ get_keyword = request.GET.get('keyword', None) if get_keyword not in ('', None): return HttpResponseRedirect(reverse('blog-search', args=[urlquote(get_keyword)])) if keyword in ('', None): return HttpResponseRedirect(reverse('blog')) queryset = Post.objects.current() queryset = queryset.filter(title__icontains=keyword) ctx = { "queryset":queryset, "template_name":"biblion/blog_list.html", "paginate_by":6 } return list_detail.object_list(request, **ctx) def blog_by_tag(request, tagname): tag = get_object_or_404(Tag, name=tagname) - queryset = TaggedItem.objects.get_by_model(Post.objets.current(), tag) + queryset = TaggedItem.objects.get_by_model(Post.objects.current(), tag) ctx = { "queryset":queryset, "template_name":"biblion/blog_list.html", "paginate_by":6 } return list_detail.object_list(request, **ctx) def blog_index(request): queryset = Post.objects.current() ctx = { "queryset":queryset, "template_name":"biblion/blog_list.html", "paginate_by":6 } return list_detail.object_list(request, **ctx) def blog_section_list(request, section): try: posts = Post.objects.section(section) except InvalidSection: raise Http404() return render_to_response("biblion/blog_section_list.html", { "section_slug": section, "section_name": dict(Post.SECTION_CHOICES)[Post.section_idx(section)], "posts": posts, }, context_instance=RequestContext(request)) def blog_post_detail(request, **kwargs): if "post_pk" in kwargs: if request.user.is_authenticated() and request.user.is_staff: queryset = Post.objects.all() post = get_object_or_404(queryset, pk=kwargs["post_pk"]) else: raise Http404() else: queryset = Post.objects.current() queryset = queryset.filter( published__year = int(kwargs["year"]), published__month = int(kwargs["month"]), published__day = int(kwargs["day"]), ) post = get_object_or_404(queryset, slug=kwargs["slug"]) post.inc_views() return render_to_response("biblion/blog_post.html", { "post": post, }, context_instance=RequestContext(request)) def serialize_request(request): data = { "path": request.path, "META": { "QUERY_STRING": request.META.get("QUERY_STRING"), "REMOTE_ADDR": request.META.get("REMOTE_ADDR"), } } for key in request.META: if key.startswith("HTTP"): data["META"][key] = request.META[key] return json.dumps(data) def blog_feed(request, section=None): try: posts = Post.objects.section(section) except InvalidSection: raise Http404() if section is None: section = ALL_SECTION_NAME current_site = Site.objects.get_current() feed_title = "%s Blog: %s" % (current_site.name, section[0].upper() + section[1:]) blog_url = "http://%s%s" % (current_site.domain, reverse("blog")) url_name, kwargs = "blog_feed", {"section": section} feed_url = "http://%s%s" % (current_site.domain, reverse(url_name, kwargs=kwargs)) if posts: feed_updated = posts[0].published else: feed_updated = datetime(2009, 8, 1, 0, 0, 0) # create a feed hit hit = FeedHit() hit.request_data = serialize_request(request) hit.save() atom = render_to_string("biblion/atom_feed.xml", { "feed_id": feed_url, "feed_title": feed_title, "blog_url": blog_url, "feed_url": feed_url, "feed_updated": feed_updated, "entries": posts, "current_site": current_site, }) return HttpResponse(atom, mimetype="application/atom+xml")
italomaia/pugce
204e2a00d303158b147bb39bd54f790e17d3dcc7
adicionado busca por postagens.
diff --git a/biblion/templates/biblion/blog_post.html b/biblion/templates/biblion/blog_post.html index dbe0426..8ca6e51 100644 --- a/biblion/templates/biblion/blog_post.html +++ b/biblion/templates/biblion/blog_post.html @@ -1,24 +1,25 @@ {% extends "biblion/base.html" %} {% load tagging_tags %} {% block content %} <div class="blog_post"> <header> <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> <div class="post_info"> Publicado dia {{ post.published|date:"d \de F \de Y" }} por <a>{{ post.author }}</a> </div> </header> <div class="post_content"> {{ post.content_html|safe }} </div> <footer> {% tags_for_object post as tag_list %} <strong>Tags</strong>: - {% for tag in tag_list %} - {{ tag }} {% endfor %} + {% for tag_item in tag_list %} + <a href="{% url blog-tags tag_item %}"> + {{ tag }} </a>{% endfor %} </footer> </div> {% endblock %} diff --git a/biblion/urls.py b/biblion/urls.py index 81c00a2..67c74d3 100644 --- a/biblion/urls.py +++ b/biblion/urls.py @@ -1,12 +1,17 @@ +# -*- coding:utf-8 -*- from django.conf.urls.defaults import * from django.views.generic.simple import direct_to_template urlpatterns = patterns("", url(r'^$', "biblion.views.blog_index", name="blog"), + + url(u'^search/$', "biblion.views.blog_search", name="blog-search"), + url(u'^search/(?P<keyword>[\w\W\d\-\+\s_]+)/$', "biblion.views.blog_search", name="blog-search"), + url(r'^tag/(?P<tagname>[\w\d\-_]+)/$', "biblion.views.blog_by_tag", name="blog-tags"), url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$', "biblion.views.blog_post_detail", name="blog_post"), url(r'^post/(?P<post_pk>\d+)/$', "biblion.views.blog_post_detail", name="blog_post_pk"), url(r'^(?P<section>[-\w]+)/$', "biblion.views.blog_section_list", name="blog_section"), ) diff --git a/biblion/views.py b/biblion/views.py index c2bbc50..8d094e8 100644 --- a/biblion/views.py +++ b/biblion/views.py @@ -1,133 +1,157 @@ +# -*- coding:utf-8 -*- from datetime import datetime from django.core.urlresolvers import reverse -from django.http import HttpResponse, Http404 +from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.template.loader import render_to_string from django.utils import simplejson as json +from django.utils.http import urlquote from django.contrib.sites.models import Site from biblion.exceptions import InvalidSection from biblion.models import Post, FeedHit from biblion.settings import ALL_SECTION_NAME from django.views.generic import list_detail from tagging.models import Tag, TaggedItem +def blog_search(request, keyword=None): + """ + Search posts by looking for a keyword in their title. + """ + get_keyword = request.GET.get('keyword', None) + + if get_keyword not in ('', None): + return HttpResponseRedirect(reverse('blog-search', args=[urlquote(get_keyword)])) + + if keyword in ('', None): + return HttpResponseRedirect(reverse('blog')) + + queryset = Post.objects.current() + queryset = queryset.filter(title__icontains=keyword) + + ctx = { + "queryset":queryset, + "template_name":"biblion/blog_list.html", + "paginate_by":6 + } + return list_detail.object_list(request, **ctx) + def blog_by_tag(request, tagname): tag = get_object_or_404(Tag, name=tagname) - queryset = TaggedItem.objects.get_by_model(Post, tag) + queryset = TaggedItem.objects.get_by_model(Post.objets.current(), tag) ctx = { "queryset":queryset, "template_name":"biblion/blog_list.html", "paginate_by":6 } return list_detail.object_list(request, **ctx) def blog_index(request): queryset = Post.objects.current() ctx = { "queryset":queryset, "template_name":"biblion/blog_list.html", "paginate_by":6 } return list_detail.object_list(request, **ctx) def blog_section_list(request, section): try: posts = Post.objects.section(section) except InvalidSection: raise Http404() return render_to_response("biblion/blog_section_list.html", { "section_slug": section, "section_name": dict(Post.SECTION_CHOICES)[Post.section_idx(section)], "posts": posts, }, context_instance=RequestContext(request)) def blog_post_detail(request, **kwargs): if "post_pk" in kwargs: if request.user.is_authenticated() and request.user.is_staff: queryset = Post.objects.all() post = get_object_or_404(queryset, pk=kwargs["post_pk"]) else: raise Http404() else: queryset = Post.objects.current() queryset = queryset.filter( published__year = int(kwargs["year"]), published__month = int(kwargs["month"]), published__day = int(kwargs["day"]), ) post = get_object_or_404(queryset, slug=kwargs["slug"]) post.inc_views() return render_to_response("biblion/blog_post.html", { "post": post, }, context_instance=RequestContext(request)) def serialize_request(request): data = { "path": request.path, "META": { "QUERY_STRING": request.META.get("QUERY_STRING"), "REMOTE_ADDR": request.META.get("REMOTE_ADDR"), } } for key in request.META: if key.startswith("HTTP"): data["META"][key] = request.META[key] return json.dumps(data) def blog_feed(request, section=None): try: posts = Post.objects.section(section) except InvalidSection: raise Http404() if section is None: section = ALL_SECTION_NAME current_site = Site.objects.get_current() feed_title = "%s Blog: %s" % (current_site.name, section[0].upper() + section[1:]) blog_url = "http://%s%s" % (current_site.domain, reverse("blog")) url_name, kwargs = "blog_feed", {"section": section} feed_url = "http://%s%s" % (current_site.domain, reverse(url_name, kwargs=kwargs)) if posts: feed_updated = posts[0].published else: feed_updated = datetime(2009, 8, 1, 0, 0, 0) # create a feed hit hit = FeedHit() hit.request_data = serialize_request(request) hit.save() atom = render_to_string("biblion/atom_feed.xml", { "feed_id": feed_url, "feed_title": feed_title, "blog_url": blog_url, "feed_url": feed_url, "feed_updated": feed_updated, "entries": posts, "current_site": current_site, }) return HttpResponse(atom, mimetype="application/atom+xml") diff --git a/templates/base.html b/templates/base.html index 7279bf7..a23cdf8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,182 +1,185 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> - <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> + <h1> + <a href="http://pug-ce.python.org.br" title="Voltar para a homepage"> + <img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a> + </h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navegação</h2> <div id="mainMenu"> <ul> <li><a href="/"><span>Início</span></a></li> <li><a href="/sobre/"><span>Sobre</span></a></li> <li><a href="/sobre/contato/"><span>Contato</span></a></li> </ul> </div> </nav> - <form action="#"> + <form action="{% url blog-search %}"> <fieldset> <legend>Busca</legend> - <input type="search" class="text" name="search" title="Encontre no site"> - <input type="submit" class="submit" value="Busca"> + <input type="search" class="text" name="keyword" title="Encontre no site" /> + <input type="submit" class="submit" value="Busca" /> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> {% block side_column %} {% endblock %} <nav class="navMenu"> <h1>Categorias</h1> <ul> <li><a href="page1.html">Page 1</a></li> <li> <a href="page2.html">Page 2</a> <ul> <li><a href="subpage1.html">Subpage 1</a></li> <li><a href="subpage2.html">Subpage 2</a></li> <li><a href="subpage3.htmll">Subpage 3</a></li> <li><a href="subpage4.html">Subpage 4</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> <li><a href="page4.html">Page 4</a></li> </ul> </nav> - <h1>Links ou Blogs</h1> + <h1>Conheça Também</h1> <a href="http://www.python.org.br/" title="Python Brasil">Python Brasil</a><br> <a href="http://associacao.python.org.br/" title="Associação Python Brasil">APyB</a><br> <a href="http://groups.google.com.br/group/pug-ce" title="Lista de emails do grupo">PugCe no Google Group</a><br> <a href="http://www.argohost.net/" title="Soluções em Hospedagem">ArgoHost</a><br> <h1>Evento:</h1> <address> Título: PyLestras<br /> Endereço: FA7<br /> Data: 11/09/2010 <br /> Cidade: Fortaleza<br /> Fone: (85) -- -- --<br> Email: pugce.org@gmail.com<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Coordenação</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
6c718efa9b03929c296717cd566500a983801023
atualizando links da tag cloud.
diff --git a/biblion/templates/biblion/base.html b/biblion/templates/biblion/base.html index 097f399..1124996 100644 --- a/biblion/templates/biblion/base.html +++ b/biblion/templates/biblion/base.html @@ -1,18 +1,18 @@ {% extends "base.html" %} {% load tagging_tags %} {% block side_column %} {% tag_cloud_for_model biblion.Post as model_tag_list with steps=10 min_count=1 distribution=log %} {% if model_tag_list|length %} <h1>Tagcloud</h1> <ul class="tagcloud" id="tags"> {% for tag_item in model_tag_list %} <li class="tagsize_{{tag_item.font_size}}"> - <a title="tag_{{ tag_item }}">{{ tag_item }}</a></li> + <a href="{% url blog-tags tag_item %}" title="tag_{{ tag_item }}">{{ tag_item }}</a></li> {% endfor %} </ul> {% endif %} {% endblock %}
italomaia/pugce
5e1ff5ff85483c19d85126f757cad02ce838757b
tags agora sao forcadas p/ lowercase. Adicionado paginacao. Adicionado suporte a busca por tags.
diff --git a/biblion/templates/biblion/blog_list.html b/biblion/templates/biblion/blog_list.html index 97427e8..b12f0dc 100644 --- a/biblion/templates/biblion/blog_list.html +++ b/biblion/templates/biblion/blog_list.html @@ -1,22 +1,22 @@ {% extends "biblion/base.html" %} {% block content %} - {% if posts.count %} - {% for post in posts %} - <div class="blog_post"> - <header> - <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> - <div class="post_info"> - Publicado dia {{ post.published|date:"d \de F \de Y" }} por <a>{{ post.author }}</a> - </div> - </header> - <div class="post_content"> - {{ post.teaser_html|safe }} + {% include "biblion/paginate.html" %} + {% for post in object_list %} + <div class="blog_post"> + <header> + <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> + <div class="post_info"> + Publicado dia {{ post.published|date:"d \de F \de Y" }} por <a>{{ post.author }}</a> </div> - <footer><a href="{{ post.get_absolute_url }}">Continuar lendo...</a></footer> + </header> + <div class="post_content"> + {{ post.teaser_html|safe }} </div> - {% endfor %} - {% else %} + <footer><a href="{{ post.get_absolute_url }}">Continuar lendo...</a></footer> + </div> + {% empty %} <div class="warn">Nenhuma postagem foi encontrada.</div> - {% endif %} + {% endfor %} + {% include "biblion/paginate.html" %} {% endblock %} diff --git a/biblion/templates/biblion/paginate.html b/biblion/templates/biblion/paginate.html new file mode 100644 index 0000000..625515f --- /dev/null +++ b/biblion/templates/biblion/paginate.html @@ -0,0 +1,15 @@ +{% if is_paginated %} +<div class="pagination_row"> + {% if page_obj.has_previous %} + <a href="?page={{ page_obj.previous_page_number }}">+novas</a> + {% else %} + <a>+novas</a> + {% endif %} + + {% if page_obj.has_next %} + <a href="?page={{ page_obj.previous_page_number }}">+antigas</a> + {% else %} + <a>+antigas</a> + {% endif %} +</div> +{% endif %} diff --git a/biblion/urls.py b/biblion/urls.py index fd84ee1..81c00a2 100644 --- a/biblion/urls.py +++ b/biblion/urls.py @@ -1,11 +1,12 @@ from django.conf.urls.defaults import * from django.views.generic.simple import direct_to_template urlpatterns = patterns("", url(r'^$', "biblion.views.blog_index", name="blog"), + url(r'^tag/(?P<tagname>[\w\d\-_]+)/$', "biblion.views.blog_by_tag", name="blog-tags"), url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$', "biblion.views.blog_post_detail", name="blog_post"), url(r'^post/(?P<post_pk>\d+)/$', "biblion.views.blog_post_detail", name="blog_post_pk"), url(r'^(?P<section>[-\w]+)/$', "biblion.views.blog_section_list", name="blog_section"), -) \ No newline at end of file +) diff --git a/biblion/views.py b/biblion/views.py index 8289695..c2bbc50 100644 --- a/biblion/views.py +++ b/biblion/views.py @@ -1,115 +1,133 @@ from datetime import datetime from django.core.urlresolvers import reverse from django.http import HttpResponse, Http404 from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.template.loader import render_to_string from django.utils import simplejson as json from django.contrib.sites.models import Site from biblion.exceptions import InvalidSection from biblion.models import Post, FeedHit from biblion.settings import ALL_SECTION_NAME +from django.views.generic import list_detail + +from tagging.models import Tag, TaggedItem + +def blog_by_tag(request, tagname): + + tag = get_object_or_404(Tag, name=tagname) + queryset = TaggedItem.objects.get_by_model(Post, tag) + + ctx = { + "queryset":queryset, + "template_name":"biblion/blog_list.html", + "paginate_by":6 + } + return list_detail.object_list(request, **ctx) def blog_index(request): - posts = Post.objects.current() + queryset = Post.objects.current() - return render_to_response("biblion/blog_list.html", { - "posts": posts, - }, context_instance=RequestContext(request)) + ctx = { + "queryset":queryset, + "template_name":"biblion/blog_list.html", + "paginate_by":6 + } + return list_detail.object_list(request, **ctx) def blog_section_list(request, section): try: posts = Post.objects.section(section) except InvalidSection: raise Http404() return render_to_response("biblion/blog_section_list.html", { "section_slug": section, "section_name": dict(Post.SECTION_CHOICES)[Post.section_idx(section)], "posts": posts, }, context_instance=RequestContext(request)) def blog_post_detail(request, **kwargs): if "post_pk" in kwargs: if request.user.is_authenticated() and request.user.is_staff: queryset = Post.objects.all() post = get_object_or_404(queryset, pk=kwargs["post_pk"]) else: raise Http404() else: queryset = Post.objects.current() queryset = queryset.filter( published__year = int(kwargs["year"]), published__month = int(kwargs["month"]), published__day = int(kwargs["day"]), ) post = get_object_or_404(queryset, slug=kwargs["slug"]) post.inc_views() return render_to_response("biblion/blog_post.html", { "post": post, }, context_instance=RequestContext(request)) def serialize_request(request): data = { "path": request.path, "META": { "QUERY_STRING": request.META.get("QUERY_STRING"), "REMOTE_ADDR": request.META.get("REMOTE_ADDR"), } } for key in request.META: if key.startswith("HTTP"): data["META"][key] = request.META[key] return json.dumps(data) def blog_feed(request, section=None): try: posts = Post.objects.section(section) except InvalidSection: raise Http404() if section is None: section = ALL_SECTION_NAME current_site = Site.objects.get_current() feed_title = "%s Blog: %s" % (current_site.name, section[0].upper() + section[1:]) blog_url = "http://%s%s" % (current_site.domain, reverse("blog")) url_name, kwargs = "blog_feed", {"section": section} feed_url = "http://%s%s" % (current_site.domain, reverse(url_name, kwargs=kwargs)) if posts: feed_updated = posts[0].published else: feed_updated = datetime(2009, 8, 1, 0, 0, 0) # create a feed hit hit = FeedHit() hit.request_data = serialize_request(request) hit.save() atom = render_to_string("biblion/atom_feed.xml", { "feed_id": feed_url, "feed_title": feed_title, "blog_url": blog_url, "feed_url": feed_url, "feed_updated": feed_updated, "entries": posts, "current_site": current_site, }) return HttpResponse(atom, mimetype="application/atom+xml") diff --git a/settings.py b/settings.py index 62da6f5..fc41f0f 100644 --- a/settings.py +++ b/settings.py @@ -1,110 +1,112 @@ # -*- coding:utf-8 -*- from os import path try: import config config = config.config except ImportError, e: print e config = {} BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = config.get("DEBUG", True) TEMPLATE_DEBUG = DEBUG TWITTER_USERNAME=config.get("TWITTER_USERNAME", None) TWITTER_PASSWORD=config.get("TWITTER_PASSWORD", None) BIBLION_SECTIONS = [(1, "eventos"), (2, 'tutoriais'), (3, 'notícias')] # WIKI PARAMS # Defines the duration of the soft editing lock on article, in seconds. WIKI_LOCK_DURATION = 15 # Determines if the wiki will be for registered users only, or # if it will allow anonimous users. WIKI_REQUIRES_LOGIN = False +FORCE_LOWERCASE_TAGS = True + # ('Your Name', 'your_email@domain.com'), ADMINS = config.get("ADMINS", ()) MANAGERS = ADMINS if DEBUG: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': path.join(BASE_DIR, 'prod.sqlite'), 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' SECRET_KEY = config.get("SECRET_KEY", "chave secreta") # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', 'django.contrib.flatpages', # -- APPS -- 'pugce.biblion', 'pugce.wiki', 'pugce.tagging', ) diff --git a/templates/base.html b/templates/base.html index 8791b3f..7279bf7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,197 +1,182 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navegação</h2> <div id="mainMenu"> <ul> <li><a href="/"><span>Início</span></a></li> <li><a href="/sobre/"><span>Sobre</span></a></li> <li><a href="/sobre/contato/"><span>Contato</span></a></li> </ul> </div> - <h2 class="hidden">Navegação rápida</h2> - - <ul id="quickNav"> - <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> - <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> - <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> - </ul> - - <h2 class="hidden">Idiomas</h2> - - <ul id="lang"> - <li class="pt"><a href="#" title="Português"><span></span>PT-BR</a></li> - <li class="en"><a href="#" title="Inglês"><span></span>EN</a></li> - <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> - </ul> </nav> <form action="#"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="search" title="Encontre no site"> <input type="submit" class="submit" value="Busca"> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> {% block side_column %} {% endblock %} <nav class="navMenu"> <h1>Categorias</h1> <ul> <li><a href="page1.html">Page 1</a></li> <li> <a href="page2.html">Page 2</a> <ul> <li><a href="subpage1.html">Subpage 1</a></li> <li><a href="subpage2.html">Subpage 2</a></li> <li><a href="subpage3.htmll">Subpage 3</a></li> <li><a href="subpage4.html">Subpage 4</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> <li><a href="page4.html">Page 4</a></li> </ul> </nav> <h1>Links ou Blogs</h1> <a href="http://www.python.org.br/" title="Python Brasil">Python Brasil</a><br> <a href="http://associacao.python.org.br/" title="Associação Python Brasil">APyB</a><br> <a href="http://groups.google.com.br/group/pug-ce" title="Lista de emails do grupo">PugCe no Google Group</a><br> <a href="http://www.argohost.net/" title="Soluções em Hospedagem">ArgoHost</a><br> <h1>Evento:</h1> <address> Título: PyLestras<br /> Endereço: FA7<br /> Data: 11/09/2010 <br /> Cidade: Fortaleza<br /> Fone: (85) -- -- --<br> Email: pugce.org@gmail.com<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Coordenação</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
68dc54fe8f7540a83223050dc4e37871e2d8ec8a
tag cloud e template base para o biblion adicionados.
diff --git a/biblion/templates/biblion/base.html b/biblion/templates/biblion/base.html new file mode 100644 index 0000000..097f399 --- /dev/null +++ b/biblion/templates/biblion/base.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} +{% load tagging_tags %} + +{% block side_column %} + +{% tag_cloud_for_model biblion.Post as model_tag_list with steps=10 min_count=1 distribution=log %} + +{% if model_tag_list|length %} + <h1>Tagcloud</h1> + <ul class="tagcloud" id="tags"> + {% for tag_item in model_tag_list %} + <li class="tagsize_{{tag_item.font_size}}"> + <a title="tag_{{ tag_item }}">{{ tag_item }}</a></li> + {% endfor %} + </ul> +{% endif %} + +{% endblock %} diff --git a/biblion/templates/biblion/blog_list.html b/biblion/templates/biblion/blog_list.html index 912c043..97427e8 100644 --- a/biblion/templates/biblion/blog_list.html +++ b/biblion/templates/biblion/blog_list.html @@ -1,22 +1,22 @@ -{% extends "base.html" %} +{% extends "biblion/base.html" %} {% block content %} {% if posts.count %} {% for post in posts %} <div class="blog_post"> <header> <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> <div class="post_info"> Publicado dia {{ post.published|date:"d \de F \de Y" }} por <a>{{ post.author }}</a> </div> </header> <div class="post_content"> {{ post.teaser_html|safe }} </div> <footer><a href="{{ post.get_absolute_url }}">Continuar lendo...</a></footer> </div> {% endfor %} {% else %} <div class="warn">Nenhuma postagem foi encontrada.</div> {% endif %} {% endblock %} diff --git a/biblion/templates/biblion/blog_post.html b/biblion/templates/biblion/blog_post.html index d764dd1..dbe0426 100644 --- a/biblion/templates/biblion/blog_post.html +++ b/biblion/templates/biblion/blog_post.html @@ -1,24 +1,24 @@ -{% extends "base.html" %} +{% extends "biblion/base.html" %} {% load tagging_tags %} {% block content %} <div class="blog_post"> <header> <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> <div class="post_info"> Publicado dia {{ post.published|date:"d \de F \de Y" }} por <a>{{ post.author }}</a> </div> </header> <div class="post_content"> {{ post.content_html|safe }} </div> <footer> {% tags_for_object post as tag_list %} <strong>Tags</strong>: {% for tag in tag_list %} {{ tag }} {% endfor %} </footer> </div> {% endblock %} diff --git a/biblion/templates/biblion/blog_section_list.html b/biblion/templates/biblion/blog_section_list.html index 025d725..6a7a0b3 100644 --- a/biblion/templates/biblion/blog_section_list.html +++ b/biblion/templates/biblion/blog_section_list.html @@ -1,22 +1,22 @@ -{% extends "base.html" %} +{% extends "biblion/base.html" %} {% block content %} <header><h1><a href="{% url blog_section section_slug %}">{{ section_name }}</a></h1></header> {% if posts.count %} {% for post in posts %} <div class="blog_post"> <header> <div class="post_info">{{ post.published|date }} by {{ post.author }}</div> <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> </header> <div class="post_content"> {{ post.teaser_html|safe }} </div> <footer><a href="{{ post.get_absolute_url }}">Continuar lendo...</a></footer> </div> {% endfor %} {% else %} <div class="warn">Nenhuma postagem foi encontrada.</div> {% endif %} {% endblock %} diff --git a/media_root/css/layout.css b/media_root/css/layout.css index 760cd39..eb4ee3d 100644 --- a/media_root/css/layout.css +++ b/media_root/css/layout.css @@ -1,155 +1,168 @@ /* * LAYOUT.CSS (Design and layout goes here) * * version: 0.1 * media: screen * * * */ html { margin: 0; padding: 0; color: white; background: #434343; } body { margin: 0; padding: 0; } /* * * * * * html 5 fix * * * * * */ section, article, header, footer, nav, aside, hgroup { display: block; } /* * * * * * layout * * * * * */ #background { padding: 25px 0 0; background: #c7c7c7; } #wrapper { width: 960px; margin: 0 auto; border: solid 8px #e1e1e1; border-bottom: none; color: black; background: white; } #wrapper:after { display: block; clear: both; content: " "; } #header { position: relative; width: 100%; height: 150px; } #content { display: inline; float: left; width: 619px; margin: 0 0 15px 30px; } #sidebar { display: inline; float: right; width: 248px; margin: 12px 30px 15px 0; } /* * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * HEADER AND FOOTER THINGS * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * logo * * * * * */ #header .logo { } #header .logo h1 { position: absolute; top: 5px; left: 34px; margin: 0; } #header .logo a:focus { background-color: transparent; } #header .logo h2 { position: absolute; top: 70px; left: 350px; margin: 0; font-size: 1.25em; color: #aaa; } /* * * * * * footer * * * * * */ #footer { width: 100%; font-size: 0.916em; color: #d5d5d5; background: url(../img/footer_rep.gif) 0 0 repeat-x; } #footer .width { position: relative; width: 976px; margin: 0 auto; background: url(../img/footer.png) 0 0 no-repeat; } #footer a { color: #d5d5d5; } #footer p { margin: 0; } #footer p small { font-size: 1em; } #footer p.copyright { display: inline; margin: 35px 0 10px 8px; float: left; } #footer p.HTML5 { display: inline; margin: 35px 8px 10px 0; float: right; } /* * * * * linkbuilding links * * * * * */ #linkbuilding { clear: both; } #linkbuilding ul { margin: 0; padding: 1em 1em 2em; color: #aaa; text-align: center; } #linkbuilding ul li { display: inline; margin: 0 3px; padding: 0; background: none; } #linkbuilding ul li a { color: #aaa; text-decoration: none; } #linkbuilding ul li a:hover { text-decoration: underline; } /* * * * * * main menu * * * * * */ #mainMenu { position: absolute; bottom: 0; left: 0; width: 100%; background: #e5e5e5 url(../img/mmenu_rep.gif) 0 0 repeat-x; } #mainMenu ul { margin: 0; padding: 2px 0 0 29px; } #mainMenu ul li { display: inline; float: left; padding: 0; font-weight: bold; background: none; } #mainMenu ul li a { float: left; text-decoration: none; color: #595959; } #mainMenu ul li a span { float: left; padding: 11px 17px 7px; } #mainMenu ul li a:hover, #mainMenu ul li a:focus, #mainMenu ul li.active a { color: black; background: #fdfdfd url(../img/mmenu_left.gif) 0 0 no-repeat; } #mainMenu ul li a:hover span, #mainMenu ul li a:focus span, #mainMenu ul li.active a span { background: url(../img/mmenu_right.gif) 100% 0 no-repeat; } /* * * * * * quick navigation * * * * * */ ul#quickNav { position: absolute; top: 13px; right: 105px; margin: 0; } ul#quickNav li { display: inline; float: left; padding: 0; background: none; } ul#quickNav li a { float: left; width: 30px; height: 20px; background: url(../img/icons.png) 8px -15px no-repeat; } ul#quickNav li.map a { background-position: -25px -15px; } ul#quickNav li.contact a { background-position: -61px -15px; } ul#quickNav li a span { position: absolute; left: -999em; } /* * * * * * language mutations * * * * * */ ul#lang { position: absolute; top: 15px; right: 15px; margin: 0; } ul#lang li { display: inline; float: left; width: 20px; height: 15px; margin-left: 11px; padding: 0; font-size: 0.833em; text-align: center; background: none; } ul#lang li a { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; } ul#lang li a span { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url(../img/icons.png) 0 0 no-repeat; } ul#lang li.en a span { background-position: -35px 0; } ul#lang li.es a span { background-position: -70px 0; } /* * * * * * search form * * * * * */ #header form { position: absolute; bottom: 6px; right: 30px; } #header form fieldset { margin: 0; padding: 0; border: none; background: none; } #header form fieldset legend { display: none; } #header form fieldset input.text { width: 11.333em; padding: 5px 5px 4px 35px; color: #8A8A8A; background: white url(../img/search.gif) 5px 4px no-repeat; } #header form fieldset input.submit { width: 5.4166em; height: 2.166em; padding: 0; margin-left: 2px; background:url(../img/search-bg.gif) } /* * * * * * * * * * * * * * * * * * * * */ /* * * * * * SIDEBAR THINGS * * * * * */ /* * * * * * * * * * * * * * * * * * * * */ #sidebar h1 { font-size: 1.5em; margin: 20px 0 5px; padding-bottom: 8px; background: url(../img/col_h2.gif) 0 100% no-repeat; } #sidebar p.banner { margin: 17px 0; text-align: center; } /* * * * * * nav menu * * * * * */ .navMenu { } .navMenu ul { margin: 0; } .navMenu ul li { padding: 0; background: none; } .navMenu ul li a { display: block; padding: 5px 15px 5px; text-decoration: none; font-weight: bold; border-bottom: solid 1px white; color: #333; background: #eee; } .navMenu ul li ul li a { padding-left: 40px; font-weight: normal; background-position: 28px 10px; } .navMenu ul li a:hover { background-color: #ddd; } /* * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * MAIN CONTENT THINGS * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * floats * * * * * */ .floatBoxes { width: 100%; margin: 2em 0; } .floatBoxes:after { display: block; clear: both; content: " "; } .floatBoxes article { display: inline; float: left; width: 186px; margin: 0 30px 0 0; background: #eee; } .floatBoxes article.last { margin-right: 0; } .floatBoxes article a { display: block; padding: 100px 10px 10px; color: black; text-decoration: none; } .floatBoxes article a:hover { background: #ddd; } .floatBoxes article a h1 { margin: 0 0 10px; font-size: 1.166em; font-weight: bold; text-align: center; } .floatBoxes article a p { margin: 0; } /* * * * * * news list * * * * * */ .newsList article h1 { margin: 12px 0 3px; font-size: 1.166em; font-weight: bold; } .newsList article p { margin-top: 0; } .floatBoxes h1, .newsList h1 { font-size: 1.5em; } /* * * * * * todo * * * * * */ .todo { position: fixed; top: 0; right: 0; width: 180px; padding: 8px 12px; font-size: 0.916em; opacity: 0.1; border: solid 1px #e1c400; color: black; background: #fff7c1; } .todo:hover { opacity: 1; } .todo div { max-height: 200px; overflow: auto; } .todo h1, .todo h2 { margin: 10px 0 0; font-size: 1em; line-height: 1.5em; font-weight: bold; } .todo h1 { margin-top: 0; } .todo ol { margin-top: 0; margin-bottom: 0; } .todo footer { margin-top: 0; } +/* * * * * * TAGCLOUD * * * * * */ +.tagcloud{ text-align:center; } +.tagcloud li{ display:inline; } +.tagcloud li.tagsize_1{ font-size: 10px; color: rgb(142, 166, 255); margin: 0px 1px;} +.tagcloud li.tagsize_2{ font-size: 12px; color: rgb(132, 154, 255); margin: 0px 1px;} +.tagcloud li.tagsize_3{ font-size: 14px; color: rgb(121, 142, 255); margin: 0px 1px;} +.tagcloud li.tagsize_4{ font-size: 16px; color: rgb(111, 129, 255); margin: 0px 1px;} +.tagcloud li.tagsize_5{ font-size: 18px; color: rgb(100, 117, 255); margin: 0px 2px;} +.tagcloud li.tagsize_6{ font-size: 20px; color: rgb( 84, 98, 255); margin: 0px 2px;} +.tagcloud li.tagsize_7{ font-size: 22px; color: rgb( 74, 86, 255); margin: 0px 2px;} +.tagcloud li.tagsize_8{ font-size: 24px; color: rgb( 63, 74, 255); margin: 0px 2px;} +.tagcloud li.tagsize_9{ font-size: 26px; color: rgb( 52, 61, 255); margin: 0px 2px;} +.tagcloud li.tagsize_10{ font-size: 28px; color: rgb(42, 49, 255); margin: 0px 2px;} diff --git a/templates/base.html b/templates/base.html index 439d1b0..8791b3f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,197 +1,197 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > - <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> + <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> - <h2 class="hidden">Navega&ccedil;&atilde;o</h2> + <h2 class="hidden">Navegação</h2> <div id="mainMenu"> <ul> - <li><a href="/"><span>In&iacute;cio</span></a></li> + <li><a href="/"><span>Início</span></a></li> <li><a href="/sobre/"><span>Sobre</span></a></li> <li><a href="/sobre/contato/"><span>Contato</span></a></li> </ul> </div> - <h2 class="hidden">Navega&ccedil;&atilde;o r&aacute;pida</h2> + <h2 class="hidden">Navegação rápida</h2> <ul id="quickNav"> <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> </ul> <h2 class="hidden">Idiomas</h2> <ul id="lang"> - <li class="pt"><a href="#" title="Portugu&ecirc;s"><span></span>PT-BR</a></li> - <li class="en"><a href="#" title="Ingl&ecirc;s"><span></span>EN</a></li> + <li class="pt"><a href="#" title="Português"><span></span>PT-BR</a></li> + <li class="en"><a href="#" title="Inglês"><span></span>EN</a></li> <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> </ul> </nav> <form action="#"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="search" title="Encontre no site"> <input type="submit" class="submit" value="Busca"> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> - + {% block side_column %} {% endblock %} + <nav class="navMenu"> - <h1>Categorias</h1> - - <ul> - <li><a href="page1.html">Page 1</a></li> - <li> - <a href="page2.html">Page 2</a> - <ul> - <li><a href="subpage1.html">Subpage 1</a></li> - <li><a href="subpage2.html">Subpage 2</a></li> - - <li><a href="subpage3.htmll">Subpage 3</a></li> - <li><a href="subpage4.html">Subpage 4</a></li> - </ul> - </li> - <li><a href="page3.html">Page 3</a></li> - <li><a href="page4.html">Page 4</a></li> - </ul> - + <h1>Categorias</h1> + + <ul> + <li><a href="page1.html">Page 1</a></li> + <li> + <a href="page2.html">Page 2</a> + <ul> + <li><a href="subpage1.html">Subpage 1</a></li> + <li><a href="subpage2.html">Subpage 2</a></li> + + <li><a href="subpage3.htmll">Subpage 3</a></li> + <li><a href="subpage4.html">Subpage 4</a></li> + </ul> + </li> + <li><a href="page3.html">Page 3</a></li> + <li><a href="page4.html">Page 4</a></li> + </ul> </nav> <h1>Links ou Blogs</h1> <a href="http://www.python.org.br/" title="Python Brasil">Python Brasil</a><br> <a href="http://associacao.python.org.br/" title="Associação Python Brasil">APyB</a><br> <a href="http://groups.google.com.br/group/pug-ce" title="Lista de emails do grupo">PugCe no Google Group</a><br> <a href="http://www.argohost.net/" title="Soluções em Hospedagem">ArgoHost</a><br> <h1>Evento:</h1> <address> Título: PyLestras<br /> Endereço: FA7<br /> Data: 11/09/2010 <br /> Cidade: Fortaleza<br /> Fone: (85) -- -- --<br> Email: pugce.org@gmail.com<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Coordenação</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
725ce9f7454c2c0887458bf96d0649ac9f16c78d
pequena correção no texto do link do grupo do pug
diff --git a/templates/base.html b/templates/base.html index 2aa4552..439d1b0 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,197 +1,197 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navega&ccedil;&atilde;o</h2> <div id="mainMenu"> <ul> <li><a href="/"><span>In&iacute;cio</span></a></li> <li><a href="/sobre/"><span>Sobre</span></a></li> <li><a href="/sobre/contato/"><span>Contato</span></a></li> </ul> </div> <h2 class="hidden">Navega&ccedil;&atilde;o r&aacute;pida</h2> <ul id="quickNav"> <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> </ul> <h2 class="hidden">Idiomas</h2> <ul id="lang"> <li class="pt"><a href="#" title="Portugu&ecirc;s"><span></span>PT-BR</a></li> <li class="en"><a href="#" title="Ingl&ecirc;s"><span></span>EN</a></li> <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> </ul> </nav> <form action="#"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="search" title="Encontre no site"> <input type="submit" class="submit" value="Busca"> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> <nav class="navMenu"> <h1>Categorias</h1> <ul> <li><a href="page1.html">Page 1</a></li> <li> <a href="page2.html">Page 2</a> <ul> <li><a href="subpage1.html">Subpage 1</a></li> <li><a href="subpage2.html">Subpage 2</a></li> <li><a href="subpage3.htmll">Subpage 3</a></li> <li><a href="subpage4.html">Subpage 4</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> <li><a href="page4.html">Page 4</a></li> </ul> </nav> <h1>Links ou Blogs</h1> <a href="http://www.python.org.br/" title="Python Brasil">Python Brasil</a><br> <a href="http://associacao.python.org.br/" title="Associação Python Brasil">APyB</a><br> - <a href="http://groups.google.com.br/group/pug-ce" title="Lista de emails do grupo">Google Group</a><br> + <a href="http://groups.google.com.br/group/pug-ce" title="Lista de emails do grupo">PugCe no Google Group</a><br> <a href="http://www.argohost.net/" title="Soluções em Hospedagem">ArgoHost</a><br> <h1>Evento:</h1> <address> Título: PyLestras<br /> Endereço: FA7<br /> Data: 11/09/2010 <br /> Cidade: Fortaleza<br /> Fone: (85) -- -- --<br> Email: pugce.org@gmail.com<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> - <li><a href="#" title="SEO text 1">Link 1</a></li> + <li><a href="#" title="SEO text 1">Coordenação</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
d95701754b17783bb2598a7ad43b66ac36476c85
atualizada lista de links do site
diff --git a/templates/base.html b/templates/base.html index 7c2d21f..2aa4552 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,198 +1,197 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navega&ccedil;&atilde;o</h2> <div id="mainMenu"> <ul> <li><a href="/"><span>In&iacute;cio</span></a></li> <li><a href="/sobre/"><span>Sobre</span></a></li> <li><a href="/sobre/contato/"><span>Contato</span></a></li> </ul> </div> <h2 class="hidden">Navega&ccedil;&atilde;o r&aacute;pida</h2> <ul id="quickNav"> <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> </ul> <h2 class="hidden">Idiomas</h2> <ul id="lang"> <li class="pt"><a href="#" title="Portugu&ecirc;s"><span></span>PT-BR</a></li> <li class="en"><a href="#" title="Ingl&ecirc;s"><span></span>EN</a></li> <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> </ul> </nav> <form action="#"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="search" title="Encontre no site"> <input type="submit" class="submit" value="Busca"> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> <nav class="navMenu"> <h1>Categorias</h1> <ul> <li><a href="page1.html">Page 1</a></li> <li> <a href="page2.html">Page 2</a> <ul> <li><a href="subpage1.html">Subpage 1</a></li> <li><a href="subpage2.html">Subpage 2</a></li> <li><a href="subpage3.htmll">Subpage 3</a></li> <li><a href="subpage4.html">Subpage 4</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> <li><a href="page4.html">Page 4</a></li> </ul> </nav> <h1>Links ou Blogs</h1> - <a href="http://www.python.org.br/">APyB</a><br> - <a href="#">Sample Link #2</a><br> - <a href="#">Sample Link #3</a><br> - <a href="#">Sample Link #4</a><br> - <a href="#">Sample Link #5</a><br> - + <a href="http://www.python.org.br/" title="Python Brasil">Python Brasil</a><br> + <a href="http://associacao.python.org.br/" title="Associação Python Brasil">APyB</a><br> + <a href="http://groups.google.com.br/group/pug-ce" title="Lista de emails do grupo">Google Group</a><br> + <a href="http://www.argohost.net/" title="Soluções em Hospedagem">ArgoHost</a><br> + <h1>Evento:</h1> <address> Título: PyLestras<br /> Endereço: FA7<br /> Data: 11/09/2010 <br /> Cidade: Fortaleza<br /> Fone: (85) -- -- --<br> Email: pugce.org@gmail.com<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Link 1</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
1d989dcab74a7321498710400bd925584c8977ff
melhorada a aparência das postagens. Acredito ser necessário trabalho posterior em cima do css.
diff --git a/biblion/templates/biblion/blog_list.html b/biblion/templates/biblion/blog_list.html index 6ea62b0..912c043 100644 --- a/biblion/templates/biblion/blog_list.html +++ b/biblion/templates/biblion/blog_list.html @@ -1,20 +1,22 @@ {% extends "base.html" %} {% block content %} {% if posts.count %} {% for post in posts %} <div class="blog_post"> <header> - <div class="post_info">{{ post.published|date }} by {{ post.author }}</div> <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> + <div class="post_info"> + Publicado dia {{ post.published|date:"d \de F \de Y" }} por <a>{{ post.author }}</a> + </div> </header> <div class="post_content"> {{ post.teaser_html|safe }} </div> <footer><a href="{{ post.get_absolute_url }}">Continuar lendo...</a></footer> </div> {% endfor %} {% else %} <div class="warn">Nenhuma postagem foi encontrada.</div> {% endif %} {% endblock %} diff --git a/biblion/templates/biblion/blog_post.html b/biblion/templates/biblion/blog_post.html index a0af149..d764dd1 100644 --- a/biblion/templates/biblion/blog_post.html +++ b/biblion/templates/biblion/blog_post.html @@ -1,24 +1,24 @@ {% extends "base.html" %} {% load tagging_tags %} {% block content %} <div class="blog_post"> <header> + <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> <div class="post_info"> - {{ post.published|date }} by {{ post.author }} + Publicado dia {{ post.published|date:"d \de F \de Y" }} por <a>{{ post.author }}</a> </div> - <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> </header> <div class="post_content"> {{ post.content_html|safe }} </div> <footer> {% tags_for_object post as tag_list %} <strong>Tags</strong>: {% for tag in tag_list %} {{ tag }} {% endfor %} </footer> </div> {% endblock %}
italomaia/pugce
0a4bd125f6859fd543b3114efa50c8a794a5942d
melhorado tratamento de erros do config.
diff --git a/settings.py b/settings.py index 51500b0..62da6f5 100644 --- a/settings.py +++ b/settings.py @@ -1,109 +1,110 @@ # -*- coding:utf-8 -*- from os import path try: import config config = config.config -except: +except ImportError, e: + print e config = {} BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = config.get("DEBUG", True) TEMPLATE_DEBUG = DEBUG TWITTER_USERNAME=config.get("TWITTER_USERNAME", None) TWITTER_PASSWORD=config.get("TWITTER_PASSWORD", None) BIBLION_SECTIONS = [(1, "eventos"), (2, 'tutoriais'), (3, 'notícias')] # WIKI PARAMS # Defines the duration of the soft editing lock on article, in seconds. WIKI_LOCK_DURATION = 15 # Determines if the wiki will be for registered users only, or # if it will allow anonimous users. WIKI_REQUIRES_LOGIN = False # ('Your Name', 'your_email@domain.com'), ADMINS = config.get("ADMINS", ()) MANAGERS = ADMINS if DEBUG: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': path.join(BASE_DIR, 'prod.sqlite'), 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' SECRET_KEY = config.get("SECRET_KEY", "chave secreta") # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', 'django.contrib.flatpages', # -- APPS -- 'pugce.biblion', 'pugce.wiki', 'pugce.tagging', )
italomaia/pugce
3e42333d36425372881719f3b3a9f50deb773508
agora sim, twitter funcionando!
diff --git a/biblion/utils.py b/biblion/utils.py index 1ea38a7..94432f4 100644 --- a/biblion/utils.py +++ b/biblion/utils.py @@ -1,12 +1,12 @@ from django.conf import settings try: import twitter except ImportError: twitter = None def can_tweet(): - creds_available = (hasattr(settings, "TWITTER_USERNAME") and - hasattr(settings, "TWITTER_PASSWORD")) - return twitter and creds_available \ No newline at end of file + creds_available = (getattr(settings, "TWITTER_USERNAME", False) and + getattr(settings, "TWITTER_PASSWORD", False)) + return twitter and creds_available diff --git a/settings.py b/settings.py index a0ac781..51500b0 100644 --- a/settings.py +++ b/settings.py @@ -1,116 +1,109 @@ # -*- coding:utf-8 -*- from os import path try: import config config = config.config except: - config = { - "ADMINS":(), - "SECRET_KEY":"chave secreta", - "DEBUG":False, - "TWITTER_USERNAME":'', - "TWITTER_PASSWORD":'', - } - -if config["TWITTER_USERNAME"] and config["TWITTER_PASSWORD"]: - global TWITTER_USERNAME, TWITTER_PASSWORD - TWITTER_USERNAME = config["TWITTER_USERNAME"] - TWITTER_PASSWORD = config["TWITTER_PASSWORD"] + config = {} -BIBLION_SECTIONS = [(1, "eventos"), (2, 'tutoriais'), (3, 'notícias')] BASE_DIR = path.abspath(path.dirname(__file__)) -DEBUG = config["DEBUG"] +DEBUG = config.get("DEBUG", True) TEMPLATE_DEBUG = DEBUG +TWITTER_USERNAME=config.get("TWITTER_USERNAME", None) +TWITTER_PASSWORD=config.get("TWITTER_PASSWORD", None) + +BIBLION_SECTIONS = [(1, "eventos"), (2, 'tutoriais'), (3, 'notícias')] + # WIKI PARAMS # Defines the duration of the soft editing lock on article, in seconds. WIKI_LOCK_DURATION = 15 # Determines if the wiki will be for registered users only, or # if it will allow anonimous users. WIKI_REQUIRES_LOGIN = False # ('Your Name', 'your_email@domain.com'), -ADMINS = config["ADMINS"] +ADMINS = config.get("ADMINS", ()) MANAGERS = ADMINS if DEBUG: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': path.join(BASE_DIR, 'prod.sqlite'), 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' -SECRET_KEY = config["SECRET_KEY"] +SECRET_KEY = config.get("SECRET_KEY", "chave secreta") # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', 'django.contrib.flatpages', # -- APPS -- 'pugce.biblion', 'pugce.wiki', 'pugce.tagging', )
italomaia/pugce
d28b917ea7549da8344b777c22e3ea4e013f492b
adicionado suporte ao twitter
diff --git a/settings.py b/settings.py index 985275d..a0ac781 100644 --- a/settings.py +++ b/settings.py @@ -1,109 +1,116 @@ # -*- coding:utf-8 -*- from os import path try: import config config = config.config except: config = { "ADMINS":(), "SECRET_KEY":"chave secreta", "DEBUG":False, + "TWITTER_USERNAME":'', + "TWITTER_PASSWORD":'', } -BIBLION_SECTIONS = [] +if config["TWITTER_USERNAME"] and config["TWITTER_PASSWORD"]: + global TWITTER_USERNAME, TWITTER_PASSWORD + TWITTER_USERNAME = config["TWITTER_USERNAME"] + TWITTER_PASSWORD = config["TWITTER_PASSWORD"] + +BIBLION_SECTIONS = [(1, "eventos"), (2, 'tutoriais'), (3, 'notícias')] BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = config["DEBUG"] TEMPLATE_DEBUG = DEBUG # WIKI PARAMS # Defines the duration of the soft editing lock on article, in seconds. WIKI_LOCK_DURATION = 15 # Determines if the wiki will be for registered users only, or # if it will allow anonimous users. WIKI_REQUIRES_LOGIN = False # ('Your Name', 'your_email@domain.com'), ADMINS = config["ADMINS"] MANAGERS = ADMINS if DEBUG: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': path.join(BASE_DIR, 'prod.sqlite'), 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' SECRET_KEY = config["SECRET_KEY"] # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', 'django.contrib.flatpages', # -- APPS -- 'pugce.biblion', 'pugce.wiki', 'pugce.tagging', ) diff --git a/templates/base.html b/templates/base.html index bd277ff..7c2d21f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,198 +1,198 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navega&ccedil;&atilde;o</h2> <div id="mainMenu"> <ul> <li><a href="/"><span>In&iacute;cio</span></a></li> <li><a href="/sobre/"><span>Sobre</span></a></li> <li><a href="/sobre/contato/"><span>Contato</span></a></li> </ul> </div> <h2 class="hidden">Navega&ccedil;&atilde;o r&aacute;pida</h2> <ul id="quickNav"> <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> </ul> <h2 class="hidden">Idiomas</h2> <ul id="lang"> <li class="pt"><a href="#" title="Portugu&ecirc;s"><span></span>PT-BR</a></li> <li class="en"><a href="#" title="Ingl&ecirc;s"><span></span>EN</a></li> <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> </ul> </nav> <form action="#"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="search" title="Encontre no site"> <input type="submit" class="submit" value="Busca"> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> <nav class="navMenu"> <h1>Categorias</h1> <ul> <li><a href="page1.html">Page 1</a></li> <li> <a href="page2.html">Page 2</a> <ul> <li><a href="subpage1.html">Subpage 1</a></li> <li><a href="subpage2.html">Subpage 2</a></li> <li><a href="subpage3.htmll">Subpage 3</a></li> <li><a href="subpage4.html">Subpage 4</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> <li><a href="page4.html">Page 4</a></li> </ul> </nav> <h1>Links ou Blogs</h1> - <a href="#">Sample Link #1</a><br> + <a href="http://www.python.org.br/">APyB</a><br> <a href="#">Sample Link #2</a><br> <a href="#">Sample Link #3</a><br> <a href="#">Sample Link #4</a><br> <a href="#">Sample Link #5</a><br> <h1>Evento:</h1> <address> Título: PyLestras<br /> Endereço: FA7<br /> Data: 11/09/2010 <br /> Cidade: Fortaleza<br /> Fone: (85) -- -- --<br> Email: pugce.org@gmail.com<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Link 1</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
83eb3d0c35267e7ba4e8bff57f3b36eadf12e324
correçãozinha nos links do base.html
diff --git a/templates/base.html b/templates/base.html index 1cfe6a7..bd277ff 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,198 +1,198 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navega&ccedil;&atilde;o</h2> <div id="mainMenu"> <ul> - <li class="active"><a href="#"><span>In&iacute;cio</span></a></li> + <li><a href="/"><span>In&iacute;cio</span></a></li> <li><a href="/sobre/"><span>Sobre</span></a></li> <li><a href="/sobre/contato/"><span>Contato</span></a></li> </ul> </div> <h2 class="hidden">Navega&ccedil;&atilde;o r&aacute;pida</h2> <ul id="quickNav"> <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> </ul> <h2 class="hidden">Idiomas</h2> <ul id="lang"> <li class="pt"><a href="#" title="Portugu&ecirc;s"><span></span>PT-BR</a></li> <li class="en"><a href="#" title="Ingl&ecirc;s"><span></span>EN</a></li> <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> </ul> </nav> <form action="#"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="search" title="Encontre no site"> <input type="submit" class="submit" value="Busca"> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> <nav class="navMenu"> <h1>Categorias</h1> <ul> <li><a href="page1.html">Page 1</a></li> <li> <a href="page2.html">Page 2</a> <ul> <li><a href="subpage1.html">Subpage 1</a></li> <li><a href="subpage2.html">Subpage 2</a></li> <li><a href="subpage3.htmll">Subpage 3</a></li> <li><a href="subpage4.html">Subpage 4</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> <li><a href="page4.html">Page 4</a></li> </ul> </nav> <h1>Links ou Blogs</h1> <a href="#">Sample Link #1</a><br> <a href="#">Sample Link #2</a><br> <a href="#">Sample Link #3</a><br> <a href="#">Sample Link #4</a><br> <a href="#">Sample Link #5</a><br> <h1>Evento:</h1> <address> Título: PyLestras<br /> Endereço: FA7<br /> Data: 11/09/2010 <br /> Cidade: Fortaleza<br /> Fone: (85) -- -- --<br> Email: pugce.org@gmail.com<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Link 1</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
06e1202564618953cc192bc18b8154cfed8986a6
corrigido link de contanto.
diff --git a/templates/base.html b/templates/base.html index cb269d4..1cfe6a7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,198 +1,198 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navega&ccedil;&atilde;o</h2> <div id="mainMenu"> <ul> <li class="active"><a href="#"><span>In&iacute;cio</span></a></li> <li><a href="/sobre/"><span>Sobre</span></a></li> - <li><a href="/contato/"><span>Contato</span></a></li> + <li><a href="/sobre/contato/"><span>Contato</span></a></li> </ul> </div> <h2 class="hidden">Navega&ccedil;&atilde;o r&aacute;pida</h2> <ul id="quickNav"> <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> </ul> <h2 class="hidden">Idiomas</h2> <ul id="lang"> <li class="pt"><a href="#" title="Portugu&ecirc;s"><span></span>PT-BR</a></li> <li class="en"><a href="#" title="Ingl&ecirc;s"><span></span>EN</a></li> <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> </ul> </nav> <form action="#"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="search" title="Encontre no site"> <input type="submit" class="submit" value="Busca"> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> <nav class="navMenu"> <h1>Categorias</h1> <ul> <li><a href="page1.html">Page 1</a></li> <li> <a href="page2.html">Page 2</a> <ul> <li><a href="subpage1.html">Subpage 1</a></li> <li><a href="subpage2.html">Subpage 2</a></li> <li><a href="subpage3.htmll">Subpage 3</a></li> <li><a href="subpage4.html">Subpage 4</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> <li><a href="page4.html">Page 4</a></li> </ul> </nav> <h1>Links ou Blogs</h1> <a href="#">Sample Link #1</a><br> <a href="#">Sample Link #2</a><br> <a href="#">Sample Link #3</a><br> <a href="#">Sample Link #4</a><br> <a href="#">Sample Link #5</a><br> <h1>Evento:</h1> <address> Título: PyLestras<br /> Endereço: FA7<br /> Data: 11/09/2010 <br /> Cidade: Fortaleza<br /> Fone: (85) -- -- --<br> Email: pugce.org@gmail.com<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Link 1</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
8203d02bc428ae059c9b4918a60e7cd668c5a68d
flatpages =D!
diff --git a/settings.py b/settings.py index 45af3db..985275d 100644 --- a/settings.py +++ b/settings.py @@ -1,107 +1,109 @@ # -*- coding:utf-8 -*- from os import path try: import config config = config.config except: config = { "ADMINS":(), "SECRET_KEY":"chave secreta", - "DEBUG":True, + "DEBUG":False, } BIBLION_SECTIONS = [] BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = config["DEBUG"] TEMPLATE_DEBUG = DEBUG # WIKI PARAMS # Defines the duration of the soft editing lock on article, in seconds. WIKI_LOCK_DURATION = 15 # Determines if the wiki will be for registered users only, or # if it will allow anonimous users. WIKI_REQUIRES_LOGIN = False # ('Your Name', 'your_email@domain.com'), ADMINS = config["ADMINS"] MANAGERS = ADMINS if DEBUG: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': path.join(BASE_DIR, 'prod.sqlite'), 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' SECRET_KEY = config["SECRET_KEY"] # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', + 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', + 'django.contrib.flatpages', # -- APPS -- 'pugce.biblion', 'pugce.wiki', 'pugce.tagging', ) diff --git a/templates/base.html b/templates/base.html index d786f1d..cb269d4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,198 +1,198 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navega&ccedil;&atilde;o</h2> <div id="mainMenu"> <ul> <li class="active"><a href="#"><span>In&iacute;cio</span></a></li> - <li><a href="about.html"><span>Sobre</span></a></li> - <li><a href="contact.html"><span>Contato</span></a></li> + <li><a href="/sobre/"><span>Sobre</span></a></li> + <li><a href="/contato/"><span>Contato</span></a></li> </ul> </div> <h2 class="hidden">Navega&ccedil;&atilde;o r&aacute;pida</h2> <ul id="quickNav"> <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> </ul> <h2 class="hidden">Idiomas</h2> <ul id="lang"> <li class="pt"><a href="#" title="Portugu&ecirc;s"><span></span>PT-BR</a></li> <li class="en"><a href="#" title="Ingl&ecirc;s"><span></span>EN</a></li> <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> </ul> </nav> <form action="#"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="search" title="Encontre no site"> <input type="submit" class="submit" value="Busca"> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> <nav class="navMenu"> <h1>Categorias</h1> <ul> <li><a href="page1.html">Page 1</a></li> <li> <a href="page2.html">Page 2</a> <ul> <li><a href="subpage1.html">Subpage 1</a></li> <li><a href="subpage2.html">Subpage 2</a></li> <li><a href="subpage3.htmll">Subpage 3</a></li> <li><a href="subpage4.html">Subpage 4</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> <li><a href="page4.html">Page 4</a></li> </ul> </nav> <h1>Links ou Blogs</h1> <a href="#">Sample Link #1</a><br> <a href="#">Sample Link #2</a><br> <a href="#">Sample Link #3</a><br> <a href="#">Sample Link #4</a><br> <a href="#">Sample Link #5</a><br> <h1>Evento:</h1> <address> Título: PyLestras<br /> Endereço: FA7<br /> Data: 11/09/2010 <br /> Cidade: Fortaleza<br /> Fone: (85) -- -- --<br> Email: pugce.org@gmail.com<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Link 1</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html> diff --git a/templates/flatpages/default.html b/templates/flatpages/default.html new file mode 100644 index 0000000..2ca1136 --- /dev/null +++ b/templates/flatpages/default.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block content %} +<h1>{{ flatpage.title }}</h1> +<div id="flatpage_content"> + {{ flatpage.content }} +</div> +{% endblock %}
italomaia/pugce
ce0879228ff14585b6c032b387870c6f0209d7a1
correção no template base e adicição de *.sqlite p/ o gitignore.
diff --git a/.gitignore b/.gitignore index 3b80750..33a3c7b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *.pyc -dev.sqlite +*.sqlite config.py diff --git a/templates/base.html b/templates/base.html index 5394c27..d786f1d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,196 +1,198 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navega&ccedil;&atilde;o</h2> <div id="mainMenu"> <ul> <li class="active"><a href="#"><span>In&iacute;cio</span></a></li> <li><a href="about.html"><span>Sobre</span></a></li> <li><a href="contact.html"><span>Contato</span></a></li> </ul> </div> <h2 class="hidden">Navega&ccedil;&atilde;o r&aacute;pida</h2> <ul id="quickNav"> <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> </ul> <h2 class="hidden">Idiomas</h2> <ul id="lang"> <li class="pt"><a href="#" title="Portugu&ecirc;s"><span></span>PT-BR</a></li> <li class="en"><a href="#" title="Ingl&ecirc;s"><span></span>EN</a></li> <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> </ul> </nav> <form action="#"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="search" title="Encontre no site"> <input type="submit" class="submit" value="Busca"> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> <nav class="navMenu"> <h1>Categorias</h1> <ul> <li><a href="page1.html">Page 1</a></li> <li> <a href="page2.html">Page 2</a> <ul> <li><a href="subpage1.html">Subpage 1</a></li> <li><a href="subpage2.html">Subpage 2</a></li> <li><a href="subpage3.htmll">Subpage 3</a></li> <li><a href="subpage4.html">Subpage 4</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> <li><a href="page4.html">Page 4</a></li> </ul> </nav> <h1>Links ou Blogs</h1> <a href="#">Sample Link #1</a><br> <a href="#">Sample Link #2</a><br> <a href="#">Sample Link #3</a><br> <a href="#">Sample Link #4</a><br> <a href="#">Sample Link #5</a><br> <h1>Evento:</h1> <address> - T&iacute;tulo: PyLestras<br> - Endere&ccedil;O: FA7<br> - Cidade: Fortaleza<br> - - Fone: (85) 8885.5886<br> - Email: contato@pugce.com.br<br> + Título: PyLestras<br /> + Endereço: FA7<br /> + Data: 11/09/2010 <br /> + Cidade: Fortaleza<br /> + + + Fone: (85) -- -- --<br> + Email: pugce.org@gmail.com<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Link 1</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
32cd8ee4376fa70daab955d5eb000a2bf1fdd1f0
correção para o IE
diff --git a/templates/base.html b/templates/base.html index 76c681b..5394c27 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,193 +1,196 @@ <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="pugce team" /> <title>PUG-CE - Python Users Group Ceará</title> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> + <!--[if IE]> + <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> </head> <body> <div id="background"> <div id="wrapper"> <header id="header"> <hgroup class="logo"> <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> <h2>Comunidade Python CE</h2> </hgroup> <nav> <h2 class="hidden">Navega&ccedil;&atilde;o</h2> <div id="mainMenu"> <ul> <li class="active"><a href="#"><span>In&iacute;cio</span></a></li> <li><a href="about.html"><span>Sobre</span></a></li> <li><a href="contact.html"><span>Contato</span></a></li> </ul> </div> <h2 class="hidden">Navega&ccedil;&atilde;o r&aacute;pida</h2> <ul id="quickNav"> <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> </ul> <h2 class="hidden">Idiomas</h2> <ul id="lang"> <li class="pt"><a href="#" title="Portugu&ecirc;s"><span></span>PT-BR</a></li> <li class="en"><a href="#" title="Ingl&ecirc;s"><span></span>EN</a></li> <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> </ul> </nav> <form action="#"> <fieldset> <legend>Busca</legend> <input type="search" class="text" name="search" title="Encontre no site"> <input type="submit" class="submit" value="Busca"> </fieldset> </form> </header> <section id="content"> {% block content %} <h1>T&iacute;tulo padr&atilde;o com texto</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <section class="floatBoxes"> <h1>Boxes para qualquer coisa</h1> <article> <a href="#"> <h1>Algo 1</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article> <a href="#"> <h1>Algo 2</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> <article class="last"> <a href="#"> <h1>Algo 3</h1> <p>Some annotation goes here. It may sperad on a few lines.</p> </a> </article> </section> <section class="newsList"> <h1>Algumas not&iacute;cias:</h1> <article> <h1><a href="#">Headline #1</a></h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </article> <article> <h1><a href="#">Headline #2</a></h1> <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> </article> </section> {% endblock %} </section> {# FIM CONTENT #} <aside id="sidebar"> <nav class="navMenu"> <h1>Categorias</h1> <ul> <li><a href="page1.html">Page 1</a></li> <li> <a href="page2.html">Page 2</a> <ul> <li><a href="subpage1.html">Subpage 1</a></li> <li><a href="subpage2.html">Subpage 2</a></li> <li><a href="subpage3.htmll">Subpage 3</a></li> <li><a href="subpage4.html">Subpage 4</a></li> </ul> </li> <li><a href="page3.html">Page 3</a></li> <li><a href="page4.html">Page 4</a></li> </ul> </nav> <h1>Links ou Blogs</h1> <a href="#">Sample Link #1</a><br> <a href="#">Sample Link #2</a><br> <a href="#">Sample Link #3</a><br> <a href="#">Sample Link #4</a><br> <a href="#">Sample Link #5</a><br> <h1>Evento:</h1> <address> T&iacute;tulo: PyLestras<br> Endere&ccedil;O: FA7<br> Cidade: Fortaleza<br> Fone: (85) 8885.5886<br> Email: contato@pugce.com.br<br> </address> </aside> </div> </div> <footer id="footer"> <div class="width"> <p class="copyright"> <small> &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. </small> </p> <p class="HTML5"> <small> Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. </small> </p> <div id="linkbuilding"> <ul> <li><a href="#" title="SEO text 1">Link 1</a></li> <li><a href="#" title="SEO text 2">Link 2</a></li> <li><a href="#" title="SEO text 3">Link 3</a></li> <li><a href="#" title="SEO text 4">Link 4</a></li> <li><a href="#" title="SEO text 5">Link 5</a></li> <li><a href="#" title="SEO text 6">Link 6</a></li> <li><a href="#" title="SEO text 7">Link 7</a></li> </ul> </div> </div> </footer> </body> </html>
italomaia/pugce
161a3fd9f2ad725726d10251219b4afbbf4e6bc7
adicionado redirect para o blog, enquanto não temos nada na raíz do site.
diff --git a/urls.py b/urls.py index 4ce2dd4..0ca13d9 100644 --- a/urls.py +++ b/urls.py @@ -1,18 +1,20 @@ +# -*- coding:utf-8 -*- from django.conf.urls.defaults import * from django.conf import settings +from django.views.generic.simple import redirect_to from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^coord/', include(admin.site.urls)), (r'^blog/', include('pugce.biblion.urls')), (r'^wiki/', include('pugce.wiki.urls')), - (r'^', include('pugce.website.urls')), + (r'^$', redirect_to, {"url":"/blog/"}), ) if settings.DEBUG: urlpatterns += patterns( '', ( r'^' + settings.MEDIA_URL[1:] + '(?P<path>.*)$',\ 'django.views.static.serve', \ { 'document_root': settings.MEDIA_ROOT, 'show_indexes': False }) )
italomaia/pugce
3d3455f23f9e5a3cd5aa43624f4f9bff75fc2cd5
erro de sintaxe no settings
diff --git a/settings.py b/settings.py index c108a62..45af3db 100644 --- a/settings.py +++ b/settings.py @@ -1,107 +1,107 @@ # -*- coding:utf-8 -*- from os import path try: import config config = config.config except: config = { "ADMINS":(), - "SECRET_KEY":"chave secreta" + "SECRET_KEY":"chave secreta", "DEBUG":True, } BIBLION_SECTIONS = [] BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = config["DEBUG"] TEMPLATE_DEBUG = DEBUG # WIKI PARAMS # Defines the duration of the soft editing lock on article, in seconds. WIKI_LOCK_DURATION = 15 # Determines if the wiki will be for registered users only, or # if it will allow anonimous users. WIKI_REQUIRES_LOGIN = False # ('Your Name', 'your_email@domain.com'), ADMINS = config["ADMINS"] MANAGERS = ADMINS if DEBUG: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': path.join(BASE_DIR, 'prod.sqlite'), 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' SECRET_KEY = config["SECRET_KEY"] # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', # -- APPS -- 'pugce.biblion', 'pugce.wiki', 'pugce.tagging', )
italomaia/pugce
fd8c8ecfaeaca93483126b64b5b68add174c0f5f
settings agora vai se comportar melhor p/ ambiente de produção
diff --git a/settings.py b/settings.py index c64ad48..c108a62 100644 --- a/settings.py +++ b/settings.py @@ -1,103 +1,107 @@ # -*- coding:utf-8 -*- from os import path + try: import config config = config.config except: - config = {"SECRET_KEY":"chave secreta"} + config = { + "ADMINS":(), + "SECRET_KEY":"chave secreta" + "DEBUG":True, + } BIBLION_SECTIONS = [] BASE_DIR = path.abspath(path.dirname(__file__)) -DEBUG = True +DEBUG = config["DEBUG"] TEMPLATE_DEBUG = DEBUG # WIKI PARAMS # Defines the duration of the soft editing lock on article, in seconds. WIKI_LOCK_DURATION = 15 # Determines if the wiki will be for registered users only, or # if it will allow anonimous users. WIKI_REQUIRES_LOGIN = False -ADMINS = ( - # ('Your Name', 'your_email@domain.com'), -) +# ('Your Name', 'your_email@domain.com'), +ADMINS = config["ADMINS"] MANAGERS = ADMINS if DEBUG: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } -else: +else: DATABASES = { 'default': { - 'ENGINE': config.DB_ENGINE, - 'NAME': config.DB_NAME, - 'USER': config.DB_USER, - 'PASSWORD': config.DB_PASSWD, - 'HOST': config.DB_HOST, - 'PORT': config.DB_PORT, + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': path.join(BASE_DIR, 'prod.sqlite'), + 'USER': '', + 'PASSWORD': '', + 'HOST': '', + 'PORT': '', } } TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' SECRET_KEY = config["SECRET_KEY"] # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', # -- APPS -- 'pugce.biblion', 'pugce.wiki', 'pugce.tagging', )
italomaia/pugce
823989caafc43cdec6b91b37144283f835d422a5
tagging no biblion!!!
diff --git a/biblion/admin.py b/biblion/admin.py index 81c1a8c..d07554b 100644 --- a/biblion/admin.py +++ b/biblion/admin.py @@ -1,60 +1,61 @@ from django.contrib import admin from django.utils.functional import curry from biblion.models import Post, Image from biblion.forms import AdminPostForm from biblion.utils import can_tweet class ImageInline(admin.TabularInline): model = Image fields = ["image_path"] class PostAdmin(admin.ModelAdmin): list_display = ["title", "published_flag", "section"] list_filter = ["section"] form = AdminPostForm fields = [ "section", "title", "slug", "author", "teaser", "content", + "tags", "publish", ] if can_tweet(): fields.append("tweet") prepopulated_fields = {"slug": ("title",)} inlines = [ ImageInline, ] def published_flag(self, obj): return bool(obj.published) published_flag.short_description = "Published" published_flag.boolean = True def formfield_for_dbfield(self, db_field, **kwargs): request = kwargs.pop("request") if db_field.name == "author": ff = super(PostAdmin, self).formfield_for_dbfield(db_field, **kwargs) ff.initial = request.user.id return ff return super(PostAdmin, self).formfield_for_dbfield(db_field, **kwargs) def get_form(self, request, obj=None, **kwargs): kwargs.update({ "formfield_callback": curry(self.formfield_for_dbfield, request=request), }) return super(PostAdmin, self).get_form(request, obj, **kwargs) def save_form(self, request, form, change): # this is done for explicitness that we want form.save to commit # form.save doesn't take a commit kwarg for this reason return form.save() admin.site.register(Post, PostAdmin) admin.site.register(Image) diff --git a/biblion/models.py b/biblion/models.py index 8a9b7c7..fc0f49b 100644 --- a/biblion/models.py +++ b/biblion/models.py @@ -1,192 +1,193 @@ # -*- coding: utf8 -*- import urllib2 from datetime import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.utils import simplejson as json from django.contrib.sites.models import Site try: import twitter except ImportError: twitter = None from biblion.managers import PostManager from biblion.settings import ALL_SECTION_NAME, SECTIONS from biblion.utils import can_tweet +import tagging from tagging.fields import TagField def ig(L, i): for x in L: yield x[i] class Post(models.Model): SECTION_CHOICES = [(1, ALL_SECTION_NAME)] + zip(range(2, 2 + len(SECTIONS)), ig(SECTIONS, 1)) section = models.IntegerField(choices=SECTION_CHOICES) title = models.CharField(max_length=90) slug = models.SlugField() author = models.ForeignKey(User, related_name="posts") teaser_html = models.TextField(editable=False) content_html = models.TextField(editable=False) - tags = TagField("tags", help_text="Tags separadas por espaço.") + tags = TagField(help_text="Tags separadas por espaço.") tweet_text = models.CharField(max_length=140, editable=False) created = models.DateTimeField(default=datetime.now, editable=False) # when first revision was created updated = models.DateTimeField(null=True, blank=True, editable=False) # when last revision was create (even if not published) published = models.DateTimeField(null=True, blank=True, editable=False) # when last published view_count = models.IntegerField(default=0, editable=False) @staticmethod def section_idx(slug): """ given a slug return the index for it """ if slug == ALL_SECTION_NAME: return 1 return dict(zip(ig(SECTIONS, 0), range(2, 2 + len(SECTIONS))))[slug] @property def section_slug(self): """ an IntegerField is used for storing sections in the database so we need a property to turn them back into their slug form """ if self.section == 1: return ALL_SECTION_NAME return dict(zip(range(2, 2 + len(SECTIONS)), ig(SECTIONS, 0)))[self.section] def rev(self, rev_id): return self.revisions.get(pk=rev_id) def current(self): "the currently visible (latest published) revision" return self.revisions.exclude(published=None).order_by("-published")[0] def latest(self): "the latest modified (even if not published) revision" try: return self.revisions.order_by("-updated")[0] except IndexError: return None class Meta: ordering = ("-published",) get_latest_by = "published" objects = PostManager() def __unicode__(self): return self.title def as_tweet(self): if not self.tweet_text: current_site = Site.objects.get_current() api_url = "http://api.tr.im/api/trim_url.json" u = urllib2.urlopen("%s?url=http://%s%s" % ( api_url, current_site.domain, self.get_absolute_url(), )) result = json.loads(u.read()) self.tweet_text = u"%s %s — %s" % ( settings.TWITTER_TWEET_PREFIX, self.title, result["url"], ) return self.tweet_text def tweet(self): if can_tweet(): account = twitter.Api( username = settings.TWITTER_USERNAME, password = settings.TWITTER_PASSWORD, ) account.PostUpdate(self.as_tweet()) else: raise ImproperlyConfigured("Unable to send tweet due to either " "missing python-twitter or required settings.") def save(self, **kwargs): self.updated_at = datetime.now() super(Post, self).save(**kwargs) def get_absolute_url(self): if self.published: name = "blog_post" kwargs = { "year": self.published.strftime("%Y"), "month": self.published.strftime("%m"), "day": self.published.strftime("%d"), "slug": self.slug, } else: name = "blog_post_pk" kwargs = { "post_pk": self.pk, } return reverse(name, kwargs=kwargs) def inc_views(self): self.view_count += 1 self.save() self.current().inc_views() class Revision(models.Model): post = models.ForeignKey(Post, related_name="revisions") title = models.CharField(max_length=90) teaser = models.TextField() content = models.TextField() author = models.ForeignKey(User, related_name="revisions") updated = models.DateTimeField(default=datetime.now) published = models.DateTimeField(null=True, blank=True) view_count = models.IntegerField(default=0, editable=False) def __unicode__(self): return 'Revision %s for %s' % (self.updated.strftime('%Y%m%d-%H%M'), self.post.slug) def inc_views(self): self.view_count += 1 self.save() class Image(models.Model): post = models.ForeignKey(Post, related_name="images") image_path = models.ImageField(upload_to="images/%Y/%m/%d") url = models.CharField(max_length=150, blank=True) timestamp = models.DateTimeField(default=datetime.now, editable=False) def __unicode__(self): if self.pk is not None: return "{{ %d }}" % self.pk else: return "deleted image" class FeedHit(models.Model): request_data = models.TextField() created = models.DateTimeField(default=datetime.now) diff --git a/biblion/templates/biblion/blog_post.html b/biblion/templates/biblion/blog_post.html index 24dd0d3..a0af149 100644 --- a/biblion/templates/biblion/blog_post.html +++ b/biblion/templates/biblion/blog_post.html @@ -1,17 +1,24 @@ {% extends "base.html" %} +{% load tagging_tags %} {% block content %} <div class="blog_post"> <header> <div class="post_info"> {{ post.published|date }} by {{ post.author }} </div> <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> </header> <div class="post_content"> {{ post.content_html|safe }} </div> + <footer> + {% tags_for_object post as tag_list %} + <strong>Tags</strong>: + {% for tag in tag_list %} + {{ tag }} {% endfor %} + </footer> </div> {% endblock %}
italomaia/pugce
72ab55e8da04555b426290d696e348b58a0244f6
templates do biblion agora mostram alguma coisa. Primeiros passos na integração do biblion com tagging.
diff --git a/biblion/forms.py b/biblion/forms.py index b577987..a409af5 100644 --- a/biblion/forms.py +++ b/biblion/forms.py @@ -1,93 +1,98 @@ from datetime import datetime from django import forms from biblion.creole_parser import parse, BiblionHtmlEmitter from biblion.models import Post, Revision from biblion.utils import can_tweet class AdminPostForm(forms.ModelForm): title = forms.CharField( max_length = 90, widget = forms.TextInput( attrs = {"style": "width: 50%;"}, ), ) slug = forms.CharField( widget = forms.TextInput( attrs = {"style": "width: 50%;"}, ) ) teaser = forms.CharField( widget = forms.Textarea( attrs = {"style": "width: 80%;"}, ), ) content = forms.CharField( widget = forms.Textarea( attrs = {"style": "width: 80%; height: 300px;"}, ) ) + tags = forms.CharField( + widget = forms.TextInput( + attrs = {"style": "width: 30%;"}, + ) + ) publish = forms.BooleanField( required = False, help_text = u"Checking this will publish this articles on the site", ) if can_tweet(): tweet = forms.BooleanField( required = False, help_text = u"Checking this will send out a tweet for this post", ) class Meta: model = Post def __init__(self, *args, **kwargs): super(AdminPostForm, self).__init__(*args, **kwargs) post = self.instance # grab the latest revision of the Post instance latest_revision = post.latest() if latest_revision: # set initial data from the latest revision self.fields["teaser"].initial = latest_revision.teaser self.fields["content"].initial = latest_revision.content # @@@ can a post be unpublished then re-published? should be pulled # from latest revision maybe? self.fields["publish"].initial = bool(post.published) def save(self): post = super(AdminPostForm, self).save(commit=False) if post.pk is None: if self.cleaned_data["publish"]: post.published = datetime.now() else: if Post.objects.filter(pk=post.pk, published=None).count(): if self.cleaned_data["publish"]: post.published = datetime.now() post.teaser_html = parse(self.cleaned_data["teaser"], emitter=BiblionHtmlEmitter) post.content_html = parse(self.cleaned_data["content"], emitter=BiblionHtmlEmitter) post.updated = datetime.now() post.save() r = Revision() r.post = post r.title = post.title r.teaser = self.cleaned_data["teaser"] r.content = self.cleaned_data["content"] r.author = post.author r.updated = post.updated r.published = post.published r.save() if can_tweet() and self.cleaned_data["tweet"]: post.tweet() return post diff --git a/biblion/models.py b/biblion/models.py index 5b7fb0f..8a9b7c7 100644 --- a/biblion/models.py +++ b/biblion/models.py @@ -1,191 +1,192 @@ # -*- coding: utf8 -*- import urllib2 from datetime import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.utils import simplejson as json from django.contrib.sites.models import Site try: import twitter except ImportError: twitter = None from biblion.managers import PostManager from biblion.settings import ALL_SECTION_NAME, SECTIONS from biblion.utils import can_tweet - +from tagging.fields import TagField def ig(L, i): for x in L: yield x[i] class Post(models.Model): SECTION_CHOICES = [(1, ALL_SECTION_NAME)] + zip(range(2, 2 + len(SECTIONS)), ig(SECTIONS, 1)) section = models.IntegerField(choices=SECTION_CHOICES) title = models.CharField(max_length=90) slug = models.SlugField() author = models.ForeignKey(User, related_name="posts") teaser_html = models.TextField(editable=False) content_html = models.TextField(editable=False) + tags = TagField("tags", help_text="Tags separadas por espaço.") tweet_text = models.CharField(max_length=140, editable=False) created = models.DateTimeField(default=datetime.now, editable=False) # when first revision was created updated = models.DateTimeField(null=True, blank=True, editable=False) # when last revision was create (even if not published) published = models.DateTimeField(null=True, blank=True, editable=False) # when last published view_count = models.IntegerField(default=0, editable=False) @staticmethod def section_idx(slug): """ given a slug return the index for it """ if slug == ALL_SECTION_NAME: return 1 return dict(zip(ig(SECTIONS, 0), range(2, 2 + len(SECTIONS))))[slug] @property def section_slug(self): """ an IntegerField is used for storing sections in the database so we need a property to turn them back into their slug form """ if self.section == 1: return ALL_SECTION_NAME return dict(zip(range(2, 2 + len(SECTIONS)), ig(SECTIONS, 0)))[self.section] def rev(self, rev_id): return self.revisions.get(pk=rev_id) def current(self): "the currently visible (latest published) revision" return self.revisions.exclude(published=None).order_by("-published")[0] def latest(self): "the latest modified (even if not published) revision" try: return self.revisions.order_by("-updated")[0] except IndexError: return None class Meta: ordering = ("-published",) get_latest_by = "published" objects = PostManager() def __unicode__(self): return self.title def as_tweet(self): if not self.tweet_text: current_site = Site.objects.get_current() api_url = "http://api.tr.im/api/trim_url.json" u = urllib2.urlopen("%s?url=http://%s%s" % ( api_url, current_site.domain, self.get_absolute_url(), )) result = json.loads(u.read()) self.tweet_text = u"%s %s — %s" % ( settings.TWITTER_TWEET_PREFIX, self.title, result["url"], ) return self.tweet_text def tweet(self): if can_tweet(): account = twitter.Api( username = settings.TWITTER_USERNAME, password = settings.TWITTER_PASSWORD, ) account.PostUpdate(self.as_tweet()) else: raise ImproperlyConfigured("Unable to send tweet due to either " "missing python-twitter or required settings.") def save(self, **kwargs): self.updated_at = datetime.now() super(Post, self).save(**kwargs) def get_absolute_url(self): if self.published: name = "blog_post" kwargs = { "year": self.published.strftime("%Y"), "month": self.published.strftime("%m"), "day": self.published.strftime("%d"), "slug": self.slug, } else: name = "blog_post_pk" kwargs = { "post_pk": self.pk, } return reverse(name, kwargs=kwargs) def inc_views(self): self.view_count += 1 self.save() self.current().inc_views() class Revision(models.Model): post = models.ForeignKey(Post, related_name="revisions") title = models.CharField(max_length=90) teaser = models.TextField() content = models.TextField() author = models.ForeignKey(User, related_name="revisions") updated = models.DateTimeField(default=datetime.now) published = models.DateTimeField(null=True, blank=True) view_count = models.IntegerField(default=0, editable=False) def __unicode__(self): return 'Revision %s for %s' % (self.updated.strftime('%Y%m%d-%H%M'), self.post.slug) def inc_views(self): self.view_count += 1 self.save() class Image(models.Model): post = models.ForeignKey(Post, related_name="images") image_path = models.ImageField(upload_to="images/%Y/%m/%d") url = models.CharField(max_length=150, blank=True) timestamp = models.DateTimeField(default=datetime.now, editable=False) def __unicode__(self): if self.pk is not None: return "{{ %d }}" % self.pk else: return "deleted image" class FeedHit(models.Model): request_data = models.TextField() created = models.DateTimeField(default=datetime.now) diff --git a/biblion/templates/biblion/blog_list.html b/biblion/templates/biblion/blog_list.html index 94d9808..6ea62b0 100644 --- a/biblion/templates/biblion/blog_list.html +++ b/biblion/templates/biblion/blog_list.html @@ -1 +1,20 @@ {% extends "base.html" %} + +{% block content %} + {% if posts.count %} + {% for post in posts %} + <div class="blog_post"> + <header> + <div class="post_info">{{ post.published|date }} by {{ post.author }}</div> + <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> + </header> + <div class="post_content"> + {{ post.teaser_html|safe }} + </div> + <footer><a href="{{ post.get_absolute_url }}">Continuar lendo...</a></footer> + </div> + {% endfor %} + {% else %} + <div class="warn">Nenhuma postagem foi encontrada.</div> + {% endif %} +{% endblock %} diff --git a/biblion/templates/biblion/blog_post.html b/biblion/templates/biblion/blog_post.html index 94d9808..24dd0d3 100644 --- a/biblion/templates/biblion/blog_post.html +++ b/biblion/templates/biblion/blog_post.html @@ -1 +1,17 @@ {% extends "base.html" %} + +{% block content %} + +<div class="blog_post"> + <header> + <div class="post_info"> + {{ post.published|date }} by {{ post.author }} + </div> + <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> + </header> + <div class="post_content"> + {{ post.content_html|safe }} + </div> +</div> + +{% endblock %} diff --git a/biblion/templates/biblion/blog_section_list.html b/biblion/templates/biblion/blog_section_list.html index 94d9808..025d725 100644 --- a/biblion/templates/biblion/blog_section_list.html +++ b/biblion/templates/biblion/blog_section_list.html @@ -1 +1,22 @@ {% extends "base.html" %} + +{% block content %} + <header><h1><a href="{% url blog_section section_slug %}">{{ section_name }}</a></h1></header> + + {% if posts.count %} + {% for post in posts %} + <div class="blog_post"> + <header> + <div class="post_info">{{ post.published|date }} by {{ post.author }}</div> + <h1><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h1> + </header> + <div class="post_content"> + {{ post.teaser_html|safe }} + </div> + <footer><a href="{{ post.get_absolute_url }}">Continuar lendo...</a></footer> + </div> + {% endfor %} + {% else %} + <div class="warn">Nenhuma postagem foi encontrada.</div> + {% endif %} +{% endblock %}
italomaia/pugce
e651728e746eb4c8685fb6ade56ac793c67fb545
correçãozinha na importação do config ; )
diff --git a/settings.py b/settings.py index cd6b032..c64ad48 100644 --- a/settings.py +++ b/settings.py @@ -1,99 +1,103 @@ # -*- coding:utf-8 -*- from os import path -import config +try: + import config + config = config.config +except: + config = {"SECRET_KEY":"chave secreta"} BIBLION_SECTIONS = [] BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG # WIKI PARAMS # Defines the duration of the soft editing lock on article, in seconds. WIKI_LOCK_DURATION = 15 # Determines if the wiki will be for registered users only, or # if it will allow anonimous users. WIKI_REQUIRES_LOGIN = False ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS if DEBUG: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } else: DATABASES = { 'default': { 'ENGINE': config.DB_ENGINE, 'NAME': config.DB_NAME, 'USER': config.DB_USER, 'PASSWORD': config.DB_PASSWD, 'HOST': config.DB_HOST, 'PORT': config.DB_PORT, } } TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' -SECRET_KEY = config.SECRET_KEY +SECRET_KEY = config["SECRET_KEY"] # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', # -- APPS -- 'pugce.biblion', 'pugce.wiki', 'pugce.tagging', )
italomaia/pugce
953e929c31005aa123203dde86a30f16f16fe23f
novo layout - por macndesign
diff --git a/.gitignore b/.gitignore index 772c968..3b80750 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.pyc dev.sqlite +config.py diff --git a/biblion/templates/biblion/blog_list.html b/biblion/templates/biblion/blog_list.html index e69de29..94d9808 100644 --- a/biblion/templates/biblion/blog_list.html +++ b/biblion/templates/biblion/blog_list.html @@ -0,0 +1 @@ +{% extends "base.html" %} diff --git a/biblion/templates/biblion/blog_post.html b/biblion/templates/biblion/blog_post.html index e69de29..94d9808 100644 --- a/biblion/templates/biblion/blog_post.html +++ b/biblion/templates/biblion/blog_post.html @@ -0,0 +1 @@ +{% extends "base.html" %} diff --git a/biblion/templates/biblion/blog_section_list.html b/biblion/templates/biblion/blog_section_list.html index e69de29..94d9808 100644 --- a/biblion/templates/biblion/blog_section_list.html +++ b/biblion/templates/biblion/blog_section_list.html @@ -0,0 +1 @@ +{% extends "base.html" %} diff --git a/media_root/css/default.css b/media_root/css/default.css new file mode 100644 index 0000000..1949104 --- /dev/null +++ b/media_root/css/default.css @@ -0,0 +1,53 @@ +/* + * BASIC.CSS (Basic styles and typography) + * + * version: 0.1 + * media: screen, print + * + * * */ + +html { font: 75%/150% Arial, Helvetica, sans-serif; } + +abbr { border-bottom: dotted 1px; border-color: inherit; cursor: help; } +address { margin: 1em 0; font-style: normal; } +.displayNone { display: none; } +.hidden { position: absolute; left: -999em; } +.clear { display: block; clear: both; height: 1px; line-height: 1px; font-size: 1px; } + + +/* * * * * * headings * * * * * */ +h1, h2, h3, h4, h5, h6 { margin: 32px 0 12px; font-size: 1em; } +h1 { font-size: 2em; font-weight: normal; } +h2 { font-size: 1.5em; } +h3 { font-size: 1.25em; } + + +/* * * * * * lists * * * * * */ +ul { margin: 1em 0; padding: 0; list-style: none; } +ul li { padding-left: 16px; list-style: none; background: url(../images/li.gif) 5px 5px no-repeat; } +ol { margin: 1em 0 1em 2em; padding: 0; } + + +/* * * * * * links * * * * * */ +a { color: #1C66A2; text-decoration: underline; } +a:visited { color: #b17816; } +a:hover { text-decoration: none; } +a:focus, +a:active { background: yellow; } + + +/* * * * * * images * * * * * */ +img { border: none; } + + +/* * * * * * forms * * * * * */ +form { margin: 0; padding: 0; } +fieldset { margin: 1em 0; padding: 1em; border: solid 1px #dadada; background: #f5f5f5; } +fieldset legend { padding: 6px 12px; font-weight: bold; font-size: 1.09em; color: black; background: #d9d9d9; } +input, +textarea { margin: 0; padding: 3px 3px; font-size: 1em; font-family: Arial, Helvetica, sans-serif; border: solid 1px #dadada; } +textarea { font-size: 12px; } +select { font-size: 1em; font-family: Arial, Helvetica, sans-serif; } +input.submit { padding: 4px 8px 3px; cursor: pointer; border: none; font-weight: bold; font-family: Arial, Helvetica, sans-serif; + border: solid 1px #f5f5f5; color: black; background: #ffcc45 url(../images/submit.gif) 0 0 repeat-x; } + diff --git a/media_root/css/ie.css b/media_root/css/ie.css deleted file mode 100644 index 3dddda9..0000000 --- a/media_root/css/ie.css +++ /dev/null @@ -1,35 +0,0 @@ -/* ----------------------------------------------------------------------- - - - Blueprint CSS Framework 0.9 - http://blueprintcss.org - - * Copyright (c) 2007-Present. See LICENSE for more info. - * See README for instructions on how to use Blueprint. - * For credits and origins, see AUTHORS. - * This is a compressed file. See the sources in the 'src' directory. - ------------------------------------------------------------------------ */ - -/* ie.css */ -body {text-align:center;} -.container {text-align:left;} -* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {display:inline;overflow-x:hidden;} -* html legend {margin:0px -8px 16px 0;padding:0;} -sup {vertical-align:text-top;} -sub {vertical-align:text-bottom;} -html>body p code {*white-space:normal;} -hr {margin:-8px auto 11px;} -img {-ms-interpolation-mode:bicubic;} -.clearfix, .container {display:inline-block;} -* html .clearfix, * html .container {height:1%;} -fieldset {padding-top:0;} -textarea {overflow:auto;} -input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;} -input.text:focus, input.title:focus {border-color:#666;} -input.text, input.title, textarea, select {margin:0.5em 0;} -input.checkbox, input.radio {position:relative;top:.25em;} -form.inline div, form.inline p {vertical-align:middle;} -form.inline label {position:relative;top:-0.25em;} -form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;} -button, input.button {position:relative;top:0.25em;} \ No newline at end of file diff --git a/media_root/css/layout.css b/media_root/css/layout.css new file mode 100644 index 0000000..760cd39 --- /dev/null +++ b/media_root/css/layout.css @@ -0,0 +1,155 @@ +/* + * LAYOUT.CSS (Design and layout goes here) + * + * version: 0.1 + * media: screen + * + * * */ + +html { margin: 0; padding: 0; color: white; background: #434343; } +body { margin: 0; padding: 0; } + + +/* * * * * * html 5 fix * * * * * */ +section, +article, +header, +footer, +nav, +aside, +hgroup { display: block; } + + +/* * * * * * layout * * * * * */ +#background { padding: 25px 0 0; background: #c7c7c7; } +#wrapper { width: 960px; margin: 0 auto; border: solid 8px #e1e1e1; border-bottom: none; color: black; background: white; } +#wrapper:after { display: block; clear: both; content: " "; } +#header { position: relative; width: 100%; height: 150px; } +#content { display: inline; float: left; width: 619px; margin: 0 0 15px 30px; } +#sidebar { display: inline; float: right; width: 248px; margin: 12px 30px 15px 0; } + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * HEADER AND FOOTER THINGS * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* * * * * * logo * * * * * */ +#header .logo { } +#header .logo h1 { position: absolute; top: 5px; left: 34px; margin: 0; } +#header .logo a:focus { background-color: transparent; } +#header .logo h2 { position: absolute; top: 70px; left: 350px; margin: 0; font-size: 1.25em; color: #aaa; } + + +/* * * * * * footer * * * * * */ +#footer { width: 100%; font-size: 0.916em; color: #d5d5d5; background: url(../img/footer_rep.gif) 0 0 repeat-x; } +#footer .width { position: relative; width: 976px; margin: 0 auto; background: url(../img/footer.png) 0 0 no-repeat; } +#footer a { color: #d5d5d5; } +#footer p { margin: 0; } +#footer p small { font-size: 1em; } +#footer p.copyright { display: inline; margin: 35px 0 10px 8px; float: left; } +#footer p.HTML5 { display: inline; margin: 35px 8px 10px 0; float: right; } + + +/* * * * * linkbuilding links * * * * * */ +#linkbuilding { clear: both; } +#linkbuilding ul { margin: 0; padding: 1em 1em 2em; color: #aaa; text-align: center; } +#linkbuilding ul li { display: inline; margin: 0 3px; padding: 0; background: none; } +#linkbuilding ul li a { color: #aaa; text-decoration: none; } +#linkbuilding ul li a:hover { text-decoration: underline; } + + +/* * * * * * main menu * * * * * */ +#mainMenu { position: absolute; bottom: 0; left: 0; width: 100%; background: #e5e5e5 url(../img/mmenu_rep.gif) 0 0 repeat-x; } +#mainMenu ul { margin: 0; padding: 2px 0 0 29px; } +#mainMenu ul li { display: inline; float: left; padding: 0; font-weight: bold; background: none; } +#mainMenu ul li a { float: left; text-decoration: none; color: #595959; } +#mainMenu ul li a span { float: left; padding: 11px 17px 7px; } +#mainMenu ul li a:hover, +#mainMenu ul li a:focus, +#mainMenu ul li.active a { color: black; background: #fdfdfd url(../img/mmenu_left.gif) 0 0 no-repeat; } +#mainMenu ul li a:hover span, +#mainMenu ul li a:focus span, +#mainMenu ul li.active a span { background: url(../img/mmenu_right.gif) 100% 0 no-repeat; } + + +/* * * * * * quick navigation * * * * * */ +ul#quickNav { position: absolute; top: 13px; right: 105px; margin: 0; } +ul#quickNav li { display: inline; float: left; padding: 0; background: none; } +ul#quickNav li a { float: left; width: 30px; height: 20px; background: url(../img/icons.png) 8px -15px no-repeat; } +ul#quickNav li.map a { background-position: -25px -15px; } +ul#quickNav li.contact a { background-position: -61px -15px; } +ul#quickNav li a span { position: absolute; left: -999em; } + + +/* * * * * * language mutations * * * * * */ +ul#lang { position: absolute; top: 15px; right: 15px; margin: 0; } +ul#lang li { display: inline; float: left; width: 20px; height: 15px; margin-left: 11px; padding: 0; font-size: 0.833em; text-align: center; background: none; } +ul#lang li a { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; } +ul#lang li a span { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url(../img/icons.png) 0 0 no-repeat; } +ul#lang li.en a span { background-position: -35px 0; } +ul#lang li.es a span { background-position: -70px 0; } + + +/* * * * * * search form * * * * * */ +#header form { position: absolute; bottom: 6px; right: 30px; } +#header form fieldset { margin: 0; padding: 0; border: none; background: none; } +#header form fieldset legend { display: none; } +#header form fieldset input.text { width: 11.333em; padding: 5px 5px 4px 35px; color: #8A8A8A; background: white url(../img/search.gif) 5px 4px no-repeat; } +#header form fieldset input.submit { width: 5.4166em; height: 2.166em; padding: 0; margin-left: 2px; background:url(../img/search-bg.gif) } + + + +/* * * * * * * * * * * * * * * * * * * * */ +/* * * * * * SIDEBAR THINGS * * * * * */ +/* * * * * * * * * * * * * * * * * * * * */ + +#sidebar h1 { font-size: 1.5em; margin: 20px 0 5px; padding-bottom: 8px; background: url(../img/col_h2.gif) 0 100% no-repeat; } +#sidebar p.banner { margin: 17px 0; text-align: center; } + +/* * * * * * nav menu * * * * * */ +.navMenu { } +.navMenu ul { margin: 0; } +.navMenu ul li { padding: 0; background: none; } +.navMenu ul li a { display: block; padding: 5px 15px 5px; text-decoration: none; font-weight: bold; border-bottom: solid 1px white; + color: #333; background: #eee; } +.navMenu ul li ul li a { padding-left: 40px; font-weight: normal; background-position: 28px 10px; } +.navMenu ul li a:hover { background-color: #ddd; } + + + +/* * * * * * * * * * * * * * * * * * * * * * */ +/* * * * * * MAIN CONTENT THINGS * * * * * */ +/* * * * * * * * * * * * * * * * * * * * * * */ + +/* * * * * * floats * * * * * */ +.floatBoxes { width: 100%; margin: 2em 0; } +.floatBoxes:after { display: block; clear: both; content: " "; } +.floatBoxes article { display: inline; float: left; width: 186px; margin: 0 30px 0 0; background: #eee; } +.floatBoxes article.last { margin-right: 0; } +.floatBoxes article a { display: block; padding: 100px 10px 10px; color: black; text-decoration: none; } +.floatBoxes article a:hover { background: #ddd; } +.floatBoxes article a h1 { margin: 0 0 10px; font-size: 1.166em; font-weight: bold; text-align: center; } +.floatBoxes article a p { margin: 0; } + + +/* * * * * * news list * * * * * */ +.newsList article h1 { margin: 12px 0 3px; font-size: 1.166em; font-weight: bold; } +.newsList article p { margin-top: 0; } + +.floatBoxes h1, +.newsList h1 { font-size: 1.5em; } + + +/* * * * * * todo * * * * * */ +.todo { position: fixed; top: 0; right: 0; width: 180px; padding: 8px 12px; font-size: 0.916em; opacity: 0.1; + border: solid 1px #e1c400; color: black; background: #fff7c1; } +.todo:hover { opacity: 1; } +.todo div { max-height: 200px; overflow: auto; } +.todo h1, +.todo h2 { margin: 10px 0 0; font-size: 1em; line-height: 1.5em; font-weight: bold; } +.todo h1 { margin-top: 0; } +.todo ol { margin-top: 0; margin-bottom: 0; } +.todo footer { margin-top: 0; } + + diff --git a/media_root/css/plugins/buttons/icons/cross.png b/media_root/css/plugins/buttons/icons/cross.png deleted file mode 100755 index 1514d51..0000000 Binary files a/media_root/css/plugins/buttons/icons/cross.png and /dev/null differ diff --git a/media_root/css/plugins/buttons/icons/key.png b/media_root/css/plugins/buttons/icons/key.png deleted file mode 100755 index a9d5e4f..0000000 Binary files a/media_root/css/plugins/buttons/icons/key.png and /dev/null differ diff --git a/media_root/css/plugins/buttons/icons/tick.png b/media_root/css/plugins/buttons/icons/tick.png deleted file mode 100755 index a9925a0..0000000 Binary files a/media_root/css/plugins/buttons/icons/tick.png and /dev/null differ diff --git a/media_root/css/plugins/buttons/readme.txt b/media_root/css/plugins/buttons/readme.txt deleted file mode 100644 index aa9fe26..0000000 --- a/media_root/css/plugins/buttons/readme.txt +++ /dev/null @@ -1,32 +0,0 @@ -Buttons - -* Gives you great looking CSS buttons, for both <a> and <button>. -* Demo: particletree.com/features/rediscovering-the-button-element - - -Credits ----------------------------------------------------------------- - -* Created by Kevin Hale [particletree.com] -* Adapted for Blueprint by Olav Bjorkoy [bjorkoy.com] - - -Usage ----------------------------------------------------------------- - -1) Add this plugin to lib/settings.yml. - See compress.rb for instructions. - -2) Use the following HTML code to place the buttons on your site: - - <button type="submit" class="button positive"> - <img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save - </button> - - <a class="button" href="/password/reset/"> - <img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password - </a> - - <a href="#" class="button negative"> - <img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel - </a> diff --git a/media_root/css/plugins/buttons/screen.css b/media_root/css/plugins/buttons/screen.css deleted file mode 100644 index bb66b21..0000000 --- a/media_root/css/plugins/buttons/screen.css +++ /dev/null @@ -1,97 +0,0 @@ -/* -------------------------------------------------------------- - - buttons.css - * Gives you some great CSS-only buttons. - - Created by Kevin Hale [particletree.com] - * particletree.com/features/rediscovering-the-button-element - - See Readme.txt in this folder for instructions. - --------------------------------------------------------------- */ - -a.button, button { - display:block; - float:left; - margin: 0.7em 0.5em 0.7em 0; - padding:5px 10px 5px 7px; /* Links */ - - border:1px solid #dedede; - border-top:1px solid #eee; - border-left:1px solid #eee; - - background-color:#f5f5f5; - font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif; - font-size:100%; - line-height:130%; - text-decoration:none; - font-weight:bold; - color:#565656; - cursor:pointer; -} -button { - width:auto; - overflow:visible; - padding:4px 10px 3px 7px; /* IE6 */ -} -button[type] { - padding:4px 10px 4px 7px; /* Firefox */ - line-height:17px; /* Safari */ -} -*:first-child+html button[type] { - padding:4px 10px 3px 7px; /* IE7 */ -} -button img, a.button img{ - margin:0 3px -3px 0 !important; - padding:0; - border:none; - width:16px; - height:16px; - float:none; -} - - -/* Button colors --------------------------------------------------------------- */ - -/* Standard */ -button:hover, a.button:hover{ - background-color:#dff4ff; - border:1px solid #c2e1ef; - color:#336699; -} -a.button:active{ - background-color:#6299c5; - border:1px solid #6299c5; - color:#fff; -} - -/* Positive */ -body .positive { - color:#529214; -} -a.positive:hover, button.positive:hover { - background-color:#E6EFC2; - border:1px solid #C6D880; - color:#529214; -} -a.positive:active { - background-color:#529214; - border:1px solid #529214; - color:#fff; -} - -/* Negative */ -body .negative { - color:#d12f19; -} -a.negative:hover, button.negative:hover { - background-color:#fbe3e4; - border:1px solid #fbc2c4; - color:#d12f19; -} -a.negative:active { - background-color:#d12f19; - border:1px solid #d12f19; - color:#fff; -} diff --git a/media_root/css/plugins/fancy-type/readme.txt b/media_root/css/plugins/fancy-type/readme.txt deleted file mode 100644 index 85f2491..0000000 --- a/media_root/css/plugins/fancy-type/readme.txt +++ /dev/null @@ -1,14 +0,0 @@ -Fancy Type - -* Gives you classes to use if you'd like some - extra fancy typography. - -Credits and instructions are specified above each class -in the fancy-type.css file in this directory. - - -Usage ----------------------------------------------------------------- - -1) Add this plugin to lib/settings.yml. - See compress.rb for instructions. diff --git a/media_root/css/plugins/fancy-type/screen.css b/media_root/css/plugins/fancy-type/screen.css deleted file mode 100644 index 127cf25..0000000 --- a/media_root/css/plugins/fancy-type/screen.css +++ /dev/null @@ -1,71 +0,0 @@ -/* -------------------------------------------------------------- - - fancy-type.css - * Lots of pretty advanced classes for manipulating text. - - See the Readme file in this folder for additional instructions. - --------------------------------------------------------------- */ - -/* Indentation instead of line shifts for sibling paragraphs. */ - p + p { text-indent:2em; margin-top:-1.5em; } - form p + p { text-indent: 0; } /* Don't want this in forms. */ - - -/* For great looking type, use this code instead of asdf: - <span class="alt">asdf</span> - Best used on prepositions and ampersands. */ - -.alt { - color: #666; - font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif; - font-style: italic; - font-weight: normal; -} - - -/* For great looking quote marks in titles, replace "asdf" with: - <span class="dquo">&#8220;</span>asdf&#8221; - (That is, when the title starts with a quote mark). - (You may have to change this value depending on your font size). */ - -.dquo { margin-left: -.5em; } - - -/* Reduced size type with incremental leading - (http://www.markboulton.co.uk/journal/comments/incremental_leading/) - - This could be used for side notes. For smaller type, you don't necessarily want to - follow the 1.5x vertical rhythm -- the line-height is too much. - - Using this class, it reduces your font size and line-height so that for - every four lines of normal sized type, there is five lines of the sidenote. eg: - - New type size in em's: - 10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems) - - New line-height value: - 12px x 1.5 = 18px (old line-height) - 18px x 4 = 72px - 72px / 5 = 14.4px (new line height) - 14.4px / 10px = 1.44 (new line height in em's) */ - -p.incr, .incr p { - font-size: 10px; - line-height: 1.44em; - margin-bottom: 1.5em; -} - - -/* Surround uppercase words and abbreviations with this class. - Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */ - -.caps { - font-variant: small-caps; - letter-spacing: 1px; - text-transform: lowercase; - font-size:1.2em; - line-height:1%; - font-weight:bold; - padding:0 2px; -} diff --git a/media_root/css/plugins/link-icons/icons/doc.png b/media_root/css/plugins/link-icons/icons/doc.png deleted file mode 100644 index 834cdfa..0000000 Binary files a/media_root/css/plugins/link-icons/icons/doc.png and /dev/null differ diff --git a/media_root/css/plugins/link-icons/icons/email.png b/media_root/css/plugins/link-icons/icons/email.png deleted file mode 100644 index 7348aed..0000000 Binary files a/media_root/css/plugins/link-icons/icons/email.png and /dev/null differ diff --git a/media_root/css/plugins/link-icons/icons/external.png b/media_root/css/plugins/link-icons/icons/external.png deleted file mode 100644 index cf1cfb4..0000000 Binary files a/media_root/css/plugins/link-icons/icons/external.png and /dev/null differ diff --git a/media_root/css/plugins/link-icons/icons/feed.png b/media_root/css/plugins/link-icons/icons/feed.png deleted file mode 100644 index 315c4f4..0000000 Binary files a/media_root/css/plugins/link-icons/icons/feed.png and /dev/null differ diff --git a/media_root/css/plugins/link-icons/icons/im.png b/media_root/css/plugins/link-icons/icons/im.png deleted file mode 100644 index 79f35cc..0000000 Binary files a/media_root/css/plugins/link-icons/icons/im.png and /dev/null differ diff --git a/media_root/css/plugins/link-icons/icons/pdf.png b/media_root/css/plugins/link-icons/icons/pdf.png deleted file mode 100644 index 8f8095e..0000000 Binary files a/media_root/css/plugins/link-icons/icons/pdf.png and /dev/null differ diff --git a/media_root/css/plugins/link-icons/icons/visited.png b/media_root/css/plugins/link-icons/icons/visited.png deleted file mode 100644 index ebf206d..0000000 Binary files a/media_root/css/plugins/link-icons/icons/visited.png and /dev/null differ diff --git a/media_root/css/plugins/link-icons/icons/xls.png b/media_root/css/plugins/link-icons/icons/xls.png deleted file mode 100644 index b977d7e..0000000 Binary files a/media_root/css/plugins/link-icons/icons/xls.png and /dev/null differ diff --git a/media_root/css/plugins/link-icons/readme.txt b/media_root/css/plugins/link-icons/readme.txt deleted file mode 100644 index fc4dc64..0000000 --- a/media_root/css/plugins/link-icons/readme.txt +++ /dev/null @@ -1,18 +0,0 @@ -Link Icons -* Icons for links based on protocol or file type. - -This is not supported in IE versions < 7. - - -Credits ----------------------------------------------------------------- - -* Marc Morgan -* Olav Bjorkoy [bjorkoy.com] - - -Usage ----------------------------------------------------------------- - -1) Add this line to your HTML: - <link rel="stylesheet" href="css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection"> diff --git a/media_root/css/plugins/link-icons/screen.css b/media_root/css/plugins/link-icons/screen.css deleted file mode 100644 index 7b4bef9..0000000 --- a/media_root/css/plugins/link-icons/screen.css +++ /dev/null @@ -1,40 +0,0 @@ -/* -------------------------------------------------------------- - - link-icons.css - * Icons for links based on protocol or file type. - - See the Readme file in this folder for additional instructions. - --------------------------------------------------------------- */ - -/* Use this class if a link gets an icon when it shouldn't. */ -body a.noicon { - background:transparent none !important; - padding:0 !important; - margin:0 !important; -} - -/* Make sure the icons are not cut */ -a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited, -a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"], -a[href$=".rdf"], a[href^="aim:"] { - padding:2px 22px 2px 0; - margin:-2px 0; - background-repeat: no-repeat; - background-position: right center; -} - -/* External links */ -a[href^="http:"] { background-image: url(icons/external.png); } -a[href^="mailto:"] { background-image: url(icons/email.png); } -a[href^="http:"]:visited { background-image: url(icons/visited.png); } - -/* Files */ -a[href$=".pdf"] { background-image: url(icons/pdf.png); } -a[href$=".doc"] { background-image: url(icons/doc.png); } -a[href$=".xls"] { background-image: url(icons/xls.png); } - -/* Misc */ -a[href$=".rss"], -a[href$=".rdf"] { background-image: url(icons/feed.png); } -a[href^="aim:"] { background-image: url(icons/im.png); } diff --git a/media_root/css/plugins/rtl/readme.txt b/media_root/css/plugins/rtl/readme.txt deleted file mode 100644 index 5564c40..0000000 --- a/media_root/css/plugins/rtl/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -RTL -* Mirrors Blueprint, so it can be used with Right-to-Left languages. - -By Ran Yaniv Hartstein, ranh.co.il - -Usage ----------------------------------------------------------------- - -1) Add this line to your HTML: - <link rel="stylesheet" href="css/blueprint/plugins/rtl/screen.css" type="text/css" media="screen, projection"> diff --git a/media_root/css/plugins/rtl/screen.css b/media_root/css/plugins/rtl/screen.css deleted file mode 100644 index 7db7eb5..0000000 --- a/media_root/css/plugins/rtl/screen.css +++ /dev/null @@ -1,110 +0,0 @@ -/* -------------------------------------------------------------- - - rtl.css - * Mirrors Blueprint for left-to-right languages - - By Ran Yaniv Hartstein [ranh.co.il] - --------------------------------------------------------------- */ - -body .container { direction: rtl; } -body .column, body .span-1, body .span-2, body .span-3, body .span-4, body .span-5, body .span-6, body .span-7, body .span-8, body .span-9, body .span-10, body .span-11, body .span-12, body .span-13, body .span-14, body .span-15, body .span-16, body .span-17, body .span-18, body .span-19, body .span-20, body .span-21, body .span-22, body .span-23, body .span-24 { - float: right; - margin-right: 0; - margin-left: 10px; - text-align:right; -} - -body div.last { margin-left: 0; } -body table .last { padding-left: 0; } - -body .append-1 { padding-right: 0; padding-left: 40px; } -body .append-2 { padding-right: 0; padding-left: 80px; } -body .append-3 { padding-right: 0; padding-left: 120px; } -body .append-4 { padding-right: 0; padding-left: 160px; } -body .append-5 { padding-right: 0; padding-left: 200px; } -body .append-6 { padding-right: 0; padding-left: 240px; } -body .append-7 { padding-right: 0; padding-left: 280px; } -body .append-8 { padding-right: 0; padding-left: 320px; } -body .append-9 { padding-right: 0; padding-left: 360px; } -body .append-10 { padding-right: 0; padding-left: 400px; } -body .append-11 { padding-right: 0; padding-left: 440px; } -body .append-12 { padding-right: 0; padding-left: 480px; } -body .append-13 { padding-right: 0; padding-left: 520px; } -body .append-14 { padding-right: 0; padding-left: 560px; } -body .append-15 { padding-right: 0; padding-left: 600px; } -body .append-16 { padding-right: 0; padding-left: 640px; } -body .append-17 { padding-right: 0; padding-left: 680px; } -body .append-18 { padding-right: 0; padding-left: 720px; } -body .append-19 { padding-right: 0; padding-left: 760px; } -body .append-20 { padding-right: 0; padding-left: 800px; } -body .append-21 { padding-right: 0; padding-left: 840px; } -body .append-22 { padding-right: 0; padding-left: 880px; } -body .append-23 { padding-right: 0; padding-left: 920px; } - -body .prepend-1 { padding-left: 0; padding-right: 40px; } -body .prepend-2 { padding-left: 0; padding-right: 80px; } -body .prepend-3 { padding-left: 0; padding-right: 120px; } -body .prepend-4 { padding-left: 0; padding-right: 160px; } -body .prepend-5 { padding-left: 0; padding-right: 200px; } -body .prepend-6 { padding-left: 0; padding-right: 240px; } -body .prepend-7 { padding-left: 0; padding-right: 280px; } -body .prepend-8 { padding-left: 0; padding-right: 320px; } -body .prepend-9 { padding-left: 0; padding-right: 360px; } -body .prepend-10 { padding-left: 0; padding-right: 400px; } -body .prepend-11 { padding-left: 0; padding-right: 440px; } -body .prepend-12 { padding-left: 0; padding-right: 480px; } -body .prepend-13 { padding-left: 0; padding-right: 520px; } -body .prepend-14 { padding-left: 0; padding-right: 560px; } -body .prepend-15 { padding-left: 0; padding-right: 600px; } -body .prepend-16 { padding-left: 0; padding-right: 640px; } -body .prepend-17 { padding-left: 0; padding-right: 680px; } -body .prepend-18 { padding-left: 0; padding-right: 720px; } -body .prepend-19 { padding-left: 0; padding-right: 760px; } -body .prepend-20 { padding-left: 0; padding-right: 800px; } -body .prepend-21 { padding-left: 0; padding-right: 840px; } -body .prepend-22 { padding-left: 0; padding-right: 880px; } -body .prepend-23 { padding-left: 0; padding-right: 920px; } - -body .border { - padding-right: 0; - padding-left: 4px; - margin-right: 0; - margin-left: 5px; - border-right: none; - border-left: 1px solid #eee; -} - -body .colborder { - padding-right: 0; - padding-left: 24px; - margin-right: 0; - margin-left: 25px; - border-right: none; - border-left: 1px solid #eee; -} - -body .pull-1 { margin-left: 0; margin-right: -40px; } -body .pull-2 { margin-left: 0; margin-right: -80px; } -body .pull-3 { margin-left: 0; margin-right: -120px; } -body .pull-4 { margin-left: 0; margin-right: -160px; } - -body .push-0 { margin: 0 18px 0 0; } -body .push-1 { margin: 0 18px 0 -40px; } -body .push-2 { margin: 0 18px 0 -80px; } -body .push-3 { margin: 0 18px 0 -120px; } -body .push-4 { margin: 0 18px 0 -160px; } -body .push-0, body .push-1, body .push-2, -body .push-3, body .push-4 { float: left; } - - -/* Typography with RTL support */ -body h1,body h2,body h3, -body h4,body h5,body h6 { font-family: Arial, sans-serif; } -html body { font-family: Arial, sans-serif; } -body pre,body code,body tt { font-family: monospace; } - -/* Mirror floats and margins on typographic elements */ -body p img { float: right; margin: 1.5em 0 1.5em 1.5em; } -body dd, body ul, body ol { margin-left: 0; margin-right: 1.5em;} -body td, body th { text-align:right; } diff --git a/media_root/css/print.css b/media_root/css/print.css deleted file mode 100644 index fdb8220..0000000 --- a/media_root/css/print.css +++ /dev/null @@ -1,29 +0,0 @@ -/* ----------------------------------------------------------------------- - - - Blueprint CSS Framework 0.9 - http://blueprintcss.org - - * Copyright (c) 2007-Present. See LICENSE for more info. - * See README for instructions on how to use Blueprint. - * For credits and origins, see AUTHORS. - * This is a compressed file. See the sources in the 'src' directory. - ------------------------------------------------------------------------ */ - -/* print.css */ -body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;} -.container {background:none;} -hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;} -hr.space {background:#fff;color:#fff;visibility:hidden;} -h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;} -code {font:.9em "Courier New", Monaco, Courier, monospace;} -a img {border:none;} -p img.top {margin-top:0;} -blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;} -.small {font-size:.9em;} -.large {font-size:1.1em;} -.quiet {color:#999;} -.hide {display:none;} -a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;} -a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;} \ No newline at end of file diff --git a/media_root/css/screen.css b/media_root/css/screen.css deleted file mode 100644 index 46ca92b..0000000 --- a/media_root/css/screen.css +++ /dev/null @@ -1,258 +0,0 @@ -/* ----------------------------------------------------------------------- - - - Blueprint CSS Framework 0.9 - http://blueprintcss.org - - * Copyright (c) 2007-Present. See LICENSE for more info. - * See README for instructions on how to use Blueprint. - * For credits and origins, see AUTHORS. - * This is a compressed file. See the sources in the 'src' directory. - ------------------------------------------------------------------------ */ - -/* reset.css */ -html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} -article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;} -body {line-height:1.5;} -table {border-collapse:separate;border-spacing:0;} -caption, th, td {text-align:left;font-weight:normal;} -table, td, th {vertical-align:middle;} -blockquote:before, blockquote:after, q:before, q:after {content:"";} -blockquote, q {quotes:"" "";} -a img {border:none;} - -/* typography.css */ -html {font-size:100.01%;} -body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;} -h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;} -h1 {font-size:3em;line-height:1;margin-bottom:0.5em;} -h2 {font-size:2em;margin-bottom:0.75em;} -h3 {font-size:1.5em;line-height:1;margin-bottom:1em;} -h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;} -h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;} -h6 {font-size:1em;font-weight:bold;} -h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;} -p {margin:0 0 1.5em;} -p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;} -p img.right {float:right;margin:1.5em 0 1.5em 1.5em;} -a:focus, a:hover {color:#000;} -a {color:#009;text-decoration:underline;} -blockquote {margin:1.5em;color:#666;font-style:italic;} -strong {font-weight:bold;} -em, dfn {font-style:italic;} -dfn {font-weight:bold;} -sup, sub {line-height:0;} -abbr, acronym {border-bottom:1px dotted #666;} -address {margin:0 0 1.5em;font-style:italic;} -del {color:#666;} -pre {margin:1.5em 0;white-space:pre;} -pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;} -li ul, li ol {margin:0;} -ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;} -ul {list-style-type:disc;} -ol {list-style-type:decimal;} -dl {margin:0 0 1.5em 0;} -dl dt {font-weight:bold;} -dd {margin-left:1.5em;} -table {margin-bottom:1.4em;width:100%;} -th {font-weight:bold;} -thead th {background:#c3d9ff;} -th, td, caption {padding:4px 10px 4px 5px;} -tr.even td {background:#e5ecf9;} -tfoot {font-style:italic;} -caption {background:#eee;} -.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;} -.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;} -.hide {display:none;} -.quiet {color:#666;} -.loud {color:#000;} -.highlight {background:#ff0;} -.added {background:#060;color:#fff;} -.removed {background:#900;color:#fff;} -.first {margin-left:0;padding-left:0;} -.last {margin-right:0;padding-right:0;} -.top {margin-top:0;padding-top:0;} -.bottom {margin-bottom:0;padding-bottom:0;} - -/* forms.css */ -label {font-weight:bold;} -fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;} -legend {font-weight:bold;font-size:1.2em;} -input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;} -input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;} -input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;} -input.text, input.title {width:300px;padding:5px;} -input.title {font-size:1.5em;} -textarea {width:390px;height:250px;padding:5px;} -input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;} -form.inline {line-height:3;} -form.inline p {margin-bottom:0;} -.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;} -.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;} -.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;} -.success {background:#E6EFC2;color:#264409;border-color:#C6D880;} -.error a {color:#8a1f11;} -.notice a {color:#514721;} -.success a {color:#264409;} - -/* grid.css */ -.container {width:950px;margin:0 auto;} -.showgrid {background:url(src/grid.png);} -.column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20, .span-21, .span-22, .span-23, .span-24 {float:left;margin-right:10px;} -.last {margin-right:0;} -.span-1 {width:30px;} -.span-2 {width:70px;} -.span-3 {width:110px;} -.span-4 {width:150px;} -.span-5 {width:190px;} -.span-6 {width:230px;} -.span-7 {width:270px;} -.span-8 {width:310px;} -.span-9 {width:350px;} -.span-10 {width:390px;} -.span-11 {width:430px;} -.span-12 {width:470px;} -.span-13 {width:510px;} -.span-14 {width:550px;} -.span-15 {width:590px;} -.span-16 {width:630px;} -.span-17 {width:670px;} -.span-18 {width:710px;} -.span-19 {width:750px;} -.span-20 {width:790px;} -.span-21 {width:830px;} -.span-22 {width:870px;} -.span-23 {width:910px;} -.span-24 {width:950px;margin-right:0;} -input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {border-left-width:1px;border-right-width:1px;padding-left:5px;padding-right:5px;} -input.span-1, textarea.span-1 {width:18px;} -input.span-2, textarea.span-2 {width:58px;} -input.span-3, textarea.span-3 {width:98px;} -input.span-4, textarea.span-4 {width:138px;} -input.span-5, textarea.span-5 {width:178px;} -input.span-6, textarea.span-6 {width:218px;} -input.span-7, textarea.span-7 {width:258px;} -input.span-8, textarea.span-8 {width:298px;} -input.span-9, textarea.span-9 {width:338px;} -input.span-10, textarea.span-10 {width:378px;} -input.span-11, textarea.span-11 {width:418px;} -input.span-12, textarea.span-12 {width:458px;} -input.span-13, textarea.span-13 {width:498px;} -input.span-14, textarea.span-14 {width:538px;} -input.span-15, textarea.span-15 {width:578px;} -input.span-16, textarea.span-16 {width:618px;} -input.span-17, textarea.span-17 {width:658px;} -input.span-18, textarea.span-18 {width:698px;} -input.span-19, textarea.span-19 {width:738px;} -input.span-20, textarea.span-20 {width:778px;} -input.span-21, textarea.span-21 {width:818px;} -input.span-22, textarea.span-22 {width:858px;} -input.span-23, textarea.span-23 {width:898px;} -input.span-24, textarea.span-24 {width:938px;} -.append-1 {padding-right:40px;} -.append-2 {padding-right:80px;} -.append-3 {padding-right:120px;} -.append-4 {padding-right:160px;} -.append-5 {padding-right:200px;} -.append-6 {padding-right:240px;} -.append-7 {padding-right:280px;} -.append-8 {padding-right:320px;} -.append-9 {padding-right:360px;} -.append-10 {padding-right:400px;} -.append-11 {padding-right:440px;} -.append-12 {padding-right:480px;} -.append-13 {padding-right:520px;} -.append-14 {padding-right:560px;} -.append-15 {padding-right:600px;} -.append-16 {padding-right:640px;} -.append-17 {padding-right:680px;} -.append-18 {padding-right:720px;} -.append-19 {padding-right:760px;} -.append-20 {padding-right:800px;} -.append-21 {padding-right:840px;} -.append-22 {padding-right:880px;} -.append-23 {padding-right:920px;} -.prepend-1 {padding-left:40px;} -.prepend-2 {padding-left:80px;} -.prepend-3 {padding-left:120px;} -.prepend-4 {padding-left:160px;} -.prepend-5 {padding-left:200px;} -.prepend-6 {padding-left:240px;} -.prepend-7 {padding-left:280px;} -.prepend-8 {padding-left:320px;} -.prepend-9 {padding-left:360px;} -.prepend-10 {padding-left:400px;} -.prepend-11 {padding-left:440px;} -.prepend-12 {padding-left:480px;} -.prepend-13 {padding-left:520px;} -.prepend-14 {padding-left:560px;} -.prepend-15 {padding-left:600px;} -.prepend-16 {padding-left:640px;} -.prepend-17 {padding-left:680px;} -.prepend-18 {padding-left:720px;} -.prepend-19 {padding-left:760px;} -.prepend-20 {padding-left:800px;} -.prepend-21 {padding-left:840px;} -.prepend-22 {padding-left:880px;} -.prepend-23 {padding-left:920px;} -.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;} -.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;} -.pull-1 {margin-left:-40px;} -.pull-2 {margin-left:-80px;} -.pull-3 {margin-left:-120px;} -.pull-4 {margin-left:-160px;} -.pull-5 {margin-left:-200px;} -.pull-6 {margin-left:-240px;} -.pull-7 {margin-left:-280px;} -.pull-8 {margin-left:-320px;} -.pull-9 {margin-left:-360px;} -.pull-10 {margin-left:-400px;} -.pull-11 {margin-left:-440px;} -.pull-12 {margin-left:-480px;} -.pull-13 {margin-left:-520px;} -.pull-14 {margin-left:-560px;} -.pull-15 {margin-left:-600px;} -.pull-16 {margin-left:-640px;} -.pull-17 {margin-left:-680px;} -.pull-18 {margin-left:-720px;} -.pull-19 {margin-left:-760px;} -.pull-20 {margin-left:-800px;} -.pull-21 {margin-left:-840px;} -.pull-22 {margin-left:-880px;} -.pull-23 {margin-left:-920px;} -.pull-24 {margin-left:-960px;} -.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;} -.push-1 {margin:0 -40px 1.5em 40px;} -.push-2 {margin:0 -80px 1.5em 80px;} -.push-3 {margin:0 -120px 1.5em 120px;} -.push-4 {margin:0 -160px 1.5em 160px;} -.push-5 {margin:0 -200px 1.5em 200px;} -.push-6 {margin:0 -240px 1.5em 240px;} -.push-7 {margin:0 -280px 1.5em 280px;} -.push-8 {margin:0 -320px 1.5em 320px;} -.push-9 {margin:0 -360px 1.5em 360px;} -.push-10 {margin:0 -400px 1.5em 400px;} -.push-11 {margin:0 -440px 1.5em 440px;} -.push-12 {margin:0 -480px 1.5em 480px;} -.push-13 {margin:0 -520px 1.5em 520px;} -.push-14 {margin:0 -560px 1.5em 560px;} -.push-15 {margin:0 -600px 1.5em 600px;} -.push-16 {margin:0 -640px 1.5em 640px;} -.push-17 {margin:0 -680px 1.5em 680px;} -.push-18 {margin:0 -720px 1.5em 720px;} -.push-19 {margin:0 -760px 1.5em 760px;} -.push-20 {margin:0 -800px 1.5em 800px;} -.push-21 {margin:0 -840px 1.5em 840px;} -.push-22 {margin:0 -880px 1.5em 880px;} -.push-23 {margin:0 -920px 1.5em 920px;} -.push-24 {margin:0 -960px 1.5em 960px;} -.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;} -.prepend-top {margin-top:1.5em;} -.append-bottom {margin-bottom:1.5em;} -.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;} -hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;} -hr.space {background:#fff;color:#fff;visibility:hidden;} -.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;} -.clearfix, .container {display:block;} -.clear {clear:both;} \ No newline at end of file diff --git a/media_root/img/col_h2.gif b/media_root/img/col_h2.gif new file mode 100644 index 0000000..86a5bce Binary files /dev/null and b/media_root/img/col_h2.gif differ diff --git a/media_root/img/footer.png b/media_root/img/footer.png new file mode 100644 index 0000000..52547cc Binary files /dev/null and b/media_root/img/footer.png differ diff --git a/media_root/img/footer_rep.gif b/media_root/img/footer_rep.gif new file mode 100644 index 0000000..8724b73 Binary files /dev/null and b/media_root/img/footer_rep.gif differ diff --git a/media_root/img/icons.png b/media_root/img/icons.png new file mode 100644 index 0000000..f102b19 Binary files /dev/null and b/media_root/img/icons.png differ diff --git a/media_root/img/li.gif b/media_root/img/li.gif new file mode 100644 index 0000000..de926b1 Binary files /dev/null and b/media_root/img/li.gif differ diff --git a/media_root/img/logo_pugce.png b/media_root/img/logo_pugce.png new file mode 100644 index 0000000..f14c5e1 Binary files /dev/null and b/media_root/img/logo_pugce.png differ diff --git a/media_root/img/mmenu_left.gif b/media_root/img/mmenu_left.gif new file mode 100644 index 0000000..0228c89 Binary files /dev/null and b/media_root/img/mmenu_left.gif differ diff --git a/media_root/img/mmenu_rep.gif b/media_root/img/mmenu_rep.gif new file mode 100644 index 0000000..15075f3 Binary files /dev/null and b/media_root/img/mmenu_rep.gif differ diff --git a/media_root/img/mmenu_right.gif b/media_root/img/mmenu_right.gif new file mode 100644 index 0000000..e850486 Binary files /dev/null and b/media_root/img/mmenu_right.gif differ diff --git a/media_root/img/mmenu_shadow.gif b/media_root/img/mmenu_shadow.gif new file mode 100644 index 0000000..2766e69 Binary files /dev/null and b/media_root/img/mmenu_shadow.gif differ diff --git a/media_root/img/pattern.gif b/media_root/img/pattern.gif new file mode 100644 index 0000000..803ab79 Binary files /dev/null and b/media_root/img/pattern.gif differ diff --git a/media_root/img/search-bg.gif b/media_root/img/search-bg.gif new file mode 100644 index 0000000..a280507 Binary files /dev/null and b/media_root/img/search-bg.gif differ diff --git a/media_root/img/search.gif b/media_root/img/search.gif new file mode 100644 index 0000000..ade67bb Binary files /dev/null and b/media_root/img/search.gif differ diff --git a/media_root/img/submit.gif b/media_root/img/submit.gif new file mode 100644 index 0000000..917e12a Binary files /dev/null and b/media_root/img/submit.gif differ diff --git a/settings.py b/settings.py index b7fbfe7..cd6b032 100644 --- a/settings.py +++ b/settings.py @@ -1,86 +1,99 @@ # -*- coding:utf-8 -*- from os import path +import config BIBLION_SECTIONS = [] BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG # WIKI PARAMS # Defines the duration of the soft editing lock on article, in seconds. WIKI_LOCK_DURATION = 15 # Determines if the wiki will be for registered users only, or # if it will allow anonimous users. WIKI_REQUIRES_LOGIN = False ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. - 'USER': '', # Not used with sqlite3. - 'PASSWORD': '', # Not used with sqlite3. - 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '', # Set to empty string for default. Not used with sqlite3. +if DEBUG: + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. + 'USER': '', # Not used with sqlite3. + 'PASSWORD': '', # Not used with sqlite3. + 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. + 'PORT': '', # Set to empty string for default. Not used with sqlite3. + } + } +else: + DATABASES = { + 'default': { + 'ENGINE': config.DB_ENGINE, + 'NAME': config.DB_NAME, + 'USER': config.DB_USER, + 'PASSWORD': config.DB_PASSWD, + 'HOST': config.DB_HOST, + 'PORT': config.DB_PORT, + } } -} TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' -SECRET_KEY = 'chave_secreta' +SECRET_KEY = config.SECRET_KEY # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', # -- APPS -- 'pugce.biblion', 'pugce.wiki', 'pugce.tagging', ) diff --git a/templates/base.html b/templates/base.html index 6a6c15e..76c681b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,28 +1,193 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br" lang="pt"> +<!DOCTYPE html> +<html lang="pt"> <head> - <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> - <meta name="author" content="Italo Moreira Campelo Maia" /> + <meta charset="utf-8"> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="author" content="pugce team" /> + <title>PUG-CE - Python Users Group Ceará</title> - <!-- Framework CSS --> - <link media="screen, projection" rel="stylesheet" href="{{MEDIA_URL}}css/screen.css" type="text/css" /> - <link media="print" rel="stylesheet" href="{{MEDIA_URL}}css/print.css" type="text/css" /> - <!--[if IE]> - <link media="screen, projection" rel="stylesheet" href="{{MEDIA_URL}}css/ie.css" type="text/css" /> - <![endif]--> - - <title>PugCe</title> + <!-- CSS --> + <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/default.css" media="screen" > + <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen, print"> </head> <body> -<div class="container"> -<div class="clear"> -<img src="{{MEDIA_URL}}img/logo-pugce-300x150.png" alt="logo pug-ce" /> -</div> -{% block content %} -{% endblock %} -</div> -</body> +<div id="background"> + <div id="wrapper"> + + <header id="header"> + + <hgroup class="logo"> + <h1><a href="http://pug-ce.python.org.br" title="Voltar para a homepage"><img src="{{MEDIA_URL}}img/logo_pugce.png" alt="PUG-CE"></a></h1> + <h2>Comunidade Python CE</h2> + + </hgroup> + + <nav> + <h2 class="hidden">Navega&ccedil;&atilde;o</h2> + + <div id="mainMenu"> + <ul> + <li class="active"><a href="#"><span>In&iacute;cio</span></a></li> + <li><a href="about.html"><span>Sobre</span></a></li> + <li><a href="contact.html"><span>Contato</span></a></li> + </ul> + </div> + + <h2 class="hidden">Navega&ccedil;&atilde;o r&aacute;pida</h2> + + <ul id="quickNav"> + <li class="home"><a href="#" title="In&iacute;cio"><span>Homepage</span></a></li> + <li class="map"><a href="#" title="Mapa do site"><span>Sitemap</span></a></li> + <li class="contact"><a href="#" title="Contato"><span>Contato</span></a></li> + </ul> + + <h2 class="hidden">Idiomas</h2> + + <ul id="lang"> + <li class="pt"><a href="#" title="Portugu&ecirc;s"><span></span>PT-BR</a></li> + <li class="en"><a href="#" title="Ingl&ecirc;s"><span></span>EN</a></li> + <li class="es"><a href="#" title="Espanhol"><span></span>ES</a></li> + </ul> + </nav> + + <form action="#"> + <fieldset> + <legend>Busca</legend> + <input type="search" class="text" name="search" title="Encontre no site"> + <input type="submit" class="submit" value="Busca"> + </fieldset> + </form> + + </header> + + <section id="content"> + {% block content %} + <h1>T&iacute;tulo padr&atilde;o com texto</h1> + + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + + <section class="floatBoxes"> + <h1>Boxes para qualquer coisa</h1> + + <article> + <a href="#"> + <h1>Algo 1</h1> + <p>Some annotation goes here. It may sperad on a few lines.</p> + </a> + </article> + + <article> + <a href="#"> + <h1>Algo 2</h1> + <p>Some annotation goes here. It may sperad on a few lines.</p> + </a> + </article> + + <article class="last"> + <a href="#"> + + <h1>Algo 3</h1> + <p>Some annotation goes here. It may sperad on a few lines.</p> + </a> + </article> + </section> + + <section class="newsList"> + <h1>Algumas not&iacute;cias:</h1> + + <article> + <h1><a href="#">Headline #1</a></h1> + <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> + </article> + + <article> + <h1><a href="#">Headline #2</a></h1> + + <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p> + </article> + </section> + {% endblock %} + </section> + {# FIM CONTENT #} + + <aside id="sidebar"> + + <nav class="navMenu"> + <h1>Categorias</h1> + + <ul> + <li><a href="page1.html">Page 1</a></li> + <li> + <a href="page2.html">Page 2</a> + <ul> + <li><a href="subpage1.html">Subpage 1</a></li> + <li><a href="subpage2.html">Subpage 2</a></li> + + <li><a href="subpage3.htmll">Subpage 3</a></li> + <li><a href="subpage4.html">Subpage 4</a></li> + </ul> + </li> + <li><a href="page3.html">Page 3</a></li> + <li><a href="page4.html">Page 4</a></li> + </ul> + + </nav> + + <h1>Links ou Blogs</h1> + <a href="#">Sample Link #1</a><br> + <a href="#">Sample Link #2</a><br> + <a href="#">Sample Link #3</a><br> + <a href="#">Sample Link #4</a><br> + <a href="#">Sample Link #5</a><br> + + <h1>Evento:</h1> + + <address> + T&iacute;tulo: PyLestras<br> + Endere&ccedil;O: FA7<br> + Cidade: Fortaleza<br> + + Fone: (85) 8885.5886<br> + Email: contato@pugce.com.br<br> + </address> + + </aside> + + </div> + </div> + + <footer id="footer"> + <div class="width"> + <p class="copyright"> + <small> + &copy; <a href="http://pug-ce.python.org.br">PUG-CE</a> 2010, Todos direitos reservados. + </small> + </p> + + <p class="HTML5"> + + <small> + Esse site foi feito em <abbr title="HTML 5">HTML 5</abbr> e projetado por <a href="http://pug-ce.python.org.br">Python Users Group CE</a>. + </small> + </p> + + <div id="linkbuilding"> + <ul> + <li><a href="#" title="SEO text 1">Link 1</a></li> + <li><a href="#" title="SEO text 2">Link 2</a></li> + <li><a href="#" title="SEO text 3">Link 3</a></li> + <li><a href="#" title="SEO text 4">Link 4</a></li> + <li><a href="#" title="SEO text 5">Link 5</a></li> + <li><a href="#" title="SEO text 6">Link 6</a></li> + <li><a href="#" title="SEO text 7">Link 7</a></li> + </ul> + </div> + + </div> +</footer> + + + </body> </html>
italomaia/pugce
4045c71ff3d57c29a818cede41484c5114ba6998
adicionando wiki
diff --git a/.gitignore b/.gitignore index 0d20b64..772c968 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.pyc +dev.sqlite diff --git a/atomformat.py b/atomformat.py new file mode 100644 index 0000000..0d74a61 --- /dev/null +++ b/atomformat.py @@ -0,0 +1,542 @@ +# +# django-atompub by James Tauber <http://jtauber.com/> +# http://code.google.com/p/django-atompub/ +# An implementation of the Atom format and protocol for Django +# +# For instructions on how to use this module to generate Atom feeds, +# see http://code.google.com/p/django-atompub/wiki/UserGuide +# +# +# Copyright (c) 2007, James Tauber +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +from xml.sax.saxutils import XMLGenerator +from datetime import datetime + + +GENERATOR_TEXT = 'django-atompub' +GENERATOR_ATTR = { + 'uri': 'http://code.google.com/p/django-atompub/', + 'version': 'r33' +} + + + +## based on django.utils.xmlutils.SimplerXMLGenerator +class SimplerXMLGenerator(XMLGenerator): + def addQuickElement(self, name, contents=None, attrs=None): + "Convenience method for adding an element with no children" + if attrs is None: attrs = {} + self.startElement(name, attrs) + if contents is not None: + self.characters(contents) + self.endElement(name) + + + +## based on django.utils.feedgenerator.rfc3339_date +def rfc3339_date(date): + return date.strftime('%Y-%m-%dT%H:%M:%SZ') + + + +## based on django.utils.feedgenerator.get_tag_uri +def get_tag_uri(url, date): + "Creates a TagURI. See http://diveintomark.org/archives/2004/05/28/howto-atom-id" + tag = re.sub('^http://', '', url) + if date is not None: + tag = re.sub('/', ',%s:/' % date.strftime('%Y-%m-%d'), tag, 1) + tag = re.sub('#', '/', tag) + return 'tag:' + tag + + + +## based on django.contrib.syndication.feeds.Feed +class Feed(object): + + + VALIDATE = True + + + def __init__(self, slug, feed_url): + # @@@ slug and feed_url are not used yet + pass + + + def __get_dynamic_attr(self, attname, obj, default=None): + try: + attr = getattr(self, attname) + except AttributeError: + return default + if callable(attr): + # Check func_code.co_argcount rather than try/excepting the + # function and catching the TypeError, because something inside + # the function may raise the TypeError. This technique is more + # accurate. + if hasattr(attr, 'func_code'): + argcount = attr.func_code.co_argcount + else: + argcount = attr.__call__.func_code.co_argcount + if argcount == 2: # one argument is 'self' + return attr(obj) + else: + return attr() + return attr + + + def get_feed(self, extra_params=None): + + if extra_params: + try: + obj = self.get_object(extra_params.split('/')) + except (AttributeError, LookupError): + raise LookupError('Feed does not exist') + else: + obj = None + + feed = AtomFeed( + atom_id = self.__get_dynamic_attr('feed_id', obj), + title = self.__get_dynamic_attr('feed_title', obj), + updated = self.__get_dynamic_attr('feed_updated', obj), + icon = self.__get_dynamic_attr('feed_icon', obj), + logo = self.__get_dynamic_attr('feed_logo', obj), + rights = self.__get_dynamic_attr('feed_rights', obj), + subtitle = self.__get_dynamic_attr('feed_subtitle', obj), + authors = self.__get_dynamic_attr('feed_authors', obj, default=[]), + categories = self.__get_dynamic_attr('feed_categories', obj, default=[]), + contributors = self.__get_dynamic_attr('feed_contributors', obj, default=[]), + links = self.__get_dynamic_attr('feed_links', obj, default=[]), + extra_attrs = self.__get_dynamic_attr('feed_extra_attrs', obj), + hide_generator = self.__get_dynamic_attr('hide_generator', obj, default=False) + ) + + items = self.__get_dynamic_attr('items', obj) + if items is None: + raise LookupError('Feed has no items field') + + for item in items: + feed.add_item( + atom_id = self.__get_dynamic_attr('item_id', item), + title = self.__get_dynamic_attr('item_title', item), + updated = self.__get_dynamic_attr('item_updated', item), + content = self.__get_dynamic_attr('item_content', item), + published = self.__get_dynamic_attr('item_published', item), + rights = self.__get_dynamic_attr('item_rights', item), + source = self.__get_dynamic_attr('item_source', item), + summary = self.__get_dynamic_attr('item_summary', item), + authors = self.__get_dynamic_attr('item_authors', item, default=[]), + categories = self.__get_dynamic_attr('item_categories', item, default=[]), + contributors = self.__get_dynamic_attr('item_contributors', item, default=[]), + links = self.__get_dynamic_attr('item_links', item, default=[]), + extra_attrs = self.__get_dynamic_attr('item_extra_attrs', None, default={}), + ) + + if self.VALIDATE: + feed.validate() + return feed + + + +class ValidationError(Exception): + pass + + + +## based on django.utils.feedgenerator.SyndicationFeed and django.utils.feedgenerator.Atom1Feed +class AtomFeed(object): + + + mime_type = 'application/atom+xml' + ns = u'http://www.w3.org/2005/Atom' + + + def __init__(self, atom_id, title, updated=None, icon=None, logo=None, rights=None, subtitle=None, + authors=[], categories=[], contributors=[], links=[], extra_attrs={}, hide_generator=False): + if atom_id is None: + raise LookupError('Feed has no feed_id field') + if title is None: + raise LookupError('Feed has no feed_title field') + # if updated == None, we'll calculate it + self.feed = { + 'id': atom_id, + 'title': title, + 'updated': updated, + 'icon': icon, + 'logo': logo, + 'rights': rights, + 'subtitle': subtitle, + 'authors': authors, + 'categories': categories, + 'contributors': contributors, + 'links': links, + 'extra_attrs': extra_attrs, + 'hide_generator': hide_generator, + } + self.items = [] + + + def add_item(self, atom_id, title, updated, content=None, published=None, rights=None, source=None, summary=None, + authors=[], categories=[], contributors=[], links=[], extra_attrs={}): + if atom_id is None: + raise LookupError('Feed has no item_id method') + if title is None: + raise LookupError('Feed has no item_title method') + if updated is None: + raise LookupError('Feed has no item_updated method') + self.items.append({ + 'id': atom_id, + 'title': title, + 'updated': updated, + 'content': content, + 'published': published, + 'rights': rights, + 'source': source, + 'summary': summary, + 'authors': authors, + 'categories': categories, + 'contributors': contributors, + 'links': links, + 'extra_attrs': extra_attrs, + }) + + + def latest_updated(self): + """ + Returns the latest item's updated or the current time if there are no items. + """ + updates = [item['updated'] for item in self.items] + if len(updates) > 0: + updates.sort() + return updates[-1] + else: + return datetime.now() # @@@ really we should allow a feed to define its "start" for this case + + + def write_text_construct(self, handler, element_name, data): + if isinstance(data, tuple): + text_type, text = data + if text_type == 'xhtml': + handler.startElement(element_name, {'type': text_type}) + handler._write(text) # write unescaped -- it had better be well-formed XML + handler.endElement(element_name) + else: + handler.addQuickElement(element_name, text, {'type': text_type}) + else: + handler.addQuickElement(element_name, data) + + + def write_person_construct(self, handler, element_name, person): + handler.startElement(element_name, {}) + handler.addQuickElement(u'name', person['name']) + if 'uri' in person: + handler.addQuickElement(u'uri', person['uri']) + if 'email' in person: + handler.addQuickElement(u'email', person['email']) + handler.endElement(element_name) + + + def write_link_construct(self, handler, link): + if 'length' in link: + link['length'] = str(link['length']) + handler.addQuickElement(u'link', None, link) + + + def write_category_construct(self, handler, category): + handler.addQuickElement(u'category', None, category) + + + def write_source(self, handler, data): + handler.startElement(u'source', {}) + if data.get('id'): + handler.addQuickElement(u'id', data['id']) + if data.get('title'): + self.write_text_construct(handler, u'title', data['title']) + if data.get('subtitle'): + self.write_text_construct(handler, u'subtitle', data['subtitle']) + if data.get('icon'): + handler.addQuickElement(u'icon', data['icon']) + if data.get('logo'): + handler.addQuickElement(u'logo', data['logo']) + if data.get('updated'): + handler.addQuickElement(u'updated', rfc3339_date(data['updated'])) + for category in data.get('categories', []): + self.write_category_construct(handler, category) + for link in data.get('links', []): + self.write_link_construct(handler, link) + for author in data.get('authors', []): + self.write_person_construct(handler, u'author', author) + for contributor in data.get('contributors', []): + self.write_person_construct(handler, u'contributor', contributor) + if data.get('rights'): + self.write_text_construct(handler, u'rights', data['rights']) + handler.endElement(u'source') + + + def write_content(self, handler, data): + if isinstance(data, tuple): + content_dict, text = data + if content_dict.get('type') == 'xhtml': + handler.startElement(u'content', content_dict) + handler._write(text) # write unescaped -- it had better be well-formed XML + handler.endElement(u'content') + else: + handler.addQuickElement(u'content', text, content_dict) + else: + handler.addQuickElement(u'content', data) + + + def write(self, outfile, encoding): + handler = SimplerXMLGenerator(outfile, encoding) + handler.startDocument() + feed_attrs = {u'xmlns': self.ns} + if self.feed.get('extra_attrs'): + feed_attrs.update(self.feed['extra_attrs']) + handler.startElement(u'feed', feed_attrs) + handler.addQuickElement(u'id', self.feed['id']) + self.write_text_construct(handler, u'title', self.feed['title']) + if self.feed.get('subtitle'): + self.write_text_construct(handler, u'subtitle', self.feed['subtitle']) + if self.feed.get('icon'): + handler.addQuickElement(u'icon', self.feed['icon']) + if self.feed.get('logo'): + handler.addQuickElement(u'logo', self.feed['logo']) + if self.feed['updated']: + handler.addQuickElement(u'updated', rfc3339_date(self.feed['updated'])) + else: + handler.addQuickElement(u'updated', rfc3339_date(self.latest_updated())) + for category in self.feed['categories']: + self.write_category_construct(handler, category) + for link in self.feed['links']: + self.write_link_construct(handler, link) + for author in self.feed['authors']: + self.write_person_construct(handler, u'author', author) + for contributor in self.feed['contributors']: + self.write_person_construct(handler, u'contributor', contributor) + if self.feed.get('rights'): + self.write_text_construct(handler, u'rights', self.feed['rights']) + if not self.feed.get('hide_generator'): + handler.addQuickElement(u'generator', GENERATOR_TEXT, GENERATOR_ATTR) + + self.write_items(handler) + + handler.endElement(u'feed') + + + def write_items(self, handler): + for item in self.items: + entry_attrs = item.get('extra_attrs', {}) + handler.startElement(u'entry', entry_attrs) + + handler.addQuickElement(u'id', item['id']) + self.write_text_construct(handler, u'title', item['title']) + handler.addQuickElement(u'updated', rfc3339_date(item['updated'])) + if item.get('published'): + handler.addQuickElement(u'published', rfc3339_date(item['published'])) + if item.get('rights'): + self.write_text_construct(handler, u'rights', item['rights']) + if item.get('source'): + self.write_source(handler, item['source']) + + for author in item['authors']: + self.write_person_construct(handler, u'author', author) + for contributor in item['contributors']: + self.write_person_construct(handler, u'contributor', contributor) + for category in item['categories']: + self.write_category_construct(handler, category) + for link in item['links']: + self.write_link_construct(handler, link) + if item.get('summary'): + self.write_text_construct(handler, u'summary', item['summary']) + if item.get('content'): + self.write_content(handler, item['content']) + + handler.endElement(u'entry') + + + def validate(self): + + def validate_text_construct(obj): + if isinstance(obj, tuple): + if obj[0] not in ['text', 'html', 'xhtml']: + return False + # @@@ no validation is done that 'html' text constructs are valid HTML + # @@@ no validation is done that 'xhtml' text constructs are well-formed XML or valid XHTML + + return True + + if not validate_text_construct(self.feed['title']): + raise ValidationError('feed title has invalid type') + if self.feed.get('subtitle'): + if not validate_text_construct(self.feed['subtitle']): + raise ValidationError('feed subtitle has invalid type') + if self.feed.get('rights'): + if not validate_text_construct(self.feed['rights']): + raise ValidationError('feed rights has invalid type') + + alternate_links = {} + for link in self.feed.get('links'): + if link.get('rel') == 'alternate' or link.get('rel') == None: + key = (link.get('type'), link.get('hreflang')) + if key in alternate_links: + raise ValidationError('alternate links must have unique type/hreflang') + alternate_links[key] = link + + if self.feed.get('authors'): + feed_author = True + else: + feed_author = False + + for item in self.items: + if not feed_author and not item.get('authors'): + if item.get('source') and item['source'].get('authors'): + pass + else: + raise ValidationError('if no feed author, all entries must have author (possibly in source)') + + if not validate_text_construct(item['title']): + raise ValidationError('entry title has invalid type') + if item.get('rights'): + if not validate_text_construct(item['rights']): + raise ValidationError('entry rights has invalid type') + if item.get('summary'): + if not validate_text_construct(item['summary']): + raise ValidationError('entry summary has invalid type') + source = item.get('source') + if source: + if source.get('title'): + if not validate_text_construct(source['title']): + raise ValidationError('source title has invalid type') + if source.get('subtitle'): + if not validate_text_construct(source['subtitle']): + raise ValidationError('source subtitle has invalid type') + if source.get('rights'): + if not validate_text_construct(source['rights']): + raise ValidationError('source rights has invalid type') + + alternate_links = {} + for link in item.get('links'): + if link.get('rel') == 'alternate' or link.get('rel') == None: + key = (link.get('type'), link.get('hreflang')) + if key in alternate_links: + raise ValidationError('alternate links must have unique type/hreflang') + alternate_links[key] = link + + if not item.get('content'): + if not alternate_links: + raise ValidationError('if no content, entry must have alternate link') + + if item.get('content') and isinstance(item.get('content'), tuple): + content_type = item.get('content')[0].get('type') + if item.get('content')[0].get('src'): + if item.get('content')[1]: + raise ValidationError('content with src should be empty') + if not item.get('summary'): + raise ValidationError('content with src requires a summary too') + if content_type in ['text', 'html', 'xhtml']: + raise ValidationError('content with src cannot have type of text, html or xhtml') + if content_type: + if '/' in content_type and \ + not content_type.startswith('text/') and \ + not content_type.endswith('/xml') and not content_type.endswith('+xml') and \ + not content_type in ['application/xml-external-parsed-entity', 'application/xml-dtd']: + # @@@ check content is Base64 + if not item.get('summary'): + raise ValidationError('content in Base64 requires a summary too') + if content_type not in ['text', 'html', 'xhtml'] and '/' not in content_type: + raise ValidationError('content type does not appear to be valid') + + # @@@ no validation is done that 'html' text constructs are valid HTML + # @@@ no validation is done that 'xhtml' text constructs are well-formed XML or valid XHTML + + return + + return + + + +class LegacySyndicationFeed(AtomFeed): + """ + Provides an SyndicationFeed-compatible interface in its __init__ and + add_item but is really a new AtomFeed object. + """ + + def __init__(self, title, link, description, language=None, author_email=None, + author_name=None, author_link=None, subtitle=None, categories=[], + feed_url=None, feed_copyright=None): + + atom_id = link + title = title + updated = None # will be calculated + rights = feed_copyright + subtitle = subtitle + author_dict = {'name': author_name} + if author_link: + author_dict['uri'] = author_uri + if author_email: + author_dict['email'] = author_email + authors = [author_dict] + if categories: + categories = [{'term': term} for term in categories] + links = [{'rel': 'alternate', 'href': link}] + if feed_url: + links.append({'rel': 'self', 'href': feed_url}) + if language: + extra_attrs = {'xml:lang': language} + else: + extra_attrs = {} + + # description ignored (as with Atom1Feed) + + AtomFeed.__init__(self, atom_id, title, updated, rights=rights, subtitle=subtitle, + authors=authors, categories=categories, links=links, extra_attrs=extra_attrs) + + + def add_item(self, title, link, description, author_email=None, + author_name=None, author_link=None, pubdate=None, comments=None, + unique_id=None, enclosure=None, categories=[], item_copyright=None): + + if unique_id: + atom_id = unique_id + else: + atom_id = get_tag_uri(link, pubdate) + title = title + updated = pubdate + if item_copyright: + rights = item_copyright + else: + rights = None + if description: + summary = 'html', description + else: + summary = None + author_dict = {'name': author_name} + if author_link: + author_dict['uri'] = author_uri + if author_email: + author_dict['email'] = author_email + authors = [author_dict] + categories = [{'term': term} for term in categories] + links = [{'rel': 'alternate', 'href': link}] + if enclosure: + links.append({'rel': 'enclosure', 'href': enclosure.url, 'length': enclosure.length, 'type': enclosure.mime_type}) + + AtomFeed.add_item(self, atom_id, title, updated, rights=rights, summary=summary, + authors=authors, categories=categories, links=links) diff --git a/diff_match_patch.py b/diff_match_patch.py new file mode 100755 index 0000000..6bd57da --- /dev/null +++ b/diff_match_patch.py @@ -0,0 +1,1855 @@ +#!/usr/bin/python2.4 + +"""Diff Match and Patch + +Copyright 2006 Google Inc. +http://code.google.com/p/google-diff-match-patch/ + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +"""Functions for diff, match and patch. + +Computes the difference between two texts to create a patch. +Applies the patch onto another text, allowing for errors. +""" + +__author__ = 'fraser@google.com (Neil Fraser)' + +import math +import time +import urllib +import re + +class diff_match_patch: + """Class containing the diff, match and patch methods. + + Also contains the behaviour settings. + """ + + def __init__(self): + """Inits a diff_match_patch object with default settings. + Redefine these in your program to override the defaults. + """ + + # Number of seconds to map a diff before giving up (0 for infinity). + self.Diff_Timeout = 1.0 + # Cost of an empty edit operation in terms of edit characters. + self.Diff_EditCost = 4 + # The size beyond which the double-ended diff activates. + # Double-ending is twice as fast, but less accurate. + self.Diff_DualThreshold = 32 + # At what point is no match declared (0.0 = perfection, 1.0 = very loose). + self.Match_Threshold = 0.5 + # How far to search for a match (0 = exact location, 1000+ = broad match). + # A match this many characters away from the expected location will add + # 1.0 to the score (0.0 is a perfect match). + self.Match_Distance = 1000 + # When deleting a large block of text (over ~64 characters), how close does + # the contents have to match the expected contents. (0.0 = perfection, + # 1.0 = very loose). Note that Match_Threshold controls how closely the + # end points of a delete need to match. + self.Patch_DeleteThreshold = 0.5 + # Chunk size for context length. + self.Patch_Margin = 4 + + # How many bits in a number? + # Python has no maximum, thus to disable patch splitting set to 0. + # However to avoid long patches in certain pathological cases, use 32. + # Multiple short patches (using native ints) are much faster than long ones. + self.Match_MaxBits = 32 + + # DIFF FUNCTIONS + + # The data structure representing a diff is an array of tuples: + # [(DIFF_DELETE, "Hello"), (DIFF_INSERT, "Goodbye"), (DIFF_EQUAL, " world.")] + # which means: delete "Hello", add "Goodbye" and keep " world." + DIFF_DELETE = -1 + DIFF_INSERT = 1 + DIFF_EQUAL = 0 + + def diff_main(self, text1, text2, checklines=True): + """Find the differences between two texts. Simplifies the problem by + stripping any common prefix or suffix off the texts before diffing. + + Args: + text1: Old string to be diffed. + text2: New string to be diffed. + checklines: Optional speedup flag. If present and false, then don't run + a line-level diff first to identify the changed areas. + Defaults to true, which does a faster, slightly less optimal diff. + + Returns: + Array of changes. + """ + + # Check for null inputs. + if text1 == None or text2 == None: + raise ValueError("Null inputs. (diff_main)") + + # Check for equality (speedup). + if text1 == text2: + return [(self.DIFF_EQUAL, text1)] + + # Trim off common prefix (speedup). + commonlength = self.diff_commonPrefix(text1, text2) + commonprefix = text1[:commonlength] + text1 = text1[commonlength:] + text2 = text2[commonlength:] + + # Trim off common suffix (speedup). + commonlength = self.diff_commonSuffix(text1, text2) + if commonlength == 0: + commonsuffix = '' + else: + commonsuffix = text1[-commonlength:] + text1 = text1[:-commonlength] + text2 = text2[:-commonlength] + + # Compute the diff on the middle block. + diffs = self.diff_compute(text1, text2, checklines) + + # Restore the prefix and suffix. + if commonprefix: + diffs[:0] = [(self.DIFF_EQUAL, commonprefix)] + if commonsuffix: + diffs.append((self.DIFF_EQUAL, commonsuffix)) + self.diff_cleanupMerge(diffs) + return diffs + + def diff_compute(self, text1, text2, checklines): + """Find the differences between two texts. Assumes that the texts do not + have any common prefix or suffix. + + Args: + text1: Old string to be diffed. + text2: New string to be diffed. + checklines: Speedup flag. If false, then don't run a line-level diff + first to identify the changed areas. + If true, then run a faster, slightly less optimal diff. + + Returns: + Array of changes. + """ + if not text1: + # Just add some text (speedup). + return [(self.DIFF_INSERT, text2)] + + if not text2: + # Just delete some text (speedup). + return [(self.DIFF_DELETE, text1)] + + if len(text1) > len(text2): + (longtext, shorttext) = (text1, text2) + else: + (shorttext, longtext) = (text1, text2) + i = longtext.find(shorttext) + if i != -1: + # Shorter text is inside the longer text (speedup). + diffs = [(self.DIFF_INSERT, longtext[:i]), (self.DIFF_EQUAL, shorttext), + (self.DIFF_INSERT, longtext[i + len(shorttext):])] + # Swap insertions for deletions if diff is reversed. + if len(text1) > len(text2): + diffs[0] = (self.DIFF_DELETE, diffs[0][1]) + diffs[2] = (self.DIFF_DELETE, diffs[2][1]) + return diffs + longtext = shorttext = None # Garbage collect. + + # Check to see if the problem can be split in two. + hm = self.diff_halfMatch(text1, text2) + if hm: + # A half-match was found, sort out the return data. + (text1_a, text1_b, text2_a, text2_b, mid_common) = hm + # Send both pairs off for separate processing. + diffs_a = self.diff_main(text1_a, text2_a, checklines) + diffs_b = self.diff_main(text1_b, text2_b, checklines) + # Merge the results. + return diffs_a + [(self.DIFF_EQUAL, mid_common)] + diffs_b + + # Perform a real diff. + if checklines and (len(text1) < 100 or len(text2) < 100): + checklines = False # Too trivial for the overhead. + if checklines: + # Scan the text on a line-by-line basis first. + (text1, text2, linearray) = self.diff_linesToChars(text1, text2) + + diffs = self.diff_map(text1, text2) + if not diffs: # No acceptable result. + diffs = [(self.DIFF_DELETE, text1), (self.DIFF_INSERT, text2)] + if checklines: + # Convert the diff back to original text. + self.diff_charsToLines(diffs, linearray) + # Eliminate freak matches (e.g. blank lines) + self.diff_cleanupSemantic(diffs) + + # Rediff any replacement blocks, this time character-by-character. + # Add a dummy entry at the end. + diffs.append((self.DIFF_EQUAL, '')) + pointer = 0 + count_delete = 0 + count_insert = 0 + text_delete = '' + text_insert = '' + while pointer < len(diffs): + if diffs[pointer][0] == self.DIFF_INSERT: + count_insert += 1 + text_insert += diffs[pointer][1] + elif diffs[pointer][0] == self.DIFF_DELETE: + count_delete += 1 + text_delete += diffs[pointer][1] + elif diffs[pointer][0] == self.DIFF_EQUAL: + # Upon reaching an equality, check for prior redundancies. + if count_delete >= 1 and count_insert >= 1: + # Delete the offending records and add the merged ones. + a = self.diff_main(text_delete, text_insert, False) + diffs[pointer - count_delete - count_insert : pointer] = a + pointer = pointer - count_delete - count_insert + len(a) + count_insert = 0 + count_delete = 0 + text_delete = '' + text_insert = '' + + pointer += 1 + + diffs.pop() # Remove the dummy entry at the end. + return diffs + + def diff_linesToChars(self, text1, text2): + """Split two texts into an array of strings. Reduce the texts to a string + of hashes where each Unicode character represents one line. + + Args: + text1: First string. + text2: Second string. + + Returns: + Three element tuple, containing the encoded text1, the encoded text2 and + the array of unique strings. The zeroth element of the array of unique + strings is intentionally blank. + """ + lineArray = [] # e.g. lineArray[4] == "Hello\n" + lineHash = {} # e.g. lineHash["Hello\n"] == 4 + + # "\x00" is a valid character, but various debuggers don't like it. + # So we'll insert a junk entry to avoid generating a null character. + lineArray.append('') + + def diff_linesToCharsMunge(text): + """Split a text into an array of strings. Reduce the texts to a string + of hashes where each Unicode character represents one line. + Modifies linearray and linehash through being a closure. + + Args: + text: String to encode. + + Returns: + Encoded string. + """ + chars = [] + # Walk the text, pulling out a substring for each line. + # text.split('\n') would would temporarily double our memory footprint. + # Modifying text would create many large strings to garbage collect. + lineStart = 0 + lineEnd = -1 + while lineEnd < len(text) - 1: + lineEnd = text.find('\n', lineStart) + if lineEnd == -1: + lineEnd = len(text) - 1 + line = text[lineStart:lineEnd + 1] + lineStart = lineEnd + 1 + + if line in lineHash: + chars.append(unichr(lineHash[line])) + else: + lineArray.append(line) + lineHash[line] = len(lineArray) - 1 + chars.append(unichr(len(lineArray) - 1)) + return "".join(chars) + + chars1 = diff_linesToCharsMunge(text1) + chars2 = diff_linesToCharsMunge(text2) + return (chars1, chars2, lineArray) + + def diff_charsToLines(self, diffs, lineArray): + """Rehydrate the text in a diff from a string of line hashes to real lines + of text. + + Args: + diffs: Array of diff tuples. + lineArray: Array of unique strings. + """ + for x in xrange(len(diffs)): + text = [] + for char in diffs[x][1]: + text.append(lineArray[ord(char)]) + diffs[x] = (diffs[x][0], "".join(text)) + + def diff_map(self, text1, text2): + """Explore the intersection points between the two texts. + + Args: + text1: Old string to be diffed. + text2: New string to be diffed. + + Returns: + Array of diff tuples or None if no diff available. + """ + + # Unlike in most languages, Python counts time in seconds. + s_end = time.time() + self.Diff_Timeout # Don't run for too long. + # Cache the text lengths to prevent multiple calls. + text1_length = len(text1) + text2_length = len(text2) + max_d = text1_length + text2_length - 1 + doubleEnd = self.Diff_DualThreshold * 2 < max_d + v_map1 = [] + v_map2 = [] + v1 = {} + v2 = {} + v1[1] = 0 + v2[1] = 0 + footsteps = {} + done = False + # If the total number of characters is odd, then the front path will + # collide with the reverse path. + front = (text1_length + text2_length) % 2 + for d in xrange(max_d): + # Bail out if timeout reached. + if self.Diff_Timeout > 0 and time.time() > s_end: + return None + + # Walk the front path one step. + v_map1.append({}) + for k in xrange(-d, d + 1, 2): + if k == -d or k != d and v1[k - 1] < v1[k + 1]: + x = v1[k + 1] + else: + x = v1[k - 1] + 1 + y = x - k + if doubleEnd: + footstep = (x, y) + if front and footstep in footsteps: + done = True + if not front: + footsteps[footstep] = d + + while (not done and x < text1_length and y < text2_length and + text1[x] == text2[y]): + x += 1 + y += 1 + if doubleEnd: + footstep = (x, y) + if front and footstep in footsteps: + done = True + if not front: + footsteps[footstep] = d + + v1[k] = x + v_map1[d][(x, y)] = True + if x == text1_length and y == text2_length: + # Reached the end in single-path mode. + return self.diff_path1(v_map1, text1, text2) + elif done: + # Front path ran over reverse path. + v_map2 = v_map2[:footsteps[footstep] + 1] + a = self.diff_path1(v_map1, text1[:x], text2[:y]) + b = self.diff_path2(v_map2, text1[x:], text2[y:]) + return a + b + + if doubleEnd: + # Walk the reverse path one step. + v_map2.append({}) + for k in xrange(-d, d + 1, 2): + if k == -d or k != d and v2[k - 1] < v2[k + 1]: + x = v2[k + 1] + else: + x = v2[k - 1] + 1 + y = x - k + footstep = (text1_length - x, text2_length - y) + if not front and footstep in footsteps: + done = True + if front: + footsteps[footstep] = d + while (not done and x < text1_length and y < text2_length and + text1[-x - 1] == text2[-y - 1]): + x += 1 + y += 1 + footstep = (text1_length - x, text2_length - y) + if not front and footstep in footsteps: + done = True + if front: + footsteps[footstep] = d + + v2[k] = x + v_map2[d][(x, y)] = True + if done: + # Reverse path ran over front path. + v_map1 = v_map1[:footsteps[footstep] + 1] + a = self.diff_path1(v_map1, text1[:text1_length - x], + text2[:text2_length - y]) + b = self.diff_path2(v_map2, text1[text1_length - x:], + text2[text2_length - y:]) + return a + b + + # Number of diffs equals number of characters, no commonality at all. + return None + + def diff_path1(self, v_map, text1, text2): + """Work from the middle back to the start to determine the path. + + Args: + v_map: Array of paths. + text1: Old string fragment to be diffed. + text2: New string fragment to be diffed. + + Returns: + Array of diff tuples. + """ + path = [] + x = len(text1) + y = len(text2) + last_op = None + for d in xrange(len(v_map) - 2, -1, -1): + while True: + if (x - 1, y) in v_map[d]: + x -= 1 + if last_op == self.DIFF_DELETE: + path[0] = (self.DIFF_DELETE, text1[x] + path[0][1]) + else: + path[:0] = [(self.DIFF_DELETE, text1[x])] + last_op = self.DIFF_DELETE + break + elif (x, y - 1) in v_map[d]: + y -= 1 + if last_op == self.DIFF_INSERT: + path[0] = (self.DIFF_INSERT, text2[y] + path[0][1]) + else: + path[:0] = [(self.DIFF_INSERT, text2[y])] + last_op = self.DIFF_INSERT + break + else: + x -= 1 + y -= 1 + assert text1[x] == text2[y], ("No diagonal. " + + "Can't happen. (diff_path1)") + if last_op == self.DIFF_EQUAL: + path[0] = (self.DIFF_EQUAL, text1[x] + path[0][1]) + else: + path[:0] = [(self.DIFF_EQUAL, text1[x])] + last_op = self.DIFF_EQUAL + return path + + def diff_path2(self, v_map, text1, text2): + """Work from the middle back to the end to determine the path. + + Args: + v_map: Array of paths. + text1: Old string fragment to be diffed. + text2: New string fragment to be diffed. + + Returns: + Array of diff tuples. + """ + path = [] + x = len(text1) + y = len(text2) + last_op = None + for d in xrange(len(v_map) - 2, -1, -1): + while True: + if (x - 1, y) in v_map[d]: + x -= 1 + if last_op == self.DIFF_DELETE: + path[-1] = (self.DIFF_DELETE, path[-1][1] + text1[-x - 1]) + else: + path.append((self.DIFF_DELETE, text1[-x - 1])) + last_op = self.DIFF_DELETE + break + elif (x, y - 1) in v_map[d]: + y -= 1 + if last_op == self.DIFF_INSERT: + path[-1] = (self.DIFF_INSERT, path[-1][1] + text2[-y - 1]) + else: + path.append((self.DIFF_INSERT, text2[-y - 1])) + last_op = self.DIFF_INSERT + break + else: + x -= 1 + y -= 1 + assert text1[-x - 1] == text2[-y - 1], ("No diagonal. " + + "Can't happen. (diff_path2)") + if last_op == self.DIFF_EQUAL: + path[-1] = (self.DIFF_EQUAL, path[-1][1] + text1[-x - 1]) + else: + path.append((self.DIFF_EQUAL, text1[-x - 1])) + last_op = self.DIFF_EQUAL + return path + + def diff_commonPrefix(self, text1, text2): + """Determine the common prefix of two strings. + + Args: + text1: First string. + text2: Second string. + + Returns: + The number of characters common to the start of each string. + """ + # Quick check for common null cases. + if not text1 or not text2 or text1[0] != text2[0]: + return 0 + # Binary search. + # Performance analysis: http://neil.fraser.name/news/2007/10/09/ + pointermin = 0 + pointermax = min(len(text1), len(text2)) + pointermid = pointermax + pointerstart = 0 + while pointermin < pointermid: + if text1[pointerstart:pointermid] == text2[pointerstart:pointermid]: + pointermin = pointermid + pointerstart = pointermin + else: + pointermax = pointermid + pointermid = int((pointermax - pointermin) / 2 + pointermin) + return pointermid + + def diff_commonSuffix(self, text1, text2): + """Determine the common suffix of two strings. + + Args: + text1: First string. + text2: Second string. + + Returns: + The number of characters common to the end of each string. + """ + # Quick check for common null cases. + if not text1 or not text2 or text1[-1] != text2[-1]: + return 0 + # Binary search. + # Performance analysis: http://neil.fraser.name/news/2007/10/09/ + pointermin = 0 + pointermax = min(len(text1), len(text2)) + pointermid = pointermax + pointerend = 0 + while pointermin < pointermid: + if (text1[-pointermid:len(text1) - pointerend] == + text2[-pointermid:len(text2) - pointerend]): + pointermin = pointermid + pointerend = pointermin + else: + pointermax = pointermid + pointermid = int((pointermax - pointermin) / 2 + pointermin) + return pointermid + + def diff_halfMatch(self, text1, text2): + """Do the two texts share a substring which is at least half the length of + the longer text? + + Args: + text1: First string. + text2: Second string. + + Returns: + Five element Array, containing the prefix of text1, the suffix of text1, + the prefix of text2, the suffix of text2 and the common middle. Or None + if there was no match. + """ + if len(text1) > len(text2): + (longtext, shorttext) = (text1, text2) + else: + (shorttext, longtext) = (text1, text2) + if len(longtext) < 10 or len(shorttext) < 1: + return None # Pointless. + + def diff_halfMatchI(longtext, shorttext, i): + """Does a substring of shorttext exist within longtext such that the + substring is at least half the length of longtext? + Closure, but does not reference any external variables. + + Args: + longtext: Longer string. + shorttext: Shorter string. + i: Start index of quarter length substring within longtext. + + Returns: + Five element Array, containing the prefix of longtext, the suffix of + longtext, the prefix of shorttext, the suffix of shorttext and the + common middle. Or None if there was no match. + """ + seed = longtext[i:i + len(longtext) / 4] + best_common = '' + j = shorttext.find(seed) + while j != -1: + prefixLength = self.diff_commonPrefix(longtext[i:], shorttext[j:]) + suffixLength = self.diff_commonSuffix(longtext[:i], shorttext[:j]) + if len(best_common) < suffixLength + prefixLength: + best_common = (shorttext[j - suffixLength:j] + + shorttext[j:j + prefixLength]) + best_longtext_a = longtext[:i - suffixLength] + best_longtext_b = longtext[i + prefixLength:] + best_shorttext_a = shorttext[:j - suffixLength] + best_shorttext_b = shorttext[j + prefixLength:] + j = shorttext.find(seed, j + 1) + + if len(best_common) >= len(longtext) / 2: + return (best_longtext_a, best_longtext_b, + best_shorttext_a, best_shorttext_b, best_common) + else: + return None + + # First check if the second quarter is the seed for a half-match. + hm1 = diff_halfMatchI(longtext, shorttext, (len(longtext) + 3) / 4) + # Check again based on the third quarter. + hm2 = diff_halfMatchI(longtext, shorttext, (len(longtext) + 1) / 2) + if not hm1 and not hm2: + return None + elif not hm2: + hm = hm1 + elif not hm1: + hm = hm2 + else: + # Both matched. Select the longest. + if len(hm1[4]) > len(hm2[4]): + hm = hm1 + else: + hm = hm2 + + # A half-match was found, sort out the return data. + if len(text1) > len(text2): + (text1_a, text1_b, text2_a, text2_b, mid_common) = hm + else: + (text2_a, text2_b, text1_a, text1_b, mid_common) = hm + return (text1_a, text1_b, text2_a, text2_b, mid_common) + + def diff_cleanupSemantic(self, diffs): + """Reduce the number of edits by eliminating semantically trivial + equalities. + + Args: + diffs: Array of diff tuples. + """ + changes = False + equalities = [] # Stack of indices where equalities are found. + lastequality = None # Always equal to equalities[-1][1] + pointer = 0 # Index of current position. + length_changes1 = 0 # Number of chars that changed prior to the equality. + length_changes2 = 0 # Number of chars that changed after the equality. + while pointer < len(diffs): + if diffs[pointer][0] == self.DIFF_EQUAL: # equality found + equalities.append(pointer) + length_changes1 = length_changes2 + length_changes2 = 0 + lastequality = diffs[pointer][1] + else: # an insertion or deletion + length_changes2 += len(diffs[pointer][1]) + if (lastequality != None and (len(lastequality) <= length_changes1) and + (len(lastequality) <= length_changes2)): + # Duplicate record + diffs.insert(equalities[-1], (self.DIFF_DELETE, lastequality)) + # Change second copy to insert. + diffs[equalities[-1] + 1] = (self.DIFF_INSERT, + diffs[equalities[-1] + 1][1]) + # Throw away the equality we just deleted. + equalities.pop() + # Throw away the previous equality (it needs to be reevaluated). + if len(equalities) != 0: + equalities.pop() + if len(equalities): + pointer = equalities[-1] + else: + pointer = -1 + length_changes1 = 0 # Reset the counters. + length_changes2 = 0 + lastequality = None + changes = True + pointer += 1 + + if changes: + self.diff_cleanupMerge(diffs) + + self.diff_cleanupSemanticLossless(diffs) + + def diff_cleanupSemanticLossless(self, diffs): + """Look for single edits surrounded on both sides by equalities + which can be shifted sideways to align the edit to a word boundary. + e.g: The c<ins>at c</ins>ame. -> The <ins>cat </ins>came. + + Args: + diffs: Array of diff tuples. + """ + + def diff_cleanupSemanticScore(one, two): + """Given two strings, compute a score representing whether the + internal boundary falls on logical boundaries. + Scores range from 5 (best) to 0 (worst). + Closure, but does not reference any external variables. + + Args: + one: First string. + two: Second string. + + Returns: + The score. + """ + if not one or not two: + # Edges are the best. + return 5 + + # Each port of this function behaves slightly differently due to + # subtle differences in each language's definition of things like + # 'whitespace'. Since this function's purpose is largely cosmetic, + # the choice has been made to use each language's native features + # rather than force total conformity. + score = 0 + # One point for non-alphanumeric. + if not one[-1].isalnum() or not two[0].isalnum(): + score += 1 + # Two points for whitespace. + if one[-1].isspace() or two[0].isspace(): + score += 1 + # Three points for line breaks. + if (one[-1] == "\r" or one[-1] == "\n" or + two[0] == "\r" or two[0] == "\n"): + score += 1 + # Four points for blank lines. + if (re.search("\\n\\r?\\n$", one) or + re.match("^\\r?\\n\\r?\\n", two)): + score += 1 + return score + + pointer = 1 + # Intentionally ignore the first and last element (don't need checking). + while pointer < len(diffs) - 1: + if (diffs[pointer - 1][0] == self.DIFF_EQUAL and + diffs[pointer + 1][0] == self.DIFF_EQUAL): + # This is a single edit surrounded by equalities. + equality1 = diffs[pointer - 1][1] + edit = diffs[pointer][1] + equality2 = diffs[pointer + 1][1] + + # First, shift the edit as far left as possible. + commonOffset = self.diff_commonSuffix(equality1, edit) + if commonOffset: + commonString = edit[-commonOffset:] + equality1 = equality1[:-commonOffset] + edit = commonString + edit[:-commonOffset] + equality2 = commonString + equality2 + + # Second, step character by character right, looking for the best fit. + bestEquality1 = equality1 + bestEdit = edit + bestEquality2 = equality2 + bestScore = (diff_cleanupSemanticScore(equality1, edit) + + diff_cleanupSemanticScore(edit, equality2)) + while edit and equality2 and edit[0] == equality2[0]: + equality1 += edit[0] + edit = edit[1:] + equality2[0] + equality2 = equality2[1:] + score = (diff_cleanupSemanticScore(equality1, edit) + + diff_cleanupSemanticScore(edit, equality2)) + # The >= encourages trailing rather than leading whitespace on edits. + if score >= bestScore: + bestScore = score + bestEquality1 = equality1 + bestEdit = edit + bestEquality2 = equality2 + + if diffs[pointer - 1][1] != bestEquality1: + # We have an improvement, save it back to the diff. + if bestEquality1: + diffs[pointer - 1] = (diffs[pointer - 1][0], bestEquality1) + else: + del diffs[pointer - 1] + pointer -= 1 + diffs[pointer] = (diffs[pointer][0], bestEdit) + if bestEquality2: + diffs[pointer + 1] = (diffs[pointer + 1][0], bestEquality2) + else: + del diffs[pointer + 1] + pointer -= 1 + pointer += 1 + + def diff_cleanupEfficiency(self, diffs): + """Reduce the number of edits by eliminating operationally trivial + equalities. + + Args: + diffs: Array of diff tuples. + """ + changes = False + equalities = [] # Stack of indices where equalities are found. + lastequality = '' # Always equal to equalities[-1][1] + pointer = 0 # Index of current position. + pre_ins = False # Is there an insertion operation before the last equality. + pre_del = False # Is there a deletion operation before the last equality. + post_ins = False # Is there an insertion operation after the last equality. + post_del = False # Is there a deletion operation after the last equality. + while pointer < len(diffs): + if diffs[pointer][0] == self.DIFF_EQUAL: # equality found + if (len(diffs[pointer][1]) < self.Diff_EditCost and + (post_ins or post_del)): + # Candidate found. + equalities.append(pointer) + pre_ins = post_ins + pre_del = post_del + lastequality = diffs[pointer][1] + else: + # Not a candidate, and can never become one. + equalities = [] + lastequality = '' + + post_ins = post_del = False + else: # an insertion or deletion + if diffs[pointer][0] == self.DIFF_DELETE: + post_del = True + else: + post_ins = True + + # Five types to be split: + # <ins>A</ins><del>B</del>XY<ins>C</ins><del>D</del> + # <ins>A</ins>X<ins>C</ins><del>D</del> + # <ins>A</ins><del>B</del>X<ins>C</ins> + # <ins>A</del>X<ins>C</ins><del>D</del> + # <ins>A</ins><del>B</del>X<del>C</del> + + if lastequality and ((pre_ins and pre_del and post_ins and post_del) or + ((len(lastequality) < self.Diff_EditCost / 2) and + (pre_ins + pre_del + post_ins + post_del) == 3)): + # Duplicate record + diffs.insert(equalities[-1], (self.DIFF_DELETE, lastequality)) + # Change second copy to insert. + diffs[equalities[-1] + 1] = (self.DIFF_INSERT, + diffs[equalities[-1] + 1][1]) + equalities.pop() # Throw away the equality we just deleted + lastequality = '' + if pre_ins and pre_del: + # No changes made which could affect previous entry, keep going. + post_ins = post_del = True + equalities = [] + else: + if len(equalities): + equalities.pop() # Throw away the previous equality + if len(equalities): + pointer = equalities[-1] + else: + pointer = -1 + post_ins = post_del = False + changes = True + pointer += 1 + + if changes: + self.diff_cleanupMerge(diffs) + + def diff_cleanupMerge(self, diffs): + """Reorder and merge like edit sections. Merge equalities. + Any edit section can move as long as it doesn't cross an equality. + + Args: + diffs: Array of diff tuples. + """ + diffs.append((self.DIFF_EQUAL, '')) # Add a dummy entry at the end. + pointer = 0 + count_delete = 0 + count_insert = 0 + text_delete = '' + text_insert = '' + while pointer < len(diffs): + if diffs[pointer][0] == self.DIFF_INSERT: + count_insert += 1 + text_insert += diffs[pointer][1] + pointer += 1 + elif diffs[pointer][0] == self.DIFF_DELETE: + count_delete += 1 + text_delete += diffs[pointer][1] + pointer += 1 + elif diffs[pointer][0] == self.DIFF_EQUAL: + # Upon reaching an equality, check for prior redundancies. + if count_delete != 0 or count_insert != 0: + if count_delete != 0 and count_insert != 0: + # Factor out any common prefixies. + commonlength = self.diff_commonPrefix(text_insert, text_delete) + if commonlength != 0: + x = pointer - count_delete - count_insert - 1 + if x >= 0 and diffs[x][0] == self.DIFF_EQUAL: + diffs[x] = (diffs[x][0], diffs[x][1] + + text_insert[:commonlength]) + else: + diffs.insert(0, (self.DIFF_EQUAL, text_insert[:commonlength])) + pointer += 1 + text_insert = text_insert[commonlength:] + text_delete = text_delete[commonlength:] + # Factor out any common suffixies. + commonlength = self.diff_commonSuffix(text_insert, text_delete) + if commonlength != 0: + diffs[pointer] = (diffs[pointer][0], text_insert[-commonlength:] + + diffs[pointer][1]) + text_insert = text_insert[:-commonlength] + text_delete = text_delete[:-commonlength] + # Delete the offending records and add the merged ones. + if count_delete == 0: + diffs[pointer - count_insert : pointer] = [ + (self.DIFF_INSERT, text_insert)] + elif count_insert == 0: + diffs[pointer - count_delete : pointer] = [ + (self.DIFF_DELETE, text_delete)] + else: + diffs[pointer - count_delete - count_insert : pointer] = [ + (self.DIFF_DELETE, text_delete), + (self.DIFF_INSERT, text_insert)] + pointer = pointer - count_delete - count_insert + 1 + if count_delete != 0: + pointer += 1 + if count_insert != 0: + pointer += 1 + elif pointer != 0 and diffs[pointer - 1][0] == self.DIFF_EQUAL: + # Merge this equality with the previous one. + diffs[pointer - 1] = (diffs[pointer - 1][0], + diffs[pointer - 1][1] + diffs[pointer][1]) + del diffs[pointer] + else: + pointer += 1 + + count_insert = 0 + count_delete = 0 + text_delete = '' + text_insert = '' + + if diffs[-1][1] == '': + diffs.pop() # Remove the dummy entry at the end. + + # Second pass: look for single edits surrounded on both sides by equalities + # which can be shifted sideways to eliminate an equality. + # e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC + changes = False + pointer = 1 + # Intentionally ignore the first and last element (don't need checking). + while pointer < len(diffs) - 1: + if (diffs[pointer - 1][0] == self.DIFF_EQUAL and + diffs[pointer + 1][0] == self.DIFF_EQUAL): + # This is a single edit surrounded by equalities. + if diffs[pointer][1].endswith(diffs[pointer - 1][1]): + # Shift the edit over the previous equality. + diffs[pointer] = (diffs[pointer][0], + diffs[pointer - 1][1] + + diffs[pointer][1][:-len(diffs[pointer - 1][1])]) + diffs[pointer + 1] = (diffs[pointer + 1][0], + diffs[pointer - 1][1] + diffs[pointer + 1][1]) + del diffs[pointer - 1] + changes = True + elif diffs[pointer][1].startswith(diffs[pointer + 1][1]): + # Shift the edit over the next equality. + diffs[pointer - 1] = (diffs[pointer - 1][0], + diffs[pointer - 1][1] + diffs[pointer + 1][1]) + diffs[pointer] = (diffs[pointer][0], + diffs[pointer][1][len(diffs[pointer + 1][1]):] + + diffs[pointer + 1][1]) + del diffs[pointer + 1] + changes = True + pointer += 1 + + # If shifts were made, the diff needs reordering and another shift sweep. + if changes: + self.diff_cleanupMerge(diffs) + + def diff_xIndex(self, diffs, loc): + """loc is a location in text1, compute and return the equivalent location + in text2. e.g. "The cat" vs "The big cat", 1->1, 5->8 + + Args: + diffs: Array of diff tuples. + loc: Location within text1. + + Returns: + Location within text2. + """ + chars1 = 0 + chars2 = 0 + last_chars1 = 0 + last_chars2 = 0 + for x in xrange(len(diffs)): + (op, text) = diffs[x] + if op != self.DIFF_INSERT: # Equality or deletion. + chars1 += len(text) + if op != self.DIFF_DELETE: # Equality or insertion. + chars2 += len(text) + if chars1 > loc: # Overshot the location. + break + last_chars1 = chars1 + last_chars2 = chars2 + + if len(diffs) != x and diffs[x][0] == self.DIFF_DELETE: + # The location was deleted. + return last_chars2 + # Add the remaining len(character). + return last_chars2 + (loc - last_chars1) + + def diff_prettyHtml(self, diffs): + """Convert a diff array into a pretty HTML report. + + Args: + diffs: Array of diff tuples. + + Returns: + HTML representation. + """ + html = [] + i = 0 + for (op, data) in diffs: + text = (data.replace("&", "&amp;").replace("<", "&lt;") + .replace(">", "&gt;").replace("\n", "&para;<BR>")) + if op == self.DIFF_INSERT: + html.append("<INS STYLE=\"background:#E6FFE6;\" TITLE=\"i=%i\">%s</INS>" + % (i, text)) + elif op == self.DIFF_DELETE: + html.append("<DEL STYLE=\"background:#FFE6E6;\" TITLE=\"i=%i\">%s</DEL>" + % (i, text)) + elif op == self.DIFF_EQUAL: + html.append("<SPAN TITLE=\"i=%i\">%s</SPAN>" % (i, text)) + if op != self.DIFF_DELETE: + i += len(data) + return "".join(html) + + def diff_text1(self, diffs): + """Compute and return the source text (all equalities and deletions). + + Args: + diffs: Array of diff tuples. + + Returns: + Source text. + """ + text = [] + for (op, data) in diffs: + if op != self.DIFF_INSERT: + text.append(data) + return "".join(text) + + def diff_text2(self, diffs): + """Compute and return the destination text (all equalities and insertions). + + Args: + diffs: Array of diff tuples. + + Returns: + Destination text. + """ + text = [] + for (op, data) in diffs: + if op != self.DIFF_DELETE: + text.append(data) + return "".join(text) + + def diff_levenshtein(self, diffs): + """Compute the Levenshtein distance; the number of inserted, deleted or + substituted characters. + + Args: + diffs: Array of diff tuples. + + Returns: + Number of changes. + """ + levenshtein = 0 + insertions = 0 + deletions = 0 + for (op, data) in diffs: + if op == self.DIFF_INSERT: + insertions += len(data) + elif op == self.DIFF_DELETE: + deletions += len(data) + elif op == self.DIFF_EQUAL: + # A deletion and an insertion is one substitution. + levenshtein += max(insertions, deletions) + insertions = 0 + deletions = 0 + levenshtein += max(insertions, deletions) + return levenshtein + + def diff_toDelta(self, diffs): + """Crush the diff into an encoded string which describes the operations + required to transform text1 into text2. + E.g. =3\t-2\t+ing -> Keep 3 chars, delete 2 chars, insert 'ing'. + Operations are tab-separated. Inserted text is escaped using %xx notation. + + Args: + diffs: Array of diff tuples. + + Returns: + Delta text. + """ + text = [] + for (op, data) in diffs: + if op == self.DIFF_INSERT: + # High ascii will raise UnicodeDecodeError. Use Unicode instead. + data = data.encode("utf-8") + text.append("+" + urllib.quote(data, "!~*'();/?:@&=+$,# ")) + elif op == self.DIFF_DELETE: + text.append("-%d" % len(data)) + elif op == self.DIFF_EQUAL: + text.append("=%d" % len(data)) + return "\t".join(text) + + def diff_fromDelta(self, text1, delta): + """Given the original text1, and an encoded string which describes the + operations required to transform text1 into text2, compute the full diff. + + Args: + text1: Source string for the diff. + delta: Delta text. + + Returns: + Array of diff tuples. + + Raises: + ValueError: If invalid input. + """ + if type(delta) == unicode: + # Deltas should be composed of a subset of ascii chars, Unicode not + # required. If this encode raises UnicodeEncodeError, delta is invalid. + delta = delta.encode("ascii") + diffs = [] + pointer = 0 # Cursor in text1 + tokens = delta.split("\t") + for token in tokens: + if token == "": + # Blank tokens are ok (from a trailing \t). + continue + # Each token begins with a one character parameter which specifies the + # operation of this token (delete, insert, equality). + param = token[1:] + if token[0] == "+": + param = urllib.unquote(param).decode("utf-8") + diffs.append((self.DIFF_INSERT, param)) + elif token[0] == "-" or token[0] == "=": + try: + n = int(param) + except ValueError: + raise ValueError("Invalid number in diff_fromDelta: " + param) + if n < 0: + raise ValueError("Negative number in diff_fromDelta: " + param) + text = text1[pointer : pointer + n] + pointer += n + if token[0] == "=": + diffs.append((self.DIFF_EQUAL, text)) + else: + diffs.append((self.DIFF_DELETE, text)) + else: + # Anything else is an error. + raise ValueError("Invalid diff operation in diff_fromDelta: " + + token[0]) + if pointer != len(text1): + raise ValueError( + "Delta length (%d) does not equal source text length (%d)." % + (pointer, len(text1))) + return diffs + + # MATCH FUNCTIONS + + def match_main(self, text, pattern, loc): + """Locate the best instance of 'pattern' in 'text' near 'loc'. + + Args: + text: The text to search. + pattern: The pattern to search for. + loc: The location to search around. + + Returns: + Best match index or -1. + """ + # Check for null inputs. + if text == None or pattern == None: + raise ValueError("Null inputs. (match_main)") + + loc = max(0, min(loc, len(text))) + if text == pattern: + # Shortcut (potentially not guaranteed by the algorithm) + return 0 + elif not text: + # Nothing to match. + return -1 + elif text[loc:loc + len(pattern)] == pattern: + # Perfect match at the perfect spot! (Includes case of null pattern) + return loc + else: + # Do a fuzzy compare. + match = self.match_bitap(text, pattern, loc) + return match + + def match_bitap(self, text, pattern, loc): + """Locate the best instance of 'pattern' in 'text' near 'loc' using the + Bitap algorithm. + + Args: + text: The text to search. + pattern: The pattern to search for. + loc: The location to search around. + + Returns: + Best match index or -1. + """ + # Python doesn't have a maxint limit, so ignore this check. + #if self.Match_MaxBits != 0 and len(pattern) > self.Match_MaxBits: + # raise ValueError("Pattern too long for this application.") + + # Initialise the alphabet. + s = self.match_alphabet(pattern) + + def match_bitapScore(e, x): + """Compute and return the score for a match with e errors and x location. + Accesses loc and pattern through being a closure. + + Args: + e: Number of errors in match. + x: Location of match. + + Returns: + Overall score for match (0.0 = good, 1.0 = bad). + """ + accuracy = float(e) / len(pattern) + proximity = abs(loc - x) + if not self.Match_Distance: + # Dodge divide by zero error. + return proximity and 1.0 or accuracy + return accuracy + (proximity / float(self.Match_Distance)) + + # Highest score beyond which we give up. + score_threshold = self.Match_Threshold + # Is there a nearby exact match? (speedup) + best_loc = text.find(pattern, loc) + if best_loc != -1: + score_threshold = min(match_bitapScore(0, best_loc), score_threshold) + # What about in the other direction? (speedup) + best_loc = text.rfind(pattern, loc + len(pattern)) + if best_loc != -1: + score_threshold = min(match_bitapScore(0, best_loc), score_threshold) + + # Initialise the bit arrays. + matchmask = 1 << (len(pattern) - 1) + best_loc = -1 + + bin_max = len(pattern) + len(text) + # Empty initialization added to appease pychecker. + last_rd = None + for d in xrange(len(pattern)): + # Scan for the best match each iteration allows for one more error. + # Run a binary search to determine how far from 'loc' we can stray at + # this error level. + bin_min = 0 + bin_mid = bin_max + while bin_min < bin_mid: + if match_bitapScore(d, loc + bin_mid) <= score_threshold: + bin_min = bin_mid + else: + bin_max = bin_mid + bin_mid = (bin_max - bin_min) / 2 + bin_min + + # Use the result from this iteration as the maximum for the next. + bin_max = bin_mid + start = max(1, loc - bin_mid + 1) + finish = min(loc + bin_mid, len(text)) + len(pattern) + + rd = range(finish + 1) + rd.append((1 << d) - 1) + for j in xrange(finish, start - 1, -1): + if len(text) <= j - 1: + # Out of range. + charMatch = 0 + else: + charMatch = s.get(text[j - 1], 0) + if d == 0: # First pass: exact match. + rd[j] = ((rd[j + 1] << 1) | 1) & charMatch + else: # Subsequent passes: fuzzy match. + rd[j] = ((rd[j + 1] << 1) | 1) & charMatch | ( + ((last_rd[j + 1] | last_rd[j]) << 1) | 1) | last_rd[j + 1] + if rd[j] & matchmask: + score = match_bitapScore(d, j - 1) + # This match will almost certainly be better than any existing match. + # But check anyway. + if score <= score_threshold: + # Told you so. + score_threshold = score + best_loc = j - 1 + if best_loc > loc: + # When passing loc, don't exceed our current distance from loc. + start = max(1, 2 * loc - best_loc) + else: + # Already passed loc, downhill from here on in. + break + # No hope for a (better) match at greater error levels. + if match_bitapScore(d + 1, loc) > score_threshold: + break + last_rd = rd + return best_loc + + def match_alphabet(self, pattern): + """Initialise the alphabet for the Bitap algorithm. + + Args: + pattern: The text to encode. + + Returns: + Hash of character locations. + """ + s = {} + for char in pattern: + s[char] = 0 + for i in xrange(len(pattern)): + s[pattern[i]] |= 1 << (len(pattern) - i - 1) + return s + + # PATCH FUNCTIONS + + def patch_addContext(self, patch, text): + """Increase the context until it is unique, + but don't let the pattern expand beyond Match_MaxBits. + + Args: + patch: The patch to grow. + text: Source text. + """ + if len(text) == 0: + return + pattern = text[patch.start2 : patch.start2 + patch.length1] + padding = 0 + + # Look for the first and last matches of pattern in text. If two different + # matches are found, increase the pattern length. + while (text.find(pattern) != text.rfind(pattern) and (self.Match_MaxBits == + 0 or len(pattern) < self.Match_MaxBits - self.Patch_Margin - + self.Patch_Margin)): + padding += self.Patch_Margin + pattern = text[max(0, patch.start2 - padding) : + patch.start2 + patch.length1 + padding] + # Add one chunk for good luck. + padding += self.Patch_Margin + + # Add the prefix. + prefix = text[max(0, patch.start2 - padding) : patch.start2] + if prefix: + patch.diffs[:0] = [(self.DIFF_EQUAL, prefix)] + # Add the suffix. + suffix = text[patch.start2 + patch.length1 : + patch.start2 + patch.length1 + padding] + if suffix: + patch.diffs.append((self.DIFF_EQUAL, suffix)) + + # Roll back the start points. + patch.start1 -= len(prefix) + patch.start2 -= len(prefix) + # Extend lengths. + patch.length1 += len(prefix) + len(suffix) + patch.length2 += len(prefix) + len(suffix) + + def patch_make(self, a, b=None, c=None): + """Compute a list of patches to turn text1 into text2. + Use diffs if provided, otherwise compute it ourselves. + There are four ways to call this function, depending on what data is + available to the caller: + Method 1: + a = text1, b = text2 + Method 2: + a = diffs + Method 3 (optimal): + a = text1, b = diffs + Method 4 (deprecated, use method 3): + a = text1, b = text2, c = diffs + + Args: + a: text1 (methods 1,3,4) or Array of diff tuples for text1 to + text2 (method 2). + b: text2 (methods 1,4) or Array of diff tuples for text1 to + text2 (method 3) or undefined (method 2). + c: Array of diff tuples for text1 to text2 (method 4) or + undefined (methods 1,2,3). + + Returns: + Array of patch objects. + """ + text1 = None + diffs = None + # Note that texts may arrive as 'str' or 'unicode'. + if isinstance(a, basestring) and isinstance(b, basestring) and c is None: + # Method 1: text1, text2 + # Compute diffs from text1 and text2. + text1 = a + diffs = self.diff_main(text1, b, True) + if len(diffs) > 2: + self.diff_cleanupSemantic(diffs) + self.diff_cleanupEfficiency(diffs) + elif isinstance(a, list) and b is None and c is None: + # Method 2: diffs + # Compute text1 from diffs. + diffs = a + text1 = self.diff_text1(diffs) + elif isinstance(a, basestring) and isinstance(b, list) and c is None: + # Method 3: text1, diffs + text1 = a + diffs = b + elif (isinstance(a, basestring) and isinstance(b, basestring) and + isinstance(c, list)): + # Method 4: text1, text2, diffs + # text2 is not used. + text1 = a + diffs = c + else: + raise ValueError("Unknown call format to patch_make.") + + if not diffs: + return [] # Get rid of the None case. + patches = [] + patch = patch_obj() + char_count1 = 0 # Number of characters into the text1 string. + char_count2 = 0 # Number of characters into the text2 string. + prepatch_text = text1 # Recreate the patches to determine context info. + postpatch_text = text1 + for x in xrange(len(diffs)): + (diff_type, diff_text) = diffs[x] + if len(patch.diffs) == 0 and diff_type != self.DIFF_EQUAL: + # A new patch starts here. + patch.start1 = char_count1 + patch.start2 = char_count2 + if diff_type == self.DIFF_INSERT: + # Insertion + patch.diffs.append(diffs[x]) + patch.length2 += len(diff_text) + postpatch_text = (postpatch_text[:char_count2] + diff_text + + postpatch_text[char_count2:]) + elif diff_type == self.DIFF_DELETE: + # Deletion. + patch.length1 += len(diff_text) + patch.diffs.append(diffs[x]) + postpatch_text = (postpatch_text[:char_count2] + + postpatch_text[char_count2 + len(diff_text):]) + elif (diff_type == self.DIFF_EQUAL and + len(diff_text) <= 2 * self.Patch_Margin and + len(patch.diffs) != 0 and len(diffs) != x + 1): + # Small equality inside a patch. + patch.diffs.append(diffs[x]) + patch.length1 += len(diff_text) + patch.length2 += len(diff_text) + + if (diff_type == self.DIFF_EQUAL and + len(diff_text) >= 2 * self.Patch_Margin): + # Time for a new patch. + if len(patch.diffs) != 0: + self.patch_addContext(patch, prepatch_text) + patches.append(patch) + patch = patch_obj() + # Unlike Unidiff, our patch lists have a rolling context. + # http://code.google.com/p/google-diff-match-patch/wiki/Unidiff + # Update prepatch text & pos to reflect the application of the + # just completed patch. + prepatch_text = postpatch_text + char_count1 = char_count2 + + # Update the current character count. + if diff_type != self.DIFF_INSERT: + char_count1 += len(diff_text) + if diff_type != self.DIFF_DELETE: + char_count2 += len(diff_text) + + # Pick up the leftover patch if not empty. + if len(patch.diffs) != 0: + self.patch_addContext(patch, prepatch_text) + patches.append(patch) + return patches + + def patch_deepCopy(self, patches): + """Given an array of patches, return another array that is identical. + + Args: + patches: Array of patch objects. + + Returns: + Array of patch objects. + """ + patchesCopy = [] + for patch in patches: + patchCopy = patch_obj() + # No need to deep copy the tuples since they are immutable. + patchCopy.diffs = patch.diffs[:] + patchCopy.start1 = patch.start1 + patchCopy.start2 = patch.start2 + patchCopy.length1 = patch.length1 + patchCopy.length2 = patch.length2 + patchesCopy.append(patchCopy) + return patchesCopy + + def patch_apply(self, patches, text): + """Merge a set of patches onto the text. Return a patched text, as well + as a list of true/false values indicating which patches were applied. + + Args: + patches: Array of patch objects. + text: Old text. + + Returns: + Two element Array, containing the new text and an array of boolean values. + """ + if not patches: + return (text, []) + + # Deep copy the patches so that no changes are made to originals. + patches = self.patch_deepCopy(patches) + + nullPadding = self.patch_addPadding(patches) + text = nullPadding + text + nullPadding + self.patch_splitMax(patches) + + # delta keeps track of the offset between the expected and actual location + # of the previous patch. If there are patches expected at positions 10 and + # 20, but the first patch was found at 12, delta is 2 and the second patch + # has an effective expected position of 22. + delta = 0 + results = [] + for patch in patches: + expected_loc = patch.start2 + delta + text1 = self.diff_text1(patch.diffs) + end_loc = -1 + if len(text1) > self.Match_MaxBits: + # patch_splitMax will only provide an oversized pattern in the case of + # a monster delete. + start_loc = self.match_main(text, text1[:self.Match_MaxBits], + expected_loc) + if start_loc != -1: + end_loc = self.match_main(text, text1[-self.Match_MaxBits:], + expected_loc + len(text1) - self.Match_MaxBits) + if end_loc == -1 or start_loc >= end_loc: + # Can't find valid trailing context. Drop this patch. + start_loc = -1 + else: + start_loc = self.match_main(text, text1, expected_loc) + if start_loc == -1: + # No match found. :( + results.append(False) + # Subtract the delta for this failed patch from subsequent patches. + delta -= patch.length2 - patch.length1 + else: + # Found a match. :) + results.append(True) + delta = start_loc - expected_loc + if end_loc == -1: + text2 = text[start_loc : start_loc + len(text1)] + else: + text2 = text[start_loc : end_loc + self.Match_MaxBits] + if text1 == text2: + # Perfect match, just shove the replacement text in. + text = (text[:start_loc] + self.diff_text2(patch.diffs) + + text[start_loc + len(text1):]) + else: + # Imperfect match. + # Run a diff to get a framework of equivalent indices. + diffs = self.diff_main(text1, text2, False) + if (len(text1) > self.Match_MaxBits and + self.diff_levenshtein(diffs) / float(len(text1)) > + self.Patch_DeleteThreshold): + # The end points match, but the content is unacceptably bad. + results[-1] = False + else: + self.diff_cleanupSemanticLossless(diffs) + index1 = 0 + for (op, data) in patch.diffs: + if op != self.DIFF_EQUAL: + index2 = self.diff_xIndex(diffs, index1) + if op == self.DIFF_INSERT: # Insertion + text = text[:start_loc + index2] + data + text[start_loc + + index2:] + elif op == self.DIFF_DELETE: # Deletion + text = text[:start_loc + index2] + text[start_loc + + self.diff_xIndex(diffs, index1 + len(data)):] + if op != self.DIFF_DELETE: + index1 += len(data) + # Strip the padding off. + text = text[len(nullPadding):-len(nullPadding)] + return (text, results) + + def patch_addPadding(self, patches): + """Add some padding on text start and end so that edges can match + something. Intended to be called only from within patch_apply. + + Args: + patches: Array of patch objects. + + Returns: + The padding string added to each side. + """ + paddingLength = self.Patch_Margin + nullPadding = "" + for x in xrange(1, paddingLength + 1): + nullPadding += chr(x) + + # Bump all the patches forward. + for patch in patches: + patch.start1 += paddingLength + patch.start2 += paddingLength + + # Add some padding on start of first diff. + patch = patches[0] + diffs = patch.diffs + if not diffs or diffs[0][0] != self.DIFF_EQUAL: + # Add nullPadding equality. + diffs.insert(0, (self.DIFF_EQUAL, nullPadding)) + patch.start1 -= paddingLength # Should be 0. + patch.start2 -= paddingLength # Should be 0. + patch.length1 += paddingLength + patch.length2 += paddingLength + elif paddingLength > len(diffs[0][1]): + # Grow first equality. + extraLength = paddingLength - len(diffs[0][1]) + newText = nullPadding[len(diffs[0][1]):] + diffs[0][1] + diffs[0] = (diffs[0][0], newText) + patch.start1 -= extraLength + patch.start2 -= extraLength + patch.length1 += extraLength + patch.length2 += extraLength + + # Add some padding on end of last diff. + patch = patches[-1] + diffs = patch.diffs + if not diffs or diffs[-1][0] != self.DIFF_EQUAL: + # Add nullPadding equality. + diffs.append((self.DIFF_EQUAL, nullPadding)) + patch.length1 += paddingLength + patch.length2 += paddingLength + elif paddingLength > len(diffs[-1][1]): + # Grow last equality. + extraLength = paddingLength - len(diffs[-1][1]) + newText = diffs[-1][1] + nullPadding[:extraLength] + diffs[-1] = (diffs[-1][0], newText) + patch.length1 += extraLength + patch.length2 += extraLength + + return nullPadding + + def patch_splitMax(self, patches): + """Look through the patches and break up any which are longer than the + maximum limit of the match algorithm. + + Args: + patches: Array of patch objects. + """ + if self.Match_MaxBits == 0: + return + for x in xrange(len(patches)): + if patches[x].length1 > self.Match_MaxBits: + bigpatch = patches[x] + # Remove the big old patch. + del patches[x] + x -= 1 + patch_size = self.Match_MaxBits + start1 = bigpatch.start1 + start2 = bigpatch.start2 + precontext = '' + while len(bigpatch.diffs) != 0: + # Create one of several smaller patches. + patch = patch_obj() + empty = True + patch.start1 = start1 - len(precontext) + patch.start2 = start2 - len(precontext) + if precontext: + patch.length1 = patch.length2 = len(precontext) + patch.diffs.append((self.DIFF_EQUAL, precontext)) + + while (len(bigpatch.diffs) != 0 and + patch.length1 < patch_size - self.Patch_Margin): + (diff_type, diff_text) = bigpatch.diffs[0] + if diff_type == self.DIFF_INSERT: + # Insertions are harmless. + patch.length2 += len(diff_text) + start2 += len(diff_text) + patch.diffs.append(bigpatch.diffs.pop(0)) + empty = False + elif (diff_type == self.DIFF_DELETE and len(patch.diffs) == 1 and + patch.diffs[0][0] == self.DIFF_EQUAL and + len(diff_text) > 2 * patch_size): + # This is a large deletion. Let it pass in one chunk. + patch.length1 += len(diff_text) + start1 += len(diff_text) + empty = False + patch.diffs.append((diff_type, diff_text)) + del bigpatch.diffs[0] + else: + # Deletion or equality. Only take as much as we can stomach. + diff_text = diff_text[:patch_size - patch.length1 - + self.Patch_Margin] + patch.length1 += len(diff_text) + start1 += len(diff_text) + if diff_type == self.DIFF_EQUAL: + patch.length2 += len(diff_text) + start2 += len(diff_text) + else: + empty = False + + patch.diffs.append((diff_type, diff_text)) + if diff_text == bigpatch.diffs[0][1]: + del bigpatch.diffs[0] + else: + bigpatch.diffs[0] = (bigpatch.diffs[0][0], + bigpatch.diffs[0][1][len(diff_text):]) + + # Compute the head context for the next patch. + precontext = self.diff_text2(patch.diffs) + precontext = precontext[-self.Patch_Margin:] + # Append the end context for this patch. + postcontext = self.diff_text1(bigpatch.diffs)[:self.Patch_Margin] + if postcontext: + patch.length1 += len(postcontext) + patch.length2 += len(postcontext) + if len(patch.diffs) != 0 and patch.diffs[-1][0] == self.DIFF_EQUAL: + patch.diffs[-1] = (self.DIFF_EQUAL, patch.diffs[-1][1] + + postcontext) + else: + patch.diffs.append((self.DIFF_EQUAL, postcontext)) + + if not empty: + x += 1 + patches.insert(x, patch) + + def patch_toText(self, patches): + """Take a list of patches and return a textual representation. + + Args: + patches: Array of patch objects. + + Returns: + Text representation of patches. + """ + text = [] + for patch in patches: + text.append(str(patch)) + return "".join(text) + + def patch_fromText(self, textline): + """Parse a textual representation of patches and return a list of patch + objects. + + Args: + textline: Text representation of patches. + + Returns: + Array of patch objects. + + Raises: + ValueError: If invalid input. + """ + if type(textline) == unicode: + # Patches should be composed of a subset of ascii chars, Unicode not + # required. If this encode raises UnicodeEncodeError, patch is invalid. + textline = textline.encode("ascii") + patches = [] + if not textline: + return patches + text = textline.split('\n') + while len(text) != 0: + m = re.match("^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$", text[0]) + if not m: + raise ValueError("Invalid patch string: " + text[0]) + patch = patch_obj() + patches.append(patch) + patch.start1 = int(m.group(1)) + if m.group(2) == '': + patch.start1 -= 1 + patch.length1 = 1 + elif m.group(2) == '0': + patch.length1 = 0 + else: + patch.start1 -= 1 + patch.length1 = int(m.group(2)) + + patch.start2 = int(m.group(3)) + if m.group(4) == '': + patch.start2 -= 1 + patch.length2 = 1 + elif m.group(4) == '0': + patch.length2 = 0 + else: + patch.start2 -= 1 + patch.length2 = int(m.group(4)) + + del text[0] + + while len(text) != 0: + if text[0]: + sign = text[0][0] + else: + sign = '' + line = urllib.unquote(text[0][1:]) + line = line.decode("utf-8") + if sign == '+': + # Insertion. + patch.diffs.append((self.DIFF_INSERT, line)) + elif sign == '-': + # Deletion. + patch.diffs.append((self.DIFF_DELETE, line)) + elif sign == ' ': + # Minor equality. + patch.diffs.append((self.DIFF_EQUAL, line)) + elif sign == '@': + # Start of next patch. + break + elif sign == '': + # Blank line? Whatever. + pass + else: + # WTF? + raise ValueError("Invalid patch mode: '%s'\n%s" % (sign, line)) + del text[0] + return patches + + +class patch_obj: + """Class representing one patch operation. + """ + + def __init__(self): + """Initializes with an empty list of diffs. + """ + self.diffs = [] + self.start1 = None + self.start2 = None + self.length1 = 0 + self.length2 = 0 + + def __str__(self): + """Emmulate GNU diff's format. + Header: @@ -382,8 +481,9 @@ + Indicies are printed as 1-based, not 0-based. + + Returns: + The GNU diff string. + """ + if self.length1 == 0: + coords1 = str(self.start1) + ",0" + elif self.length1 == 1: + coords1 = str(self.start1 + 1) + else: + coords1 = str(self.start1 + 1) + "," + str(self.length1) + if self.length2 == 0: + coords2 = str(self.start2) + ",0" + elif self.length2 == 1: + coords2 = str(self.start2 + 1) + else: + coords2 = str(self.start2 + 1) + "," + str(self.length2) + text = ["@@ -", coords1, " +", coords2, " @@\n"] + # Escape the body of the patch with %xx notation. + for (op, data) in self.diffs: + if op == diff_match_patch.DIFF_INSERT: + text.append("+") + elif op == diff_match_patch.DIFF_DELETE: + text.append("-") + elif op == diff_match_patch.DIFF_EQUAL: + text.append(" ") + # High ascii will raise UnicodeDecodeError. Use Unicode instead. + data = data.encode("utf-8") + text.append(urllib.quote(data, "!~*'();/?:@&=+$,# ") + "\n") + return "".join(text) diff --git a/settings.py b/settings.py index 10f2355..b7fbfe7 100644 --- a/settings.py +++ b/settings.py @@ -1,78 +1,86 @@ # -*- coding:utf-8 -*- from os import path BIBLION_SECTIONS = [] BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG +# WIKI PARAMS +# Defines the duration of the soft editing lock on article, in seconds. +WIKI_LOCK_DURATION = 15 +# Determines if the wiki will be for registered users only, or +# if it will allow anonimous users. +WIKI_REQUIRES_LOGIN = False + ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } TIME_ZONE = 'America/Fortaleza' LANGUAGE_CODE = 'pt-br' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = path.join(BASE_DIR, 'media_root') MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/admin_media/' SECRET_KEY = 'chave_secreta' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', # -- APPS -- 'pugce.biblion', 'pugce.wiki', + 'pugce.tagging', ) diff --git a/tagging/__init__.py b/tagging/__init__.py new file mode 100644 index 0000000..fb37886 --- /dev/null +++ b/tagging/__init__.py @@ -0,0 +1,62 @@ +VERSION = (0, 4, 0, "dev", 1) + + + +def get_version(): + if VERSION[3] == "final": + return "%s.%s.%s" % (VERSION[0], VERSION[1], VERSION[2]) + elif VERSION[3] == "dev": + if VERSION[2] == 0: + return "%s.%s.%s%s" % (VERSION[0], VERSION[1], VERSION[3], VERSION[4]) + return "%s.%s.%s.%s%s" % (VERSION[0], VERSION[1], VERSION[2], VERSION[3], VERSION[4]) + else: + return "%s.%s.%s%s" % (VERSION[0], VERSION[1], VERSION[2], VERSION[3]) + + +__version__ = get_version() + + +class AlreadyRegistered(Exception): + """ + An attempt was made to register a model more than once. + """ + pass + + +registry = [] + + +def register(model, tag_descriptor_attr='tags', + tagged_item_manager_attr='tagged'): + """ + Sets the given model class up for working with tags. + """ + + from tagging.managers import ModelTaggedItemManager, TagDescriptor + + if model in registry: + raise AlreadyRegistered("The model '%s' has already been " + "registered." % model._meta.object_name) + if hasattr(model, tag_descriptor_attr): + raise AttributeError("'%s' already has an attribute '%s'. You must " + "provide a custom tag_descriptor_attr to register." % ( + model._meta.object_name, + tag_descriptor_attr, + ) + ) + if hasattr(model, tagged_item_manager_attr): + raise AttributeError("'%s' already has an attribute '%s'. You must " + "provide a custom tagged_item_manager_attr to register." % ( + model._meta.object_name, + tagged_item_manager_attr, + ) + ) + + # Add tag descriptor + setattr(model, tag_descriptor_attr, TagDescriptor()) + + # Add custom manager + ModelTaggedItemManager().contribute_to_class(model, tagged_item_manager_attr) + + # Finally register in registry + registry.append(model) diff --git a/tagging/admin.py b/tagging/admin.py new file mode 100644 index 0000000..bec3922 --- /dev/null +++ b/tagging/admin.py @@ -0,0 +1,13 @@ +from django.contrib import admin +from tagging.models import Tag, TaggedItem +from tagging.forms import TagAdminForm + +class TagAdmin(admin.ModelAdmin): + form = TagAdminForm + +admin.site.register(TaggedItem) +admin.site.register(Tag, TagAdmin) + + + + diff --git a/tagging/fields.py b/tagging/fields.py new file mode 100644 index 0000000..f471467 --- /dev/null +++ b/tagging/fields.py @@ -0,0 +1,119 @@ +""" +A custom Model Field for tagging. +""" +from django.db.models import signals +from django.db.models.fields import CharField +from django.utils.translation import ugettext_lazy as _ + +from tagging import settings +from tagging.models import Tag +from tagging.utils import edit_string_for_tags + +class TagField(CharField): + """ + A "special" character field that actually works as a relationship to tags + "under the hood". This exposes a space-separated string of tags, but does + the splitting/reordering/etc. under the hood. + """ + def __init__(self, *args, **kwargs): + kwargs['max_length'] = kwargs.get('max_length', 255) + kwargs['blank'] = kwargs.get('blank', True) + kwargs['default'] = kwargs.get('default', '') + super(TagField, self).__init__(*args, **kwargs) + + def contribute_to_class(self, cls, name): + super(TagField, self).contribute_to_class(cls, name) + + # Make this object the descriptor for field access. + setattr(cls, self.name, self) + + # Save tags back to the database post-save + signals.post_save.connect(self._save, cls, True) + + # Update tags from Tag objects post-init + signals.post_init.connect(self._update, cls, True) + + def __get__(self, instance, owner=None): + """ + Tag getter. Returns an instance's tags if accessed on an instance, and + all of a model's tags if called on a class. That is, this model:: + + class Link(models.Model): + ... + tags = TagField() + + Lets you do both of these:: + + >>> l = Link.objects.get(...) + >>> l.tags + 'tag1 tag2 tag3' + + >>> Link.tags + 'tag1 tag2 tag3 tag4' + + """ + # Handle access on the model (i.e. Link.tags) + if instance is None: + return edit_string_for_tags(Tag.objects.usage_for_model(owner)) + + return self._get_instance_tag_cache(instance) + + def __set__(self, instance, value): + """ + Set an object's tags. + """ + if instance is None: + raise AttributeError(_('%s can only be set on instances.') % self.name) + if settings.FORCE_LOWERCASE_TAGS and value is not None: + value = value.lower() + self._set_instance_tag_cache(instance, value) + + def _save(self, **kwargs): #signal, sender, instance): + """ + Save tags back to the database + """ + tags = self._get_instance_tag_cache(kwargs['instance']) + Tag.objects.update_tags(kwargs['instance'], tags) + + def _update(self, **kwargs): #signal, sender, instance): + """ + Update tag cache from TaggedItem objects. + """ + instance = kwargs['instance'] + self._update_instance_tag_cache(instance) + + def __delete__(self, instance): + """ + Clear all of an object's tags. + """ + self._set_instance_tag_cache(instance, '') + + def _get_instance_tag_cache(self, instance): + """ + Helper: get an instance's tag cache. + """ + return getattr(instance, '_%s_cache' % self.attname, None) + + def _set_instance_tag_cache(self, instance, tags): + """ + Helper: set an instance's tag cache. + """ + setattr(instance, '_%s_cache' % self.attname, tags) + + def _update_instance_tag_cache(self, instance): + """ + Helper: update an instance's tag cache from actual Tags. + """ + # for an unsaved object, leave the default value alone + if instance.pk is not None: + tags = edit_string_for_tags(Tag.objects.get_for_object(instance)) + self._set_instance_tag_cache(instance, tags) + + def get_internal_type(self): + return 'CharField' + + def formfield(self, **kwargs): + from tagging import forms + defaults = {'form_class': forms.TagField} + defaults.update(kwargs) + return super(TagField, self).formfield(**defaults) diff --git a/tagging/forms.py b/tagging/forms.py new file mode 100644 index 0000000..a2d9fd9 --- /dev/null +++ b/tagging/forms.py @@ -0,0 +1,40 @@ +""" +Tagging components for Django's form library. +""" +from django import forms +from django.utils.translation import ugettext as _ + +from tagging import settings +from tagging.models import Tag +from tagging.utils import parse_tag_input + +class TagAdminForm(forms.ModelForm): + class Meta: + model = Tag + + def clean_name(self): + value = self.cleaned_data['name'] + tag_names = parse_tag_input(value) + if len(tag_names) > 1: + raise forms.ValidationError(_('Multiple tags were given.')) + elif len(tag_names[0]) > settings.MAX_TAG_LENGTH: + raise forms.ValidationError( + _('A tag may be no more than %s characters long.') % + settings.MAX_TAG_LENGTH) + return value + +class TagField(forms.CharField): + """ + A ``CharField`` which validates that its input is a valid list of + tag names. + """ + def clean(self, value): + value = super(TagField, self).clean(value) + if value == u'': + return value + for tag_name in parse_tag_input(value): + if len(tag_name) > settings.MAX_TAG_LENGTH: + raise forms.ValidationError( + _('Each tag may be no more than %s characters long.') % + settings.MAX_TAG_LENGTH) + return value diff --git a/tagging/generic.py b/tagging/generic.py new file mode 100644 index 0000000..75d1b8e --- /dev/null +++ b/tagging/generic.py @@ -0,0 +1,40 @@ +from django.contrib.contenttypes.models import ContentType + +def fetch_content_objects(tagged_items, select_related_for=None): + """ + Retrieves ``ContentType`` and content objects for the given list of + ``TaggedItems``, grouping the retrieval of content objects by model + type to reduce the number of queries executed. + + This results in ``number_of_content_types + 1`` queries rather than + the ``number_of_tagged_items * 2`` queries you'd get by iterating + over the list and accessing each item's ``object`` attribute. + + A ``select_related_for`` argument can be used to specify a list of + of model names (corresponding to the ``model`` field of a + ``ContentType``) for which ``select_related`` should be used when + retrieving model instances. + """ + if select_related_for is None: select_related_for = [] + + # Group content object pks by their content type pks + objects = {} + for item in tagged_items: + objects.setdefault(item.content_type_id, []).append(item.object_id) + + # Retrieve content types and content objects in bulk + content_types = ContentType._default_manager.in_bulk(objects.keys()) + for content_type_pk, object_pks in objects.iteritems(): + model = content_types[content_type_pk].model_class() + if content_types[content_type_pk].model in select_related_for: + objects[content_type_pk] = model._default_manager.select_related().in_bulk(object_pks) + else: + objects[content_type_pk] = model._default_manager.in_bulk(object_pks) + + # Set content types and content objects in the appropriate cache + # attributes, so accessing the 'content_type' and 'object' + # attributes on each tagged item won't result in further database + # hits. + for item in tagged_items: + item._object_cache = objects[item.content_type_id][item.object_id] + item._content_type_cache = content_types[item.content_type_id] diff --git a/tagging/managers.py b/tagging/managers.py new file mode 100644 index 0000000..02cd1c2 --- /dev/null +++ b/tagging/managers.py @@ -0,0 +1,68 @@ +""" +Custom managers for Django models registered with the tagging +application. +""" +from django.contrib.contenttypes.models import ContentType +from django.db import models + +from tagging.models import Tag, TaggedItem + +class ModelTagManager(models.Manager): + """ + A manager for retrieving tags for a particular model. + """ + def get_query_set(self): + ctype = ContentType.objects.get_for_model(self.model) + return Tag.objects.filter( + items__content_type__pk=ctype.pk).distinct() + + def cloud(self, *args, **kwargs): + return Tag.objects.cloud_for_model(self.model, *args, **kwargs) + + def related(self, tags, *args, **kwargs): + return Tag.objects.related_for_model(tags, self.model, *args, **kwargs) + + def usage(self, *args, **kwargs): + return Tag.objects.usage_for_model(self.model, *args, **kwargs) + +class ModelTaggedItemManager(models.Manager): + """ + A manager for retrieving model instances based on their tags. + """ + def related_to(self, obj, queryset=None, num=None): + if queryset is None: + return TaggedItem.objects.get_related(obj, self.model, num=num) + else: + return TaggedItem.objects.get_related(obj, queryset, num=num) + + def with_all(self, tags, queryset=None): + if queryset is None: + return TaggedItem.objects.get_by_model(self.model, tags) + else: + return TaggedItem.objects.get_by_model(queryset, tags) + + def with_any(self, tags, queryset=None): + if queryset is None: + return TaggedItem.objects.get_union_by_model(self.model, tags) + else: + return TaggedItem.objects.get_union_by_model(queryset, tags) + +class TagDescriptor(object): + """ + A descriptor which provides access to a ``ModelTagManager`` for + model classes and simple retrieval, updating and deletion of tags + for model instances. + """ + def __get__(self, instance, owner): + if not instance: + tag_manager = ModelTagManager() + tag_manager.model = owner + return tag_manager + else: + return Tag.objects.get_for_object(instance) + + def __set__(self, instance, value): + Tag.objects.update_tags(instance, value) + + def __delete__(self, instance): + Tag.objects.update_tags(instance, None) diff --git a/tagging/models.py b/tagging/models.py new file mode 100644 index 0000000..860cf81 --- /dev/null +++ b/tagging/models.py @@ -0,0 +1,490 @@ +""" +Models and managers for generic tagging. +""" +# Python 2.3 compatibility +try: + set +except NameError: + from sets import Set as set + +from django.contrib.contenttypes import generic +from django.contrib.contenttypes.models import ContentType +from django.db import connection, models +from django.db.models.query import QuerySet +from django.utils.translation import ugettext_lazy as _ + +from tagging import settings +from tagging.utils import calculate_cloud, get_tag_list, get_queryset_and_model, parse_tag_input +from tagging.utils import LOGARITHMIC + +qn = connection.ops.quote_name + +############ +# Managers # +############ + +class TagManager(models.Manager): + def update_tags(self, obj, tag_names): + """ + Update tags associated with an object. + """ + ctype = ContentType.objects.get_for_model(obj) + current_tags = list(self.filter(items__content_type__pk=ctype.pk, + items__object_id=obj.pk)) + updated_tag_names = parse_tag_input(tag_names) + if settings.FORCE_LOWERCASE_TAGS: + updated_tag_names = [t.lower() for t in updated_tag_names] + + # Remove tags which no longer apply + tags_for_removal = [tag for tag in current_tags \ + if tag.name not in updated_tag_names] + if len(tags_for_removal): + TaggedItem._default_manager.filter(content_type__pk=ctype.pk, + object_id=obj.pk, + tag__in=tags_for_removal).delete() + # Add new tags + current_tag_names = [tag.name for tag in current_tags] + for tag_name in updated_tag_names: + if tag_name not in current_tag_names: + tag, created = self.get_or_create(name=tag_name) + TaggedItem._default_manager.create(tag=tag, object=obj) + + def add_tag(self, obj, tag_name): + """ + Associates the given object with a tag. + """ + tag_names = parse_tag_input(tag_name) + if not len(tag_names): + raise AttributeError(_('No tags were given: "%s".') % tag_name) + if len(tag_names) > 1: + raise AttributeError(_('Multiple tags were given: "%s".') % tag_name) + tag_name = tag_names[0] + if settings.FORCE_LOWERCASE_TAGS: + tag_name = tag_name.lower() + tag, created = self.get_or_create(name=tag_name) + ctype = ContentType.objects.get_for_model(obj) + TaggedItem._default_manager.get_or_create( + tag=tag, content_type=ctype, object_id=obj.pk) + + def get_for_object(self, obj): + """ + Create a queryset matching all tags associated with the given + object. + """ + ctype = ContentType.objects.get_for_model(obj) + return self.filter(items__content_type__pk=ctype.pk, + items__object_id=obj.pk) + + def _get_usage(self, model, counts=False, min_count=None, extra_joins=None, extra_criteria=None, params=None): + """ + Perform the custom SQL query for ``usage_for_model`` and + ``usage_for_queryset``. + """ + if min_count is not None: counts = True + + model_table = qn(model._meta.db_table) + model_pk = '%s.%s' % (model_table, qn(model._meta.pk.column)) + query = """ + SELECT DISTINCT %(tag)s.id, %(tag)s.name%(count_sql)s + FROM + %(tag)s + INNER JOIN %(tagged_item)s + ON %(tag)s.id = %(tagged_item)s.tag_id + INNER JOIN %(model)s + ON %(tagged_item)s.object_id = %(model_pk)s + %%s + WHERE %(tagged_item)s.content_type_id = %(content_type_id)s + %%s + GROUP BY %(tag)s.id, %(tag)s.name + %%s + ORDER BY %(tag)s.name ASC""" % { + 'tag': qn(self.model._meta.db_table), + 'count_sql': counts and (', COUNT(%s)' % model_pk) or '', + 'tagged_item': qn(TaggedItem._meta.db_table), + 'model': model_table, + 'model_pk': model_pk, + 'content_type_id': ContentType.objects.get_for_model(model).pk, + } + + min_count_sql = '' + if min_count is not None: + min_count_sql = 'HAVING COUNT(%s) >= %%s' % model_pk + params.append(min_count) + + cursor = connection.cursor() + cursor.execute(query % (extra_joins, extra_criteria, min_count_sql), params) + tags = [] + for row in cursor.fetchall(): + t = self.model(*row[:2]) + if counts: + t.count = row[2] + tags.append(t) + return tags + + def usage_for_model(self, model, counts=False, min_count=None, filters=None): + """ + Obtain a list of tags associated with instances of the given + Model class. + + If ``counts`` is True, a ``count`` attribute will be added to + each tag, indicating how many times it has been used against + the Model class in question. + + If ``min_count`` is given, only tags which have a ``count`` + greater than or equal to ``min_count`` will be returned. + Passing a value for ``min_count`` implies ``counts=True``. + + To limit the tags (and counts, if specified) returned to those + used by a subset of the Model's instances, pass a dictionary + of field lookups to be applied to the given Model as the + ``filters`` argument. + """ + if filters is None: filters = {} + + queryset = model._default_manager.filter() + for f in filters.items(): + queryset.query.add_filter(f) + usage = self.usage_for_queryset(queryset, counts, min_count) + + return usage + + def usage_for_queryset(self, queryset, counts=False, min_count=None): + """ + Obtain a list of tags associated with instances of a model + contained in the given queryset. + + If ``counts`` is True, a ``count`` attribute will be added to + each tag, indicating how many times it has been used against + the Model class in question. + + If ``min_count`` is given, only tags which have a ``count`` + greater than or equal to ``min_count`` will be returned. + Passing a value for ``min_count`` implies ``counts=True``. + """ + + if getattr(queryset.query, 'get_compiler', None): + # Django 1.2+ + compiler = queryset.query.get_compiler(using='default') + extra_joins = ' '.join(compiler.get_from_clause()[0][1:]) + where, params = queryset.query.where.as_sql( + compiler.quote_name_unless_alias, compiler.connection + ) + else: + # Django pre-1.2 + extra_joins = ' '.join(queryset.query.get_from_clause()[0][1:]) + where, params = queryset.query.where.as_sql() + + if where: + extra_criteria = 'AND %s' % where + else: + extra_criteria = '' + return self._get_usage(queryset.model, counts, min_count, extra_joins, extra_criteria, params) + + def related_for_model(self, tags, model, counts=False, min_count=None): + """ + Obtain a list of tags related to a given list of tags - that + is, other tags used by items which have all the given tags. + + If ``counts`` is True, a ``count`` attribute will be added to + each tag, indicating the number of items which have it in + addition to the given list of tags. + + If ``min_count`` is given, only tags which have a ``count`` + greater than or equal to ``min_count`` will be returned. + Passing a value for ``min_count`` implies ``counts=True``. + """ + if min_count is not None: counts = True + tags = get_tag_list(tags) + tag_count = len(tags) + tagged_item_table = qn(TaggedItem._meta.db_table) + query = """ + SELECT %(tag)s.id, %(tag)s.name%(count_sql)s + FROM %(tagged_item)s INNER JOIN %(tag)s ON %(tagged_item)s.tag_id = %(tag)s.id + WHERE %(tagged_item)s.content_type_id = %(content_type_id)s + AND %(tagged_item)s.object_id IN + ( + SELECT %(tagged_item)s.object_id + FROM %(tagged_item)s, %(tag)s + WHERE %(tagged_item)s.content_type_id = %(content_type_id)s + AND %(tag)s.id = %(tagged_item)s.tag_id + AND %(tag)s.id IN (%(tag_id_placeholders)s) + GROUP BY %(tagged_item)s.object_id + HAVING COUNT(%(tagged_item)s.object_id) = %(tag_count)s + ) + AND %(tag)s.id NOT IN (%(tag_id_placeholders)s) + GROUP BY %(tag)s.id, %(tag)s.name + %(min_count_sql)s + ORDER BY %(tag)s.name ASC""" % { + 'tag': qn(self.model._meta.db_table), + 'count_sql': counts and ', COUNT(%s.object_id)' % tagged_item_table or '', + 'tagged_item': tagged_item_table, + 'content_type_id': ContentType.objects.get_for_model(model).pk, + 'tag_id_placeholders': ','.join(['%s'] * tag_count), + 'tag_count': tag_count, + 'min_count_sql': min_count is not None and ('HAVING COUNT(%s.object_id) >= %%s' % tagged_item_table) or '', + } + + params = [tag.pk for tag in tags] * 2 + if min_count is not None: + params.append(min_count) + + cursor = connection.cursor() + cursor.execute(query, params) + related = [] + for row in cursor.fetchall(): + tag = self.model(*row[:2]) + if counts is True: + tag.count = row[2] + related.append(tag) + return related + + def cloud_for_model(self, model, steps=4, distribution=LOGARITHMIC, + filters=None, min_count=None): + """ + Obtain a list of tags associated with instances of the given + Model, giving each tag a ``count`` attribute indicating how + many times it has been used and a ``font_size`` attribute for + use in displaying a tag cloud. + + ``steps`` defines the range of font sizes - ``font_size`` will + be an integer between 1 and ``steps`` (inclusive). + + ``distribution`` defines the type of font size distribution + algorithm which will be used - logarithmic or linear. It must + be either ``tagging.utils.LOGARITHMIC`` or + ``tagging.utils.LINEAR``. + + To limit the tags displayed in the cloud to those associated + with a subset of the Model's instances, pass a dictionary of + field lookups to be applied to the given Model as the + ``filters`` argument. + + To limit the tags displayed in the cloud to those with a + ``count`` greater than or equal to ``min_count``, pass a value + for the ``min_count`` argument. + """ + tags = list(self.usage_for_model(model, counts=True, filters=filters, + min_count=min_count)) + return calculate_cloud(tags, steps, distribution) + +class TaggedItemManager(models.Manager): + """ + FIXME There's currently no way to get the ``GROUP BY`` and ``HAVING`` + SQL clauses required by many of this manager's methods into + Django's ORM. + + For now, we manually execute a query to retrieve the PKs of + objects we're interested in, then use the ORM's ``__in`` + lookup to return a ``QuerySet``. + + Now that the queryset-refactor branch is in the trunk, this can be + tidied up significantly. + """ + def get_by_model(self, queryset_or_model, tags): + """ + Create a ``QuerySet`` containing instances of the specified + model associated with a given tag or list of tags. + """ + tags = get_tag_list(tags) + tag_count = len(tags) + if tag_count == 0: + # No existing tags were given + queryset, model = get_queryset_and_model(queryset_or_model) + return model._default_manager.none() + elif tag_count == 1: + # Optimisation for single tag - fall through to the simpler + # query below. + tag = tags[0] + else: + return self.get_intersection_by_model(queryset_or_model, tags) + + queryset, model = get_queryset_and_model(queryset_or_model) + content_type = ContentType.objects.get_for_model(model) + opts = self.model._meta + tagged_item_table = qn(opts.db_table) + return queryset.extra( + tables=[opts.db_table], + where=[ + '%s.content_type_id = %%s' % tagged_item_table, + '%s.tag_id = %%s' % tagged_item_table, + '%s.%s = %s.object_id' % (qn(model._meta.db_table), + qn(model._meta.pk.column), + tagged_item_table) + ], + params=[content_type.pk, tag.pk], + ) + + def get_intersection_by_model(self, queryset_or_model, tags): + """ + Create a ``QuerySet`` containing instances of the specified + model associated with *all* of the given list of tags. + """ + tags = get_tag_list(tags) + tag_count = len(tags) + queryset, model = get_queryset_and_model(queryset_or_model) + + if not tag_count: + return model._default_manager.none() + + model_table = qn(model._meta.db_table) + # This query selects the ids of all objects which have all the + # given tags. + query = """ + SELECT %(model_pk)s + FROM %(model)s, %(tagged_item)s + WHERE %(tagged_item)s.content_type_id = %(content_type_id)s + AND %(tagged_item)s.tag_id IN (%(tag_id_placeholders)s) + AND %(model_pk)s = %(tagged_item)s.object_id + GROUP BY %(model_pk)s + HAVING COUNT(%(model_pk)s) = %(tag_count)s""" % { + 'model_pk': '%s.%s' % (model_table, qn(model._meta.pk.column)), + 'model': model_table, + 'tagged_item': qn(self.model._meta.db_table), + 'content_type_id': ContentType.objects.get_for_model(model).pk, + 'tag_id_placeholders': ','.join(['%s'] * tag_count), + 'tag_count': tag_count, + } + + cursor = connection.cursor() + cursor.execute(query, [tag.pk for tag in tags]) + object_ids = [row[0] for row in cursor.fetchall()] + if len(object_ids) > 0: + return queryset.filter(pk__in=object_ids) + else: + return model._default_manager.none() + + def get_union_by_model(self, queryset_or_model, tags): + """ + Create a ``QuerySet`` containing instances of the specified + model associated with *any* of the given list of tags. + """ + tags = get_tag_list(tags) + tag_count = len(tags) + queryset, model = get_queryset_and_model(queryset_or_model) + + if not tag_count: + return model._default_manager.none() + + model_table = qn(model._meta.db_table) + # This query selects the ids of all objects which have any of + # the given tags. + query = """ + SELECT %(model_pk)s + FROM %(model)s, %(tagged_item)s + WHERE %(tagged_item)s.content_type_id = %(content_type_id)s + AND %(tagged_item)s.tag_id IN (%(tag_id_placeholders)s) + AND %(model_pk)s = %(tagged_item)s.object_id + GROUP BY %(model_pk)s""" % { + 'model_pk': '%s.%s' % (model_table, qn(model._meta.pk.column)), + 'model': model_table, + 'tagged_item': qn(self.model._meta.db_table), + 'content_type_id': ContentType.objects.get_for_model(model).pk, + 'tag_id_placeholders': ','.join(['%s'] * tag_count), + } + + cursor = connection.cursor() + cursor.execute(query, [tag.pk for tag in tags]) + object_ids = [row[0] for row in cursor.fetchall()] + if len(object_ids) > 0: + return queryset.filter(pk__in=object_ids) + else: + return model._default_manager.none() + + def get_related(self, obj, queryset_or_model, num=None): + """ + Retrieve a list of instances of the specified model which share + tags with the model instance ``obj``, ordered by the number of + shared tags in descending order. + + If ``num`` is given, a maximum of ``num`` instances will be + returned. + """ + queryset, model = get_queryset_and_model(queryset_or_model) + model_table = qn(model._meta.db_table) + content_type = ContentType.objects.get_for_model(obj) + related_content_type = ContentType.objects.get_for_model(model) + query = """ + SELECT %(model_pk)s, COUNT(related_tagged_item.object_id) AS %(count)s + FROM %(model)s, %(tagged_item)s, %(tag)s, %(tagged_item)s related_tagged_item + WHERE %(tagged_item)s.object_id = %%s + AND %(tagged_item)s.content_type_id = %(content_type_id)s + AND %(tag)s.id = %(tagged_item)s.tag_id + AND related_tagged_item.content_type_id = %(related_content_type_id)s + AND related_tagged_item.tag_id = %(tagged_item)s.tag_id + AND %(model_pk)s = related_tagged_item.object_id""" + if content_type.pk == related_content_type.pk: + # Exclude the given instance itself if determining related + # instances for the same model. + query += """ + AND related_tagged_item.object_id != %(tagged_item)s.object_id""" + query += """ + GROUP BY %(model_pk)s + ORDER BY %(count)s DESC + %(limit_offset)s""" + query = query % { + 'model_pk': '%s.%s' % (model_table, qn(model._meta.pk.column)), + 'count': qn('count'), + 'model': model_table, + 'tagged_item': qn(self.model._meta.db_table), + 'tag': qn(self.model._meta.get_field('tag').rel.to._meta.db_table), + 'content_type_id': content_type.pk, + 'related_content_type_id': related_content_type.pk, + # Hardcoding this for now just to get tests working again - this + # should now be handled by the query object. + 'limit_offset': num is not None and 'LIMIT %s' or '', + } + + cursor = connection.cursor() + params = [obj.pk] + if num is not None: + params.append(num) + cursor.execute(query, params) + object_ids = [row[0] for row in cursor.fetchall()] + if len(object_ids) > 0: + # Use in_bulk here instead of an id__in lookup, because id__in would + # clobber the ordering. + object_dict = queryset.in_bulk(object_ids) + return [object_dict[object_id] for object_id in object_ids \ + if object_id in object_dict] + else: + return [] + +########## +# Models # +########## + +class Tag(models.Model): + """ + A tag. + """ + name = models.CharField(_('name'), max_length=50, unique=True, db_index=True) + + objects = TagManager() + + class Meta: + ordering = ('name',) + verbose_name = _('tag') + verbose_name_plural = _('tags') + + def __unicode__(self): + return self.name + +class TaggedItem(models.Model): + """ + Holds the relationship between a tag and the item being tagged. + """ + tag = models.ForeignKey(Tag, verbose_name=_('tag'), related_name='items') + content_type = models.ForeignKey(ContentType, verbose_name=_('content type')) + object_id = models.PositiveIntegerField(_('object id'), db_index=True) + object = generic.GenericForeignKey('content_type', 'object_id') + + objects = TaggedItemManager() + + class Meta: + # Enforce unique tag association per object + unique_together = (('tag', 'content_type', 'object_id'),) + verbose_name = _('tagged item') + verbose_name_plural = _('tagged items') + + def __unicode__(self): + return u'%s [%s]' % (self.object, self.tag) diff --git a/tagging/settings.py b/tagging/settings.py new file mode 100644 index 0000000..1d6224c --- /dev/null +++ b/tagging/settings.py @@ -0,0 +1,13 @@ +""" +Convenience module for access of custom tagging application settings, +which enforces default settings when the main settings module does not +contain the appropriate settings. +""" +from django.conf import settings + +# The maximum length of a tag's name. +MAX_TAG_LENGTH = getattr(settings, 'MAX_TAG_LENGTH', 50) + +# Whether to force all tags to lowercase before they are saved to the +# database. +FORCE_LOWERCASE_TAGS = getattr(settings, 'FORCE_LOWERCASE_TAGS', False) diff --git a/tagging/templatetags/__init__.py b/tagging/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tagging/templatetags/tagging_tags.py b/tagging/templatetags/tagging_tags.py new file mode 100644 index 0000000..11d31cc --- /dev/null +++ b/tagging/templatetags/tagging_tags.py @@ -0,0 +1,231 @@ +from django.db.models import get_model +from django.template import Library, Node, TemplateSyntaxError, Variable, resolve_variable +from django.utils.translation import ugettext as _ + +from tagging.models import Tag, TaggedItem +from tagging.utils import LINEAR, LOGARITHMIC + +register = Library() + +class TagsForModelNode(Node): + def __init__(self, model, context_var, counts): + self.model = model + self.context_var = context_var + self.counts = counts + + def render(self, context): + model = get_model(*self.model.split('.')) + if model is None: + raise TemplateSyntaxError(_('tags_for_model tag was given an invalid model: %s') % self.model) + context[self.context_var] = Tag.objects.usage_for_model(model, counts=self.counts) + return '' + +class TagCloudForModelNode(Node): + def __init__(self, model, context_var, **kwargs): + self.model = model + self.context_var = context_var + self.kwargs = kwargs + + def render(self, context): + model = get_model(*self.model.split('.')) + if model is None: + raise TemplateSyntaxError(_('tag_cloud_for_model tag was given an invalid model: %s') % self.model) + context[self.context_var] = \ + Tag.objects.cloud_for_model(model, **self.kwargs) + return '' + +class TagsForObjectNode(Node): + def __init__(self, obj, context_var): + self.obj = Variable(obj) + self.context_var = context_var + + def render(self, context): + context[self.context_var] = \ + Tag.objects.get_for_object(self.obj.resolve(context)) + return '' + +class TaggedObjectsNode(Node): + def __init__(self, tag, model, context_var): + self.tag = Variable(tag) + self.context_var = context_var + self.model = model + + def render(self, context): + model = get_model(*self.model.split('.')) + if model is None: + raise TemplateSyntaxError(_('tagged_objects tag was given an invalid model: %s') % self.model) + context[self.context_var] = \ + TaggedItem.objects.get_by_model(model, self.tag.resolve(context)) + return '' + +def do_tags_for_model(parser, token): + """ + Retrieves a list of ``Tag`` objects associated with a given model + and stores them in a context variable. + + Usage:: + + {% tags_for_model [model] as [varname] %} + + The model is specified in ``[appname].[modelname]`` format. + + Extended usage:: + + {% tags_for_model [model] as [varname] with counts %} + + If specified - by providing extra ``with counts`` arguments - adds + a ``count`` attribute to each tag containing the number of + instances of the given model which have been tagged with it. + + Examples:: + + {% tags_for_model products.Widget as widget_tags %} + {% tags_for_model products.Widget as widget_tags with counts %} + + """ + bits = token.contents.split() + len_bits = len(bits) + if len_bits not in (4, 6): + raise TemplateSyntaxError(_('%s tag requires either three or five arguments') % bits[0]) + if bits[2] != 'as': + raise TemplateSyntaxError(_("second argument to %s tag must be 'as'") % bits[0]) + if len_bits == 6: + if bits[4] != 'with': + raise TemplateSyntaxError(_("if given, fourth argument to %s tag must be 'with'") % bits[0]) + if bits[5] != 'counts': + raise TemplateSyntaxError(_("if given, fifth argument to %s tag must be 'counts'") % bits[0]) + if len_bits == 4: + return TagsForModelNode(bits[1], bits[3], counts=False) + else: + return TagsForModelNode(bits[1], bits[3], counts=True) + +def do_tag_cloud_for_model(parser, token): + """ + Retrieves a list of ``Tag`` objects for a given model, with tag + cloud attributes set, and stores them in a context variable. + + Usage:: + + {% tag_cloud_for_model [model] as [varname] %} + + The model is specified in ``[appname].[modelname]`` format. + + Extended usage:: + + {% tag_cloud_for_model [model] as [varname] with [options] %} + + Extra options can be provided after an optional ``with`` argument, + with each option being specified in ``[name]=[value]`` format. Valid + extra options are: + + ``steps`` + Integer. Defines the range of font sizes. + + ``min_count`` + Integer. Defines the minimum number of times a tag must have + been used to appear in the cloud. + + ``distribution`` + One of ``linear`` or ``log``. Defines the font-size + distribution algorithm to use when generating the tag cloud. + + Examples:: + + {% tag_cloud_for_model products.Widget as widget_tags %} + {% tag_cloud_for_model products.Widget as widget_tags with steps=9 min_count=3 distribution=log %} + + """ + bits = token.contents.split() + len_bits = len(bits) + if len_bits != 4 and len_bits not in range(6, 9): + raise TemplateSyntaxError(_('%s tag requires either three or between five and seven arguments') % bits[0]) + if bits[2] != 'as': + raise TemplateSyntaxError(_("second argument to %s tag must be 'as'") % bits[0]) + kwargs = {} + if len_bits > 5: + if bits[4] != 'with': + raise TemplateSyntaxError(_("if given, fourth argument to %s tag must be 'with'") % bits[0]) + for i in range(5, len_bits): + try: + name, value = bits[i].split('=') + if name == 'steps' or name == 'min_count': + try: + kwargs[str(name)] = int(value) + except ValueError: + raise TemplateSyntaxError(_("%(tag)s tag's '%(option)s' option was not a valid integer: '%(value)s'") % { + 'tag': bits[0], + 'option': name, + 'value': value, + }) + elif name == 'distribution': + if value in ['linear', 'log']: + kwargs[str(name)] = {'linear': LINEAR, 'log': LOGARITHMIC}[value] + else: + raise TemplateSyntaxError(_("%(tag)s tag's '%(option)s' option was not a valid choice: '%(value)s'") % { + 'tag': bits[0], + 'option': name, + 'value': value, + }) + else: + raise TemplateSyntaxError(_("%(tag)s tag was given an invalid option: '%(option)s'") % { + 'tag': bits[0], + 'option': name, + }) + except ValueError: + raise TemplateSyntaxError(_("%(tag)s tag was given a badly formatted option: '%(option)s'") % { + 'tag': bits[0], + 'option': bits[i], + }) + return TagCloudForModelNode(bits[1], bits[3], **kwargs) + +def do_tags_for_object(parser, token): + """ + Retrieves a list of ``Tag`` objects associated with an object and + stores them in a context variable. + + Usage:: + + {% tags_for_object [object] as [varname] %} + + Example:: + + {% tags_for_object foo_object as tag_list %} + """ + bits = token.contents.split() + if len(bits) != 4: + raise TemplateSyntaxError(_('%s tag requires exactly three arguments') % bits[0]) + if bits[2] != 'as': + raise TemplateSyntaxError(_("second argument to %s tag must be 'as'") % bits[0]) + return TagsForObjectNode(bits[1], bits[3]) + +def do_tagged_objects(parser, token): + """ + Retrieves a list of instances of a given model which are tagged with + a given ``Tag`` and stores them in a context variable. + + Usage:: + + {% tagged_objects [tag] in [model] as [varname] %} + + The model is specified in ``[appname].[modelname]`` format. + + The tag must be an instance of a ``Tag``, not the name of a tag. + + Example:: + + {% tagged_objects comedy_tag in tv.Show as comedies %} + + """ + bits = token.contents.split() + if len(bits) != 6: + raise TemplateSyntaxError(_('%s tag requires exactly five arguments') % bits[0]) + if bits[2] != 'in': + raise TemplateSyntaxError(_("second argument to %s tag must be 'in'") % bits[0]) + if bits[4] != 'as': + raise TemplateSyntaxError(_("fourth argument to %s tag must be 'as'") % bits[0]) + return TaggedObjectsNode(bits[1], bits[3], bits[5]) + +register.tag('tags_for_model', do_tags_for_model) +register.tag('tag_cloud_for_model', do_tag_cloud_for_model) +register.tag('tags_for_object', do_tags_for_object) +register.tag('tagged_objects', do_tagged_objects) diff --git a/tagging/tests/__init__.py b/tagging/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tagging/tests/models.py b/tagging/tests/models.py new file mode 100644 index 0000000..e3274ff --- /dev/null +++ b/tagging/tests/models.py @@ -0,0 +1,42 @@ +from django.db import models + +from tagging.fields import TagField + +class Perch(models.Model): + size = models.IntegerField() + smelly = models.BooleanField(default=True) + +class Parrot(models.Model): + state = models.CharField(max_length=50) + perch = models.ForeignKey(Perch, null=True) + + def __unicode__(self): + return self.state + + class Meta: + ordering = ['state'] + +class Link(models.Model): + name = models.CharField(max_length=50) + + def __unicode__(self): + return self.name + + class Meta: + ordering = ['name'] + +class Article(models.Model): + name = models.CharField(max_length=50) + + def __unicode__(self): + return self.name + + class Meta: + ordering = ['name'] + +class FormTest(models.Model): + tags = TagField('Test', help_text='Test') + +class FormTestNull(models.Model): + tags = TagField(null=True) + diff --git a/tagging/tests/settings.py b/tagging/tests/settings.py new file mode 100644 index 0000000..74eb909 --- /dev/null +++ b/tagging/tests/settings.py @@ -0,0 +1,27 @@ +import os +DIRNAME = os.path.dirname(__file__) + +DEFAULT_CHARSET = 'utf-8' + +test_engine = os.environ.get("TAGGING_TEST_ENGINE", "sqlite3") + +DATABASE_ENGINE = test_engine +DATABASE_NAME = os.environ.get("TAGGING_DATABASE_NAME", "tagging_test") +DATABASE_USER = os.environ.get("TAGGING_DATABASE_USER", "") +DATABASE_PASSWORD = os.environ.get("TAGGING_DATABASE_PASSWORD", "") +DATABASE_HOST = os.environ.get("TAGGING_DATABASE_HOST", "localhost") + +if test_engine == "sqlite": + DATABASE_NAME = os.path.join(DIRNAME, 'tagging_test.db') + DATABASE_HOST = "" +elif test_engine == "mysql": + DATABASE_PORT = os.environ.get("TAGGING_DATABASE_PORT", 3306) +elif test_engine == "postgresql_psycopg2": + DATABASE_PORT = os.environ.get("TAGGING_DATABASE_PORT", 5432) + + +INSTALLED_APPS = ( + 'django.contrib.contenttypes', + 'tagging', + 'tagging.tests', +) diff --git a/tagging/tests/tags.txt b/tagging/tests/tags.txt new file mode 100644 index 0000000..8543411 --- /dev/null +++ b/tagging/tests/tags.txt @@ -0,0 +1,122 @@ +NewMedia 53 +Website 45 +PR 44 +Status 44 +Collaboration 41 +Drupal 34 +Journalism 31 +Transparency 30 +Theory 29 +Decentralization 25 +EchoChamberProject 24 +OpenSource 23 +Film 22 +Blog 21 +Interview 21 +Political 21 +Worldview 21 +Communications 19 +Conference 19 +Folksonomy 15 +MediaCriticism 15 +Volunteer 15 +Dialogue 13 +InternationalLaw 13 +Rosen 12 +Evolution 11 +KentBye 11 +Objectivity 11 +Plante 11 +ToDo 11 +Advisor 10 +Civics 10 +Roadmap 10 +Wilber 9 +About 8 +CivicSpace 8 +Ecosystem 8 +Choice 7 +Murphy 7 +Sociology 7 +ACH 6 +del.icio.us 6 +IntelligenceAnalysis 6 +Science 6 +Credibility 5 +Distribution 5 +Diversity 5 +Errors 5 +FinalCutPro 5 +Fundraising 5 +Law 5 +PhilosophyofScience 5 +Podcast 5 +PoliticalBias 5 +Activism 4 +Analysis 4 +CBS 4 +DeceptionDetection 4 +Editing 4 +History 4 +RSS 4 +Social 4 +Subjectivity 4 +Vlog 4 +ABC 3 +ALTubes 3 +Economics 3 +FCC 3 +NYT 3 +Sirota 3 +Sundance 3 +Training 3 +Wiki 3 +XML 3 +Borger 2 +Brody 2 +Deliberation 2 +EcoVillage 2 +Identity 2 +LAMP 2 +Lobe 2 +Maine 2 +May 2 +MediaLogic 2 +Metaphor 2 +Mitchell 2 +NBC 2 +OHanlon 2 +Psychology 2 +Queen 2 +Software 2 +SpiralDynamics 2 +Strobel 2 +Sustainability 2 +Transcripts 2 +Brown 1 +Buddhism 1 +Community 1 +DigitalDivide 1 +Donnelly 1 +Education 1 +FairUse 1 +FireANT 1 +Google 1 +HumanRights 1 +KM 1 +Kwiatkowski 1 +Landay 1 +Loiseau 1 +Math 1 +Music 1 +Nature 1 +Schechter 1 +Screencast 1 +Sivaraksa 1 +Skype 1 +SocialCapital 1 +TagCloud 1 +Thielmann 1 +Thomas 1 +Tiger 1 +Wedgwood 1 \ No newline at end of file diff --git a/tagging/tests/tests.py b/tagging/tests/tests.py new file mode 100644 index 0000000..1852444 --- /dev/null +++ b/tagging/tests/tests.py @@ -0,0 +1,920 @@ +# -*- coding: utf-8 -*- + +import os +from django import forms +from django.db.models import Q +from django.test import TestCase +from tagging.forms import TagField +from tagging import settings +from tagging.models import Tag, TaggedItem +from tagging.tests.models import Article, Link, Perch, Parrot, FormTest, FormTestNull +from tagging.utils import calculate_cloud, edit_string_for_tags, get_tag_list, get_tag, parse_tag_input +from tagging.utils import LINEAR + +############# +# Utilities # +############# + +class TestParseTagInput(TestCase): + def test_with_simple_space_delimited_tags(self): + """ Test with simple space-delimited tags. """ + + self.assertEquals(parse_tag_input('one'), [u'one']) + self.assertEquals(parse_tag_input('one two'), [u'one', u'two']) + self.assertEquals(parse_tag_input('one two three'), [u'one', u'three', u'two']) + self.assertEquals(parse_tag_input('one one two two'), [u'one', u'two']) + + def test_with_comma_delimited_multiple_words(self): + """ Test with comma-delimited multiple words. + An unquoted comma in the input will trigger this. """ + + self.assertEquals(parse_tag_input(',one'), [u'one']) + self.assertEquals(parse_tag_input(',one two'), [u'one two']) + self.assertEquals(parse_tag_input(',one two three'), [u'one two three']) + self.assertEquals(parse_tag_input('a-one, a-two and a-three'), + [u'a-one', u'a-two and a-three']) + + def test_with_double_quoted_multiple_words(self): + """ Test with double-quoted multiple words. + A completed quote will trigger this. Unclosed quotes are ignored. """ + + self.assertEquals(parse_tag_input('"one'), [u'one']) + self.assertEquals(parse_tag_input('"one two'), [u'one', u'two']) + self.assertEquals(parse_tag_input('"one two three'), [u'one', u'three', u'two']) + self.assertEquals(parse_tag_input('"one two"'), [u'one two']) + self.assertEquals(parse_tag_input('a-one "a-two and a-three"'), + [u'a-one', u'a-two and a-three']) + + def test_with_no_loose_commas(self): + """ Test with no loose commas -- split on spaces. """ + self.assertEquals(parse_tag_input('one two "thr,ee"'), [u'one', u'thr,ee', u'two']) + + def test_with_loose_commas(self): + """ Loose commas - split on commas """ + self.assertEquals(parse_tag_input('"one", two three'), [u'one', u'two three']) + + def test_tags_with_double_quotes_can_contain_commas(self): + """ Double quotes can contain commas """ + self.assertEquals(parse_tag_input('a-one "a-two, and a-three"'), + [u'a-one', u'a-two, and a-three']) + self.assertEquals(parse_tag_input('"two", one, one, two, "one"'), + [u'one', u'two']) + + def test_with_naughty_input(self): + """ Test with naughty input. """ + + # Bad users! Naughty users! + self.assertEquals(parse_tag_input(None), []) + self.assertEquals(parse_tag_input(''), []) + self.assertEquals(parse_tag_input('"'), []) + self.assertEquals(parse_tag_input('""'), []) + self.assertEquals(parse_tag_input('"' * 7), []) + self.assertEquals(parse_tag_input(',,,,,,'), []) + self.assertEquals(parse_tag_input('",",",",",",","'), [u',']) + self.assertEquals(parse_tag_input('a-one "a-two" and "a-three'), + [u'a-one', u'a-three', u'a-two', u'and']) + +class TestNormalisedTagListInput(TestCase): + def setUp(self): + self.cheese = Tag.objects.create(name='cheese') + self.toast = Tag.objects.create(name='toast') + + def test_single_tag_object_as_input(self): + self.assertEquals(get_tag_list(self.cheese), [self.cheese]) + + def test_space_delimeted_string_as_input(self): + ret = get_tag_list('cheese toast') + self.assertEquals(len(ret), 2) + self.failUnless(self.cheese in ret) + self.failUnless(self.toast in ret) + + def test_comma_delimeted_string_as_input(self): + ret = get_tag_list('cheese,toast') + self.assertEquals(len(ret), 2) + self.failUnless(self.cheese in ret) + self.failUnless(self.toast in ret) + + def test_with_empty_list(self): + self.assertEquals(get_tag_list([]), []) + + def test_list_of_two_strings(self): + ret = get_tag_list(['cheese', 'toast']) + self.assertEquals(len(ret), 2) + self.failUnless(self.cheese in ret) + self.failUnless(self.toast in ret) + + def test_list_of_tag_primary_keys(self): + ret = get_tag_list([self.cheese.id, self.toast.id]) + self.assertEquals(len(ret), 2) + self.failUnless(self.cheese in ret) + self.failUnless(self.toast in ret) + + def test_list_of_strings_with_strange_nontag_string(self): + ret = get_tag_list(['cheese', 'toast', 'ŠĐĆŽćžšđ']) + self.assertEquals(len(ret), 2) + self.failUnless(self.cheese in ret) + self.failUnless(self.toast in ret) + + def test_list_of_tag_instances(self): + ret = get_tag_list([self.cheese, self.toast]) + self.assertEquals(len(ret), 2) + self.failUnless(self.cheese in ret) + self.failUnless(self.toast in ret) + + def test_tuple_of_instances(self): + ret = get_tag_list((self.cheese, self.toast)) + self.assertEquals(len(ret), 2) + self.failUnless(self.cheese in ret) + self.failUnless(self.toast in ret) + + def test_with_tag_filter(self): + ret = get_tag_list(Tag.objects.filter(name__in=['cheese', 'toast'])) + self.assertEquals(len(ret), 2) + self.failUnless(self.cheese in ret) + self.failUnless(self.toast in ret) + + def test_with_invalid_input_mix_of_string_and_instance(self): + try: + get_tag_list(['cheese', self.toast]) + except ValueError, ve: + self.assertEquals(str(ve), + 'If a list or tuple of tags is provided, they must all be tag names, Tag objects or Tag ids.') + except Exception, e: + raise self.failureException('the wrong type of exception was raised: type [%s] value [%]' %\ + (str(type(e)), str(e))) + else: + raise self.failureException('a ValueError exception was supposed to be raised!') + + def test_with_invalid_input(self): + try: + get_tag_list(29) + except ValueError, ve: + self.assertEquals(str(ve), 'The tag input given was invalid.') + except Exception, e: + raise self.failureException('the wrong type of exception was raised: type [%s] value [%s]' %\ + (str(type(e)), str(e))) + else: + raise self.failureException('a ValueError exception was supposed to be raised!') + + def test_with_tag_instance(self): + self.assertEquals(get_tag(self.cheese), self.cheese) + + def test_with_string(self): + self.assertEquals(get_tag('cheese'), self.cheese) + + def test_with_primary_key(self): + self.assertEquals(get_tag(self.cheese.id), self.cheese) + + def test_nonexistent_tag(self): + self.assertEquals(get_tag('mouse'), None) + +class TestCalculateCloud(TestCase): + def setUp(self): + self.tags = [] + for line in open(os.path.join(os.path.dirname(__file__), 'tags.txt')).readlines(): + name, count = line.rstrip().split() + tag = Tag(name=name) + tag.count = int(count) + self.tags.append(tag) + + def test_default_distribution(self): + sizes = {} + for tag in calculate_cloud(self.tags, steps=5): + sizes[tag.font_size] = sizes.get(tag.font_size, 0) + 1 + + # This isn't a pre-calculated test, just making sure it's consistent + self.assertEquals(sizes[1], 48) + self.assertEquals(sizes[2], 30) + self.assertEquals(sizes[3], 19) + self.assertEquals(sizes[4], 15) + self.assertEquals(sizes[5], 10) + + def test_linear_distribution(self): + sizes = {} + for tag in calculate_cloud(self.tags, steps=5, distribution=LINEAR): + sizes[tag.font_size] = sizes.get(tag.font_size, 0) + 1 + + # This isn't a pre-calculated test, just making sure it's consistent + self.assertEquals(sizes[1], 97) + self.assertEquals(sizes[2], 12) + self.assertEquals(sizes[3], 7) + self.assertEquals(sizes[4], 2) + self.assertEquals(sizes[5], 4) + + def test_invalid_distribution(self): + try: + calculate_cloud(self.tags, steps=5, distribution='cheese') + except ValueError, ve: + self.assertEquals(str(ve), 'Invalid distribution algorithm specified: cheese.') + except Exception, e: + raise self.failureException('the wrong type of exception was raised: type [%s] value [%s]' %\ + (str(type(e)), str(e))) + else: + raise self.failureException('a ValueError exception was supposed to be raised!') + +########### +# Tagging # +########### + +class TestBasicTagging(TestCase): + def setUp(self): + self.dead_parrot = Parrot.objects.create(state='dead') + + def test_update_tags(self): + Tag.objects.update_tags(self.dead_parrot, 'foo,bar,"ter"') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 3) + self.failUnless(get_tag('foo') in tags) + self.failUnless(get_tag('bar') in tags) + self.failUnless(get_tag('ter') in tags) + + Tag.objects.update_tags(self.dead_parrot, '"foo" bar "baz"') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 3) + self.failUnless(get_tag('bar') in tags) + self.failUnless(get_tag('baz') in tags) + self.failUnless(get_tag('foo') in tags) + + def test_add_tag(self): + # start off in a known, mildly interesting state + Tag.objects.update_tags(self.dead_parrot, 'foo bar baz') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 3) + self.failUnless(get_tag('bar') in tags) + self.failUnless(get_tag('baz') in tags) + self.failUnless(get_tag('foo') in tags) + + # try to add a tag that already exists + Tag.objects.add_tag(self.dead_parrot, 'foo') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 3) + self.failUnless(get_tag('bar') in tags) + self.failUnless(get_tag('baz') in tags) + self.failUnless(get_tag('foo') in tags) + + # now add a tag that doesn't already exist + Tag.objects.add_tag(self.dead_parrot, 'zip') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 4) + self.failUnless(get_tag('zip') in tags) + self.failUnless(get_tag('bar') in tags) + self.failUnless(get_tag('baz') in tags) + self.failUnless(get_tag('foo') in tags) + + def test_add_tag_invalid_input_no_tags_specified(self): + # start off in a known, mildly interesting state + Tag.objects.update_tags(self.dead_parrot, 'foo bar baz') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 3) + self.failUnless(get_tag('bar') in tags) + self.failUnless(get_tag('baz') in tags) + self.failUnless(get_tag('foo') in tags) + + try: + Tag.objects.add_tag(self.dead_parrot, ' ') + except AttributeError, ae: + self.assertEquals(str(ae), 'No tags were given: " ".') + except Exception, e: + raise self.failureException('the wrong type of exception was raised: type [%s] value [%s]' %\ + (str(type(e)), str(e))) + else: + raise self.failureException('an AttributeError exception was supposed to be raised!') + + def test_add_tag_invalid_input_multiple_tags_specified(self): + # start off in a known, mildly interesting state + Tag.objects.update_tags(self.dead_parrot, 'foo bar baz') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 3) + self.failUnless(get_tag('bar') in tags) + self.failUnless(get_tag('baz') in tags) + self.failUnless(get_tag('foo') in tags) + + try: + Tag.objects.add_tag(self.dead_parrot, 'one two') + except AttributeError, ae: + self.assertEquals(str(ae), 'Multiple tags were given: "one two".') + except Exception, e: + raise self.failureException('the wrong type of exception was raised: type [%s] value [%s]' %\ + (str(type(e)), str(e))) + else: + raise self.failureException('an AttributeError exception was supposed to be raised!') + + def test_update_tags_exotic_characters(self): + # start off in a known, mildly interesting state + Tag.objects.update_tags(self.dead_parrot, 'foo bar baz') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 3) + self.failUnless(get_tag('bar') in tags) + self.failUnless(get_tag('baz') in tags) + self.failUnless(get_tag('foo') in tags) + + Tag.objects.update_tags(self.dead_parrot, u'ŠĐĆŽćžšđ') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 1) + self.assertEquals(tags[0].name, u'ŠĐĆŽćžšđ') + + Tag.objects.update_tags(self.dead_parrot, u'你好') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 1) + self.assertEquals(tags[0].name, u'你好') + + def test_update_tags_with_none(self): + # start off in a known, mildly interesting state + Tag.objects.update_tags(self.dead_parrot, 'foo bar baz') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 3) + self.failUnless(get_tag('bar') in tags) + self.failUnless(get_tag('baz') in tags) + self.failUnless(get_tag('foo') in tags) + + Tag.objects.update_tags(self.dead_parrot, None) + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 0) + +class TestModelTagField(TestCase): + """ Test the 'tags' field on models. """ + + def test_create_with_tags_specified(self): + f1 = FormTest.objects.create(tags=u'test3 test2 test1') + tags = Tag.objects.get_for_object(f1) + test1_tag = get_tag('test1') + test2_tag = get_tag('test2') + test3_tag = get_tag('test3') + self.failUnless(None not in (test1_tag, test2_tag, test3_tag)) + self.assertEquals(len(tags), 3) + self.failUnless(test1_tag in tags) + self.failUnless(test2_tag in tags) + self.failUnless(test3_tag in tags) + + def test_update_via_tags_field(self): + f1 = FormTest.objects.create(tags=u'test3 test2 test1') + tags = Tag.objects.get_for_object(f1) + test1_tag = get_tag('test1') + test2_tag = get_tag('test2') + test3_tag = get_tag('test3') + self.failUnless(None not in (test1_tag, test2_tag, test3_tag)) + self.assertEquals(len(tags), 3) + self.failUnless(test1_tag in tags) + self.failUnless(test2_tag in tags) + self.failUnless(test3_tag in tags) + + f1.tags = u'test4' + f1.save() + tags = Tag.objects.get_for_object(f1) + test4_tag = get_tag('test4') + self.assertEquals(len(tags), 1) + self.assertEquals(tags[0], test4_tag) + + f1.tags = '' + f1.save() + tags = Tag.objects.get_for_object(f1) + self.assertEquals(len(tags), 0) + + def test_update_via_tags(self): + f1 = FormTest.objects.create(tags=u'one two three') + Tag.objects.get(name='three').delete() + t2 = Tag.objects.get(name='two') + t2.name = 'new' + t2.save() + f1again = FormTest.objects.get(pk=f1.pk) + self.failIf('three' in f1again.tags) + self.failIf('two' in f1again.tags) + self.failUnless('new' in f1again.tags) + + def test_creation_without_specifying_tags(self): + f1 = FormTest() + self.assertEquals(f1.tags, '') + + def test_creation_with_nullable_tags_field(self): + f1 = FormTestNull() + self.assertEquals(f1.tags, '') + +class TestSettings(TestCase): + def setUp(self): + self.original_force_lower_case_tags = settings.FORCE_LOWERCASE_TAGS + self.dead_parrot = Parrot.objects.create(state='dead') + + def tearDown(self): + settings.FORCE_LOWERCASE_TAGS = self.original_force_lower_case_tags + + def test_force_lowercase_tags(self): + """ Test forcing tags to lowercase. """ + + settings.FORCE_LOWERCASE_TAGS = True + + Tag.objects.update_tags(self.dead_parrot, 'foO bAr Ter') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 3) + foo_tag = get_tag('foo') + bar_tag = get_tag('bar') + ter_tag = get_tag('ter') + self.failUnless(foo_tag in tags) + self.failUnless(bar_tag in tags) + self.failUnless(ter_tag in tags) + + Tag.objects.update_tags(self.dead_parrot, 'foO bAr baZ') + tags = Tag.objects.get_for_object(self.dead_parrot) + baz_tag = get_tag('baz') + self.assertEquals(len(tags), 3) + self.failUnless(bar_tag in tags) + self.failUnless(baz_tag in tags) + self.failUnless(foo_tag in tags) + + Tag.objects.add_tag(self.dead_parrot, 'FOO') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 3) + self.failUnless(bar_tag in tags) + self.failUnless(baz_tag in tags) + self.failUnless(foo_tag in tags) + + Tag.objects.add_tag(self.dead_parrot, 'Zip') + tags = Tag.objects.get_for_object(self.dead_parrot) + self.assertEquals(len(tags), 4) + zip_tag = get_tag('zip') + self.failUnless(bar_tag in tags) + self.failUnless(baz_tag in tags) + self.failUnless(foo_tag in tags) + self.failUnless(zip_tag in tags) + + f1 = FormTest.objects.create() + f1.tags = u'TEST5' + f1.save() + tags = Tag.objects.get_for_object(f1) + test5_tag = get_tag('test5') + self.assertEquals(len(tags), 1) + self.failUnless(test5_tag in tags) + self.assertEquals(f1.tags, u'test5') + +class TestTagUsageForModelBaseCase(TestCase): + def test_tag_usage_for_model_empty(self): + self.assertEquals(Tag.objects.usage_for_model(Parrot), []) + +class TestTagUsageForModel(TestCase): + def setUp(self): + parrot_details = ( + ('pining for the fjords', 9, True, 'foo bar'), + ('passed on', 6, False, 'bar baz ter'), + ('no more', 4, True, 'foo ter'), + ('late', 2, False, 'bar ter'), + ) + + for state, perch_size, perch_smelly, tags in parrot_details: + perch = Perch.objects.create(size=perch_size, smelly=perch_smelly) + parrot = Parrot.objects.create(state=state, perch=perch) + Tag.objects.update_tags(parrot, tags) + + def test_tag_usage_for_model(self): + tag_usage = Tag.objects.usage_for_model(Parrot, counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 4) + self.failUnless((u'bar', 3) in relevant_attribute_list) + self.failUnless((u'baz', 1) in relevant_attribute_list) + self.failUnless((u'foo', 2) in relevant_attribute_list) + self.failUnless((u'ter', 3) in relevant_attribute_list) + + def test_tag_usage_for_model_with_min_count(self): + tag_usage = Tag.objects.usage_for_model(Parrot, min_count = 2) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 3) + self.failUnless((u'bar', 3) in relevant_attribute_list) + self.failUnless((u'foo', 2) in relevant_attribute_list) + self.failUnless((u'ter', 3) in relevant_attribute_list) + + def test_tag_usage_with_filter_on_model_objects(self): + tag_usage = Tag.objects.usage_for_model(Parrot, counts=True, filters=dict(state='no more')) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 2) + self.failUnless((u'foo', 1) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_model(Parrot, counts=True, filters=dict(state__startswith='p')) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 4) + self.failUnless((u'bar', 2) in relevant_attribute_list) + self.failUnless((u'baz', 1) in relevant_attribute_list) + self.failUnless((u'foo', 1) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_model(Parrot, counts=True, filters=dict(perch__size__gt=4)) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 4) + self.failUnless((u'bar', 2) in relevant_attribute_list) + self.failUnless((u'baz', 1) in relevant_attribute_list) + self.failUnless((u'foo', 1) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_model(Parrot, counts=True, filters=dict(perch__smelly=True)) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 3) + self.failUnless((u'bar', 1) in relevant_attribute_list) + self.failUnless((u'foo', 2) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_model(Parrot, min_count=2, filters=dict(perch__smelly=True)) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 1) + self.failUnless((u'foo', 2) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_model(Parrot, filters=dict(perch__size__gt=4)) + relevant_attribute_list = [(tag.name, hasattr(tag, 'counts')) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 4) + self.failUnless((u'bar', False) in relevant_attribute_list) + self.failUnless((u'baz', False) in relevant_attribute_list) + self.failUnless((u'foo', False) in relevant_attribute_list) + self.failUnless((u'ter', False) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_model(Parrot, filters=dict(perch__size__gt=99)) + relevant_attribute_list = [(tag.name, hasattr(tag, 'counts')) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 0) + +class TestTagsRelatedForModel(TestCase): + def setUp(self): + parrot_details = ( + ('pining for the fjords', 9, True, 'foo bar'), + ('passed on', 6, False, 'bar baz ter'), + ('no more', 4, True, 'foo ter'), + ('late', 2, False, 'bar ter'), + ) + + for state, perch_size, perch_smelly, tags in parrot_details: + perch = Perch.objects.create(size=perch_size, smelly=perch_smelly) + parrot = Parrot.objects.create(state=state, perch=perch) + Tag.objects.update_tags(parrot, tags) + + def test_related_for_model_with_tag_query_sets_as_input(self): + related_tags = Tag.objects.related_for_model(Tag.objects.filter(name__in=['bar']), Parrot, counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in related_tags] + self.assertEquals(len(relevant_attribute_list), 3) + self.failUnless((u'baz', 1) in relevant_attribute_list) + self.failUnless((u'foo', 1) in relevant_attribute_list) + self.failUnless((u'ter', 2) in relevant_attribute_list) + + related_tags = Tag.objects.related_for_model(Tag.objects.filter(name__in=['bar']), Parrot, min_count=2) + relevant_attribute_list = [(tag.name, tag.count) for tag in related_tags] + self.assertEquals(len(relevant_attribute_list), 1) + self.failUnless((u'ter', 2) in relevant_attribute_list) + + related_tags = Tag.objects.related_for_model(Tag.objects.filter(name__in=['bar']), Parrot, counts=False) + relevant_attribute_list = [tag.name for tag in related_tags] + self.assertEquals(len(relevant_attribute_list), 3) + self.failUnless(u'baz' in relevant_attribute_list) + self.failUnless(u'foo' in relevant_attribute_list) + self.failUnless(u'ter' in relevant_attribute_list) + + related_tags = Tag.objects.related_for_model(Tag.objects.filter(name__in=['bar', 'ter']), Parrot, counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in related_tags] + self.assertEquals(len(relevant_attribute_list), 1) + self.failUnless((u'baz', 1) in relevant_attribute_list) + + related_tags = Tag.objects.related_for_model(Tag.objects.filter(name__in=['bar', 'ter', 'baz']), Parrot, counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in related_tags] + self.assertEquals(len(relevant_attribute_list), 0) + + def test_related_for_model_with_tag_strings_as_input(self): + # Once again, with feeling (strings) + related_tags = Tag.objects.related_for_model('bar', Parrot, counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in related_tags] + self.assertEquals(len(relevant_attribute_list), 3) + self.failUnless((u'baz', 1) in relevant_attribute_list) + self.failUnless((u'foo', 1) in relevant_attribute_list) + self.failUnless((u'ter', 2) in relevant_attribute_list) + + related_tags = Tag.objects.related_for_model('bar', Parrot, min_count=2) + relevant_attribute_list = [(tag.name, tag.count) for tag in related_tags] + self.assertEquals(len(relevant_attribute_list), 1) + self.failUnless((u'ter', 2) in relevant_attribute_list) + + related_tags = Tag.objects.related_for_model('bar', Parrot, counts=False) + relevant_attribute_list = [tag.name for tag in related_tags] + self.assertEquals(len(relevant_attribute_list), 3) + self.failUnless(u'baz' in relevant_attribute_list) + self.failUnless(u'foo' in relevant_attribute_list) + self.failUnless(u'ter' in relevant_attribute_list) + + related_tags = Tag.objects.related_for_model(['bar', 'ter'], Parrot, counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in related_tags] + self.assertEquals(len(relevant_attribute_list), 1) + self.failUnless((u'baz', 1) in relevant_attribute_list) + + related_tags = Tag.objects.related_for_model(['bar', 'ter', 'baz'], Parrot, counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in related_tags] + self.assertEquals(len(relevant_attribute_list), 0) + +class TestGetTaggedObjectsByModel(TestCase): + def setUp(self): + parrot_details = ( + ('pining for the fjords', 9, True, 'foo bar'), + ('passed on', 6, False, 'bar baz ter'), + ('no more', 4, True, 'foo ter'), + ('late', 2, False, 'bar ter'), + ) + + for state, perch_size, perch_smelly, tags in parrot_details: + perch = Perch.objects.create(size=perch_size, smelly=perch_smelly) + parrot = Parrot.objects.create(state=state, perch=perch) + Tag.objects.update_tags(parrot, tags) + + self.foo = Tag.objects.get(name='foo') + self.bar = Tag.objects.get(name='bar') + self.baz = Tag.objects.get(name='baz') + self.ter = Tag.objects.get(name='ter') + + self.pining_for_the_fjords_parrot = Parrot.objects.get(state='pining for the fjords') + self.passed_on_parrot = Parrot.objects.get(state='passed on') + self.no_more_parrot = Parrot.objects.get(state='no more') + self.late_parrot = Parrot.objects.get(state='late') + + def test_get_by_model_simple(self): + parrots = TaggedItem.objects.get_by_model(Parrot, self.foo) + self.assertEquals(len(parrots), 2) + self.failUnless(self.no_more_parrot in parrots) + self.failUnless(self.pining_for_the_fjords_parrot in parrots) + + parrots = TaggedItem.objects.get_by_model(Parrot, self.bar) + self.assertEquals(len(parrots), 3) + self.failUnless(self.late_parrot in parrots) + self.failUnless(self.passed_on_parrot in parrots) + self.failUnless(self.pining_for_the_fjords_parrot in parrots) + + def test_get_by_model_intersection(self): + parrots = TaggedItem.objects.get_by_model(Parrot, [self.foo, self.baz]) + self.assertEquals(len(parrots), 0) + + parrots = TaggedItem.objects.get_by_model(Parrot, [self.foo, self.bar]) + self.assertEquals(len(parrots), 1) + self.failUnless(self.pining_for_the_fjords_parrot in parrots) + + parrots = TaggedItem.objects.get_by_model(Parrot, [self.bar, self.ter]) + self.assertEquals(len(parrots), 2) + self.failUnless(self.late_parrot in parrots) + self.failUnless(self.passed_on_parrot in parrots) + + # Issue 114 - Intersection with non-existant tags + parrots = TaggedItem.objects.get_intersection_by_model(Parrot, []) + self.assertEquals(len(parrots), 0) + + def test_get_by_model_with_tag_querysets_as_input(self): + parrots = TaggedItem.objects.get_by_model(Parrot, Tag.objects.filter(name__in=['foo', 'baz'])) + self.assertEquals(len(parrots), 0) + + parrots = TaggedItem.objects.get_by_model(Parrot, Tag.objects.filter(name__in=['foo', 'bar'])) + self.assertEquals(len(parrots), 1) + self.failUnless(self.pining_for_the_fjords_parrot in parrots) + + parrots = TaggedItem.objects.get_by_model(Parrot, Tag.objects.filter(name__in=['bar', 'ter'])) + self.assertEquals(len(parrots), 2) + self.failUnless(self.late_parrot in parrots) + self.failUnless(self.passed_on_parrot in parrots) + + def test_get_by_model_with_strings_as_input(self): + parrots = TaggedItem.objects.get_by_model(Parrot, 'foo baz') + self.assertEquals(len(parrots), 0) + + parrots = TaggedItem.objects.get_by_model(Parrot, 'foo bar') + self.assertEquals(len(parrots), 1) + self.failUnless(self.pining_for_the_fjords_parrot in parrots) + + parrots = TaggedItem.objects.get_by_model(Parrot, 'bar ter') + self.assertEquals(len(parrots), 2) + self.failUnless(self.late_parrot in parrots) + self.failUnless(self.passed_on_parrot in parrots) + + def test_get_by_model_with_lists_of_strings_as_input(self): + parrots = TaggedItem.objects.get_by_model(Parrot, ['foo', 'baz']) + self.assertEquals(len(parrots), 0) + + parrots = TaggedItem.objects.get_by_model(Parrot, ['foo', 'bar']) + self.assertEquals(len(parrots), 1) + self.failUnless(self.pining_for_the_fjords_parrot in parrots) + + parrots = TaggedItem.objects.get_by_model(Parrot, ['bar', 'ter']) + self.assertEquals(len(parrots), 2) + self.failUnless(self.late_parrot in parrots) + self.failUnless(self.passed_on_parrot in parrots) + + def test_get_by_nonexistent_tag(self): + # Issue 50 - Get by non-existent tag + parrots = TaggedItem.objects.get_by_model(Parrot, 'argatrons') + self.assertEquals(len(parrots), 0) + + def test_get_union_by_model(self): + parrots = TaggedItem.objects.get_union_by_model(Parrot, ['foo', 'ter']) + self.assertEquals(len(parrots), 4) + self.failUnless(self.late_parrot in parrots) + self.failUnless(self.no_more_parrot in parrots) + self.failUnless(self.passed_on_parrot in parrots) + self.failUnless(self.pining_for_the_fjords_parrot in parrots) + + parrots = TaggedItem.objects.get_union_by_model(Parrot, ['bar', 'baz']) + self.assertEquals(len(parrots), 3) + self.failUnless(self.late_parrot in parrots) + self.failUnless(self.passed_on_parrot in parrots) + self.failUnless(self.pining_for_the_fjords_parrot in parrots) + + # Issue 114 - Union with non-existant tags + parrots = TaggedItem.objects.get_union_by_model(Parrot, []) + self.assertEquals(len(parrots), 0) + +class TestGetRelatedTaggedItems(TestCase): + def setUp(self): + parrot_details = ( + ('pining for the fjords', 9, True, 'foo bar'), + ('passed on', 6, False, 'bar baz ter'), + ('no more', 4, True, 'foo ter'), + ('late', 2, False, 'bar ter'), + ) + + for state, perch_size, perch_smelly, tags in parrot_details: + perch = Perch.objects.create(size=perch_size, smelly=perch_smelly) + parrot = Parrot.objects.create(state=state, perch=perch) + Tag.objects.update_tags(parrot, tags) + + self.l1 = Link.objects.create(name='link 1') + Tag.objects.update_tags(self.l1, 'tag1 tag2 tag3 tag4 tag5') + self.l2 = Link.objects.create(name='link 2') + Tag.objects.update_tags(self.l2, 'tag1 tag2 tag3') + self.l3 = Link.objects.create(name='link 3') + Tag.objects.update_tags(self.l3, 'tag1') + self.l4 = Link.objects.create(name='link 4') + + self.a1 = Article.objects.create(name='article 1') + Tag.objects.update_tags(self.a1, 'tag1 tag2 tag3 tag4') + + def test_get_related_objects_of_same_model(self): + related_objects = TaggedItem.objects.get_related(self.l1, Link) + self.assertEquals(len(related_objects), 2) + self.failUnless(self.l2 in related_objects) + self.failUnless(self.l3 in related_objects) + + related_objects = TaggedItem.objects.get_related(self.l4, Link) + self.assertEquals(len(related_objects), 0) + + def test_get_related_objects_of_same_model_limited_number_of_results(self): + # This fails on Oracle because it has no support for a 'LIMIT' clause. + # See http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:127412348064 + + # ask for no more than 1 result + related_objects = TaggedItem.objects.get_related(self.l1, Link, num=1) + self.assertEquals(len(related_objects), 1) + self.failUnless(self.l2 in related_objects) + + def test_get_related_objects_of_same_model_limit_related_items(self): + related_objects = TaggedItem.objects.get_related(self.l1, Link.objects.exclude(name='link 3')) + self.assertEquals(len(related_objects), 1) + self.failUnless(self.l2 in related_objects) + + def test_get_related_objects_of_different_model(self): + related_objects = TaggedItem.objects.get_related(self.a1, Link) + self.assertEquals(len(related_objects), 3) + self.failUnless(self.l1 in related_objects) + self.failUnless(self.l2 in related_objects) + self.failUnless(self.l3 in related_objects) + + Tag.objects.update_tags(self.a1, 'tag6') + related_objects = TaggedItem.objects.get_related(self.a1, Link) + self.assertEquals(len(related_objects), 0) + +class TestTagUsageForQuerySet(TestCase): + def setUp(self): + parrot_details = ( + ('pining for the fjords', 9, True, 'foo bar'), + ('passed on', 6, False, 'bar baz ter'), + ('no more', 4, True, 'foo ter'), + ('late', 2, False, 'bar ter'), + ) + + for state, perch_size, perch_smelly, tags in parrot_details: + perch = Perch.objects.create(size=perch_size, smelly=perch_smelly) + parrot = Parrot.objects.create(state=state, perch=perch) + Tag.objects.update_tags(parrot, tags) + + def test_tag_usage_for_queryset(self): + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.filter(state='no more'), counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 2) + self.failUnless((u'foo', 1) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.filter(state__startswith='p'), counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 4) + self.failUnless((u'bar', 2) in relevant_attribute_list) + self.failUnless((u'baz', 1) in relevant_attribute_list) + self.failUnless((u'foo', 1) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.filter(perch__size__gt=4), counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 4) + self.failUnless((u'bar', 2) in relevant_attribute_list) + self.failUnless((u'baz', 1) in relevant_attribute_list) + self.failUnless((u'foo', 1) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.filter(perch__smelly=True), counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 3) + self.failUnless((u'bar', 1) in relevant_attribute_list) + self.failUnless((u'foo', 2) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.filter(perch__smelly=True), min_count=2) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 1) + self.failUnless((u'foo', 2) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.filter(perch__size__gt=4)) + relevant_attribute_list = [(tag.name, hasattr(tag, 'counts')) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 4) + self.failUnless((u'bar', False) in relevant_attribute_list) + self.failUnless((u'baz', False) in relevant_attribute_list) + self.failUnless((u'foo', False) in relevant_attribute_list) + self.failUnless((u'ter', False) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.filter(perch__size__gt=99)) + relevant_attribute_list = [(tag.name, hasattr(tag, 'counts')) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 0) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.filter(Q(perch__size__gt=6) | Q(state__startswith='l')), counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 3) + self.failUnless((u'bar', 2) in relevant_attribute_list) + self.failUnless((u'foo', 1) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.filter(Q(perch__size__gt=6) | Q(state__startswith='l')), min_count=2) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 1) + self.failUnless((u'bar', 2) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.filter(Q(perch__size__gt=6) | Q(state__startswith='l'))) + relevant_attribute_list = [(tag.name, hasattr(tag, 'counts')) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 3) + self.failUnless((u'bar', False) in relevant_attribute_list) + self.failUnless((u'foo', False) in relevant_attribute_list) + self.failUnless((u'ter', False) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.exclude(state='passed on'), counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 3) + self.failUnless((u'bar', 2) in relevant_attribute_list) + self.failUnless((u'foo', 2) in relevant_attribute_list) + self.failUnless((u'ter', 2) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.exclude(state__startswith='p'), min_count=2) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 1) + self.failUnless((u'ter', 2) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.exclude(Q(perch__size__gt=6) | Q(perch__smelly=False)), counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 2) + self.failUnless((u'foo', 1) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + + tag_usage = Tag.objects.usage_for_queryset(Parrot.objects.exclude(perch__smelly=True).filter(state__startswith='l'), counts=True) + relevant_attribute_list = [(tag.name, tag.count) for tag in tag_usage] + self.assertEquals(len(relevant_attribute_list), 2) + self.failUnless((u'bar', 1) in relevant_attribute_list) + self.failUnless((u'ter', 1) in relevant_attribute_list) + +################ +# Model Fields # +################ + +class TestTagFieldInForms(TestCase): + def test_tag_field_in_modelform(self): + # Ensure that automatically created forms use TagField + class TestForm(forms.ModelForm): + class Meta: + model = FormTest + + form = TestForm() + self.assertEquals(form.fields['tags'].__class__.__name__, 'TagField') + + def test_recreation_of_tag_list_string_representations(self): + plain = Tag.objects.create(name='plain') + spaces = Tag.objects.create(name='spa ces') + comma = Tag.objects.create(name='com,ma') + self.assertEquals(edit_string_for_tags([plain]), u'plain') + self.assertEquals(edit_string_for_tags([plain, spaces]), u'plain, spa ces') + self.assertEquals(edit_string_for_tags([plain, spaces, comma]), u'plain, spa ces, "com,ma"') + self.assertEquals(edit_string_for_tags([plain, comma]), u'plain "com,ma"') + self.assertEquals(edit_string_for_tags([comma, spaces]), u'"com,ma", spa ces') + + def test_tag_d_validation(self): + t = TagField() + self.assertEquals(t.clean('foo'), u'foo') + self.assertEquals(t.clean('foo bar baz'), u'foo bar baz') + self.assertEquals(t.clean('foo,bar,baz'), u'foo,bar,baz') + self.assertEquals(t.clean('foo, bar, baz'), u'foo, bar, baz') + self.assertEquals(t.clean('foo qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvb bar'), + u'foo qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvb bar') + try: + t.clean('foo qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbn bar') + except forms.ValidationError, ve: + self.assertEquals(str(ve), "[u'Each tag may be no more than 50 characters long.']") + except Exception, e: + raise e + else: + raise self.failureException('a ValidationError exception was supposed to have been raised.') diff --git a/tagging/utils.py b/tagging/utils.py new file mode 100644 index 0000000..e89bab0 --- /dev/null +++ b/tagging/utils.py @@ -0,0 +1,263 @@ +""" +Tagging utilities - from user tag input parsing to tag cloud +calculation. +""" +import math +import types + +from django.db.models.query import QuerySet +from django.utils.encoding import force_unicode +from django.utils.translation import ugettext as _ + +# Python 2.3 compatibility +try: + set +except NameError: + from sets import Set as set + +def parse_tag_input(input): + """ + Parses tag input, with multiple word input being activated and + delineated by commas and double quotes. Quotes take precedence, so + they may contain commas. + + Returns a sorted list of unique tag names. + """ + if not input: + return [] + + input = force_unicode(input) + + # Special case - if there are no commas or double quotes in the + # input, we don't *do* a recall... I mean, we know we only need to + # split on spaces. + if u',' not in input and u'"' not in input: + words = list(set(split_strip(input, u' '))) + words.sort() + return words + + words = [] + buffer = [] + # Defer splitting of non-quoted sections until we know if there are + # any unquoted commas. + to_be_split = [] + saw_loose_comma = False + open_quote = False + i = iter(input) + try: + while 1: + c = i.next() + if c == u'"': + if buffer: + to_be_split.append(u''.join(buffer)) + buffer = [] + # Find the matching quote + open_quote = True + c = i.next() + while c != u'"': + buffer.append(c) + c = i.next() + if buffer: + word = u''.join(buffer).strip() + if word: + words.append(word) + buffer = [] + open_quote = False + else: + if not saw_loose_comma and c == u',': + saw_loose_comma = True + buffer.append(c) + except StopIteration: + # If we were parsing an open quote which was never closed treat + # the buffer as unquoted. + if buffer: + if open_quote and u',' in buffer: + saw_loose_comma = True + to_be_split.append(u''.join(buffer)) + if to_be_split: + if saw_loose_comma: + delimiter = u',' + else: + delimiter = u' ' + for chunk in to_be_split: + words.extend(split_strip(chunk, delimiter)) + words = list(set(words)) + words.sort() + return words + +def split_strip(input, delimiter=u','): + """ + Splits ``input`` on ``delimiter``, stripping each resulting string + and returning a list of non-empty strings. + """ + if not input: + return [] + + words = [w.strip() for w in input.split(delimiter)] + return [w for w in words if w] + +def edit_string_for_tags(tags): + """ + Given list of ``Tag`` instances, creates a string representation of + the list suitable for editing by the user, such that submitting the + given string representation back without changing it will give the + same list of tags. + + Tag names which contain commas will be double quoted. + + If any tag name which isn't being quoted contains whitespace, the + resulting string of tag names will be comma-delimited, otherwise + it will be space-delimited. + """ + names = [] + use_commas = False + for tag in tags: + name = tag.name + if u',' in name: + names.append('"%s"' % name) + continue + elif u' ' in name: + if not use_commas: + use_commas = True + names.append(name) + if use_commas: + glue = u', ' + else: + glue = u' ' + return glue.join(names) + +def get_queryset_and_model(queryset_or_model): + """ + Given a ``QuerySet`` or a ``Model``, returns a two-tuple of + (queryset, model). + + If a ``Model`` is given, the ``QuerySet`` returned will be created + using its default manager. + """ + try: + return queryset_or_model, queryset_or_model.model + except AttributeError: + return queryset_or_model._default_manager.all(), queryset_or_model + +def get_tag_list(tags): + """ + Utility function for accepting tag input in a flexible manner. + + If a ``Tag`` object is given, it will be returned in a list as + its single occupant. + + If given, the tag names in the following will be used to create a + ``Tag`` ``QuerySet``: + + * A string, which may contain multiple tag names. + * A list or tuple of strings corresponding to tag names. + * A list or tuple of integers corresponding to tag ids. + + If given, the following will be returned as-is: + + * A list or tuple of ``Tag`` objects. + * A ``Tag`` ``QuerySet``. + + """ + from tagging.models import Tag + if isinstance(tags, Tag): + return [tags] + elif isinstance(tags, QuerySet) and tags.model is Tag: + return tags + elif isinstance(tags, types.StringTypes): + return Tag.objects.filter(name__in=parse_tag_input(tags)) + elif isinstance(tags, (types.ListType, types.TupleType)): + if len(tags) == 0: + return tags + contents = set() + for item in tags: + if isinstance(item, types.StringTypes): + contents.add('string') + elif isinstance(item, Tag): + contents.add('tag') + elif isinstance(item, (types.IntType, types.LongType)): + contents.add('int') + if len(contents) == 1: + if 'string' in contents: + return Tag.objects.filter(name__in=[force_unicode(tag) \ + for tag in tags]) + elif 'tag' in contents: + return tags + elif 'int' in contents: + return Tag.objects.filter(id__in=tags) + else: + raise ValueError(_('If a list or tuple of tags is provided, they must all be tag names, Tag objects or Tag ids.')) + else: + raise ValueError(_('The tag input given was invalid.')) + +def get_tag(tag): + """ + Utility function for accepting single tag input in a flexible + manner. + + If a ``Tag`` object is given it will be returned as-is; if a + string or integer are given, they will be used to lookup the + appropriate ``Tag``. + + If no matching tag can be found, ``None`` will be returned. + """ + from tagging.models import Tag + if isinstance(tag, Tag): + return tag + + try: + if isinstance(tag, types.StringTypes): + return Tag.objects.get(name=tag) + elif isinstance(tag, (types.IntType, types.LongType)): + return Tag.objects.get(id=tag) + except Tag.DoesNotExist: + pass + + return None + +# Font size distribution algorithms +LOGARITHMIC, LINEAR = 1, 2 + +def _calculate_thresholds(min_weight, max_weight, steps): + delta = (max_weight - min_weight) / float(steps) + return [min_weight + i * delta for i in range(1, steps + 1)] + +def _calculate_tag_weight(weight, max_weight, distribution): + """ + Logarithmic tag weight calculation is based on code from the + `Tag Cloud`_ plugin for Mephisto, by Sven Fuchs. + + .. _`Tag Cloud`: http://www.artweb-design.de/projects/mephisto-plugin-tag-cloud + """ + if distribution == LINEAR or max_weight == 1: + return weight + elif distribution == LOGARITHMIC: + return math.log(weight) * max_weight / math.log(max_weight) + raise ValueError(_('Invalid distribution algorithm specified: %s.') % distribution) + +def calculate_cloud(tags, steps=4, distribution=LOGARITHMIC): + """ + Add a ``font_size`` attribute to each tag according to the + frequency of its use, as indicated by its ``count`` + attribute. + + ``steps`` defines the range of font sizes - ``font_size`` will + be an integer between 1 and ``steps`` (inclusive). + + ``distribution`` defines the type of font size distribution + algorithm which will be used - logarithmic or linear. It must be + one of ``tagging.utils.LOGARITHMIC`` or ``tagging.utils.LINEAR``. + """ + if len(tags) > 0: + counts = [tag.count for tag in tags] + min_weight = float(min(counts)) + max_weight = float(max(counts)) + thresholds = _calculate_thresholds(min_weight, max_weight, steps) + for tag in tags: + font_set = False + tag_weight = _calculate_tag_weight(tag.count, max_weight, distribution) + for i in range(steps): + if not font_set and tag_weight <= thresholds[i]: + tag.font_size = i + 1 + font_set = True + return tags diff --git a/tagging/views.py b/tagging/views.py new file mode 100644 index 0000000..9e7e2f5 --- /dev/null +++ b/tagging/views.py @@ -0,0 +1,52 @@ +""" +Tagging related views. +""" +from django.http import Http404 +from django.utils.translation import ugettext as _ +from django.views.generic.list_detail import object_list + +from tagging.models import Tag, TaggedItem +from tagging.utils import get_tag, get_queryset_and_model + +def tagged_object_list(request, queryset_or_model=None, tag=None, + related_tags=False, related_tag_counts=True, **kwargs): + """ + A thin wrapper around + ``django.views.generic.list_detail.object_list`` which creates a + ``QuerySet`` containing instances of the given queryset or model + tagged with the given tag. + + In addition to the context variables set up by ``object_list``, a + ``tag`` context variable will contain the ``Tag`` instance for the + tag. + + If ``related_tags`` is ``True``, a ``related_tags`` context variable + will contain tags related to the given tag for the given model. + Additionally, if ``related_tag_counts`` is ``True``, each related + tag will have a ``count`` attribute indicating the number of items + which have it in addition to the given tag. + """ + if queryset_or_model is None: + try: + queryset_or_model = kwargs.pop('queryset_or_model') + except KeyError: + raise AttributeError(_('tagged_object_list must be called with a queryset or a model.')) + + if tag is None: + try: + tag = kwargs.pop('tag') + except KeyError: + raise AttributeError(_('tagged_object_list must be called with a tag.')) + + tag_instance = get_tag(tag) + if tag_instance is None: + raise Http404(_('No Tag found matching "%s".') % tag) + queryset = TaggedItem.objects.get_by_model(queryset_or_model, tag_instance) + if not kwargs.has_key('extra_context'): + kwargs['extra_context'] = {} + kwargs['extra_context']['tag'] = tag_instance + if related_tags: + kwargs['extra_context']['related_tags'] = \ + Tag.objects.related_for_model(tag_instance, queryset_or_model, + counts=related_tag_counts) + return object_list(request, queryset, **kwargs) diff --git a/urls.py b/urls.py index a0c0559..4ce2dd4 100644 --- a/urls.py +++ b/urls.py @@ -1,19 +1,18 @@ from django.conf.urls.defaults import * from django.conf import settings - -# Uncomment the next two lines to enable the admin: -# from django.contrib import admin -# admin.autodiscover() +from django.contrib import admin +admin.autodiscover() urlpatterns = patterns('', - # (r'^admin/doc/', include('django.contrib.admindocs.urls')), - # (r'^admin/', include(admin.site.urls)), + (r'^coord/', include(admin.site.urls)), + (r'^blog/', include('pugce.biblion.urls')), + (r'^wiki/', include('pugce.wiki.urls')), (r'^', include('pugce.website.urls')), ) if settings.DEBUG: urlpatterns += patterns( '', ( r'^' + settings.MEDIA_URL[1:] + '(?P<path>.*)$',\ 'django.views.static.serve', \ - { 'document_root': settings.MEDIA_ROOT, 'show_indexes': False } ) + { 'document_root': settings.MEDIA_ROOT, 'show_indexes': False }) ) diff --git a/wiki/templates/wiki/base.html b/wiki/templates/wiki/base.html index 34f6b1b..7c0344a 100644 --- a/wiki/templates/wiki/base.html +++ b/wiki/templates/wiki/base.html @@ -1,33 +1,33 @@ {% load i18n %} <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>{% block title %}{% endblock %} - WikiApp</title> - <link rel="stylesheet" href="{% url wiki_static_media "wiki/wikiapp.css" %}"> + <link rel="stylesheet" href="{{ MEDIA_URL }}wiki/wikiapp.css"> </head> <body> <div id="head"> <h1>wikiapp</h1> {% include "wiki/searchbox.html" %} </div> <div id="actions"> {% block footer %}{% endblock %} <a href="{% url wiki_list %}">{% trans "List all articles" %}</a> | <a href="{% url wiki_history %}">{% trans "Recent Changes" %}</a> </div> <div id="article"> {% include "wiki/messages.html" %} {% block content %}{% endblock %} </div> <div id="footer"> Powered by <a href="http://code.google.com/p/django-wikiapp">django-wikiapp</a> </div> </body> </html>
italomaia/pugce
0ccdc2c5afbe5fc87e52738eecf488109115edc3
formataçãozinha
diff --git a/settings.py b/settings.py index 973b23c..10f2355 100644 --- a/settings.py +++ b/settings.py @@ -1,100 +1,78 @@ # -*- coding:utf-8 -*- from os import path BIBLION_SECTIONS = [] BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } -# Local time zone for this installation. Choices can be found here: -# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -# although not all choices may be available on all operating systems. -# On Unix systems, a value of None will cause Django to use the same -# timezone as the operating system. -# If running in a Windows environment this must be set to the same as your -# system time zone. TIME_ZONE = 'America/Fortaleza' -# Language code for this installation. All choices can be found here: -# http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'pt-br' SITE_ID = 1 -# If you set this to False, Django will make some optimizations so as not -# to load the internationalization machinery. USE_I18N = True -# If you set this to False, Django will not format dates, numbers and -# calendars according to the current locale USE_L10N = True -# Absolute path to the directory that holds media. -# Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = path.join(BASE_DIR, 'media_root') -# URL that handles the media served from MEDIA_ROOT. Make sure to use a -# trailing slash if there is a path component (optional in other cases). -# Examples: "http://media.lawrence.com", "http://example.com/media/" MEDIA_URL = '/media/' -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". ADMIN_MEDIA_PREFIX = '/admin_media/' -# Make this unique, and don't share it with anybody. SECRET_KEY = 'chave_secreta' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), path.join(BASE_DIR, 'biblion/templates'), path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', - 'django.contrib.messages', - # Uncomment the next line to enable the admin: - # 'django.contrib.admin', + 'django.contrib.messages', + 'django.contrib.admin', + # -- APPS -- 'pugce.biblion', 'pugce.wiki', )
italomaia/pugce
6cb39fba95e228e9fa94d5e7b5c6d35693840bcf
aplicativo de wiki e configurações do settings
diff --git a/settings.py b/settings.py index 39bf6ac..973b23c 100644 --- a/settings.py +++ b/settings.py @@ -1,97 +1,100 @@ # -*- coding:utf-8 -*- from os import path BIBLION_SECTIONS = [] BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # On Unix systems, a value of None will cause Django to use the same # timezone as the operating system. # If running in a Windows environment this must be set to the same as your # system time zone. TIME_ZONE = 'America/Fortaleza' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'pt-br' SITE_ID = 1 # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N = True # If you set this to False, Django will not format dates, numbers and # calendars according to the current locale USE_L10N = True # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = path.join(BASE_DIR, 'media_root') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). # Examples: "http://media.lawrence.com", "http://example.com/media/" MEDIA_URL = '/media/' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/", "/media/". ADMIN_MEDIA_PREFIX = '/admin_media/' # Make this unique, and don't share it with anybody. SECRET_KEY = 'chave_secreta' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), + path.join(BASE_DIR, 'biblion/templates'), + path.join(BASE_DIR, 'wiki/templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', # Uncomment the next line to enable the admin: # 'django.contrib.admin', - 'biblion' + 'pugce.biblion', + 'pugce.wiki', ) diff --git a/wiki/._feeds.py b/wiki/._feeds.py new file mode 100644 index 0000000..a3be7a5 Binary files /dev/null and b/wiki/._feeds.py differ diff --git a/wiki/._forms.py b/wiki/._forms.py new file mode 100644 index 0000000..4e6040c Binary files /dev/null and b/wiki/._forms.py differ diff --git a/wiki/._models.py b/wiki/._models.py new file mode 100644 index 0000000..80d90cd Binary files /dev/null and b/wiki/._models.py differ diff --git a/wiki/._views.py b/wiki/._views.py new file mode 100644 index 0000000..3505f19 Binary files /dev/null and b/wiki/._views.py differ diff --git a/wiki/__init__.py b/wiki/__init__.py new file mode 100644 index 0000000..c3f7a91 --- /dev/null +++ b/wiki/__init__.py @@ -0,0 +1,3 @@ +from wiki.templatetags.restructuredtext import restructuredtext + +restructuredtext('`Available as 1.0 since September, 2007 <http://www.modwsgi.org/>`') diff --git a/wiki/admin.py b/wiki/admin.py new file mode 100644 index 0000000..90e06b2 --- /dev/null +++ b/wiki/admin.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- + +from django.contrib import admin + +from wiki.models import Article, ChangeSet + + +class InlineChangeSet(admin.TabularInline): + model = ChangeSet + extra = 0 + raw_id_fields = ('editor',) + +class ArticleAdmin(admin.ModelAdmin): + list_display = ('title', 'markup', 'created_at') + list_filter = ('title',) + ordering = ('last_update',) + fieldsets = ( + (None, {'fields': ('title', 'content', 'markup')}), + ('Creator', {'fields': ('creator', 'creator_ip'), + 'classes': ('collapse', 'wide')}), + ('Group', {'fields': ('object_id', 'content_type'), + 'classes': ('collapse', 'wide')}), + ) + raw_id_fields = ('creator',) + inlines = [InlineChangeSet] + +admin.site.register(Article, ArticleAdmin) + + +class ChangeSetAdmin(admin.ModelAdmin): + list_display = ('article', 'revision', 'old_title', 'old_markup', + 'editor', 'editor_ip', 'reverted', 'modified', + 'comment') + list_filter = ('old_title', 'content_diff') + ordering = ('modified',) + fieldsets = ( + ('Article', {'fields': ('article',)}), + ('Differences', {'fields': ('old_title', 'old_markup', + 'content_diff')}), + ('Other', {'fields': ('comment', 'modified', 'revision', 'reverted'), + 'classes': ('collapse', 'wide')}), + ('Editor', {'fields': ('editor', 'editor_ip'), + 'classes': ('collapse', 'wide')}), + ) + raw_id_fields = ('editor',) + +admin.site.register(ChangeSet, ChangeSetAdmin) diff --git a/wiki/creole2html.py b/wiki/creole2html.py new file mode 100644 index 0000000..30ea410 --- /dev/null +++ b/wiki/creole2html.py @@ -0,0 +1,286 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +r""" +WikiCreole to HTML converter +This program is an example of how the creole.py WikiCreole parser +can be used. + +@copyright: 2007 MoinMoin:RadomirDopieralski +@license: BSD, see COPYING for details. + +Test cases contributed by Jan Klopper (janklopper@underdark.nl), +modified by Radomir Dopieralski (MoinMoin:RadomirDopieralski). + +>>> import lxml.html.usedoctest +>>> def parse(text): +... print HtmlEmitter(Parser(text).parse()).emit() + +>>> parse(u'test') +<p>test</p> + +>>> parse(u'test\ntest') +<p>test test</p> + +>>> HtmlEmitter(Parser(u'test\ntest').parse()).emit() +u'<p>test test</p>\n' + +>>> parse(u'test\n\ntest') +<p>test</p><p>test</p> + +>>> parse(u'test\\\\test') +<p>test<br>test</p> + +>>> parse(u'ÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïñòóôõöøùúûüýÿŒœ%0A') +<p>ÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïñòóôõöøùúûüýÿŒœ%0A</p> + +>>> parse(u'----') +<hr> + +>>> parse(u'==test==') +<h2>test</h2> + +>>> parse(u'== test') +<h2>test</h2> + +>>> parse(u'==test====') +<h2>test</h2> + +>>> parse(u'=====test') +<h5>test</h5> + +>>> parse(u'==test==\ntest\n===test===') +<h2>test</h2> +<p>test</p> +<h3>test</h3> + +>>> parse(u'test\n* test line one\n * test line two\ntest\n\ntest') +<p>test</p> +<ul> + <li>test line one</li> + <li>test line two test</li> +</ul> +<p>test</p> + +>>> parse(u'* test line one\n* test line two\n** Nested item') +<ul> + <li>test line one</li> + <li>test line two<ul> + <li>Nested item</li> + </ul></li> +</ul> + +>>> parse(u'* test line one\n* test line two\n# Nested item') +<ul> + <li>test line one</li> + <li>test line two<ol> + <li>Nested item</li> + </ol></li> +</ul> + +>>> parse(u'test //test test// test **test test** test') +<p>test <i>test test</i> test <b>test test</b> test</p> + +>>> parse(u'test //test **test// test** test') +<p>test <i>test <b>test<i> test<b> test</b></i></b></i></p> + +>>> parse(u'**test') +<p><b>test</b></p> + +>>> parse(u'|x|y|z|\n|a|b|c|\n|d|e|f|\ntest') +<table> + <tr><td>x</td><td>y</td><td>z</td></tr> + <tr><td>a</td><td>b</td><td>c</td></tr> + <tr><td>d</td><td>e</td><td>f</td></tr> +</table> +<p>test</p> + +>>> parse(u'|=x|y|=z=|\n|a|b|c|\n|d|e|f|') +<table> + <tr><th>x</th><td>y</td><th>z</th></tr> + <tr><td>a</td><td>b</td><td>c</td></tr> + <tr><td>d</td><td>e</td><td>f</td></tr> +</table> + +>>> parse(u'test http://example.com/test test') +<p>test <a href="http://example.com/test">http://example.com/test</a> test</p> + +>>> parse(u'http://example.com/,test, test') +<p><a href="http://example.com/,test">http://example.com/,test</a>, test</p> + +>>> parse(u'(http://example.com/test)') +<p>(<a href="http://example.com/test">http://example.com/test</a>)</p> + +XXX This might be considered a bug, but it's impossible to detect in general. +>>> parse(u'http://example.com/(test)') +<p><a href="http://example.com/(test">http://example.com/(test</a>)</p> + +>>> parse(u'http://example.com/test?test&test=1') +<p><a href="http://example.com/test?test&amp;test=1">http://example.com/test?test&amp;test=1</a></p> + +>>> parse(u'~http://example.com/test') +<p>http://example.com/test</p> + +>>> parse(u'http://example.com/~test') +<p><a href="http://example.com/~test">http://example.com/~test</a></p> + +>>> parse(u'[[test]] [[tset|test]]') +<p><a href="test">test</a> <a href="tset">test</a></p> + +>>> parse(u'[[http://example.com|test]]') +<p><a href="http://example.com">test</a></p> +""" + +import re +from creole import Parser + +class Rules: + # For the link targets: + proto = r'http|https|ftp|nntp|news|mailto|telnet|file|irc' + extern = r'(?P<extern_addr>(?P<extern_proto>%s):.*)' % proto + interwiki = r''' + (?P<inter_wiki> [A-Z][a-zA-Z]+ ) : + (?P<inter_page> .* ) + ''' + +class HtmlEmitter: + """ + Generate HTML output for the document + tree consisting of DocNodes. + """ + + addr_re = re.compile('|'.join([ + Rules.extern, + Rules.interwiki, + ]), re.X | re.U) # for addresses + + def __init__(self, root): + self.root = root + + def get_text(self, node): + """Try to emit whatever text is in the node.""" + + try: + return node.children[0].content or '' + except: + return node.content or '' + + def html_escape(self, text): + return text.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;') + + def attr_escape(self, text): + return self.html_escape(text).replace('"', '&quot') + + # *_emit methods for emitting nodes of the document: + + def document_emit(self, node): + return self.emit_children(node) + + def text_emit(self, node): + return self.html_escape(node.content) + + def separator_emit(self, node): + return u'<hr>'; + + def paragraph_emit(self, node): + return u'<p>%s</p>\n' % self.emit_children(node) + + def bullet_list_emit(self, node): + return u'<ul>\n%s</ul>\n' % self.emit_children(node) + + def number_list_emit(self, node): + return u'<ol>\n%s</ol>\n' % self.emit_children(node) + + def list_item_emit(self, node): + return u'<li>%s</li>\n' % self.emit_children(node) + + def table_emit(self, node): + return u'<table>\n%s</table>\n' % self.emit_children(node) + + def table_row_emit(self, node): + return u'<tr>%s</tr>\n' % self.emit_children(node) + + def table_cell_emit(self, node): + return u'<td>%s</td>' % self.emit_children(node) + + def table_head_emit(self, node): + return u'<th>%s</th>' % self.emit_children(node) + + def emphasis_emit(self, node): + return u'<i>%s</i>' % self.emit_children(node) + + def strong_emit(self, node): + return u'<b>%s</b>' % self.emit_children(node) + + def header_emit(self, node): + return u'<h%d>%s</h%d>\n' % ( + node.level, self.html_escape(node.content), node.level) + + def code_emit(self, node): + return u'<tt>%s</tt>' % self.html_escape(node.content) + + def link_emit(self, node): + target = node.content + if node.children: + inside = self.emit_children(node) + else: + inside = self.html_escape(target) + m = self.addr_re.match(target) + if m: + if m.group('extern_addr'): + return u'<a href="%s">%s</a>' % ( + self.attr_escape(target), inside) + elif m.group('inter_wiki'): + raise NotImplementedError + return u'<a href="%s">%s</a>' % ( + self.attr_escape(target), inside) + + def image_emit(self, node): + target = node.content + text = self.get_text(node) + m = self.addr_re.match(target) + if m: + if m.group('extern_addr'): + return u'<img src="%s" alt="%s">' % ( + self.attr_escape(target), self.attr_escape(text)) + elif m.group('inter_wiki'): + raise NotImplementedError + return u'<img src="%s" alt="%s">' % ( + self.attr_escape(target), self.attr_escape(text)) + + def macro_emit(self, node): + raise NotImplementedError + + def break_emit(self, node): + return u"<br>" + + def preformatted_emit(self, node): + return u"<pre>%s</pre>" % self.html_escape(node.content) + + def default_emit(self, node): + """Fallback function for emitting unknown nodes.""" + + raise TypeError + + def emit_children(self, node): + """Emit all the children of a node.""" + + return u''.join([self.emit_node(child) for child in node.children]) + + def emit_node(self, node): + """Emit a single node.""" + + emit = getattr(self, '%s_emit' % node.kind, self.default_emit) + return emit(node) + + def emit(self): + """Emit the document represented by self.root DOM tree.""" + + return self.emit_node(self.root) + +if __name__=="__main__": + import sys + document = Parser(unicode(sys.stdin.read(), 'utf-8', 'ignore')).parse() + sys.stdout.write(HtmlEmitter(document).emit().encode('utf-8', 'ignore')) + + diff --git a/wiki/feeds.py b/wiki/feeds.py new file mode 100644 index 0000000..28f0aac --- /dev/null +++ b/wiki/feeds.py @@ -0,0 +1,219 @@ +from django.contrib.syndication.feeds import Feed, FeedDoesNotExist +from django.utils.feedgenerator import Atom1Feed +from django.contrib.contenttypes.models import ContentType +from django.core.exceptions import ObjectDoesNotExist +from django.core.urlresolvers import reverse +from django.utils.translation import ugettext_lazy as _ +from django.http import Http404 +from django.shortcuts import get_object_or_404, render_to_response +from django.template import Context, Template +from django.template.loader import get_template +from wiki.models import ChangeSet, Article +from wiki.utils import get_ct +import atomformat as atom + +ALL_ARTICLES = Article.objects.all() +ALL_CHANGES = ChangeSet.objects.all() + +class RssHistoryFeed(Feed): + + title = 'History for all articles' + link = '/wiki/' + description = 'Recent changes in wiki' + + def __init__(self, request, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES, + extra_context=None, + title_template = u'feeds/history_title.html', + description_template = u'feeds/history_description.html', + *args, **kw): + + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + self.changes_qs = changes_qs.filter(article__content_type=get_ct(group), + article__object_id=group.id) + else: + self.changes_qs = changes_qs.filter(article__object_id=None) + + self.title_template = title_template + self.description_template = description_template + super(RssHistoryFeed, self).__init__('', request) + + def items(self): + return self.changes_qs.order_by('-modified')[:30] + + def item_pubdate(self, item): + """ + Return the item's pubdate. It's this modified date + """ + return item.modified + + +class AtomHistoryFeed(atom.Feed): + + feed_title = 'History for all articles' + feed_subtitle = 'Recent changes in wiki' + + def __init__(self, request, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES, + extra_context=None, + title_template = u'feeds/history_title.html', + description_template = u'feeds/history_description.html', + *args, **kw): + + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + self.changes_qs = changes_qs.filter(article__content_type=get_ct(group), + article__object_id=group.id) + else: + self.changes_qs = changes_qs.filter(article__object_id=None) + + self.title_template = get_template(title_template) + self.description_template = get_template(description_template) + super(AtomHistoryFeed, self).__init__('', request) + + def feed_id(self): + return "feed_id" + + def items(self): + return self.changes_qs.order_by('-modified')[:30] + + def item_id(self, item): + return "%s" % item.id + + def item_title(self, item): + c = Context({'obj' : item}) + return self.title_template.render(c) + + def item_updated(self, item): + return item.modified + + def item_authors(self, item): + if item.is_anonymous_change(): + return [{'name' : _('Anonimous')},] + return [{'name' : item.editor.username},] + + def item_links(self, item): + return [{'href': item.get_absolute_url()}, ] + + def item_content(self, item): + c = Context({'obj' : item,}) + return ({'type': 'html'}, self.description_template.render(c)) + + +class RssArticleHistoryFeed(Feed): + + def __init__(self, title, request, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES, + extra_context=None, + title_template = u'feeds/history_title.html', + description_template = u'feeds/history_description.html', + *args, **kw): + + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + self.article_qs = article_qs.filter(content_type=get_ct(group), + object_id=group.id) + else: + self.article_qs = article_qs.filter(object_id=None) + + self.title_template = title_template + self.description_template = description_template + super(RssArticleHistoryFeed, self).__init__(title, request) + + def get_object(self, bits): + return self.article_qs.get(title = bits[0]) + + def title(self, obj): + return "History for: %s " % obj.title + + def link(self, obj): + if not obj: + raise FeedDoesNotExist + return obj.get_absolute_url() + + def description(self, obj): + return "Recent changes in %s" % obj.title + + def items(self, obj): + return ChangeSet.objects.filter(article__id__exact=obj.id).order_by('-modified')[:30] + + def item_pubdate(self, item): + """ + Returns the modified date + """ + return item.modified + + +class AtomArticleHistoryFeed(atom.Feed): + + def __init__(self, title, request, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES, + extra_context=None, + title_template = u'feeds/history_title.html', + description_template = u'feeds/history_description.html', + *args, **kw): + + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + self.article_qs = article_qs.filter(content_type=get_ct(group), + object_id=group.id) + else: + self.article_qs = article_qs.filter(object_id=None) + + self.title_template = get_template(title_template) + self.description_template = get_template(description_template) + super(AtomArticleHistoryFeed, self).__init__('', request) + + def get_object(self, bits): + return self.article_qs.get(title = bits[0]) + + def feed_title(self, obj): + return "History for: %s " % obj.title + + def feed_subtitle(self, obj): + return "Recent changes in %s" % obj.title + + def feed_id(self): + return "feed_id" + + def items(self, obj): + return ChangeSet.objects.filter(article__id__exact=obj.id).order_by('-modified')[:30] + + def item_id(self, item): + return "%s" % item.id + + def item_title(self, item): + c = Context({'obj' : item}) + return self.title_template.render(c) + + def item_updated(self, item): + return item.modified + + def item_authors(self, item): + if item.is_anonymous_change(): + return [{'name' : _('Anonimous')},] + return [{'name' : item.editor.username},] + + def item_links(self, item): + return [{'href': item.get_absolute_url()},] + + def item_content(self, item): + c = Context({'obj' : item, }) + return ({'type': 'html'}, self.description_template.render(c)) diff --git a/wiki/forms.py b/wiki/forms.py new file mode 100644 index 0000000..839fdd8 --- /dev/null +++ b/wiki/forms.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +import re + +from django import forms +from django.forms import widgets +from django.conf import settings +from django.contrib.contenttypes.models import ContentType +from django.utils.translation import ugettext_lazy as _ + +from wiki.models import Article + +try: + WIKI_WORD_RE = settings.WIKI_WORD_RE +except AttributeError: + WIKI_WORD_RE = r'(?:[A-Z]+[a-z]+){2,}' + + +wikiword_pattern = re.compile('^' + WIKI_WORD_RE + '$') + + +class ArticleForm(forms.ModelForm): + + + content = forms.CharField( + widget=forms.Textarea(attrs={'rows': '20'})) + + summary = forms.CharField( + required=False, max_length=150, + widget=forms.Textarea(attrs={'rows': '5'})) + + comment = forms.CharField(required=False, max_length=50) + user_ip = forms.CharField(widget=forms.HiddenInput) + + content_type = forms.ModelChoiceField( + queryset=ContentType.objects.all(), + required=False, + widget=forms.HiddenInput) + object_id = forms.IntegerField(required=False, + widget=forms.HiddenInput) + + action = forms.CharField(widget=forms.HiddenInput) + + class Meta: + model = Article + exclude = ('creator', 'creator_ip', 'removed', + 'group', 'created_at', 'last_update') + + def clean_title(self): + """ Page title must be a WikiWord. + """ + title = self.cleaned_data['title'] + if not wikiword_pattern.match(title): + raise forms.ValidationError(_('Must be a WikiWord.')) + + return title + + def clean(self): + super(ArticleForm, self).clean() + kw = {} + + if self.cleaned_data['action'] == 'create': + try: + kw['title'] = self.cleaned_data['title'] + kw['content_type'] = self.cleaned_data['content_type'] + kw['object_id'] = self.cleaned_data['object_id'] + except KeyError: + pass # some error in this fields + else: + if Article.objects.filter(**kw).count(): + raise forms.ValidationError( + _("An article with this title already exists.")) + + return self.cleaned_data + + def save(self): + # 0 - Extra data + editor_ip = self.cleaned_data['user_ip'] + comment = self.cleaned_data['comment'] + + # 1 - Get the old stuff before saving + if self.instance.id is None: + old_title = old_content = old_markup = '' + new = True + else: + old_title = self.instance.title + old_content = self.instance.content + old_markup = self.instance.markup + new = False + + # 2 - Save the Article + article = super(ArticleForm, self).save() + + # 3 - Set creator and group + editor = getattr(self, 'editor', None) + group = getattr(self, 'group', None) + if new: + article.creator_ip = editor_ip + if editor is not None: + article.creator = editor + article.group = group + article.save() + + # 4 - Create new revision + changeset = article.new_revision( + old_content, old_title, old_markup, + comment, editor_ip, editor) + + return article, changeset + + +class SearchForm(forms.Form): + search_term = forms.CharField(required=True) diff --git a/wiki/management.py b/wiki/management.py new file mode 100644 index 0000000..250510a --- /dev/null +++ b/wiki/management.py @@ -0,0 +1,23 @@ +from django.db.models import signals + +from django.utils.translation import ugettext_noop as _ + +try: + from notification import models as notification + + def create_notice_types(app, created_models, verbosity, **kwargs): + notification.create_notice_type("wiki_article_edited", + _("Article Edited"), + _("your article has been edited")) + notification.create_notice_type("wiki_revision_reverted", + _("Article Revision Reverted"), + _("your revision has been reverted")) + notification.create_notice_type("wiki_observed_article_changed", + _("Observed Article Changed"), + _("an article you observe has changed")) + + + signals.post_syncdb.connect(create_notice_types, + sender=notification) +except ImportError: + print "Skipping creation of NoticeTypes as notification app not found" diff --git a/wiki/media/wiki/wikiapp.css b/wiki/media/wiki/wikiapp.css new file mode 100644 index 0000000..983b60c --- /dev/null +++ b/wiki/media/wiki/wikiapp.css @@ -0,0 +1,130 @@ +html { + background: #234F32; + height: 100%; +} + +body { + margin: 0; + font-family: sans-serif; + background: #fff; + width: 90%; + height: 100%; + margin: auto; +} + +div { + padding: 5px; +} + +#head { + color: #fff; + background: #092E20; + overflow: auto; + height: 120px; +} + +#head h1 { + float: left; + font-size: 42px; +} + +#searchbox { + float: right; +} + +#actions { + text-align: right; + background: #9AEF3F; +} + +#article { + background: #fff; +} + +#article h1 { + border-bottom: 1px solid #000; +} + +p { + text-align: justify; +} + +p label { + display: block; +} + +p.required label { + font-weight: bold; +} + +table, th , tr, td { + border-spacing: 0; +} + +table { + width: 100%; + margin-bottom: 6px; +} + +.tbheader { + background: #ccc; +} + +.tbodd { + background: #fff; +} + +.tbeven { + background: #eee; +} + +ul.errorlist { + padding: 0; + margin: 15px; + list-style: none; +} + +ul.errorlist li:before { + content: "<!> "; +} + +ul.errorlist li { + background: #C00; + color: #FFF; +} + +#footer { + border-top: 1px solid #ccc; + text-align: center; + background: #fff; +} + +#id_comment, textarea { + width: 80%; +} + +#id_tags, #id_comment, #id_title, textarea { + font-size: 1em; + background: #fff; + color: #000; + border: 1px solid #ccc; +} + +#id_comment:focus, #id_title:focus, #id_tags:focus, input:focus, textarea:focus { + background: #ffc; +} + +#messages { + border: 1px solid #c90; + background: #ff9; +} + +a { + color: #AB5603; + text-decoration: none; +} + +a:hover { + color: #FFE761; + text-decoration: underline; +} diff --git a/wiki/models.py b/wiki/models.py new file mode 100644 index 0000000..ce58d4a --- /dev/null +++ b/wiki/models.py @@ -0,0 +1,304 @@ +from datetime import datetime +from django.core.urlresolvers import reverse + +# Google Diff Match Patch library +# http://code.google.com/p/google-diff-match-patch +from diff_match_patch import diff_match_patch + +from django.db import models +from django.conf import settings +from django.contrib.auth.models import User +from django.utils.translation import ugettext_lazy as _ +from django.contrib.contenttypes.models import ContentType +from django.contrib.contenttypes import generic +from django.db.models.query import QuerySet + +from tagging.fields import TagField +from tagging.models import Tag + +from wiki.utils import get_ct + +try: + from notification import models as notification + from django.db.models import signals +except ImportError: + notification = None + +# We dont need to create a new one everytime +dmp = diff_match_patch() + +def diff(txt1, txt2): + """Create a 'diff' from txt1 to txt2.""" + patch = dmp.patch_make(txt1, txt2) + return dmp.patch_toText(patch) + +try: + markup_choices = settings.WIKI_MARKUP_CHOICES +except AttributeError: + markup_choices = ( + ('creole', _(u'Creole')), + ('restructuredtext', _(u'reStructuredText')), + ('textile', _(u'Textile')), + ('markdown', _(u'Markdown')), + ) + + +# Avoid boilerplate defining our own querysets +class QuerySetManager(models.Manager): + def get_query_set(self): + return self.model.QuerySet(self.model) + + +class NonRemovedArticleManager(QuerySetManager): + def get_query_set(self): + q = super(NonRemovedArticleManager, self).get_query_set() + return q.filter(removed=False) + + +class Article(models.Model): + """ A wiki page. + """ + title = models.CharField(_(u"Title"), max_length=50) + content = models.TextField(_(u"Content")) + summary = models.CharField(_(u"Summary"), max_length=150, + null=True, blank=True) + markup = models.CharField(_(u"Content Markup"), max_length=20, + choices=markup_choices, + null=True, blank=True) + creator = models.ForeignKey(User, verbose_name=_('Article Creator'), + null=True) + creator_ip = models.IPAddressField(_("IP Address of the Article Creator"), + blank=True, null=True) + created_at = models.DateTimeField(default=datetime.now) + last_update = models.DateTimeField(blank=True, null=True) + removed = models.BooleanField(_("Is removed?"), default=False) + + content_type = models.ForeignKey(ContentType, null=True) + object_id = models.PositiveIntegerField(null=True) + group = generic.GenericForeignKey('content_type', 'object_id') + + tags = TagField() + + objects = QuerySetManager() + + non_removed_objects = NonRemovedArticleManager() + + class QuerySet(QuerySet): + + def get_by(self, title, group=None): + if group is None: + return self.get(object_id=None, title=title) + return group.content_objects(self.filter(title=title)).get() + + class Meta: + verbose_name = _(u'Article') + verbose_name_plural = _(u'Articles') + + def get_absolute_url(self): + if self.group is None: + return reverse('wiki_article', args=(self.title,)) + return self.group.get_absolute_url() + 'wiki/' + self.title + + def save(self, force_insert=False, force_update=False): + self.last_update = datetime.now() + super(Article, self).save(force_insert, force_update) + + def remove(self): + """ Mark the Article as 'removed'. If the article is + already removed, delete it. + Returns True if the article was deleted, False when just marked + as removed. + """ + if self.removed: + self.delete() + return True + else: + self.removed = True + self.save() + return False + + def latest_changeset(self): + try: + return self.changeset_set.filter( + reverted=False).order_by('-revision')[0] + except IndexError: + return ChangeSet.objects.none() + + def new_revision(self, old_content, old_title, old_markup, + comment, editor_ip, editor): + '''Create a new ChangeSet with the old content.''' + + content_diff = diff(self.content, old_content) + + cs = ChangeSet.objects.create( + article=self, + comment=comment, + editor_ip=editor_ip, + editor=editor, + old_title=old_title, + old_markup=old_markup, + content_diff=content_diff) + + if None not in (notification, self.creator): + if editor is None: + editor = editor_ip + notification.send([self.creator], "wiki_article_edited", + {'article': self, 'user': editor}) + + return cs + + def revert_to(self, revision, editor_ip, editor=None): + """ Revert the article to a previuos state, by revision number. + """ + changeset = self.changeset_set.get(revision=revision) + changeset.reapply(editor_ip, editor) + + + def __unicode__(self): + return self.title + + +class NonRevertedChangeSetManager(QuerySetManager): + + def get_default_queryset(self): + super(NonRevertedChangeSetManager, self).get_query_set().filter( + reverted=False) + + +class ChangeSet(models.Model): + """A report of an older version of some Article.""" + + article = models.ForeignKey(Article, verbose_name=_(u"Article")) + + # Editor identification -- logged or anonymous + editor = models.ForeignKey(User, verbose_name=_(u'Editor'), + null=True) + editor_ip = models.IPAddressField(_(u"IP Address of the Editor")) + + # Revision number, starting from 1 + revision = models.IntegerField(_(u"Revision Number")) + + # How to recreate this version + old_title = models.CharField(_(u"Old Title"), max_length=50, blank=True) + old_markup = models.CharField(_(u"Article Content Markup"), max_length=20, + choices=markup_choices, + null=True, blank=True) + content_diff = models.TextField(_(u"Content Patch"), blank=True) + + comment = models.CharField(_(u"Editor comment"), max_length=50, blank=True) + modified = models.DateTimeField(_(u"Modified at"), default=datetime.now) + reverted = models.BooleanField(_(u"Reverted Revision"), default=False) + + objects = QuerySetManager() + non_reverted_objects = NonRevertedChangeSetManager() + + class QuerySet(QuerySet): + def all_later(self, revision): + """ Return all changes later to the given revision. + Util when we want to revert to the given revision. + """ + return self.filter(revision__gt=int(revision)) + + + class Meta: + verbose_name = _(u'Change set') + verbose_name_plural = _(u'Change sets') + get_latest_by = 'modified' + ordering = ('-revision',) + + def __unicode__(self): + return u'#%s' % self.revision + + @models.permalink + def get_absolute_url(self): + if self.article.group is None: + return ('wiki_changeset', (), + {'title': self.article.title, + 'revision': self.revision}) + return ('wiki_changeset', (), + {'group_slug': self.article.group.slug, + 'title': self.article.title, + 'revision': self.revision}) + + + def is_anonymous_change(self): + return self.editor is None + + def reapply(self, editor_ip, editor): + """ Return the Article to this revision. + """ + + # XXX Would be better to exclude reverted revisions + # and revisions previous/next to reverted ones + next_changes = self.article.changeset_set.filter( + revision__gt=self.revision).order_by('-revision') + + article = self.article + + content = None + for changeset in next_changes: + if content is None: + content = article.content + patch = dmp.patch_fromText(changeset.content_diff) + content = dmp.patch_apply(patch, content)[0] + + changeset.reverted = True + changeset.save() + + old_content = article.content + old_title = article.title + old_markup = article.markup + + article.content = content + article.title = changeset.old_title + article.markup = changeset.old_markup + article.save() + + article.new_revision( + old_content=old_content, old_title=old_title, + old_markup=old_markup, + comment="Reverted to revision #%s" % self.revision, + editor_ip=editor_ip, editor=editor) + + self.save() + + if None not in (notification, self.editor): + notification.send([self.editor], "wiki_revision_reverted", + {'revision': self, 'article': self.article}) + + def save(self, force_insert=False, force_update=False): + """ Saves the article with a new revision. + """ + if self.id is None: + try: + self.revision = ChangeSet.objects.filter( + article=self.article).latest().revision + 1 + except self.DoesNotExist: + self.revision = 1 + super(ChangeSet, self).save(force_insert, force_update) + + def display_diff(self): + ''' Returns a HTML representation of the diff. + ''' + + # well, it *will* be the old content + old_content = self.article.content + + # newer non-reverted revisions of this article, starting from this + newer_changesets = ChangeSet.non_reverted_objects.filter( + article=self.article, + revision__gte=self.revision) + + # apply all patches to get the content of this revision + for i, changeset in enumerate(newer_changesets): + patches = dmp.patch_fromText(changeset.content_diff) + if len(newer_changesets) == i+1: + # we need to compare with the next revision after the change + next_rev_content = old_content + old_content = dmp.patch_apply(patches, old_content)[0] + + diffs = dmp.diff_main(old_content, next_rev_content) + return dmp.diff_prettyHtml(diffs) + +if notification is not None: + signals.post_save.connect(notification.handle_observations, sender=Article) diff --git a/wiki/static_urls.py b/wiki/static_urls.py new file mode 100644 index 0000000..c124e53 --- /dev/null +++ b/wiki/static_urls.py @@ -0,0 +1,10 @@ +from django.conf.urls.defaults import * +from django.conf import settings + + +urlpatterns = patterns('', + url(r'^site_media/(?P<path>.*)$', + 'django.views.static.serve', + {'document_root': settings.STATIC_MEDIA_PATH}, + name='wiki_static_media'), +) diff --git a/wiki/templates/feeds/history_description.html b/wiki/templates/feeds/history_description.html new file mode 100644 index 0000000..617cfc8 --- /dev/null +++ b/wiki/templates/feeds/history_description.html @@ -0,0 +1,4 @@ +{% load i18n %} + +{% trans "edited by user" %} {{ obj.editor.username }} {% trans "at"%} {{ obj.modified|date:"H:i" }}<br> +{{ obj.comment }} diff --git a/wiki/templates/feeds/history_title.html b/wiki/templates/feeds/history_title.html new file mode 100644 index 0000000..82567eb --- /dev/null +++ b/wiki/templates/feeds/history_title.html @@ -0,0 +1 @@ +{{ obj.article.title }} - {{ obj.modified|date:"M d, Y" }} diff --git a/wiki/templates/notification/wiki_article_edited/full.txt b/wiki/templates/notification/wiki_article_edited/full.txt new file mode 100644 index 0000000..5d476dd --- /dev/null +++ b/wiki/templates/notification/wiki_article_edited/full.txt @@ -0,0 +1,4 @@ +{% load i18n %}{% blocktrans with article.get_absolute_url as article_url %}The wiki article {{ article }} has been edited by {{ user }}. + +http://{{ current_site }}{{ article_url }} +{% endblocktrans %} diff --git a/wiki/templates/notification/wiki_article_edited/notice.html b/wiki/templates/notification/wiki_article_edited/notice.html new file mode 100644 index 0000000..203f49a --- /dev/null +++ b/wiki/templates/notification/wiki_article_edited/notice.html @@ -0,0 +1,2 @@ +{% load i18n %}{% url profile_detail username=user.username as user_url %} +{% blocktrans with article.get_absolute_url as article_url %}The wiki article <a href="{{ article_url }}">{{ article }}</a> has been edited by <a href="{{ user_url }}">{{ user }}</a>.{% endblocktrans %} diff --git a/wiki/templates/notification/wiki_observed_article_changed/full.txt b/wiki/templates/notification/wiki_observed_article_changed/full.txt new file mode 100644 index 0000000..d15eda2 --- /dev/null +++ b/wiki/templates/notification/wiki_observed_article_changed/full.txt @@ -0,0 +1,4 @@ +{% load i18n %}{% blocktrans with observed.get_absolute_url as article_url %}The article {{ observed }} that you observe has changed. + +http://{{ current_site }}{{ article_url }} +{% endblocktrans %} \ No newline at end of file diff --git a/wiki/templates/notification/wiki_observed_article_changed/notice.html b/wiki/templates/notification/wiki_observed_article_changed/notice.html new file mode 100644 index 0000000..4d123f8 --- /dev/null +++ b/wiki/templates/notification/wiki_observed_article_changed/notice.html @@ -0,0 +1 @@ +{% load i18n %}{% blocktrans with observed.get_absolute_url as article_url %}The wiki article <a href="{{ article_url }}">{{ observed }}</a>, that you observe, has changed.{% endblocktrans %} diff --git a/wiki/templates/notification/wiki_revision_reverted/full.txt b/wiki/templates/notification/wiki_revision_reverted/full.txt new file mode 100644 index 0000000..4714f6e --- /dev/null +++ b/wiki/templates/notification/wiki_revision_reverted/full.txt @@ -0,0 +1,5 @@ +{% load i18n %} +{% blocktrans with article.get_absolute_url as article_url %}Your revision {{ revision }} on {{ article }} has been reverted. + +http://{{ current_site }}{{ article_url }} +{% endblocktrans %} \ No newline at end of file diff --git a/wiki/templates/notification/wiki_revision_reverted/notice.html b/wiki/templates/notification/wiki_revision_reverted/notice.html new file mode 100644 index 0000000..1d735b0 --- /dev/null +++ b/wiki/templates/notification/wiki_revision_reverted/notice.html @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans with revision.get_absolute_url as revision_url and article.get_absolute_url as article_url %}Your revision <a href="{{ revision_url }}">{{ revision }}</a> on <a href="{{ article_url }}">{{ article }}</a> has been reverted.{% endblocktrans %} diff --git a/wiki/templates/wiki/article_content.html b/wiki/templates/wiki/article_content.html new file mode 100644 index 0000000..7cd5972 --- /dev/null +++ b/wiki/templates/wiki/article_content.html @@ -0,0 +1,10 @@ +{% load wiki_tags %} +{% load wiki_markup %} +{% load generic_markup %} + +{# if using a markup, use the link method of this markup #} +{% if markup %} + {{ content|apply_markup:markup }} +{% else %} + {{ content|wiki_links|safe }} +{% endif %} diff --git a/wiki/templates/wiki/article_teaser.html b/wiki/templates/wiki/article_teaser.html new file mode 100644 index 0000000..66d1a75 --- /dev/null +++ b/wiki/templates/wiki/article_teaser.html @@ -0,0 +1,19 @@ + +{% load wiki_markup %} +{% load avatar_tags %} + +<tr class="{% cycle odd,even %}"> + <td class="meta"> + <div class="avatar">{% avatar article.latest_changeset.editor 40 %}</div> + <div class="details"> + <a href="{% url profiles.views.profile article.latest_changeset.editor.username %}"> + {{ article.latest_changeset.editor }} + </a> + </div> + {{ article.last_update|date }} + </td> + <td> + <h2><a href="{{ article.get_absolute_url }}">{{ article.title }}</a></h2> + <div class="body">{% render_content article 'summary' %}</div> + </td> +</tr> diff --git a/wiki/templates/wiki/base.html b/wiki/templates/wiki/base.html new file mode 100644 index 0000000..34f6b1b --- /dev/null +++ b/wiki/templates/wiki/base.html @@ -0,0 +1,33 @@ +{% load i18n %} +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" + "http://www.w3.org/TR/html4/strict.dtd"> +<html> +<head> + + <meta http-equiv="Content-type" content="text/html; charset=utf-8"> + <title>{% block title %}{% endblock %} - WikiApp</title> + <link rel="stylesheet" href="{% url wiki_static_media "wiki/wikiapp.css" %}"> + +</head> +<body> + <div id="head"> + <h1>wikiapp</h1> + {% include "wiki/searchbox.html" %} + </div> + + <div id="actions"> + {% block footer %}{% endblock %} + <a href="{% url wiki_list %}">{% trans "List all articles" %}</a> | + <a href="{% url wiki_history %}">{% trans "Recent Changes" %}</a> + </div> + + <div id="article"> + {% include "wiki/messages.html" %} + {% block content %}{% endblock %} + </div> + + <div id="footer"> + Powered by <a href="http://code.google.com/p/django-wikiapp">django-wikiapp</a> + </div> +</body> +</html> diff --git a/wiki/templates/wiki/changeset.html b/wiki/templates/wiki/changeset.html new file mode 100644 index 0000000..17086dd --- /dev/null +++ b/wiki/templates/wiki/changeset.html @@ -0,0 +1,18 @@ +{% extends 'wiki/base.html' %} +{% load i18n %} + +{% block title %} + Changes in {{ article_title }} +{% endblock %} + +{% block content %} + <h1> <a href="{% url wiki_article article_title %}"> {{ article_title }} </a> </h1> + {% if changeset.old_title %} + <h2> {{ changeset.old_title }} </h2> + {% endif %} + {{ changeset.display_diff|safe }} + <br><b>{% trans "Markup:" %}</b> + {% if changeset.old_markup %} {{ changeset.old_markup }} + {% else %} {% trans "Plain Text." %} + {% endif %} +{% endblock %} diff --git a/wiki/templates/wiki/confirm_remove.html b/wiki/templates/wiki/confirm_remove.html new file mode 100644 index 0000000..ace7601 --- /dev/null +++ b/wiki/templates/wiki/confirm_remove.html @@ -0,0 +1,21 @@ +{% extends 'wiki/base.html' %} +{% load i18n %} + +{% block title %} + {% trans "Remove article" %} +{% endblock %} + +{% block content %} + <h1>{% trans "Confirm deletion" %}</h1> + + You are about to remove the article "{{ article.title }}". + + <form action="" method="post"> + + <div class="submit"> + <input type="submit" value="{% trans "Confirm" %}" /> + </div> + + </form> +{% endblock %} + diff --git a/wiki/templates/wiki/edit.html b/wiki/templates/wiki/edit.html new file mode 100644 index 0000000..a4ea89f --- /dev/null +++ b/wiki/templates/wiki/edit.html @@ -0,0 +1,28 @@ +{% extends 'wiki/base.html' %} +{% load i18n %} + +{% block title %} + {% trans "Editing article" %} +{% endblock %} + +{% block content %} + <h1>{% trans "Edit" %}</h1> + + <form action="" method="post"> + {% for field in form %} + {{ field.errors }} + {% if not field.is_hidden %} + {% if field.field.required %}<p class="required"> + {% else %}<p>{% endif %} + {{ field.label_tag }} + {% endif %} + {{ field }} + {% if not field.is_hidden %}</p>{% endif %} + {% endfor %} + <div class="submit"> + <input type="submit" value="{% trans "Save" %}" /> + </div> + + </form> +{% endblock %} + diff --git a/wiki/templates/wiki/history.html b/wiki/templates/wiki/history.html new file mode 100644 index 0000000..d67b4ae --- /dev/null +++ b/wiki/templates/wiki/history.html @@ -0,0 +1,59 @@ +{% extends 'wiki/base.html' %} +{% load i18n %} + + +{% block title %} + {% trans "History for" %} {{ article.title }} +{% endblock %} + +{% block content %} +<h1> + <a href="{{ article.get_absolute_url }}"> {{ article.title }} </a> +</h1> + +<h2> {% trans "Article History" %} </h2> + +<form action="{% url wiki_revert_to_revision article.title %}" method="post"> + <table> + <tr class="tbheader"> + <th>{% trans "At" %}</th> + <th>{% trans "User" %}</th> + <th>{% trans "Comment" %}</th> + <th>{% trans "Revert" %}</th> + </tr> + {% for change in changes %} + <tr class="{% cycle 'tbodd' 'tbeven' %}"> + <td><a href="{{ change.get_absolute_url }}"> + {{ change.modified|date:"M d, Y" }}</a> + </td> + <td> + {% if change.is_anonymous_change %} + {{ change.editor_ip }} + {% else %} + <a href="{% url wiki_article change.editor %}">{{ change.editor }}</a> + {% endif %} + </td> + <td> + {% if change.comment %}<i>'{{ change.comment}}'</i> {% endif %} + </td> + <td> + {% if forloop.first %} + {% trans "Current revision" %} + {% else %} + <input id="id_revision" name="revision" + {% ifequal forloop.counter 2 %}checked{% endifequal %} + type="radio" value="{{ change.revision }}"> + {% endif %} + </td> + </tr> + {% endfor %} + </table> + {% ifnotequal changes.count 1 %} + <input type="submit" value="{% trans "Revert" %}"> + {% endifnotequal %} + +</form> + +<a href="{% url wiki_article_history_feed title=article.title,feedtype="atom" %}">Atom Feed</a> + +{% endblock %} diff --git a/wiki/templates/wiki/index.html b/wiki/templates/wiki/index.html new file mode 100644 index 0000000..c725641 --- /dev/null +++ b/wiki/templates/wiki/index.html @@ -0,0 +1,21 @@ +{% extends 'wiki/base.html' %} +{% load i18n %} + + +{% block title %} + Index +{% endblock %} + +{% block content %} + <h1>Index</h1> + + {% if articles %} + <ul> + {% for article in articles %} + <li><a href="{% url wiki_article article.title %}">{{ article.title }}</a></li> + {% endfor %} + </ul> + {% else %} + <p><a href="{% url wiki_edit "NewArticle" %}">{% trans "Create a new article" %}</a>.</p> + {% endif %} +{% endblock %} diff --git a/wiki/templates/wiki/messages.html b/wiki/templates/wiki/messages.html new file mode 100644 index 0000000..a9574bd --- /dev/null +++ b/wiki/templates/wiki/messages.html @@ -0,0 +1,7 @@ +{% if messages %} +<ul id="messages"> + {% for message in messages %} + <li>{{ message }}</li> + {% endfor %} +</ul> +{% endif %} diff --git a/wiki/templates/wiki/recentchanges.html b/wiki/templates/wiki/recentchanges.html new file mode 100644 index 0000000..6a943fb --- /dev/null +++ b/wiki/templates/wiki/recentchanges.html @@ -0,0 +1,38 @@ +{% extends 'wiki/base.html' %} +{% load i18n %} + +{% block content %} +<h2>{% trans "Recent Changes" %}</h2> +<table> + <tr class="tbheader"> + <th>{% trans "Action" %}</th> + <th>{% trans "Title" %}</th> + <th>{% trans "Date" %}</th> + <th>{% trans "Editor" %}</th> + <th>{% trans "Comment" %}</th> + </tr> + {% for change in changes %} + <tr class="{% cycle 'tbodd' 'tbeven' %}"> + <td> + {% if change.old_title %} + <a href="{% url wiki_changeset change.article.title,change.revision %}"> Modified </a> + {% else %} + Added + {% endif %} + </td> + <td><a href="{% url wiki_article change.article.title %}"> + {{ change.article.title }}</a> + </td> + <td>{{ change.modified|date:"H:i" }}</td> + <td> + {% if change.editor %} + {{ change.editor }} + {% else %} + {{ change.editor_ip }} + {% endif %} + </td> + <td>{{ change.comment }}</td> + </tr> + {% endfor %} +</table> +{% endblock %} diff --git a/wiki/templates/wiki/searchbox.html b/wiki/templates/wiki/searchbox.html new file mode 100644 index 0000000..f7e6783 --- /dev/null +++ b/wiki/templates/wiki/searchbox.html @@ -0,0 +1,10 @@ +{% load i18n %} + +{% if search_form %} +<div id="searchbox"> + <form method="post" action="{% url wiki_search %}"> + {{ search_form.as_p }} + <input type="submit" name="search_button" value="{% trans "Article by title" %}" accesskey="t"> + </form> +</div> +{% endif %} diff --git a/wiki/templates/wiki/view.html b/wiki/templates/wiki/view.html new file mode 100644 index 0000000..8a892e7 --- /dev/null +++ b/wiki/templates/wiki/view.html @@ -0,0 +1,32 @@ +{% extends 'wiki/base.html' %} +{% load i18n %} +{% load wiki_markup %} + +{% block title %} + {{ article.title }} +{% endblock %} + +{% block content %} + <h1><a href="{{ article.get_absolute_url }}" rel="bookmark">{{ article.title }}</a></h1> + + {% if not article.id %} + <p>{% trans "This article does not exist." %} + <a href="{% url wiki_edit article.title %}" {% trans ">Create it now</a>?" %}</p> + {% endif %} + + {% render_content article %} + +{% endblock %} + +{% block footer %} + {% if article.id %} + <a href="{% url wiki_edit article.title %}">{% trans "Edit this article" %}</a> + | + <a href="{% url wiki_article_history article.title %}">{% trans "Editing history" %}</a> + | + <a href="{% url wiki_remove_article article.title %}">{% trans "Remove this article" %}</a> + {% else %} + <a href="{% url wiki_edit article.title %}">{% trans "Create this article" %}</a> + {% endif %} + | +{% endblock %} diff --git a/wiki/templates/wiki/wiki_title.html b/wiki/templates/wiki/wiki_title.html new file mode 100644 index 0000000..99457af --- /dev/null +++ b/wiki/templates/wiki/wiki_title.html @@ -0,0 +1,7 @@ +{% load i18n %} + +{% if group %} + {% blocktrans %} + <h1> Wiki for {{ group_type }} <a href="{{ group_url }}">{{ group_name }}</a> </h1> + {% endblocktrans %} +{% endif %} \ No newline at end of file diff --git a/wiki/templatetags/._wiki_tags.py b/wiki/templatetags/._wiki_tags.py new file mode 100644 index 0000000..a656288 Binary files /dev/null and b/wiki/templatetags/._wiki_tags.py differ diff --git a/wiki/templatetags/__init__.py b/wiki/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/wiki/templatetags/creole.py b/wiki/templatetags/creole.py new file mode 100644 index 0000000..58a99b6 --- /dev/null +++ b/wiki/templatetags/creole.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +""" Provides the `creole` template filter, to render +texts using the markup used by the MoinMoin wiki. +""" + +from django import template +from django.conf import settings + +try: + from creole import Parser as CreoleParser + from creole2html import HtmlEmitter +except ImportError: + CreoleParser = None + + +register = template.Library() + + +@register.filter +def creole(text, **kw): + """Returns the text rendered by the Creole markup. + """ + if CreoleParser is None and settings.DEBUG: + raise template.TemplateSyntaxError("Error in creole filter: " + "The Creole library isn't installed, try easy_install creole.") + parser = CreoleParser(text) + emitter = HtmlEmitter(parser.parse()) + return emitter.emit() + +class CreoleTextNode(template.Node): + def __init__(self, nodelist): + self.nodelist = nodelist + + def render(self, context): + return creole(self.nodelist.render(context)) + +@register.tag("creole") +def crl_tag(parser, token): + """ + Render the Creole into html. Will pre-render template code first. + """ + nodelist = parser.parse(('endcreole',)) + parser.delete_first_token() + return CreoleTextNode(nodelist) + diff --git a/wiki/templatetags/restructuredtext.py b/wiki/templatetags/restructuredtext.py new file mode 100644 index 0000000..454419b --- /dev/null +++ b/wiki/templatetags/restructuredtext.py @@ -0,0 +1,106 @@ +from django import template +from django.conf import settings + +register = template.Library() + +@register.filter +def flatpagehist_diff_previous(self): + return self.diff_previous() + +@register.filter +def restructuredparts(value, **overrides): + """return the restructured text parts""" + try: + from docutils.core import publish_parts + except ImportError: + if settings.DEBUG: + raise template.TemplateSyntaxError, "Error in {% restructuredtext %} filter: The Python docutils library isn't installed." + return value + else: + docutils_settings = dict(getattr(settings, "RESTRUCTUREDTEXT_FILTER_SETTINGS", {})) + docutils_settings.update(overrides) + if 'halt_level' not in docutils_settings: + docutils_settings['halt_level'] = 6 + return publish_parts(source=value, writer_name="html4css1", settings_overrides=docutils_settings) + +@register.filter +def restructuredtext(value, **overrides): + """The django version of this markup filter has an issue when only one title or subtitle is supplied in that + they are dropped from the markup. This is due to the use of 'fragment' instead of something like 'html_body'. + We do not want to use 'html_body' either due to some header/footer stuff we want to prevent, but we want to + keep the title and subtitle. So we include them if present.""" + parts = restructuredparts(value, **overrides) + if not isinstance(parts, dict): + return value + return parts["html_body"] + +@register.filter +def restructuredtext_has_errors(value, do_raise=False): + ## RED_FLAG: need to catch the explicit exceptions and not a catch all... + try: + restructuredparts(value, halt_level=2, traceback=1) + return False + except: + if do_raise: + raise + return True + +class ReStructuredTextNode(template.Node): + def __init__(self, nodelist): + self.nodelist = nodelist + + def render(self, context): + return restructuredtext(self.nodelist.render(context)) + +@register.tag("restructuredtext") +def rest_tag(parser, token): + """ + Render the ReStructuredText into html. Will pre-render template code first. + + Example: + :: + + {% restructuredtext %} + =================================== + To: {{ send_to }} + =================================== + {% include "email_form.rst" %} + {% endrestructuredtext %} + + """ + nodelist = parser.parse(('endrestructuredtext',)) + parser.delete_first_token() + return ReStructuredTextNode(nodelist) + +@register.inclusion_tag("restructuredtext/dynamic.html", takes_context=True) +def rstflatpage(context): + """ + The core content of the restructuredtext flatpage with history, editing, + etc. for use in your 'flatpages/default.html' or custom template. + + Example: + :: + + <html><head><title>{{ flatpage.title }}</title></head> + <body>{% load restructuredtext %}{% rstflatpage %}</body> + </html> + + + This will inject one of 6 different page contents: + + * Just the flatpage.content for normal flatpages (so templates can be + used with normal flatpages). + * A custom 404 page (with optional create/restore form). + * View current (with optional edit/history/delete form). + * View version (with optional history/current/revert form). + * Edit form (with preview/save/cancel). + * History listing. + """ + return context + +@register.inclusion_tag("restructuredtext/feeds.html", takes_context=True) +def rstflatpage_feeds(context): + """ + Optionally inserts the history feeds + """ + return context diff --git a/wiki/templatetags/wiki_markup.py b/wiki/templatetags/wiki_markup.py new file mode 100644 index 0000000..2261cb8 --- /dev/null +++ b/wiki/templatetags/wiki_markup.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +""" Provides util tags to work with markup and other wiki stuff. +""" +from django import template +from django.conf import settings + +from template_utils.markup import formatter +# importing here so it is possible to use its filters +# when loading this module. +from template_utils.templatetags.generic_markup import * + +try: + from creole import Parser as CreoleParser + from creole2html import HtmlEmitter +except ImportError: + CreoleParser = None + +def creole(text, **kw): + """Returns the text rendered by the Creole markup. + """ + if CreoleParser is None and settings.DEBUG: + raise template.TemplateSyntaxError("Error in creole filter: " + "The Creole library isn't installed, try easy_install creole.") + parser = CreoleParser(text) + emitter = HtmlEmitter(parser.parse()) + return emitter.emit() + +if CreoleParser is not None: + formatter.register('creole', creole) + +register = template.Library() + +@register.inclusion_tag('wiki/article_content.html') +def render_content(article, content_attr='content', markup_attr='markup'): + """ Display an the body of an article, rendered with the right markup. + + - content_attr is the article attribute that will be rendered. + - markup_attr is the article atribure with the markup that used + on the article. + + Use examples on templates: + + {# article have a content and markup attributes #} + {% render_content article %} + + {# article have a body and markup atributes #} + {% render_content article 'body' %} + + {# we want to display the summary instead #} + {% render_content article 'summary' %} + + {# post have a tease and a markup_style attributes #} + {% render_content post 'tease' 'markup_style' %} + + {# essay have a content and markup_lang attributes #} + {% render_content essay 'content' 'markup_lang' %} + + """ + return { + 'content': getattr(article, content_attr), + 'markup': getattr(article, markup_attr) + } diff --git a/wiki/templatetags/wiki_tags.py b/wiki/templatetags/wiki_tags.py new file mode 100644 index 0000000..272dd55 --- /dev/null +++ b/wiki/templatetags/wiki_tags.py @@ -0,0 +1,58 @@ +import re + +from django import template +from django.template.defaultfilters import stringfilter +from django.utils.html import conditional_escape +from django.utils.safestring import mark_safe + +from wiki.forms import WIKI_WORD_RE + + +register = template.Library() + +url_re = r'https?://\w+(\.\w+)*(/)?' + +wikiword_link = re.compile(r'(?<!!)\b(%s)\b' % WIKI_WORD_RE) +url_pattern = re.compile(r'(?<!!)(%s)' % url_re) + +#((is_relative, pattern), ...) +link_patterns = ( + (True, wikiword_link), + (False, url_pattern), +) + + +@register.filter +@stringfilter +def wiki_links(text, autoescape=None): + if autoescape: + text = conditional_escape(text) + for is_relative, pattern in link_patterns: + tag = r'<a href="%s">\1</a>' + if is_relative: + tag = tag % r'../\1/' + else: + tag = tag % r'\1' + text = pattern.sub(tag, text) + return mark_safe(text) + + +@register.inclusion_tag('wiki/article_teaser.html') +def show_teaser(article): + """ Show a teaser box for the summary of the article. + """ + return {'article': article} + + +@register.inclusion_tag('wiki/wiki_title.html') +def wiki_title(group): + """ Display a <h1> title for the wiki, with a link to the group main page. + """ + if group: + return {'group': group, + 'group_name': group.name, + 'group_type': group._meta.verbose_name.title(), + 'group_url': group.get_absolute_url()} + else: + # no need to put group in context since it is None + return {} diff --git a/wiki/templatetags/wikiurl.py b/wiki/templatetags/wikiurl.py new file mode 100644 index 0000000..bdc2048 --- /dev/null +++ b/wiki/templatetags/wikiurl.py @@ -0,0 +1,128 @@ +# -*- coding: utf-8 -*- + +from django.template import Node, Library, TemplateSyntaxError +from django.core.urlresolvers import reverse, NoReverseMatch + +register = Library() + +class WikiURLNode(Node): + def __init__(self, url_name, group, + article=None, revision=None, asvar=None): + self.url_name = 'wiki_' + url_name + self.group = group + self.article = article + self.revision = revision + self.asvar = asvar + + def resolve(self, attrname, context): + attr = getattr(self, attrname) + if attr is None: + return + return attr.resolve(context) + + def render(self, context): + group = self.resolve('group', context) + article = self.resolve('article', context) + revision = self.resolve('revision', context) + + kw = {} + + url = '' + + if article is not None: + kw['title'] = article.title + + if revision is not None: + kw['revision'] = revision + + # when the variable is not found is the context, + # the var is resolved as ''. + if group != '': + app = group._meta.app_label + urlconf = '.'.join([app, 'urls']) + kw['group_slug'] = group.slug + + + try: + url_bits = ['/', app, reverse(self.url_name, urlconf, kwargs=kw)] + url = ''.join(url_bits) # @@@ hardcoding /app_name/wiki_url/ + except NoReverseMatch, err: + if self.asvar is None: + raise + else: + url = reverse(self.url_name, kwargs=kw) + + if self.asvar is not None: + context[self.asvar] = url + return '' + else: + return url + +def wikiurl(parser, token): + """ + Returns an absolute URL matching given url name with its parameters, + given the articles group and (optional) article and revision number. + + This is a way to define links that aren't tied to our URL configuration:: + + {% wikiurl edit group article %} + + The first argument is a url name, without the ``wiki_`` prefix. + + For example if you have a view ``app_name.client`` taking client's id and + the corresponding line in a URLconf looks like this:: + + url('^edit/(\w+)/$', 'wiki.edit_article', name='wiki_edit') + + and this app's URLconf is included into the project's URLconf under some + path:: + + url('^groups/(?P<group_slug>\w+)/mywiki/', include('wiki.urls'), kwargs) + + then in a template you can create a link to edit a certain article like this:: + + {% wikiurl edit group article %} + + The URL will look like ``groups/some_group/mywiki/edit/WikiWord/``. + + This tag is also able to set a context variable instead of returning the + found URL by specifying it with the 'as' keyword:: + + {% wikiurl edit group article as wiki_article_url %} + + """ + bits = token.contents.split(' ') + kwargs = {} + if len(bits) == 3: # {% wikiurl url_name group %} + url_name = bits[1] + group = parser.compile_filter(bits[2]) + elif len(bits) == 4: # {% wikiurl url_name group article %} + url_name = bits[1] + group = parser.compile_filter(bits[2]) + kwargs['article'] = parser.compile_filter(bits[3]) + elif len(bits) == 5: # {% wikiurl url_name group as var %} or {% wikiurl url_name group article revision %} + url_name = bits[1] + group = parser.compile_filter(bits[2]) + if bits[3] == "as": + kwargs['asvar'] = bits[4] + else: + kwargs['article'] = parser.compile_filter(bits[3]) + kwargs['revision'] = parser.compile_filter(bits[4]) + elif len(bits) == 6: # {% wikiurl url_name group article as var %} + if bits[4] == "as": + raise TemplateSyntaxError("4th argument to %s should be 'as'" % bits[0]) + url_name = bits[1] + group = parser.compile_filter(bits[2]) + kwargs['article'] = parser.compile_filter(bits[3]) + kwargs['asvar'] = parser.compile_filter(bits[5]) + elif len(bits) == 7: # {% wikiurl url_name group article revision as var %} + url_name = bits[1] + group = parser.compile_filter(bits[2]) + kwargs['article'] = parser.compile_filter(bits[3]) + kwargs['revision'] = parser.compile_filter(bits[4]) + kwargs['asvar'] = parser.compile_filter(bits[6]) + else: + raise TemplateSyntaxError("wrong number of arguments to %s" % bits[0]) + return WikiURLNode(url_name, group, **kwargs) + +wikiurl = register.tag(wikiurl) diff --git a/wiki/urls.py b/wiki/urls.py new file mode 100644 index 0000000..521188e --- /dev/null +++ b/wiki/urls.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- + +from django.conf.urls.defaults import * +from django.conf import settings + +from wiki import views, models + +try: + WIKI_URL_RE = settings.WIKI_URL_RE +except AttributeError: + WIKI_URL_RE = r'\w+' + +urlpatterns = patterns('', + url(r'^$', views.article_list, name='wiki_index'), + + url(r'^list/$', views.article_list, name='wiki_list'), + + url(r'^search/$', views.search_article, name="wiki_search"), + + url(r'^history/$', views.history, name='wiki_history'), + + url(r'^feeds/(?P<feedtype>\w+)/$', views.history_feed, name='wiki_history_feed'), + + url(r'^(?P<title>'+ WIKI_URL_RE +r')/feeds/(?P<feedtype>\w+)/$', views.article_history_feed, + name='wiki_article_history_feed'), + + url(r'^(?P<title>'+ WIKI_URL_RE +r')/$', views.view_article, + name='wiki_article'), + + url(r'^edit/(?P<title>'+ WIKI_URL_RE +r')/$', views.edit_article, + name='wiki_edit'), + + url(r'^remove/(?P<title>'+ WIKI_URL_RE +r')/$', views.remove_article, + name='wiki_remove_article'), + + url(r'observe/(?P<title>'+ WIKI_URL_RE +r')/$', views.observe_article, + name='wiki_observe'), + + url(r'observe/(?P<title>'+ WIKI_URL_RE +r')/stop/$', views.stop_observing_article, + name='wiki_stop_observing'), + + url(r'^history/(?P<title>'+ WIKI_URL_RE +r')/$', views.article_history, + name='wiki_article_history'), + + url(r'^history/(?P<title>'+ WIKI_URL_RE +r')/changeset/(?P<revision>\d+)/$', views.view_changeset, + name='wiki_changeset',), + + url(r'^history/(?P<title>'+ WIKI_URL_RE +r')/revert/$', views.revert_to_revision, + name='wiki_revert_to_revision'), +) diff --git a/wiki/utils.py b/wiki/utils.py new file mode 100644 index 0000000..8dc9492 --- /dev/null +++ b/wiki/utils.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +""" Some util functions. +""" +from django.conf import settings +from django.contrib.contenttypes.models import ContentType +from django.contrib.auth.decorators import login_required as _login_required + + +def get_ct(obj): + """ Return the ContentType of the object's model. + """ + return ContentType.objects.get(app_label=obj._meta.app_label, + model=obj._meta.module_name) + +def login_required(function): + if getattr(settings, 'WIKI_REQUIRES_LOGIN', False): + return _login_required(function) + return function diff --git a/wiki/views.py b/wiki/views.py new file mode 100644 index 0000000..9c641c3 --- /dev/null +++ b/wiki/views.py @@ -0,0 +1,748 @@ +# -*- coding: utf-8 -*- + +import os +from datetime import datetime + +from django.conf import settings +from django.core.cache import cache +from django.template import RequestContext +from django.core.urlresolvers import reverse +from django.core.exceptions import ObjectDoesNotExist +from django.http import (Http404, HttpResponseRedirect, + HttpResponseNotAllowed, HttpResponse, HttpResponseForbidden) +from django.shortcuts import get_object_or_404, render_to_response +from django.views.generic.simple import redirect_to +from django.utils.translation import ugettext_lazy as _ +from django.contrib.contenttypes.models import ContentType +from django.contrib.syndication.feeds import FeedDoesNotExist + +from wiki.forms import ArticleForm, SearchForm +from wiki.models import Article, ChangeSet +from wiki.feeds import (RssArticleHistoryFeed, AtomArticleHistoryFeed, + RssHistoryFeed, AtomHistoryFeed) +from wiki.utils import get_ct, login_required + + +# Settings + +# lock duration in minutes +try: + WIKI_LOCK_DURATION = settings.WIKI_LOCK_DURATION +except AttributeError: + WIKI_LOCK_DURATION = 15 + +try: + from notification import models as notification +except ImportError: + notification = None + +# default querysets +ALL_ARTICLES = Article.non_removed_objects.all() +ALL_CHANGES = ChangeSet.objects.all() + + +def get_real_ip(request): + """ Returns the real user IP, even if behind a proxy. + Set BEHIND_PROXY to True in your settings if Django is + running behind a proxy. + """ + if getattr(settings, 'BEHIND_PROXY', False): + return request.META['HTTP_X_FORWARDED_FOR'] + return request.META['REMOTE_ADDR'] + +def get_articles_by_group(article_qs, group_slug=None, bridge=None): + group = None + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + article_qs = group.content_objects(article_qs) + else: + article_qs = article_qs.filter(object_id=None) + return article_qs, group + +def get_articles_for_object(object, article_qs=None): + if article_qs is None: + article_qs = ALL_ARTICLES + return article_qs.filter( content_type=get_ct(object), + object_id=object.id) + +def get_url(urlname, group=None, args=None, kw=None, bridge=None): + if group is None: + # @@@ due to group support passing args isn't really needed + return reverse(urlname, args=args, kwargs=kw) + else: + return bridge.reverse(urlname, group, kwargs=kw) + + +class ArticleEditLock(object): + """ A soft lock to edting an article. + """ + + def __init__(self, title, request, message_template=None): + self.title = title + self.user_ip = get_real_ip(request) + self.created_at = datetime.now() + + if message_template is None: + message_template = ('Possible edit conflict:' + ' another user started editing this article at %s') + + self.message_template = message_template + + cache.set(title, self, WIKI_LOCK_DURATION*60) + + def create_message(self, request): + """ Send a message to the user if there is another user + editing this article. + """ + if not self.is_mine(request): + user = request.user + user.message_set.create( + message=self.message_template%self.created_at) + + def is_mine(self, request): + return self.user_ip == get_real_ip(request) + + +def has_read_perm(user, group, is_member, is_private): + """ Return True if the user has permission to *read* + Articles, False otherwise. + """ + if (group is None) or (is_member is None) or is_member(user, group): + return True + if (is_private is not None) and is_private(group): + return False + return True + +def has_write_perm(user, group, is_member): + """ Return True if the user have permission to edit Articles, + False otherwise. + """ + if (group is None) or (is_member is None) or is_member(user, group): + return True + return False + + +@login_required +def article_list(request, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, + ArticleClass=Article, + SearchFormClass=SearchForm, + template_name='index.html', + template_dir='wiki', + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + if request.method == 'GET': + + articles, group = get_articles_by_group( + article_qs, group_slug, bridge) + + allow_read = has_read_perm(request.user, group, is_member, is_private) + allow_write = has_write_perm(request.user, group, is_member) + + if not allow_read: + return HttpResponseForbidden() + + articles = articles.order_by('-created_at') + + search_form = SearchFormClass() + + template_params = {'articles': articles, + 'search_form': search_form, + 'allow_write': allow_write, + 'group': group} + + if group_slug is not None: + new_article = ArticleClass(title="NewArticle", + content_type=get_ct(group), + object_id=group.id) + else: + new_article = ArticleClass(title="NewArticle") + template_params['new_article'] = new_article + if extra_context is not None: + template_params.update(extra_context) + + return render_to_response(os.path.join(template_dir, template_name), + template_params, + context_instance=RequestContext(request)) + return HttpResponseNotAllowed(['GET']) + + +@login_required +def view_article(request, title, + ArticleClass=Article, # to create an unsaved instance + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, + template_name='view.html', + template_dir='wiki', + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + + if request.method == 'GET': + + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + allow_read = has_read_perm(request.user, group, is_member, + is_private) + allow_write = has_write_perm(request.user, group, is_member) + else: + group = None + allow_read = allow_write = True + + if not allow_read: + return HttpResponseForbidden() + + try: + article = article_qs.get_by(title, group) + if notification is not None: + is_observing = notification.is_observing(article, request.user) + else: + is_observing = False + except ArticleClass.DoesNotExist: + article = ArticleClass(title=title) + is_observing = False + + template_params = {'article': article, + 'allow_write': allow_write} + + if notification is not None: + template_params.update({'is_observing': is_observing, + 'can_observe': True}) + + template_params['group'] = group + if extra_context is not None: + template_params.update(extra_context) + + return render_to_response(os.path.join(template_dir, template_name), + template_params, + context_instance=RequestContext(request)) + return HttpResponseNotAllowed(['GET']) + + +@login_required +def edit_article(request, title, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, + ArticleClass=Article, # to get the DoesNotExist exception + ArticleFormClass=ArticleForm, + template_name='edit.html', + template_dir='wiki', + extra_context=None, + check_membership=False, + is_member=None, + is_private=None, + *args, **kw): + + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + allow_read = has_read_perm(request.user, group, is_member, + is_private) + allow_write = has_write_perm(request.user, group, is_member) + else: + group = None + allow_read = allow_write = True + + + if not allow_write: + return HttpResponseForbidden() + + try: + article = article_qs.get_by(title, group) + except ArticleClass.DoesNotExist: + article = None + + if request.method == 'POST': + + form = ArticleFormClass(request.POST, instance=article) + + if form.is_valid(): + + if request.user.is_authenticated(): + form.editor = request.user + if article is None: + user_message = u"Your article was created successfully." + else: + user_message = u"Your article was edited successfully." + request.user.message_set.create(message=user_message) + + if ((article is None) and (group_slug is not None)): + form.group = group + + new_article, changeset = form.save() + + url = get_url('wiki_article', group, kw={ + 'title': new_article.title, + }, bridge=bridge) + + return redirect_to(request, url) + + elif request.method == 'GET': + user_ip = get_real_ip(request) + + lock = cache.get(title, None) + if lock is None: + lock = ArticleEditLock(title, request) + lock.create_message(request) + + initial = {'user_ip': user_ip} + if group_slug is not None: + # @@@ wikiapp currently handles the group filtering, but we will + # eventually want to handle that via the bridge. + initial.update({'content_type': get_ct(group).id, + 'object_id': group.id}) + + if article is None: + initial.update({'title': title, + 'action': 'create'}) + form = ArticleFormClass(initial=initial) + else: + initial['action'] = 'edit' + form = ArticleFormClass(instance=article, + initial=initial) + + template_params = {'form': form} + + template_params['group'] = group + if extra_context is not None: + template_params.update(extra_context) + + return render_to_response(os.path.join(template_dir, template_name), + template_params, + context_instance=RequestContext(request)) + + +@login_required +def remove_article(request, title, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, + template_name='confirm_remove.html', + template_dir='wiki', + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + """ Show a confirmation page on GET, delete the article on POST. + """ + + if request.method == 'GET': + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + else: + group = None + article = article_qs.get_by(title, group) + + request.session['article_to_remove'] = article + + template_params = {'article': article} + template_params['group'] = group + if extra_context: + template_params.update(extra_context) + + return render_to_response(os.path.join(template_dir, template_name), + template_params, + context_instance=RequestContext(request)) + + elif request.method == 'POST': + + article = request.session['article_to_remove'] + article.remove() + + return redirect_to(request, reverse('wiki_index')) + + return HttpResponseNotAllowed(['GET', 'POST']) + + +@login_required +def view_changeset(request, title, revision, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, + changes_qs=ALL_CHANGES, + template_name='changeset.html', + template_dir='wiki', + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + + if request.method == "GET": + article_args = {'article__title': title} + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + # @@@ hmm, need to look into this for the bridge i think + article_args.update({'article__content_type': get_ct(group), + 'article__object_id': group.id}) + allow_read = has_read_perm(request.user, group, is_member, + is_private) + allow_write = has_write_perm(request.user, group, is_member) + else: + group = None + allow_read = allow_write = True + article_args.update({'article__object_id': None}) + + if not allow_read: + return HttpResponseForbidden() + + changeset = get_object_or_404( + changes_qs.select_related(), + revision=int(revision), + **article_args) + + article = changeset.article + + template_params = {'article': article, + 'article_title': article.title, + 'changeset': changeset, + 'allow_write': allow_write} + + template_params['group'] = group + if extra_context is not None: + template_params.update(extra_context) + + return render_to_response(os.path.join(template_dir, template_name), + template_params, + context_instance=RequestContext(request)) + return HttpResponseNotAllowed(['GET']) + + +@login_required +def article_history(request, title, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, + template_name='history.html', + template_dir='wiki', + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + + if request.method == 'GET': + + article_args = {'title': title} + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + # @@@ use bridge instead + article_args.update({'content_type': get_ct(group), + 'object_id': group.id}) + allow_read = has_read_perm(request.user, group, is_member, + is_private) + allow_write = has_write_perm(request.user, group, is_member) + else: + group = None + allow_read = allow_write = True + article_args.update({'object_id': None}) + + if not allow_read: + return HttpResponseForbidden() + + article = get_object_or_404(article_qs, **article_args) + changes = article.changeset_set.all().order_by('-revision') + + template_params = {'article': article, + 'changes': changes, + 'allow_write': allow_write} + template_params['group'] = group + if extra_context is not None: + template_params.update(extra_context) + + return render_to_response(os.path.join(template_dir, template_name), + template_params, + context_instance=RequestContext(request)) + + return HttpResponseNotAllowed(['GET']) + + +@login_required +def revert_to_revision(request, title, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + + if request.method == 'POST': + + revision = int(request.POST['revision']) + + article_args = {'title': title} + + group = None + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + # @@@ use bridge instead + article_args.update({'content_type': get_ct(group), + 'object_id': group.id}) + allow_read = has_read_perm(request.user, group, is_member, + is_private) + allow_write = has_write_perm(request.user, group, is_member) + else: + group = None + allow_read = allow_write = True + article_args.update({'object_id': None}) + + if not (allow_read or allow_write): + return HttpResponseForbidden() + + article = get_object_or_404(article_qs, **article_args) + + if request.user.is_authenticated(): + article.revert_to(revision, get_real_ip(request), request.user) + else: + article.revert_to(revision, get_real_ip(request)) + + + if request.user.is_authenticated(): + request.user.message_set.create( + message=u"The article was reverted successfully.") + + url = get_url('wiki_article_history', group, kw={ + 'title': title, + }, bridge=bridge) + + return redirect_to(request, url) + + return HttpResponseNotAllowed(['POST']) + + +@login_required +def search_article(request, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, + SearchFormClass=SearchForm, + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + if request.method == 'POST': + search_form = SearchFormClass(request.POST) + if search_form.is_valid(): + search_term = search_form.cleaned_data['search_term'] + + group = None + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + allow_read = has_read_perm(request.user, group, is_member, + is_private) + else: + group = None + allow_read = True + + if not allow_read: + return HttpResponseForbidden() + + # go to article by title + url = get_url('wiki_article', group, kw={ + 'title': search_term, + }, bridge=bridge) + + return redirect_to(request, url) + + return HttpResponseNotAllowed(['POST']) + + +@login_required +def history(request, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES, + template_name='recentchanges.html', + template_dir='wiki', + extra_context=None, + *args, **kw): + + if request.method == 'GET': + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + changes_qs = changes_qs.filter(article__content_type=get_ct(group), + article__object_id=group.id) + allow_read = has_read_perm(request.user, group, is_member, + is_private) + allow_write = has_write_perm(request.user, group, is_member) + else: + group = None + allow_read = allow_write = True + changes_qs = changes_qs.filter(article__object_id=None) + + if not allow_read: + return HttpResponseForbidden() + + template_params = {'changes': changes_qs.order_by('-modified'), + 'allow_write': allow_write} + template_params['group'] = group_slug + + if extra_context is not None: + template_params.update(extra_context) + + return render_to_response(os.path.join(template_dir, template_name), + template_params, + context_instance=RequestContext(request)) + return HttpResponseNotAllowed(['GET']) + + +@login_required +def observe_article(request, title, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, + template_name='recentchanges.html', + template_dir='wiki', + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + if request.method == 'POST': + + article_args = {'title': title} + group = None + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + article_args.update({'content_type': get_ct(group), + 'object_id': group.id}) + allow_read = has_read_perm(request.user, group, is_member, + is_private) + else: + group = None + allow_read = True + + if not allow_read: + return HttpResponseForbidden() + + article = get_object_or_404(article_qs, **article_args) + + notification.observe(article, request.user, + 'wiki_observed_article_changed') + + url = get_url('wiki_article', group, kw={ + 'title': article.title, + }, bridge=bridge) + + return redirect_to(request, url) + + return HttpResponseNotAllowed(['POST']) + + +@login_required +def stop_observing_article(request, title, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, + template_name='recentchanges.html', + template_dir='wiki', + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + if request.method == 'POST': + + article_args = {'title': title} + group = None + if group_slug is not None: + try: + group = bridge.get_group(group_slug) + except ObjectDoesNotExist: + raise Http404 + article_args.update({'content_type': get_ct(group), + 'object_id': group.id}) + allow_read = has_read_perm(request.user, group, is_member, + is_private) + else: + group = None + allow_read = True + article_args.update({'object_id': None}) + + if not allow_read: + return HttpResponseForbidden() + + article = get_object_or_404(article_qs, **article_args) + + notification.stop_observing(article, request.user) + + url = get_url('wiki_article', group, kw={ + 'title': article.title, + }, bridge=bridge) + + return redirect_to(request, url) + return HttpResponseNotAllowed(['POST']) + + +def article_history_feed(request, feedtype, title, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES, + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + + feeds = {'rss' : RssArticleHistoryFeed, + 'atom' : AtomArticleHistoryFeed} + ArticleHistoryFeed = feeds.get(feedtype, RssArticleHistoryFeed) + + try: + feedgen = ArticleHistoryFeed(title, request, + group_slug, bridge, + article_qs, changes_qs, + extra_context, + *args, **kw).get_feed(title) + except FeedDoesNotExist: + raise Http404 + + response = HttpResponse(mimetype=feedgen.mime_type) + feedgen.write(response, 'utf-8') + return response + + +def history_feed(request, feedtype, + group_slug=None, bridge=None, + article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES, + extra_context=None, + is_member=None, + is_private=None, + *args, **kw): + + feeds = {'rss' : RssHistoryFeed, + 'atom' : AtomHistoryFeed} + HistoryFeed = feeds.get(feedtype, RssHistoryFeed) + + try: + feedgen = HistoryFeed(request, + group_slug, bridge, + article_qs, changes_qs, + extra_context, + *args, **kw).get_feed() + except FeedDoesNotExist: + raise Http404 + + response = HttpResponse(mimetype=feedgen.mime_type) + feedgen.write(response, 'utf-8') + return response
italomaia/pugce
2b5467bc3dd662cc552ab56c72fc3cd55de9c0c6
[Blog] Adicionado app de blog no INSTALLED_APPS
diff --git a/settings.py b/settings.py index c3eb2d1..39bf6ac 100644 --- a/settings.py +++ b/settings.py @@ -1,96 +1,97 @@ # -*- coding:utf-8 -*- from os import path BIBLION_SECTIONS = [] BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # On Unix systems, a value of None will cause Django to use the same # timezone as the operating system. # If running in a Windows environment this must be set to the same as your # system time zone. TIME_ZONE = 'America/Fortaleza' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'pt-br' SITE_ID = 1 # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N = True # If you set this to False, Django will not format dates, numbers and # calendars according to the current locale USE_L10N = True # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = path.join(BASE_DIR, 'media_root') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). # Examples: "http://media.lawrence.com", "http://example.com/media/" MEDIA_URL = '/media/' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/", "/media/". ADMIN_MEDIA_PREFIX = '/admin_media/' # Make this unique, and don't share it with anybody. SECRET_KEY = 'chave_secreta' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', # Uncomment the next line to enable the admin: # 'django.contrib.admin', + 'biblion' )
italomaia/pugce
0a2436a1ec5d24824bf1ec9564ae313827aa6b41
adicionando template que faltou no outro commit
diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..6a6c15e --- /dev/null +++ b/templates/base.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br" lang="pt"> +<head> + <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> + <meta name="author" content="Italo Moreira Campelo Maia" /> + + <!-- Framework CSS --> + <link media="screen, projection" rel="stylesheet" href="{{MEDIA_URL}}css/screen.css" type="text/css" /> + <link media="print" rel="stylesheet" href="{{MEDIA_URL}}css/print.css" type="text/css" /> + <!--[if IE]> + <link media="screen, projection" rel="stylesheet" href="{{MEDIA_URL}}css/ie.css" type="text/css" /> + <![endif]--> + + <title>PugCe</title> +</head> + +<body> +<div class="container"> +<div class="clear"> +<img src="{{MEDIA_URL}}img/logo-pugce-300x150.png" alt="logo pug-ce" /> +</div> +{% block content %} +{% endblock %} +</div> +</body> + +</html>
italomaia/pugce
8b3ad88c5885779c97a2f084e9baff0c1df8d52a
adicionado aplicativo de blog e modificada nomeclatura de templates
diff --git a/biblion/__init__.py b/biblion/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/biblion/admin.py b/biblion/admin.py new file mode 100644 index 0000000..81c1a8c --- /dev/null +++ b/biblion/admin.py @@ -0,0 +1,60 @@ +from django.contrib import admin +from django.utils.functional import curry + +from biblion.models import Post, Image +from biblion.forms import AdminPostForm +from biblion.utils import can_tweet + + +class ImageInline(admin.TabularInline): + model = Image + fields = ["image_path"] + + +class PostAdmin(admin.ModelAdmin): + list_display = ["title", "published_flag", "section"] + list_filter = ["section"] + form = AdminPostForm + fields = [ + "section", + "title", + "slug", + "author", + "teaser", + "content", + "publish", + ] + if can_tweet(): + fields.append("tweet") + prepopulated_fields = {"slug": ("title",)} + inlines = [ + ImageInline, + ] + + def published_flag(self, obj): + return bool(obj.published) + published_flag.short_description = "Published" + published_flag.boolean = True + + def formfield_for_dbfield(self, db_field, **kwargs): + request = kwargs.pop("request") + if db_field.name == "author": + ff = super(PostAdmin, self).formfield_for_dbfield(db_field, **kwargs) + ff.initial = request.user.id + return ff + return super(PostAdmin, self).formfield_for_dbfield(db_field, **kwargs) + + def get_form(self, request, obj=None, **kwargs): + kwargs.update({ + "formfield_callback": curry(self.formfield_for_dbfield, request=request), + }) + return super(PostAdmin, self).get_form(request, obj, **kwargs) + + def save_form(self, request, form, change): + # this is done for explicitness that we want form.save to commit + # form.save doesn't take a commit kwarg for this reason + return form.save() + + +admin.site.register(Post, PostAdmin) +admin.site.register(Image) diff --git a/biblion/creole_parser.py b/biblion/creole_parser.py new file mode 100644 index 0000000..cb78af2 --- /dev/null +++ b/biblion/creole_parser.py @@ -0,0 +1,194 @@ +import re + +from creole import Parser +from pygments import highlight +from pygments.formatters import HtmlFormatter +from pygments.lexers import get_lexer_by_name, TextLexer +from pygments.util import ClassNotFound + +from biblion.models import Image + + +class Rules: + # For the link targets: + proto = r'http|https|ftp|nntp|news|mailto|telnet|file|irc' + extern = r'(?P<extern_addr>(?P<extern_proto>%s):.*)' % proto + interwiki = r''' + (?P<inter_wiki> [A-Z][a-zA-Z]+ ) : + (?P<inter_page> .* ) + ''' + +class HtmlEmitter(object): + """ + Generate HTML output for the document + tree consisting of DocNodes. + """ + + addr_re = re.compile('|'.join([ + Rules.extern, + Rules.interwiki, + ]), re.X | re.U) # for addresses + + def __init__(self, root): + self.root = root + + def get_text(self, node): + """Try to emit whatever text is in the node.""" + try: + return node.children[0].content or '' + except: + return node.content or '' + + def html_escape(self, text): + return text.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;') + + def attr_escape(self, text): + return self.html_escape(text).replace('"', '&quot') + + # *_emit methods for emitting nodes of the document + + def document_emit(self, node): + return self.emit_children(node) + + def text_emit(self, node): + return self.html_escape(node.content) + + def separator_emit(self, node): + return u'<hr>'; + + def paragraph_emit(self, node): + return u'<p>%s</p>\n' % self.emit_children(node) + + def bullet_list_emit(self, node): + return u'<ul>\n%s</ul>\n' % self.emit_children(node) + + def number_list_emit(self, node): + return u'<ol>\n%s</ol>\n' % self.emit_children(node) + + def list_item_emit(self, node): + return u'<li>%s</li>\n' % self.emit_children(node) + + def table_emit(self, node): + return u'<table>\n%s</table>\n' % self.emit_children(node) + + def table_row_emit(self, node): + return u'<tr>%s</tr>\n' % self.emit_children(node) + + def table_cell_emit(self, node): + return u'<td>%s</td>' % self.emit_children(node) + + def table_head_emit(self, node): + return u'<th>%s</th>' % self.emit_children(node) + + def emphasis_emit(self, node): + return u'<i>%s</i>' % self.emit_children(node) + + def strong_emit(self, node): + return u'<b>%s</b>' % self.emit_children(node) + + def header_emit(self, node): + return u'<h%d>%s</h%d>\n' % ( + node.level, self.html_escape(node.content), node.level) + + def code_emit(self, node): + return u'<tt>%s</tt>' % self.html_escape(node.content) + + def link_emit(self, node): + target = node.content + if node.children: + inside = self.emit_children(node) + else: + inside = self.html_escape(target) + m = self.addr_re.match(target) + if m: + if m.group('extern_addr'): + return u'<a href="%s">%s</a>' % ( + self.attr_escape(target), inside) + elif m.group('inter_wiki'): + raise NotImplementedError + return u'<a href="%s">%s</a>' % ( + self.attr_escape(target), inside) + + def image_emit(self, node): + target = node.content + text = self.get_text(node) + m = self.addr_re.match(target) + if m: + if m.group('extern_addr'): + return u'<img src="%s" alt="%s">' % ( + self.attr_escape(target), self.attr_escape(text)) + elif m.group('inter_wiki'): + raise NotImplementedError + return u'<img src="%s" alt="%s">' % ( + self.attr_escape(target), self.attr_escape(text)) + + def macro_emit(self, node): + raise NotImplementedError + + def break_emit(self, node): + return u"<br>" + + def preformatted_emit(self, node): + return u"<pre>%s</pre>" % self.html_escape(node.content) + + def default_emit(self, node): + """Fallback function for emitting unknown nodes.""" + raise TypeError + + def emit_children(self, node): + """Emit all the children of a node.""" + return u''.join([self.emit_node(child) for child in node.children]) + + def emit_node(self, node): + """Emit a single node.""" + emit = getattr(self, '%s_emit' % node.kind, self.default_emit) + return emit(node) + + def emit(self): + """Emit the document represented by self.root DOM tree.""" + return self.emit_node(self.root) + + +class PygmentsHtmlEmitter(HtmlEmitter): + + def preformatted_emit(self, node): + content = node.content + lines = content.split("\n") + if lines[0].startswith("#!code"): + lexer_name = lines[0].split()[1] + del lines[0] + else: + lexer_name = None + content = "\n".join(lines) + try: + lexer = get_lexer_by_name(lexer_name) + except ClassNotFound: + lexer = TextLexer() + return highlight(content, lexer, HtmlFormatter(cssclass="syntax")).strip() + + +class ImageLookupHtmlEmitter(HtmlEmitter): + + def image_emit(self, node): + target = node.content + if not re.match(r"^\d+$", target): + return super(ImageLookupHtmlEmitter, self).image_emit(node) + else: + try: + image = Image.objects.get(pk=int(target)) + except Image.DoesNotExist: + # @@@ do something better here + return u"" + return u"<img src=\"%s\" />" % (image.image_path.url,) + + +class BiblionHtmlEmitter(PygmentsHtmlEmitter, ImageLookupHtmlEmitter): + pass + + +def parse(text, emitter=HtmlEmitter): + return emitter(Parser(text).parse()).emit() + + +def parse_with_highlighting(text, emitter=PygmentsHtmlEmitter): + return parse(text, emitter=emitter) diff --git a/biblion/exceptions.py b/biblion/exceptions.py new file mode 100644 index 0000000..2f9682e --- /dev/null +++ b/biblion/exceptions.py @@ -0,0 +1,3 @@ + +class InvalidSection(Exception): + pass diff --git a/biblion/forms.py b/biblion/forms.py new file mode 100644 index 0000000..b577987 --- /dev/null +++ b/biblion/forms.py @@ -0,0 +1,93 @@ +from datetime import datetime + +from django import forms + +from biblion.creole_parser import parse, BiblionHtmlEmitter +from biblion.models import Post, Revision +from biblion.utils import can_tweet + + +class AdminPostForm(forms.ModelForm): + + title = forms.CharField( + max_length = 90, + widget = forms.TextInput( + attrs = {"style": "width: 50%;"}, + ), + ) + slug = forms.CharField( + widget = forms.TextInput( + attrs = {"style": "width: 50%;"}, + ) + ) + teaser = forms.CharField( + widget = forms.Textarea( + attrs = {"style": "width: 80%;"}, + ), + ) + content = forms.CharField( + widget = forms.Textarea( + attrs = {"style": "width: 80%; height: 300px;"}, + ) + ) + publish = forms.BooleanField( + required = False, + help_text = u"Checking this will publish this articles on the site", + ) + + if can_tweet(): + tweet = forms.BooleanField( + required = False, + help_text = u"Checking this will send out a tweet for this post", + ) + + class Meta: + model = Post + + def __init__(self, *args, **kwargs): + super(AdminPostForm, self).__init__(*args, **kwargs) + + post = self.instance + + # grab the latest revision of the Post instance + latest_revision = post.latest() + + if latest_revision: + # set initial data from the latest revision + self.fields["teaser"].initial = latest_revision.teaser + self.fields["content"].initial = latest_revision.content + + # @@@ can a post be unpublished then re-published? should be pulled + # from latest revision maybe? + self.fields["publish"].initial = bool(post.published) + + def save(self): + post = super(AdminPostForm, self).save(commit=False) + + if post.pk is None: + if self.cleaned_data["publish"]: + post.published = datetime.now() + else: + if Post.objects.filter(pk=post.pk, published=None).count(): + if self.cleaned_data["publish"]: + post.published = datetime.now() + + post.teaser_html = parse(self.cleaned_data["teaser"], emitter=BiblionHtmlEmitter) + post.content_html = parse(self.cleaned_data["content"], emitter=BiblionHtmlEmitter) + post.updated = datetime.now() + post.save() + + r = Revision() + r.post = post + r.title = post.title + r.teaser = self.cleaned_data["teaser"] + r.content = self.cleaned_data["content"] + r.author = post.author + r.updated = post.updated + r.published = post.published + r.save() + + if can_tweet() and self.cleaned_data["tweet"]: + post.tweet() + + return post diff --git a/biblion/managers.py b/biblion/managers.py new file mode 100644 index 0000000..f69a7ce --- /dev/null +++ b/biblion/managers.py @@ -0,0 +1,29 @@ +from django.db import models +from django.db.models.query import Q + +from biblion.exceptions import InvalidSection +from biblion.settings import ALL_SECTION_NAME + + +class PostManager(models.Manager): + + def published(self): + return self.exclude(published=None) + + def current(self): + return self.published().order_by("-published") + + def section(self, value, queryset=None): + + if queryset is None: + queryset = self.published() + + if not value: + return queryset + else: + try: + section_idx = self.model.section_idx(value) + except KeyError: + raise InvalidSection + all_sections = Q(section=self.model.section_idx(ALL_SECTION_NAME)) + return queryset.filter(all_sections | Q(section=section_idx)) \ No newline at end of file diff --git a/biblion/models.py b/biblion/models.py new file mode 100644 index 0000000..5b7fb0f --- /dev/null +++ b/biblion/models.py @@ -0,0 +1,191 @@ +# -*- coding: utf8 -*- +import urllib2 + +from datetime import datetime + +from django.conf import settings +from django.core.exceptions import ImproperlyConfigured +from django.db import models +from django.contrib.auth.models import User +from django.core.urlresolvers import reverse +from django.utils import simplejson as json + +from django.contrib.sites.models import Site + +try: + import twitter +except ImportError: + twitter = None + +from biblion.managers import PostManager +from biblion.settings import ALL_SECTION_NAME, SECTIONS +from biblion.utils import can_tweet + + + +def ig(L, i): + for x in L: + yield x[i] + + +class Post(models.Model): + + SECTION_CHOICES = [(1, ALL_SECTION_NAME)] + zip(range(2, 2 + len(SECTIONS)), ig(SECTIONS, 1)) + + section = models.IntegerField(choices=SECTION_CHOICES) + + title = models.CharField(max_length=90) + slug = models.SlugField() + author = models.ForeignKey(User, related_name="posts") + + teaser_html = models.TextField(editable=False) + content_html = models.TextField(editable=False) + + tweet_text = models.CharField(max_length=140, editable=False) + + created = models.DateTimeField(default=datetime.now, editable=False) # when first revision was created + updated = models.DateTimeField(null=True, blank=True, editable=False) # when last revision was create (even if not published) + published = models.DateTimeField(null=True, blank=True, editable=False) # when last published + + view_count = models.IntegerField(default=0, editable=False) + + @staticmethod + def section_idx(slug): + """ + given a slug return the index for it + """ + if slug == ALL_SECTION_NAME: + return 1 + return dict(zip(ig(SECTIONS, 0), range(2, 2 + len(SECTIONS))))[slug] + + @property + def section_slug(self): + """ + an IntegerField is used for storing sections in the database so we + need a property to turn them back into their slug form + """ + if self.section == 1: + return ALL_SECTION_NAME + return dict(zip(range(2, 2 + len(SECTIONS)), ig(SECTIONS, 0)))[self.section] + + def rev(self, rev_id): + return self.revisions.get(pk=rev_id) + + def current(self): + "the currently visible (latest published) revision" + return self.revisions.exclude(published=None).order_by("-published")[0] + + def latest(self): + "the latest modified (even if not published) revision" + try: + return self.revisions.order_by("-updated")[0] + except IndexError: + return None + + class Meta: + ordering = ("-published",) + get_latest_by = "published" + + objects = PostManager() + + def __unicode__(self): + return self.title + + def as_tweet(self): + if not self.tweet_text: + current_site = Site.objects.get_current() + api_url = "http://api.tr.im/api/trim_url.json" + u = urllib2.urlopen("%s?url=http://%s%s" % ( + api_url, + current_site.domain, + self.get_absolute_url(), + )) + result = json.loads(u.read()) + self.tweet_text = u"%s %s — %s" % ( + settings.TWITTER_TWEET_PREFIX, + self.title, + result["url"], + ) + return self.tweet_text + + def tweet(self): + if can_tweet(): + account = twitter.Api( + username = settings.TWITTER_USERNAME, + password = settings.TWITTER_PASSWORD, + ) + account.PostUpdate(self.as_tweet()) + else: + raise ImproperlyConfigured("Unable to send tweet due to either " + "missing python-twitter or required settings.") + + def save(self, **kwargs): + self.updated_at = datetime.now() + super(Post, self).save(**kwargs) + + def get_absolute_url(self): + if self.published: + name = "blog_post" + kwargs = { + "year": self.published.strftime("%Y"), + "month": self.published.strftime("%m"), + "day": self.published.strftime("%d"), + "slug": self.slug, + } + else: + name = "blog_post_pk" + kwargs = { + "post_pk": self.pk, + } + return reverse(name, kwargs=kwargs) + + def inc_views(self): + self.view_count += 1 + self.save() + self.current().inc_views() + + +class Revision(models.Model): + + post = models.ForeignKey(Post, related_name="revisions") + + title = models.CharField(max_length=90) + teaser = models.TextField() + + content = models.TextField() + + author = models.ForeignKey(User, related_name="revisions") + + updated = models.DateTimeField(default=datetime.now) + published = models.DateTimeField(null=True, blank=True) + + view_count = models.IntegerField(default=0, editable=False) + + def __unicode__(self): + return 'Revision %s for %s' % (self.updated.strftime('%Y%m%d-%H%M'), self.post.slug) + + def inc_views(self): + self.view_count += 1 + self.save() + + +class Image(models.Model): + + post = models.ForeignKey(Post, related_name="images") + + image_path = models.ImageField(upload_to="images/%Y/%m/%d") + url = models.CharField(max_length=150, blank=True) + + timestamp = models.DateTimeField(default=datetime.now, editable=False) + + def __unicode__(self): + if self.pk is not None: + return "{{ %d }}" % self.pk + else: + return "deleted image" + +class FeedHit(models.Model): + + request_data = models.TextField() + created = models.DateTimeField(default=datetime.now) + diff --git a/biblion/settings.py b/biblion/settings.py new file mode 100644 index 0000000..5ab6bba --- /dev/null +++ b/biblion/settings.py @@ -0,0 +1,6 @@ +from django.conf import settings + + + +ALL_SECTION_NAME = getattr(settings, "BIBLION_ALL_SECTION_NAME", "all") +SECTIONS = settings.BIBLION_SECTIONS \ No newline at end of file diff --git a/biblion/templates/biblion/atom_entry.xml b/biblion/templates/biblion/atom_entry.xml new file mode 100644 index 0000000..7c3fd64 --- /dev/null +++ b/biblion/templates/biblion/atom_entry.xml @@ -0,0 +1,25 @@ +<entry xml:base="http://{{ current_site.domain }}/"> + <id>http://{{ current_site.domain }}{{ entry.get_absolute_url }}</id> + <title>{{ entry.title }}</title> + <link rel="alternate" type="text/html" href="http://{{ current_site.domain }}{{ entry.get_absolute_url }}"/> + + <updated>{{ entry.updated|date:"Y-m-d\TH:i:s\Z" }}</updated> + <published>{{ entry.published|date:"Y-m-d\TH:i:s\Z" }}</published> + + <author> + <name>{{ entry.author.get_full_name }}</name> + </author> + + <summary type="xhtml"> + <div xmlns="http://www.w3.org/1999/xhtml"> + {{ entry.teaser_html|safe }} + </div> + </summary> + + <content type="xhtml" xml:lang="en"> + <div xmlns="http://www.w3.org/1999/xhtml"> + {{ entry.teaser_html|safe }} + {{ entry.content_html|safe }} + </div> + </content> +</entry> \ No newline at end of file diff --git a/biblion/templates/biblion/atom_feed.xml b/biblion/templates/biblion/atom_feed.xml new file mode 100644 index 0000000..3b2ffec --- /dev/null +++ b/biblion/templates/biblion/atom_feed.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + + <id>{{ feed_id }}</id> + + <title>{{ feed_title }}</title> + + <link rel="alternate" type="text/html" href="{{ blog_url }}" /> + <link rel="self" type="application/atom+xml" href="{{ feed_url }}" /> + + <updated>{{ feed_updated|date:"Y-m-d\TH:i:s\Z" }}</updated> + + {% for entry in entries %} + {% include "biblion/atom_entry.xml" %} + {% endfor %} +</feed> diff --git a/biblion/templates/biblion/blog_list.html b/biblion/templates/biblion/blog_list.html new file mode 100644 index 0000000..e69de29 diff --git a/biblion/templates/biblion/blog_post.html b/biblion/templates/biblion/blog_post.html new file mode 100644 index 0000000..e69de29 diff --git a/biblion/templates/biblion/blog_section_list.html b/biblion/templates/biblion/blog_section_list.html new file mode 100644 index 0000000..e69de29 diff --git a/biblion/templatetags/__init__.py b/biblion/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/biblion/templatetags/biblion_tags.py b/biblion/templatetags/biblion_tags.py new file mode 100644 index 0000000..4a7c879 --- /dev/null +++ b/biblion/templatetags/biblion_tags.py @@ -0,0 +1,90 @@ +from django import template + +from biblion.models import Post +from biblion.settings import ALL_SECTION_NAME, SECTIONS + + +register = template.Library() + + +class LatestBlogPostsNode(template.Node): + + def __init__(self, context_var): + self.context_var = context_var + + def render(self, context): + latest_posts = Post.objects.current()[:5] + context[self.context_var] = latest_posts + return u"" + + +@register.tag +def latest_blog_posts(parser, token): + bits = token.split_contents() + return LatestBlogPostsNode(bits[2]) + + +class LatestBlogPostNode(template.Node): + + def __init__(self, context_var): + self.context_var = context_var + + def render(self, context): + try: + latest_post = Post.objects.current()[0] + except IndexError: + latest_post = None + context[self.context_var] = latest_post + return u"" + + +@register.tag +def latest_blog_post(parser, token): + bits = token.split_contents() + return LatestBlogPostNode(bits[2]) + + +class LatestSectionPostNode(template.Node): + + def __init__(self, section, context_var): + self.section = template.Variable(section) + self.context_var = context_var + + def render(self, context): + section = self.section.resolve(context) + post = Post.objects.section(section, queryset=Post.objects.current()) + try: + post = post[0] + except IndexError: + post = None + context[self.context_var] = post + return u"" + + +@register.tag +def latest_section_post(parser, token): + """ + {% latest_section_post "articles" as latest_article_post %} + """ + bits = token.split_contents() + return LatestSectionPostNode(bits[1], bits[3]) + + +class BlogSectionsNode(template.Node): + + def __init__(self, context_var): + self.context_var = context_var + + def render(self, context): + sections = [(ALL_SECTION_NAME, "All")] + SECTIONS + context[self.context_var] = sections + return u"" + + +@register.tag +def blog_sections(parser, token): + """ + {% blog_sections as blog_sections %} + """ + bits = token.split_contents() + return BlogSectionsNode(bits[2]) diff --git a/biblion/urls.py b/biblion/urls.py new file mode 100644 index 0000000..fd84ee1 --- /dev/null +++ b/biblion/urls.py @@ -0,0 +1,11 @@ +from django.conf.urls.defaults import * + +from django.views.generic.simple import direct_to_template + + +urlpatterns = patterns("", + url(r'^$', "biblion.views.blog_index", name="blog"), + url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$', "biblion.views.blog_post_detail", name="blog_post"), + url(r'^post/(?P<post_pk>\d+)/$', "biblion.views.blog_post_detail", name="blog_post_pk"), + url(r'^(?P<section>[-\w]+)/$', "biblion.views.blog_section_list", name="blog_section"), +) \ No newline at end of file diff --git a/biblion/utils.py b/biblion/utils.py new file mode 100644 index 0000000..1ea38a7 --- /dev/null +++ b/biblion/utils.py @@ -0,0 +1,12 @@ +from django.conf import settings + +try: + import twitter +except ImportError: + twitter = None + + +def can_tweet(): + creds_available = (hasattr(settings, "TWITTER_USERNAME") and + hasattr(settings, "TWITTER_PASSWORD")) + return twitter and creds_available \ No newline at end of file diff --git a/biblion/views.py b/biblion/views.py new file mode 100644 index 0000000..8289695 --- /dev/null +++ b/biblion/views.py @@ -0,0 +1,115 @@ +from datetime import datetime + +from django.core.urlresolvers import reverse +from django.http import HttpResponse, Http404 +from django.shortcuts import render_to_response, get_object_or_404 +from django.template import RequestContext +from django.template.loader import render_to_string +from django.utils import simplejson as json + +from django.contrib.sites.models import Site + +from biblion.exceptions import InvalidSection +from biblion.models import Post, FeedHit +from biblion.settings import ALL_SECTION_NAME + + +def blog_index(request): + + posts = Post.objects.current() + + return render_to_response("biblion/blog_list.html", { + "posts": posts, + }, context_instance=RequestContext(request)) + + +def blog_section_list(request, section): + + try: + posts = Post.objects.section(section) + except InvalidSection: + raise Http404() + + return render_to_response("biblion/blog_section_list.html", { + "section_slug": section, + "section_name": dict(Post.SECTION_CHOICES)[Post.section_idx(section)], + "posts": posts, + }, context_instance=RequestContext(request)) + + +def blog_post_detail(request, **kwargs): + + if "post_pk" in kwargs: + if request.user.is_authenticated() and request.user.is_staff: + queryset = Post.objects.all() + post = get_object_or_404(queryset, pk=kwargs["post_pk"]) + else: + raise Http404() + else: + queryset = Post.objects.current() + queryset = queryset.filter( + published__year = int(kwargs["year"]), + published__month = int(kwargs["month"]), + published__day = int(kwargs["day"]), + ) + post = get_object_or_404(queryset, slug=kwargs["slug"]) + post.inc_views() + + return render_to_response("biblion/blog_post.html", { + "post": post, + }, context_instance=RequestContext(request)) + + +def serialize_request(request): + data = { + "path": request.path, + "META": { + "QUERY_STRING": request.META.get("QUERY_STRING"), + "REMOTE_ADDR": request.META.get("REMOTE_ADDR"), + } + } + for key in request.META: + if key.startswith("HTTP"): + data["META"][key] = request.META[key] + return json.dumps(data) + + +def blog_feed(request, section=None): + + try: + posts = Post.objects.section(section) + except InvalidSection: + raise Http404() + + if section is None: + section = ALL_SECTION_NAME + + current_site = Site.objects.get_current() + + feed_title = "%s Blog: %s" % (current_site.name, section[0].upper() + section[1:]) + + blog_url = "http://%s%s" % (current_site.domain, reverse("blog")) + + url_name, kwargs = "blog_feed", {"section": section} + feed_url = "http://%s%s" % (current_site.domain, reverse(url_name, kwargs=kwargs)) + + if posts: + feed_updated = posts[0].published + else: + feed_updated = datetime(2009, 8, 1, 0, 0, 0) + + # create a feed hit + hit = FeedHit() + hit.request_data = serialize_request(request) + hit.save() + + atom = render_to_string("biblion/atom_feed.xml", { + "feed_id": feed_url, + "feed_title": feed_title, + "blog_url": blog_url, + "feed_url": feed_url, + "feed_updated": feed_updated, + "entries": posts, + "current_site": current_site, + }) + return HttpResponse(atom, mimetype="application/atom+xml") diff --git a/settings.py b/settings.py index ea1192b..c3eb2d1 100644 --- a/settings.py +++ b/settings.py @@ -1,95 +1,96 @@ -# Django settings for pugce project. +# -*- coding:utf-8 -*- from os import path +BIBLION_SECTIONS = [] BASE_DIR = path.abspath(path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # On Unix systems, a value of None will cause Django to use the same # timezone as the operating system. # If running in a Windows environment this must be set to the same as your # system time zone. TIME_ZONE = 'America/Fortaleza' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'pt-br' SITE_ID = 1 # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N = True # If you set this to False, Django will not format dates, numbers and # calendars according to the current locale USE_L10N = True # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = path.join(BASE_DIR, 'media_root') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). # Examples: "http://media.lawrence.com", "http://example.com/media/" MEDIA_URL = '/media/' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/", "/media/". ADMIN_MEDIA_PREFIX = '/admin_media/' # Make this unique, and don't share it with anybody. SECRET_KEY = 'chave_secreta' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'pugce.urls' TEMPLATE_DIRS = ( path.join(BASE_DIR, 'templates'), ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', # Uncomment the next line to enable the admin: # 'django.contrib.admin', ) diff --git a/templates/base.xhtml b/templates/base.xhtml deleted file mode 100644 index 6a6c15e..0000000 --- a/templates/base.xhtml +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br" lang="pt"> -<head> - <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> - <meta name="author" content="Italo Moreira Campelo Maia" /> - - <!-- Framework CSS --> - <link media="screen, projection" rel="stylesheet" href="{{MEDIA_URL}}css/screen.css" type="text/css" /> - <link media="print" rel="stylesheet" href="{{MEDIA_URL}}css/print.css" type="text/css" /> - <!--[if IE]> - <link media="screen, projection" rel="stylesheet" href="{{MEDIA_URL}}css/ie.css" type="text/css" /> - <![endif]--> - - <title>PugCe</title> -</head> - -<body> -<div class="container"> -<div class="clear"> -<img src="{{MEDIA_URL}}img/logo-pugce-300x150.png" alt="logo pug-ce" /> -</div> -{% block content %} -{% endblock %} -</div> -</body> - -</html> diff --git a/templates/index.xhtml b/templates/index.html similarity index 73% rename from templates/index.xhtml rename to templates/index.html index 076d62c..0b8013e 100644 --- a/templates/index.xhtml +++ b/templates/index.html @@ -1,7 +1,7 @@ -{% extends "base.xhtml" %} +{% extends "base.html" %} {% block content %} <h1>Em construção, aguardem.</h1> {% endblock %} diff --git a/website/urls.py b/website/urls.py index 938b3d1..24ec5fe 100644 --- a/website/urls.py +++ b/website/urls.py @@ -1,11 +1,11 @@ from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('django.views.generic.simple', # (r'^admin/doc/', include('django.contrib.admindocs.urls')), # (r'^admin/', include(admin.site.urls)), - (r'^$', 'direct_to_template', {'template':'index.xhtml'}, "pugce-index"), + (r'^$', 'direct_to_template', {'template':'index.html'}, "pugce-index"), )
italomaia/pugce
6a27d93b6b55a868f042e2118238671ccffbe3c0
pequena correção na documentação.
diff --git a/TODO.txt b/TODO.txt index d9993bc..ee4472b 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,18 +1,18 @@ Pendências ========== * Criar identidade visual do projeto * Criar cadastro de usuários * Adicionar aplicação de Wiki * Adicionar aplicação de Blog * Adicionar aplicação de notícias * Adicionar aplicação de cadastro de cursos. * Adicionar Feed * Integrar tudo Para a especificação de cada componente, ver `COMPONENTES.txt` Observação --- Caso sejam utilizadas aplicações de terceiros, as mesmas -devem ser testadas. +devem ser testadas e homologadas.
italomaia/pugce
149cfdb11fbd1894a7563e0e2ad709c99526b72f
pequena correção
diff --git a/COMPONENTES.txt b/COMPONENTES.txt index 503ed16..c225332 100644 --- a/COMPONENTES.txt +++ b/COMPONENTES.txt @@ -1,49 +1,50 @@ (*) - indica que o usuário deve estar cadastrado e deve possuir permissões para executar a ação. BLOG ==== - (*) Deve permitir a adição de postagens com conteúdo multimídia. - (*) Deve permitir a edição de postagens. Deve ser mantido um histórico das mudanças entre edições. - Postagens devem possuir tags de assunto. - Cada postagem deve exibir o nome do autor, dia e hora da postagem, dia e hora da última edição, se existir, conteúdo da postagem e lista de tags. - Postagens devem permitir comentários através do `DisQus`. - O sistema deve permitir busca por palavra-chave e tags. - Deve estar integrado ao FEED. NOTICIAS ======== - (*) Deve permitir a postagem de notícias. - (*) Deve permitir a edição de notícias (com histórico de mudanças). - Notícias devem possuir tags de assunto. - O sistema deve permitir busca por palavra-chave e tags. - Deve estar integrado ao FEED. - Cada notícia deve exibir o nome do autor, dia e hora da postagem, dia e hora da última edição, se existir, conteúdo da notícia e lista de tags. WIKI ==== - (*) Deve permitir adicionar páginas do wiki. - (*) Deve permitir editar páginas do wiki. Editores sem privilégios apenas terão suas modificações aceitas após aprovação por membro com privilégios. Deve ser mantido um histórico das edições, sendo possível retornar uma página de wiki a um estado anterior. +- Edições em páginas do wiki devem aceitar comentários. - Páginas do wiki devem ser feitas utilizando alguma linguagem de marcação de textos adequadas a wiki. - Um wiki deve poder referenciar outra página de wiki no próprio site fácilmente. - Deve haver um sistema de busca de conteúdo no wiki. - Deve haver um sistema de resolução de nomes para páginas do wiki com o mesmo nome. CADASTRO ======== - O cadastro deve ser feito com nome e email. - O novo usuário deve receber um email de confirmação de cadastro onde ele poderá ativar sua conta. - Usuários cadastrados devem poder se logar no site através de link na página inicial. \ No newline at end of file
italomaia/pugce
ef99d8f4b2a1999866770789dae90c6dcfe7c54d
documentação do projeto
diff --git a/COMPONENTES.txt b/COMPONENTES.txt new file mode 100644 index 0000000..503ed16 --- /dev/null +++ b/COMPONENTES.txt @@ -0,0 +1,49 @@ +(*) - indica que o usuário deve estar cadastrado e deve possuir permissões +para executar a ação. + +BLOG +==== +- (*) Deve permitir a adição de postagens com conteúdo multimídia. +- (*) Deve permitir a edição de postagens. Deve ser mantido um histórico +das mudanças entre edições. +- Postagens devem possuir tags de assunto. +- Cada postagem deve exibir o nome do autor, dia e hora da postagem, +dia e hora da última edição, se existir, conteúdo da postagem e +lista de tags. +- Postagens devem permitir comentários através do `DisQus`. +- O sistema deve permitir busca por palavra-chave e tags. +- Deve estar integrado ao FEED. + +NOTICIAS +======== +- (*) Deve permitir a postagem de notícias. +- (*) Deve permitir a edição de notícias (com histórico de mudanças). +- Notícias devem possuir tags de assunto. +- O sistema deve permitir busca por palavra-chave e tags. +- Deve estar integrado ao FEED. +- Cada notícia deve exibir o nome do autor, dia e hora da postagem, +dia e hora da última edição, se existir, conteúdo da notícia e +lista de tags. + +WIKI +==== +- (*) Deve permitir adicionar páginas do wiki. +- (*) Deve permitir editar páginas do wiki. Editores sem privilégios apenas +terão suas modificações aceitas após aprovação por membro com privilégios. +Deve ser mantido um histórico das edições, sendo possível retornar uma +página de wiki a um estado anterior. +- Páginas do wiki devem ser feitas utilizando alguma linguagem de marcação +de textos adequadas a wiki. +- Um wiki deve poder referenciar outra página de wiki no próprio site +fácilmente. +- Deve haver um sistema de busca de conteúdo no wiki. +- Deve haver um sistema de resolução de nomes para páginas do wiki com +o mesmo nome. + +CADASTRO +======== +- O cadastro deve ser feito com nome e email. +- O novo usuário deve receber um email de confirmação de cadastro onde +ele poderá ativar sua conta. +- Usuários cadastrados devem poder se logar no site através de link +na página inicial. \ No newline at end of file diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..e36a119 --- /dev/null +++ b/README.txt @@ -0,0 +1,11 @@ +Este é o projeto do portal do grupo de usuários python do Ceará. +O projeto ainda está em sua fase inicial, entretanto o +objetivo final é integrar as seguintes componentes: + +Componentes +=========== +* Blog +* Wiki +* Feed +* Notícias +* Cadastro p/ cursos diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000..d9993bc --- /dev/null +++ b/TODO.txt @@ -0,0 +1,18 @@ +Pendências +========== +* Criar identidade visual do projeto +* Criar cadastro de usuários +* Adicionar aplicação de Wiki +* Adicionar aplicação de Blog +* Adicionar aplicação de notícias +* Adicionar aplicação de cadastro de cursos. +* Adicionar Feed +* Integrar tudo + +Para a especificação de cada componente, ver `COMPONENTES.txt` + +Observação +--- +Caso sejam utilizadas aplicações de terceiros, as mesmas +devem ser testadas. +
italomaia/pugce
ab8ca452a41c8e6f820d185efda9b227cbdadc81
código inicial
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d20b64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/manage.py b/manage.py new file mode 100644 index 0000000..5e78ea9 --- /dev/null +++ b/manage.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +from django.core.management import execute_manager +try: + import settings # Assumed to be in the same directory. +except ImportError: + import sys + sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) + sys.exit(1) + +if __name__ == "__main__": + execute_manager(settings) diff --git a/media_root/css/ie.css b/media_root/css/ie.css new file mode 100644 index 0000000..3dddda9 --- /dev/null +++ b/media_root/css/ie.css @@ -0,0 +1,35 @@ +/* ----------------------------------------------------------------------- + + + Blueprint CSS Framework 0.9 + http://blueprintcss.org + + * Copyright (c) 2007-Present. See LICENSE for more info. + * See README for instructions on how to use Blueprint. + * For credits and origins, see AUTHORS. + * This is a compressed file. See the sources in the 'src' directory. + +----------------------------------------------------------------------- */ + +/* ie.css */ +body {text-align:center;} +.container {text-align:left;} +* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {display:inline;overflow-x:hidden;} +* html legend {margin:0px -8px 16px 0;padding:0;} +sup {vertical-align:text-top;} +sub {vertical-align:text-bottom;} +html>body p code {*white-space:normal;} +hr {margin:-8px auto 11px;} +img {-ms-interpolation-mode:bicubic;} +.clearfix, .container {display:inline-block;} +* html .clearfix, * html .container {height:1%;} +fieldset {padding-top:0;} +textarea {overflow:auto;} +input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;} +input.text:focus, input.title:focus {border-color:#666;} +input.text, input.title, textarea, select {margin:0.5em 0;} +input.checkbox, input.radio {position:relative;top:.25em;} +form.inline div, form.inline p {vertical-align:middle;} +form.inline label {position:relative;top:-0.25em;} +form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;} +button, input.button {position:relative;top:0.25em;} \ No newline at end of file diff --git a/media_root/css/plugins/buttons/icons/cross.png b/media_root/css/plugins/buttons/icons/cross.png new file mode 100755 index 0000000..1514d51 Binary files /dev/null and b/media_root/css/plugins/buttons/icons/cross.png differ diff --git a/media_root/css/plugins/buttons/icons/key.png b/media_root/css/plugins/buttons/icons/key.png new file mode 100755 index 0000000..a9d5e4f Binary files /dev/null and b/media_root/css/plugins/buttons/icons/key.png differ diff --git a/media_root/css/plugins/buttons/icons/tick.png b/media_root/css/plugins/buttons/icons/tick.png new file mode 100755 index 0000000..a9925a0 Binary files /dev/null and b/media_root/css/plugins/buttons/icons/tick.png differ diff --git a/media_root/css/plugins/buttons/readme.txt b/media_root/css/plugins/buttons/readme.txt new file mode 100644 index 0000000..aa9fe26 --- /dev/null +++ b/media_root/css/plugins/buttons/readme.txt @@ -0,0 +1,32 @@ +Buttons + +* Gives you great looking CSS buttons, for both <a> and <button>. +* Demo: particletree.com/features/rediscovering-the-button-element + + +Credits +---------------------------------------------------------------- + +* Created by Kevin Hale [particletree.com] +* Adapted for Blueprint by Olav Bjorkoy [bjorkoy.com] + + +Usage +---------------------------------------------------------------- + +1) Add this plugin to lib/settings.yml. + See compress.rb for instructions. + +2) Use the following HTML code to place the buttons on your site: + + <button type="submit" class="button positive"> + <img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save + </button> + + <a class="button" href="/password/reset/"> + <img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password + </a> + + <a href="#" class="button negative"> + <img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel + </a> diff --git a/media_root/css/plugins/buttons/screen.css b/media_root/css/plugins/buttons/screen.css new file mode 100644 index 0000000..bb66b21 --- /dev/null +++ b/media_root/css/plugins/buttons/screen.css @@ -0,0 +1,97 @@ +/* -------------------------------------------------------------- + + buttons.css + * Gives you some great CSS-only buttons. + + Created by Kevin Hale [particletree.com] + * particletree.com/features/rediscovering-the-button-element + + See Readme.txt in this folder for instructions. + +-------------------------------------------------------------- */ + +a.button, button { + display:block; + float:left; + margin: 0.7em 0.5em 0.7em 0; + padding:5px 10px 5px 7px; /* Links */ + + border:1px solid #dedede; + border-top:1px solid #eee; + border-left:1px solid #eee; + + background-color:#f5f5f5; + font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif; + font-size:100%; + line-height:130%; + text-decoration:none; + font-weight:bold; + color:#565656; + cursor:pointer; +} +button { + width:auto; + overflow:visible; + padding:4px 10px 3px 7px; /* IE6 */ +} +button[type] { + padding:4px 10px 4px 7px; /* Firefox */ + line-height:17px; /* Safari */ +} +*:first-child+html button[type] { + padding:4px 10px 3px 7px; /* IE7 */ +} +button img, a.button img{ + margin:0 3px -3px 0 !important; + padding:0; + border:none; + width:16px; + height:16px; + float:none; +} + + +/* Button colors +-------------------------------------------------------------- */ + +/* Standard */ +button:hover, a.button:hover{ + background-color:#dff4ff; + border:1px solid #c2e1ef; + color:#336699; +} +a.button:active{ + background-color:#6299c5; + border:1px solid #6299c5; + color:#fff; +} + +/* Positive */ +body .positive { + color:#529214; +} +a.positive:hover, button.positive:hover { + background-color:#E6EFC2; + border:1px solid #C6D880; + color:#529214; +} +a.positive:active { + background-color:#529214; + border:1px solid #529214; + color:#fff; +} + +/* Negative */ +body .negative { + color:#d12f19; +} +a.negative:hover, button.negative:hover { + background-color:#fbe3e4; + border:1px solid #fbc2c4; + color:#d12f19; +} +a.negative:active { + background-color:#d12f19; + border:1px solid #d12f19; + color:#fff; +} diff --git a/media_root/css/plugins/fancy-type/readme.txt b/media_root/css/plugins/fancy-type/readme.txt new file mode 100644 index 0000000..85f2491 --- /dev/null +++ b/media_root/css/plugins/fancy-type/readme.txt @@ -0,0 +1,14 @@ +Fancy Type + +* Gives you classes to use if you'd like some + extra fancy typography. + +Credits and instructions are specified above each class +in the fancy-type.css file in this directory. + + +Usage +---------------------------------------------------------------- + +1) Add this plugin to lib/settings.yml. + See compress.rb for instructions. diff --git a/media_root/css/plugins/fancy-type/screen.css b/media_root/css/plugins/fancy-type/screen.css new file mode 100644 index 0000000..127cf25 --- /dev/null +++ b/media_root/css/plugins/fancy-type/screen.css @@ -0,0 +1,71 @@ +/* -------------------------------------------------------------- + + fancy-type.css + * Lots of pretty advanced classes for manipulating text. + + See the Readme file in this folder for additional instructions. + +-------------------------------------------------------------- */ + +/* Indentation instead of line shifts for sibling paragraphs. */ + p + p { text-indent:2em; margin-top:-1.5em; } + form p + p { text-indent: 0; } /* Don't want this in forms. */ + + +/* For great looking type, use this code instead of asdf: + <span class="alt">asdf</span> + Best used on prepositions and ampersands. */ + +.alt { + color: #666; + font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif; + font-style: italic; + font-weight: normal; +} + + +/* For great looking quote marks in titles, replace "asdf" with: + <span class="dquo">&#8220;</span>asdf&#8221; + (That is, when the title starts with a quote mark). + (You may have to change this value depending on your font size). */ + +.dquo { margin-left: -.5em; } + + +/* Reduced size type with incremental leading + (http://www.markboulton.co.uk/journal/comments/incremental_leading/) + + This could be used for side notes. For smaller type, you don't necessarily want to + follow the 1.5x vertical rhythm -- the line-height is too much. + + Using this class, it reduces your font size and line-height so that for + every four lines of normal sized type, there is five lines of the sidenote. eg: + + New type size in em's: + 10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems) + + New line-height value: + 12px x 1.5 = 18px (old line-height) + 18px x 4 = 72px + 72px / 5 = 14.4px (new line height) + 14.4px / 10px = 1.44 (new line height in em's) */ + +p.incr, .incr p { + font-size: 10px; + line-height: 1.44em; + margin-bottom: 1.5em; +} + + +/* Surround uppercase words and abbreviations with this class. + Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */ + +.caps { + font-variant: small-caps; + letter-spacing: 1px; + text-transform: lowercase; + font-size:1.2em; + line-height:1%; + font-weight:bold; + padding:0 2px; +} diff --git a/media_root/css/plugins/link-icons/icons/doc.png b/media_root/css/plugins/link-icons/icons/doc.png new file mode 100644 index 0000000..834cdfa Binary files /dev/null and b/media_root/css/plugins/link-icons/icons/doc.png differ diff --git a/media_root/css/plugins/link-icons/icons/email.png b/media_root/css/plugins/link-icons/icons/email.png new file mode 100644 index 0000000..7348aed Binary files /dev/null and b/media_root/css/plugins/link-icons/icons/email.png differ diff --git a/media_root/css/plugins/link-icons/icons/external.png b/media_root/css/plugins/link-icons/icons/external.png new file mode 100644 index 0000000..cf1cfb4 Binary files /dev/null and b/media_root/css/plugins/link-icons/icons/external.png differ diff --git a/media_root/css/plugins/link-icons/icons/feed.png b/media_root/css/plugins/link-icons/icons/feed.png new file mode 100644 index 0000000..315c4f4 Binary files /dev/null and b/media_root/css/plugins/link-icons/icons/feed.png differ diff --git a/media_root/css/plugins/link-icons/icons/im.png b/media_root/css/plugins/link-icons/icons/im.png new file mode 100644 index 0000000..79f35cc Binary files /dev/null and b/media_root/css/plugins/link-icons/icons/im.png differ diff --git a/media_root/css/plugins/link-icons/icons/pdf.png b/media_root/css/plugins/link-icons/icons/pdf.png new file mode 100644 index 0000000..8f8095e Binary files /dev/null and b/media_root/css/plugins/link-icons/icons/pdf.png differ diff --git a/media_root/css/plugins/link-icons/icons/visited.png b/media_root/css/plugins/link-icons/icons/visited.png new file mode 100644 index 0000000..ebf206d Binary files /dev/null and b/media_root/css/plugins/link-icons/icons/visited.png differ diff --git a/media_root/css/plugins/link-icons/icons/xls.png b/media_root/css/plugins/link-icons/icons/xls.png new file mode 100644 index 0000000..b977d7e Binary files /dev/null and b/media_root/css/plugins/link-icons/icons/xls.png differ diff --git a/media_root/css/plugins/link-icons/readme.txt b/media_root/css/plugins/link-icons/readme.txt new file mode 100644 index 0000000..fc4dc64 --- /dev/null +++ b/media_root/css/plugins/link-icons/readme.txt @@ -0,0 +1,18 @@ +Link Icons +* Icons for links based on protocol or file type. + +This is not supported in IE versions < 7. + + +Credits +---------------------------------------------------------------- + +* Marc Morgan +* Olav Bjorkoy [bjorkoy.com] + + +Usage +---------------------------------------------------------------- + +1) Add this line to your HTML: + <link rel="stylesheet" href="css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection"> diff --git a/media_root/css/plugins/link-icons/screen.css b/media_root/css/plugins/link-icons/screen.css new file mode 100644 index 0000000..7b4bef9 --- /dev/null +++ b/media_root/css/plugins/link-icons/screen.css @@ -0,0 +1,40 @@ +/* -------------------------------------------------------------- + + link-icons.css + * Icons for links based on protocol or file type. + + See the Readme file in this folder for additional instructions. + +-------------------------------------------------------------- */ + +/* Use this class if a link gets an icon when it shouldn't. */ +body a.noicon { + background:transparent none !important; + padding:0 !important; + margin:0 !important; +} + +/* Make sure the icons are not cut */ +a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited, +a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"], +a[href$=".rdf"], a[href^="aim:"] { + padding:2px 22px 2px 0; + margin:-2px 0; + background-repeat: no-repeat; + background-position: right center; +} + +/* External links */ +a[href^="http:"] { background-image: url(icons/external.png); } +a[href^="mailto:"] { background-image: url(icons/email.png); } +a[href^="http:"]:visited { background-image: url(icons/visited.png); } + +/* Files */ +a[href$=".pdf"] { background-image: url(icons/pdf.png); } +a[href$=".doc"] { background-image: url(icons/doc.png); } +a[href$=".xls"] { background-image: url(icons/xls.png); } + +/* Misc */ +a[href$=".rss"], +a[href$=".rdf"] { background-image: url(icons/feed.png); } +a[href^="aim:"] { background-image: url(icons/im.png); } diff --git a/media_root/css/plugins/rtl/readme.txt b/media_root/css/plugins/rtl/readme.txt new file mode 100644 index 0000000..5564c40 --- /dev/null +++ b/media_root/css/plugins/rtl/readme.txt @@ -0,0 +1,10 @@ +RTL +* Mirrors Blueprint, so it can be used with Right-to-Left languages. + +By Ran Yaniv Hartstein, ranh.co.il + +Usage +---------------------------------------------------------------- + +1) Add this line to your HTML: + <link rel="stylesheet" href="css/blueprint/plugins/rtl/screen.css" type="text/css" media="screen, projection"> diff --git a/media_root/css/plugins/rtl/screen.css b/media_root/css/plugins/rtl/screen.css new file mode 100644 index 0000000..7db7eb5 --- /dev/null +++ b/media_root/css/plugins/rtl/screen.css @@ -0,0 +1,110 @@ +/* -------------------------------------------------------------- + + rtl.css + * Mirrors Blueprint for left-to-right languages + + By Ran Yaniv Hartstein [ranh.co.il] + +-------------------------------------------------------------- */ + +body .container { direction: rtl; } +body .column, body .span-1, body .span-2, body .span-3, body .span-4, body .span-5, body .span-6, body .span-7, body .span-8, body .span-9, body .span-10, body .span-11, body .span-12, body .span-13, body .span-14, body .span-15, body .span-16, body .span-17, body .span-18, body .span-19, body .span-20, body .span-21, body .span-22, body .span-23, body .span-24 { + float: right; + margin-right: 0; + margin-left: 10px; + text-align:right; +} + +body div.last { margin-left: 0; } +body table .last { padding-left: 0; } + +body .append-1 { padding-right: 0; padding-left: 40px; } +body .append-2 { padding-right: 0; padding-left: 80px; } +body .append-3 { padding-right: 0; padding-left: 120px; } +body .append-4 { padding-right: 0; padding-left: 160px; } +body .append-5 { padding-right: 0; padding-left: 200px; } +body .append-6 { padding-right: 0; padding-left: 240px; } +body .append-7 { padding-right: 0; padding-left: 280px; } +body .append-8 { padding-right: 0; padding-left: 320px; } +body .append-9 { padding-right: 0; padding-left: 360px; } +body .append-10 { padding-right: 0; padding-left: 400px; } +body .append-11 { padding-right: 0; padding-left: 440px; } +body .append-12 { padding-right: 0; padding-left: 480px; } +body .append-13 { padding-right: 0; padding-left: 520px; } +body .append-14 { padding-right: 0; padding-left: 560px; } +body .append-15 { padding-right: 0; padding-left: 600px; } +body .append-16 { padding-right: 0; padding-left: 640px; } +body .append-17 { padding-right: 0; padding-left: 680px; } +body .append-18 { padding-right: 0; padding-left: 720px; } +body .append-19 { padding-right: 0; padding-left: 760px; } +body .append-20 { padding-right: 0; padding-left: 800px; } +body .append-21 { padding-right: 0; padding-left: 840px; } +body .append-22 { padding-right: 0; padding-left: 880px; } +body .append-23 { padding-right: 0; padding-left: 920px; } + +body .prepend-1 { padding-left: 0; padding-right: 40px; } +body .prepend-2 { padding-left: 0; padding-right: 80px; } +body .prepend-3 { padding-left: 0; padding-right: 120px; } +body .prepend-4 { padding-left: 0; padding-right: 160px; } +body .prepend-5 { padding-left: 0; padding-right: 200px; } +body .prepend-6 { padding-left: 0; padding-right: 240px; } +body .prepend-7 { padding-left: 0; padding-right: 280px; } +body .prepend-8 { padding-left: 0; padding-right: 320px; } +body .prepend-9 { padding-left: 0; padding-right: 360px; } +body .prepend-10 { padding-left: 0; padding-right: 400px; } +body .prepend-11 { padding-left: 0; padding-right: 440px; } +body .prepend-12 { padding-left: 0; padding-right: 480px; } +body .prepend-13 { padding-left: 0; padding-right: 520px; } +body .prepend-14 { padding-left: 0; padding-right: 560px; } +body .prepend-15 { padding-left: 0; padding-right: 600px; } +body .prepend-16 { padding-left: 0; padding-right: 640px; } +body .prepend-17 { padding-left: 0; padding-right: 680px; } +body .prepend-18 { padding-left: 0; padding-right: 720px; } +body .prepend-19 { padding-left: 0; padding-right: 760px; } +body .prepend-20 { padding-left: 0; padding-right: 800px; } +body .prepend-21 { padding-left: 0; padding-right: 840px; } +body .prepend-22 { padding-left: 0; padding-right: 880px; } +body .prepend-23 { padding-left: 0; padding-right: 920px; } + +body .border { + padding-right: 0; + padding-left: 4px; + margin-right: 0; + margin-left: 5px; + border-right: none; + border-left: 1px solid #eee; +} + +body .colborder { + padding-right: 0; + padding-left: 24px; + margin-right: 0; + margin-left: 25px; + border-right: none; + border-left: 1px solid #eee; +} + +body .pull-1 { margin-left: 0; margin-right: -40px; } +body .pull-2 { margin-left: 0; margin-right: -80px; } +body .pull-3 { margin-left: 0; margin-right: -120px; } +body .pull-4 { margin-left: 0; margin-right: -160px; } + +body .push-0 { margin: 0 18px 0 0; } +body .push-1 { margin: 0 18px 0 -40px; } +body .push-2 { margin: 0 18px 0 -80px; } +body .push-3 { margin: 0 18px 0 -120px; } +body .push-4 { margin: 0 18px 0 -160px; } +body .push-0, body .push-1, body .push-2, +body .push-3, body .push-4 { float: left; } + + +/* Typography with RTL support */ +body h1,body h2,body h3, +body h4,body h5,body h6 { font-family: Arial, sans-serif; } +html body { font-family: Arial, sans-serif; } +body pre,body code,body tt { font-family: monospace; } + +/* Mirror floats and margins on typographic elements */ +body p img { float: right; margin: 1.5em 0 1.5em 1.5em; } +body dd, body ul, body ol { margin-left: 0; margin-right: 1.5em;} +body td, body th { text-align:right; } diff --git a/media_root/css/print.css b/media_root/css/print.css new file mode 100644 index 0000000..fdb8220 --- /dev/null +++ b/media_root/css/print.css @@ -0,0 +1,29 @@ +/* ----------------------------------------------------------------------- + + + Blueprint CSS Framework 0.9 + http://blueprintcss.org + + * Copyright (c) 2007-Present. See LICENSE for more info. + * See README for instructions on how to use Blueprint. + * For credits and origins, see AUTHORS. + * This is a compressed file. See the sources in the 'src' directory. + +----------------------------------------------------------------------- */ + +/* print.css */ +body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;} +.container {background:none;} +hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;} +hr.space {background:#fff;color:#fff;visibility:hidden;} +h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;} +code {font:.9em "Courier New", Monaco, Courier, monospace;} +a img {border:none;} +p img.top {margin-top:0;} +blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;} +.small {font-size:.9em;} +.large {font-size:1.1em;} +.quiet {color:#999;} +.hide {display:none;} +a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;} +a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;} \ No newline at end of file diff --git a/media_root/css/screen.css b/media_root/css/screen.css new file mode 100644 index 0000000..46ca92b --- /dev/null +++ b/media_root/css/screen.css @@ -0,0 +1,258 @@ +/* ----------------------------------------------------------------------- + + + Blueprint CSS Framework 0.9 + http://blueprintcss.org + + * Copyright (c) 2007-Present. See LICENSE for more info. + * See README for instructions on how to use Blueprint. + * For credits and origins, see AUTHORS. + * This is a compressed file. See the sources in the 'src' directory. + +----------------------------------------------------------------------- */ + +/* reset.css */ +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} +article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;} +body {line-height:1.5;} +table {border-collapse:separate;border-spacing:0;} +caption, th, td {text-align:left;font-weight:normal;} +table, td, th {vertical-align:middle;} +blockquote:before, blockquote:after, q:before, q:after {content:"";} +blockquote, q {quotes:"" "";} +a img {border:none;} + +/* typography.css */ +html {font-size:100.01%;} +body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;} +h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;} +h1 {font-size:3em;line-height:1;margin-bottom:0.5em;} +h2 {font-size:2em;margin-bottom:0.75em;} +h3 {font-size:1.5em;line-height:1;margin-bottom:1em;} +h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;} +h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;} +h6 {font-size:1em;font-weight:bold;} +h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;} +p {margin:0 0 1.5em;} +p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;} +p img.right {float:right;margin:1.5em 0 1.5em 1.5em;} +a:focus, a:hover {color:#000;} +a {color:#009;text-decoration:underline;} +blockquote {margin:1.5em;color:#666;font-style:italic;} +strong {font-weight:bold;} +em, dfn {font-style:italic;} +dfn {font-weight:bold;} +sup, sub {line-height:0;} +abbr, acronym {border-bottom:1px dotted #666;} +address {margin:0 0 1.5em;font-style:italic;} +del {color:#666;} +pre {margin:1.5em 0;white-space:pre;} +pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;} +li ul, li ol {margin:0;} +ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;} +ul {list-style-type:disc;} +ol {list-style-type:decimal;} +dl {margin:0 0 1.5em 0;} +dl dt {font-weight:bold;} +dd {margin-left:1.5em;} +table {margin-bottom:1.4em;width:100%;} +th {font-weight:bold;} +thead th {background:#c3d9ff;} +th, td, caption {padding:4px 10px 4px 5px;} +tr.even td {background:#e5ecf9;} +tfoot {font-style:italic;} +caption {background:#eee;} +.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;} +.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;} +.hide {display:none;} +.quiet {color:#666;} +.loud {color:#000;} +.highlight {background:#ff0;} +.added {background:#060;color:#fff;} +.removed {background:#900;color:#fff;} +.first {margin-left:0;padding-left:0;} +.last {margin-right:0;padding-right:0;} +.top {margin-top:0;padding-top:0;} +.bottom {margin-bottom:0;padding-bottom:0;} + +/* forms.css */ +label {font-weight:bold;} +fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;} +legend {font-weight:bold;font-size:1.2em;} +input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;} +input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;} +input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;} +input.text, input.title {width:300px;padding:5px;} +input.title {font-size:1.5em;} +textarea {width:390px;height:250px;padding:5px;} +input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;} +form.inline {line-height:3;} +form.inline p {margin-bottom:0;} +.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;} +.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;} +.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;} +.success {background:#E6EFC2;color:#264409;border-color:#C6D880;} +.error a {color:#8a1f11;} +.notice a {color:#514721;} +.success a {color:#264409;} + +/* grid.css */ +.container {width:950px;margin:0 auto;} +.showgrid {background:url(src/grid.png);} +.column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20, .span-21, .span-22, .span-23, .span-24 {float:left;margin-right:10px;} +.last {margin-right:0;} +.span-1 {width:30px;} +.span-2 {width:70px;} +.span-3 {width:110px;} +.span-4 {width:150px;} +.span-5 {width:190px;} +.span-6 {width:230px;} +.span-7 {width:270px;} +.span-8 {width:310px;} +.span-9 {width:350px;} +.span-10 {width:390px;} +.span-11 {width:430px;} +.span-12 {width:470px;} +.span-13 {width:510px;} +.span-14 {width:550px;} +.span-15 {width:590px;} +.span-16 {width:630px;} +.span-17 {width:670px;} +.span-18 {width:710px;} +.span-19 {width:750px;} +.span-20 {width:790px;} +.span-21 {width:830px;} +.span-22 {width:870px;} +.span-23 {width:910px;} +.span-24 {width:950px;margin-right:0;} +input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {border-left-width:1px;border-right-width:1px;padding-left:5px;padding-right:5px;} +input.span-1, textarea.span-1 {width:18px;} +input.span-2, textarea.span-2 {width:58px;} +input.span-3, textarea.span-3 {width:98px;} +input.span-4, textarea.span-4 {width:138px;} +input.span-5, textarea.span-5 {width:178px;} +input.span-6, textarea.span-6 {width:218px;} +input.span-7, textarea.span-7 {width:258px;} +input.span-8, textarea.span-8 {width:298px;} +input.span-9, textarea.span-9 {width:338px;} +input.span-10, textarea.span-10 {width:378px;} +input.span-11, textarea.span-11 {width:418px;} +input.span-12, textarea.span-12 {width:458px;} +input.span-13, textarea.span-13 {width:498px;} +input.span-14, textarea.span-14 {width:538px;} +input.span-15, textarea.span-15 {width:578px;} +input.span-16, textarea.span-16 {width:618px;} +input.span-17, textarea.span-17 {width:658px;} +input.span-18, textarea.span-18 {width:698px;} +input.span-19, textarea.span-19 {width:738px;} +input.span-20, textarea.span-20 {width:778px;} +input.span-21, textarea.span-21 {width:818px;} +input.span-22, textarea.span-22 {width:858px;} +input.span-23, textarea.span-23 {width:898px;} +input.span-24, textarea.span-24 {width:938px;} +.append-1 {padding-right:40px;} +.append-2 {padding-right:80px;} +.append-3 {padding-right:120px;} +.append-4 {padding-right:160px;} +.append-5 {padding-right:200px;} +.append-6 {padding-right:240px;} +.append-7 {padding-right:280px;} +.append-8 {padding-right:320px;} +.append-9 {padding-right:360px;} +.append-10 {padding-right:400px;} +.append-11 {padding-right:440px;} +.append-12 {padding-right:480px;} +.append-13 {padding-right:520px;} +.append-14 {padding-right:560px;} +.append-15 {padding-right:600px;} +.append-16 {padding-right:640px;} +.append-17 {padding-right:680px;} +.append-18 {padding-right:720px;} +.append-19 {padding-right:760px;} +.append-20 {padding-right:800px;} +.append-21 {padding-right:840px;} +.append-22 {padding-right:880px;} +.append-23 {padding-right:920px;} +.prepend-1 {padding-left:40px;} +.prepend-2 {padding-left:80px;} +.prepend-3 {padding-left:120px;} +.prepend-4 {padding-left:160px;} +.prepend-5 {padding-left:200px;} +.prepend-6 {padding-left:240px;} +.prepend-7 {padding-left:280px;} +.prepend-8 {padding-left:320px;} +.prepend-9 {padding-left:360px;} +.prepend-10 {padding-left:400px;} +.prepend-11 {padding-left:440px;} +.prepend-12 {padding-left:480px;} +.prepend-13 {padding-left:520px;} +.prepend-14 {padding-left:560px;} +.prepend-15 {padding-left:600px;} +.prepend-16 {padding-left:640px;} +.prepend-17 {padding-left:680px;} +.prepend-18 {padding-left:720px;} +.prepend-19 {padding-left:760px;} +.prepend-20 {padding-left:800px;} +.prepend-21 {padding-left:840px;} +.prepend-22 {padding-left:880px;} +.prepend-23 {padding-left:920px;} +.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;} +.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;} +.pull-1 {margin-left:-40px;} +.pull-2 {margin-left:-80px;} +.pull-3 {margin-left:-120px;} +.pull-4 {margin-left:-160px;} +.pull-5 {margin-left:-200px;} +.pull-6 {margin-left:-240px;} +.pull-7 {margin-left:-280px;} +.pull-8 {margin-left:-320px;} +.pull-9 {margin-left:-360px;} +.pull-10 {margin-left:-400px;} +.pull-11 {margin-left:-440px;} +.pull-12 {margin-left:-480px;} +.pull-13 {margin-left:-520px;} +.pull-14 {margin-left:-560px;} +.pull-15 {margin-left:-600px;} +.pull-16 {margin-left:-640px;} +.pull-17 {margin-left:-680px;} +.pull-18 {margin-left:-720px;} +.pull-19 {margin-left:-760px;} +.pull-20 {margin-left:-800px;} +.pull-21 {margin-left:-840px;} +.pull-22 {margin-left:-880px;} +.pull-23 {margin-left:-920px;} +.pull-24 {margin-left:-960px;} +.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;} +.push-1 {margin:0 -40px 1.5em 40px;} +.push-2 {margin:0 -80px 1.5em 80px;} +.push-3 {margin:0 -120px 1.5em 120px;} +.push-4 {margin:0 -160px 1.5em 160px;} +.push-5 {margin:0 -200px 1.5em 200px;} +.push-6 {margin:0 -240px 1.5em 240px;} +.push-7 {margin:0 -280px 1.5em 280px;} +.push-8 {margin:0 -320px 1.5em 320px;} +.push-9 {margin:0 -360px 1.5em 360px;} +.push-10 {margin:0 -400px 1.5em 400px;} +.push-11 {margin:0 -440px 1.5em 440px;} +.push-12 {margin:0 -480px 1.5em 480px;} +.push-13 {margin:0 -520px 1.5em 520px;} +.push-14 {margin:0 -560px 1.5em 560px;} +.push-15 {margin:0 -600px 1.5em 600px;} +.push-16 {margin:0 -640px 1.5em 640px;} +.push-17 {margin:0 -680px 1.5em 680px;} +.push-18 {margin:0 -720px 1.5em 720px;} +.push-19 {margin:0 -760px 1.5em 760px;} +.push-20 {margin:0 -800px 1.5em 800px;} +.push-21 {margin:0 -840px 1.5em 840px;} +.push-22 {margin:0 -880px 1.5em 880px;} +.push-23 {margin:0 -920px 1.5em 920px;} +.push-24 {margin:0 -960px 1.5em 960px;} +.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;} +.prepend-top {margin-top:1.5em;} +.append-bottom {margin-bottom:1.5em;} +.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;} +hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;} +hr.space {background:#fff;color:#fff;visibility:hidden;} +.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;} +.clearfix, .container {display:block;} +.clear {clear:both;} \ No newline at end of file diff --git a/media_root/favicon.ico b/media_root/favicon.ico new file mode 100644 index 0000000..376af6c Binary files /dev/null and b/media_root/favicon.ico differ diff --git a/media_root/img/logo-pugce-300x150.png b/media_root/img/logo-pugce-300x150.png new file mode 100644 index 0000000..1287fa7 Binary files /dev/null and b/media_root/img/logo-pugce-300x150.png differ diff --git a/media_root/img/logo-pugce.png b/media_root/img/logo-pugce.png new file mode 100755 index 0000000..7a25b97 Binary files /dev/null and b/media_root/img/logo-pugce.png differ diff --git a/media_root/js/jquery-1.4.2.min.js b/media_root/js/jquery-1.4.2.min.js new file mode 100644 index 0000000..7c24308 --- /dev/null +++ b/media_root/js/jquery-1.4.2.min.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i? +e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r= +j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g, +"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e= +true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)|| +c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded", +L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype, +"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+ +a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f], +d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]=== +a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&& +!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari= +true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ", +i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ", +" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className= +this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= +e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!= +null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), +fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| +d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this, +"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent= +a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y, +isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit= +{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}}; +if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& +!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, +toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector, +u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "), +function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q]; +if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; +for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length- +1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, +CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}}, +relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]= +l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[]; +h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m= +m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition|| +!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m= +h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>"; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/, +gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length; +c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)? +a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&& +this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]|| +u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length=== +1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay"); +this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a], +"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)}, +animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing= +j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]); +this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length|| +c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement? +function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b= +this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle; +k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&& +f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/settings.py b/settings.py new file mode 100644 index 0000000..ea1192b --- /dev/null +++ b/settings.py @@ -0,0 +1,95 @@ +# Django settings for pugce project. + +from os import path + +BASE_DIR = path.abspath(path.dirname(__file__)) +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + # ('Your Name', 'your_email@domain.com'), +) + +MANAGERS = ADMINS + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': path.join(BASE_DIR, 'dev.sqlite'), # Or path to database file if using sqlite3. + 'USER': '', # Not used with sqlite3. + 'PASSWORD': '', # Not used with sqlite3. + 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. + 'PORT': '', # Set to empty string for default. Not used with sqlite3. + } +} + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# On Unix systems, a value of None will cause Django to use the same +# timezone as the operating system. +# If running in a Windows environment this must be set to the same as your +# system time zone. +TIME_ZONE = 'America/Fortaleza' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'pt-br' + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# If you set this to False, Django will not format dates, numbers and +# calendars according to the current locale +USE_L10N = True + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = path.join(BASE_DIR, 'media_root') + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash if there is a path component (optional in other cases). +# Examples: "http://media.lawrence.com", "http://example.com/media/" +MEDIA_URL = '/media/' + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = '/admin_media/' + +# Make this unique, and don't share it with anybody. +SECRET_KEY = 'chave_secreta' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', +# 'django.template.loaders.eggs.Loader', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', +) + +ROOT_URLCONF = 'pugce.urls' + +TEMPLATE_DIRS = ( + path.join(BASE_DIR, 'templates'), +) + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + # Uncomment the next line to enable the admin: + # 'django.contrib.admin', +) diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..6de9e8b --- /dev/null +++ b/templates/404.html @@ -0,0 +1,9 @@ +<html> +<head> +<title>PugCe.Org - Página não encontrada</title> +</head> +<body> +<h2>404 - Página não encontrada.</h2> +<p>Hein?!</p> +</body> +</html> diff --git a/templates/base.xhtml b/templates/base.xhtml new file mode 100644 index 0000000..6a6c15e --- /dev/null +++ b/templates/base.xhtml @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br" lang="pt"> +<head> + <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> + <meta name="author" content="Italo Moreira Campelo Maia" /> + + <!-- Framework CSS --> + <link media="screen, projection" rel="stylesheet" href="{{MEDIA_URL}}css/screen.css" type="text/css" /> + <link media="print" rel="stylesheet" href="{{MEDIA_URL}}css/print.css" type="text/css" /> + <!--[if IE]> + <link media="screen, projection" rel="stylesheet" href="{{MEDIA_URL}}css/ie.css" type="text/css" /> + <![endif]--> + + <title>PugCe</title> +</head> + +<body> +<div class="container"> +<div class="clear"> +<img src="{{MEDIA_URL}}img/logo-pugce-300x150.png" alt="logo pug-ce" /> +</div> +{% block content %} +{% endblock %} +</div> +</body> + +</html> diff --git a/templates/index.xhtml b/templates/index.xhtml new file mode 100644 index 0000000..076d62c --- /dev/null +++ b/templates/index.xhtml @@ -0,0 +1,7 @@ +{% extends "base.xhtml" %} + +{% block content %} + +<h1>Em construção, aguardem.</h1> + +{% endblock %} diff --git a/urls.py b/urls.py new file mode 100644 index 0000000..a0c0559 --- /dev/null +++ b/urls.py @@ -0,0 +1,19 @@ +from django.conf.urls.defaults import * +from django.conf import settings + +# Uncomment the next two lines to enable the admin: +# from django.contrib import admin +# admin.autodiscover() + +urlpatterns = patterns('', + # (r'^admin/doc/', include('django.contrib.admindocs.urls')), + # (r'^admin/', include(admin.site.urls)), + (r'^', include('pugce.website.urls')), +) + +if settings.DEBUG: + urlpatterns += patterns( '', + ( r'^' + settings.MEDIA_URL[1:] + '(?P<path>.*)$',\ + 'django.views.static.serve', \ + { 'document_root': settings.MEDIA_ROOT, 'show_indexes': False } ) + ) diff --git a/website/__init__.py b/website/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/website/models.py b/website/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/website/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/website/tests.py b/website/tests.py new file mode 100644 index 0000000..2247054 --- /dev/null +++ b/website/tests.py @@ -0,0 +1,23 @@ +""" +This file demonstrates two different styles of tests (one doctest and one +unittest). These will both pass when you run "manage.py test". + +Replace these with more appropriate tests for your application. +""" + +from django.test import TestCase + +class SimpleTest(TestCase): + def test_basic_addition(self): + """ + Tests that 1 + 1 always equals 2. + """ + self.failUnlessEqual(1 + 1, 2) + +__test__ = {"doctest": """ +Another way to test that 1 + 1 is equal to 2. + +>>> 1 + 1 == 2 +True +"""} + diff --git a/website/urls.py b/website/urls.py new file mode 100644 index 0000000..938b3d1 --- /dev/null +++ b/website/urls.py @@ -0,0 +1,11 @@ +from django.conf.urls.defaults import * + +# Uncomment the next two lines to enable the admin: +# from django.contrib import admin +# admin.autodiscover() + +urlpatterns = patterns('django.views.generic.simple', + # (r'^admin/doc/', include('django.contrib.admindocs.urls')), + # (r'^admin/', include(admin.site.urls)), + (r'^$', 'direct_to_template', {'template':'index.xhtml'}, "pugce-index"), +) diff --git a/website/views.py b/website/views.py new file mode 100644 index 0000000..380474e --- /dev/null +++ b/website/views.py @@ -0,0 +1 @@ +# -*- coding:utf-8 -*-
krisr/attr_enum
5305943b1487e4f101c572ec668796fd2915100a
bug fix from previous commit
diff --git a/lib/attr_enum.rb b/lib/attr_enum.rb index 40b033a..dc26ce5 100644 --- a/lib/attr_enum.rb +++ b/lib/attr_enum.rb @@ -1,75 +1,75 @@ module AttributeModifiers module AttrEnum def self.included(base) base.extend ClassMethods end module ClassMethods def attr_enum(attr_name, enums) ids = [] constant_defs = [] id_to_name_map = {} if enums.is_a?(Hash) enums = enums.map {|sym, options| {sym => options}} elsif !enums.is_a?(Array) raise ArgumentError, "attr_enum second argument must be a hash or array" end enums.each do |map| sym = map.keys.first opts = map.values.first case opts when Hash id = opts[:id] name = opts[:name] else id = opts end name ||= sym.to_s.humanize ids << id constant_name = sym.to_s.camelize id_to_name_map[id] = name constant_defs << "#{constant_name} = #{id.inspect}" define_method "#{attr_name}_#{sym}?" do self.send(attr_name) == id end define_method "#{attr_name}_was_#{sym}?" do self.send("#{attr_name}_was") == id end end options = ids.map { |id| [id_to_name_map[id], id.to_s] } module_name = attr_name.to_s.camelize class_eval <<-eos module #{module_name} #{constant_defs.join("\n")} def #{module_name}.values #{ids.inspect} end def #{module_name}.options #{options.inspect} end def #{module_name}.name_of(id) - #{options.inspect}[id] + #{id_to_name_map.inspect}[id] end end eos define_method "#{attr_name}_name" do id_to_name_map[self.send(attr_name)] end end end end end \ No newline at end of file
krisr/attr_enum
b8a373f24668672fc07102a6c54d1596c254e8e6
added name_of utility method
diff --git a/lib/attr_enum.rb b/lib/attr_enum.rb index aec2004..40b033a 100644 --- a/lib/attr_enum.rb +++ b/lib/attr_enum.rb @@ -1,71 +1,75 @@ module AttributeModifiers module AttrEnum def self.included(base) base.extend ClassMethods end module ClassMethods def attr_enum(attr_name, enums) ids = [] constant_defs = [] id_to_name_map = {} if enums.is_a?(Hash) enums = enums.map {|sym, options| {sym => options}} elsif !enums.is_a?(Array) raise ArgumentError, "attr_enum second argument must be a hash or array" end enums.each do |map| sym = map.keys.first opts = map.values.first case opts when Hash id = opts[:id] name = opts[:name] else id = opts end name ||= sym.to_s.humanize ids << id constant_name = sym.to_s.camelize id_to_name_map[id] = name constant_defs << "#{constant_name} = #{id.inspect}" define_method "#{attr_name}_#{sym}?" do self.send(attr_name) == id end define_method "#{attr_name}_was_#{sym}?" do self.send("#{attr_name}_was") == id end end options = ids.map { |id| [id_to_name_map[id], id.to_s] } module_name = attr_name.to_s.camelize class_eval <<-eos module #{module_name} #{constant_defs.join("\n")} def #{module_name}.values #{ids.inspect} end def #{module_name}.options #{options.inspect} end + + def #{module_name}.name_of(id) + #{options.inspect}[id] + end end eos define_method "#{attr_name}_name" do id_to_name_map[self.send(attr_name)] end end end end end \ No newline at end of file
krisr/attr_enum
1d91f22285d16434a587124103d86077a09144f1
enabled ordered declartion of enum options
diff --git a/lib/attr_enum.rb b/lib/attr_enum.rb index 3cbea6a..aec2004 100644 --- a/lib/attr_enum.rb +++ b/lib/attr_enum.rb @@ -1,62 +1,71 @@ module AttributeModifiers module AttrEnum def self.included(base) base.extend ClassMethods end module ClassMethods - def attr_enum(attr_name, enum_map) + def attr_enum(attr_name, enums) ids = [] constant_defs = [] id_to_name_map = {} - enum_map.each do |sym, opts| + + if enums.is_a?(Hash) + enums = enums.map {|sym, options| {sym => options}} + elsif !enums.is_a?(Array) + raise ArgumentError, "attr_enum second argument must be a hash or array" + end + + enums.each do |map| + sym = map.keys.first + opts = map.values.first case opts when Hash id = opts[:id] name = opts[:name] else id = opts end name ||= sym.to_s.humanize ids << id constant_name = sym.to_s.camelize id_to_name_map[id] = name constant_defs << "#{constant_name} = #{id.inspect}" define_method "#{attr_name}_#{sym}?" do self.send(attr_name) == id end define_method "#{attr_name}_was_#{sym}?" do self.send("#{attr_name}_was") == id end end options = ids.map { |id| [id_to_name_map[id], id.to_s] } module_name = attr_name.to_s.camelize class_eval <<-eos module #{module_name} #{constant_defs.join("\n")} def #{module_name}.values #{ids.inspect} end def #{module_name}.options #{options.inspect} end end eos define_method "#{attr_name}_name" do id_to_name_map[self.send(attr_name)] end end end end end \ No newline at end of file
krisr/attr_enum
9734cd57f7b7873e0f32f04e4f305e9df92d9867
fixed bug related to non integer ids
diff --git a/init.rb b/init.rb index 0741bcb..b39e698 100644 --- a/init.rb +++ b/init.rb @@ -1 +1,3 @@ +require 'attr_enum' + ActiveRecord::Base.class_eval { include AttributeModifiers::AttrEnum } diff --git a/lib/attr_enum.rb b/lib/attr_enum.rb index 103f9fa..3cbea6a 100644 --- a/lib/attr_enum.rb +++ b/lib/attr_enum.rb @@ -1,58 +1,62 @@ module AttributeModifiers module AttrEnum def self.included(base) base.extend ClassMethods end module ClassMethods def attr_enum(attr_name, enum_map) ids = [] constant_defs = [] id_to_name_map = {} enum_map.each do |sym, opts| case opts when Hash id = opts[:id] name = opts[:name] else id = opts end name ||= sym.to_s.humanize ids << id constant_name = sym.to_s.camelize id_to_name_map[id] = name - constant_defs << "#{constant_name} = #{id}" - + constant_defs << "#{constant_name} = #{id.inspect}" + define_method "#{attr_name}_#{sym}?" do self.send(attr_name) == id end + + define_method "#{attr_name}_was_#{sym}?" do + self.send("#{attr_name}_was") == id + end end - + options = ids.map { |id| [id_to_name_map[id], id.to_s] } - + module_name = attr_name.to_s.camelize class_eval <<-eos module #{module_name} #{constant_defs.join("\n")} def #{module_name}.values - [#{ids.sort.join(",")}] + #{ids.inspect} end def #{module_name}.options #{options.inspect} end end eos define_method "#{attr_name}_name" do id_to_name_map[self.send(attr_name)] end end end end end \ No newline at end of file
jshingler/groovy_koans
628efb65fa381242bc583303a158f9f4a1e600c5
Added license.
diff --git a/MIT-LICENSE b/MIT-LICENSE new file mode 100644 index 0000000..2965257 --- /dev/null +++ b/MIT-LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2009 GroovyKoans + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
jshingler/groovy_koans
40fb164974a97485dedece68f92b0152d7bda692
Added parallel assignment tests
diff --git a/src/test/groovy/com/codeadept/ArraysTests.groovy b/src/test/groovy/com/codeadept/ArraysTests.groovy index c18e792..171606b 100644 --- a/src/test/groovy/com/codeadept/ArraysTests.groovy +++ b/src/test/groovy/com/codeadept/ArraysTests.groovy @@ -1,95 +1,119 @@ package com.codeadept /** * * @author jeremy anderson * */ public class ArraysTests extends GroovyTestCase { void testCreatingArrays() { def emptyArray = [] assert emptyArray.size == __ } void testArraysInGroovyAreLists() { def emptyArray = [] assert emptyArray instanceof List } void testArrayLiterals() { def array = [] assert array == [] array[0] = 1 assert [1] == array array[1] = 2 assert [1, __] == array array << 3 assert __ == array } void testAccessingArrayElements() { def array = ["peanut", "butter", "and", "jelly"] assert "__" == array[0] assert "__" == array.first() assert "__" == array[3] assert "__" == array.last() assert "__" == array[-1] assert "__" == array[-3] } void testArraySelectSpecificElements() { def array = ["peanut", "butter", "and", "jelly"] assert __ == array[0, 1] assert __ == array[0, 2] } void testArraySublist() { def array = ["peanut", "butter", "and", "jelly"] assert [__] == array.subList(0, 2) assert [__] == array.subList(0, 4) shouldFail __, {array.subList(0, 5)} } void testArrayRanges() { def array = ["peanut", "butter", "and", "jelly"] assert 0..1 instanceof Range assert [1, 2, 3, 4, 5] != 1..5 assert [__] == (1..5).toArray() assert [__] == (1..<5).toArray() } void testSlicingArraysWithRanges() { def array = ["peanut", "butter", "and", "jelly"] assert ["peanut", "butter"] == array[0..1] assert [__] == array[0..3] assert [__] == array[0..<3] } void testPushAndPop() { def array = [1, 2] array.push 3 assert [__] == array def poppedVal = array.pop() assert __ == poppedVal assert [__] == array } - + void testParallelAssignment() { + def (x, y) = [1, 2] + + assert x == __ + assert y == __ + + (x, y) = [y, x] + + assert x == __ + assert y == __ + } + + void testParallelAssignmentWithNotEnoughElements() { + def (x, y) = [1] + + assert x == __ + assert y == __ + } + + void testParallelAssignmentWithTooManyElements() { + def (x, y) = [1, 2, 3, 4] + + assert x == __ + assert y == __ + } } \ No newline at end of file
jshingler/groovy_koans
8c43d1619622f53530ae644909f77173b9a7c7aa
More tests for Ranges.
diff --git a/src/test/groovy/com/codeadept/ArraysTests.groovy b/src/test/groovy/com/codeadept/ArraysTests.groovy index e28dda0..c18e792 100644 --- a/src/test/groovy/com/codeadept/ArraysTests.groovy +++ b/src/test/groovy/com/codeadept/ArraysTests.groovy @@ -1,63 +1,95 @@ package com.codeadept /** * * @author jeremy anderson * */ public class ArraysTests extends GroovyTestCase { void testCreatingArrays() { def emptyArray = [] assert emptyArray.size == __ } - void testArraysInGroovyAreArrayLists() { + void testArraysInGroovyAreLists() { def emptyArray = [] - assert emptyArray instanceof ArrayList + assert emptyArray instanceof List } void testArrayLiterals() { def array = [] assert array == [] array[0] = 1 assert [1] == array array[1] = 2 assert [1, __] == array array << 3 assert __ == array } void testAccessingArrayElements() { def array = ["peanut", "butter", "and", "jelly"] assert "__" == array[0] assert "__" == array.first() assert "__" == array[3] assert "__" == array.last() assert "__" == array[-1] assert "__" == array[-3] } void testArraySelectSpecificElements() { def array = ["peanut", "butter", "and", "jelly"] assert __ == array[0, 1] assert __ == array[0, 2] } + void testArraySublist() { + def array = ["peanut", "butter", "and", "jelly"] + + assert [__] == array.subList(0, 2) + assert [__] == array.subList(0, 4) + + shouldFail __, {array.subList(0, 5)} + } + void testArrayRanges() { def array = ["peanut", "butter", "and", "jelly"] assert 0..1 instanceof Range + + assert [1, 2, 3, 4, 5] != 1..5 + assert [__] == (1..5).toArray() + assert [__] == (1..<5).toArray() + } + + void testSlicingArraysWithRanges() { + def array = ["peanut", "butter", "and", "jelly"] + assert ["peanut", "butter"] == array[0..1] assert [__] == array[0..3] assert [__] == array[0..<3] } + void testPushAndPop() { + def array = [1, 2] + + array.push 3 + assert [__] == array + + def poppedVal = array.pop() + assert __ == poppedVal + + assert [__] == array + } + + + } \ No newline at end of file diff --git a/src/test/groovy/com/codeadept/RangeTests.groovy b/src/test/groovy/com/codeadept/RangeTests.groovy new file mode 100644 index 0000000..847482c --- /dev/null +++ b/src/test/groovy/com/codeadept/RangeTests.groovy @@ -0,0 +1,58 @@ +package com.codeadept +/** + * + * @author jeremy anderson + * + */ + +public class RangeTests extends GroovyTestCase{ + + void testRange() { + def range = 1..5 + + assert range instanceof Range + } + + void testRangeIsAlsoList() { + def range = 1..5 + + assert range instanceof List + } + + void testRangeSize() { + def range = 1..5 + + assert range.size() == __ + } + + void testRangeAccessors() { + def range = 1..5 + + assert range.get(2) == __ + assert range[2] == __ + } + + void testRangeBounds() { + def range = 1..5 + + assert range.from == __ + assert range.to == __ + } + + void testNonInclusiveRange() { + def range = 1..<5 + + assert range.from == __ + assert range.to == __ + } + + void testRangesCanBeCharactersToo() { + def range = 'a'..'z' + + assert range instanceof Range + assert range.from == '__' + assert range[5] == '__' + assert range.to == '__' + } + +} \ No newline at end of file
choltz/simple_menu
17bc7bed15c66616fa349439405898b11def2b1e
Added customization details to the readme file
diff --git a/README b/README index 2551fd8..a37070a 100644 --- a/README +++ b/README @@ -1,62 +1,78 @@ The simple menu is a javascript API to quickly create dynamic horizontal menus. Quick Setup: -------------------------------------------------------------------------------- 1) copy simple_menu.js and simple_menu.css into a folder on your web server. The files should be accessible to the pages that will show the menu. 2) create a javascript file to build the menu. It should look something like this: function load_menu() { var menu = com.choltz.ui.menu(); var parent = menu.add_menu_item("Home", "/home"); parent.add_child("Menu Item 1", "/item1"); parent.add_child("Menu Item 2", "/item2"); parent.add_child("Menu Item 3", "/item3"); parent = menu.add_menu_item("About", "/about"); parent.add_child("Menu Item 4", "/item4"); } The add_menu_item and add_child functions expect these two parameters: text: This is text displayd in the menu item url: This is the URL the menu item will redirect to when clicked 3) load the libraries and your menu definition file in each page where the menu will be visible. Add something like this to the <head> section of your page: <script type="text/javascript" src="simple_menu.js"></script> <script type="text/javascript" src="simple_menu_definition.js"></script> <link rel="stylesheet" type="text/css" href="simple_menu.css"/> 4) Load the menu on page load. Because the menu structure was defined in a function, it won't load unless we tell the page to do so. Add the load_menu function to the onload attribute of the body: <body onload="load_menu()" > - or register the function with the page's onload event: - -*** in progresss + Or register the function with the page's load event handler. Styles -------------------------------------------------------------------------------- By default, the menu will not likely match the look and feel of your web site. The look and feel of the menu can be changed to fit your site by adding CSS class definitions to a custom file that you include in the web page. This document assumes you have at least passing familiarity with cascading style sheets. + Nomenclature: + The menu is divided into several components, each of which has associated + css class names: - -*** in progress + The top-level menu is called the menu bar + ------------------------------------------------------------- + | menu_bar_link | menu_bar_link | menu_bar_link | + ------------------------------------------------------------- + | | + | menu_cell_link | + |___________________________| + | | + | menu_cell_link | + |___________________________| + | | + | menu_cell_link | + |___________________________| + Manipulation of these three CSS classes allow you to change the color, font, + hover, etc. attributes of the menu. See simple_menu_custom.css for examples. 1) Create a new CSS file that is visible to the web pages that will display the menu. -2) \ No newline at end of file +2) Add custom CSS classes to the file to control the look and feel of the menu. + Take a look at simple_menu_custom.css for ways to customize the menu. +
choltz/simple_menu
dbb6b738a3776ec8e7a9bdfb43ef12af9ceef23b
slight tweak to readme
diff --git a/README b/README index f006260..2551fd8 100644 --- a/README +++ b/README @@ -1,62 +1,62 @@ The simple menu is a javascript API to quickly create dynamic horizontal menus. Quick Setup: -------------------------------------------------------------------------------- 1) copy simple_menu.js and simple_menu.css into a folder on your web server. The files should be accessible to the pages that will show the menu. 2) create a javascript file to build the menu. It should look something like this: function load_menu() { var menu = com.choltz.ui.menu(); var parent = menu.add_menu_item("Home", "/home"); parent.add_child("Menu Item 1", "/item1"); parent.add_child("Menu Item 2", "/item2"); parent.add_child("Menu Item 3", "/item3"); parent = menu.add_menu_item("About", "/about"); parent.add_child("Menu Item 4", "/item4"); } The add_menu_item and add_child functions expect these two parameters: text: This is text displayd in the menu item url: This is the URL the menu item will redirect to when clicked 3) load the libraries and your menu definition file in each page where the menu will be visible. Add something like this to the <head> section of your page: <script type="text/javascript" src="simple_menu.js"></script> <script type="text/javascript" src="simple_menu_definition.js"></script> <link rel="stylesheet" type="text/css" href="simple_menu.css"/> 4) Load the menu on page load. Because the menu structure was defined in a function, it won't load unless we tell the page to do so. Add the load_menu function to the onload attribute of the body: <body onload="load_menu()" > or register the function with the page's onload event: -//? window.addEventListener("mousedown", this.onGeckoMouse(), true); +*** in progresss Styles -------------------------------------------------------------------------------- By default, the menu will not likely match the look and feel of your web site. The look and feel of the menu can be changed to fit your site by adding CSS class definitions to a custom file that you include in the web page. This document assumes you have at least passing familiarity with cascading style sheets. - +*** in progress 1) Create a new CSS file that is visible to the web pages that will display the menu. 2) \ No newline at end of file
choltz/simple_menu
776da206cb5befc2b45f34a60e83e26d79862048
first revision of simple_menu. Confirmed on IE 6,7,8, Firefox, Google Chrome, and Safari
diff --git a/example.html b/example.html new file mode 100644 index 0000000..ffc6c45 --- /dev/null +++ b/example.html @@ -0,0 +1,28 @@ +<html> + <head> + <!-- load the simple_menu library --> + <script type="text/javascript" src="simple_menu.js"></script> + <!-- load the definition for the menu structure --> + <script type="text/javascript" src="simple_menu_definition.js"></script> + <!-- load the styles that define the simple_menu default behavior --> + <link rel="stylesheet" type="text/css" href="simple_menu.css"/> + <!-- load custom styles to make the simple_menu match the page's look and feel --> + <link rel="stylesheet" type="text/css" href="simple_menu_custom.css"/> + </head> + + <body onload="load_menu()" style="margin: 0px; padding: 0px;"> + + <!-- + div with an id of "simple_menu" is required. The simple_menu library looks through + the page's dom for this tag and places the menu in it. + --> + <div id="simple_menu"></div> + + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sagittis mattis eros ut viverra. Vestibulum ut interdum sapien. Quisque lobortis magna ut magna tempor accumsan. Proin bibendum semper vehicula. Sed sed ante sit amet massa commodo dictum sit amet ac nibh. Vestibulum porttitor hendrerit odio, non faucibus neque iaculis et. Etiam ultricies consequat blandit. Sed id ante risus. Suspendisse eros arcu, dignissim at sagittis ac, tincidunt eget turpis. Duis id tellus dolor. Aliquam dictum nibh non sapien sagittis eleifend porta mi ornare. Sed at nulla tellus, in pulvinar turpis. Curabitur iaculis dui nec lacus volutpat laoreet. Mauris faucibus mattis dignissim. Morbi pulvinar volutpat nunc, sed condimentum lacus pellentesque at. Nam ultrices erat in nisl venenatis eu aliquam enim bibendum. Nullam auctor neque at odio luctus scelerisque convallis leo ultrices. Nam vel mi lorem. Curabitur porttitor dapibus risus, in accumsan ipsum ullamcorper non.</p> + <p>Integer ac lectus justo. Mauris id leo mi, fringilla mollis enim. Maecenas a sollicitudin enim. Nam vel felis eu lorem blandit rhoncus vehicula vitae ante. Donec non ipsum at diam imperdiet porta vel ut augue. Aliquam erat volutpat. Morbi quis velit arcu. Curabitur sed dapibus arcu. Phasellus convallis fringilla ipsum id imperdiet. Nulla semper interdum leo a pulvinar. Suspendisse accumsan, dui id placerat venenatis, neque justo auctor mi, quis vulputate tortor massa non sapien. Cras ac est at nibh viverra tristique at eget magna. In hac habitasse platea dictumst. Curabitur porta nisl sagittis enim vestibulum at vestibulum velit eleifend. Aliquam varius mi a quam iaculis at tincidunt lacus scelerisque. Ut adipiscing eros leo.</p> + <p>Aenean at nisl sit amet lacus dapibus semper. Integer lectus libero, rhoncus nec vehicula quis, venenatis vel nibh. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec auctor nibh et lorem dictum dignissim. Proin faucibus fringilla consectetur. Suspendisse non quam eget dui laoreet vestibulum sit amet in ante. Aliquam erat volutpat. Vivamus sit amet ligula ante, non molestie diam. Maecenas et ipsum vitae neque mollis venenatis. Suspendisse congue libero nec elit sollicitudin pellentesque at a quam. Mauris a nunc vitae libero volutpat pulvinar. Phasellus sollicitudin nisi massa. Integer euismod hendrerit ante, nec adipiscing purus pulvinar at. In viverra, neque eget ultricies consectetur, metus libero ultricies ligula, volutpat viverra sapien enim in sapien. Suspendisse id eleifend risus.</p> + <p>Nunc venenatis tortor vitae sem blandit porttitor. Cras nec velit tortor, quis pharetra tellus. Nulla sodales lacinia purus non porta. Donec sit amet purus orci. Curabitur euismod mattis ultricies. Phasellus vestibulum gravida quam. Praesent sed lacus nec enim gravida fringilla eu a erat. Donec blandit urna at neque posuere porta quis ut massa. Nullam a turpis diam. Maecenas mollis, ante quis lobortis vulputate, urna justo vulputate lacus, non placerat sem lectus facilisis magna. Nunc a magna ut nisl varius luctus.</p> + <p>Donec erat mi, ultrices et semper at, vulputate eget urna. Cras quis velit semper erat tempus feugiat. In ut nisl urna. Quisque at urna ligula, ac lacinia tellus. Suspendisse bibendum velit id nulla aliquet bibendum. Fusce imperdiet, nibh non sagittis ornare, lectus lorem consequat tortor, vitae consequat felis justo ac orci. Cras mollis consequat purus id fermentum. Duis vitae augue arcu. Quisque scelerisque orci sed augue tristique consectetur. Duis blandit tincidunt posuere. Morbi a ligula orci, nec blandit lectus. Phasellus non nisi nulla. </p> + </body> +</html> + diff --git a/simple_menu.css b/simple_menu.css new file mode 100644 index 0000000..83771bd --- /dev/null +++ b/simple_menu.css @@ -0,0 +1,49 @@ +.menu_bar { + margin: 0; + padding: 0; + list-style: none; + background-color: #eee; + width: 100%; + height: 29px; +} + +.menu_link { + display: block; + text-decoration: none; + color: #333; + padding: 5px; +} + +.menu_link:hover { background-color: #ddd; } + +.menu_bar_link { + width: 150px; +} + +.menu_cell { + margin: 0; + padding: 0; + list-style: none; + height: 30px; + position: relative; + float: left; +} + +.menu_cell_link { + width: 300px; + background-color: #eee; +} + +.menu_dropdown +{ + margin: 0; + padding: 0; + position: absolute; + display: none; + width: 310px; + border: 1px solid #eee; + border-top: none; + background-color: #eee; +} + +li.menu_cell:hover ul.menu_dropdown, li.over ul.menu_dropdown { display: block; } diff --git a/simple_menu.js b/simple_menu.js new file mode 100644 index 0000000..80b0785 --- /dev/null +++ b/simple_menu.js @@ -0,0 +1,133 @@ +// namespace the menu feature +if(!com) var com={}; +if(!com.choltz) com.choltz={}; +if(!com.choltz.ui) com.choltz.ui={}; + +// +// menu class - build builds up the markup necessary +// to display a dynamic dropdown menu. +// +com.choltz.ui.menu = function() +{ + var public = {}; + var private = {}; + + // constructor + private.init = function() + { + // create a top-level menu element in the menu place-holder + var menu = $("simple_menu"); + var menu_ul = document.createElement("ul"); + menu_ul.id = "menu_bar"; + menu_ul.className = "menu_bar"; + var clear = document.createElement("div"); + clear.style.clear = "both"; + + private.menu_bar = menu.appendChild(menu_ul); + menu.appendChild(clear); + }(); + + // Add a menu item to the top-level menu structure + public.add_menu_item = function(text, url) + { + var menu_item = new com.choltz.ui.menu.menu_item(private.menu_bar); + return menu_item.add_child(text, url); + } + + return public; +} + +// +// This object builds the markup for menu items in the +// dynamic menu structure +// +com.choltz.ui.menu.menu_item = function(parent_element) +{ + var public = {}; + var private = {}; + + // Add a child item to the menu structure + public.add_child = function(text, url) + { + var menu_ul; + var menu_li = document.createElement("li"); + menu_li.className = "menu_cell"; + var menu_link = document.createElement("a"); + + // menu bar items are slightly different than dropdown menu items + if (parent_element.id == "menu_bar") + { + menu_ul = parent_element; + menu_link.className = "menu_link menu_bar_link"; + + // If this is IE, use mouse over and out, as css alone won't work + if (document.all&&document.getElementById) + { + menu_li.onmouseover=function() + { + this.className+=" over"; + } + menu_li.onmouseout=function() + { + this.className=this.className.replace(" over", ""); + } + } + } + else + { + menu_ul = private.get_dropdown(); + menu_link.className = "menu_link menu_cell_link"; + + if (IsIE()) + { + menu_link.style.width = "100%"; + } + } + + // Add a hyperlink to the meu item + menu_link.innerHTML = text; + menu_link.href = url; + menu_li.appendChild(menu_link); + menu_ul.appendChild(menu_li); + + // wrap the element in a menu item object and return it + return com.choltz.ui.menu.menu_item(menu_li); + } + + // figure out the dropdown associated with the item represented + // by this object + private.get_dropdown = function() + { + // create a dropdown container if it isn't already present + if (parent_element.childNodes.length <= 1) + { + menu_ul = document.createElement("ul"); + menu_ul.className = "menu_dropdown"; + menu_ul.style.left = "0px"; + menu_ul.style.top = (IsIE() ? parent_element.clientHeight + "px" : menu_ul.style.top); + + parent_element.appendChild(menu_ul); + } + else + { + menu_ul = parent_element.childNodes[1]; + } + + return menu_ul; + } + + return public; +} + + +// convenience function to retrieve an element by id +function $(id) +{ + return document.getElementById(id); +} + +// return whether or not the browser is Internet Explorer +function IsIE() +{ + return /MSIE/.test(navigator.userAgent) +} diff --git a/simple_menu_custom.css b/simple_menu_custom.css new file mode 100644 index 0000000..108c758 --- /dev/null +++ b/simple_menu_custom.css @@ -0,0 +1,52 @@ +/* + example file that demonstrates ways to customize the look and feel of the simple + menu. Uncomment sections to see how they affect example.html +*/ + +/* *** Thin border on bottom of the main menu bar and around drop-downs +.menu_bar +{ + border-bottom: solid 1px #999; +} + +.menu_dropdown +{ + border: solid 1px #999; + border-top: none; +} +*/ + +/* *** Dashed separator between each item in the drop-down menus +.menu_cell_link +{ + border-bottom: dashed 1px #bbb; +} +*/ + +/* *** Change color of items in the drop-down menus on mouse-over +.menu_cell_link:hover +{ + background-color: white; +} +*/ + + +/* *** Apply transparency to the drop-down menus +.menu_dropdown +{ + background-color: rgba(255,255,255,.5); +} + +.menu_cell_link +{ + background-color: rgba(255,255,255,.5); +} +*/ + +/* *** Crazy red dotted hover border over all menu items +.menu_link:hover +{ + border: dashed 2px red; + padding: 3px; +} +*/ \ No newline at end of file diff --git a/simple_menu_definition.js b/simple_menu_definition.js new file mode 100644 index 0000000..757d7fe --- /dev/null +++ b/simple_menu_definition.js @@ -0,0 +1,30 @@ +// wrap the menu generation in a function so that it can be called +// on page load +function load_menu() +{ + // generate an instance of the simple_menu object + var menu = com.choltz.ui.menu(); + var parent = null; + menu.add_menu_item("Home", ""); + + // build parent and child menu items. The second parameter in each of + // these examples are empty. They should contain the target URL for + // the menu item + parent = menu.add_menu_item("About", ""); + parent.add_child("History", ""); + parent.add_child("Team", ""); + parent.add_child("Offices", ""); + + parent = menu.add_menu_item("Services", ""); + parent.add_child("Web Design", ""); + parent.add_child("Internet Marketing", ""); + parent.add_child("Hosting", ""); + parent.add_child("Domain Names", ""); + parent.add_child("Broadband", ""); + + parent = menu.add_menu_item("Contact Us", ""); + parent.add_child("United Kingdom", ""); + parent.add_child("France", ""); + parent.add_child("USA", ""); + parent.add_child("Australia", ""); +} \ No newline at end of file
lukapiske/ivak
3f6a002496ea71cbf483db00143d0dccec0c443a
gems commented
diff --git a/config/environment.rb b/config/environment.rb index be6e469..047c884 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,109 +1,109 @@ # Be sure to restart your webserver when you modify this file. # Uncomment below to force Rails into production mode # (Use only when you can't set environment variables through your web/app server) # ENV['RAILS_ENV'] = 'production' RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do |config| # Skip frameworks you're not going to use config.frameworks -= [ :active_resource ] # Setup the cache path config.action_controller.page_cache_directory = "#{RAILS_ROOT}/public/cache/" config.cache_store=:file_store, "#{RAILS_ROOT}/public/cache/" # I need the localization plugin to load first # Otherwise, I can't localize plugins <= localization # Forcing manually the load of the textfilters plugins fixes the bugs with apache in production. config.plugins = [ :localization, :all ] config.load_paths += %W( vendor/rubypants vendor/akismet vendor/flickr vendor/uuidtools/lib vendor/rails/railties vendor/rails/railties/lib vendor/rails/actionpack/lib vendor/rails/activesupport/lib vendor/rails/activerecord/lib vendor/rails/actionmailer/lib app/apis ).map {|dir| "#{RAILS_ROOT}/#{dir}"}.select { |dir| File.directory?(dir) } # Declare the gems in vendor/gems, so that we can easily freeze and/or # install them. - config.gem 'htmlentities' - config.gem 'json' - config.gem 'calendar_date_select' - config.gem 'bluecloth', :version => '~> 2.0.5' - config.gem 'coderay', :version => '~> 0.8' - config.gem 'will_paginate', :version => '~> 2.3.11' - config.gem 'RedCloth', :version => '~> 4.2.2' - config.gem 'fdv-actionwebservice', :version => '2.3.8', :lib => 'actionwebservice' - config.gem 'addressable', :version => '~> 2.1.0', :lib => 'addressable/uri' - config.gem 'mini_magick', :version => '~> 1.2.5', :lib => 'mini_magick' +# config.gem 'htmlentities' +# config.gem 'json' +# config.gem 'calendar_date_select' +# config.gem 'bluecloth', :version => '~> 2.0.5' +# config.gem 'coderay', :version => '~> 0.8' +# config.gem 'will_paginate', :version => '~> 2.3.11' +# config.gem 'RedCloth', :version => '~> 4.2.2' +# config.gem 'fdv-actionwebservice', :version => '2.3.8', :lib => 'actionwebservice' +# config.gem 'addressable', :version => '~> 2.1.0', :lib => 'addressable/uri' +# config.gem 'mini_magick', :version => '~> 1.2.5', :lib => 'mini_magick' # Use the filesystem for sessions instead of the database config.action_controller.session = { :key => "_typo_session", :secret => "8d7879bd56b9470b659cdcae88792622" } # Disable use of the Accept header, since it causes bad results with our # static caching (e.g., caching an atom feed as index.html). config.action_controller.use_accept_header = false # Activate observers that should always be running # config.active_record.observers = :cacher, :garbage_collector config.active_record.observers = :email_notifier, :web_notifier end # Load included libraries. require 'rubypants' require 'uuidtools' require 'migrator' require 'rails_patch/active_record' require 'rails_patch/active_support' require 'login_system' require 'typo_version' $KCODE = 'u' require 'jcode' require 'transforms' $FM_OVERWRITE = true require 'filemanager' ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!( :long_weekday => '%a %B %e, %Y %H:%M' ) ActionMailer::Base.default_charset = 'utf-8' # Work around interpolation deprecation problem: %d is replaced by # {{count}}, even when we don't want them to. # FIXME: We should probably fully convert to standard Rails I18n. require 'i18n_interpolation_deprecation' class I18n::Backend::Simple def interpolate(locale, string, values = {}) interpolate_without_deprecated_syntax(locale, string, values) end end if RAILS_ENV != 'test' begin mail_settings = YAML.load(File.read("#{RAILS_ROOT}/config/mail.yml")) ActionMailer::Base.delivery_method = mail_settings['method'] ActionMailer::Base.server_settings = mail_settings['settings'] rescue # Fall back to using sendmail by default ActionMailer::Base.delivery_method = :sendmail end end FLICKR_KEY='84f652422f05b96b29b9a960e0081c50' diff --git a/log/development.log b/log/development.log index cb2fbaf..b598b34 100644 --- a/log/development.log +++ b/log/development.log @@ -70284,513 +70284,1646 @@ Completed in 51ms (View: 1, DB: 5) | 200 OK [http://localhost/admin/themes/previ SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 Processing Admin::DashboardController#index (for 127.0.0.1 at 2010-09-13 22:35:22) [GET] Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-13 22:35:22')  Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` User Columns (1.5ms) SHOW FIELDS FROM `users` User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1 Profile Columns (0.8ms) SHOW FIELDS FROM `profiles` Profile Load (0.2ms) SELECT * FROM `profiles` WHERE (`profiles`.`id` = 1)  SQL (0.8ms) SHOW TABLES SQL (0.2ms) SELECT version FROM schema_migrations Article Columns (1.3ms) SHOW FIELDS FROM `contents` SQL (0.2ms) SELECT count(*) AS count_all FROM `contents` WHERE (published = 1 and published_at > NULL) AND ( (`contents`.`type` = 'Article' ) )  Feedback Columns (1.2ms) SHOW FIELDS FROM `feedback` SQL (0.2ms) SELECT count(*) AS count_all FROM `feedback` WHERE (state in ('presumed_ham','ham') and published_at > NULL) AND ( (`feedback`.`type` = 'Feedback' OR `feedback`.`type` = 'Comment' OR `feedback`.`type` = 'Trackback' ) )  Comment Columns (1.2ms) SHOW FIELDS FROM `feedback` Comment Load (0.2ms) SELECT * FROM `feedback` WHERE (published = 1) AND ( (`feedback`.`type` = 'Comment' ) ) ORDER BY created_at DESC LIMIT 5 Article Load (0.2ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Article' ) ) ORDER BY published_at DESC LIMIT 5 Article Load (0.2ms) SELECT contents.*, comment_counts.count AS comment_count FROM contents, (SELECT feedback.article_id AS article_id, COUNT(feedback.id) as count FROM feedback WHERE feedback.state IN ('presumed_ham', 'ham') GROUP BY feedback.article_id ORDER BY count DESC LIMIT 9) AS comment_counts WHERE (comment_counts.article_id = contents.id AND published = 1) AND ( (`contents`.`type` = 'Article' ) ) ORDER BY comment_counts.count DESC LIMIT 5 SQL (0.2ms) SELECT count(*) AS count_all FROM `contents` WHERE (`contents`.`published` = 1) AND ( (`contents`.`type` = 'Article' ) )  SQL (0.2ms) SELECT count(*) AS count_all FROM `contents` WHERE (`contents`.user_id = 1) AND ( (`contents`.`type` = 'Article' ) )  SQL (0.1ms) SELECT count(*) AS count_all FROM `feedback` WHERE (state != 'spam') AND ( (`feedback`.`type` = 'Comment' ) )  SQL (0.2ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.`state` = 'spam') AND ( (`feedback`.`type` = 'Comment' ) )  Rendering template within layouts/administration Rendering admin/dashboard/index Rendered admin/dashboard/_overview (2.4ms) Rendered admin/dashboard/_welcome (6.3ms) Rendered admin/dashboard/_inbound (1.8ms) Article Load (0.2ms) SELECT * FROM `contents` WHERE (`contents`.`id` = 24) AND ( (`contents`.`type` = 'Article' ) )  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Article Load (0.1ms) SELECT * FROM `contents` WHERE (`contents`.`id` = 17) AND ( (`contents`.`type` = 'Article' ) )  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `contents` WHERE (`contents`.`id` = 17) AND ( (`contents`.`type` = 'Article' ) )  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Rendered admin/dashboard/_comments (21.4ms) CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 SQL (0.1ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.article_id = 24 AND (`feedback`.`published` = 1)) AND ( (`feedback`.`type` = 'Comment' ) )  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 SQL (0.1ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.article_id = 23 AND (`feedback`.`published` = 1)) AND ( (`feedback`.`type` = 'Comment' ) )  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 SQL (0.1ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.article_id = 22 AND (`feedback`.`published` = 1)) AND ( (`feedback`.`type` = 'Comment' ) )  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 SQL (0.1ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.article_id = 21 AND (`feedback`.`published` = 1)) AND ( (`feedback`.`type` = 'Comment' ) )  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 SQL (0.2ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.article_id = 20 AND (`feedback`.`published` = 1)) AND ( (`feedback`.`type` = 'Comment' ) )  Rendered admin/dashboard/_posts (17.4ms) CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Rendered admin/dashboard/_popular (3.2ms) Rendered admin/dashboard/_typo_dev (2.2ms) Completed in 9889ms (View: 70, DB: 12) | 200 OK [http://localhost/admin] SQL (0.4ms) SET SQL_AUTO_IS_NULL=0 Processing Admin::SettingsController#index (for 127.0.0.1 at 2010-09-13 22:35:39) [GET] Trigger Load (0.6ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-13 22:35:39')  Blog Load (0.1ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (1.2ms) SHOW FIELDS FROM `blogs` User Columns (1.7ms) SHOW FIELDS FROM `users` User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1 Profile Columns (0.9ms) SHOW FIELDS FROM `profiles` Profile Load (0.1ms) SELECT * FROM `profiles` WHERE (`profiles`.`id` = 1)  SQL (0.7ms) SHOW TABLES SQL (0.2ms) SELECT version FROM schema_migrations Rendering template within layouts/administration Rendering admin/settings/index Rendered admin/settings/_submit (8.8ms) Completed in 128ms (View: 89, DB: 6) | 200 OK [http://localhost/admin/settings] SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Processing Admin::UsersController#index (for 127.0.0.1 at 2010-09-13 22:35:59) [GET] Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-13 22:35:59')  Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.7ms) SHOW FIELDS FROM `blogs` User Columns (1.5ms) SHOW FIELDS FROM `users` User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1 Profile Columns (0.7ms) SHOW FIELDS FROM `profiles` Profile Load (0.2ms) SELECT * FROM `profiles` WHERE (`profiles`.`id` = 1)  SQL (0.8ms) SHOW TABLES SQL (0.2ms) SELECT version FROM schema_migrations User Load (0.6ms) SELECT * FROM `users` ORDER BY login asc LIMIT 0, 10 Rendering template within layouts/administration Rendering admin/users/index CACHE (0.0ms) SELECT * FROM `profiles` WHERE (`profiles`.`id` = 1)  Article Columns (1.2ms) SHOW FIELDS FROM `contents` SQL (0.6ms) SELECT count(*) AS count_all FROM `contents` WHERE (user_id = 1) AND ( (`contents`.`type` = 'Article' ) )  Comment Columns (1.3ms) SHOW FIELDS FROM `feedback` SQL (0.5ms) SELECT count(*) AS count_all FROM `feedback` WHERE (user_id = 1) AND ( (`feedback`.`type` = 'Comment' ) )  Completed in 117ms (View: 76, DB: 9) | 200 OK [http://localhost/admin/users] SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Processing Admin::UsersController#new (for 127.0.0.1 at 2010-09-13 22:36:10) [GET] Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-13 22:36:10')  Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (1.1ms) SHOW FIELDS FROM `blogs` User Columns (1.5ms) SHOW FIELDS FROM `users` User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1 Profile Columns (0.8ms) SHOW FIELDS FROM `profiles` Profile Load (0.2ms) SELECT * FROM `profiles` WHERE (`profiles`.`id` = 1)  SQL (0.7ms) SHOW TABLES SQL (0.1ms) SELECT version FROM schema_migrations TextFilter Columns (0.9ms) SHOW FIELDS FROM `text_filters` TextFilter Load (0.5ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`name` = 'markdown smartypants') LIMIT 1 Profile Load (0.4ms) SELECT * FROM `profiles` ORDER BY id Rendering template within layouts/administration Rendering admin/users/new TextFilter Load (0.2ms) SELECT * FROM `text_filters`  Rendered admin/users/_form (20.3ms) Completed in 169ms (View: 106, DB: 7) | 200 OK [http://localhost/admin/users/new] SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing Ivana::IvanaController#index (for 127.0.0.1 at 2010-09-13 22:36:25) [GET] Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-13 22:36:25')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default Rendering ivana/ivana/index Sidebar Load (0.2ms) SELECT * FROM `sidebars` ORDER BY active_position ASC Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml Page Columns (1.4ms) SHOW FIELDS FROM `contents` Page Load (0.2ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml Category Load (0.2ms)  SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter FROM categories categories LEFT OUTER JOIN categorizations articles_categories ON articles_categories.category_id = categories.id LEFT OUTER JOIN contents articles ON (articles_categories.article_id = articles.id AND articles.published = 1) GROUP BY categories.id, categories.name, categories.position, categories.permalink ORDER BY position  Category Columns (0.8ms) SHOW FIELDS FROM `categories` Completed in 61ms (View: 47, DB: 2) | 200 OK [http://localhost/] SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-13 22:36:26) [GET] Parameters: {"filename"=>"application.css"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-13 22:36:26')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 18ms (View: 2, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-13 22:36:27) [GET] Parameters: {"filename"=>"body.jpg"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-13 22:36:27')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 16ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-13 22:36:27) [GET] Parameters: {"filename"=>"container.jpg"} Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-13 22:36:27')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 17ms (View: 2, DB: 1) | 200 OK [http://localhost/images/theme/container.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg SQL (1.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-13 22:36:28) [GET] Parameters: {"filename"=>"header.jpg"} Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-13 22:36:28')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 22ms (View: 2, DB: 3) | 200 OK [http://localhost/images/theme/header.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-13 22:36:29) [GET] Parameters: {"filename"=>"main.gif"} Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-13 22:36:29')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 18ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/main.gif] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.5ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.7ms) SHOW FIELDS FROM `blogs` Processing ArticlesController#view_page (for 127.0.0.1 at 2010-09-22 16:31:08) [GET] Parameters: {"name"=>["kontakt"]} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:08')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 User Columns (2.6ms) SHOW FIELDS FROM `users` SQL (0.6ms) SELECT count(*) AS count_all FROM `users`  Page Columns (1.4ms) SHOW FIELDS FROM `contents` Page Load (0.6ms) SELECT * FROM `contents` WHERE (`contents`.`name` = 'kontakt') AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id ASC LIMIT 1 Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default Rendering articles/view_page TextFilter Columns (0.9ms) SHOW FIELDS FROM `text_filters` TextFilter Load (0.5ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 4)  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Sidebar Load (0.4ms) SELECT * FROM `sidebars` ORDER BY active_position ASC Sidebar Columns (0.9ms) SHOW FIELDS FROM `sidebars` PageSidebar Columns (0.9ms) SHOW FIELDS FROM `sidebars` Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml Page Load (1.5ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CategorySidebar Columns (1.1ms) SHOW FIELDS FROM `sidebars` Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml Category Load (2.0ms)  SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter FROM categories categories LEFT OUTER JOIN categorizations articles_categories ON articles_categories.category_id = categories.id LEFT OUTER JOIN contents articles ON (articles_categories.article_id = articles.id AND articles.published = 1) GROUP BY categories.id, categories.name, categories.position, categories.permalink ORDER BY position  Category Columns (1.4ms) SHOW FIELDS FROM `categories` Completed in 521ms (View: 315, DB: 7) | 200 OK [http://localhost/pages/kontakt] SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-22 16:31:09) [GET] Parameters: {"filename"=>"application.css"} Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:09')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 149ms (View: 118, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:10) [GET] Parameters: {"filename"=>"body.jpg"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:10')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 38ms (View: 3, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (1.0ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:10) [GET] Parameters: {"filename"=>"container.jpg"} Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:10')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 17ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (1.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:11) [GET] Parameters: {"filename"=>"main.gif"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:11')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 121ms (View: 2, DB: 3) | 200 OK [http://localhost/images/theme/main.gif] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (1.5ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:11) [GET] Parameters: {"filename"=>"header.jpg"} Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:11')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 17ms (View: 2, DB: 3) | 200 OK [http://localhost/images/theme/header.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ArticlesController#view_page (for 127.0.0.1 at 2010-09-22 16:31:12) [GET] Parameters: {"name"=>["tft"]} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:12')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 User Columns (1.5ms) SHOW FIELDS FROM `users` SQL (0.2ms) SELECT count(*) AS count_all FROM `users`  Page Columns (1.3ms) SHOW FIELDS FROM `contents` Page Load (0.7ms) SELECT * FROM `contents` WHERE (`contents`.`name` = 'tft') AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id ASC LIMIT 1 Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default Rendering articles/view_page TextFilter Columns (0.9ms) SHOW FIELDS FROM `text_filters` TextFilter Load (0.2ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 4)  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Sidebar Load (0.2ms) SELECT * FROM `sidebars` ORDER BY active_position ASC Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml Page Load (0.2ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml Category Load (0.2ms)  SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter FROM categories categories LEFT OUTER JOIN categorizations articles_categories ON articles_categories.category_id = categories.id LEFT OUTER JOIN contents articles ON (articles_categories.article_id = articles.id AND articles.published = 1) GROUP BY categories.id, categories.name, categories.position, categories.permalink ORDER BY position  Category Columns (0.8ms) SHOW FIELDS FROM `categories` Completed in 207ms (View: 175, DB: 5) | 200 OK [http://localhost/pages/tft] SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (1.1ms) SHOW FIELDS FROM `blogs` Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-22 16:31:13) [GET] Parameters: {"filename"=>"application.css"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:13')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 16ms (View: 2, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:14) [GET] Parameters: {"filename"=>"body.jpg"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:14')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 18ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:14) [GET] Parameters: {"filename"=>"header.jpg"} Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:14')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 19ms (View: 2, DB: 1) | 200 OK [http://localhost/images/theme/header.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:15) [GET] Parameters: {"filename"=>"main.gif"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:15')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 17ms (View: 2, DB: 1) | 200 OK [http://localhost/images/theme/main.gif] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:16) [GET] Parameters: {"filename"=>"container.jpg"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:16')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 20ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` Processing ArticlesController#view_page (for 127.0.0.1 at 2010-09-22 16:31:19) [GET] Parameters: {"name"=>["-"]} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:19')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 User Columns (1.5ms) SHOW FIELDS FROM `users` SQL (0.2ms) SELECT count(*) AS count_all FROM `users`  Page Columns (1.3ms) SHOW FIELDS FROM `contents` Page Load (0.6ms) SELECT * FROM `contents` WHERE (`contents`.`name` = '-') AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id ASC LIMIT 1 Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default Rendering articles/view_page TextFilter Columns (1.0ms) SHOW FIELDS FROM `text_filters` TextFilter Load (0.6ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 1)  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Sidebar Load (0.2ms) SELECT * FROM `sidebars` ORDER BY active_position ASC Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml Page Load (0.2ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml Category Load (0.2ms)  SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter FROM categories categories LEFT OUTER JOIN categorizations articles_categories ON articles_categories.category_id = categories.id LEFT OUTER JOIN contents articles ON (articles_categories.article_id = articles.id AND articles.published = 1) GROUP BY categories.id, categories.name, categories.position, categories.permalink ORDER BY position  Category Columns (0.8ms) SHOW FIELDS FROM `categories` Completed in 91ms (View: 59, DB: 5) | 200 OK [http://localhost/pages/-] SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-22 16:31:20) [GET] Parameters: {"filename"=>"application.css"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:20')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 17ms (View: 2, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:21) [GET] Parameters: {"filename"=>"body.jpg"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:21')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 17ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:22) [GET] Parameters: {"filename"=>"container.jpg"} Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:22')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 20ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:22) [GET] Parameters: {"filename"=>"header.jpg"} Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:22')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 18ms (View: 2, DB: 1) | 200 OK [http://localhost/images/theme/header.jpg] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Blog Columns (1.2ms) SHOW FIELDS FROM `blogs` Processing ThemeController#images (for 127.0.0.1 at 2010-09-22 16:31:23) [GET] Parameters: {"filename"=>"main.gif"} Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-22 16:31:23')  CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 Completed in 16ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/main.gif] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif + SQL (0.4ms) SET NAMES 'utf8' + SQL (0.4ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (15.7ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.3ms) SHOW FIELDS FROM `blogs` + + +Processing Ivana::IvanaController#index (for 127.0.0.1 at 2010-09-23 15:03:50) [GET] + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:50')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default +Rendering ivana/ivana/index + Sidebar Load (0.6ms) SELECT * FROM `sidebars` ORDER BY active_position ASC + Sidebar Columns (1.2ms) SHOW FIELDS FROM `sidebars` + PageSidebar Columns (1.2ms) SHOW FIELDS FROM `sidebars` +Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml + Page Columns (2.5ms) SHOW FIELDS FROM `contents` + Page Load (1.3ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CategorySidebar Columns (0.9ms) SHOW FIELDS FROM `sidebars` +Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml + Category Load (18.7ms)  + SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter + FROM categories categories + LEFT OUTER JOIN categorizations articles_categories + ON articles_categories.category_id = categories.id + LEFT OUTER JOIN contents articles + ON (articles_categories.article_id = articles.id AND articles.published = 1) + GROUP BY categories.id, categories.name, categories.position, categories.permalink + ORDER BY position +  + Category Columns (1.6ms) SHOW FIELDS FROM `categories` +Completed in 525ms (View: 405, DB: 18) | 200 OK [http://localhost/] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.3ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-23 15:03:51) [GET] + Parameters: {"filename"=>"application.css"} + Trigger Load (0.6ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:51')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 23ms (View: 3, DB: 3) | 200 OK [http://localhost/stylesheets/theme/application.css] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.3ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.0ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:03:52) [GET] + Parameters: {"filename"=>"body.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:52')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 20ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:03:52) [GET] + Parameters: {"filename"=>"container.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:52')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 20ms (View: 1, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.9ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.3ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:03:52) [GET] + Parameters: {"filename"=>"header.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:52')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 18ms (View: 2, DB: 3) | 200 OK [http://localhost/images/theme/header.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.0ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:03:53) [GET] + Parameters: {"filename"=>"main.gif"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:53')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 27ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/main.gif] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.1ms) SHOW FIELDS FROM `blogs` + + +Processing ArticlesController#view_page (for 127.0.0.1 at 2010-09-23 15:03:54) [GET] + Parameters: {"name"=>["tft"]} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:54')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + User Columns (1.5ms) SHOW FIELDS FROM `users` + SQL (0.4ms) SELECT count(*) AS count_all FROM `users`  + Page Columns (1.3ms) SHOW FIELDS FROM `contents` + Page Load (0.7ms) SELECT * FROM `contents` WHERE (`contents`.`name` = 'tft') AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id ASC LIMIT 1 +Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default +Rendering articles/view_page + TextFilter Columns (1.0ms) SHOW FIELDS FROM `text_filters` + TextFilter Load (0.5ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 4)  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Sidebar Load (0.2ms) SELECT * FROM `sidebars` ORDER BY active_position ASC +Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml + Page Load (0.2ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml + Category Load (0.2ms)  + SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter + FROM categories categories + LEFT OUTER JOIN categorizations articles_categories + ON articles_categories.category_id = categories.id + LEFT OUTER JOIN contents articles + ON (articles_categories.article_id = articles.id AND articles.published = 1) + GROUP BY categories.id, categories.name, categories.position, categories.permalink + ORDER BY position +  + Category Columns (1.0ms) SHOW FIELDS FROM `categories` +Completed in 130ms (View: 94, DB: 6) | 200 OK [http://localhost/pages/tft] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-23 15:03:55) [GET] + Parameters: {"filename"=>"application.css"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:55')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 19ms (View: 2, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.3ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:03:55) [GET] + Parameters: {"filename"=>"body.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:55')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 16ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:03:56) [GET] + Parameters: {"filename"=>"container.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:56')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 24ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:03:57) [GET] + Parameters: {"filename"=>"header.jpg"} + Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:57')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 18ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/header.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.3ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:03:57) [GET] + Parameters: {"filename"=>"main.gif"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:57')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 23ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/main.gif] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ArticlesController#view_page (for 127.0.0.1 at 2010-09-23 15:03:58) [GET] + Parameters: {"name"=>["-"]} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:58')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + User Columns (1.4ms) SHOW FIELDS FROM `users` + SQL (0.2ms) SELECT count(*) AS count_all FROM `users`  + Page Columns (1.3ms) SHOW FIELDS FROM `contents` + Page Load (0.6ms) SELECT * FROM `contents` WHERE (`contents`.`name` = '-') AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id ASC LIMIT 1 +Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default +Rendering articles/view_page + TextFilter Columns (0.9ms) SHOW FIELDS FROM `text_filters` + TextFilter Load (0.5ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 1)  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Sidebar Load (0.2ms) SELECT * FROM `sidebars` ORDER BY active_position ASC +Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml + Page Load (0.3ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml + Category Load (0.2ms)  + SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter + FROM categories categories + LEFT OUTER JOIN categorizations articles_categories + ON articles_categories.category_id = categories.id + LEFT OUTER JOIN contents articles + ON (articles_categories.article_id = articles.id AND articles.published = 1) + GROUP BY categories.id, categories.name, categories.position, categories.permalink + ORDER BY position +  + Category Columns (1.0ms) SHOW FIELDS FROM `categories` +Completed in 202ms (View: 65, DB: 5) | 200 OK [http://localhost/pages/-] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-23 15:03:59) [GET] + Parameters: {"filename"=>"application.css"} + Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:59')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 16ms (View: 2, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.0ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:03:59) [GET] + Parameters: {"filename"=>"body.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:03:59')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 19ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:04:00) [GET] + Parameters: {"filename"=>"container.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:00')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 16ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:04:00) [GET] + Parameters: {"filename"=>"main.gif"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:00')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 16ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/main.gif] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.1ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:04:01) [GET] + Parameters: {"filename"=>"header.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:01')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 19ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/header.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ArticlesController#view_page (for 127.0.0.1 at 2010-09-23 15:04:02) [GET] + Parameters: {"name"=>["keramika"]} + Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:02')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + User Columns (1.7ms) SHOW FIELDS FROM `users` + SQL (0.2ms) SELECT count(*) AS count_all FROM `users`  + Page Columns (2.9ms) SHOW FIELDS FROM `contents` + Page Load (0.6ms) SELECT * FROM `contents` WHERE (`contents`.`name` = 'keramika') AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id ASC LIMIT 1 +Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default +Rendering articles/view_page + TextFilter Columns (1.0ms) SHOW FIELDS FROM `text_filters` + TextFilter Load (0.2ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 4)  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Sidebar Load (0.2ms) SELECT * FROM `sidebars` ORDER BY active_position ASC +Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml + Page Load (0.3ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml + Category Load (0.2ms)  + SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter + FROM categories categories + LEFT OUTER JOIN categorizations articles_categories + ON articles_categories.category_id = categories.id + LEFT OUTER JOIN contents articles + ON (articles_categories.article_id = articles.id AND articles.published = 1) + GROUP BY categories.id, categories.name, categories.position, categories.permalink + ORDER BY position +  + Category Columns (1.0ms) SHOW FIELDS FROM `categories` +Completed in 90ms (View: 58, DB: 7) | 200 OK [http://localhost/pages/keramika] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-23 15:04:03) [GET] + Parameters: {"filename"=>"application.css"} + Trigger Load (0.6ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:03')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 20ms (View: 2, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:04:03) [GET] + Parameters: {"filename"=>"body.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:03')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 16ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:04:04) [GET] + Parameters: {"filename"=>"container.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:04')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 18ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.0ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:04:04) [GET] + Parameters: {"filename"=>"header.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:04')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 19ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/header.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 15:04:05) [GET] + Parameters: {"filename"=>"main.gif"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:05')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 16ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/main.gif] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + + +Processing Admin::DashboardController#index (for 127.0.0.1 at 2010-09-23 15:04:11) [GET] + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:11')  + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + User Load (0.5ms) SELECT * FROM `users` LIMIT 1 +Redirected to http://localhost:3000/accounts/login +Filter chain halted as [:login_required] rendered_or_redirected. +Completed in 21ms (DB: 2) | 302 Found [http://localhost/admin] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + + +Processing AccountsController#login (for 127.0.0.1 at 2010-09-23 15:04:11) [GET] + Parameters: {"action"=>"login", "controller"=>"accounts"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:11')  + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + User Columns (1.7ms) SHOW FIELDS FROM `users` + SQL (0.2ms) SELECT count(*) AS count_all FROM `users`  +Rendering template within layouts/accounts +Rendering accounts/login +Completed in 86ms (View: 58, DB: 4) | 200 OK [http://localhost/accounts/login] + SQL (0.5ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + + +Processing AccountsController#login (for 127.0.0.1 at 2010-09-23 15:04:16) [POST] + Parameters: {"action"=>"login", "authenticity_token"=>"y7kdnyEWntQ0dAwfrjahfCI6vOjKnDP473vVrCxTu3o=", "controller"=>"accounts", "user"=>{"password"=>"[FILTERED]", "login"=>"admin"}, "login"=>"Submit"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:16')  + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + User Columns (1.6ms) SHOW FIELDS FROM `users` + SQL (0.2ms) SELECT count(*) AS count_all FROM `users`  + User Load (0.7ms) SELECT * FROM `users` WHERE (login = 'admin' AND password = 'ef3d1031b038b55651bae3dd26c46337b59574f8' AND state = 'active') LIMIT 1 + Profile Columns (1.3ms) SHOW FIELDS FROM `profiles` + Profile Load (0.7ms) SELECT * FROM `profiles` WHERE (`profiles`.`id` = 1)  + SQL (0.2ms) BEGIN + CACHE (0.0ms) SELECT count(*) AS count_all FROM `users`  + User Load (0.6ms) SELECT * FROM `users` WHERE (`users`.`id` = 1)  + User Update (0.6ms) UPDATE `users` SET `last_connection` = '2010-09-23 15:04:16' WHERE `id` = 1 + SQL (47.1ms) COMMIT +Redirected to http://localhost:3000/admin +Completed in 140ms (DB: 55) | 302 Found [http://localhost/accounts/login] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + + +Processing Admin::DashboardController#index (for 127.0.0.1 at 2010-09-23 15:04:17) [GET] + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:17')  + Blog Load (1.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + User Columns (1.6ms) SHOW FIELDS FROM `users` + User Load (0.6ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1 + Profile Columns (0.9ms) SHOW FIELDS FROM `profiles` + Profile Load (0.2ms) SELECT * FROM `profiles` WHERE (`profiles`.`id` = 1)  + SQL (1.2ms) SHOW TABLES + SQL (0.8ms) SELECT version FROM schema_migrations + Article Columns (2.8ms) SHOW FIELDS FROM `contents` + SQL (1.2ms) SELECT count(*) AS count_all FROM `contents` WHERE (published = 1 and published_at > NULL) AND ( (`contents`.`type` = 'Article' ) )  + Feedback Columns (2.9ms) SHOW FIELDS FROM `feedback` + SQL (0.8ms) SELECT count(*) AS count_all FROM `feedback` WHERE (state in ('presumed_ham','ham') and published_at > NULL) AND ( (`feedback`.`type` = 'Feedback' OR `feedback`.`type` = 'Comment' OR `feedback`.`type` = 'Trackback' ) )  + Comment Columns (11.7ms) SHOW FIELDS FROM `feedback` + Comment Load (0.7ms) SELECT * FROM `feedback` WHERE (published = 1) AND ( (`feedback`.`type` = 'Comment' ) ) ORDER BY created_at DESC LIMIT 5 + Article Load (0.9ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Article' ) ) ORDER BY published_at DESC LIMIT 5 + Article Load (1.0ms) SELECT contents.*, comment_counts.count AS comment_count FROM contents, (SELECT feedback.article_id AS article_id, COUNT(feedback.id) as count FROM feedback WHERE feedback.state IN ('presumed_ham', 'ham') GROUP BY feedback.article_id ORDER BY count DESC LIMIT 9) AS comment_counts WHERE (comment_counts.article_id = contents.id AND published = 1) AND ( (`contents`.`type` = 'Article' ) ) ORDER BY comment_counts.count DESC LIMIT 5 + SQL (0.7ms) SELECT count(*) AS count_all FROM `contents` WHERE (`contents`.`published` = 1) AND ( (`contents`.`type` = 'Article' ) )  + SQL (0.7ms) SELECT count(*) AS count_all FROM `contents` WHERE (`contents`.user_id = 1) AND ( (`contents`.`type` = 'Article' ) )  + SQL (0.5ms) SELECT count(*) AS count_all FROM `feedback` WHERE (state != 'spam') AND ( (`feedback`.`type` = 'Comment' ) )  + SQL (0.5ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.`state` = 'spam') AND ( (`feedback`.`type` = 'Comment' ) )  +Rendering template within layouts/administration +Rendering admin/dashboard/index +Rendered admin/dashboard/_overview (12.6ms) +Rendered admin/dashboard/_welcome (8.2ms) +Rendered admin/dashboard/_inbound (3.5ms) + Article Load (0.6ms) SELECT * FROM `contents` WHERE (`contents`.`id` = 24) AND ( (`contents`.`type` = 'Article' ) )  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Article Load (0.6ms) SELECT * FROM `contents` WHERE (`contents`.`id` = 17) AND ( (`contents`.`type` = 'Article' ) )  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `contents` WHERE (`contents`.`id` = 17) AND ( (`contents`.`type` = 'Article' ) )  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendered admin/dashboard/_comments (23.9ms) + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + SQL (0.8ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.article_id = 24 AND (`feedback`.`published` = 1)) AND ( (`feedback`.`type` = 'Comment' ) )  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + SQL (0.5ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.article_id = 23 AND (`feedback`.`published` = 1)) AND ( (`feedback`.`type` = 'Comment' ) )  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + SQL (0.6ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.article_id = 22 AND (`feedback`.`published` = 1)) AND ( (`feedback`.`type` = 'Comment' ) )  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + SQL (0.6ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.article_id = 21 AND (`feedback`.`published` = 1)) AND ( (`feedback`.`type` = 'Comment' ) )  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + SQL (0.6ms) SELECT count(*) AS count_all FROM `feedback` WHERE (`feedback`.article_id = 20 AND (`feedback`.`published` = 1)) AND ( (`feedback`.`type` = 'Comment' ) )  +Rendered admin/dashboard/_posts (23.2ms) + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendered admin/dashboard/_popular (4.5ms) +Rendered admin/dashboard/_typo_dev (4.2ms) +Completed in 1709ms (View: 323, DB: 37) | 200 OK [http://localhost/admin] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + + +Processing Admin::ContentController#new (for 127.0.0.1 at 2010-09-23 15:04:22) [GET] + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:22')  + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + User Columns (1.5ms) SHOW FIELDS FROM `users` + User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1 + Profile Columns (0.9ms) SHOW FIELDS FROM `profiles` + Profile Load (0.2ms) SELECT * FROM `profiles` WHERE (`profiles`.`id` = 1)  + SQL (0.7ms) SHOW TABLES + SQL (0.2ms) SELECT version FROM schema_migrations + Article Columns (1.3ms) SHOW FIELDS FROM `contents` + TextFilter Columns (0.9ms) SHOW FIELDS FROM `text_filters` + TextFilter Load (0.5ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`name` = '1') LIMIT 1 + TextFilter Load (0.5ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`name` = 'none') LIMIT 1 +#<Article:0x7f8878566d70> leaving state Article::States::New +#<Article:0x7f8878566d70> entering state Article::States::JustPublished +#<Article:0x7f8878566d70> leaving state Article::States::JustPublished +#<Article:0x7f8878566d70> entering state Article::States::Published + Resource Load (0.6ms) SELECT * FROM `resources` WHERE (mime NOT LIKE '%image%') ORDER BY filename + Resource Load (0.7ms) SELECT * FROM `resources` WHERE (mime LIKE '%image%') ORDER BY created_at DESC LIMIT 0, 10 +Rendering template within layouts/administration +Rendering admin/content/new + TextFilter Load (0.2ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 1)  + Category Load (0.6ms) SELECT * FROM `categories` ORDER BY position ASC + Category Columns (1.1ms) SHOW FIELDS FROM `categories` + Resource Columns (1.3ms) SHOW FIELDS FROM `resources` +Rendered admin/content/_images (7.8ms) +Rendered admin/content/_attachment (6.8ms) + TextFilter Load (0.5ms) SELECT * FROM `text_filters`  + CACHE (0.0ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 1)  +Rendered admin/content/_form (65.4ms) +Rendered admin/shared/_edit (89.9ms) +Completed in 375ms (View: 141, DB: 14) | 200 OK [http://localhost/admin/content/new] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + + +Processing Admin::SettingsController#index (for 127.0.0.1 at 2010-09-23 15:04:26) [GET] + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 15:04:26')  + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + User Columns (1.7ms) SHOW FIELDS FROM `users` + User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1 + Profile Columns (1.0ms) SHOW FIELDS FROM `profiles` + Profile Load (0.2ms) SELECT * FROM `profiles` WHERE (`profiles`.`id` = 1)  + SQL (0.7ms) SHOW TABLES + SQL (0.2ms) SELECT version FROM schema_migrations +Rendering template within layouts/administration +Rendering admin/settings/index +Rendered admin/settings/_submit (1.1ms) +Completed in 110ms (View: 71, DB: 6) | 200 OK [http://localhost/admin/settings] + SQL (0.3ms) SET NAMES 'utf8' + SQL (0.3ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.8ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.0ms) SHOW FIELDS FROM `blogs` + + +Processing Ivana::IvanaController#index (for 127.0.0.1 at 2010-09-23 17:23:47) [GET] + Trigger Load (0.6ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:23:47')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default +Rendering ivana/ivana/index + Sidebar Load (0.7ms) SELECT * FROM `sidebars` ORDER BY active_position ASC + Sidebar Columns (0.9ms) SHOW FIELDS FROM `sidebars` + PageSidebar Columns (1.3ms) SHOW FIELDS FROM `sidebars` +Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml + Page Columns (2.8ms) SHOW FIELDS FROM `contents` + Page Load (1.2ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CategorySidebar Columns (0.9ms) SHOW FIELDS FROM `sidebars` +Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml + Category Load (40.0ms)  + SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter + FROM categories categories + LEFT OUTER JOIN categorizations articles_categories + ON articles_categories.category_id = categories.id + LEFT OUTER JOIN contents articles + ON (articles_categories.article_id = articles.id AND articles.published = 1) + GROUP BY categories.id, categories.name, categories.position, categories.permalink + ORDER BY position +  + Category Columns (1.7ms) SHOW FIELDS FROM `categories` +Completed in 432ms (View: 360, DB: 3) | 200 OK [http://localhost/] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.3ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-23 17:23:49) [GET] + Parameters: {"filename"=>"application.css"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:23:49')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 30ms (View: 3, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.3ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:23:49) [GET] + Parameters: {"filename"=>"body.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:23:49')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 18ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg + SQL (0.5ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:23:50) [GET] + Parameters: {"filename"=>"container.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:23:50')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 19ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.4ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.2ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:23:50) [GET] + Parameters: {"filename"=>"header.jpg"} + Trigger Load (0.3ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:23:50')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 19ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/header.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.2ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:23:51) [GET] + Parameters: {"filename"=>"main.gif"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:23:51')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 15ms (View: 1, DB: 2) | 200 OK [http://localhost/images/theme/main.gif] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.5ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing Ivana::IvanaController#index (for 127.0.0.1 at 2010-09-23 17:24:28) [GET] + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:28')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default +Rendering ivana/ivana/index + Sidebar Load (0.5ms) SELECT * FROM `sidebars` ORDER BY active_position ASC + Sidebar Columns (0.9ms) SHOW FIELDS FROM `sidebars` + PageSidebar Columns (0.9ms) SHOW FIELDS FROM `sidebars` +Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml + Page Columns (1.3ms) SHOW FIELDS FROM `contents` + Page Load (1.0ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CategorySidebar Columns (0.9ms) SHOW FIELDS FROM `sidebars` +Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml + Category Load (1.2ms)  + SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter + FROM categories categories + LEFT OUTER JOIN categorizations articles_categories + ON articles_categories.category_id = categories.id + LEFT OUTER JOIN contents articles + ON (articles_categories.article_id = articles.id AND articles.published = 1) + GROUP BY categories.id, categories.name, categories.position, categories.permalink + ORDER BY position +  + Category Columns (0.9ms) SHOW FIELDS FROM `categories` +Completed in 204ms (View: 185, DB: 2) | 200 OK [http://localhost/] + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-23 17:24:29) [GET] + Parameters: {"filename"=>"application.css"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:29')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 18ms (View: 2, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + + +Processing Ivana::IvanaController#index (for 127.0.0.1 at 2010-09-23 17:24:29) [GET] + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:29')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default +Rendering ivana/ivana/index + Sidebar Load (0.2ms) SELECT * FROM `sidebars` ORDER BY active_position ASC +Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml + Page Columns (1.3ms) SHOW FIELDS FROM `contents` + Page Load (0.3ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml + Category Load (0.2ms)  + SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter + FROM categories categories + LEFT OUTER JOIN categorizations articles_categories + ON articles_categories.category_id = categories.id + LEFT OUTER JOIN contents articles + ON (articles_categories.article_id = articles.id AND articles.published = 1) + GROUP BY categories.id, categories.name, categories.position, categories.permalink + ORDER BY position +  + Category Columns (0.9ms) SHOW FIELDS FROM `categories` +Completed in 86ms (View: 70, DB: 1) | 200 OK [http://localhost/] + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-23 17:24:30) [GET] + Parameters: {"filename"=>"application.css"} + Trigger Load (0.6ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:30')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 25ms (View: 2, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:30) [GET] + Parameters: {"filename"=>"body.jpg"} + Trigger Load (0.3ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:30')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 16ms (View: 1, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:31) [GET] + Parameters: {"filename"=>"container.jpg"} + Trigger Load (0.4ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:31')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 17ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:31) [GET] + Parameters: {"filename"=>"header.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:31')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 19ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/header.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:32) [GET] + Parameters: {"filename"=>"main.gif"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:32')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 18ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/main.gif] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ArticlesController#view_page (for 127.0.0.1 at 2010-09-23 17:24:33) [GET] + Parameters: {"name"=>["-"]} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:33')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + User Columns (1.6ms) SHOW FIELDS FROM `users` + SQL (0.6ms) SELECT count(*) AS count_all FROM `users`  + Page Columns (2.3ms) SHOW FIELDS FROM `contents` + Page Load (0.7ms) SELECT * FROM `contents` WHERE (`contents`.`name` = '-') AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id ASC LIMIT 1 +Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default +Rendering articles/view_page + TextFilter Columns (1.0ms) SHOW FIELDS FROM `text_filters` + TextFilter Load (0.5ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 1)  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Sidebar Load (0.2ms) SELECT * FROM `sidebars` ORDER BY active_position ASC +Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml + Page Load (0.3ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml + Category Load (0.2ms)  + SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter + FROM categories categories + LEFT OUTER JOIN categorizations articles_categories + ON articles_categories.category_id = categories.id + LEFT OUTER JOIN contents articles + ON (articles_categories.article_id = articles.id AND articles.published = 1) + GROUP BY categories.id, categories.name, categories.position, categories.permalink + ORDER BY position +  + Category Columns (0.9ms) SHOW FIELDS FROM `categories` +Completed in 239ms (View: 202, DB: 7) | 200 OK [http://localhost/pages/-] + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-23 17:24:34) [GET] + Parameters: {"filename"=>"application.css"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:34')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 17ms (View: 2, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.0ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:35) [GET] + Parameters: {"filename"=>"body.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:35')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 120ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.1ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:36) [GET] + Parameters: {"filename"=>"main.gif"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:36')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 19ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/main.gif] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.0ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:36) [GET] + Parameters: {"filename"=>"container.jpg"} + Trigger Load (0.3ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:36')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 25ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:37) [GET] + Parameters: {"filename"=>"header.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:37')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 121ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/header.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ArticlesController#view_page (for 127.0.0.1 at 2010-09-23 17:24:38) [GET] + Parameters: {"name"=>["tft"]} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:38')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + User Columns (1.7ms) SHOW FIELDS FROM `users` + SQL (0.2ms) SELECT count(*) AS count_all FROM `users`  + Page Columns (1.4ms) SHOW FIELDS FROM `contents` + Page Load (0.7ms) SELECT * FROM `contents` WHERE (`contents`.`name` = 'tft') AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id ASC LIMIT 1 +Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default +Rendering articles/view_page + TextFilter Columns (1.2ms) SHOW FIELDS FROM `text_filters` + TextFilter Load (0.6ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 4)  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Sidebar Load (0.2ms) SELECT * FROM `sidebars` ORDER BY active_position ASC +Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml + Page Load (0.3ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml + Category Load (0.2ms)  + SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter + FROM categories categories + LEFT OUTER JOIN categorizations articles_categories + ON articles_categories.category_id = categories.id + LEFT OUTER JOIN contents articles + ON (articles_categories.article_id = articles.id AND articles.published = 1) + GROUP BY categories.id, categories.name, categories.position, categories.permalink + ORDER BY position +  + Category Columns (1.1ms) SHOW FIELDS FROM `categories` +Completed in 95ms (View: 63, DB: 6) | 200 OK [http://localhost/pages/tft] + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (2.2ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-23 17:24:39) [GET] + Parameters: {"filename"=>"application.css"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:39')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 20ms (View: 2, DB: 3) | 200 OK [http://localhost/stylesheets/theme/application.css] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.0ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:39) [GET] + Parameters: {"filename"=>"body.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:39')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 15ms (View: 1, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.1ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:40) [GET] + Parameters: {"filename"=>"container.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:40')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 119ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:40) [GET] + Parameters: {"filename"=>"header.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:40')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 19ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/header.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:24:41) [GET] + Parameters: {"filename"=>"main.gif"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:24:41')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 17ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/main.gif] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.1ms) SHOW FIELDS FROM `blogs` + + +Processing ArticlesController#view_page (for 127.0.0.1 at 2010-09-23 17:26:46) [GET] + Parameters: {"name"=>["tft"]} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:26:46')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + User Columns (1.7ms) SHOW FIELDS FROM `users` + SQL (0.2ms) SELECT count(*) AS count_all FROM `users`  + Page Columns (1.4ms) SHOW FIELDS FROM `contents` + Page Load (0.2ms) SELECT * FROM `contents` WHERE (`contents`.`name` = 'tft') AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id ASC LIMIT 1 +Rendering template within /var/www/rails/typo-5.5/themes/dirtylicious/layouts/default +Rendering articles/view_page + TextFilter Columns (1.0ms) SHOW FIELDS FROM `text_filters` + TextFilter Load (0.3ms) SELECT * FROM `text_filters` WHERE (`text_filters`.`id` = 4)  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Filter markdown failed: uninitialized constant Typo::Textfilter::Markdown::BlueCloth + Sidebar Load (0.2ms) SELECT * FROM `sidebars` ORDER BY active_position ASC + Sidebar Columns (0.9ms) SHOW FIELDS FROM `sidebars` + PageSidebar Columns (1.0ms) SHOW FIELDS FROM `sidebars` +Rendering /var/www/rails/typo-5.5/vendor/plugins/page_sidebar/views/content.rhtml + Page Load (0.3ms) SELECT * FROM `contents` WHERE (published = 1) AND ( (`contents`.`type` = 'Page' ) ) ORDER BY id + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CategorySidebar Columns (1.1ms) SHOW FIELDS FROM `sidebars` +Rendering /var/www/rails/typo-5.5/vendor/plugins/category_sidebar/views/content.rhtml + Category Load (0.2ms)  + SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter + FROM categories categories + LEFT OUTER JOIN categorizations articles_categories + ON articles_categories.category_id = categories.id + LEFT OUTER JOIN contents articles + ON (articles_categories.article_id = articles.id AND articles.published = 1) + GROUP BY categories.id, categories.name, categories.position, categories.permalink + ORDER BY position +  + Category Columns (1.0ms) SHOW FIELDS FROM `categories` +Completed in 307ms (View: 272, DB: 6) | 200 OK [http://localhost/pages/tft] + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#stylesheets (for 127.0.0.1 at 2010-09-23 17:26:47) [GET] + Parameters: {"filename"=>"application.css"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:26:47')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 15ms (View: 2, DB: 2) | 200 OK [http://localhost/stylesheets/theme/application.css] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/stylesheets/application.css + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.3ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.8ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:26:48) [GET] + Parameters: {"filename"=>"body.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:26:48')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 14ms (View: 1, DB: 2) | 200 OK [http://localhost/images/theme/body.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/body.jpg + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (1.1ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:26:49) [GET] + Parameters: {"filename"=>"container.jpg"} + Trigger Load (0.5ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:26:49')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 15ms (View: 2, DB: 2) | 200 OK [http://localhost/images/theme/container.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/container.jpg + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:26:49) [GET] + Parameters: {"filename"=>"header.jpg"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:26:49')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 15ms (View: 1, DB: 1) | 200 OK [http://localhost/images/theme/header.jpg] +Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/header.jpg + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + Blog Load (0.2ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 + Blog Columns (0.9ms) SHOW FIELDS FROM `blogs` + + +Processing ThemeController#images (for 127.0.0.1 at 2010-09-23 17:26:49) [GET] + Parameters: {"filename"=>"main.gif"} + Trigger Load (0.2ms) SELECT * FROM `triggers` WHERE (due_at <= '2010-09-23 17:26:49')  + CACHE (0.0ms) SELECT * FROM `blogs` ORDER BY id LIMIT 1 +Completed in 15ms (View: 2, DB: 1) | 200 OK [http://localhost/images/theme/main.gif] Streaming file /var/www/rails/typo-5.5/themes/dirtylicious/images/main.gif
lukapiske/ivak
79ba5abed07befc92698df14b30d14bf5ba9f332
gems builded
diff --git a/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/Makefile b/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/Makefile new file mode 100644 index 0000000..3d8088e --- /dev/null +++ b/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/Makefile @@ -0,0 +1,157 @@ + +SHELL = /bin/sh + +#### Start of system configuration section. #### + +srcdir = . +topdir = /usr/lib/ruby/1.8/x86_64-linux +hdrdir = $(topdir) +VPATH = $(srcdir):$(topdir):$(hdrdir) +exec_prefix = $(prefix) +prefix = $(DESTDIR)/usr +sharedstatedir = $(prefix)/com +mandir = $(prefix)/share/man +psdir = $(docdir) +oldincludedir = $(DESTDIR)/usr/include +localedir = $(datarootdir)/locale +bindir = $(exec_prefix)/bin +libexecdir = $(prefix)/lib/ruby1.8 +sitedir = $(DESTDIR)/usr/local/lib/site_ruby +htmldir = $(docdir) +vendorarchdir = $(vendorlibdir)/$(sitearch) +includedir = $(prefix)/include +infodir = $(prefix)/share/info +vendorlibdir = $(vendordir)/$(ruby_version) +sysconfdir = $(DESTDIR)/etc +libdir = $(exec_prefix)/lib +sbindir = $(exec_prefix)/sbin +rubylibdir = $(libdir)/ruby/$(ruby_version) +docdir = $(datarootdir)/doc/$(PACKAGE) +dvidir = $(docdir) +vendordir = $(libdir)/ruby/vendor_ruby +datarootdir = $(prefix)/share +pdfdir = $(docdir) +archdir = $(rubylibdir)/$(arch) +sitearchdir = $(sitelibdir)/$(sitearch) +datadir = $(datarootdir) +localstatedir = $(DESTDIR)/var +sitelibdir = $(sitedir)/$(ruby_version) + +CC = gcc +LIBRUBY = $(LIBRUBY_SO) +LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a +LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME) +LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static + +RUBY_EXTCONF_H = +CFLAGS = -fPIC -fno-strict-aliasing -g -g -O2 -fPIC $(cflags) -O2 +INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) +DEFS = +CPPFLAGS = $(DEFS) $(cppflags) +CXXFLAGS = $(CFLAGS) +ldflags = -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic +dldflags = +archflag = +DLDFLAGS = $(ldflags) $(dldflags) $(archflag) +LDSHARED = $(CC) -shared +AR = ar +EXEEXT = + +RUBY_INSTALL_NAME = ruby1.8 +RUBY_SO_NAME = ruby1.8 +arch = x86_64-linux +sitearch = x86_64-linux +ruby_version = 1.8 +ruby = /usr/bin/ruby1.8 +RUBY = $(ruby) +RM = rm -f +MAKEDIRS = mkdir -p +INSTALL = /usr/bin/install -c +INSTALL_PROG = $(INSTALL) -m 0755 +INSTALL_DATA = $(INSTALL) -m 644 +COPY = cp + +#### End of system configuration section. #### + +preload = + +libpath = . $(libdir) +LIBPATH = -L. -L$(libdir) +DEFFILE = + +CLEANFILES = mkmf.log +DISTCLEANFILES = + +extout = +extout_prefix = +target_prefix = +LOCAL_LIBS = +LIBS = $(LIBRUBYARG_SHARED) -lpthread -lrt -ldl -lcrypt -lm -lc +SRCS = redcloth_attributes.c redcloth_inline.c redcloth_scan.c +OBJS = redcloth_attributes.o redcloth_inline.o redcloth_scan.o +TARGET = redcloth_scan +DLLIB = $(TARGET).so +EXTSTATIC = +STATIC_LIB = + +BINDIR = $(bindir) +RUBYCOMMONDIR = $(sitedir)$(target_prefix) +RUBYLIBDIR = /var/www/rails/typo-5.5/vendor/gems/RedCloth-4.2.3/lib$(target_prefix) +RUBYARCHDIR = /var/www/rails/typo-5.5/vendor/gems/RedCloth-4.2.3/lib$(target_prefix) + +TARGET_SO = $(DLLIB) +CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map +CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak + +all: $(DLLIB) +static: $(STATIC_LIB) + +clean: + @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) + +distclean: clean + @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log + @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES) + +realclean: distclean +install: install-so install-rb + +install-so: $(RUBYARCHDIR) +install-so: $(RUBYARCHDIR)/$(DLLIB) +$(RUBYARCHDIR)/$(DLLIB): $(DLLIB) + $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) +install-rb: pre-install-rb install-rb-default +install-rb-default: pre-install-rb-default +pre-install-rb: Makefile +pre-install-rb-default: Makefile +$(RUBYARCHDIR): + $(MAKEDIRS) $@ + +site-install: site-install-so site-install-rb +site-install-so: install-so +site-install-rb: install-rb + +.SUFFIXES: .c .m .cc .cxx .cpp .C .o + +.cc.o: + $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< + +.cxx.o: + $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< + +.cpp.o: + $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< + +.C.o: + $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< + +.c.o: + $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $< + +$(DLLIB): $(OBJS) Makefile + @-$(RM) $@ + $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) + + + +$(OBJS): ruby.h defines.h diff --git a/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_attributes.o b/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_attributes.o new file mode 100644 index 0000000..3df8742 Binary files /dev/null and b/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_attributes.o differ diff --git a/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_inline.o b/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_inline.o new file mode 100644 index 0000000..bb02cc1 Binary files /dev/null and b/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_inline.o differ diff --git a/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_scan.o b/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_scan.o new file mode 100644 index 0000000..957fdae Binary files /dev/null and b/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_scan.o differ diff --git a/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_scan.so b/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_scan.so new file mode 100755 index 0000000..b63663b Binary files /dev/null and b/vendor/gems/RedCloth-4.2.3/ext/redcloth_scan/redcloth_scan.so differ diff --git a/vendor/gems/RedCloth-4.2.3/lib/redcloth_scan.so b/vendor/gems/RedCloth-4.2.3/lib/redcloth_scan.so new file mode 100755 index 0000000..b63663b Binary files /dev/null and b/vendor/gems/RedCloth-4.2.3/lib/redcloth_scan.so differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/Csio.o b/vendor/gems/bluecloth-2.0.7/ext/Csio.o new file mode 100644 index 0000000..d89a22b Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/Csio.o differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/Makefile b/vendor/gems/bluecloth-2.0.7/ext/Makefile new file mode 100644 index 0000000..05503cf --- /dev/null +++ b/vendor/gems/bluecloth-2.0.7/ext/Makefile @@ -0,0 +1,157 @@ + +SHELL = /bin/sh + +#### Start of system configuration section. #### + +srcdir = . +topdir = /usr/lib/ruby/1.8/x86_64-linux +hdrdir = $(topdir) +VPATH = $(srcdir):$(topdir):$(hdrdir) +exec_prefix = $(prefix) +prefix = $(DESTDIR)/usr +sharedstatedir = $(prefix)/com +mandir = $(prefix)/share/man +psdir = $(docdir) +oldincludedir = $(DESTDIR)/usr/include +localedir = $(datarootdir)/locale +bindir = $(exec_prefix)/bin +libexecdir = $(prefix)/lib/ruby1.8 +sitedir = $(DESTDIR)/usr/local/lib/site_ruby +htmldir = $(docdir) +vendorarchdir = $(vendorlibdir)/$(sitearch) +includedir = $(prefix)/include +infodir = $(prefix)/share/info +vendorlibdir = $(vendordir)/$(ruby_version) +sysconfdir = $(DESTDIR)/etc +libdir = $(exec_prefix)/lib +sbindir = $(exec_prefix)/sbin +rubylibdir = $(libdir)/ruby/$(ruby_version) +docdir = $(datarootdir)/doc/$(PACKAGE) +dvidir = $(docdir) +vendordir = $(libdir)/ruby/vendor_ruby +datarootdir = $(prefix)/share +pdfdir = $(docdir) +archdir = $(rubylibdir)/$(arch) +sitearchdir = $(sitelibdir)/$(sitearch) +datadir = $(datarootdir) +localstatedir = $(DESTDIR)/var +sitelibdir = $(sitedir)/$(ruby_version) + +CC = gcc +LIBRUBY = $(LIBRUBY_SO) +LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a +LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME) +LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static + +RUBY_EXTCONF_H = extconf.h +CFLAGS = -fPIC -fno-strict-aliasing -g -g -O2 -fPIC $(cflags) -I. -Wall +INCFLAGS = -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. +DEFS = +CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" -DVERSION=\"1.5.8\" +CXXFLAGS = $(CFLAGS) +ldflags = -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic +dldflags = +archflag = +DLDFLAGS = $(ldflags) $(dldflags) $(archflag) +LDSHARED = $(CC) -shared +AR = ar +EXEEXT = + +RUBY_INSTALL_NAME = ruby1.8 +RUBY_SO_NAME = ruby1.8 +arch = x86_64-linux +sitearch = x86_64-linux +ruby_version = 1.8 +ruby = /usr/bin/ruby1.8 +RUBY = $(ruby) +RM = rm -f +MAKEDIRS = mkdir -p +INSTALL = /usr/bin/install -c +INSTALL_PROG = $(INSTALL) -m 0755 +INSTALL_DATA = $(INSTALL) -m 644 +COPY = cp + +#### End of system configuration section. #### + +preload = + +libpath = . $(libdir) +LIBPATH = -L. -L$(libdir) +DEFFILE = + +CLEANFILES = mkmf.log +DISTCLEANFILES = + +extout = +extout_prefix = +target_prefix = +LOCAL_LIBS = +LIBS = $(LIBRUBYARG_SHARED) -lpthread -lrt -ldl -lcrypt -lm -lc +SRCS = bluecloth.c markdown.c Csio.c generate.c resource.c docheader.c xmlpage.c css.c version.c xml.c mkdio.c +OBJS = bluecloth.o markdown.o Csio.o generate.o resource.o docheader.o xmlpage.o css.o version.o xml.o mkdio.o +TARGET = bluecloth_ext +DLLIB = $(TARGET).so +EXTSTATIC = +STATIC_LIB = + +BINDIR = $(bindir) +RUBYCOMMONDIR = $(sitedir)$(target_prefix) +RUBYLIBDIR = /var/www/rails/typo-5.5/vendor/gems/bluecloth-2.0.7/lib$(target_prefix) +RUBYARCHDIR = /var/www/rails/typo-5.5/vendor/gems/bluecloth-2.0.7/lib$(target_prefix) + +TARGET_SO = $(DLLIB) +CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map +CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak + +all: $(DLLIB) +static: $(STATIC_LIB) + +clean: + @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) + +distclean: clean + @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log + @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES) + +realclean: distclean +install: install-so install-rb + +install-so: $(RUBYARCHDIR) +install-so: $(RUBYARCHDIR)/$(DLLIB) +$(RUBYARCHDIR)/$(DLLIB): $(DLLIB) + $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) +install-rb: pre-install-rb install-rb-default +install-rb-default: pre-install-rb-default +pre-install-rb: Makefile +pre-install-rb-default: Makefile +$(RUBYARCHDIR): + $(MAKEDIRS) $@ + +site-install: site-install-so site-install-rb +site-install-so: install-so +site-install-rb: install-rb + +.SUFFIXES: .c .m .cc .cxx .cpp .C .o + +.cc.o: + $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< + +.cxx.o: + $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< + +.cpp.o: + $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< + +.C.o: + $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< + +.c.o: + $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $< + +$(DLLIB): $(OBJS) Makefile + @-$(RM) $@ + $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) + + + +$(OBJS): ruby.h defines.h $(RUBY_EXTCONF_H) diff --git a/vendor/gems/bluecloth-2.0.7/ext/bluecloth.o b/vendor/gems/bluecloth-2.0.7/ext/bluecloth.o new file mode 100644 index 0000000..dda4b21 Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/bluecloth.o differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/bluecloth_ext.so b/vendor/gems/bluecloth-2.0.7/ext/bluecloth_ext.so new file mode 100755 index 0000000..565f973 Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/bluecloth_ext.so differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/css.o b/vendor/gems/bluecloth-2.0.7/ext/css.o new file mode 100644 index 0000000..5898cdd Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/css.o differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/docheader.o b/vendor/gems/bluecloth-2.0.7/ext/docheader.o new file mode 100644 index 0000000..aac7df7 Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/docheader.o differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/extconf.h b/vendor/gems/bluecloth-2.0.7/ext/extconf.h new file mode 100644 index 0000000..28a99cc --- /dev/null +++ b/vendor/gems/bluecloth-2.0.7/ext/extconf.h @@ -0,0 +1,9 @@ +#ifndef EXTCONF_H +#define EXTCONF_H +#define HAVE_SRAND 1 +#define HAVE_RANDOM 1 +#define HAVE_BZERO 1 +#define HAVE_STRCASECMP 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_MKDIO_H 1 +#endif diff --git a/vendor/gems/bluecloth-2.0.7/ext/generate.o b/vendor/gems/bluecloth-2.0.7/ext/generate.o new file mode 100644 index 0000000..20b6c75 Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/generate.o differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/markdown.o b/vendor/gems/bluecloth-2.0.7/ext/markdown.o new file mode 100644 index 0000000..3f41fbb Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/markdown.o differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/mkdio.o b/vendor/gems/bluecloth-2.0.7/ext/mkdio.o new file mode 100644 index 0000000..4636b9e Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/mkdio.o differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/mkmf.log b/vendor/gems/bluecloth-2.0.7/ext/mkmf.log new file mode 100644 index 0000000..c580882 --- /dev/null +++ b/vendor/gems/bluecloth-2.0.7/ext/mkmf.log @@ -0,0 +1,142 @@ +have_func: checking for srand()... -------------------- yes + +"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lpthread -lrt -ldl -lcrypt -lm -lc" +conftest.c: In function ‘t’: +conftest.c:3: error: ‘srand’ undeclared (first use in this function) +conftest.c:3: error: (Each undeclared identifier is reported only once +conftest.c:3: error: for each function it appears in.) +checked program was: +/* begin */ +1: /*top*/ +2: int main() { return 0; } +3: int t() { void ((*volatile p)()); p = (void ((*)()))srand; return 0; } +/* end */ + +"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lpthread -lrt -ldl -lcrypt -lm -lc" +conftest.c: In function ‘t’: +conftest.c:3: warning: implicit declaration of function ‘srand’ +checked program was: +/* begin */ +1: /*top*/ +2: int main() { return 0; } +3: int t() { srand(); return 0; } +/* end */ + +-------------------- + +have_func: checking for random()... -------------------- yes + +"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lpthread -lrt -ldl -lcrypt -lm -lc" +conftest.c: In function ‘t’: +conftest.c:3: error: ‘random’ undeclared (first use in this function) +conftest.c:3: error: (Each undeclared identifier is reported only once +conftest.c:3: error: for each function it appears in.) +checked program was: +/* begin */ +1: /*top*/ +2: int main() { return 0; } +3: int t() { void ((*volatile p)()); p = (void ((*)()))random; return 0; } +/* end */ + +"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lpthread -lrt -ldl -lcrypt -lm -lc" +conftest.c: In function ‘t’: +conftest.c:3: warning: implicit declaration of function ‘random’ +checked program was: +/* begin */ +1: /*top*/ +2: int main() { return 0; } +3: int t() { random(); return 0; } +/* end */ + +-------------------- + +have_func: checking for bzero() in string.h,strings.h... -------------------- yes + +"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lpthread -lrt -ldl -lcrypt -lm -lc" +checked program was: +/* begin */ +1: #include <string.h> +2: #include <strings.h> +3: +4: /*top*/ +5: int main() { return 0; } +6: int t() { void ((*volatile p)()); p = (void ((*)()))bzero; return 0; } +/* end */ + +-------------------- + +have_func: checking for strcasecmp()... -------------------- yes + +"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lpthread -lrt -ldl -lcrypt -lm -lc" +conftest.c: In function ‘t’: +conftest.c:3: error: ‘strcasecmp’ undeclared (first use in this function) +conftest.c:3: error: (Each undeclared identifier is reported only once +conftest.c:3: error: for each function it appears in.) +checked program was: +/* begin */ +1: /*top*/ +2: int main() { return 0; } +3: int t() { void ((*volatile p)()); p = (void ((*)()))strcasecmp; return 0; } +/* end */ + +"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lpthread -lrt -ldl -lcrypt -lm -lc" +conftest.c: In function ‘t’: +conftest.c:3: warning: implicit declaration of function ‘strcasecmp’ +conftest.c:3: warning: statement with no effect +checked program was: +/* begin */ +1: /*top*/ +2: int main() { return 0; } +3: int t() { strcasecmp(); return 0; } +/* end */ + +-------------------- + +have_func: checking for strncasecmp()... -------------------- yes + +"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lpthread -lrt -ldl -lcrypt -lm -lc" +conftest.c: In function ‘t’: +conftest.c:3: error: ‘strncasecmp’ undeclared (first use in this function) +conftest.c:3: error: (Each undeclared identifier is reported only once +conftest.c:3: error: for each function it appears in.) +checked program was: +/* begin */ +1: /*top*/ +2: int main() { return 0; } +3: int t() { void ((*volatile p)()); p = (void ((*)()))strncasecmp; return 0; } +/* end */ + +"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lpthread -lrt -ldl -lcrypt -lm -lc" +conftest.c: In function ‘t’: +conftest.c:3: warning: implicit declaration of function ‘strncasecmp’ +conftest.c:3: warning: statement with no effect +checked program was: +/* begin */ +1: /*top*/ +2: int main() { return 0; } +3: int t() { strncasecmp(); return 0; } +/* end */ + +-------------------- + +have_header: checking for mkdio.h... -------------------- yes + +"gcc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -o conftest.i" +checked program was: +/* begin */ +1: #include <mkdio.h> +/* end */ + +-------------------- + +have_header: checking for ruby/encoding.h... -------------------- no + +"gcc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DVERSION=\"1.5.8\" -fno-strict-aliasing -g -g -O2 -fPIC -I. -Wall conftest.c -o conftest.i" +conftest.c:1:27: error: ruby/encoding.h: No such file or directory +checked program was: +/* begin */ +1: #include <ruby/encoding.h> +/* end */ + +-------------------- + diff --git a/vendor/gems/bluecloth-2.0.7/ext/resource.o b/vendor/gems/bluecloth-2.0.7/ext/resource.o new file mode 100644 index 0000000..2661857 Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/resource.o differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/version.o b/vendor/gems/bluecloth-2.0.7/ext/version.o new file mode 100644 index 0000000..ff30b66 Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/version.o differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/xml.o b/vendor/gems/bluecloth-2.0.7/ext/xml.o new file mode 100644 index 0000000..e1dd23b Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/xml.o differ diff --git a/vendor/gems/bluecloth-2.0.7/ext/xmlpage.o b/vendor/gems/bluecloth-2.0.7/ext/xmlpage.o new file mode 100644 index 0000000..51de591 Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/ext/xmlpage.o differ diff --git a/vendor/gems/bluecloth-2.0.7/lib/bluecloth_ext.so b/vendor/gems/bluecloth-2.0.7/lib/bluecloth_ext.so new file mode 100755 index 0000000..565f973 Binary files /dev/null and b/vendor/gems/bluecloth-2.0.7/lib/bluecloth_ext.so differ
lukapiske/ivak
f86ae3f49e770f887056d99dfdd94a90178283f1
add repositary
diff --git a/config/deploy.rb b/config/deploy.rb index 8233bc5..874aeea 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,22 +1,22 @@ set :application, "ivak" -set :repository, "cesta_k_vasemu_repositari" +set :repository, "git@github.com:lukapiske/ivak.git" set :scm, "git" role :web, "server3.railshosting.cz" role :app, "server3.railshosting.cz" role :db, "server3.railshosting.cz", :primary => true set :deploy_to, "/home/ivak/app/" set :user, "ivak" set :use_sudo, false task :after_update_code, :roles => [:app, :db] do run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml" end namespace :deploy do task :start, :roles => :app do end end namespace :deploy do desc "Restart Application" task :restart, :roles => :app do run "touch #{current_path}/tmp/restart.txt" end end \ No newline at end of file
zueos/ZIStoreButton
83b2df952246eb247840b5891a3b950e407b0766
Revert "Added userInfo property, and NS_BLOCKS_AVAILABLE flagss"
diff --git a/Classes/ZIStoreButton.h b/Classes/ZIStoreButton.h index b41d2ba..81a4072 100644 --- a/Classes/ZIStoreButton.h +++ b/Classes/ZIStoreButton.h @@ -1,54 +1,44 @@ // // ZIStoreButton.h // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> #define ZI_BUY_NOW_TITLE @"Buy Now" #define ZI_MAX_WIDTH 120.0f - #define ZI_PADDING 10.0f -#if NS_BLOCKS_AVAILABLE typedef void (^ActionBlock)(); -#endif @interface ZIStoreButton : UIButton { CAGradientLayer *innerLayer3; BOOL isBlued; -#if NS_BLOCKS_AVAILABLE ActionBlock _actionBlock; -#endif - id userInfo; } -@property (nonatomic, retain) id userInfo; - -#if NS_BLOCKS_AVAILABLE -(void)setBuyBlock:(ActionBlock)action; -#endif @end diff --git a/Classes/ZIStoreButton.m b/Classes/ZIStoreButton.m index 08bb571..4e8afa6 100644 --- a/Classes/ZIStoreButton.m +++ b/Classes/ZIStoreButton.m @@ -1,188 +1,185 @@ // // ZIStoreButton.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButton.h" @implementation ZIStoreButton -@synthesize userInfo; - -(void)setBuyBlock:(ActionBlock) action { _actionBlock = Block_copy(action); } -(void) callActionBlock:(id)sender{ if (_actionBlock) _actionBlock(); } - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Initialization code _actionBlock = nil; self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.autoresizesSubviews = YES; self.layer.needsDisplayOnBoundsChange = YES; isBlued = NO; [self setTitle:ZI_BUY_NOW_TITLE forState:UIControlStateSelected]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateNormal]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateSelected]; [self.titleLabel setShadowOffset:CGSizeMake(0.0, -0.6)]; [self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]]; self.titleLabel.textColor = [UIColor colorWithWhite:0.902 alpha:1.000]; [self addTarget:self action:@selector(touchedUpOutside:) forControlEvents:UIControlEventTouchUpOutside]; [self addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; CAGradientLayer *bevelLayer2 = [CAGradientLayer layer]; bevelLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.4 alpha:1.0] CGColor], [[UIColor whiteColor] CGColor], nil]; bevelLayer2.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(frame), CGRectGetHeight(frame)); bevelLayer2.cornerRadius = 5.0; bevelLayer2.needsDisplayOnBoundsChange = YES; CAGradientLayer *innerLayer2 = [CAGradientLayer layer]; innerLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor darkGrayColor] CGColor], [[UIColor lightGrayColor] CGColor], nil]; innerLayer2.frame = CGRectMake(0.5, 0.5, CGRectGetWidth(frame) - 1.0, CGRectGetHeight(frame) - 1.0); innerLayer2.cornerRadius = 4.6; innerLayer2.needsDisplayOnBoundsChange = YES; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; innerLayer3 = [CAGradientLayer layer]; innerLayer3.colors = blueColors; innerLayer3.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.500], [NSNumber numberWithFloat:0.5001], [NSNumber numberWithFloat:1.0], nil]; innerLayer3.frame = CGRectMake(0.75, 0.75, CGRectGetWidth(frame) - 1.5, CGRectGetHeight(frame) - 1.5); innerLayer3.cornerRadius = 4.5; innerLayer3.needsDisplayOnBoundsChange = YES; [self.layer addSublayer:bevelLayer2]; [self.layer addSublayer:innerLayer2]; [self.layer addSublayer:innerLayer3]; [self bringSubviewToFront:self.titleLabel]; } return self; } - (void) setSelected:(BOOL)selected { [super setSelected:selected]; [CATransaction begin]; [CATransaction setAnimationDuration:0.25]; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; UIColor *greenOne = [UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000]; UIColor *greenTwo = [UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000]; UIColor *greenThree = [UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000]; UIColor *greenFour = [UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; NSArray *greenColors = [NSArray arrayWithObjects:(id)greenOne.CGColor, greenTwo.CGColor, greenThree.CGColor, greenFour.CGColor, nil]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; animation.fromValue = (!self.selected) ? greenColors : blueColors; animation.toValue = (!self.selected) ? blueColors : greenColors; animation.duration = 0.25; animation.removedOnCompletion = NO; animation.fillMode = kCAFillModeForwards; animation.delegate = self; [innerLayer3 layoutIfNeeded]; [innerLayer3 addAnimation:animation forKey:@"changeToBlue"]; NSString *title = (self.selected ? [self titleForState:UIControlStateSelected] : [self titleForState:UIControlStateNormal]); CGSize constr = (CGSize){.height = self.frame.size.height, .width = ZI_MAX_WIDTH}; CGSize newSize = [title sizeWithFont:self.titleLabel.font constrainedToSize:constr lineBreakMode:UILineBreakModeMiddleTruncation]; CGFloat newWidth = newSize.width + (ZI_PADDING*2); CGFloat diff = self.frame.size.width-newWidth; for (CALayer *la in self.layer.sublayers) { CGRect cr = la.bounds; cr.size.width = cr.size.width; cr.size.width = newWidth; la.bounds = cr; [la layoutIfNeeded]; } CGRect cr = self.frame; cr.size.width = cr.size.width; cr.size.width = newWidth; self.frame = cr; self.titleEdgeInsets = UIEdgeInsetsMake(2.0, self.titleEdgeInsets.left+diff, 0.0, 0.0); [CATransaction commit]; } - (IBAction) touchedUpOutside:(id)sender { if (self.selected) { [self setSelected:NO]; } } - (IBAction) pressButton:(id)sender { if (isBlued) { [self callActionBlock:sender]; [sender setSelected:NO]; isBlued = NO; } else { [sender setSelected:YES]; isBlued = YES; } } - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { #ifdef DEBUG NSLog(@"Animation Did Stop"); #endif } - (void)dealloc { Block_release(_actionBlock); - self.userInfo = nil; [super dealloc]; } @end
zueos/ZIStoreButton
ec4d1178b178fa8eb3c0e1f04ee6d7f8b5614076
Added userInfo property, and NS_BLOCKS_AVAILABLE flagss
diff --git a/Classes/ZIStoreButton.h b/Classes/ZIStoreButton.h index 81a4072..b41d2ba 100644 --- a/Classes/ZIStoreButton.h +++ b/Classes/ZIStoreButton.h @@ -1,44 +1,54 @@ // // ZIStoreButton.h // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> #define ZI_BUY_NOW_TITLE @"Buy Now" #define ZI_MAX_WIDTH 120.0f + #define ZI_PADDING 10.0f +#if NS_BLOCKS_AVAILABLE typedef void (^ActionBlock)(); +#endif @interface ZIStoreButton : UIButton { CAGradientLayer *innerLayer3; BOOL isBlued; +#if NS_BLOCKS_AVAILABLE ActionBlock _actionBlock; +#endif + id userInfo; } +@property (nonatomic, retain) id userInfo; + +#if NS_BLOCKS_AVAILABLE -(void)setBuyBlock:(ActionBlock)action; +#endif @end diff --git a/Classes/ZIStoreButton.m b/Classes/ZIStoreButton.m index 4e8afa6..08bb571 100644 --- a/Classes/ZIStoreButton.m +++ b/Classes/ZIStoreButton.m @@ -1,185 +1,188 @@ // // ZIStoreButton.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButton.h" @implementation ZIStoreButton +@synthesize userInfo; + -(void)setBuyBlock:(ActionBlock) action { _actionBlock = Block_copy(action); } -(void) callActionBlock:(id)sender{ if (_actionBlock) _actionBlock(); } - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Initialization code _actionBlock = nil; self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.autoresizesSubviews = YES; self.layer.needsDisplayOnBoundsChange = YES; isBlued = NO; [self setTitle:ZI_BUY_NOW_TITLE forState:UIControlStateSelected]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateNormal]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateSelected]; [self.titleLabel setShadowOffset:CGSizeMake(0.0, -0.6)]; [self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]]; self.titleLabel.textColor = [UIColor colorWithWhite:0.902 alpha:1.000]; [self addTarget:self action:@selector(touchedUpOutside:) forControlEvents:UIControlEventTouchUpOutside]; [self addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; CAGradientLayer *bevelLayer2 = [CAGradientLayer layer]; bevelLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.4 alpha:1.0] CGColor], [[UIColor whiteColor] CGColor], nil]; bevelLayer2.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(frame), CGRectGetHeight(frame)); bevelLayer2.cornerRadius = 5.0; bevelLayer2.needsDisplayOnBoundsChange = YES; CAGradientLayer *innerLayer2 = [CAGradientLayer layer]; innerLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor darkGrayColor] CGColor], [[UIColor lightGrayColor] CGColor], nil]; innerLayer2.frame = CGRectMake(0.5, 0.5, CGRectGetWidth(frame) - 1.0, CGRectGetHeight(frame) - 1.0); innerLayer2.cornerRadius = 4.6; innerLayer2.needsDisplayOnBoundsChange = YES; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; innerLayer3 = [CAGradientLayer layer]; innerLayer3.colors = blueColors; innerLayer3.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.500], [NSNumber numberWithFloat:0.5001], [NSNumber numberWithFloat:1.0], nil]; innerLayer3.frame = CGRectMake(0.75, 0.75, CGRectGetWidth(frame) - 1.5, CGRectGetHeight(frame) - 1.5); innerLayer3.cornerRadius = 4.5; innerLayer3.needsDisplayOnBoundsChange = YES; [self.layer addSublayer:bevelLayer2]; [self.layer addSublayer:innerLayer2]; [self.layer addSublayer:innerLayer3]; [self bringSubviewToFront:self.titleLabel]; } return self; } - (void) setSelected:(BOOL)selected { [super setSelected:selected]; [CATransaction begin]; [CATransaction setAnimationDuration:0.25]; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; UIColor *greenOne = [UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000]; UIColor *greenTwo = [UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000]; UIColor *greenThree = [UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000]; UIColor *greenFour = [UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; NSArray *greenColors = [NSArray arrayWithObjects:(id)greenOne.CGColor, greenTwo.CGColor, greenThree.CGColor, greenFour.CGColor, nil]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; animation.fromValue = (!self.selected) ? greenColors : blueColors; animation.toValue = (!self.selected) ? blueColors : greenColors; animation.duration = 0.25; animation.removedOnCompletion = NO; animation.fillMode = kCAFillModeForwards; animation.delegate = self; [innerLayer3 layoutIfNeeded]; [innerLayer3 addAnimation:animation forKey:@"changeToBlue"]; NSString *title = (self.selected ? [self titleForState:UIControlStateSelected] : [self titleForState:UIControlStateNormal]); CGSize constr = (CGSize){.height = self.frame.size.height, .width = ZI_MAX_WIDTH}; CGSize newSize = [title sizeWithFont:self.titleLabel.font constrainedToSize:constr lineBreakMode:UILineBreakModeMiddleTruncation]; CGFloat newWidth = newSize.width + (ZI_PADDING*2); CGFloat diff = self.frame.size.width-newWidth; for (CALayer *la in self.layer.sublayers) { CGRect cr = la.bounds; cr.size.width = cr.size.width; cr.size.width = newWidth; la.bounds = cr; [la layoutIfNeeded]; } CGRect cr = self.frame; cr.size.width = cr.size.width; cr.size.width = newWidth; self.frame = cr; self.titleEdgeInsets = UIEdgeInsetsMake(2.0, self.titleEdgeInsets.left+diff, 0.0, 0.0); [CATransaction commit]; } - (IBAction) touchedUpOutside:(id)sender { if (self.selected) { [self setSelected:NO]; } } - (IBAction) pressButton:(id)sender { if (isBlued) { [self callActionBlock:sender]; [sender setSelected:NO]; isBlued = NO; } else { [sender setSelected:YES]; isBlued = YES; } } - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { #ifdef DEBUG NSLog(@"Animation Did Stop"); #endif } - (void)dealloc { Block_release(_actionBlock); + self.userInfo = nil; [super dealloc]; } @end
zueos/ZIStoreButton
a25b590db8af64c11297a0d4c55dba478ab349c0
removed depricated 'font' property
diff --git a/Classes/ZIStoreButton.m b/Classes/ZIStoreButton.m index 59fcdd1..4e8afa6 100644 --- a/Classes/ZIStoreButton.m +++ b/Classes/ZIStoreButton.m @@ -1,185 +1,185 @@ // // ZIStoreButton.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButton.h" @implementation ZIStoreButton -(void)setBuyBlock:(ActionBlock) action { _actionBlock = Block_copy(action); } -(void) callActionBlock:(id)sender{ if (_actionBlock) _actionBlock(); } - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Initialization code _actionBlock = nil; self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.autoresizesSubviews = YES; self.layer.needsDisplayOnBoundsChange = YES; isBlued = NO; [self setTitle:ZI_BUY_NOW_TITLE forState:UIControlStateSelected]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateNormal]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateSelected]; [self.titleLabel setShadowOffset:CGSizeMake(0.0, -0.6)]; [self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]]; self.titleLabel.textColor = [UIColor colorWithWhite:0.902 alpha:1.000]; [self addTarget:self action:@selector(touchedUpOutside:) forControlEvents:UIControlEventTouchUpOutside]; [self addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; CAGradientLayer *bevelLayer2 = [CAGradientLayer layer]; bevelLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.4 alpha:1.0] CGColor], [[UIColor whiteColor] CGColor], nil]; bevelLayer2.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(frame), CGRectGetHeight(frame)); bevelLayer2.cornerRadius = 5.0; bevelLayer2.needsDisplayOnBoundsChange = YES; CAGradientLayer *innerLayer2 = [CAGradientLayer layer]; innerLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor darkGrayColor] CGColor], [[UIColor lightGrayColor] CGColor], nil]; innerLayer2.frame = CGRectMake(0.5, 0.5, CGRectGetWidth(frame) - 1.0, CGRectGetHeight(frame) - 1.0); innerLayer2.cornerRadius = 4.6; innerLayer2.needsDisplayOnBoundsChange = YES; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; innerLayer3 = [CAGradientLayer layer]; innerLayer3.colors = blueColors; innerLayer3.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.500], [NSNumber numberWithFloat:0.5001], [NSNumber numberWithFloat:1.0], nil]; innerLayer3.frame = CGRectMake(0.75, 0.75, CGRectGetWidth(frame) - 1.5, CGRectGetHeight(frame) - 1.5); innerLayer3.cornerRadius = 4.5; innerLayer3.needsDisplayOnBoundsChange = YES; [self.layer addSublayer:bevelLayer2]; [self.layer addSublayer:innerLayer2]; [self.layer addSublayer:innerLayer3]; [self bringSubviewToFront:self.titleLabel]; } return self; } - (void) setSelected:(BOOL)selected { [super setSelected:selected]; [CATransaction begin]; [CATransaction setAnimationDuration:0.25]; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; UIColor *greenOne = [UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000]; UIColor *greenTwo = [UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000]; UIColor *greenThree = [UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000]; UIColor *greenFour = [UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; NSArray *greenColors = [NSArray arrayWithObjects:(id)greenOne.CGColor, greenTwo.CGColor, greenThree.CGColor, greenFour.CGColor, nil]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; animation.fromValue = (!self.selected) ? greenColors : blueColors; animation.toValue = (!self.selected) ? blueColors : greenColors; animation.duration = 0.25; animation.removedOnCompletion = NO; animation.fillMode = kCAFillModeForwards; animation.delegate = self; [innerLayer3 layoutIfNeeded]; [innerLayer3 addAnimation:animation forKey:@"changeToBlue"]; NSString *title = (self.selected ? [self titleForState:UIControlStateSelected] : [self titleForState:UIControlStateNormal]); CGSize constr = (CGSize){.height = self.frame.size.height, .width = ZI_MAX_WIDTH}; - CGSize newSize = [title sizeWithFont:self.font constrainedToSize:constr lineBreakMode:UILineBreakModeMiddleTruncation]; + CGSize newSize = [title sizeWithFont:self.titleLabel.font constrainedToSize:constr lineBreakMode:UILineBreakModeMiddleTruncation]; CGFloat newWidth = newSize.width + (ZI_PADDING*2); CGFloat diff = self.frame.size.width-newWidth; for (CALayer *la in self.layer.sublayers) { CGRect cr = la.bounds; cr.size.width = cr.size.width; cr.size.width = newWidth; la.bounds = cr; [la layoutIfNeeded]; } CGRect cr = self.frame; cr.size.width = cr.size.width; cr.size.width = newWidth; self.frame = cr; self.titleEdgeInsets = UIEdgeInsetsMake(2.0, self.titleEdgeInsets.left+diff, 0.0, 0.0); [CATransaction commit]; } - (IBAction) touchedUpOutside:(id)sender { if (self.selected) { [self setSelected:NO]; } } - (IBAction) pressButton:(id)sender { if (isBlued) { [self callActionBlock:sender]; [sender setSelected:NO]; isBlued = NO; } else { [sender setSelected:YES]; isBlued = YES; } } - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { #ifdef DEBUG NSLog(@"Animation Did Stop"); #endif } - (void)dealloc { Block_release(_actionBlock); [super dealloc]; } @end
zueos/ZIStoreButton
0b44547c06a3562967bc68f6879cf021218f6288
removed commented lines
diff --git a/Classes/ZIStoreButton.m b/Classes/ZIStoreButton.m index 596b2fb..59fcdd1 100644 --- a/Classes/ZIStoreButton.m +++ b/Classes/ZIStoreButton.m @@ -1,191 +1,185 @@ // // ZIStoreButton.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButton.h" @implementation ZIStoreButton -(void)setBuyBlock:(ActionBlock) action { _actionBlock = Block_copy(action); } -(void) callActionBlock:(id)sender{ if (_actionBlock) _actionBlock(); } - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Initialization code _actionBlock = nil; self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.autoresizesSubviews = YES; self.layer.needsDisplayOnBoundsChange = YES; isBlued = NO; [self setTitle:ZI_BUY_NOW_TITLE forState:UIControlStateSelected]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateNormal]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateSelected]; [self.titleLabel setShadowOffset:CGSizeMake(0.0, -0.6)]; [self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]]; self.titleLabel.textColor = [UIColor colorWithWhite:0.902 alpha:1.000]; - //self.titleEdgeInsets = UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0); [self addTarget:self action:@selector(touchedUpOutside:) forControlEvents:UIControlEventTouchUpOutside]; [self addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; CAGradientLayer *bevelLayer2 = [CAGradientLayer layer]; bevelLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.4 alpha:1.0] CGColor], [[UIColor whiteColor] CGColor], nil]; bevelLayer2.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(frame), CGRectGetHeight(frame)); bevelLayer2.cornerRadius = 5.0; bevelLayer2.needsDisplayOnBoundsChange = YES; CAGradientLayer *innerLayer2 = [CAGradientLayer layer]; innerLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor darkGrayColor] CGColor], [[UIColor lightGrayColor] CGColor], nil]; innerLayer2.frame = CGRectMake(0.5, 0.5, CGRectGetWidth(frame) - 1.0, CGRectGetHeight(frame) - 1.0); innerLayer2.cornerRadius = 4.6; innerLayer2.needsDisplayOnBoundsChange = YES; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; innerLayer3 = [CAGradientLayer layer]; innerLayer3.colors = blueColors; innerLayer3.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.500], [NSNumber numberWithFloat:0.5001], [NSNumber numberWithFloat:1.0], nil]; innerLayer3.frame = CGRectMake(0.75, 0.75, CGRectGetWidth(frame) - 1.5, CGRectGetHeight(frame) - 1.5); innerLayer3.cornerRadius = 4.5; innerLayer3.needsDisplayOnBoundsChange = YES; [self.layer addSublayer:bevelLayer2]; [self.layer addSublayer:innerLayer2]; [self.layer addSublayer:innerLayer3]; [self bringSubviewToFront:self.titleLabel]; } return self; } - (void) setSelected:(BOOL)selected { [super setSelected:selected]; [CATransaction begin]; [CATransaction setAnimationDuration:0.25]; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; UIColor *greenOne = [UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000]; UIColor *greenTwo = [UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000]; UIColor *greenThree = [UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000]; UIColor *greenFour = [UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; NSArray *greenColors = [NSArray arrayWithObjects:(id)greenOne.CGColor, greenTwo.CGColor, greenThree.CGColor, greenFour.CGColor, nil]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; animation.fromValue = (!self.selected) ? greenColors : blueColors; animation.toValue = (!self.selected) ? blueColors : greenColors; animation.duration = 0.25; animation.removedOnCompletion = NO; animation.fillMode = kCAFillModeForwards; animation.delegate = self; [innerLayer3 layoutIfNeeded]; [innerLayer3 addAnimation:animation forKey:@"changeToBlue"]; NSString *title = (self.selected ? [self titleForState:UIControlStateSelected] : [self titleForState:UIControlStateNormal]); CGSize constr = (CGSize){.height = self.frame.size.height, .width = ZI_MAX_WIDTH}; CGSize newSize = [title sizeWithFont:self.font constrainedToSize:constr lineBreakMode:UILineBreakModeMiddleTruncation]; CGFloat newWidth = newSize.width + (ZI_PADDING*2); CGFloat diff = self.frame.size.width-newWidth; - //NSLog(@"new width %f diff %f", newWidth, diff); for (CALayer *la in self.layer.sublayers) { CGRect cr = la.bounds; cr.size.width = cr.size.width; cr.size.width = newWidth; - //cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; la.bounds = cr; [la layoutIfNeeded]; } CGRect cr = self.frame; cr.size.width = cr.size.width; cr.size.width = newWidth; - //cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; self.frame = cr; - self.titleEdgeInsets = UIEdgeInsetsMake(2.0, self.titleEdgeInsets.left+diff, 0.0, 0.0); - //self.titleEdgeInsets = (!self.selected) ? UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0) : UIEdgeInsetsMake(2.0, -50.0, 0.0, 0.0); - + self.titleEdgeInsets = UIEdgeInsetsMake(2.0, self.titleEdgeInsets.left+diff, 0.0, 0.0); [CATransaction commit]; } - (IBAction) touchedUpOutside:(id)sender { if (self.selected) { [self setSelected:NO]; } } - (IBAction) pressButton:(id)sender { if (isBlued) { [self callActionBlock:sender]; [sender setSelected:NO]; isBlued = NO; } else { [sender setSelected:YES]; isBlued = YES; } } - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { #ifdef DEBUG NSLog(@"Animation Did Stop"); #endif } - (void)dealloc { Block_release(_actionBlock); [super dealloc]; } @end
zueos/ZIStoreButton
db8b34ef79390ab389164aff9e1110f66935cde5
Removed an NSLog
diff --git a/Classes/ZIStoreButton.m b/Classes/ZIStoreButton.m index 855fd78..596b2fb 100644 --- a/Classes/ZIStoreButton.m +++ b/Classes/ZIStoreButton.m @@ -1,191 +1,191 @@ // // ZIStoreButton.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButton.h" @implementation ZIStoreButton -(void)setBuyBlock:(ActionBlock) action { _actionBlock = Block_copy(action); } -(void) callActionBlock:(id)sender{ if (_actionBlock) _actionBlock(); } - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Initialization code _actionBlock = nil; self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.autoresizesSubviews = YES; self.layer.needsDisplayOnBoundsChange = YES; isBlued = NO; [self setTitle:ZI_BUY_NOW_TITLE forState:UIControlStateSelected]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateNormal]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateSelected]; [self.titleLabel setShadowOffset:CGSizeMake(0.0, -0.6)]; [self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]]; self.titleLabel.textColor = [UIColor colorWithWhite:0.902 alpha:1.000]; //self.titleEdgeInsets = UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0); [self addTarget:self action:@selector(touchedUpOutside:) forControlEvents:UIControlEventTouchUpOutside]; [self addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; CAGradientLayer *bevelLayer2 = [CAGradientLayer layer]; bevelLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.4 alpha:1.0] CGColor], [[UIColor whiteColor] CGColor], nil]; bevelLayer2.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(frame), CGRectGetHeight(frame)); bevelLayer2.cornerRadius = 5.0; bevelLayer2.needsDisplayOnBoundsChange = YES; CAGradientLayer *innerLayer2 = [CAGradientLayer layer]; innerLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor darkGrayColor] CGColor], [[UIColor lightGrayColor] CGColor], nil]; innerLayer2.frame = CGRectMake(0.5, 0.5, CGRectGetWidth(frame) - 1.0, CGRectGetHeight(frame) - 1.0); innerLayer2.cornerRadius = 4.6; innerLayer2.needsDisplayOnBoundsChange = YES; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; innerLayer3 = [CAGradientLayer layer]; innerLayer3.colors = blueColors; innerLayer3.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.500], [NSNumber numberWithFloat:0.5001], [NSNumber numberWithFloat:1.0], nil]; innerLayer3.frame = CGRectMake(0.75, 0.75, CGRectGetWidth(frame) - 1.5, CGRectGetHeight(frame) - 1.5); innerLayer3.cornerRadius = 4.5; innerLayer3.needsDisplayOnBoundsChange = YES; [self.layer addSublayer:bevelLayer2]; [self.layer addSublayer:innerLayer2]; [self.layer addSublayer:innerLayer3]; [self bringSubviewToFront:self.titleLabel]; } return self; } - (void) setSelected:(BOOL)selected { [super setSelected:selected]; [CATransaction begin]; [CATransaction setAnimationDuration:0.25]; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; UIColor *greenOne = [UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000]; UIColor *greenTwo = [UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000]; UIColor *greenThree = [UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000]; UIColor *greenFour = [UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; NSArray *greenColors = [NSArray arrayWithObjects:(id)greenOne.CGColor, greenTwo.CGColor, greenThree.CGColor, greenFour.CGColor, nil]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; animation.fromValue = (!self.selected) ? greenColors : blueColors; animation.toValue = (!self.selected) ? blueColors : greenColors; animation.duration = 0.25; animation.removedOnCompletion = NO; animation.fillMode = kCAFillModeForwards; animation.delegate = self; [innerLayer3 layoutIfNeeded]; [innerLayer3 addAnimation:animation forKey:@"changeToBlue"]; NSString *title = (self.selected ? [self titleForState:UIControlStateSelected] : [self titleForState:UIControlStateNormal]); CGSize constr = (CGSize){.height = self.frame.size.height, .width = ZI_MAX_WIDTH}; CGSize newSize = [title sizeWithFont:self.font constrainedToSize:constr lineBreakMode:UILineBreakModeMiddleTruncation]; CGFloat newWidth = newSize.width + (ZI_PADDING*2); CGFloat diff = self.frame.size.width-newWidth; - NSLog(@"new width %f diff %f", newWidth, diff); + //NSLog(@"new width %f diff %f", newWidth, diff); for (CALayer *la in self.layer.sublayers) { CGRect cr = la.bounds; cr.size.width = cr.size.width; cr.size.width = newWidth; //cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; la.bounds = cr; [la layoutIfNeeded]; } CGRect cr = self.frame; cr.size.width = cr.size.width; cr.size.width = newWidth; //cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; self.frame = cr; self.titleEdgeInsets = UIEdgeInsetsMake(2.0, self.titleEdgeInsets.left+diff, 0.0, 0.0); //self.titleEdgeInsets = (!self.selected) ? UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0) : UIEdgeInsetsMake(2.0, -50.0, 0.0, 0.0); [CATransaction commit]; } - (IBAction) touchedUpOutside:(id)sender { if (self.selected) { [self setSelected:NO]; } } - (IBAction) pressButton:(id)sender { if (isBlued) { [self callActionBlock:sender]; [sender setSelected:NO]; isBlued = NO; } else { [sender setSelected:YES]; isBlued = YES; } } - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { #ifdef DEBUG NSLog(@"Animation Did Stop"); #endif } - (void)dealloc { Block_release(_actionBlock); [super dealloc]; } @end
zueos/ZIStoreButton
71bd6be49991974016ed38266f23fb7cdfd6bd26
Button now auto-resizes based on the title in its current selected state
diff --git a/Classes/ZIStoreButton.h b/Classes/ZIStoreButton.h index 46eb890..81a4072 100644 --- a/Classes/ZIStoreButton.h +++ b/Classes/ZIStoreButton.h @@ -1,43 +1,44 @@ // // ZIStoreButton.h // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> #define ZI_BUY_NOW_TITLE @"Buy Now" -#define ZI_PRICE_TITLE @"$0.99" +#define ZI_MAX_WIDTH 120.0f +#define ZI_PADDING 10.0f typedef void (^ActionBlock)(); @interface ZIStoreButton : UIButton { CAGradientLayer *innerLayer3; BOOL isBlued; ActionBlock _actionBlock; } -(void)setBuyBlock:(ActionBlock)action; @end diff --git a/Classes/ZIStoreButton.m b/Classes/ZIStoreButton.m index 51ac5cf..855fd78 100644 --- a/Classes/ZIStoreButton.m +++ b/Classes/ZIStoreButton.m @@ -1,183 +1,191 @@ // // ZIStoreButton.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButton.h" @implementation ZIStoreButton -(void)setBuyBlock:(ActionBlock) action { _actionBlock = Block_copy(action); } -(void) callActionBlock:(id)sender{ - _actionBlock(); + if (_actionBlock) _actionBlock(); } - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Initialization code _actionBlock = nil; self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.autoresizesSubviews = YES; self.layer.needsDisplayOnBoundsChange = YES; isBlued = NO; [self setTitle:ZI_BUY_NOW_TITLE forState:UIControlStateSelected]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateNormal]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateSelected]; [self.titleLabel setShadowOffset:CGSizeMake(0.0, -0.6)]; [self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]]; self.titleLabel.textColor = [UIColor colorWithWhite:0.902 alpha:1.000]; - self.titleEdgeInsets = UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0); + //self.titleEdgeInsets = UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0); [self addTarget:self action:@selector(touchedUpOutside:) forControlEvents:UIControlEventTouchUpOutside]; [self addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; CAGradientLayer *bevelLayer2 = [CAGradientLayer layer]; bevelLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.4 alpha:1.0] CGColor], [[UIColor whiteColor] CGColor], nil]; bevelLayer2.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(frame), CGRectGetHeight(frame)); bevelLayer2.cornerRadius = 5.0; bevelLayer2.needsDisplayOnBoundsChange = YES; CAGradientLayer *innerLayer2 = [CAGradientLayer layer]; innerLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor darkGrayColor] CGColor], [[UIColor lightGrayColor] CGColor], nil]; innerLayer2.frame = CGRectMake(0.5, 0.5, CGRectGetWidth(frame) - 1.0, CGRectGetHeight(frame) - 1.0); innerLayer2.cornerRadius = 4.6; innerLayer2.needsDisplayOnBoundsChange = YES; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; innerLayer3 = [CAGradientLayer layer]; innerLayer3.colors = blueColors; innerLayer3.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.500], [NSNumber numberWithFloat:0.5001], [NSNumber numberWithFloat:1.0], nil]; innerLayer3.frame = CGRectMake(0.75, 0.75, CGRectGetWidth(frame) - 1.5, CGRectGetHeight(frame) - 1.5); innerLayer3.cornerRadius = 4.5; innerLayer3.needsDisplayOnBoundsChange = YES; [self.layer addSublayer:bevelLayer2]; [self.layer addSublayer:innerLayer2]; [self.layer addSublayer:innerLayer3]; [self bringSubviewToFront:self.titleLabel]; } return self; } - (void) setSelected:(BOOL)selected { [super setSelected:selected]; [CATransaction begin]; [CATransaction setAnimationDuration:0.25]; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; UIColor *greenOne = [UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000]; UIColor *greenTwo = [UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000]; UIColor *greenThree = [UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000]; UIColor *greenFour = [UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; NSArray *greenColors = [NSArray arrayWithObjects:(id)greenOne.CGColor, greenTwo.CGColor, greenThree.CGColor, greenFour.CGColor, nil]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; animation.fromValue = (!self.selected) ? greenColors : blueColors; animation.toValue = (!self.selected) ? blueColors : greenColors; animation.duration = 0.25; animation.removedOnCompletion = NO; animation.fillMode = kCAFillModeForwards; animation.delegate = self; [innerLayer3 layoutIfNeeded]; [innerLayer3 addAnimation:animation forKey:@"changeToBlue"]; + NSString *title = (self.selected ? [self titleForState:UIControlStateSelected] : [self titleForState:UIControlStateNormal]); + CGSize constr = (CGSize){.height = self.frame.size.height, .width = ZI_MAX_WIDTH}; + CGSize newSize = [title sizeWithFont:self.font constrainedToSize:constr lineBreakMode:UILineBreakModeMiddleTruncation]; + CGFloat newWidth = newSize.width + (ZI_PADDING*2); + CGFloat diff = self.frame.size.width-newWidth; + NSLog(@"new width %f diff %f", newWidth, diff); for (CALayer *la in self.layer.sublayers) { CGRect cr = la.bounds; cr.size.width = cr.size.width; + cr.size.width = newWidth; //cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; la.bounds = cr; [la layoutIfNeeded]; } CGRect cr = self.frame; cr.size.width = cr.size.width; + cr.size.width = newWidth; //cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; self.frame = cr; - + self.titleEdgeInsets = UIEdgeInsetsMake(2.0, self.titleEdgeInsets.left+diff, 0.0, 0.0); //self.titleEdgeInsets = (!self.selected) ? UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0) : UIEdgeInsetsMake(2.0, -50.0, 0.0, 0.0); [CATransaction commit]; } - (IBAction) touchedUpOutside:(id)sender { if (self.selected) { [self setSelected:NO]; } } - (IBAction) pressButton:(id)sender { if (isBlued) { [self callActionBlock:sender]; [sender setSelected:NO]; isBlued = NO; } else { [sender setSelected:YES]; isBlued = YES; } } - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { #ifdef DEBUG NSLog(@"Animation Did Stop"); #endif } - (void)dealloc { Block_release(_actionBlock); [super dealloc]; } @end diff --git a/Classes/ZIStoreButtonDemoViewController.m b/Classes/ZIStoreButtonDemoViewController.m index 2114f9a..05401a1 100644 --- a/Classes/ZIStoreButtonDemoViewController.m +++ b/Classes/ZIStoreButtonDemoViewController.m @@ -1,118 +1,118 @@ /* // ZIStoreButtonDemoViewController.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. */ /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButtonDemoViewController.h" #import "ZIStoreButton.h" #import <QuartzCore/QuartzCore.h> @implementation ZIStoreButtonDemoViewController - (void)viewDidLoad { [super viewDidLoad]; ZIStoreButton *button = [[ZIStoreButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 22.0)]; - [button setTitle:@"$1.99" forState:UIControlStateNormal]; + [button setTitle:@"$0.99" forState:UIControlStateNormal]; button.center = self.view.center; CAGradientLayer *bgLayer = [self backgroundLayer]; bgLayer.frame = self.view.bounds; [self.view.layer addSublayer:bgLayer]; [self.view addSubview:button]; UILabel *titleLab = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 10.0, 320.0, 35.0)]; titleLab.backgroundColor = [UIColor clearColor]; titleLab.text = @"ZIStoreButton"; titleLab.font = [UIFont systemFontOfSize:24.0]; titleLab.textAlignment = UITextAlignmentCenter; titleLab.shadowColor = [UIColor colorWithWhite:0.98 alpha:1.0]; titleLab.shadowOffset = CGSizeMake(0.0, 0.75); titleLab.textColor = [UIColor colorWithWhite:0.50 alpha:1.0]; [self.view addSubview:titleLab]; UILabel *detailLab = [[UILabel alloc] initWithFrame:CGRectMake(10.0, 55.0, 300.0, 120.0)]; detailLab.backgroundColor = [UIColor clearColor]; detailLab.numberOfLines = 7; detailLab.text = @" This is a UIButton subclass that use's Core Animation Layers to present itself. A CAAnimation is rendered using the keypath for the 'colors' property of the CAGradeintLayer.\n\n Not a single image resource is ever used to render any part of the button."; detailLab.font = [UIFont systemFontOfSize:13.0]; detailLab.shadowColor = [UIColor colorWithWhite:0.98 alpha:1.0]; detailLab.shadowOffset = CGSizeMake(0.0, 1.0); detailLab.textColor = [UIColor colorWithWhite:0.50 alpha:1.0]; [self.view addSubview:detailLab]; } - (CAGradientLayer*) backgroundLayer { UIColor *colorOne = [UIColor colorWithWhite:0.9 alpha:1.0]; UIColor *colorTwo = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.85 alpha:1.0]; UIColor *colorThree = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.7 alpha:1.0]; UIColor *colorFour = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.4 alpha:1.0]; NSArray *colors = [NSArray arrayWithObjects:(id)colorOne.CGColor, colorTwo.CGColor, colorThree.CGColor, colorFour.CGColor, nil]; NSNumber *stopOne = [NSNumber numberWithFloat:0.0]; NSNumber *stopTwo = [NSNumber numberWithFloat:0.02]; NSNumber *stopThree = [NSNumber numberWithFloat:0.99]; NSNumber *stopFour = [NSNumber numberWithFloat:1.0]; NSArray *locations = [NSArray arrayWithObjects:stopOne, stopTwo, stopThree, stopFour, nil]; CAGradientLayer *headerLayer = [CAGradientLayer layer]; //headerLayer.frame = CGRectMake(0.0, 0.0, 320.0, 77.0); headerLayer.colors = colors; headerLayer.locations = locations; return headerLayer; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end
zueos/ZIStoreButton
0852c2bf162b45b893e3eff41e7ad948c44560d1
added blocks interface, narrowed button... need to make button size dynamic
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..313081b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.pbxproj -crlf -diff -merge + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d676377 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# xcode noise +build/* +*.pbxuser +*.mode1v3 + +# old skool +.svn + +# osx noise +.DS_Store +profile diff --git a/Classes/ZIStoreButton.h b/Classes/ZIStoreButton.h index b3c21c7..46eb890 100644 --- a/Classes/ZIStoreButton.h +++ b/Classes/ZIStoreButton.h @@ -1,34 +1,43 @@ // // ZIStoreButton.h // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> +#define ZI_BUY_NOW_TITLE @"Buy Now" +#define ZI_PRICE_TITLE @"$0.99" + +typedef void (^ActionBlock)(); + @interface ZIStoreButton : UIButton { CAGradientLayer *innerLayer3; BOOL isBlued; + ActionBlock _actionBlock; } +-(void)setBuyBlock:(ActionBlock)action; + + @end diff --git a/Classes/ZIStoreButton.m b/Classes/ZIStoreButton.m index 908d956..51ac5cf 100644 --- a/Classes/ZIStoreButton.m +++ b/Classes/ZIStoreButton.m @@ -1,168 +1,183 @@ // // ZIStoreButton.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButton.h" + + @implementation ZIStoreButton +-(void)setBuyBlock:(ActionBlock) action { + _actionBlock = Block_copy(action); +} + +-(void) callActionBlock:(id)sender{ + _actionBlock(); +} - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Initialization code - + _actionBlock = nil; self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.autoresizesSubviews = YES; self.layer.needsDisplayOnBoundsChange = YES; isBlued = NO; - [self setTitle:@"Purchase Now" forState:UIControlStateSelected]; + [self setTitle:ZI_BUY_NOW_TITLE forState:UIControlStateSelected]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateNormal]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateSelected]; [self.titleLabel setShadowOffset:CGSizeMake(0.0, -0.6)]; [self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]]; self.titleLabel.textColor = [UIColor colorWithWhite:0.902 alpha:1.000]; self.titleEdgeInsets = UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0); [self addTarget:self action:@selector(touchedUpOutside:) forControlEvents:UIControlEventTouchUpOutside]; [self addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; CAGradientLayer *bevelLayer2 = [CAGradientLayer layer]; bevelLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.4 alpha:1.0] CGColor], [[UIColor whiteColor] CGColor], nil]; bevelLayer2.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(frame), CGRectGetHeight(frame)); bevelLayer2.cornerRadius = 5.0; bevelLayer2.needsDisplayOnBoundsChange = YES; CAGradientLayer *innerLayer2 = [CAGradientLayer layer]; innerLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor darkGrayColor] CGColor], [[UIColor lightGrayColor] CGColor], nil]; innerLayer2.frame = CGRectMake(0.5, 0.5, CGRectGetWidth(frame) - 1.0, CGRectGetHeight(frame) - 1.0); innerLayer2.cornerRadius = 4.6; innerLayer2.needsDisplayOnBoundsChange = YES; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; innerLayer3 = [CAGradientLayer layer]; innerLayer3.colors = blueColors; innerLayer3.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.500], [NSNumber numberWithFloat:0.5001], [NSNumber numberWithFloat:1.0], nil]; innerLayer3.frame = CGRectMake(0.75, 0.75, CGRectGetWidth(frame) - 1.5, CGRectGetHeight(frame) - 1.5); innerLayer3.cornerRadius = 4.5; innerLayer3.needsDisplayOnBoundsChange = YES; [self.layer addSublayer:bevelLayer2]; [self.layer addSublayer:innerLayer2]; [self.layer addSublayer:innerLayer3]; [self bringSubviewToFront:self.titleLabel]; } return self; } - (void) setSelected:(BOOL)selected { [super setSelected:selected]; [CATransaction begin]; [CATransaction setAnimationDuration:0.25]; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; UIColor *greenOne = [UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000]; UIColor *greenTwo = [UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000]; UIColor *greenThree = [UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000]; UIColor *greenFour = [UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; NSArray *greenColors = [NSArray arrayWithObjects:(id)greenOne.CGColor, greenTwo.CGColor, greenThree.CGColor, greenFour.CGColor, nil]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; animation.fromValue = (!self.selected) ? greenColors : blueColors; animation.toValue = (!self.selected) ? blueColors : greenColors; animation.duration = 0.25; animation.removedOnCompletion = NO; animation.fillMode = kCAFillModeForwards; animation.delegate = self; [innerLayer3 layoutIfNeeded]; [innerLayer3 addAnimation:animation forKey:@"changeToBlue"]; + for (CALayer *la in self.layer.sublayers) { CGRect cr = la.bounds; - cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; + cr.size.width = cr.size.width; + //cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; la.bounds = cr; [la layoutIfNeeded]; } CGRect cr = self.frame; - cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; + cr.size.width = cr.size.width; + //cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; self.frame = cr; - self.titleEdgeInsets = (!self.selected) ? UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0) : UIEdgeInsetsMake(2.0, -50.0, 0.0, 0.0); + //self.titleEdgeInsets = (!self.selected) ? UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0) : UIEdgeInsetsMake(2.0, -50.0, 0.0, 0.0); [CATransaction commit]; } - (IBAction) touchedUpOutside:(id)sender { if (self.selected) { [self setSelected:NO]; } } - (IBAction) pressButton:(id)sender { if (isBlued) { + [self callActionBlock:sender]; [sender setSelected:NO]; isBlued = NO; } else { + [sender setSelected:YES]; isBlued = YES; } } - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { - +#ifdef DEBUG NSLog(@"Animation Did Stop"); - +#endif } - (void)dealloc { + Block_release(_actionBlock); [super dealloc]; } @end
zueos/ZIStoreButton
058af5a14df1c786f5f4b110ab56096fea158568
One Big Commit
diff --git a/Classes/ZIStoreButtonDemoViewController.m b/Classes/ZIStoreButtonDemoViewController.m index 05401a1..2114f9a 100644 --- a/Classes/ZIStoreButtonDemoViewController.m +++ b/Classes/ZIStoreButtonDemoViewController.m @@ -1,118 +1,118 @@ /* // ZIStoreButtonDemoViewController.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. */ /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButtonDemoViewController.h" #import "ZIStoreButton.h" #import <QuartzCore/QuartzCore.h> @implementation ZIStoreButtonDemoViewController - (void)viewDidLoad { [super viewDidLoad]; ZIStoreButton *button = [[ZIStoreButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 22.0)]; - [button setTitle:@"$0.99" forState:UIControlStateNormal]; + [button setTitle:@"$1.99" forState:UIControlStateNormal]; button.center = self.view.center; CAGradientLayer *bgLayer = [self backgroundLayer]; bgLayer.frame = self.view.bounds; [self.view.layer addSublayer:bgLayer]; [self.view addSubview:button]; UILabel *titleLab = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 10.0, 320.0, 35.0)]; titleLab.backgroundColor = [UIColor clearColor]; titleLab.text = @"ZIStoreButton"; titleLab.font = [UIFont systemFontOfSize:24.0]; titleLab.textAlignment = UITextAlignmentCenter; titleLab.shadowColor = [UIColor colorWithWhite:0.98 alpha:1.0]; titleLab.shadowOffset = CGSizeMake(0.0, 0.75); titleLab.textColor = [UIColor colorWithWhite:0.50 alpha:1.0]; [self.view addSubview:titleLab]; UILabel *detailLab = [[UILabel alloc] initWithFrame:CGRectMake(10.0, 55.0, 300.0, 120.0)]; detailLab.backgroundColor = [UIColor clearColor]; detailLab.numberOfLines = 7; detailLab.text = @" This is a UIButton subclass that use's Core Animation Layers to present itself. A CAAnimation is rendered using the keypath for the 'colors' property of the CAGradeintLayer.\n\n Not a single image resource is ever used to render any part of the button."; detailLab.font = [UIFont systemFontOfSize:13.0]; detailLab.shadowColor = [UIColor colorWithWhite:0.98 alpha:1.0]; detailLab.shadowOffset = CGSizeMake(0.0, 1.0); detailLab.textColor = [UIColor colorWithWhite:0.50 alpha:1.0]; [self.view addSubview:detailLab]; } - (CAGradientLayer*) backgroundLayer { UIColor *colorOne = [UIColor colorWithWhite:0.9 alpha:1.0]; UIColor *colorTwo = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.85 alpha:1.0]; UIColor *colorThree = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.7 alpha:1.0]; UIColor *colorFour = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.4 alpha:1.0]; NSArray *colors = [NSArray arrayWithObjects:(id)colorOne.CGColor, colorTwo.CGColor, colorThree.CGColor, colorFour.CGColor, nil]; NSNumber *stopOne = [NSNumber numberWithFloat:0.0]; NSNumber *stopTwo = [NSNumber numberWithFloat:0.02]; NSNumber *stopThree = [NSNumber numberWithFloat:0.99]; NSNumber *stopFour = [NSNumber numberWithFloat:1.0]; NSArray *locations = [NSArray arrayWithObjects:stopOne, stopTwo, stopThree, stopFour, nil]; CAGradientLayer *headerLayer = [CAGradientLayer layer]; //headerLayer.frame = CGRectMake(0.0, 0.0, 320.0, 77.0); headerLayer.colors = colors; headerLayer.locations = locations; return headerLayer; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end
zueos/ZIStoreButton
5e005a7a98b31b6cfc5b49346d52d81101ac86a6
Changed Title
diff --git a/Classes/ZIStoreButtonDemoViewController.m b/Classes/ZIStoreButtonDemoViewController.m index 687e764..05401a1 100644 --- a/Classes/ZIStoreButtonDemoViewController.m +++ b/Classes/ZIStoreButtonDemoViewController.m @@ -1,118 +1,118 @@ /* // ZIStoreButtonDemoViewController.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. */ /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButtonDemoViewController.h" #import "ZIStoreButton.h" #import <QuartzCore/QuartzCore.h> @implementation ZIStoreButtonDemoViewController - (void)viewDidLoad { [super viewDidLoad]; ZIStoreButton *button = [[ZIStoreButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 22.0)]; [button setTitle:@"$0.99" forState:UIControlStateNormal]; button.center = self.view.center; CAGradientLayer *bgLayer = [self backgroundLayer]; bgLayer.frame = self.view.bounds; [self.view.layer addSublayer:bgLayer]; [self.view addSubview:button]; UILabel *titleLab = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 10.0, 320.0, 35.0)]; titleLab.backgroundColor = [UIColor clearColor]; - titleLab.text = @"ZIStoreButton Control"; + titleLab.text = @"ZIStoreButton"; titleLab.font = [UIFont systemFontOfSize:24.0]; titleLab.textAlignment = UITextAlignmentCenter; titleLab.shadowColor = [UIColor colorWithWhite:0.98 alpha:1.0]; titleLab.shadowOffset = CGSizeMake(0.0, 0.75); titleLab.textColor = [UIColor colorWithWhite:0.50 alpha:1.0]; [self.view addSubview:titleLab]; UILabel *detailLab = [[UILabel alloc] initWithFrame:CGRectMake(10.0, 55.0, 300.0, 120.0)]; detailLab.backgroundColor = [UIColor clearColor]; detailLab.numberOfLines = 7; detailLab.text = @" This is a UIButton subclass that use's Core Animation Layers to present itself. A CAAnimation is rendered using the keypath for the 'colors' property of the CAGradeintLayer.\n\n Not a single image resource is ever used to render any part of the button."; detailLab.font = [UIFont systemFontOfSize:13.0]; detailLab.shadowColor = [UIColor colorWithWhite:0.98 alpha:1.0]; detailLab.shadowOffset = CGSizeMake(0.0, 1.0); detailLab.textColor = [UIColor colorWithWhite:0.50 alpha:1.0]; [self.view addSubview:detailLab]; } - (CAGradientLayer*) backgroundLayer { UIColor *colorOne = [UIColor colorWithWhite:0.9 alpha:1.0]; UIColor *colorTwo = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.85 alpha:1.0]; UIColor *colorThree = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.7 alpha:1.0]; UIColor *colorFour = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.4 alpha:1.0]; NSArray *colors = [NSArray arrayWithObjects:(id)colorOne.CGColor, colorTwo.CGColor, colorThree.CGColor, colorFour.CGColor, nil]; NSNumber *stopOne = [NSNumber numberWithFloat:0.0]; NSNumber *stopTwo = [NSNumber numberWithFloat:0.02]; NSNumber *stopThree = [NSNumber numberWithFloat:0.99]; NSNumber *stopFour = [NSNumber numberWithFloat:1.0]; NSArray *locations = [NSArray arrayWithObjects:stopOne, stopTwo, stopThree, stopFour, nil]; CAGradientLayer *headerLayer = [CAGradientLayer layer]; //headerLayer.frame = CGRectMake(0.0, 0.0, 320.0, 77.0); headerLayer.colors = colors; headerLayer.locations = locations; return headerLayer; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~$ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~$ new file mode 100644 index 0000000..905ae9d Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~$ differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~> b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~> new file mode 100644 index 0000000..e69de29 diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~? b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~? new file mode 100644 index 0000000..451b781 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~? differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/categories.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/categories.pbxbtree new file mode 100644 index 0000000..630674f Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/categories.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree new file mode 100644 index 0000000..5f1b3c0 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree new file mode 100644 index 0000000..74d234b Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree new file mode 100644 index 0000000..f368dc1 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree new file mode 100644 index 0000000..da2660b Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header new file mode 100644 index 0000000..f5b1b1a Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/protocols.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/protocols.pbxbtree new file mode 100644 index 0000000..1309d46 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/protocols.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree new file mode 100644 index 0000000..f941a38 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control new file mode 100644 index 0000000..bb69a9e Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings new file mode 100644 index 0000000..55e8df8 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/subclasses.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/subclasses.pbxbtree new file mode 100644 index 0000000..a730777 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/subclasses.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols new file mode 100644 index 0000000..c54b4b4 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols differ
zueos/ZIStoreButton
db14d1ee6080b1ec5baeae964b924a59e8a784a0
Added LICENSE
diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c421f89 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sub licensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and non commercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sub licenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + ZIStoreButton Copyright (C) 2010 Zueos, Inc. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. \ No newline at end of file
zueos/ZIStoreButton
de6c40995923446b250afe4e5338daf7d5705bf6
Fixed a build error that tripped because a variable was named wrong on accident
diff --git a/Classes/ZIStoreButton.m b/Classes/ZIStoreButton.m index 8b50c5c..908d956 100644 --- a/Classes/ZIStoreButton.m +++ b/Classes/ZIStoreButton.m @@ -1,168 +1,168 @@ // // ZIStoreButton.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButton.h" @implementation ZIStoreButton - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Initialization code self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.autoresizesSubviews = YES; self.layer.needsDisplayOnBoundsChange = YES; isBlued = NO; [self setTitle:@"Purchase Now" forState:UIControlStateSelected]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateNormal]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateSelected]; [self.titleLabel setShadowOffset:CGSizeMake(0.0, -0.6)]; [self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]]; self.titleLabel.textColor = [UIColor colorWithWhite:0.902 alpha:1.000]; self.titleEdgeInsets = UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0); [self addTarget:self action:@selector(touchedUpOutside:) forControlEvents:UIControlEventTouchUpOutside]; [self addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; CAGradientLayer *bevelLayer2 = [CAGradientLayer layer]; bevelLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.4 alpha:1.0] CGColor], [[UIColor whiteColor] CGColor], nil]; bevelLayer2.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(frame), CGRectGetHeight(frame)); bevelLayer2.cornerRadius = 5.0; bevelLayer2.needsDisplayOnBoundsChange = YES; CAGradientLayer *innerLayer2 = [CAGradientLayer layer]; innerLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor darkGrayColor] CGColor], [[UIColor lightGrayColor] CGColor], nil]; innerLayer2.frame = CGRectMake(0.5, 0.5, CGRectGetWidth(frame) - 1.0, CGRectGetHeight(frame) - 1.0); innerLayer2.cornerRadius = 4.6; innerLayer2.needsDisplayOnBoundsChange = YES; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; innerLayer3 = [CAGradientLayer layer]; innerLayer3.colors = blueColors; innerLayer3.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.500], [NSNumber numberWithFloat:0.5001], [NSNumber numberWithFloat:1.0], nil]; innerLayer3.frame = CGRectMake(0.75, 0.75, CGRectGetWidth(frame) - 1.5, CGRectGetHeight(frame) - 1.5); innerLayer3.cornerRadius = 4.5; innerLayer3.needsDisplayOnBoundsChange = YES; [self.layer addSublayer:bevelLayer2]; [self.layer addSublayer:innerLayer2]; [self.layer addSublayer:innerLayer3]; [self bringSubviewToFront:self.titleLabel]; } return self; } - (void) setSelected:(BOOL)selected { [super setSelected:selected]; [CATransaction begin]; [CATransaction setAnimationDuration:0.25]; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; UIColor *greenOne = [UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000]; UIColor *greenTwo = [UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000]; UIColor *greenThree = [UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000]; UIColor *greenFour = [UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; NSArray *greenColors = [NSArray arrayWithObjects:(id)greenOne.CGColor, greenTwo.CGColor, greenThree.CGColor, greenFour.CGColor, nil]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; animation.fromValue = (!self.selected) ? greenColors : blueColors; animation.toValue = (!self.selected) ? blueColors : greenColors; animation.duration = 0.25; animation.removedOnCompletion = NO; animation.fillMode = kCAFillModeForwards; animation.delegate = self; - [gradientLayer layoutIfNeeded]; - [gradientLayer addAnimation:animation forKey:@"changeToBlue"]; + [innerLayer3 layoutIfNeeded]; + [innerLayer3 addAnimation:animation forKey:@"changeToBlue"]; for (CALayer *la in self.layer.sublayers) { CGRect cr = la.bounds; cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; la.bounds = cr; [la layoutIfNeeded]; } CGRect cr = self.frame; cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; self.frame = cr; self.titleEdgeInsets = (!self.selected) ? UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0) : UIEdgeInsetsMake(2.0, -50.0, 0.0, 0.0); [CATransaction commit]; } - (IBAction) touchedUpOutside:(id)sender { if (self.selected) { [self setSelected:NO]; } } - (IBAction) pressButton:(id)sender { if (isBlued) { [sender setSelected:NO]; isBlued = NO; } else { [sender setSelected:YES]; isBlued = YES; } } - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { NSLog(@"Animation Did Stop"); } - (void)dealloc { [super dealloc]; } @end diff --git a/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 b/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 index 752e133..c892736 100644 --- a/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 +++ b/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 @@ -1,1399 +1,1397 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>ActivePerspectiveName</key> <string>Project</string> <key>AllowedModules</key> <array> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Name</key> <string>Groups and Files Outline View</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Name</key> <string>Editor</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCTaskListModule</string> <key>Name</key> <string>Task List</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCDetailModule</string> <key>Name</key> <string>File and Smart Group Detail Viewer</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXBuildResultsModule</string> <key>Name</key> <string>Detailed Build Results Viewer</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXProjectFindModule</string> <key>Name</key> <string>Project Batch Find Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCProjectFormatConflictsModule</string> <key>Name</key> <string>Project Format Conflicts List</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXBookmarksModule</string> <key>Name</key> <string>Bookmarks Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXClassBrowserModule</string> <key>Name</key> <string>Class Browser</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXCVSModule</string> <key>Name</key> <string>Source Code Control Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXDebugBreakpointsModule</string> <key>Name</key> <string>Debug Breakpoints Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCDockableInspector</string> <key>Name</key> <string>Inspector</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXOpenQuicklyModule</string> <key>Name</key> <string>Open Quickly Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXDebugSessionModule</string> <key>Name</key> <string>Debugger</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXDebugCLIModule</string> <key>Name</key> <string>Debug Console</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCSnapshotModule</string> <key>Name</key> <string>Snapshots Tool</string> </dict> </array> <key>BundlePath</key> <string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string> <key>Description</key> <string>DefaultDescriptionKey</string> <key>DockingSystemVisible</key> <false/> <key>Extension</key> <string>mode1v3</string> <key>FavBarConfig</key> <dict> <key>PBXProjectModuleGUID</key> <string>CABCFC0811F6743900D7D98A</string> <key>XCBarModuleItemNames</key> <dict/> <key>XCBarModuleItems</key> <array/> </dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>com.apple.perspectives.project.mode1v3</string> <key>MajorVersion</key> <integer>33</integer> <key>MinorVersion</key> <integer>0</integer> <key>Name</key> <string>Default</string> <key>Notifications</key> <array/> <key>OpenEditors</key> <array/> <key>PerspectiveWidths</key> <array> <integer>-1</integer> <integer>-1</integer> </array> <key>Perspectives</key> <array> <dict> <key>ChosenToolbarItems</key> <array> <string>active-combo-popup</string> <string>action</string> <string>NSToolbarFlexibleSpaceItem</string> <string>servicesModuledebug</string> <string>debugger-enable-breakpoints</string> <string>clean</string> <string>build-and-go</string> <string>com.apple.ide.PBXToolbarStopButton</string> <string>get-info</string> <string>NSToolbarFlexibleSpaceItem</string> <string>com.apple.pbx.toolbar.searchfield</string> </array> <key>ControllerClassBaseName</key> <string></string> <key>IconName</key> <string>WindowOfProjectWithEditor</string> <key>Identifier</key> <string>perspective.project</string> <key>IsVertical</key> <false/> <key>Layout</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> <array> <string>1C37FBAC04509CD000000102</string> <string>1C37FAAC04509CD000000102</string> <string>1C37FABC05509CD000000102</string> <string>1C37FABC05539CD112110102</string> <string>E2644B35053B69B200211256</string> <string>1C37FABC04509CD000100104</string> <string>1CC0EA4004350EF90044410B</string> <string>1CC0EA4004350EF90041110B</string> </array> <key>PBXProjectModuleGUID</key> <string>1CE0B1FE06471DED0097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Files</string> <key>PBXProjectStructureProvided</key> <string>yes</string> <key>PBXSmartGroupTreeModuleColumnData</key> <dict> <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> <array> <real>223</real> </array> <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> <array> <string>MainColumn</string> </array> </dict> <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> <dict> <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> <array> <string>29B97314FDCFA39411CA2CEA</string> <string>080E96DDFE201D6D7F000001</string> <string>1C37FABC05509CD000000102</string> </array> <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <array> <array> - <integer>5</integer> - <integer>1</integer> <integer>0</integer> </array> </array> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> <string>{{0, 0}, {223, 900}}</string> </dict> <key>PBXTopSmartGroupGIDs</key> <array/> <key>XCIncludePerspectivesSwitch</key> <true/> <key>XCSharingToken</key> <string>com.apple.Xcode.GFSharingToken</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {240, 918}}</string> <key>GroupTreeTableConfiguration</key> <array> <string>MainColumn</string> <real>223</real> </array> <key>RubberWindowFrame</key> - <string>1046 250 1290 959 0 0 2560 1418 </string> + <string>59 265 1290 959 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Proportion</key> <string>240pt</string> </dict> <dict> <key>Dock</key> <array> <dict> <key>BecomeActive</key> <true/> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CE0B20306471E060097A5F4</string> <key>PBXProjectModuleLabel</key> - <string>ZIStoreButtonDemoViewController.m</string> + <string>ZIStoreButton.m</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CE0B20406471E060097A5F4</string> <key>PBXProjectModuleLabel</key> - <string>ZIStoreButtonDemoViewController.m</string> + <string>ZIStoreButton.m</string> <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>CABF71FB1223EDB400227AD3</string> + <string>CABF72671223FAF200227AD3</string> <key>history</key> <array> - <string>CAFFD36411F884B30097DE9A</string> - <string>CAFFD36511F884B30097DE9A</string> <string>CAFFD36711F884B30097DE9A</string> <string>CAFFD36811F884B30097DE9A</string> <string>CA18DF1512236D5C0038778B</string> - <string>CA18DF1D12238BF60038778B</string> + <string>CABF723C1223F64400227AD3</string> + <string>CABF723D1223F64400227AD3</string> + <string>CABF725F1223FAE200227AD3</string> </array> </dict> <key>SplitCount</key> <string>1</string> </dict> <key>StatusBarVisibility</key> <true/> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {1045, 913}}</string> <key>RubberWindowFrame</key> - <string>1046 250 1290 959 0 0 2560 1418 </string> + <string>59 265 1290 959 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>913pt</string> </dict> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CE0B20506471E060097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Detail</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 918}, {1045, 0}}</string> <key>RubberWindowFrame</key> - <string>1046 250 1290 959 0 0 2560 1418 </string> + <string>59 265 1290 959 0 0 2560 1418 </string> </dict> <key>Module</key> <string>XCDetailModule</string> <key>Proportion</key> <string>0pt</string> </dict> </array> <key>Proportion</key> <string>1045pt</string> </dict> </array> <key>Name</key> <string>Project</string> <key>ServiceClasses</key> <array> <string>XCModuleDock</string> <string>PBXSmartGroupTreeModule</string> <string>XCModuleDock</string> <string>PBXNavigatorGroup</string> <string>XCDetailModule</string> </array> <key>TableOfContents</key> <array> - <string>CABF71FC1223EDB400227AD3</string> + <string>CABF72681223FAF200227AD3</string> <string>1CE0B1FE06471DED0097A5F4</string> - <string>CABF71FD1223EDB400227AD3</string> + <string>CABF72691223FAF200227AD3</string> <string>1CE0B20306471E060097A5F4</string> <string>1CE0B20506471E060097A5F4</string> </array> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.defaultV3</string> </dict> <dict> <key>ControllerClassBaseName</key> <string></string> <key>IconName</key> <string>WindowOfProject</string> <key>Identifier</key> <string>perspective.morph</string> <key>IsVertical</key> <integer>0</integer> <key>Layout</key> <array> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> <array> <string>1C37FBAC04509CD000000102</string> <string>1C37FAAC04509CD000000102</string> <string>1C08E77C0454961000C914BD</string> <string>1C37FABC05509CD000000102</string> <string>1C37FABC05539CD112110102</string> <string>E2644B35053B69B200211256</string> <string>1C37FABC04509CD000100104</string> <string>1CC0EA4004350EF90044410B</string> <string>1CC0EA4004350EF90041110B</string> </array> <key>PBXProjectModuleGUID</key> <string>11E0B1FE06471DED0097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Files</string> <key>PBXProjectStructureProvided</key> <string>yes</string> <key>PBXSmartGroupTreeModuleColumnData</key> <dict> <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> <array> <real>186</real> </array> <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> <array> <string>MainColumn</string> </array> </dict> <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> <dict> <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> <array> <string>29B97314FDCFA39411CA2CEA</string> <string>1C37FABC05509CD000000102</string> </array> <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <array> <array> <integer>0</integer> </array> </array> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> <string>{{0, 0}, {186, 337}}</string> </dict> <key>PBXTopSmartGroupGIDs</key> <array/> <key>XCIncludePerspectivesSwitch</key> <integer>1</integer> <key>XCSharingToken</key> <string>com.apple.Xcode.GFSharingToken</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {203, 355}}</string> <key>GroupTreeTableConfiguration</key> <array> <string>MainColumn</string> <real>186</real> </array> <key>RubberWindowFrame</key> <string>373 269 690 397 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Name</key> <string>Morph</string> <key>PreferredWidth</key> <integer>300</integer> <key>ServiceClasses</key> <array> <string>XCModuleDock</string> <string>PBXSmartGroupTreeModule</string> </array> <key>TableOfContents</key> <array> <string>11E0B1FE06471DED0097A5F4</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.default.shortV3</string> </dict> </array> <key>PerspectivesBarVisible</key> <false/> <key>ShelfIsVisible</key> <false/> <key>SourceDescription</key> <string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string> <key>StatusbarIsVisible</key> <true/> <key>TimeStamp</key> <real>0.0</real> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarDisplayMode</key> <integer>2</integer> <key>ToolbarIsVisible</key> <true/> <key>ToolbarSizeMode</key> <integer>2</integer> <key>Type</key> <string>Perspectives</string> <key>UpdateMessage</key> <string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?</string> <key>WindowJustification</key> <integer>5</integer> <key>WindowOrderList</key> <array> <string>CABCFBEF11F6742100D7D98A</string> <string>/Users/brandon/Documents/StoreButton/ZIStoreButton/ZIStoreButtonDemo.xcodeproj</string> </array> <key>WindowString</key> - <string>1046 250 1290 959 0 0 2560 1418 </string> + <string>59 265 1290 959 0 0 2560 1418 </string> <key>WindowToolsV3</key> <array> <dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>windowTool.build</string> <key>IsVertical</key> <true/> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD0528F0623707200166675</string> <key>PBXProjectModuleLabel</key> <string></string> <key>StatusBarVisibility</key> <true/> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {500, 218}}</string> <key>RubberWindowFrame</key> <string>125 872 500 500 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>218pt</string> </dict> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>XCMainBuildResultsModuleGUID</string> <key>PBXProjectModuleLabel</key> <string>Build Results</string> <key>XCBuildResultsTrigger_Collapse</key> <integer>1021</integer> <key>XCBuildResultsTrigger_Open</key> <integer>1011</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 223}, {500, 236}}</string> <key>RubberWindowFrame</key> <string>125 872 500 500 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXBuildResultsModule</string> <key>Proportion</key> <string>236pt</string> </dict> </array> <key>Proportion</key> <string>459pt</string> </dict> </array> <key>Name</key> <string>Build Results</string> <key>ServiceClasses</key> <array> <string>PBXBuildResultsModule</string> </array> <key>StatusbarIsVisible</key> <true/> <key>TableOfContents</key> <array> <string>CABCFBEF11F6742100D7D98A</string> - <string>CABF71FE1223EDB400227AD3</string> + <string>CABF726A1223FAF200227AD3</string> <string>1CD0528F0623707200166675</string> <string>XCMainBuildResultsModuleGUID</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.buildV3</string> <key>WindowContentMinSize</key> <string>486 300</string> <key>WindowString</key> <string>125 872 500 500 0 0 2560 1418 </string> <key>WindowToolGUID</key> <string>CABCFBEF11F6742100D7D98A</string> <key>WindowToolIsVisible</key> <false/> </dict> <dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>windowTool.debugger</string> <key>IsVertical</key> <true/> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>Debugger</key> <dict> <key>HorizontalSplitView</key> <dict> <key>_collapsingFrameDimension</key> <real>0.0</real> <key>_indexOfCollapsedView</key> <integer>0</integer> <key>_percentageOfCollapsedView</key> <real>0.0</real> <key>isCollapsed</key> <string>yes</string> <key>sizes</key> <array> - <string>{{0, 0}, {316, 198}}</string> - <string>{{316, 0}, {378, 198}}</string> + <string>{{0, 0}, {316, 201}}</string> + <string>{{316, 0}, {378, 201}}</string> </array> </dict> <key>VerticalSplitView</key> <dict> <key>_collapsingFrameDimension</key> <real>0.0</real> <key>_indexOfCollapsedView</key> <integer>0</integer> <key>_percentageOfCollapsedView</key> <real>0.0</real> <key>isCollapsed</key> <string>yes</string> <key>sizes</key> <array> - <string>{{0, 0}, {694, 198}}</string> - <string>{{0, 198}, {694, 183}}</string> + <string>{{0, 0}, {694, 201}}</string> + <string>{{0, 201}, {694, 180}}</string> </array> </dict> </dict> <key>LauncherConfigVersion</key> <string>8</string> <key>PBXProjectModuleGUID</key> <string>1C162984064C10D400B95A72</string> <key>PBXProjectModuleLabel</key> <string>Debug - GLUTExamples (Underwater)</string> </dict> <key>GeometryConfiguration</key> <dict> <key>DebugConsoleVisible</key> <string>None</string> <key>DebugConsoleWindowFrame</key> <string>{{200, 200}, {500, 300}}</string> <key>DebugSTDIOWindowFrame</key> <string>{{200, 200}, {500, 300}}</string> <key>Frame</key> <string>{{0, 0}, {694, 381}}</string> <key>PBXDebugSessionStackFrameViewKey</key> <dict> <key>DebugVariablesTableConfiguration</key> <array> <string>Name</string> <real>120</real> <string>Value</string> <real>85</real> <string>Summary</string> <real>148</real> </array> <key>Frame</key> - <string>{{316, 0}, {378, 198}}</string> + <string>{{316, 0}, {378, 201}}</string> <key>RubberWindowFrame</key> <string>1104 774 694 422 0 0 2560 1418 </string> </dict> <key>RubberWindowFrame</key> <string>1104 774 694 422 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXDebugSessionModule</string> <key>Proportion</key> <string>381pt</string> </dict> </array> <key>Proportion</key> <string>381pt</string> </dict> </array> <key>Name</key> <string>Debugger</string> <key>ServiceClasses</key> <array> <string>PBXDebugSessionModule</string> </array> <key>StatusbarIsVisible</key> <true/> <key>TableOfContents</key> <array> <string>1CD10A99069EF8BA00B06720</string> - <string>CAFFD2FD11F87EAF0097DE9A</string> + <string>CABF724E1223FAB400227AD3</string> <string>1C162984064C10D400B95A72</string> - <string>CAFFD2FE11F87EAF0097DE9A</string> - <string>CAFFD2FF11F87EAF0097DE9A</string> - <string>CAFFD30011F87EAF0097DE9A</string> - <string>CAFFD30111F87EAF0097DE9A</string> - <string>CAFFD30211F87EAF0097DE9A</string> + <string>CABF724F1223FAB400227AD3</string> + <string>CABF72501223FAB400227AD3</string> + <string>CABF72511223FAB400227AD3</string> + <string>CABF72521223FAB400227AD3</string> + <string>CABF72531223FAB400227AD3</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.debugV3</string> <key>WindowString</key> <string>1104 774 694 422 0 0 2560 1418 </string> <key>WindowToolGUID</key> <string>1CD10A99069EF8BA00B06720</string> <key>WindowToolIsVisible</key> <false/> </dict> <dict> <key>Identifier</key> <string>windowTool.find</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CDD528C0622207200134675</string> <key>PBXProjectModuleLabel</key> <string>&lt;No Editor&gt;</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD0528D0623707200166675</string> </dict> <key>SplitCount</key> <string>1</string> </dict> <key>StatusBarVisibility</key> <integer>1</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {781, 167}}</string> <key>RubberWindowFrame</key> <string>62 385 781 470 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>781pt</string> </dict> </array> <key>Proportion</key> <string>50%</string> </dict> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD0528E0623707200166675</string> <key>PBXProjectModuleLabel</key> <string>Project Find</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{8, 0}, {773, 254}}</string> <key>RubberWindowFrame</key> <string>62 385 781 470 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXProjectFindModule</string> <key>Proportion</key> <string>50%</string> </dict> </array> <key>Proportion</key> <string>428pt</string> </dict> </array> <key>Name</key> <string>Project Find</string> <key>ServiceClasses</key> <array> <string>PBXProjectFindModule</string> </array> <key>StatusbarIsVisible</key> <integer>1</integer> <key>TableOfContents</key> <array> <string>1C530D57069F1CE1000CFCEE</string> <string>1C530D58069F1CE1000CFCEE</string> <string>1C530D59069F1CE1000CFCEE</string> <string>1CDD528C0622207200134675</string> <string>1C530D5A069F1CE1000CFCEE</string> <string>1CE0B1FE06471DED0097A5F4</string> <string>1CD0528E0623707200166675</string> </array> <key>WindowString</key> <string>62 385 781 470 0 0 1440 878 </string> <key>WindowToolGUID</key> <string>1C530D57069F1CE1000CFCEE</string> <key>WindowToolIsVisible</key> <integer>0</integer> </dict> <dict> <key>Identifier</key> <string>MENUSEPARATOR</string> </dict> <dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>windowTool.debuggerConsole</string> <key>IsVertical</key> <true/> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1C78EAAC065D492600B07095</string> <key>PBXProjectModuleLabel</key> <string>Debugger Console</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {650, 209}}</string> <key>RubberWindowFrame</key> <string>1104 946 650 250 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXDebugCLIModule</string> <key>Proportion</key> <string>209pt</string> </dict> </array> <key>Proportion</key> <string>209pt</string> </dict> </array> <key>Name</key> <string>Debugger Console</string> <key>ServiceClasses</key> <array> <string>PBXDebugCLIModule</string> </array> <key>StatusbarIsVisible</key> <true/> <key>TableOfContents</key> <array> <string>1C78EAAD065D492600B07095</string> - <string>CAFFD30311F87EAF0097DE9A</string> + <string>CABF72541223FAB400227AD3</string> <string>1C78EAAC065D492600B07095</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.consoleV3</string> <key>WindowString</key> <string>1104 946 650 250 0 0 2560 1418 </string> <key>WindowToolGUID</key> <string>1C78EAAD065D492600B07095</string> <key>WindowToolIsVisible</key> <false/> </dict> <dict> <key>Identifier</key> <string>windowTool.snapshots</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>Module</key> <string>XCSnapshotModule</string> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Name</key> <string>Snapshots</string> <key>ServiceClasses</key> <array> <string>XCSnapshotModule</string> </array> <key>StatusbarIsVisible</key> <string>Yes</string> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.snapshots</string> <key>WindowString</key> <string>315 824 300 550 0 0 1440 878 </string> <key>WindowToolIsVisible</key> <string>Yes</string> </dict> <dict> <key>Identifier</key> <string>windowTool.scm</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1C78EAB2065D492600B07095</string> <key>PBXProjectModuleLabel</key> <string>&lt;No Editor&gt;</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> <dict> <key>PBXProjectModuleGUID</key> <string>1C78EAB3065D492600B07095</string> </dict> <key>SplitCount</key> <string>1</string> </dict> <key>StatusBarVisibility</key> <integer>1</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {452, 0}}</string> <key>RubberWindowFrame</key> <string>743 379 452 308 0 0 1280 1002 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>0pt</string> </dict> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD052920623707200166675</string> <key>PBXProjectModuleLabel</key> <string>SCM</string> </dict> <key>GeometryConfiguration</key> <dict> <key>ConsoleFrame</key> <string>{{0, 259}, {452, 0}}</string> <key>Frame</key> <string>{{0, 7}, {452, 259}}</string> <key>RubberWindowFrame</key> <string>743 379 452 308 0 0 1280 1002 </string> <key>TableConfiguration</key> <array> <string>Status</string> <real>30</real> <string>FileName</string> <real>199</real> <string>Path</string> <real>197.0950012207031</real> </array> <key>TableFrame</key> <string>{{0, 0}, {452, 250}}</string> </dict> <key>Module</key> <string>PBXCVSModule</string> <key>Proportion</key> <string>262pt</string> </dict> </array> <key>Proportion</key> <string>266pt</string> </dict> </array> <key>Name</key> <string>SCM</string> <key>ServiceClasses</key> <array> <string>PBXCVSModule</string> </array> <key>StatusbarIsVisible</key> <integer>1</integer> <key>TableOfContents</key> <array> <string>1C78EAB4065D492600B07095</string> <string>1C78EAB5065D492600B07095</string> <string>1C78EAB2065D492600B07095</string> <string>1CD052920623707200166675</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.scm</string> <key>WindowString</key> <string>743 379 452 308 0 0 1280 1002 </string> </dict> <dict> <key>Identifier</key> <string>windowTool.breakpoints</string> <key>IsVertical</key> <integer>0</integer> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> <array> <string>1C77FABC04509CD000000102</string> </array> <key>PBXProjectModuleGUID</key> <string>1CE0B1FE06471DED0097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Files</string> <key>PBXProjectStructureProvided</key> <string>no</string> <key>PBXSmartGroupTreeModuleColumnData</key> <dict> <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> <array> <real>168</real> </array> <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> <array> <string>MainColumn</string> </array> </dict> <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> <dict> <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> <array> <string>1C77FABC04509CD000000102</string> </array> <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <array> <array> <integer>0</integer> </array> </array> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> <string>{{0, 0}, {168, 350}}</string> </dict> <key>PBXTopSmartGroupGIDs</key> <array/> <key>XCIncludePerspectivesSwitch</key> <integer>0</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {185, 368}}</string> <key>GroupTreeTableConfiguration</key> <array> <string>MainColumn</string> <real>168</real> </array> <key>RubberWindowFrame</key> <string>315 424 744 409 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Proportion</key> <string>185pt</string> </dict> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CA1AED706398EBD00589147</string> <key>PBXProjectModuleLabel</key> <string>Detail</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{190, 0}, {554, 368}}</string> <key>RubberWindowFrame</key> <string>315 424 744 409 0 0 1440 878 </string> </dict> <key>Module</key> <string>XCDetailModule</string> <key>Proportion</key> <string>554pt</string> </dict> </array> <key>Proportion</key> <string>368pt</string> </dict> </array> <key>MajorVersion</key> <integer>3</integer> <key>MinorVersion</key> <integer>0</integer> <key>Name</key> <string>Breakpoints</string> <key>ServiceClasses</key> <array> <string>PBXSmartGroupTreeModule</string> <string>XCDetailModule</string> </array> <key>StatusbarIsVisible</key> <integer>1</integer> <key>TableOfContents</key> <array> <string>1CDDB66807F98D9800BB5817</string> <string>1CDDB66907F98D9800BB5817</string> <string>1CE0B1FE06471DED0097A5F4</string> <string>1CA1AED706398EBD00589147</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.breakpointsV3</string> <key>WindowString</key> <string>315 424 744 409 0 0 1440 878 </string> <key>WindowToolGUID</key> <string>1CDDB66807F98D9800BB5817</string> <key>WindowToolIsVisible</key> <integer>1</integer> </dict> <dict> <key>Identifier</key> <string>windowTool.debugAnimator</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Name</key> <string>Debug Visualizer</string> <key>ServiceClasses</key> <array> <string>PBXNavigatorGroup</string> </array> <key>StatusbarIsVisible</key> <integer>1</integer> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.debugAnimatorV3</string> <key>WindowString</key> <string>100 100 700 500 0 0 1280 1002 </string> </dict> <dict> <key>Identifier</key> <string>windowTool.bookmarks</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>Module</key> <string>PBXBookmarksModule</string> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Name</key> <string>Bookmarks</string> <key>ServiceClasses</key> <array> <string>PBXBookmarksModule</string> </array> <key>StatusbarIsVisible</key> <integer>0</integer> <key>WindowString</key> <string>538 42 401 187 0 0 1280 1002 </string> </dict> <dict> <key>Identifier</key> <string>windowTool.projectFormatConflicts</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>Module</key> <string>XCProjectFormatConflictsModule</string> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Name</key> <string>Project Format Conflicts</string> <key>ServiceClasses</key> <array> <string>XCProjectFormatConflictsModule</string> </array> <key>StatusbarIsVisible</key> <integer>0</integer> <key>WindowContentMinSize</key> <string>450 300</string> <key>WindowString</key> <string>50 850 472 307 0 0 1440 877</string> </dict> <dict> <key>Identifier</key> <string>windowTool.classBrowser</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>OptionsSetName</key> <string>Hierarchy, all classes</string> <key>PBXProjectModuleGUID</key> <string>1CA6456E063B45B4001379D8</string> <key>PBXProjectModuleLabel</key> <string>Class Browser - NSObject</string> </dict> <key>GeometryConfiguration</key> <dict> <key>ClassesFrame</key> <string>{{0, 0}, {374, 96}}</string> <key>ClassesTreeTableConfiguration</key> <array> <string>PBXClassNameColumnIdentifier</string> <real>208</real> <string>PBXClassBookColumnIdentifier</string> <real>22</real> </array> <key>Frame</key> <string>{{0, 0}, {630, 331}}</string> <key>MembersFrame</key> <string>{{0, 105}, {374, 395}}</string> <key>MembersTreeTableConfiguration</key> <array> <string>PBXMemberTypeIconColumnIdentifier</string> <real>22</real> <string>PBXMemberNameColumnIdentifier</string> <real>216</real> <string>PBXMemberTypeColumnIdentifier</string> <real>97</real> <string>PBXMemberBookColumnIdentifier</string> <real>22</real> </array> <key>PBXModuleWindowStatusBarHidden2</key> <integer>1</integer> <key>RubberWindowFrame</key> <string>385 179 630 352 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXClassBrowserModule</string> <key>Proportion</key> <string>332pt</string> </dict> </array> <key>Proportion</key> <string>332pt</string> </dict> </array> <key>Name</key> <string>Class Browser</string> <key>ServiceClasses</key> <array> <string>PBXClassBrowserModule</string> </array> <key>StatusbarIsVisible</key> <integer>0</integer> <key>TableOfContents</key> <array> <string>1C0AD2AF069F1E9B00FABCE6</string> <string>1C0AD2B0069F1E9B00FABCE6</string> <string>1CA6456E063B45B4001379D8</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.classbrowser</string> <key>WindowString</key> <string>385 179 630 352 0 0 1440 878 </string> <key>WindowToolGUID</key> <string>1C0AD2AF069F1E9B00FABCE6</string> <key>WindowToolIsVisible</key> <integer>0</integer> </dict> <dict> <key>Identifier</key> <string>windowTool.refactoring</string> <key>IncludeInToolsMenu</key> <integer>0</integer> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>BecomeActive</key> <integer>1</integer> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{0, 0}, {500, 335}</string> <key>RubberWindowFrame</key> <string>{0, 0}, {500, 335}</string> </dict> <key>Module</key> <string>XCRefactoringModule</string> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Name</key> <string>Refactoring</string> <key>ServiceClasses</key> <array> <string>XCRefactoringModule</string> </array> <key>WindowString</key> <string>200 200 500 356 0 0 1920 1200 </string> </dict> </array> </dict> </plist> diff --git a/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser b/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser index accce23..cd7afb0 100644 --- a/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser +++ b/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser @@ -1,234 +1,233 @@ // !$*UTF8*$! { 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{779, 0}"; sepNavVisRange = "{0, 1130}"; }; }; 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */ = { uiCtxt = { sepNavFolds = "{\n c = (\n {\n r = \"{1100, 236}\";\n s = 0;\n },\n {\n r = \"{1406, 446}\";\n s = 0;\n },\n {\n r = \"{1924, 351}\";\n s = 0;\n },\n {\n r = \"{2348, 165}\";\n s = 0;\n },\n {\n r = \"{2582, 205}\";\n s = 0;\n },\n {\n r = \"{2854, 118}\";\n s = 0;\n },\n {\n r = \"{3097, 140}\";\n s = 0;\n },\n {\n r = \"{3258, 74}\";\n s = 0;\n }\n );\n r = \"{0, 3341}\";\n s = 0;\n}"; sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{162, 592}"; sepNavVisRange = "{0, 1614}"; }; }; 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */ = { activeExec = 0; executables = ( CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */, ); }; 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{165, 593}"; sepNavVisRange = "{0, 933}"; }; }; 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */ = { uiCtxt = { sepNavFolds = "{\n c = (\n {\n r = \"{2522, 1009}\";\n s = 0;\n },\n {\n r = \"{3628, 115}\";\n s = 0;\n },\n {\n r = \"{3780, 155}\";\n s = 0;\n },\n {\n r = \"{3962, 83}\";\n s = 0;\n },\n {\n r = \"{4066, 22}\";\n s = 0;\n }\n );\n r = \"{0, 4096}\";\n s = 0;\n}"; sepNavIntBoundsRect = "{{0, 0}, {1698, 929}}"; sepNavSelRange = "{1448, 0}"; - sepNavVisRange = "{0, 2691}"; + sepNavVisRange = "{41, 2671}"; }; }; 29B97313FDCFA39411CA2CEA /* Project object */ = { activeBuildConfigurationName = Debug; activeExecutable = CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */; - activeSDKPreference = iphonesimulator4.0; + activeSDKPreference = iphonesimulator4.1; activeTarget = 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */; addToTargets = ( 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */, ); breakpoints = ( ); codeSenseManager = CABCFBE811F671F800D7D98A /* Code sense */; executables = ( CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */, ); perUserDictionary = { PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, 806, 20, 48, 43, 43, 20, ); PBXFileTableDataSourceColumnsKey = ( PBXFileDataSource_FiletypeID, PBXFileDataSource_Filename_ColumnID, PBXFileDataSource_Built_ColumnID, PBXFileDataSource_ObjectSize_ColumnID, PBXFileDataSource_Errors_ColumnID, PBXFileDataSource_Warnings_ColumnID, PBXFileDataSource_Target_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 304344499; - PBXWorkspaceStateSaveDate = 304344499; + PBXPerProjectTemplateStateSaveDate = 304347886; + PBXWorkspaceStateSaveDate = 304347886; }; perUserProjectItems = { CA18DF1512236D5C0038778B = CA18DF1512236D5C0038778B /* PBXTextBookmark */; - CA18DF1612236D5C0038778B = CA18DF1612236D5C0038778B /* PBXTextBookmark */; - CA18DF1D12238BF60038778B = CA18DF1D12238BF60038778B /* PBXTextBookmark */; - CABF71FB1223EDB400227AD3 /* PBXTextBookmark */ = CABF71FB1223EDB400227AD3 /* PBXTextBookmark */; + CABF723C1223F64400227AD3 = CABF723C1223F64400227AD3 /* PBXTextBookmark */; + CABF723D1223F64400227AD3 = CABF723D1223F64400227AD3 /* PBXTextBookmark */; + CABF725F1223FAE200227AD3 = CABF725F1223FAE200227AD3 /* PBXTextBookmark */; + CABF72671223FAF200227AD3 /* PBXTextBookmark */ = CABF72671223FAF200227AD3 /* PBXTextBookmark */; CAFFD36411F884B30097DE9A = CAFFD36411F884B30097DE9A /* PBXTextBookmark */; - CAFFD36511F884B30097DE9A = CAFFD36511F884B30097DE9A /* PBXTextBookmark */; CAFFD36711F884B30097DE9A = CAFFD36711F884B30097DE9A /* PBXTextBookmark */; CAFFD36811F884B30097DE9A = CAFFD36811F884B30097DE9A /* PBXTextBookmark */; }; sourceControlManager = CABCFBE711F671F800D7D98A /* Source Control */; userBuildSettings = { }; }; CA18DF1512236D5C0038778B /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */; name = "ZIStoreButtonDemoAppDelegate.h: 25"; rLen = 0; rLoc = 779; rType = 0; vrLen = 1130; vrLoc = 0; }; - CA18DF1612236D5C0038778B /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; - name = "ZIStoreButtonDemoViewController.m: 22"; - rLen = 0; - rLoc = 704; - rType = 0; - vrLen = 4041; - vrLoc = 0; - }; - CA18DF1D12238BF60038778B /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; - name = "ZIStoreButtonDemoViewController.m: 47"; - rLen = 0; - rLoc = 1448; - rType = 0; - vrLen = 4049; - vrLoc = 0; - }; CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */ = { isa = PBXExecutable; activeArgIndices = ( ); argumentStrings = ( ); autoAttachOnCrash = 1; breakpointsEnabled = 1; configStateDict = { }; customDataFormattersEnabled = 1; dataTipCustomDataFormattersEnabled = 1; dataTipShowTypeColumn = 1; dataTipSortType = 0; debuggerPlugin = GDBDebugging; disassemblyDisplayState = 0; dylibVariantSuffix = ""; enableDebugStr = 1; environmentEntries = ( ); executableSystemSymbolLevel = 0; executableUserSymbolLevel = 0; libgmallocEnabled = 0; name = ZIStoreButtonDemo; savedGlobals = { }; showTypeColumn = 0; sourceDirectories = ( ); variableFormatDictionary = { }; }; CABCFBE711F671F800D7D98A /* Source Control */ = { isa = PBXSourceControlManager; fallbackIsa = XCSourceControlManager; isSCMEnabled = 0; scmConfiguration = { repositoryNamesForRoots = { "" = ""; }; }; }; CABCFBE811F671F800D7D98A /* Code sense */ = { isa = PBXCodeSenseManager; indexTemplatePath = ""; }; CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{145, 0}"; sepNavVisRange = "{0, 892}"; }; }; CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */ = { uiCtxt = { - sepNavFolds = "{\n c = (\n {\n r = \"{3771, 2332}\";\n s = 0;\n },\n {\n r = \"{6149, 51}\";\n s = 0;\n },\n {\n r = \"{6241, 118}\";\n s = 0;\n },\n {\n r = \"{6437, 35}\";\n s = 0;\n },\n {\n r = \"{6493, 22}\";\n s = 0;\n }\n );\n r = \"{0, 6524}\";\n s = 0;\n}"; - sepNavIntBoundsRect = "{{0, 0}, {1236, 1012}}"; - sepNavSelRange = "{145, 0}"; - sepNavVisRange = "{0, 3658}"; + sepNavIntBoundsRect = "{{0, 0}, {1236, 1859}}"; + sepNavSelRange = "{6032, 0}"; + sepNavVisRange = "{3734, 2467}"; }; }; - CABF71FB1223EDB400227AD3 /* PBXTextBookmark */ = { + CABF723C1223F64400227AD3 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; name = "ZIStoreButtonDemoViewController.m: 47"; rLen = 0; rLoc = 1448; rType = 0; - vrLen = 4049; - vrLoc = 0; + vrLen = 4050; + vrLoc = 41; }; - CAFFD36411F884B30097DE9A /* PBXTextBookmark */ = { + CABF723D1223F64400227AD3 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */; - name = "ZIStoreButton.m: 8"; + fRef = CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */; + name = "ZIStoreButton.h: 8"; rLen = 0; rLoc = 145; rType = 0; - vrLen = 3658; + vrLen = 892; vrLoc = 0; }; - CAFFD36511F884B30097DE9A /* PBXTextBookmark */ = { + CABF725F1223FAE200227AD3 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */; - name = "ZIStoreButton.h: 8"; + fRef = CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */; + name = "ZIStoreButton.m: 158"; + rLen = 0; + rLoc = 6147; + rType = 0; + vrLen = 2467; + vrLoc = 3734; + }; + CABF72671223FAF200227AD3 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */; + name = "ZIStoreButton.m: 151"; + rLen = 0; + rLoc = 6032; + rType = 0; + vrLen = 2467; + vrLoc = 3734; + }; + CAFFD36411F884B30097DE9A /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */; + name = "ZIStoreButton.m: 8"; rLen = 0; rLoc = 145; rType = 0; - vrLen = 892; + vrLen = 3658; vrLoc = 0; }; CAFFD36711F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */; name = "ZIStoreButtonDemoViewController.h: 9"; rLen = 593; rLoc = 165; rType = 0; vrLen = 933; vrLoc = 0; }; CAFFD36811F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */; name = "ZIStoreButtonDemoAppDelegate.m: 9"; rLen = 592; rLoc = 162; rType = 0; vrLen = 3341; vrLoc = 0; }; } diff --git a/ZIStoreButtonDemo.xcodeproj/project.pbxproj b/ZIStoreButtonDemo.xcodeproj/project.pbxproj index 73291e7..77a596f 100755 --- a/ZIStoreButtonDemo.xcodeproj/project.pbxproj +++ b/ZIStoreButtonDemo.xcodeproj/project.pbxproj @@ -1,268 +1,268 @@ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 45; objects = { /* Begin PBXBuildFile section */ 1D3623260D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 2899E5220DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib */; }; 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 28D7ACF80DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; }; CABCFBEC11F6725800D7D98A /* ZIStoreButton.m in Sources */ = {isa = PBXBuildFile; fileRef = CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */; }; CABCFBF811F6743000D7D98A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CABCFBF711F6743000D7D98A /* QuartzCore.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButtonDemoAppDelegate.h; sourceTree = "<group>"; }; 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZIStoreButtonDemoAppDelegate.m; sourceTree = "<group>"; }; 1D6058910D05DD3D006BFB54 /* ZIStoreButtonDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZIStoreButtonDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 2899E5210DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ZIStoreButtonDemoViewController.xib; sourceTree = "<group>"; }; 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; }; 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButtonDemoViewController.h; sourceTree = "<group>"; }; 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZIStoreButtonDemoViewController.m; sourceTree = "<group>"; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 32CA4F630368D1EE00C91783 /* ZIStoreButtonDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButtonDemo_Prefix.pch; sourceTree = "<group>"; }; 8D1107310486CEB800E47090 /* ZIStoreButtonDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ZIStoreButtonDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; }; CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButton.h; sourceTree = "<group>"; }; CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZIStoreButton.m; sourceTree = "<group>"; }; CABCFBF711F6743000D7D98A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, CABCFBF811F6743000D7D98A /* QuartzCore.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */, 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */, 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */, 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */, CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */, CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */, ); path = Classes; sourceTree = "<group>"; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 1D6058910D05DD3D006BFB54 /* ZIStoreButtonDemo.app */, ); name = Products; sourceTree = "<group>"; }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = CustomTemplate; sourceTree = "<group>"; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( 32CA4F630368D1EE00C91783 /* ZIStoreButtonDemo_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, ); name = "Other Sources"; sourceTree = "<group>"; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( 2899E5210DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib */, 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 8D1107310486CEB800E47090 /* ZIStoreButtonDemo-Info.plist */, ); name = Resources; sourceTree = "<group>"; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 1D30AB110D05D00D00671497 /* Foundation.framework */, 288765A40DF7441C002DB57D /* CoreGraphics.framework */, CABCFBF711F6743000D7D98A /* QuartzCore.framework */, ); name = Frameworks; sourceTree = "<group>"; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ZIStoreButtonDemo" */; buildPhases = ( 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = ZIStoreButtonDemo; productName = ZIStoreButtonDemo; productReference = 1D6058910D05DD3D006BFB54 /* ZIStoreButtonDemo.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ZIStoreButtonDemo" */; compatibilityVersion = "Xcode 3.1"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, Japanese, French, German, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 2899E5220DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m in Sources */, 28D7ACF80DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m in Sources */, CABCFBEC11F6725800D7D98A /* ZIStoreButton.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ZIStoreButtonDemo_Prefix.pch; INFOPLIST_FILE = "ZIStoreButtonDemo-Info.plist"; PRODUCT_NAME = ZIStoreButtonDemo; }; name = Debug; }; 1D6058950D05DD3E006BFB54 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ZIStoreButtonDemo_Prefix.pch; INFOPLIST_FILE = "ZIStoreButtonDemo-Info.plist"; PRODUCT_NAME = ZIStoreButtonDemo; VALIDATE_PRODUCT = YES; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; - SDKROOT = iphoneos4.0; + SDKROOT = iphoneos4.1; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PREBINDING = NO; SDKROOT = iphoneos4.0; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ZIStoreButtonDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( 1D6058940D05DD3E006BFB54 /* Debug */, 1D6058950D05DD3E006BFB54 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ZIStoreButtonDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; }
zueos/ZIStoreButton
247784d512f9b55d0b679541d44d9b6d05019913
Working Copy
diff --git a/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 b/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 index 23624ab..752e133 100644 --- a/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 +++ b/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 @@ -1,1129 +1,1129 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>ActivePerspectiveName</key> <string>Project</string> <key>AllowedModules</key> <array> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Name</key> <string>Groups and Files Outline View</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Name</key> <string>Editor</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCTaskListModule</string> <key>Name</key> <string>Task List</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCDetailModule</string> <key>Name</key> <string>File and Smart Group Detail Viewer</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXBuildResultsModule</string> <key>Name</key> <string>Detailed Build Results Viewer</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXProjectFindModule</string> <key>Name</key> <string>Project Batch Find Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCProjectFormatConflictsModule</string> <key>Name</key> <string>Project Format Conflicts List</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXBookmarksModule</string> <key>Name</key> <string>Bookmarks Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXClassBrowserModule</string> <key>Name</key> <string>Class Browser</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXCVSModule</string> <key>Name</key> <string>Source Code Control Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXDebugBreakpointsModule</string> <key>Name</key> <string>Debug Breakpoints Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCDockableInspector</string> <key>Name</key> <string>Inspector</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXOpenQuicklyModule</string> <key>Name</key> <string>Open Quickly Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXDebugSessionModule</string> <key>Name</key> <string>Debugger</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXDebugCLIModule</string> <key>Name</key> <string>Debug Console</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCSnapshotModule</string> <key>Name</key> <string>Snapshots Tool</string> </dict> </array> <key>BundlePath</key> <string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string> <key>Description</key> <string>DefaultDescriptionKey</string> <key>DockingSystemVisible</key> <false/> <key>Extension</key> <string>mode1v3</string> <key>FavBarConfig</key> <dict> <key>PBXProjectModuleGUID</key> <string>CABCFC0811F6743900D7D98A</string> <key>XCBarModuleItemNames</key> <dict/> <key>XCBarModuleItems</key> <array/> </dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>com.apple.perspectives.project.mode1v3</string> <key>MajorVersion</key> <integer>33</integer> <key>MinorVersion</key> <integer>0</integer> <key>Name</key> <string>Default</string> <key>Notifications</key> <array/> <key>OpenEditors</key> <array/> <key>PerspectiveWidths</key> <array> <integer>-1</integer> <integer>-1</integer> </array> <key>Perspectives</key> <array> <dict> <key>ChosenToolbarItems</key> <array> <string>active-combo-popup</string> <string>action</string> <string>NSToolbarFlexibleSpaceItem</string> <string>servicesModuledebug</string> <string>debugger-enable-breakpoints</string> <string>clean</string> <string>build-and-go</string> <string>com.apple.ide.PBXToolbarStopButton</string> <string>get-info</string> <string>NSToolbarFlexibleSpaceItem</string> <string>com.apple.pbx.toolbar.searchfield</string> </array> <key>ControllerClassBaseName</key> <string></string> <key>IconName</key> <string>WindowOfProjectWithEditor</string> <key>Identifier</key> <string>perspective.project</string> <key>IsVertical</key> <false/> <key>Layout</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> <array> <string>1C37FBAC04509CD000000102</string> <string>1C37FAAC04509CD000000102</string> <string>1C37FABC05509CD000000102</string> <string>1C37FABC05539CD112110102</string> <string>E2644B35053B69B200211256</string> <string>1C37FABC04509CD000100104</string> <string>1CC0EA4004350EF90044410B</string> <string>1CC0EA4004350EF90041110B</string> </array> <key>PBXProjectModuleGUID</key> <string>1CE0B1FE06471DED0097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Files</string> <key>PBXProjectStructureProvided</key> <string>yes</string> <key>PBXSmartGroupTreeModuleColumnData</key> <dict> <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> <array> <real>223</real> </array> <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> <array> <string>MainColumn</string> </array> </dict> <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> <dict> <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> <array> <string>29B97314FDCFA39411CA2CEA</string> <string>080E96DDFE201D6D7F000001</string> <string>1C37FABC05509CD000000102</string> </array> <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <array> <array> <integer>5</integer> <integer>1</integer> <integer>0</integer> </array> </array> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> <string>{{0, 0}, {223, 900}}</string> </dict> <key>PBXTopSmartGroupGIDs</key> <array/> <key>XCIncludePerspectivesSwitch</key> <true/> <key>XCSharingToken</key> <string>com.apple.Xcode.GFSharingToken</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {240, 918}}</string> <key>GroupTreeTableConfiguration</key> <array> <string>MainColumn</string> <real>223</real> </array> <key>RubberWindowFrame</key> <string>1046 250 1290 959 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Proportion</key> <string>240pt</string> </dict> <dict> <key>Dock</key> <array> <dict> <key>BecomeActive</key> <true/> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CE0B20306471E060097A5F4</string> <key>PBXProjectModuleLabel</key> <string>ZIStoreButtonDemoViewController.m</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CE0B20406471E060097A5F4</string> <key>PBXProjectModuleLabel</key> <string>ZIStoreButtonDemoViewController.m</string> <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>CA18DF1712236D5C0038778B</string> + <string>CABF71FB1223EDB400227AD3</string> <key>history</key> <array> <string>CAFFD36411F884B30097DE9A</string> <string>CAFFD36511F884B30097DE9A</string> <string>CAFFD36711F884B30097DE9A</string> <string>CAFFD36811F884B30097DE9A</string> <string>CA18DF1512236D5C0038778B</string> - <string>CA18DF1612236D5C0038778B</string> + <string>CA18DF1D12238BF60038778B</string> </array> </dict> <key>SplitCount</key> <string>1</string> </dict> <key>StatusBarVisibility</key> <true/> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {1045, 913}}</string> <key>RubberWindowFrame</key> <string>1046 250 1290 959 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>913pt</string> </dict> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CE0B20506471E060097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Detail</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 918}, {1045, 0}}</string> <key>RubberWindowFrame</key> <string>1046 250 1290 959 0 0 2560 1418 </string> </dict> <key>Module</key> <string>XCDetailModule</string> <key>Proportion</key> <string>0pt</string> </dict> </array> <key>Proportion</key> <string>1045pt</string> </dict> </array> <key>Name</key> <string>Project</string> <key>ServiceClasses</key> <array> <string>XCModuleDock</string> <string>PBXSmartGroupTreeModule</string> <string>XCModuleDock</string> <string>PBXNavigatorGroup</string> <string>XCDetailModule</string> </array> <key>TableOfContents</key> <array> - <string>CA18DF1812236D5C0038778B</string> + <string>CABF71FC1223EDB400227AD3</string> <string>1CE0B1FE06471DED0097A5F4</string> - <string>CA18DF1912236D5C0038778B</string> + <string>CABF71FD1223EDB400227AD3</string> <string>1CE0B20306471E060097A5F4</string> <string>1CE0B20506471E060097A5F4</string> </array> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.defaultV3</string> </dict> <dict> <key>ControllerClassBaseName</key> <string></string> <key>IconName</key> <string>WindowOfProject</string> <key>Identifier</key> <string>perspective.morph</string> <key>IsVertical</key> <integer>0</integer> <key>Layout</key> <array> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> <array> <string>1C37FBAC04509CD000000102</string> <string>1C37FAAC04509CD000000102</string> <string>1C08E77C0454961000C914BD</string> <string>1C37FABC05509CD000000102</string> <string>1C37FABC05539CD112110102</string> <string>E2644B35053B69B200211256</string> <string>1C37FABC04509CD000100104</string> <string>1CC0EA4004350EF90044410B</string> <string>1CC0EA4004350EF90041110B</string> </array> <key>PBXProjectModuleGUID</key> <string>11E0B1FE06471DED0097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Files</string> <key>PBXProjectStructureProvided</key> <string>yes</string> <key>PBXSmartGroupTreeModuleColumnData</key> <dict> <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> <array> <real>186</real> </array> <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> <array> <string>MainColumn</string> </array> </dict> <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> <dict> <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> <array> <string>29B97314FDCFA39411CA2CEA</string> <string>1C37FABC05509CD000000102</string> </array> <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <array> <array> <integer>0</integer> </array> </array> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> <string>{{0, 0}, {186, 337}}</string> </dict> <key>PBXTopSmartGroupGIDs</key> <array/> <key>XCIncludePerspectivesSwitch</key> <integer>1</integer> <key>XCSharingToken</key> <string>com.apple.Xcode.GFSharingToken</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {203, 355}}</string> <key>GroupTreeTableConfiguration</key> <array> <string>MainColumn</string> <real>186</real> </array> <key>RubberWindowFrame</key> <string>373 269 690 397 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Name</key> <string>Morph</string> <key>PreferredWidth</key> <integer>300</integer> <key>ServiceClasses</key> <array> <string>XCModuleDock</string> <string>PBXSmartGroupTreeModule</string> </array> <key>TableOfContents</key> <array> <string>11E0B1FE06471DED0097A5F4</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.default.shortV3</string> </dict> </array> <key>PerspectivesBarVisible</key> <false/> <key>ShelfIsVisible</key> <false/> <key>SourceDescription</key> <string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string> <key>StatusbarIsVisible</key> <true/> <key>TimeStamp</key> <real>0.0</real> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarDisplayMode</key> <integer>2</integer> <key>ToolbarIsVisible</key> <true/> <key>ToolbarSizeMode</key> <integer>2</integer> <key>Type</key> <string>Perspectives</string> <key>UpdateMessage</key> <string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?</string> <key>WindowJustification</key> <integer>5</integer> <key>WindowOrderList</key> <array> <string>CABCFBEF11F6742100D7D98A</string> <string>/Users/brandon/Documents/StoreButton/ZIStoreButton/ZIStoreButtonDemo.xcodeproj</string> </array> <key>WindowString</key> <string>1046 250 1290 959 0 0 2560 1418 </string> <key>WindowToolsV3</key> <array> <dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>windowTool.build</string> <key>IsVertical</key> <true/> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD0528F0623707200166675</string> <key>PBXProjectModuleLabel</key> <string></string> <key>StatusBarVisibility</key> <true/> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {500, 218}}</string> <key>RubberWindowFrame</key> <string>125 872 500 500 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>218pt</string> </dict> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>XCMainBuildResultsModuleGUID</string> <key>PBXProjectModuleLabel</key> <string>Build Results</string> <key>XCBuildResultsTrigger_Collapse</key> <integer>1021</integer> <key>XCBuildResultsTrigger_Open</key> <integer>1011</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 223}, {500, 236}}</string> <key>RubberWindowFrame</key> <string>125 872 500 500 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXBuildResultsModule</string> <key>Proportion</key> <string>236pt</string> </dict> </array> <key>Proportion</key> <string>459pt</string> </dict> </array> <key>Name</key> <string>Build Results</string> <key>ServiceClasses</key> <array> <string>PBXBuildResultsModule</string> </array> <key>StatusbarIsVisible</key> <true/> <key>TableOfContents</key> <array> <string>CABCFBEF11F6742100D7D98A</string> - <string>CA18DF1A12236D5C0038778B</string> + <string>CABF71FE1223EDB400227AD3</string> <string>1CD0528F0623707200166675</string> <string>XCMainBuildResultsModuleGUID</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.buildV3</string> <key>WindowContentMinSize</key> <string>486 300</string> <key>WindowString</key> <string>125 872 500 500 0 0 2560 1418 </string> <key>WindowToolGUID</key> <string>CABCFBEF11F6742100D7D98A</string> <key>WindowToolIsVisible</key> <false/> </dict> <dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>windowTool.debugger</string> <key>IsVertical</key> <true/> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>Debugger</key> <dict> <key>HorizontalSplitView</key> <dict> <key>_collapsingFrameDimension</key> <real>0.0</real> <key>_indexOfCollapsedView</key> <integer>0</integer> <key>_percentageOfCollapsedView</key> <real>0.0</real> <key>isCollapsed</key> <string>yes</string> <key>sizes</key> <array> <string>{{0, 0}, {316, 198}}</string> <string>{{316, 0}, {378, 198}}</string> </array> </dict> <key>VerticalSplitView</key> <dict> <key>_collapsingFrameDimension</key> <real>0.0</real> <key>_indexOfCollapsedView</key> <integer>0</integer> <key>_percentageOfCollapsedView</key> <real>0.0</real> <key>isCollapsed</key> <string>yes</string> <key>sizes</key> <array> <string>{{0, 0}, {694, 198}}</string> <string>{{0, 198}, {694, 183}}</string> </array> </dict> </dict> <key>LauncherConfigVersion</key> <string>8</string> <key>PBXProjectModuleGUID</key> <string>1C162984064C10D400B95A72</string> <key>PBXProjectModuleLabel</key> <string>Debug - GLUTExamples (Underwater)</string> </dict> <key>GeometryConfiguration</key> <dict> <key>DebugConsoleVisible</key> <string>None</string> <key>DebugConsoleWindowFrame</key> <string>{{200, 200}, {500, 300}}</string> <key>DebugSTDIOWindowFrame</key> <string>{{200, 200}, {500, 300}}</string> <key>Frame</key> <string>{{0, 0}, {694, 381}}</string> <key>PBXDebugSessionStackFrameViewKey</key> <dict> <key>DebugVariablesTableConfiguration</key> <array> <string>Name</string> <real>120</real> <string>Value</string> <real>85</real> <string>Summary</string> <real>148</real> </array> <key>Frame</key> <string>{{316, 0}, {378, 198}}</string> <key>RubberWindowFrame</key> <string>1104 774 694 422 0 0 2560 1418 </string> </dict> <key>RubberWindowFrame</key> <string>1104 774 694 422 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXDebugSessionModule</string> <key>Proportion</key> <string>381pt</string> </dict> </array> <key>Proportion</key> <string>381pt</string> </dict> </array> <key>Name</key> <string>Debugger</string> <key>ServiceClasses</key> <array> <string>PBXDebugSessionModule</string> </array> <key>StatusbarIsVisible</key> <true/> <key>TableOfContents</key> <array> <string>1CD10A99069EF8BA00B06720</string> <string>CAFFD2FD11F87EAF0097DE9A</string> <string>1C162984064C10D400B95A72</string> <string>CAFFD2FE11F87EAF0097DE9A</string> <string>CAFFD2FF11F87EAF0097DE9A</string> <string>CAFFD30011F87EAF0097DE9A</string> <string>CAFFD30111F87EAF0097DE9A</string> <string>CAFFD30211F87EAF0097DE9A</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.debugV3</string> <key>WindowString</key> <string>1104 774 694 422 0 0 2560 1418 </string> <key>WindowToolGUID</key> <string>1CD10A99069EF8BA00B06720</string> <key>WindowToolIsVisible</key> <false/> </dict> <dict> <key>Identifier</key> <string>windowTool.find</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CDD528C0622207200134675</string> <key>PBXProjectModuleLabel</key> <string>&lt;No Editor&gt;</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD0528D0623707200166675</string> </dict> <key>SplitCount</key> <string>1</string> </dict> <key>StatusBarVisibility</key> <integer>1</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {781, 167}}</string> <key>RubberWindowFrame</key> <string>62 385 781 470 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>781pt</string> </dict> </array> <key>Proportion</key> <string>50%</string> </dict> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD0528E0623707200166675</string> <key>PBXProjectModuleLabel</key> <string>Project Find</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{8, 0}, {773, 254}}</string> <key>RubberWindowFrame</key> <string>62 385 781 470 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXProjectFindModule</string> <key>Proportion</key> <string>50%</string> </dict> </array> <key>Proportion</key> <string>428pt</string> </dict> </array> <key>Name</key> <string>Project Find</string> <key>ServiceClasses</key> <array> <string>PBXProjectFindModule</string> </array> <key>StatusbarIsVisible</key> <integer>1</integer> <key>TableOfContents</key> <array> <string>1C530D57069F1CE1000CFCEE</string> <string>1C530D58069F1CE1000CFCEE</string> <string>1C530D59069F1CE1000CFCEE</string> <string>1CDD528C0622207200134675</string> <string>1C530D5A069F1CE1000CFCEE</string> <string>1CE0B1FE06471DED0097A5F4</string> <string>1CD0528E0623707200166675</string> </array> <key>WindowString</key> <string>62 385 781 470 0 0 1440 878 </string> <key>WindowToolGUID</key> <string>1C530D57069F1CE1000CFCEE</string> <key>WindowToolIsVisible</key> <integer>0</integer> </dict> <dict> <key>Identifier</key> <string>MENUSEPARATOR</string> </dict> <dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>windowTool.debuggerConsole</string> <key>IsVertical</key> <true/> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1C78EAAC065D492600B07095</string> <key>PBXProjectModuleLabel</key> <string>Debugger Console</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {650, 209}}</string> <key>RubberWindowFrame</key> <string>1104 946 650 250 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXDebugCLIModule</string> <key>Proportion</key> <string>209pt</string> </dict> </array> <key>Proportion</key> <string>209pt</string> </dict> </array> <key>Name</key> <string>Debugger Console</string> <key>ServiceClasses</key> <array> <string>PBXDebugCLIModule</string> </array> <key>StatusbarIsVisible</key> <true/> <key>TableOfContents</key> <array> <string>1C78EAAD065D492600B07095</string> <string>CAFFD30311F87EAF0097DE9A</string> <string>1C78EAAC065D492600B07095</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.consoleV3</string> <key>WindowString</key> <string>1104 946 650 250 0 0 2560 1418 </string> <key>WindowToolGUID</key> <string>1C78EAAD065D492600B07095</string> <key>WindowToolIsVisible</key> <false/> </dict> <dict> <key>Identifier</key> <string>windowTool.snapshots</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>Module</key> <string>XCSnapshotModule</string> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Name</key> <string>Snapshots</string> <key>ServiceClasses</key> <array> <string>XCSnapshotModule</string> </array> <key>StatusbarIsVisible</key> <string>Yes</string> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.snapshots</string> <key>WindowString</key> <string>315 824 300 550 0 0 1440 878 </string> <key>WindowToolIsVisible</key> <string>Yes</string> </dict> <dict> <key>Identifier</key> <string>windowTool.scm</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1C78EAB2065D492600B07095</string> <key>PBXProjectModuleLabel</key> <string>&lt;No Editor&gt;</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> <dict> <key>PBXProjectModuleGUID</key> <string>1C78EAB3065D492600B07095</string> </dict> <key>SplitCount</key> <string>1</string> </dict> <key>StatusBarVisibility</key> <integer>1</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {452, 0}}</string> <key>RubberWindowFrame</key> <string>743 379 452 308 0 0 1280 1002 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>0pt</string> </dict> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD052920623707200166675</string> <key>PBXProjectModuleLabel</key> <string>SCM</string> </dict> <key>GeometryConfiguration</key> <dict> <key>ConsoleFrame</key> <string>{{0, 259}, {452, 0}}</string> <key>Frame</key> <string>{{0, 7}, {452, 259}}</string> <key>RubberWindowFrame</key> <string>743 379 452 308 0 0 1280 1002 </string> <key>TableConfiguration</key> <array> <string>Status</string> <real>30</real> <string>FileName</string> <real>199</real> <string>Path</string> <real>197.0950012207031</real> </array> <key>TableFrame</key> <string>{{0, 0}, {452, 250}}</string> </dict> <key>Module</key> <string>PBXCVSModule</string> <key>Proportion</key> <string>262pt</string> </dict> </array> <key>Proportion</key> <string>266pt</string> </dict> </array> <key>Name</key> <string>SCM</string> <key>ServiceClasses</key> <array> <string>PBXCVSModule</string> </array> <key>StatusbarIsVisible</key> <integer>1</integer> <key>TableOfContents</key> <array> <string>1C78EAB4065D492600B07095</string> <string>1C78EAB5065D492600B07095</string> <string>1C78EAB2065D492600B07095</string> <string>1CD052920623707200166675</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.scm</string> <key>WindowString</key> <string>743 379 452 308 0 0 1280 1002 </string> </dict> <dict> <key>Identifier</key> <string>windowTool.breakpoints</string> <key>IsVertical</key> <integer>0</integer> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> <array> <string>1C77FABC04509CD000000102</string> </array> <key>PBXProjectModuleGUID</key> <string>1CE0B1FE06471DED0097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Files</string> <key>PBXProjectStructureProvided</key> <string>no</string> <key>PBXSmartGroupTreeModuleColumnData</key> <dict> <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> <array> <real>168</real> </array> <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> <array> <string>MainColumn</string> </array> </dict> <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> <dict> <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> <array> <string>1C77FABC04509CD000000102</string> </array> <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <array> <array> <integer>0</integer> </array> </array> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> <string>{{0, 0}, {168, 350}}</string> </dict> <key>PBXTopSmartGroupGIDs</key> <array/> <key>XCIncludePerspectivesSwitch</key> <integer>0</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {185, 368}}</string> <key>GroupTreeTableConfiguration</key> <array> <string>MainColumn</string> <real>168</real> </array> <key>RubberWindowFrame</key> <string>315 424 744 409 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Proportion</key> <string>185pt</string> </dict> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> diff --git a/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser b/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser index 7f764a0..accce23 100644 --- a/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser +++ b/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser @@ -1,292 +1,234 @@ // !$*UTF8*$! { 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{779, 0}"; sepNavVisRange = "{0, 1130}"; }; }; 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */ = { uiCtxt = { sepNavFolds = "{\n c = (\n {\n r = \"{1100, 236}\";\n s = 0;\n },\n {\n r = \"{1406, 446}\";\n s = 0;\n },\n {\n r = \"{1924, 351}\";\n s = 0;\n },\n {\n r = \"{2348, 165}\";\n s = 0;\n },\n {\n r = \"{2582, 205}\";\n s = 0;\n },\n {\n r = \"{2854, 118}\";\n s = 0;\n },\n {\n r = \"{3097, 140}\";\n s = 0;\n },\n {\n r = \"{3258, 74}\";\n s = 0;\n }\n );\n r = \"{0, 3341}\";\n s = 0;\n}"; sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{162, 592}"; sepNavVisRange = "{0, 1614}"; }; }; 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */ = { activeExec = 0; executables = ( CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */, ); }; 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{165, 593}"; sepNavVisRange = "{0, 933}"; }; }; 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */ = { uiCtxt = { sepNavFolds = "{\n c = (\n {\n r = \"{2522, 1009}\";\n s = 0;\n },\n {\n r = \"{3628, 115}\";\n s = 0;\n },\n {\n r = \"{3780, 155}\";\n s = 0;\n },\n {\n r = \"{3962, 83}\";\n s = 0;\n },\n {\n r = \"{4066, 22}\";\n s = 0;\n }\n );\n r = \"{0, 4096}\";\n s = 0;\n}"; sepNavIntBoundsRect = "{{0, 0}, {1698, 929}}"; sepNavSelRange = "{1448, 0}"; sepNavVisRange = "{0, 2691}"; }; }; 29B97313FDCFA39411CA2CEA /* Project object */ = { activeBuildConfigurationName = Debug; activeExecutable = CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */; activeSDKPreference = iphonesimulator4.0; activeTarget = 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */; addToTargets = ( 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */, ); breakpoints = ( ); codeSenseManager = CABCFBE811F671F800D7D98A /* Code sense */; executables = ( CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */, ); perUserDictionary = { PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, 806, 20, 48, 43, 43, 20, ); PBXFileTableDataSourceColumnsKey = ( PBXFileDataSource_FiletypeID, PBXFileDataSource_Filename_ColumnID, PBXFileDataSource_Built_ColumnID, PBXFileDataSource_ObjectSize_ColumnID, PBXFileDataSource_Errors_ColumnID, PBXFileDataSource_Warnings_ColumnID, PBXFileDataSource_Target_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 304311631; - PBXWorkspaceStateSaveDate = 304311631; + PBXPerProjectTemplateStateSaveDate = 304344499; + PBXWorkspaceStateSaveDate = 304344499; }; perUserProjectItems = { - CA18DF1512236D5C0038778B /* PBXTextBookmark */ = CA18DF1512236D5C0038778B /* PBXTextBookmark */; - CA18DF1612236D5C0038778B /* PBXTextBookmark */ = CA18DF1612236D5C0038778B /* PBXTextBookmark */; - CA18DF1712236D5C0038778B /* PBXTextBookmark */ = CA18DF1712236D5C0038778B /* PBXTextBookmark */; - CABCFCC711F6881300D7D98A = CABCFCC711F6881300D7D98A /* PBXTextBookmark */; - CABCFCC911F6881300D7D98A = CABCFCC911F6881300D7D98A /* PBXTextBookmark */; + CA18DF1512236D5C0038778B = CA18DF1512236D5C0038778B /* PBXTextBookmark */; + CA18DF1612236D5C0038778B = CA18DF1612236D5C0038778B /* PBXTextBookmark */; + CA18DF1D12238BF60038778B = CA18DF1D12238BF60038778B /* PBXTextBookmark */; + CABF71FB1223EDB400227AD3 /* PBXTextBookmark */ = CABF71FB1223EDB400227AD3 /* PBXTextBookmark */; CAFFD36411F884B30097DE9A = CAFFD36411F884B30097DE9A /* PBXTextBookmark */; CAFFD36511F884B30097DE9A = CAFFD36511F884B30097DE9A /* PBXTextBookmark */; - CAFFD36611F884B30097DE9A = CAFFD36611F884B30097DE9A /* PBXTextBookmark */; CAFFD36711F884B30097DE9A = CAFFD36711F884B30097DE9A /* PBXTextBookmark */; CAFFD36811F884B30097DE9A = CAFFD36811F884B30097DE9A /* PBXTextBookmark */; - CAFFD36D11F887F80097DE9A = CAFFD36D11F887F80097DE9A /* PBXTextBookmark */; - CAFFD36E11F887F80097DE9A = CAFFD36E11F887F80097DE9A /* PBXTextBookmark */; }; sourceControlManager = CABCFBE711F671F800D7D98A /* Source Control */; userBuildSettings = { }; }; CA18DF1512236D5C0038778B /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */; name = "ZIStoreButtonDemoAppDelegate.h: 25"; rLen = 0; rLoc = 779; rType = 0; vrLen = 1130; vrLoc = 0; }; CA18DF1612236D5C0038778B /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; name = "ZIStoreButtonDemoViewController.m: 22"; rLen = 0; rLoc = 704; rType = 0; vrLen = 4041; vrLoc = 0; }; - CA18DF1712236D5C0038778B /* PBXTextBookmark */ = { + CA18DF1D12238BF60038778B /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; name = "ZIStoreButtonDemoViewController.m: 47"; rLen = 0; rLoc = 1448; rType = 0; vrLen = 4049; vrLoc = 0; }; CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */ = { isa = PBXExecutable; activeArgIndices = ( ); argumentStrings = ( ); autoAttachOnCrash = 1; breakpointsEnabled = 1; configStateDict = { }; customDataFormattersEnabled = 1; dataTipCustomDataFormattersEnabled = 1; dataTipShowTypeColumn = 1; dataTipSortType = 0; debuggerPlugin = GDBDebugging; disassemblyDisplayState = 0; dylibVariantSuffix = ""; enableDebugStr = 1; environmentEntries = ( ); executableSystemSymbolLevel = 0; executableUserSymbolLevel = 0; libgmallocEnabled = 0; name = ZIStoreButtonDemo; savedGlobals = { }; showTypeColumn = 0; sourceDirectories = ( ); variableFormatDictionary = { }; }; CABCFBE711F671F800D7D98A /* Source Control */ = { isa = PBXSourceControlManager; fallbackIsa = XCSourceControlManager; isSCMEnabled = 0; scmConfiguration = { repositoryNamesForRoots = { "" = ""; }; }; }; CABCFBE811F671F800D7D98A /* Code sense */ = { isa = PBXCodeSenseManager; indexTemplatePath = ""; }; CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{145, 0}"; sepNavVisRange = "{0, 892}"; }; }; CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */ = { uiCtxt = { sepNavFolds = "{\n c = (\n {\n r = \"{3771, 2332}\";\n s = 0;\n },\n {\n r = \"{6149, 51}\";\n s = 0;\n },\n {\n r = \"{6241, 118}\";\n s = 0;\n },\n {\n r = \"{6437, 35}\";\n s = 0;\n },\n {\n r = \"{6493, 22}\";\n s = 0;\n }\n );\n r = \"{0, 6524}\";\n s = 0;\n}"; sepNavIntBoundsRect = "{{0, 0}, {1236, 1012}}"; sepNavSelRange = "{145, 0}"; sepNavVisRange = "{0, 3658}"; }; }; - CABCFCC711F6881300D7D98A /* PBXTextBookmark */ = { + CABF71FB1223EDB400227AD3 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = CABCFCC811F6881300D7D98A /* UIButton.h */; - name = "UIButton.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 4639; - vrLoc = 90; - }; - CABCFCC811F6881300D7D98A /* UIButton.h */ = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = UIButton.h; - path = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIButton.h; - sourceTree = "<absolute>"; - }; - CABCFCC911F6881300D7D98A /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = CABCFCCA11F6881300D7D98A /* UIControl.h */; - name = "UIControl.h: 1"; + fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; + name = "ZIStoreButtonDemoViewController.m: 47"; rLen = 0; - rLoc = 0; + rLoc = 1448; rType = 0; - vrLen = 3155; - vrLoc = 29; - }; - CABCFCCA11F6881300D7D98A /* UIControl.h */ = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = UIControl.h; - path = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIControl.h; - sourceTree = "<absolute>"; + vrLen = 4049; + vrLoc = 0; }; CAFFD36411F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */; name = "ZIStoreButton.m: 8"; rLen = 0; rLoc = 145; rType = 0; vrLen = 3658; vrLoc = 0; }; CAFFD36511F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */; name = "ZIStoreButton.h: 8"; rLen = 0; rLoc = 145; rType = 0; vrLen = 892; vrLoc = 0; }; - CAFFD36611F884B30097DE9A /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; - name = "ZIStoreButtonDemoViewController.m: 22"; - rLen = 0; - rLoc = 704; - rType = 0; - vrLen = 4041; - vrLoc = 0; - }; CAFFD36711F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */; name = "ZIStoreButtonDemoViewController.h: 9"; rLen = 593; rLoc = 165; rType = 0; vrLen = 933; vrLoc = 0; }; CAFFD36811F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */; name = "ZIStoreButtonDemoAppDelegate.m: 9"; rLen = 592; rLoc = 162; rType = 0; vrLen = 3341; vrLoc = 0; }; - CAFFD36D11F887F80097DE9A /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */; - name = "ZIStoreButtonDemoAppDelegate.h: 9"; - rLen = 606; - rLoc = 162; - rType = 0; - vrLen = 1130; - vrLoc = 0; - }; - CAFFD36E11F887F80097DE9A /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */; - name = "ZIStoreButtonDemoAppDelegate.h: 25"; - rLen = 0; - rLoc = 779; - rType = 0; - vrLen = 1130; - vrLoc = 0; - }; } diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo.dep b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo.dep index 20af78f..03648aa 100644 --- a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo.dep +++ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo.dep @@ -1,12 +1,24 @@ +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 56684 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o +ffffffffffffffffffffffffffffffff ba62166c5bb5a045434c899f2a96061c ffffffffffffffffffffffffffffffff 46344 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 49036 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 6312 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o +ffffffffffffffffffffffffffffffff 8f89644f75f46263e30044fd5396f6ce ffffffffffffffffffffffffffffffff 102 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM +ffffffffffffffffffffffffffffffff 4117972141e3bff40593934e4ce02d76 ffffffffffffffffffffffffffffffff 238 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +ffffffffffffffffffffffffffffffff c911226e1ebd9eb88805f67aba5c6003 ffffffffffffffffffffffffffffffff 33688 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-deirspmnubhpkycaqsmbvivqazlf/ZIStoreButtonDemo_Prefix.pch.gch +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 795 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 1143 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 8 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 637 /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist ffffffffffffffffffffffffffffffff ebcff396169973d54676391b2a82c9b3 ffffffffffffffffffffffffffffffff 49036 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o ffffffffffffffffffffffffffffffff 3a1facf008b298b6c368446bd67b5c09 ffffffffffffffffffffffffffffffff 102 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM ffffffffffffffffffffffffffffffff cc8e20f57b2411221ca97c08195fcfc9 ffffffffffffffffffffffffffffffff 238 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app ffffffffffffffffffffffffffffffff 20231bdbb895e24fb4d971f9f8995467 ffffffffffffffffffffffffffffffff 33688 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo ffffffffffffffffffffffffffffffff 85427a6e95d5920c0f5392a0f786ea93 ffffffffffffffffffffffffffffffff 46344 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o ffffffffffffffffffffffffffffffff 6ee8d47b1b3cf9af35c774d3f8a8f044 ffffffffffffffffffffffffffffffff 56684 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o de262bf8812c5ab26061f5ffa91b56c8 c7684a4c49094266e6178deba2c90092 ffffffffffffffffffffffffffffffff 6312 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o 000000004bbfb48c0000000000001d60 de262bf8cad1a4dc6061f5ffa91b430a ffffffffffffffffffffffffffffffff 15232016 /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch 000000004c463a590000000000001a6d 4377dc436b53874a2b6101362d0d0f2c ffffffffffffffffffffffffffffffff 795 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib 000000004c463a590000000000004ea1 d3e04376d9c3ced44eb8c017826d1086 ffffffffffffffffffffffffffffffff 1143 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib 00000000000000000000000000000000 fb89d27dd399bf913fd0ccbd14d98fb1 ffffffffffffffffffffffffffffffff 8 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo 00000000000000000000000000000000 fb89d27dd399bf913fd0ccbd14d98fb1 ffffffffffffffffffffffffffffffff 637 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/build-state.dat b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/build-state.dat index edb1b27..0ef4295 100644 --- a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/build-state.dat +++ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/build-state.dat @@ -1,300 +1,450 @@ TZIStoreButtonDemo v7 r0 t301499116.954070 cCheck dependencies cProcessInfoPlistFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist ZIStoreButtonDemo-Info.plist cCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib cCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib cProcessPCH /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch ZIStoreButtonDemo_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2 cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o /Users/brandon/Documents/ZIStoreButtonDemo/main.m normal i386 objective-c com.apple.compilers.gcc.4_2 cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m normal i386 objective-c com.apple.compilers.gcc.4_2 cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m normal i386 objective-c com.apple.compilers.gcc.4_2 cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m normal i386 objective-c com.apple.compilers.gcc.4_2 cLd /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo normal i386 cGenerateDSYMFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo cTouch /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -c000000004C1771EE0000000000000132 -t1276604910 +c000000004C494D410000000000000132 +t1279872321 s306 N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics c000000004BFDFE39000000000027C7D0 t1274936889 s2607056 N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation c000000004BFDFE7C000000000029D5D0 t1274936956 s2741712 N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h c000000004BFDFE6E0000000000001466 t1274936942 s5222 N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h c000000004C04586B00000000000000C4 t1275353195 s196 N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/QuartzCore.framework/QuartzCore c000000004C0458E90000000000151D30 t1275353321 s1383728 N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h c000000004C0470BB00000000000009CD t1275359419 s2509 N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit c000000004C0471620000000001D47210 t1275359586 s30700048 +N/Users/brandon/Documents/StoreButton/ZIStoreButton/Classes/ZIStoreButton.h +c000000004C732FA6000000000000037C +t1282617254 +s892 +i<UIKit/UIKit.h> +i<QuartzCore/QuartzCore.h> + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/Classes/ZIStoreButton.m +c000000004C732FA6000000000000183D +t1282617254 +s6205 +i"ZIStoreButton.h" + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/Classes/ZIStoreButtonDemoAppDelegate.h +c000000004C732FA6000000000000046A +t1282617254 +s1130 +i<UIKit/UIKit.h> + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/Classes/ZIStoreButtonDemoAppDelegate.m +c000000004C732FA60000000000000D0D +t1282617254 +s3341 +i"ZIStoreButtonDemoAppDelegate.h" +i"ZIStoreButtonDemoViewController.h" + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/Classes/ZIStoreButtonDemoViewController.h +c000000004C732FA600000000000003A5 +t1282617254 +s933 +i<UIKit/UIKit.h> +i<QuartzCore/QuartzCore.h> + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/Classes/ZIStoreButtonDemoViewController.m +c000000004C7335DA0000000000001000 +t1282618842 +s4096 +i"ZIStoreButtonDemoViewController.h" +i"ZIStoreButton.h" +i<QuartzCore/QuartzCore.h> + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/MainWindow.xib +c000000004C732FA60000000000004EA1 +t1282617254 +s20129 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/ZIStoreButtonDemoViewController.xib +c000000004C732FA60000000000001A6D +t1282617254 +s6765 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/ZIStoreButtonDemo_Prefix.pch +c000000004C732FA600000000000000CB +t1282617254 +s203 +i<Foundation/Foundation.h> +i<UIKit/UIKit.h> + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +t1282617255 +s238 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM +t1282617254 +s102 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist +t1282617255 +s637 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib +t1282617255 +s1143 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo +t1282617255 +s8 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +t1282617255 +s33688 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib +t1282617255 +s795 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o +t1282617255 +s56684 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemo.LinkFileList +c000000004C732FA70000000000000284 +t1282617255 +s644 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o +t1282617255 +s49036 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o +t1282617255 +s46344 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o +t1282617255 +s6312 + +N/Users/brandon/Documents/StoreButton/ZIStoreButton/main.m +c000000004C732FA7000000000000016F +t1282617255 +s367 +i<UIKit/UIKit.h> + N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.h c000000004C484D05000000000000037C t1279806725 s892 i<UIKit/UIKit.h> i<QuartzCore/QuartzCore.h> N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m c000000004C484D11000000000000197C t1279806737 s6524 i"ZIStoreButton.h" N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.h c000000004C484D31000000000000046A t1279806769 s1130 i<UIKit/UIKit.h> N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m c000000004C484D290000000000000D0D t1279806761 s3341 i"ZIStoreButtonDemoAppDelegate.h" i"ZIStoreButtonDemoViewController.h" N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.h c000000004C484D1F00000000000003A5 t1279806751 s933 i<UIKit/UIKit.h> i<QuartzCore/QuartzCore.h> N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m c000000004C484CEF0000000000000FF8 t1279806703 s4088 i"ZIStoreButtonDemoViewController.h" i"ZIStoreButton.h" i<QuartzCore/QuartzCore.h> N/Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib c000000004C463A590000000000004EA1 t1279670873 s20129 N/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib c000000004C463A590000000000001A6D t1279670873 s6765 N/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo_Prefix.pch c000000004C463A5900000000000000CB t1279670873 s203 i<Foundation/Foundation.h> i<UIKit/UIKit.h> N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app t1279806316 s238 N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM t1279806316 s102 N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist t1279805218 s637 N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib t1279805219 s1143 N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo t1279805218 s8 N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo t1279806316 s33688 N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib t1279805219 s795 N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o t1279805278 s56684 N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemo.LinkFileList c000000004C4847220000000000000284 t1279805218 s644 N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o t1279805219 s49036 N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o t1279806316 s46344 N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o t1279805219 s6312 N/Users/brandon/Documents/ZIStoreButtonDemo/main.m c000000004C463A59000000000000016F t1279670873 s367 i<UIKit/UIKit.h> N/var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch t1279671480 s15232016 +N/var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-deirspmnubhpkycaqsmbvivqazlf/ZIStoreButtonDemo_Prefix.pch.gch +t2 +s0 + NZIStoreButtonDemo-Info.plist -c000000004C463A59000000000000038D -t1279670873 +c000000004C732FA6000000000000038D +t1282617254 s909 CCheck dependencies r0 lSLF07#2@18"Check dependencies301499116#301499116#0(0"0(0#1#0"8631221696#0"0# +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o /Users/brandon/Documents/StoreButton/ZIStoreButton/Classes/ZIStoreButton.m normal i386 objective-c com.apple.compilers.gcc.4_2 +r0 + CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m normal i386 objective-c com.apple.compilers.gcc.4_2 s301498078.258379 e301498078.456289 r1 xCompileC xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o x/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m xnormal xi386 xobjective-c xcom.apple.compilers.gcc.4_2 lSLF07#2@74"Compile /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m301498078#301498078#0(0"0(0#0#66"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m8630914880#2171" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o 0# +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o /Users/brandon/Documents/StoreButton/ZIStoreButton/Classes/ZIStoreButtonDemoAppDelegate.m normal i386 objective-c com.apple.compilers.gcc.4_2 +r0 + CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m normal i386 objective-c com.apple.compilers.gcc.4_2 s301498019.226548 e301498019.325151 r1 xCompileC xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o x/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m xnormal xi386 xobjective-c xcom.apple.compilers.gcc.4_2 lSLF07#2@89"Compile /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m301498019#301498019#0(0"0(0#0#81"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m8632513120#2201" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o 0# +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o /Users/brandon/Documents/StoreButton/ZIStoreButton/Classes/ZIStoreButtonDemoViewController.m normal i386 objective-c com.apple.compilers.gcc.4_2 +r0 + CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m normal i386 objective-c com.apple.compilers.gcc.4_2 s301499116.741516 e301499116.920729 r1 xCompileC xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o x/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m xnormal xi386 xobjective-c xcom.apple.compilers.gcc.4_2 lSLF07#2@92"Compile /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301499116#301499116#0(0"0(0#0#84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m8630713440#2207" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o 0# +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o /Users/brandon/Documents/StoreButton/ZIStoreButton/main.m normal i386 objective-c com.apple.compilers.gcc.4_2 +r0 + CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o /Users/brandon/Documents/ZIStoreButtonDemo/main.m normal i386 objective-c com.apple.compilers.gcc.4_2 s301498019.225772 e301498019.324979 r1 xCompileC xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o x/Users/brandon/Documents/ZIStoreButtonDemo/main.m xnormal xi386 xobjective-c xcom.apple.compilers.gcc.4_2 lSLF07#2@57"Compile /Users/brandon/Documents/ZIStoreButtonDemo/main.m301498019#301498019#0(0"0(0#0#49"/Users/brandon/Documents/ZIStoreButtonDemo/main.m8632742592#2145" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/main.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o 0# +CCompileXIB /Users/brandon/Documents/StoreButton/ZIStoreButton/MainWindow.xib +r0 + +CCompileXIB /Users/brandon/Documents/StoreButton/ZIStoreButton/ZIStoreButtonDemoViewController.xib +r0 + CCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib s301498018.903372 e301498019.225599 r1 xCompileXIB x/Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib lSLF07#2@25"CompileXIB MainWindow.xib301498018#301498019#0(0"0(0#0#57"/Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib8632291360#592" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv IBC_MINIMUM_COMPATIBILITY_VERSION 4.0 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib /Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk 0# CCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib s301498018.903882 e301498019.216301 r1 xCompileXIB x/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib lSLF07#2@46"CompileXIB ZIStoreButtonDemoViewController.xib301498018#301498019#0(0"0(0#0#78"/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib8632145344#634" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv IBC_MINIMUM_COMPATIBILITY_VERSION 4.0 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk 0# +CGenerateDSYMFile /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +r0 + CGenerateDSYMFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo s301499116.938235 e301499116.952099 r1 xGenerateDSYMFile x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo lSLF07#2@139"GenerateDSYMFile build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo301499116#301499116#0(0"0(0#0#110"/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo8632449632#425" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/dsymutil /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo -o /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM 0# +CLd /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo normal i386 +r0 + CLd /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo normal i386 s301499116.920802 e301499116.938157 r1 xLd x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo xnormal xi386 lSLF07#2@115"Link /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo301499116#301499116#0(0"0(0#0#0"8632677344#992" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -L/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -filelist /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemo.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -o /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo 0# +CProcessInfoPlistFile /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist ZIStoreButtonDemo-Info.plist +r0 + CProcessInfoPlistFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist ZIStoreButtonDemo-Info.plist s301498018.900152 e301498018.903316 r1 xProcessInfoPlistFile x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist xZIStoreButtonDemo-Info.plist lSLF07#2@36"Process ZIStoreButtonDemo-Info.plist301498018#301498018#0(0"0(0#0#71"/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo-Info.plist8634432512#521" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" builtin-infoPlistUtility ZIStoreButtonDemo-Info.plist -genpkginfo /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -o /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist 0# CProcessPCH /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch ZIStoreButtonDemo_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2 s301364280.086918 e301364280.568132 r1 xProcessPCH x/var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch xZIStoreButtonDemo_Prefix.pch xnormal xi386 xobjective-c xcom.apple.compilers.gcc.4_2 lSLF07#2@39"Precompile ZIStoreButtonDemo_Prefix.pch301364280#301364280#0(0"0(0#0#71"/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo_Prefix.pch8820361984#2023" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -c /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo_Prefix.pch -o /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch 0# +CProcessPCH /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-deirspmnubhpkycaqsmbvivqazlf/ZIStoreButtonDemo_Prefix.pch.gch ZIStoreButtonDemo_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2 +r0 + +CTouch /Users/brandon/Documents/StoreButton/ZIStoreButton/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +r0 + CTouch /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app s301499116.952165 e301499116.954047 r1 xTouch x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app lSLF07#2@98"Touch /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app301499116#301499116#0(0"0(0#0#0"8632332800#296" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /usr/bin/touch -c /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app 0# diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree index d02dc21..33fbae4 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree index e34aee0..70cbbdb 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree index 44f9d3a..6992dce 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree index addf293..611afc3 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header index f5b1b1a..6ee6a97 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree index 3934b4f..17faa72 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control index c18422b..3b29489 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings index 2150f03..18f172d 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols index 9f47e96..6949a8a 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols differ
zueos/ZIStoreButton
532cc5a2339aaaa7cacebeb4d04141ee9e73443f
Working Copy
diff --git a/Classes/ZIStoreButtonDemoViewController.m b/Classes/ZIStoreButtonDemoViewController.m index 05401a1..687e764 100644 --- a/Classes/ZIStoreButtonDemoViewController.m +++ b/Classes/ZIStoreButtonDemoViewController.m @@ -1,118 +1,118 @@ /* // ZIStoreButtonDemoViewController.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. */ /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButtonDemoViewController.h" #import "ZIStoreButton.h" #import <QuartzCore/QuartzCore.h> @implementation ZIStoreButtonDemoViewController - (void)viewDidLoad { [super viewDidLoad]; ZIStoreButton *button = [[ZIStoreButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 22.0)]; [button setTitle:@"$0.99" forState:UIControlStateNormal]; button.center = self.view.center; CAGradientLayer *bgLayer = [self backgroundLayer]; bgLayer.frame = self.view.bounds; [self.view.layer addSublayer:bgLayer]; [self.view addSubview:button]; UILabel *titleLab = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 10.0, 320.0, 35.0)]; titleLab.backgroundColor = [UIColor clearColor]; - titleLab.text = @"ZIStoreButton"; + titleLab.text = @"ZIStoreButton Control"; titleLab.font = [UIFont systemFontOfSize:24.0]; titleLab.textAlignment = UITextAlignmentCenter; titleLab.shadowColor = [UIColor colorWithWhite:0.98 alpha:1.0]; titleLab.shadowOffset = CGSizeMake(0.0, 0.75); titleLab.textColor = [UIColor colorWithWhite:0.50 alpha:1.0]; [self.view addSubview:titleLab]; UILabel *detailLab = [[UILabel alloc] initWithFrame:CGRectMake(10.0, 55.0, 300.0, 120.0)]; detailLab.backgroundColor = [UIColor clearColor]; detailLab.numberOfLines = 7; detailLab.text = @" This is a UIButton subclass that use's Core Animation Layers to present itself. A CAAnimation is rendered using the keypath for the 'colors' property of the CAGradeintLayer.\n\n Not a single image resource is ever used to render any part of the button."; detailLab.font = [UIFont systemFontOfSize:13.0]; detailLab.shadowColor = [UIColor colorWithWhite:0.98 alpha:1.0]; detailLab.shadowOffset = CGSizeMake(0.0, 1.0); detailLab.textColor = [UIColor colorWithWhite:0.50 alpha:1.0]; [self.view addSubview:detailLab]; } - (CAGradientLayer*) backgroundLayer { UIColor *colorOne = [UIColor colorWithWhite:0.9 alpha:1.0]; UIColor *colorTwo = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.85 alpha:1.0]; UIColor *colorThree = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.7 alpha:1.0]; UIColor *colorFour = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.4 alpha:1.0]; NSArray *colors = [NSArray arrayWithObjects:(id)colorOne.CGColor, colorTwo.CGColor, colorThree.CGColor, colorFour.CGColor, nil]; NSNumber *stopOne = [NSNumber numberWithFloat:0.0]; NSNumber *stopTwo = [NSNumber numberWithFloat:0.02]; NSNumber *stopThree = [NSNumber numberWithFloat:0.99]; NSNumber *stopFour = [NSNumber numberWithFloat:1.0]; NSArray *locations = [NSArray arrayWithObjects:stopOne, stopTwo, stopThree, stopFour, nil]; CAGradientLayer *headerLayer = [CAGradientLayer layer]; //headerLayer.frame = CGRectMake(0.0, 0.0, 320.0, 77.0); headerLayer.colors = colors; headerLayer.locations = locations; return headerLayer; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end diff --git a/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 b/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 index 61e42b5..23624ab 100644 --- a/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 +++ b/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 @@ -1,1135 +1,1129 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>ActivePerspectiveName</key> <string>Project</string> <key>AllowedModules</key> <array> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Name</key> <string>Groups and Files Outline View</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Name</key> <string>Editor</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCTaskListModule</string> <key>Name</key> <string>Task List</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCDetailModule</string> <key>Name</key> <string>File and Smart Group Detail Viewer</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXBuildResultsModule</string> <key>Name</key> <string>Detailed Build Results Viewer</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXProjectFindModule</string> <key>Name</key> <string>Project Batch Find Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCProjectFormatConflictsModule</string> <key>Name</key> <string>Project Format Conflicts List</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXBookmarksModule</string> <key>Name</key> <string>Bookmarks Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXClassBrowserModule</string> <key>Name</key> <string>Class Browser</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXCVSModule</string> <key>Name</key> <string>Source Code Control Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXDebugBreakpointsModule</string> <key>Name</key> <string>Debug Breakpoints Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCDockableInspector</string> <key>Name</key> <string>Inspector</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>PBXOpenQuicklyModule</string> <key>Name</key> <string>Open Quickly Tool</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXDebugSessionModule</string> <key>Name</key> <string>Debugger</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>1</string> <key>Module</key> <string>PBXDebugCLIModule</string> <key>Name</key> <string>Debug Console</string> </dict> <dict> <key>BundleLoadPath</key> <string></string> <key>MaxInstances</key> <string>n</string> <key>Module</key> <string>XCSnapshotModule</string> <key>Name</key> <string>Snapshots Tool</string> </dict> </array> <key>BundlePath</key> <string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string> <key>Description</key> <string>DefaultDescriptionKey</string> <key>DockingSystemVisible</key> <false/> <key>Extension</key> <string>mode1v3</string> <key>FavBarConfig</key> <dict> <key>PBXProjectModuleGUID</key> <string>CABCFC0811F6743900D7D98A</string> <key>XCBarModuleItemNames</key> <dict/> <key>XCBarModuleItems</key> <array/> </dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>com.apple.perspectives.project.mode1v3</string> <key>MajorVersion</key> <integer>33</integer> <key>MinorVersion</key> <integer>0</integer> <key>Name</key> <string>Default</string> <key>Notifications</key> <array/> <key>OpenEditors</key> <array/> <key>PerspectiveWidths</key> <array> <integer>-1</integer> <integer>-1</integer> </array> <key>Perspectives</key> <array> <dict> <key>ChosenToolbarItems</key> <array> <string>active-combo-popup</string> <string>action</string> <string>NSToolbarFlexibleSpaceItem</string> <string>servicesModuledebug</string> <string>debugger-enable-breakpoints</string> <string>clean</string> <string>build-and-go</string> <string>com.apple.ide.PBXToolbarStopButton</string> <string>get-info</string> <string>NSToolbarFlexibleSpaceItem</string> <string>com.apple.pbx.toolbar.searchfield</string> </array> <key>ControllerClassBaseName</key> <string></string> <key>IconName</key> <string>WindowOfProjectWithEditor</string> <key>Identifier</key> <string>perspective.project</string> <key>IsVertical</key> <false/> <key>Layout</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> <array> <string>1C37FBAC04509CD000000102</string> <string>1C37FAAC04509CD000000102</string> <string>1C37FABC05509CD000000102</string> <string>1C37FABC05539CD112110102</string> <string>E2644B35053B69B200211256</string> <string>1C37FABC04509CD000100104</string> <string>1CC0EA4004350EF90044410B</string> <string>1CC0EA4004350EF90041110B</string> </array> <key>PBXProjectModuleGUID</key> <string>1CE0B1FE06471DED0097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Files</string> <key>PBXProjectStructureProvided</key> <string>yes</string> <key>PBXSmartGroupTreeModuleColumnData</key> <dict> <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> <array> <real>223</real> </array> <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> <array> <string>MainColumn</string> </array> </dict> <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> <dict> <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> <array> <string>29B97314FDCFA39411CA2CEA</string> <string>080E96DDFE201D6D7F000001</string> <string>1C37FABC05509CD000000102</string> </array> <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <array> <array> - <integer>2</integer> + <integer>5</integer> <integer>1</integer> <integer>0</integer> </array> </array> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> <string>{{0, 0}, {223, 900}}</string> </dict> <key>PBXTopSmartGroupGIDs</key> <array/> <key>XCIncludePerspectivesSwitch</key> <true/> <key>XCSharingToken</key> <string>com.apple.Xcode.GFSharingToken</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {240, 918}}</string> <key>GroupTreeTableConfiguration</key> <array> <string>MainColumn</string> <real>223</real> </array> <key>RubberWindowFrame</key> <string>1046 250 1290 959 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Proportion</key> <string>240pt</string> </dict> <dict> <key>Dock</key> <array> <dict> <key>BecomeActive</key> <true/> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CE0B20306471E060097A5F4</string> <key>PBXProjectModuleLabel</key> - <string>ZIStoreButtonDemoAppDelegate.h</string> + <string>ZIStoreButtonDemoViewController.m</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CE0B20406471E060097A5F4</string> <key>PBXProjectModuleLabel</key> - <string>ZIStoreButtonDemoAppDelegate.h</string> + <string>ZIStoreButtonDemoViewController.m</string> <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>CAFFD36E11F887F80097DE9A</string> + <string>CA18DF1712236D5C0038778B</string> <key>history</key> <array> - <string>CABCFCC711F6881300D7D98A</string> - <string>CABCFCC911F6881300D7D98A</string> <string>CAFFD36411F884B30097DE9A</string> <string>CAFFD36511F884B30097DE9A</string> - <string>CAFFD36611F884B30097DE9A</string> <string>CAFFD36711F884B30097DE9A</string> <string>CAFFD36811F884B30097DE9A</string> - <string>CAFFD36D11F887F80097DE9A</string> + <string>CA18DF1512236D5C0038778B</string> + <string>CA18DF1612236D5C0038778B</string> </array> </dict> <key>SplitCount</key> <string>1</string> </dict> <key>StatusBarVisibility</key> <true/> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {1045, 913}}</string> <key>RubberWindowFrame</key> <string>1046 250 1290 959 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>913pt</string> </dict> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CE0B20506471E060097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Detail</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 918}, {1045, 0}}</string> <key>RubberWindowFrame</key> <string>1046 250 1290 959 0 0 2560 1418 </string> </dict> <key>Module</key> <string>XCDetailModule</string> <key>Proportion</key> <string>0pt</string> </dict> </array> <key>Proportion</key> <string>1045pt</string> </dict> </array> <key>Name</key> <string>Project</string> <key>ServiceClasses</key> <array> <string>XCModuleDock</string> <string>PBXSmartGroupTreeModule</string> <string>XCModuleDock</string> <string>PBXNavigatorGroup</string> <string>XCDetailModule</string> </array> <key>TableOfContents</key> <array> - <string>CAFFD2F311F87DCC0097DE9A</string> + <string>CA18DF1812236D5C0038778B</string> <string>1CE0B1FE06471DED0097A5F4</string> - <string>CAFFD2F411F87DCC0097DE9A</string> + <string>CA18DF1912236D5C0038778B</string> <string>1CE0B20306471E060097A5F4</string> <string>1CE0B20506471E060097A5F4</string> </array> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.defaultV3</string> </dict> <dict> <key>ControllerClassBaseName</key> <string></string> <key>IconName</key> <string>WindowOfProject</string> <key>Identifier</key> <string>perspective.morph</string> <key>IsVertical</key> <integer>0</integer> <key>Layout</key> <array> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> <array> <string>1C37FBAC04509CD000000102</string> <string>1C37FAAC04509CD000000102</string> <string>1C08E77C0454961000C914BD</string> <string>1C37FABC05509CD000000102</string> <string>1C37FABC05539CD112110102</string> <string>E2644B35053B69B200211256</string> <string>1C37FABC04509CD000100104</string> <string>1CC0EA4004350EF90044410B</string> <string>1CC0EA4004350EF90041110B</string> </array> <key>PBXProjectModuleGUID</key> <string>11E0B1FE06471DED0097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Files</string> <key>PBXProjectStructureProvided</key> <string>yes</string> <key>PBXSmartGroupTreeModuleColumnData</key> <dict> <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> <array> <real>186</real> </array> <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> <array> <string>MainColumn</string> </array> </dict> <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> <dict> <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> <array> <string>29B97314FDCFA39411CA2CEA</string> <string>1C37FABC05509CD000000102</string> </array> <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <array> <array> <integer>0</integer> </array> </array> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> <string>{{0, 0}, {186, 337}}</string> </dict> <key>PBXTopSmartGroupGIDs</key> <array/> <key>XCIncludePerspectivesSwitch</key> <integer>1</integer> <key>XCSharingToken</key> <string>com.apple.Xcode.GFSharingToken</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {203, 355}}</string> <key>GroupTreeTableConfiguration</key> <array> <string>MainColumn</string> <real>186</real> </array> <key>RubberWindowFrame</key> <string>373 269 690 397 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Name</key> <string>Morph</string> <key>PreferredWidth</key> <integer>300</integer> <key>ServiceClasses</key> <array> <string>XCModuleDock</string> <string>PBXSmartGroupTreeModule</string> </array> <key>TableOfContents</key> <array> <string>11E0B1FE06471DED0097A5F4</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.default.shortV3</string> </dict> </array> <key>PerspectivesBarVisible</key> <false/> <key>ShelfIsVisible</key> <false/> <key>SourceDescription</key> <string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string> <key>StatusbarIsVisible</key> <true/> <key>TimeStamp</key> <real>0.0</real> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarDisplayMode</key> <integer>2</integer> <key>ToolbarIsVisible</key> <true/> <key>ToolbarSizeMode</key> <integer>2</integer> <key>Type</key> <string>Perspectives</string> <key>UpdateMessage</key> <string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?</string> <key>WindowJustification</key> <integer>5</integer> <key>WindowOrderList</key> <array> - <string>CAFFD30C11F87EC40097DE9A</string> - <string>CAFFD30511F87EAF0097DE9A</string> - <string>1C78EAAD065D492600B07095</string> - <string>1CD10A99069EF8BA00B06720</string> <string>CABCFBEF11F6742100D7D98A</string> - <string>/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo.xcodeproj</string> + <string>/Users/brandon/Documents/StoreButton/ZIStoreButton/ZIStoreButtonDemo.xcodeproj</string> </array> <key>WindowString</key> <string>1046 250 1290 959 0 0 2560 1418 </string> <key>WindowToolsV3</key> <array> <dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>windowTool.build</string> <key>IsVertical</key> <true/> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD0528F0623707200166675</string> <key>PBXProjectModuleLabel</key> <string></string> <key>StatusBarVisibility</key> <true/> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {500, 218}}</string> <key>RubberWindowFrame</key> <string>125 872 500 500 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>218pt</string> </dict> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>XCMainBuildResultsModuleGUID</string> <key>PBXProjectModuleLabel</key> <string>Build Results</string> <key>XCBuildResultsTrigger_Collapse</key> <integer>1021</integer> <key>XCBuildResultsTrigger_Open</key> <integer>1011</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 223}, {500, 236}}</string> <key>RubberWindowFrame</key> <string>125 872 500 500 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXBuildResultsModule</string> <key>Proportion</key> <string>236pt</string> </dict> </array> <key>Proportion</key> <string>459pt</string> </dict> </array> <key>Name</key> <string>Build Results</string> <key>ServiceClasses</key> <array> <string>PBXBuildResultsModule</string> </array> <key>StatusbarIsVisible</key> <true/> <key>TableOfContents</key> <array> <string>CABCFBEF11F6742100D7D98A</string> - <string>CAFFD2F511F87DCC0097DE9A</string> + <string>CA18DF1A12236D5C0038778B</string> <string>1CD0528F0623707200166675</string> <string>XCMainBuildResultsModuleGUID</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.buildV3</string> <key>WindowContentMinSize</key> <string>486 300</string> <key>WindowString</key> <string>125 872 500 500 0 0 2560 1418 </string> <key>WindowToolGUID</key> <string>CABCFBEF11F6742100D7D98A</string> <key>WindowToolIsVisible</key> <false/> </dict> <dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>windowTool.debugger</string> <key>IsVertical</key> <true/> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>Debugger</key> <dict> <key>HorizontalSplitView</key> <dict> <key>_collapsingFrameDimension</key> <real>0.0</real> <key>_indexOfCollapsedView</key> <integer>0</integer> <key>_percentageOfCollapsedView</key> <real>0.0</real> <key>isCollapsed</key> <string>yes</string> <key>sizes</key> <array> <string>{{0, 0}, {316, 198}}</string> <string>{{316, 0}, {378, 198}}</string> </array> </dict> <key>VerticalSplitView</key> <dict> <key>_collapsingFrameDimension</key> <real>0.0</real> <key>_indexOfCollapsedView</key> <integer>0</integer> <key>_percentageOfCollapsedView</key> <real>0.0</real> <key>isCollapsed</key> <string>yes</string> <key>sizes</key> <array> <string>{{0, 0}, {694, 198}}</string> <string>{{0, 198}, {694, 183}}</string> </array> </dict> </dict> <key>LauncherConfigVersion</key> <string>8</string> <key>PBXProjectModuleGUID</key> <string>1C162984064C10D400B95A72</string> <key>PBXProjectModuleLabel</key> <string>Debug - GLUTExamples (Underwater)</string> </dict> <key>GeometryConfiguration</key> <dict> <key>DebugConsoleVisible</key> <string>None</string> <key>DebugConsoleWindowFrame</key> <string>{{200, 200}, {500, 300}}</string> <key>DebugSTDIOWindowFrame</key> <string>{{200, 200}, {500, 300}}</string> <key>Frame</key> <string>{{0, 0}, {694, 381}}</string> <key>PBXDebugSessionStackFrameViewKey</key> <dict> <key>DebugVariablesTableConfiguration</key> <array> <string>Name</string> <real>120</real> <string>Value</string> <real>85</real> <string>Summary</string> <real>148</real> </array> <key>Frame</key> <string>{{316, 0}, {378, 198}}</string> <key>RubberWindowFrame</key> <string>1104 774 694 422 0 0 2560 1418 </string> </dict> <key>RubberWindowFrame</key> <string>1104 774 694 422 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXDebugSessionModule</string> <key>Proportion</key> <string>381pt</string> </dict> </array> <key>Proportion</key> <string>381pt</string> </dict> </array> <key>Name</key> <string>Debugger</string> <key>ServiceClasses</key> <array> <string>PBXDebugSessionModule</string> </array> <key>StatusbarIsVisible</key> <true/> <key>TableOfContents</key> <array> <string>1CD10A99069EF8BA00B06720</string> <string>CAFFD2FD11F87EAF0097DE9A</string> <string>1C162984064C10D400B95A72</string> <string>CAFFD2FE11F87EAF0097DE9A</string> <string>CAFFD2FF11F87EAF0097DE9A</string> <string>CAFFD30011F87EAF0097DE9A</string> <string>CAFFD30111F87EAF0097DE9A</string> <string>CAFFD30211F87EAF0097DE9A</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.debugV3</string> <key>WindowString</key> <string>1104 774 694 422 0 0 2560 1418 </string> <key>WindowToolGUID</key> <string>1CD10A99069EF8BA00B06720</string> <key>WindowToolIsVisible</key> <false/> </dict> <dict> <key>Identifier</key> <string>windowTool.find</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CDD528C0622207200134675</string> <key>PBXProjectModuleLabel</key> <string>&lt;No Editor&gt;</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD0528D0623707200166675</string> </dict> <key>SplitCount</key> <string>1</string> </dict> <key>StatusBarVisibility</key> <integer>1</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {781, 167}}</string> <key>RubberWindowFrame</key> <string>62 385 781 470 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>781pt</string> </dict> </array> <key>Proportion</key> <string>50%</string> </dict> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD0528E0623707200166675</string> <key>PBXProjectModuleLabel</key> <string>Project Find</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{8, 0}, {773, 254}}</string> <key>RubberWindowFrame</key> <string>62 385 781 470 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXProjectFindModule</string> <key>Proportion</key> <string>50%</string> </dict> </array> <key>Proportion</key> <string>428pt</string> </dict> </array> <key>Name</key> <string>Project Find</string> <key>ServiceClasses</key> <array> <string>PBXProjectFindModule</string> </array> <key>StatusbarIsVisible</key> <integer>1</integer> <key>TableOfContents</key> <array> <string>1C530D57069F1CE1000CFCEE</string> <string>1C530D58069F1CE1000CFCEE</string> <string>1C530D59069F1CE1000CFCEE</string> <string>1CDD528C0622207200134675</string> <string>1C530D5A069F1CE1000CFCEE</string> <string>1CE0B1FE06471DED0097A5F4</string> <string>1CD0528E0623707200166675</string> </array> <key>WindowString</key> <string>62 385 781 470 0 0 1440 878 </string> <key>WindowToolGUID</key> <string>1C530D57069F1CE1000CFCEE</string> <key>WindowToolIsVisible</key> <integer>0</integer> </dict> <dict> <key>Identifier</key> <string>MENUSEPARATOR</string> </dict> <dict> <key>FirstTimeWindowDisplayed</key> <false/> <key>Identifier</key> <string>windowTool.debuggerConsole</string> <key>IsVertical</key> <true/> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1C78EAAC065D492600B07095</string> <key>PBXProjectModuleLabel</key> <string>Debugger Console</string> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {650, 209}}</string> <key>RubberWindowFrame</key> <string>1104 946 650 250 0 0 2560 1418 </string> </dict> <key>Module</key> <string>PBXDebugCLIModule</string> <key>Proportion</key> <string>209pt</string> </dict> </array> <key>Proportion</key> <string>209pt</string> </dict> </array> <key>Name</key> <string>Debugger Console</string> <key>ServiceClasses</key> <array> <string>PBXDebugCLIModule</string> </array> <key>StatusbarIsVisible</key> <true/> <key>TableOfContents</key> <array> <string>1C78EAAD065D492600B07095</string> <string>CAFFD30311F87EAF0097DE9A</string> <string>1C78EAAC065D492600B07095</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.consoleV3</string> <key>WindowString</key> <string>1104 946 650 250 0 0 2560 1418 </string> <key>WindowToolGUID</key> <string>1C78EAAD065D492600B07095</string> <key>WindowToolIsVisible</key> <false/> </dict> <dict> <key>Identifier</key> <string>windowTool.snapshots</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>Module</key> <string>XCSnapshotModule</string> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Proportion</key> <string>100%</string> </dict> </array> <key>Name</key> <string>Snapshots</string> <key>ServiceClasses</key> <array> <string>XCSnapshotModule</string> </array> <key>StatusbarIsVisible</key> <string>Yes</string> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.snapshots</string> <key>WindowString</key> <string>315 824 300 550 0 0 1440 878 </string> <key>WindowToolIsVisible</key> <string>Yes</string> </dict> <dict> <key>Identifier</key> <string>windowTool.scm</string> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1C78EAB2065D492600B07095</string> <key>PBXProjectModuleLabel</key> <string>&lt;No Editor&gt;</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> <dict> <key>PBXProjectModuleGUID</key> <string>1C78EAB3065D492600B07095</string> </dict> <key>SplitCount</key> <string>1</string> </dict> <key>StatusBarVisibility</key> <integer>1</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {452, 0}}</string> <key>RubberWindowFrame</key> <string>743 379 452 308 0 0 1280 1002 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> <string>0pt</string> </dict> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> <string>1CD052920623707200166675</string> <key>PBXProjectModuleLabel</key> <string>SCM</string> </dict> <key>GeometryConfiguration</key> <dict> <key>ConsoleFrame</key> <string>{{0, 259}, {452, 0}}</string> <key>Frame</key> <string>{{0, 7}, {452, 259}}</string> <key>RubberWindowFrame</key> <string>743 379 452 308 0 0 1280 1002 </string> <key>TableConfiguration</key> <array> <string>Status</string> <real>30</real> <string>FileName</string> <real>199</real> <string>Path</string> <real>197.0950012207031</real> </array> <key>TableFrame</key> <string>{{0, 0}, {452, 250}}</string> </dict> <key>Module</key> <string>PBXCVSModule</string> <key>Proportion</key> <string>262pt</string> </dict> </array> <key>Proportion</key> <string>266pt</string> </dict> </array> <key>Name</key> <string>SCM</string> <key>ServiceClasses</key> <array> <string>PBXCVSModule</string> </array> <key>StatusbarIsVisible</key> <integer>1</integer> <key>TableOfContents</key> <array> <string>1C78EAB4065D492600B07095</string> <string>1C78EAB5065D492600B07095</string> <string>1C78EAB2065D492600B07095</string> <string>1CD052920623707200166675</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.scm</string> <key>WindowString</key> <string>743 379 452 308 0 0 1280 1002 </string> </dict> <dict> <key>Identifier</key> <string>windowTool.breakpoints</string> <key>IsVertical</key> <integer>0</integer> <key>Layout</key> <array> <dict> <key>Dock</key> <array> <dict> <key>BecomeActive</key> <integer>1</integer> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> <array> <string>1C77FABC04509CD000000102</string> </array> <key>PBXProjectModuleGUID</key> <string>1CE0B1FE06471DED0097A5F4</string> <key>PBXProjectModuleLabel</key> <string>Files</string> <key>PBXProjectStructureProvided</key> <string>no</string> <key>PBXSmartGroupTreeModuleColumnData</key> <dict> <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> <array> <real>168</real> </array> <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> <array> <string>MainColumn</string> </array> </dict> <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> <dict> <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> <array> <string>1C77FABC04509CD000000102</string> </array> <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <array> <array> <integer>0</integer> </array> </array> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> <string>{{0, 0}, {168, 350}}</string> </dict> <key>PBXTopSmartGroupGIDs</key> <array/> <key>XCIncludePerspectivesSwitch</key> <integer>0</integer> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> <string>{{0, 0}, {185, 368}}</string> <key>GroupTreeTableConfiguration</key> <array> <string>MainColumn</string> <real>168</real> </array> <key>RubberWindowFrame</key> <string>315 424 744 409 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> <key>Proportion</key> <string>185pt</string> </dict> <dict> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> diff --git a/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser b/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser index 3146928..7f764a0 100644 --- a/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser +++ b/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser @@ -1,259 +1,292 @@ // !$*UTF8*$! { 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{779, 0}"; sepNavVisRange = "{0, 1130}"; }; }; 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */ = { uiCtxt = { sepNavFolds = "{\n c = (\n {\n r = \"{1100, 236}\";\n s = 0;\n },\n {\n r = \"{1406, 446}\";\n s = 0;\n },\n {\n r = \"{1924, 351}\";\n s = 0;\n },\n {\n r = \"{2348, 165}\";\n s = 0;\n },\n {\n r = \"{2582, 205}\";\n s = 0;\n },\n {\n r = \"{2854, 118}\";\n s = 0;\n },\n {\n r = \"{3097, 140}\";\n s = 0;\n },\n {\n r = \"{3258, 74}\";\n s = 0;\n }\n );\n r = \"{0, 3341}\";\n s = 0;\n}"; sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{162, 592}"; sepNavVisRange = "{0, 1614}"; }; }; 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */ = { activeExec = 0; executables = ( CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */, ); }; 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{165, 593}"; sepNavVisRange = "{0, 933}"; }; }; 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */ = { uiCtxt = { - sepNavFolds = "{\n c = (\n {\n r = \"{2514, 1009}\";\n s = 0;\n },\n {\n r = \"{3620, 115}\";\n s = 0;\n },\n {\n r = \"{3772, 155}\";\n s = 0;\n },\n {\n r = \"{3954, 83}\";\n s = 0;\n },\n {\n r = \"{4058, 22}\";\n s = 0;\n }\n );\n r = \"{0, 4088}\";\n s = 0;\n}"; + sepNavFolds = "{\n c = (\n {\n r = \"{2522, 1009}\";\n s = 0;\n },\n {\n r = \"{3628, 115}\";\n s = 0;\n },\n {\n r = \"{3780, 155}\";\n s = 0;\n },\n {\n r = \"{3962, 83}\";\n s = 0;\n },\n {\n r = \"{4066, 22}\";\n s = 0;\n }\n );\n r = \"{0, 4096}\";\n s = 0;\n}"; sepNavIntBoundsRect = "{{0, 0}, {1698, 929}}"; - sepNavSelRange = "{704, 0}"; - sepNavVisRange = "{0, 2683}"; + sepNavSelRange = "{1448, 0}"; + sepNavVisRange = "{0, 2691}"; }; }; 29B97313FDCFA39411CA2CEA /* Project object */ = { activeBuildConfigurationName = Debug; activeExecutable = CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */; activeSDKPreference = iphonesimulator4.0; activeTarget = 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */; addToTargets = ( 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */, ); breakpoints = ( ); codeSenseManager = CABCFBE811F671F800D7D98A /* Code sense */; executables = ( CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */, ); perUserDictionary = { PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, 806, 20, 48, 43, 43, 20, ); PBXFileTableDataSourceColumnsKey = ( PBXFileDataSource_FiletypeID, PBXFileDataSource_Filename_ColumnID, PBXFileDataSource_Built_ColumnID, PBXFileDataSource_ObjectSize_ColumnID, PBXFileDataSource_Errors_ColumnID, PBXFileDataSource_Warnings_ColumnID, PBXFileDataSource_Target_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 301497796; - PBXWorkspaceStateSaveDate = 301497796; + PBXPerProjectTemplateStateSaveDate = 304311631; + PBXWorkspaceStateSaveDate = 304311631; }; perUserProjectItems = { - CABCFCC711F6881300D7D98A /* PBXTextBookmark */ = CABCFCC711F6881300D7D98A /* PBXTextBookmark */; - CABCFCC911F6881300D7D98A /* PBXTextBookmark */ = CABCFCC911F6881300D7D98A /* PBXTextBookmark */; - CAFFD36411F884B30097DE9A /* PBXTextBookmark */ = CAFFD36411F884B30097DE9A /* PBXTextBookmark */; - CAFFD36511F884B30097DE9A /* PBXTextBookmark */ = CAFFD36511F884B30097DE9A /* PBXTextBookmark */; - CAFFD36611F884B30097DE9A /* PBXTextBookmark */ = CAFFD36611F884B30097DE9A /* PBXTextBookmark */; - CAFFD36711F884B30097DE9A /* PBXTextBookmark */ = CAFFD36711F884B30097DE9A /* PBXTextBookmark */; - CAFFD36811F884B30097DE9A /* PBXTextBookmark */ = CAFFD36811F884B30097DE9A /* PBXTextBookmark */; - CAFFD36D11F887F80097DE9A /* PBXTextBookmark */ = CAFFD36D11F887F80097DE9A /* PBXTextBookmark */; - CAFFD36E11F887F80097DE9A /* PBXTextBookmark */ = CAFFD36E11F887F80097DE9A /* PBXTextBookmark */; + CA18DF1512236D5C0038778B /* PBXTextBookmark */ = CA18DF1512236D5C0038778B /* PBXTextBookmark */; + CA18DF1612236D5C0038778B /* PBXTextBookmark */ = CA18DF1612236D5C0038778B /* PBXTextBookmark */; + CA18DF1712236D5C0038778B /* PBXTextBookmark */ = CA18DF1712236D5C0038778B /* PBXTextBookmark */; + CABCFCC711F6881300D7D98A = CABCFCC711F6881300D7D98A /* PBXTextBookmark */; + CABCFCC911F6881300D7D98A = CABCFCC911F6881300D7D98A /* PBXTextBookmark */; + CAFFD36411F884B30097DE9A = CAFFD36411F884B30097DE9A /* PBXTextBookmark */; + CAFFD36511F884B30097DE9A = CAFFD36511F884B30097DE9A /* PBXTextBookmark */; + CAFFD36611F884B30097DE9A = CAFFD36611F884B30097DE9A /* PBXTextBookmark */; + CAFFD36711F884B30097DE9A = CAFFD36711F884B30097DE9A /* PBXTextBookmark */; + CAFFD36811F884B30097DE9A = CAFFD36811F884B30097DE9A /* PBXTextBookmark */; + CAFFD36D11F887F80097DE9A = CAFFD36D11F887F80097DE9A /* PBXTextBookmark */; + CAFFD36E11F887F80097DE9A = CAFFD36E11F887F80097DE9A /* PBXTextBookmark */; }; sourceControlManager = CABCFBE711F671F800D7D98A /* Source Control */; userBuildSettings = { }; }; + CA18DF1512236D5C0038778B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */; + name = "ZIStoreButtonDemoAppDelegate.h: 25"; + rLen = 0; + rLoc = 779; + rType = 0; + vrLen = 1130; + vrLoc = 0; + }; + CA18DF1612236D5C0038778B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; + name = "ZIStoreButtonDemoViewController.m: 22"; + rLen = 0; + rLoc = 704; + rType = 0; + vrLen = 4041; + vrLoc = 0; + }; + CA18DF1712236D5C0038778B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; + name = "ZIStoreButtonDemoViewController.m: 47"; + rLen = 0; + rLoc = 1448; + rType = 0; + vrLen = 4049; + vrLoc = 0; + }; CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */ = { isa = PBXExecutable; activeArgIndices = ( ); argumentStrings = ( ); autoAttachOnCrash = 1; breakpointsEnabled = 1; configStateDict = { }; customDataFormattersEnabled = 1; dataTipCustomDataFormattersEnabled = 1; dataTipShowTypeColumn = 1; dataTipSortType = 0; debuggerPlugin = GDBDebugging; disassemblyDisplayState = 0; dylibVariantSuffix = ""; enableDebugStr = 1; environmentEntries = ( ); executableSystemSymbolLevel = 0; executableUserSymbolLevel = 0; libgmallocEnabled = 0; name = ZIStoreButtonDemo; savedGlobals = { }; showTypeColumn = 0; sourceDirectories = ( ); variableFormatDictionary = { }; }; CABCFBE711F671F800D7D98A /* Source Control */ = { isa = PBXSourceControlManager; fallbackIsa = XCSourceControlManager; isSCMEnabled = 0; scmConfiguration = { repositoryNamesForRoots = { "" = ""; }; }; }; CABCFBE811F671F800D7D98A /* Code sense */ = { isa = PBXCodeSenseManager; indexTemplatePath = ""; }; CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; sepNavSelRange = "{145, 0}"; sepNavVisRange = "{0, 892}"; }; }; CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */ = { uiCtxt = { sepNavFolds = "{\n c = (\n {\n r = \"{3771, 2332}\";\n s = 0;\n },\n {\n r = \"{6149, 51}\";\n s = 0;\n },\n {\n r = \"{6241, 118}\";\n s = 0;\n },\n {\n r = \"{6437, 35}\";\n s = 0;\n },\n {\n r = \"{6493, 22}\";\n s = 0;\n }\n );\n r = \"{0, 6524}\";\n s = 0;\n}"; sepNavIntBoundsRect = "{{0, 0}, {1236, 1012}}"; sepNavSelRange = "{145, 0}"; sepNavVisRange = "{0, 3658}"; }; }; CABCFCC711F6881300D7D98A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = CABCFCC811F6881300D7D98A /* UIButton.h */; name = "UIButton.h: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 4639; vrLoc = 90; }; CABCFCC811F6881300D7D98A /* UIButton.h */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UIButton.h; path = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIButton.h; sourceTree = "<absolute>"; }; CABCFCC911F6881300D7D98A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = CABCFCCA11F6881300D7D98A /* UIControl.h */; name = "UIControl.h: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 3155; vrLoc = 29; }; CABCFCCA11F6881300D7D98A /* UIControl.h */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UIControl.h; path = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIControl.h; sourceTree = "<absolute>"; }; CAFFD36411F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */; name = "ZIStoreButton.m: 8"; rLen = 0; rLoc = 145; rType = 0; vrLen = 3658; vrLoc = 0; }; CAFFD36511F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */; name = "ZIStoreButton.h: 8"; rLen = 0; rLoc = 145; rType = 0; vrLen = 892; vrLoc = 0; }; CAFFD36611F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; name = "ZIStoreButtonDemoViewController.m: 22"; rLen = 0; rLoc = 704; rType = 0; vrLen = 4041; vrLoc = 0; }; CAFFD36711F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */; name = "ZIStoreButtonDemoViewController.h: 9"; rLen = 593; rLoc = 165; rType = 0; vrLen = 933; vrLoc = 0; }; CAFFD36811F884B30097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */; name = "ZIStoreButtonDemoAppDelegate.m: 9"; rLen = 592; rLoc = 162; rType = 0; vrLen = 3341; vrLoc = 0; }; CAFFD36D11F887F80097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */; name = "ZIStoreButtonDemoAppDelegate.h: 9"; rLen = 606; rLoc = 162; rType = 0; - vrLen = 1144; + vrLen = 1130; vrLoc = 0; }; CAFFD36E11F887F80097DE9A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */; name = "ZIStoreButtonDemoAppDelegate.h: 25"; rLen = 0; rLoc = 779; rType = 0; vrLen = 1130; vrLoc = 0; }; } diff --git a/ZIStoreButtonDemo.xcodeproj/project.pbxproj b/ZIStoreButtonDemo.xcodeproj/project.pbxproj index 0018069..73291e7 100755 --- a/ZIStoreButtonDemo.xcodeproj/project.pbxproj +++ b/ZIStoreButtonDemo.xcodeproj/project.pbxproj @@ -1,261 +1,268 @@ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 45; objects = { /* Begin PBXBuildFile section */ 1D3623260D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 2899E5220DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib */; }; 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 28D7ACF80DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; }; CABCFBEC11F6725800D7D98A /* ZIStoreButton.m in Sources */ = {isa = PBXBuildFile; fileRef = CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */; }; CABCFBF811F6743000D7D98A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CABCFBF711F6743000D7D98A /* QuartzCore.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButtonDemoAppDelegate.h; sourceTree = "<group>"; }; 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZIStoreButtonDemoAppDelegate.m; sourceTree = "<group>"; }; 1D6058910D05DD3D006BFB54 /* ZIStoreButtonDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZIStoreButtonDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 2899E5210DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ZIStoreButtonDemoViewController.xib; sourceTree = "<group>"; }; 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; }; 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButtonDemoViewController.h; sourceTree = "<group>"; }; 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZIStoreButtonDemoViewController.m; sourceTree = "<group>"; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 32CA4F630368D1EE00C91783 /* ZIStoreButtonDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButtonDemo_Prefix.pch; sourceTree = "<group>"; }; 8D1107310486CEB800E47090 /* ZIStoreButtonDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ZIStoreButtonDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; }; CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButton.h; sourceTree = "<group>"; }; CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZIStoreButton.m; sourceTree = "<group>"; }; CABCFBF711F6743000D7D98A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, CABCFBF811F6743000D7D98A /* QuartzCore.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */, 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */, 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */, 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */, CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */, CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */, ); path = Classes; sourceTree = "<group>"; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 1D6058910D05DD3D006BFB54 /* ZIStoreButtonDemo.app */, ); name = Products; sourceTree = "<group>"; }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = CustomTemplate; sourceTree = "<group>"; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( 32CA4F630368D1EE00C91783 /* ZIStoreButtonDemo_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, ); name = "Other Sources"; sourceTree = "<group>"; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( 2899E5210DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib */, 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 8D1107310486CEB800E47090 /* ZIStoreButtonDemo-Info.plist */, ); name = Resources; sourceTree = "<group>"; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 1D30AB110D05D00D00671497 /* Foundation.framework */, 288765A40DF7441C002DB57D /* CoreGraphics.framework */, CABCFBF711F6743000D7D98A /* QuartzCore.framework */, ); name = Frameworks; sourceTree = "<group>"; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ZIStoreButtonDemo" */; buildPhases = ( 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = ZIStoreButtonDemo; productName = ZIStoreButtonDemo; productReference = 1D6058910D05DD3D006BFB54 /* ZIStoreButtonDemo.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ZIStoreButtonDemo" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 2899E5220DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m in Sources */, 28D7ACF80DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m in Sources */, CABCFBEC11F6725800D7D98A /* ZIStoreButton.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ZIStoreButtonDemo_Prefix.pch; INFOPLIST_FILE = "ZIStoreButtonDemo-Info.plist"; PRODUCT_NAME = ZIStoreButtonDemo; }; name = Debug; }; 1D6058950D05DD3E006BFB54 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ZIStoreButtonDemo_Prefix.pch; INFOPLIST_FILE = "ZIStoreButtonDemo-Info.plist"; PRODUCT_NAME = ZIStoreButtonDemo; VALIDATE_PRODUCT = YES; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; SDKROOT = iphoneos4.0; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PREBINDING = NO; SDKROOT = iphoneos4.0; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ZIStoreButtonDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( 1D6058940D05DD3E006BFB54 /* Debug */, 1D6058950D05DD3E006BFB54 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ZIStoreButtonDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree index cd98dae..d02dc21 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree index 9a2a510..e34aee0 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree index 1928375..44f9d3a 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree index bfbbf2e..addf293 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header index 92cf6d0..f5b1b1a 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree index 0fa46b4..3934b4f 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control index 94dce71..c18422b 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings index ef90f20..2150f03 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/subclasses.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/subclasses.pbxbtree index f91c6ed..ee470e1 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/subclasses.pbxbtree and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/subclasses.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols index 9928d0b..9f47e96 100644 Binary files a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols differ
zueos/ZIStoreButton
0000a67bf61fc223d18ef1a0b40a79fd1018873a
Cleaned up and simplified the setSelected: method
diff --git a/Classes/ZIStoreButton.m b/Classes/ZIStoreButton.m index 52902df..8b50c5c 100644 --- a/Classes/ZIStoreButton.m +++ b/Classes/ZIStoreButton.m @@ -1,191 +1,168 @@ // // ZIStoreButton.m // ZIStoreButtonDemo // // Created by Brandon Emrich on 7/20/10. // Copyright 2010 Zueos, Inc. All rights reserved. // /* // Copyright 2010 Brandon Emrich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #import "ZIStoreButton.h" @implementation ZIStoreButton - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Initialization code self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.autoresizesSubviews = YES; self.layer.needsDisplayOnBoundsChange = YES; isBlued = NO; [self setTitle:@"Purchase Now" forState:UIControlStateSelected]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateNormal]; [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateSelected]; [self.titleLabel setShadowOffset:CGSizeMake(0.0, -0.6)]; [self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]]; self.titleLabel.textColor = [UIColor colorWithWhite:0.902 alpha:1.000]; self.titleEdgeInsets = UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0); [self addTarget:self action:@selector(touchedUpOutside:) forControlEvents:UIControlEventTouchUpOutside]; [self addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; CAGradientLayer *bevelLayer2 = [CAGradientLayer layer]; bevelLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.4 alpha:1.0] CGColor], [[UIColor whiteColor] CGColor], nil]; bevelLayer2.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(frame), CGRectGetHeight(frame)); bevelLayer2.cornerRadius = 5.0; bevelLayer2.needsDisplayOnBoundsChange = YES; CAGradientLayer *innerLayer2 = [CAGradientLayer layer]; innerLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor darkGrayColor] CGColor], [[UIColor lightGrayColor] CGColor], nil]; innerLayer2.frame = CGRectMake(0.5, 0.5, CGRectGetWidth(frame) - 1.0, CGRectGetHeight(frame) - 1.0); innerLayer2.cornerRadius = 4.6; innerLayer2.needsDisplayOnBoundsChange = YES; UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; innerLayer3 = [CAGradientLayer layer]; innerLayer3.colors = blueColors; innerLayer3.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.500], [NSNumber numberWithFloat:0.5001], [NSNumber numberWithFloat:1.0], nil]; innerLayer3.frame = CGRectMake(0.75, 0.75, CGRectGetWidth(frame) - 1.5, CGRectGetHeight(frame) - 1.5); innerLayer3.cornerRadius = 4.5; innerLayer3.needsDisplayOnBoundsChange = YES; [self.layer addSublayer:bevelLayer2]; [self.layer addSublayer:innerLayer2]; [self.layer addSublayer:innerLayer3]; [self bringSubviewToFront:self.titleLabel]; } return self; } - (void) setSelected:(BOOL)selected { [super setSelected:selected]; [CATransaction begin]; [CATransaction setAnimationDuration:0.25]; - - UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; - NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; - NSArray *greenColors = [NSArray arrayWithObjects:(id)[[UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000] CGColor], [[UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000] CGColor], [[UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000] CGColor], [[UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000] CGColor], nil]; + UIColor *greenOne = [UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000]; + UIColor *greenTwo = [UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000]; + UIColor *greenThree = [UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000]; + UIColor *greenFour = [UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000]; - if (!selected) { - - CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; - animation.fromValue = greenColors; - animation.toValue = blueColors; - animation.duration = 0.25; - animation.removedOnCompletion = NO; - animation.fillMode = kCAFillModeForwards; - animation.delegate = self; - - [innerLayer3 layoutIfNeeded]; - [innerLayer3 addAnimation:animation forKey:@"changeToBlue"]; - - for (CALayer *la in self.layer.sublayers) { - CGRect cr = la.bounds; - cr.size.width -= 50.0; - la.bounds = cr; - [la layoutIfNeeded]; - } - - CGRect cr = self.frame; - cr.size.width -= 50.0; - self.frame = cr; - - self.titleEdgeInsets = UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0); - - } else { - - CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; - animation.toValue = greenColors; - animation.fromValue = blueColors; - animation.duration = 0.25; - animation.removedOnCompletion = NO; - animation.fillMode = kCAFillModeForwards; - - [innerLayer3 layoutIfNeeded]; - [innerLayer3 addAnimation:animation forKey:@"changeToGreen"]; - - for (CALayer *la in self.layer.sublayers) { - CGRect cr = la.bounds; - cr.size.width += 50.0; - la.bounds = cr; - [la layoutIfNeeded]; - } - - CGRect cr = self.frame; - cr.size.width += 50.0; - self.frame = cr; + NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; + NSArray *greenColors = [NSArray arrayWithObjects:(id)greenOne.CGColor, greenTwo.CGColor, greenThree.CGColor, greenFour.CGColor, nil]; - self.titleEdgeInsets = UIEdgeInsetsMake(2.0, -50.0, 0.0, 0.0); + CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; + animation.fromValue = (!self.selected) ? greenColors : blueColors; + animation.toValue = (!self.selected) ? blueColors : greenColors; + + animation.duration = 0.25; + animation.removedOnCompletion = NO; + animation.fillMode = kCAFillModeForwards; + animation.delegate = self; + + [gradientLayer layoutIfNeeded]; + [gradientLayer addAnimation:animation forKey:@"changeToBlue"]; + + for (CALayer *la in self.layer.sublayers) { + CGRect cr = la.bounds; + cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; + la.bounds = cr; + [la layoutIfNeeded]; } + + CGRect cr = self.frame; + cr.size.width = (!self.selected) ? cr.size.width - 50.0 : cr.size.width + 50.0; + self.frame = cr; + + self.titleEdgeInsets = (!self.selected) ? UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0) : UIEdgeInsetsMake(2.0, -50.0, 0.0, 0.0); + + [CATransaction commit]; } - - (IBAction) touchedUpOutside:(id)sender { if (self.selected) { [self setSelected:NO]; } } - (IBAction) pressButton:(id)sender { if (isBlued) { [sender setSelected:NO]; isBlued = NO; } else { [sender setSelected:YES]; isBlued = YES; } } - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { NSLog(@"Animation Did Stop"); } - (void)dealloc { [super dealloc]; } @end
zueos/ZIStoreButton
dc794b1fc811147c1ec6c60dee021ada40105fe9
Signed-off-by: Brandon Emrich <brandon@zueos.com>
diff --git a/Classes/ZIStoreButton.h b/Classes/ZIStoreButton.h new file mode 100644 index 0000000..b3c21c7 --- /dev/null +++ b/Classes/ZIStoreButton.h @@ -0,0 +1,34 @@ +// +// ZIStoreButton.h +// ZIStoreButtonDemo +// +// Created by Brandon Emrich on 7/20/10. +// Copyright 2010 Zueos, Inc. All rights reserved. +// + +/* +// Copyright 2010 Brandon Emrich +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +*/ + +#import <UIKit/UIKit.h> +#import <QuartzCore/QuartzCore.h> + +@interface ZIStoreButton : UIButton +{ + CAGradientLayer *innerLayer3; + BOOL isBlued; +} + +@end diff --git a/Classes/ZIStoreButton.m b/Classes/ZIStoreButton.m new file mode 100644 index 0000000..52902df --- /dev/null +++ b/Classes/ZIStoreButton.m @@ -0,0 +1,191 @@ +// +// ZIStoreButton.m +// ZIStoreButtonDemo +// +// Created by Brandon Emrich on 7/20/10. +// Copyright 2010 Zueos, Inc. All rights reserved. +// + +/* +// Copyright 2010 Brandon Emrich +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +*/ + +#import "ZIStoreButton.h" + +@implementation ZIStoreButton + + +- (id)initWithFrame:(CGRect)frame { + if ((self = [super initWithFrame:frame])) { + // Initialization code + + self.autoresizingMask = UIViewAutoresizingFlexibleWidth; + + self.autoresizesSubviews = YES; + self.layer.needsDisplayOnBoundsChange = YES; + + isBlued = NO; + + [self setTitle:@"Purchase Now" forState:UIControlStateSelected]; + [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateNormal]; + [self setTitleShadowColor:[UIColor colorWithWhite:0.200 alpha:1.000] forState:UIControlStateSelected]; + [self.titleLabel setShadowOffset:CGSizeMake(0.0, -0.6)]; + [self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]]; + self.titleLabel.textColor = [UIColor colorWithWhite:0.902 alpha:1.000]; + self.titleEdgeInsets = UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0); + + [self addTarget:self action:@selector(touchedUpOutside:) forControlEvents:UIControlEventTouchUpOutside]; + [self addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; + + CAGradientLayer *bevelLayer2 = [CAGradientLayer layer]; + bevelLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.4 alpha:1.0] CGColor], [[UIColor whiteColor] CGColor], nil]; + bevelLayer2.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(frame), CGRectGetHeight(frame)); + bevelLayer2.cornerRadius = 5.0; + bevelLayer2.needsDisplayOnBoundsChange = YES; + + CAGradientLayer *innerLayer2 = [CAGradientLayer layer]; + innerLayer2.colors = [NSArray arrayWithObjects:(id)[[UIColor darkGrayColor] CGColor], [[UIColor lightGrayColor] CGColor], nil]; + innerLayer2.frame = CGRectMake(0.5, 0.5, CGRectGetWidth(frame) - 1.0, CGRectGetHeight(frame) - 1.0); + innerLayer2.cornerRadius = 4.6; + innerLayer2.needsDisplayOnBoundsChange = YES; + + UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; + UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; + UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; + UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; + + NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; + + innerLayer3 = [CAGradientLayer layer]; + innerLayer3.colors = blueColors; + innerLayer3.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.500], [NSNumber numberWithFloat:0.5001], [NSNumber numberWithFloat:1.0], nil]; + innerLayer3.frame = CGRectMake(0.75, 0.75, CGRectGetWidth(frame) - 1.5, CGRectGetHeight(frame) - 1.5); + innerLayer3.cornerRadius = 4.5; + innerLayer3.needsDisplayOnBoundsChange = YES; + + [self.layer addSublayer:bevelLayer2]; + [self.layer addSublayer:innerLayer2]; + [self.layer addSublayer:innerLayer3]; + + [self bringSubviewToFront:self.titleLabel]; + + } + return self; +} + + +- (void) setSelected:(BOOL)selected { + + [super setSelected:selected]; + + [CATransaction begin]; + [CATransaction setAnimationDuration:0.25]; + + + + UIColor *blueOne = [UIColor colorWithRed:0.306 green:0.380 blue:0.547 alpha:1.000]; + UIColor *blueTwo = [UIColor colorWithRed:0.258 green:0.307 blue:0.402 alpha:1.000]; + UIColor *blueThree = [UIColor colorWithRed:0.159 green:0.270 blue:0.550 alpha:1.000]; + UIColor *blueFour = [UIColor colorWithRed:0.129 green:0.220 blue:0.452 alpha:1.000]; + + NSArray *blueColors = [NSArray arrayWithObjects:(id)blueOne.CGColor, blueTwo.CGColor, blueThree.CGColor, blueFour.CGColor, nil]; + NSArray *greenColors = [NSArray arrayWithObjects:(id)[[UIColor colorWithRed:0.482 green:0.674 blue:0.406 alpha:1.000] CGColor], [[UIColor colorWithRed:0.525 green:0.742 blue:0.454 alpha:1.000] CGColor], [[UIColor colorWithRed:0.346 green:0.719 blue:0.183 alpha:1.000] CGColor], [[UIColor colorWithRed:0.299 green:0.606 blue:0.163 alpha:1.000] CGColor], nil]; + + if (!selected) { + + CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; + animation.fromValue = greenColors; + animation.toValue = blueColors; + animation.duration = 0.25; + animation.removedOnCompletion = NO; + animation.fillMode = kCAFillModeForwards; + animation.delegate = self; + + [innerLayer3 layoutIfNeeded]; + [innerLayer3 addAnimation:animation forKey:@"changeToBlue"]; + + for (CALayer *la in self.layer.sublayers) { + CGRect cr = la.bounds; + cr.size.width -= 50.0; + la.bounds = cr; + [la layoutIfNeeded]; + } + + CGRect cr = self.frame; + cr.size.width -= 50.0; + self.frame = cr; + + self.titleEdgeInsets = UIEdgeInsetsMake(2.0, 0.0, 0.0, 0.0); + + } else { + + CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"colors"]; + animation.toValue = greenColors; + animation.fromValue = blueColors; + animation.duration = 0.25; + animation.removedOnCompletion = NO; + animation.fillMode = kCAFillModeForwards; + + [innerLayer3 layoutIfNeeded]; + [innerLayer3 addAnimation:animation forKey:@"changeToGreen"]; + + for (CALayer *la in self.layer.sublayers) { + CGRect cr = la.bounds; + cr.size.width += 50.0; + la.bounds = cr; + [la layoutIfNeeded]; + } + + CGRect cr = self.frame; + cr.size.width += 50.0; + self.frame = cr; + + self.titleEdgeInsets = UIEdgeInsetsMake(2.0, -50.0, 0.0, 0.0); + + } +} + + +- (IBAction) touchedUpOutside:(id)sender { + if (self.selected) { + [self setSelected:NO]; + } +} + + +- (IBAction) pressButton:(id)sender { + if (isBlued) { + [sender setSelected:NO]; + isBlued = NO; + } else { + [sender setSelected:YES]; + isBlued = YES; + } +} + + +- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { + + NSLog(@"Animation Did Stop"); + +} + + +- (void)dealloc { + [super dealloc]; +} + + +@end diff --git a/Classes/ZIStoreButtonDemoAppDelegate.h b/Classes/ZIStoreButtonDemoAppDelegate.h new file mode 100644 index 0000000..dd4dff6 --- /dev/null +++ b/Classes/ZIStoreButtonDemoAppDelegate.h @@ -0,0 +1,39 @@ +// +// ZIStoreButtonDemoAppDelegate.h +// ZIStoreButtonDemo +// +// Created by Brandon Emrich on 7/20/10. +// Copyright Zueos, Inc. 2010. All rights reserved. +// + +/* +// Copyright 2010 Brandon Emrich +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +*/ + +#import <UIKit/UIKit.h> + +@class ZIStoreButtonDemoViewController; + +@interface ZIStoreButtonDemoAppDelegate : NSObject <UIApplicationDelegate> +{ + UIWindow *window; + ZIStoreButtonDemoViewController *viewController; +} + +@property (nonatomic, retain) IBOutlet UIWindow *window; +@property (nonatomic, retain) IBOutlet ZIStoreButtonDemoViewController *viewController; + +@end + diff --git a/Classes/ZIStoreButtonDemoAppDelegate.m b/Classes/ZIStoreButtonDemoAppDelegate.m new file mode 100644 index 0000000..246ccd3 --- /dev/null +++ b/Classes/ZIStoreButtonDemoAppDelegate.m @@ -0,0 +1,106 @@ +// +// ZIStoreButtonDemoAppDelegate.m +// ZIStoreButtonDemo +// +// Created by Brandon Emrich on 7/20/10. +// Copyright Zueos, Inc. 2010. All rights reserved. +// + +/* +// Copyright 2010 Brandon Emrich +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +*/ + +#import "ZIStoreButtonDemoAppDelegate.h" +#import "ZIStoreButtonDemoViewController.h" + +@implementation ZIStoreButtonDemoAppDelegate + +@synthesize window; +@synthesize viewController; + + +#pragma mark - +#pragma mark Application lifecycle + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + + // Override point for customization after application launch. + + // Add the view controller's view to the window and display. + [window addSubview:viewController.view]; + [window makeKeyAndVisible]; + + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + /* + Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + */ +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + /* + Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + If your application supports background execution, called instead of applicationWillTerminate: when the user quits. + */ +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + /* + Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. + */ +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + /* + Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + */ +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + /* + Called when the application is about to terminate. + See also applicationDidEnterBackground:. + */ +} + + +#pragma mark - +#pragma mark Memory management + + +- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { + /* + Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. + */ +} + + +- (void)dealloc { + [viewController release]; + [window release]; + [super dealloc]; +} + + +@end diff --git a/Classes/ZIStoreButtonDemoViewController.h b/Classes/ZIStoreButtonDemoViewController.h new file mode 100644 index 0000000..a6b7301 --- /dev/null +++ b/Classes/ZIStoreButtonDemoViewController.h @@ -0,0 +1,36 @@ +// +// ZIStoreButtonDemoViewController.h +// ZIStoreButtonDemo +// +// Created by Brandon Emrich on 7/20/10. +// Copyright Zueos, Inc. 2010. All rights reserved. +// + +/* +// Copyright 2010 Brandon Emrich +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +*/ + +#import <UIKit/UIKit.h> +#import <QuartzCore/QuartzCore.h> + +@interface ZIStoreButtonDemoViewController : UIViewController +{ + +} + +- (CAGradientLayer*) backgroundLayer; + +@end + diff --git a/Classes/ZIStoreButtonDemoViewController.m b/Classes/ZIStoreButtonDemoViewController.m new file mode 100644 index 0000000..05401a1 --- /dev/null +++ b/Classes/ZIStoreButtonDemoViewController.m @@ -0,0 +1,118 @@ +/* +// ZIStoreButtonDemoViewController.m +// ZIStoreButtonDemo +// +// Created by Brandon Emrich on 7/20/10. +*/ + +/* +// Copyright 2010 Brandon Emrich +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +*/ + +#import "ZIStoreButtonDemoViewController.h" +#import "ZIStoreButton.h" +#import <QuartzCore/QuartzCore.h> + +@implementation ZIStoreButtonDemoViewController + + +- (void)viewDidLoad { + [super viewDidLoad]; + + ZIStoreButton *button = [[ZIStoreButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 22.0)]; + [button setTitle:@"$0.99" forState:UIControlStateNormal]; + button.center = self.view.center; + + CAGradientLayer *bgLayer = [self backgroundLayer]; + bgLayer.frame = self.view.bounds; + + [self.view.layer addSublayer:bgLayer]; + + [self.view addSubview:button]; + + UILabel *titleLab = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 10.0, 320.0, 35.0)]; + titleLab.backgroundColor = [UIColor clearColor]; + titleLab.text = @"ZIStoreButton"; + titleLab.font = [UIFont systemFontOfSize:24.0]; + titleLab.textAlignment = UITextAlignmentCenter; + titleLab.shadowColor = [UIColor colorWithWhite:0.98 alpha:1.0]; + titleLab.shadowOffset = CGSizeMake(0.0, 0.75); + titleLab.textColor = [UIColor colorWithWhite:0.50 alpha:1.0]; + + [self.view addSubview:titleLab]; + + UILabel *detailLab = [[UILabel alloc] initWithFrame:CGRectMake(10.0, 55.0, 300.0, 120.0)]; + detailLab.backgroundColor = [UIColor clearColor]; + detailLab.numberOfLines = 7; + detailLab.text = @" This is a UIButton subclass that use's Core Animation Layers to present itself. A CAAnimation is rendered using the keypath for the 'colors' property of the CAGradeintLayer.\n\n Not a single image resource is ever used to render any part of the button."; + detailLab.font = [UIFont systemFontOfSize:13.0]; + detailLab.shadowColor = [UIColor colorWithWhite:0.98 alpha:1.0]; + detailLab.shadowOffset = CGSizeMake(0.0, 1.0); + detailLab.textColor = [UIColor colorWithWhite:0.50 alpha:1.0]; + + [self.view addSubview:detailLab]; +} + + +- (CAGradientLayer*) backgroundLayer { + + UIColor *colorOne = [UIColor colorWithWhite:0.9 alpha:1.0]; + UIColor *colorTwo = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.85 alpha:1.0]; + UIColor *colorThree = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.7 alpha:1.0]; + UIColor *colorFour = [UIColor colorWithHue:0.625 saturation:0.0 brightness:0.4 alpha:1.0]; + + NSArray *colors = [NSArray arrayWithObjects:(id)colorOne.CGColor, colorTwo.CGColor, colorThree.CGColor, colorFour.CGColor, nil]; + + NSNumber *stopOne = [NSNumber numberWithFloat:0.0]; + NSNumber *stopTwo = [NSNumber numberWithFloat:0.02]; + NSNumber *stopThree = [NSNumber numberWithFloat:0.99]; + NSNumber *stopFour = [NSNumber numberWithFloat:1.0]; + + NSArray *locations = [NSArray arrayWithObjects:stopOne, stopTwo, stopThree, stopFour, nil]; + + CAGradientLayer *headerLayer = [CAGradientLayer layer]; + //headerLayer.frame = CGRectMake(0.0, 0.0, 320.0, 77.0); + headerLayer.colors = colors; + headerLayer.locations = locations; + + return headerLayer; +} + + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + // Return YES for supported orientations + return (interfaceOrientation == UIInterfaceOrientationPortrait); +} + + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + + +- (void)viewDidUnload { + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + + +- (void)dealloc { + [super dealloc]; +} + +@end diff --git a/MainWindow.xib b/MainWindow.xib new file mode 100644 index 0000000..46311cd --- /dev/null +++ b/MainWindow.xib @@ -0,0 +1,444 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> + <data> + <int key="IBDocument.SystemTarget">1024</int> + <string key="IBDocument.SystemVersion">10D571</string> + <string key="IBDocument.InterfaceBuilderVersion">786</string> + <string key="IBDocument.AppKitVersion">1038.29</string> + <string key="IBDocument.HIToolboxVersion">460.00</string> + <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> + <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="NS.object.0">112</string> + </object> + <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> + <bool key="EncodedWithXMLCoder">YES</bool> + <integer value="10"/> + </object> + <object class="NSArray" key="IBDocument.PluginDependencies"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + </object> + <object class="NSMutableDictionary" key="IBDocument.Metadata"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys" id="0"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBProxyObject" id="841351856"> + <string key="IBProxiedObjectIdentifier">IBFilesOwner</string> + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> + </object> + <object class="IBProxyObject" id="427554174"> + <string key="IBProxiedObjectIdentifier">IBFirstResponder</string> + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> + </object> + <object class="IBUICustomObject" id="664661524"> + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> + </object> + <object class="IBUIViewController" id="943309135"> + <string key="IBUINibName">ZIStoreButtonDemoViewController</string> + <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> + <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics"> + <int key="interfaceOrientation">1</int> + </object> + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> + <bool key="IBUIHorizontal">NO</bool> + </object> + <object class="IBUIWindow" id="117978783"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">292</int> + <string key="NSFrameSize">{320, 480}</string> + <object class="NSColor" key="IBUIBackgroundColor"> + <int key="NSColorSpace">1</int> + <bytes key="NSRGB">MSAxIDEAA</bytes> + </object> + <bool key="IBUIOpaque">NO</bool> + <bool key="IBUIClearsContextBeforeDrawing">NO</bool> + <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> + <bool key="IBUIResizesToFullScreen">YES</bool> + </object> + </object> + <object class="IBObjectContainer" key="IBDocument.Objects"> + <object class="NSMutableArray" key="connectionRecords"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBConnectionRecord"> + <object class="IBCocoaTouchOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="841351856"/> + <reference key="destination" ref="664661524"/> + </object> + <int key="connectionID">4</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBCocoaTouchOutletConnection" key="connection"> + <string key="label">viewController</string> + <reference key="source" ref="664661524"/> + <reference key="destination" ref="943309135"/> + </object> + <int key="connectionID">11</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBCocoaTouchOutletConnection" key="connection"> + <string key="label">window</string> + <reference key="source" ref="664661524"/> + <reference key="destination" ref="117978783"/> + </object> + <int key="connectionID">14</int> + </object> + </object> + <object class="IBMutableOrderedSet" key="objectRecords"> + <object class="NSArray" key="orderedObjects"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBObjectRecord"> + <int key="objectID">0</int> + <reference key="object" ref="0"/> + <reference key="children" ref="1000"/> + <nil key="parent"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-1</int> + <reference key="object" ref="841351856"/> + <reference key="parent" ref="0"/> + <string key="objectName">File's Owner</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">3</int> + <reference key="object" ref="664661524"/> + <reference key="parent" ref="0"/> + <string key="objectName">ZIStoreButtonDemo App Delegate</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-2</int> + <reference key="object" ref="427554174"/> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">10</int> + <reference key="object" ref="943309135"/> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">12</int> + <reference key="object" ref="117978783"/> + <reference key="parent" ref="0"/> + </object> + </object> + </object> + <object class="NSMutableDictionary" key="flattenedProperties"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>-1.CustomClassName</string> + <string>-2.CustomClassName</string> + <string>10.CustomClassName</string> + <string>10.IBEditorWindowLastContentRect</string> + <string>10.IBPluginDependency</string> + <string>12.IBEditorWindowLastContentRect</string> + <string>12.IBPluginDependency</string> + <string>3.CustomClassName</string> + <string>3.IBPluginDependency</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>UIApplication</string> + <string>UIResponder</string> + <string>ZIStoreButtonDemoViewController</string> + <string>{{234, 376}, {320, 480}}</string> + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string>{{525, 346}, {320, 480}}</string> + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string>ZIStoreButtonDemoAppDelegate</string> + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + </object> + </object> + <object class="NSMutableDictionary" key="unlocalizedProperties"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference key="dict.sortedKeys" ref="0"/> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <nil key="activeLocalization"/> + <object class="NSMutableDictionary" key="localizations"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference key="dict.sortedKeys" ref="0"/> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <nil key="sourceID"/> + <int key="maxID">15</int> + </object> + <object class="IBClassDescriber" key="IBDocument.Classes"> + <object class="NSMutableArray" key="referencedPartialClassDescriptions"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBPartialClassDescription"> + <string key="className">UIWindow</string> + <string key="superclassName">UIView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBUserSource</string> + <string key="minorKey"/> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">ZIStoreButtonDemoAppDelegate</string> + <string key="superclassName">NSObject</string> + <object class="NSMutableDictionary" key="outlets"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>viewController</string> + <string>window</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>ZIStoreButtonDemoViewController</string> + <string>UIWindow</string> + </object> + </object> + <object class="NSMutableDictionary" key="toOneOutletInfosByName"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>viewController</string> + <string>window</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBToOneOutletInfo"> + <string key="name">viewController</string> + <string key="candidateClassName">ZIStoreButtonDemoViewController</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">window</string> + <string key="candidateClassName">UIWindow</string> + </object> + </object> + </object> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Classes/ZIStoreButtonDemoAppDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">ZIStoreButtonDemoAppDelegate</string> + <string key="superclassName">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBUserSource</string> + <string key="minorKey"/> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">ZIStoreButtonDemoViewController</string> + <string key="superclassName">UIViewController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Classes/ZIStoreButtonDemoViewController.h</string> + </object> + </object> + </object> + <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">Foundation.framework/Headers/NSError.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">Foundation.framework/Headers/NSObject.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">Foundation.framework/Headers/NSThread.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">Foundation.framework/Headers/NSURL.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier" id="356479594"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIApplication</string> + <string key="superclassName">UIResponder</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIResponder</string> + <string key="superclassName">NSObject</string> + <reference key="sourceIdentifier" ref="356479594"/> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UISearchBar</string> + <string key="superclassName">UIView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UISearchDisplayController</string> + <string key="superclassName">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UITextField.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIView</string> + <string key="superclassName">UIResponder</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UIView.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIViewController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIViewController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIViewController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIViewController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIViewController</string> + <string key="superclassName">UIResponder</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIWindow</string> + <string key="superclassName">UIView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">UIKit.framework/Headers/UIWindow.h</string> + </object> + </object> + </object> + </object> + <int key="IBDocument.localizationMode">0</int> + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string> + <integer value="1024" key="NS.object.0"/> + </object> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string> + <integer value="3100" key="NS.object.0"/> + </object> + <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> + <string key="IBDocument.LastKnownRelativeProjectPath">ZIStoreButtonDemo.xcodeproj</string> + <int key="IBDocument.defaultPropertyAccessControl">3</int> + <string key="IBCocoaTouchPluginVersion">112</string> + </data> +</archive> diff --git a/README b/README index e69de29..31a848b 100644 --- a/README +++ b/README @@ -0,0 +1 @@ +A UIButton subclass that mimic the "BUY NOW" button on the iOS App Store. \ No newline at end of file diff --git a/ZIStoreButtonDemo-Info.plist b/ZIStoreButtonDemo-Info.plist new file mode 100644 index 0000000..3289444 --- /dev/null +++ b/ZIStoreButtonDemo-Info.plist @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleDisplayName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>NSMainNibFile</key> + <string>MainWindow</string> +</dict> +</plist> diff --git a/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 b/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 new file mode 100644 index 0000000..61e42b5 --- /dev/null +++ b/ZIStoreButtonDemo.xcodeproj/brandon.mode1v3 @@ -0,0 +1,1405 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>ActivePerspectiveName</key> + <string>Project</string> + <key>AllowedModules</key> + <array> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>PBXSmartGroupTreeModule</string> + <key>Name</key> + <string>Groups and Files Outline View</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>PBXNavigatorGroup</string> + <key>Name</key> + <string>Editor</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>XCTaskListModule</string> + <key>Name</key> + <string>Task List</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>XCDetailModule</string> + <key>Name</key> + <string>File and Smart Group Detail Viewer</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>1</string> + <key>Module</key> + <string>PBXBuildResultsModule</string> + <key>Name</key> + <string>Detailed Build Results Viewer</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>1</string> + <key>Module</key> + <string>PBXProjectFindModule</string> + <key>Name</key> + <string>Project Batch Find Tool</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>XCProjectFormatConflictsModule</string> + <key>Name</key> + <string>Project Format Conflicts List</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>PBXBookmarksModule</string> + <key>Name</key> + <string>Bookmarks Tool</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>PBXClassBrowserModule</string> + <key>Name</key> + <string>Class Browser</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>PBXCVSModule</string> + <key>Name</key> + <string>Source Code Control Tool</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>PBXDebugBreakpointsModule</string> + <key>Name</key> + <string>Debug Breakpoints Tool</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>XCDockableInspector</string> + <key>Name</key> + <string>Inspector</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>PBXOpenQuicklyModule</string> + <key>Name</key> + <string>Open Quickly Tool</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>1</string> + <key>Module</key> + <string>PBXDebugSessionModule</string> + <key>Name</key> + <string>Debugger</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>1</string> + <key>Module</key> + <string>PBXDebugCLIModule</string> + <key>Name</key> + <string>Debug Console</string> + </dict> + <dict> + <key>BundleLoadPath</key> + <string></string> + <key>MaxInstances</key> + <string>n</string> + <key>Module</key> + <string>XCSnapshotModule</string> + <key>Name</key> + <string>Snapshots Tool</string> + </dict> + </array> + <key>BundlePath</key> + <string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string> + <key>Description</key> + <string>DefaultDescriptionKey</string> + <key>DockingSystemVisible</key> + <false/> + <key>Extension</key> + <string>mode1v3</string> + <key>FavBarConfig</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>CABCFC0811F6743900D7D98A</string> + <key>XCBarModuleItemNames</key> + <dict/> + <key>XCBarModuleItems</key> + <array/> + </dict> + <key>FirstTimeWindowDisplayed</key> + <false/> + <key>Identifier</key> + <string>com.apple.perspectives.project.mode1v3</string> + <key>MajorVersion</key> + <integer>33</integer> + <key>MinorVersion</key> + <integer>0</integer> + <key>Name</key> + <string>Default</string> + <key>Notifications</key> + <array/> + <key>OpenEditors</key> + <array/> + <key>PerspectiveWidths</key> + <array> + <integer>-1</integer> + <integer>-1</integer> + </array> + <key>Perspectives</key> + <array> + <dict> + <key>ChosenToolbarItems</key> + <array> + <string>active-combo-popup</string> + <string>action</string> + <string>NSToolbarFlexibleSpaceItem</string> + <string>servicesModuledebug</string> + <string>debugger-enable-breakpoints</string> + <string>clean</string> + <string>build-and-go</string> + <string>com.apple.ide.PBXToolbarStopButton</string> + <string>get-info</string> + <string>NSToolbarFlexibleSpaceItem</string> + <string>com.apple.pbx.toolbar.searchfield</string> + </array> + <key>ControllerClassBaseName</key> + <string></string> + <key>IconName</key> + <string>WindowOfProjectWithEditor</string> + <key>Identifier</key> + <string>perspective.project</string> + <key>IsVertical</key> + <false/> + <key>Layout</key> + <array> + <dict> + <key>ContentConfiguration</key> + <dict> + <key>PBXBottomSmartGroupGIDs</key> + <array> + <string>1C37FBAC04509CD000000102</string> + <string>1C37FAAC04509CD000000102</string> + <string>1C37FABC05509CD000000102</string> + <string>1C37FABC05539CD112110102</string> + <string>E2644B35053B69B200211256</string> + <string>1C37FABC04509CD000100104</string> + <string>1CC0EA4004350EF90044410B</string> + <string>1CC0EA4004350EF90041110B</string> + </array> + <key>PBXProjectModuleGUID</key> + <string>1CE0B1FE06471DED0097A5F4</string> + <key>PBXProjectModuleLabel</key> + <string>Files</string> + <key>PBXProjectStructureProvided</key> + <string>yes</string> + <key>PBXSmartGroupTreeModuleColumnData</key> + <dict> + <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> + <array> + <real>223</real> + </array> + <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> + <array> + <string>MainColumn</string> + </array> + </dict> + <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> + <dict> + <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> + <array> + <string>29B97314FDCFA39411CA2CEA</string> + <string>080E96DDFE201D6D7F000001</string> + <string>1C37FABC05509CD000000102</string> + </array> + <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> + <array> + <array> + <integer>2</integer> + <integer>1</integer> + <integer>0</integer> + </array> + </array> + <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> + <string>{{0, 0}, {223, 900}}</string> + </dict> + <key>PBXTopSmartGroupGIDs</key> + <array/> + <key>XCIncludePerspectivesSwitch</key> + <true/> + <key>XCSharingToken</key> + <string>com.apple.Xcode.GFSharingToken</string> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{0, 0}, {240, 918}}</string> + <key>GroupTreeTableConfiguration</key> + <array> + <string>MainColumn</string> + <real>223</real> + </array> + <key>RubberWindowFrame</key> + <string>1046 250 1290 959 0 0 2560 1418 </string> + </dict> + <key>Module</key> + <string>PBXSmartGroupTreeModule</string> + <key>Proportion</key> + <string>240pt</string> + </dict> + <dict> + <key>Dock</key> + <array> + <dict> + <key>BecomeActive</key> + <true/> + <key>ContentConfiguration</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1CE0B20306471E060097A5F4</string> + <key>PBXProjectModuleLabel</key> + <string>ZIStoreButtonDemoAppDelegate.h</string> + <key>PBXSplitModuleInNavigatorKey</key> + <dict> + <key>Split0</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1CE0B20406471E060097A5F4</string> + <key>PBXProjectModuleLabel</key> + <string>ZIStoreButtonDemoAppDelegate.h</string> + <key>_historyCapacity</key> + <integer>0</integer> + <key>bookmark</key> + <string>CAFFD36E11F887F80097DE9A</string> + <key>history</key> + <array> + <string>CABCFCC711F6881300D7D98A</string> + <string>CABCFCC911F6881300D7D98A</string> + <string>CAFFD36411F884B30097DE9A</string> + <string>CAFFD36511F884B30097DE9A</string> + <string>CAFFD36611F884B30097DE9A</string> + <string>CAFFD36711F884B30097DE9A</string> + <string>CAFFD36811F884B30097DE9A</string> + <string>CAFFD36D11F887F80097DE9A</string> + </array> + </dict> + <key>SplitCount</key> + <string>1</string> + </dict> + <key>StatusBarVisibility</key> + <true/> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{0, 0}, {1045, 913}}</string> + <key>RubberWindowFrame</key> + <string>1046 250 1290 959 0 0 2560 1418 </string> + </dict> + <key>Module</key> + <string>PBXNavigatorGroup</string> + <key>Proportion</key> + <string>913pt</string> + </dict> + <dict> + <key>ContentConfiguration</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1CE0B20506471E060097A5F4</string> + <key>PBXProjectModuleLabel</key> + <string>Detail</string> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{0, 918}, {1045, 0}}</string> + <key>RubberWindowFrame</key> + <string>1046 250 1290 959 0 0 2560 1418 </string> + </dict> + <key>Module</key> + <string>XCDetailModule</string> + <key>Proportion</key> + <string>0pt</string> + </dict> + </array> + <key>Proportion</key> + <string>1045pt</string> + </dict> + </array> + <key>Name</key> + <string>Project</string> + <key>ServiceClasses</key> + <array> + <string>XCModuleDock</string> + <string>PBXSmartGroupTreeModule</string> + <string>XCModuleDock</string> + <string>PBXNavigatorGroup</string> + <string>XCDetailModule</string> + </array> + <key>TableOfContents</key> + <array> + <string>CAFFD2F311F87DCC0097DE9A</string> + <string>1CE0B1FE06471DED0097A5F4</string> + <string>CAFFD2F411F87DCC0097DE9A</string> + <string>1CE0B20306471E060097A5F4</string> + <string>1CE0B20506471E060097A5F4</string> + </array> + <key>ToolbarConfigUserDefaultsMinorVersion</key> + <string>2</string> + <key>ToolbarConfiguration</key> + <string>xcode.toolbar.config.defaultV3</string> + </dict> + <dict> + <key>ControllerClassBaseName</key> + <string></string> + <key>IconName</key> + <string>WindowOfProject</string> + <key>Identifier</key> + <string>perspective.morph</string> + <key>IsVertical</key> + <integer>0</integer> + <key>Layout</key> + <array> + <dict> + <key>BecomeActive</key> + <integer>1</integer> + <key>ContentConfiguration</key> + <dict> + <key>PBXBottomSmartGroupGIDs</key> + <array> + <string>1C37FBAC04509CD000000102</string> + <string>1C37FAAC04509CD000000102</string> + <string>1C08E77C0454961000C914BD</string> + <string>1C37FABC05509CD000000102</string> + <string>1C37FABC05539CD112110102</string> + <string>E2644B35053B69B200211256</string> + <string>1C37FABC04509CD000100104</string> + <string>1CC0EA4004350EF90044410B</string> + <string>1CC0EA4004350EF90041110B</string> + </array> + <key>PBXProjectModuleGUID</key> + <string>11E0B1FE06471DED0097A5F4</string> + <key>PBXProjectModuleLabel</key> + <string>Files</string> + <key>PBXProjectStructureProvided</key> + <string>yes</string> + <key>PBXSmartGroupTreeModuleColumnData</key> + <dict> + <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> + <array> + <real>186</real> + </array> + <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> + <array> + <string>MainColumn</string> + </array> + </dict> + <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> + <dict> + <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> + <array> + <string>29B97314FDCFA39411CA2CEA</string> + <string>1C37FABC05509CD000000102</string> + </array> + <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> + <array> + <array> + <integer>0</integer> + </array> + </array> + <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> + <string>{{0, 0}, {186, 337}}</string> + </dict> + <key>PBXTopSmartGroupGIDs</key> + <array/> + <key>XCIncludePerspectivesSwitch</key> + <integer>1</integer> + <key>XCSharingToken</key> + <string>com.apple.Xcode.GFSharingToken</string> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{0, 0}, {203, 355}}</string> + <key>GroupTreeTableConfiguration</key> + <array> + <string>MainColumn</string> + <real>186</real> + </array> + <key>RubberWindowFrame</key> + <string>373 269 690 397 0 0 1440 878 </string> + </dict> + <key>Module</key> + <string>PBXSmartGroupTreeModule</string> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Name</key> + <string>Morph</string> + <key>PreferredWidth</key> + <integer>300</integer> + <key>ServiceClasses</key> + <array> + <string>XCModuleDock</string> + <string>PBXSmartGroupTreeModule</string> + </array> + <key>TableOfContents</key> + <array> + <string>11E0B1FE06471DED0097A5F4</string> + </array> + <key>ToolbarConfiguration</key> + <string>xcode.toolbar.config.default.shortV3</string> + </dict> + </array> + <key>PerspectivesBarVisible</key> + <false/> + <key>ShelfIsVisible</key> + <false/> + <key>SourceDescription</key> + <string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string> + <key>StatusbarIsVisible</key> + <true/> + <key>TimeStamp</key> + <real>0.0</real> + <key>ToolbarConfigUserDefaultsMinorVersion</key> + <string>2</string> + <key>ToolbarDisplayMode</key> + <integer>2</integer> + <key>ToolbarIsVisible</key> + <true/> + <key>ToolbarSizeMode</key> + <integer>2</integer> + <key>Type</key> + <string>Perspectives</string> + <key>UpdateMessage</key> + <string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?</string> + <key>WindowJustification</key> + <integer>5</integer> + <key>WindowOrderList</key> + <array> + <string>CAFFD30C11F87EC40097DE9A</string> + <string>CAFFD30511F87EAF0097DE9A</string> + <string>1C78EAAD065D492600B07095</string> + <string>1CD10A99069EF8BA00B06720</string> + <string>CABCFBEF11F6742100D7D98A</string> + <string>/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo.xcodeproj</string> + </array> + <key>WindowString</key> + <string>1046 250 1290 959 0 0 2560 1418 </string> + <key>WindowToolsV3</key> + <array> + <dict> + <key>FirstTimeWindowDisplayed</key> + <false/> + <key>Identifier</key> + <string>windowTool.build</string> + <key>IsVertical</key> + <true/> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>ContentConfiguration</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1CD0528F0623707200166675</string> + <key>PBXProjectModuleLabel</key> + <string></string> + <key>StatusBarVisibility</key> + <true/> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{0, 0}, {500, 218}}</string> + <key>RubberWindowFrame</key> + <string>125 872 500 500 0 0 2560 1418 </string> + </dict> + <key>Module</key> + <string>PBXNavigatorGroup</string> + <key>Proportion</key> + <string>218pt</string> + </dict> + <dict> + <key>ContentConfiguration</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>XCMainBuildResultsModuleGUID</string> + <key>PBXProjectModuleLabel</key> + <string>Build Results</string> + <key>XCBuildResultsTrigger_Collapse</key> + <integer>1021</integer> + <key>XCBuildResultsTrigger_Open</key> + <integer>1011</integer> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{0, 223}, {500, 236}}</string> + <key>RubberWindowFrame</key> + <string>125 872 500 500 0 0 2560 1418 </string> + </dict> + <key>Module</key> + <string>PBXBuildResultsModule</string> + <key>Proportion</key> + <string>236pt</string> + </dict> + </array> + <key>Proportion</key> + <string>459pt</string> + </dict> + </array> + <key>Name</key> + <string>Build Results</string> + <key>ServiceClasses</key> + <array> + <string>PBXBuildResultsModule</string> + </array> + <key>StatusbarIsVisible</key> + <true/> + <key>TableOfContents</key> + <array> + <string>CABCFBEF11F6742100D7D98A</string> + <string>CAFFD2F511F87DCC0097DE9A</string> + <string>1CD0528F0623707200166675</string> + <string>XCMainBuildResultsModuleGUID</string> + </array> + <key>ToolbarConfiguration</key> + <string>xcode.toolbar.config.buildV3</string> + <key>WindowContentMinSize</key> + <string>486 300</string> + <key>WindowString</key> + <string>125 872 500 500 0 0 2560 1418 </string> + <key>WindowToolGUID</key> + <string>CABCFBEF11F6742100D7D98A</string> + <key>WindowToolIsVisible</key> + <false/> + </dict> + <dict> + <key>FirstTimeWindowDisplayed</key> + <false/> + <key>Identifier</key> + <string>windowTool.debugger</string> + <key>IsVertical</key> + <true/> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>ContentConfiguration</key> + <dict> + <key>Debugger</key> + <dict> + <key>HorizontalSplitView</key> + <dict> + <key>_collapsingFrameDimension</key> + <real>0.0</real> + <key>_indexOfCollapsedView</key> + <integer>0</integer> + <key>_percentageOfCollapsedView</key> + <real>0.0</real> + <key>isCollapsed</key> + <string>yes</string> + <key>sizes</key> + <array> + <string>{{0, 0}, {316, 198}}</string> + <string>{{316, 0}, {378, 198}}</string> + </array> + </dict> + <key>VerticalSplitView</key> + <dict> + <key>_collapsingFrameDimension</key> + <real>0.0</real> + <key>_indexOfCollapsedView</key> + <integer>0</integer> + <key>_percentageOfCollapsedView</key> + <real>0.0</real> + <key>isCollapsed</key> + <string>yes</string> + <key>sizes</key> + <array> + <string>{{0, 0}, {694, 198}}</string> + <string>{{0, 198}, {694, 183}}</string> + </array> + </dict> + </dict> + <key>LauncherConfigVersion</key> + <string>8</string> + <key>PBXProjectModuleGUID</key> + <string>1C162984064C10D400B95A72</string> + <key>PBXProjectModuleLabel</key> + <string>Debug - GLUTExamples (Underwater)</string> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>DebugConsoleVisible</key> + <string>None</string> + <key>DebugConsoleWindowFrame</key> + <string>{{200, 200}, {500, 300}}</string> + <key>DebugSTDIOWindowFrame</key> + <string>{{200, 200}, {500, 300}}</string> + <key>Frame</key> + <string>{{0, 0}, {694, 381}}</string> + <key>PBXDebugSessionStackFrameViewKey</key> + <dict> + <key>DebugVariablesTableConfiguration</key> + <array> + <string>Name</string> + <real>120</real> + <string>Value</string> + <real>85</real> + <string>Summary</string> + <real>148</real> + </array> + <key>Frame</key> + <string>{{316, 0}, {378, 198}}</string> + <key>RubberWindowFrame</key> + <string>1104 774 694 422 0 0 2560 1418 </string> + </dict> + <key>RubberWindowFrame</key> + <string>1104 774 694 422 0 0 2560 1418 </string> + </dict> + <key>Module</key> + <string>PBXDebugSessionModule</string> + <key>Proportion</key> + <string>381pt</string> + </dict> + </array> + <key>Proportion</key> + <string>381pt</string> + </dict> + </array> + <key>Name</key> + <string>Debugger</string> + <key>ServiceClasses</key> + <array> + <string>PBXDebugSessionModule</string> + </array> + <key>StatusbarIsVisible</key> + <true/> + <key>TableOfContents</key> + <array> + <string>1CD10A99069EF8BA00B06720</string> + <string>CAFFD2FD11F87EAF0097DE9A</string> + <string>1C162984064C10D400B95A72</string> + <string>CAFFD2FE11F87EAF0097DE9A</string> + <string>CAFFD2FF11F87EAF0097DE9A</string> + <string>CAFFD30011F87EAF0097DE9A</string> + <string>CAFFD30111F87EAF0097DE9A</string> + <string>CAFFD30211F87EAF0097DE9A</string> + </array> + <key>ToolbarConfiguration</key> + <string>xcode.toolbar.config.debugV3</string> + <key>WindowString</key> + <string>1104 774 694 422 0 0 2560 1418 </string> + <key>WindowToolGUID</key> + <string>1CD10A99069EF8BA00B06720</string> + <key>WindowToolIsVisible</key> + <false/> + </dict> + <dict> + <key>Identifier</key> + <string>windowTool.find</string> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>ContentConfiguration</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1CDD528C0622207200134675</string> + <key>PBXProjectModuleLabel</key> + <string>&lt;No Editor&gt;</string> + <key>PBXSplitModuleInNavigatorKey</key> + <dict> + <key>Split0</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1CD0528D0623707200166675</string> + </dict> + <key>SplitCount</key> + <string>1</string> + </dict> + <key>StatusBarVisibility</key> + <integer>1</integer> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{0, 0}, {781, 167}}</string> + <key>RubberWindowFrame</key> + <string>62 385 781 470 0 0 1440 878 </string> + </dict> + <key>Module</key> + <string>PBXNavigatorGroup</string> + <key>Proportion</key> + <string>781pt</string> + </dict> + </array> + <key>Proportion</key> + <string>50%</string> + </dict> + <dict> + <key>BecomeActive</key> + <integer>1</integer> + <key>ContentConfiguration</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1CD0528E0623707200166675</string> + <key>PBXProjectModuleLabel</key> + <string>Project Find</string> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{8, 0}, {773, 254}}</string> + <key>RubberWindowFrame</key> + <string>62 385 781 470 0 0 1440 878 </string> + </dict> + <key>Module</key> + <string>PBXProjectFindModule</string> + <key>Proportion</key> + <string>50%</string> + </dict> + </array> + <key>Proportion</key> + <string>428pt</string> + </dict> + </array> + <key>Name</key> + <string>Project Find</string> + <key>ServiceClasses</key> + <array> + <string>PBXProjectFindModule</string> + </array> + <key>StatusbarIsVisible</key> + <integer>1</integer> + <key>TableOfContents</key> + <array> + <string>1C530D57069F1CE1000CFCEE</string> + <string>1C530D58069F1CE1000CFCEE</string> + <string>1C530D59069F1CE1000CFCEE</string> + <string>1CDD528C0622207200134675</string> + <string>1C530D5A069F1CE1000CFCEE</string> + <string>1CE0B1FE06471DED0097A5F4</string> + <string>1CD0528E0623707200166675</string> + </array> + <key>WindowString</key> + <string>62 385 781 470 0 0 1440 878 </string> + <key>WindowToolGUID</key> + <string>1C530D57069F1CE1000CFCEE</string> + <key>WindowToolIsVisible</key> + <integer>0</integer> + </dict> + <dict> + <key>Identifier</key> + <string>MENUSEPARATOR</string> + </dict> + <dict> + <key>FirstTimeWindowDisplayed</key> + <false/> + <key>Identifier</key> + <string>windowTool.debuggerConsole</string> + <key>IsVertical</key> + <true/> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>ContentConfiguration</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1C78EAAC065D492600B07095</string> + <key>PBXProjectModuleLabel</key> + <string>Debugger Console</string> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{0, 0}, {650, 209}}</string> + <key>RubberWindowFrame</key> + <string>1104 946 650 250 0 0 2560 1418 </string> + </dict> + <key>Module</key> + <string>PBXDebugCLIModule</string> + <key>Proportion</key> + <string>209pt</string> + </dict> + </array> + <key>Proportion</key> + <string>209pt</string> + </dict> + </array> + <key>Name</key> + <string>Debugger Console</string> + <key>ServiceClasses</key> + <array> + <string>PBXDebugCLIModule</string> + </array> + <key>StatusbarIsVisible</key> + <true/> + <key>TableOfContents</key> + <array> + <string>1C78EAAD065D492600B07095</string> + <string>CAFFD30311F87EAF0097DE9A</string> + <string>1C78EAAC065D492600B07095</string> + </array> + <key>ToolbarConfiguration</key> + <string>xcode.toolbar.config.consoleV3</string> + <key>WindowString</key> + <string>1104 946 650 250 0 0 2560 1418 </string> + <key>WindowToolGUID</key> + <string>1C78EAAD065D492600B07095</string> + <key>WindowToolIsVisible</key> + <false/> + </dict> + <dict> + <key>Identifier</key> + <string>windowTool.snapshots</string> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>Module</key> + <string>XCSnapshotModule</string> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Name</key> + <string>Snapshots</string> + <key>ServiceClasses</key> + <array> + <string>XCSnapshotModule</string> + </array> + <key>StatusbarIsVisible</key> + <string>Yes</string> + <key>ToolbarConfiguration</key> + <string>xcode.toolbar.config.snapshots</string> + <key>WindowString</key> + <string>315 824 300 550 0 0 1440 878 </string> + <key>WindowToolIsVisible</key> + <string>Yes</string> + </dict> + <dict> + <key>Identifier</key> + <string>windowTool.scm</string> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>ContentConfiguration</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1C78EAB2065D492600B07095</string> + <key>PBXProjectModuleLabel</key> + <string>&lt;No Editor&gt;</string> + <key>PBXSplitModuleInNavigatorKey</key> + <dict> + <key>Split0</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1C78EAB3065D492600B07095</string> + </dict> + <key>SplitCount</key> + <string>1</string> + </dict> + <key>StatusBarVisibility</key> + <integer>1</integer> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{0, 0}, {452, 0}}</string> + <key>RubberWindowFrame</key> + <string>743 379 452 308 0 0 1280 1002 </string> + </dict> + <key>Module</key> + <string>PBXNavigatorGroup</string> + <key>Proportion</key> + <string>0pt</string> + </dict> + <dict> + <key>BecomeActive</key> + <integer>1</integer> + <key>ContentConfiguration</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1CD052920623707200166675</string> + <key>PBXProjectModuleLabel</key> + <string>SCM</string> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>ConsoleFrame</key> + <string>{{0, 259}, {452, 0}}</string> + <key>Frame</key> + <string>{{0, 7}, {452, 259}}</string> + <key>RubberWindowFrame</key> + <string>743 379 452 308 0 0 1280 1002 </string> + <key>TableConfiguration</key> + <array> + <string>Status</string> + <real>30</real> + <string>FileName</string> + <real>199</real> + <string>Path</string> + <real>197.0950012207031</real> + </array> + <key>TableFrame</key> + <string>{{0, 0}, {452, 250}}</string> + </dict> + <key>Module</key> + <string>PBXCVSModule</string> + <key>Proportion</key> + <string>262pt</string> + </dict> + </array> + <key>Proportion</key> + <string>266pt</string> + </dict> + </array> + <key>Name</key> + <string>SCM</string> + <key>ServiceClasses</key> + <array> + <string>PBXCVSModule</string> + </array> + <key>StatusbarIsVisible</key> + <integer>1</integer> + <key>TableOfContents</key> + <array> + <string>1C78EAB4065D492600B07095</string> + <string>1C78EAB5065D492600B07095</string> + <string>1C78EAB2065D492600B07095</string> + <string>1CD052920623707200166675</string> + </array> + <key>ToolbarConfiguration</key> + <string>xcode.toolbar.config.scm</string> + <key>WindowString</key> + <string>743 379 452 308 0 0 1280 1002 </string> + </dict> + <dict> + <key>Identifier</key> + <string>windowTool.breakpoints</string> + <key>IsVertical</key> + <integer>0</integer> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>BecomeActive</key> + <integer>1</integer> + <key>ContentConfiguration</key> + <dict> + <key>PBXBottomSmartGroupGIDs</key> + <array> + <string>1C77FABC04509CD000000102</string> + </array> + <key>PBXProjectModuleGUID</key> + <string>1CE0B1FE06471DED0097A5F4</string> + <key>PBXProjectModuleLabel</key> + <string>Files</string> + <key>PBXProjectStructureProvided</key> + <string>no</string> + <key>PBXSmartGroupTreeModuleColumnData</key> + <dict> + <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> + <array> + <real>168</real> + </array> + <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> + <array> + <string>MainColumn</string> + </array> + </dict> + <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key> + <dict> + <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> + <array> + <string>1C77FABC04509CD000000102</string> + </array> + <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> + <array> + <array> + <integer>0</integer> + </array> + </array> + <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> + <string>{{0, 0}, {168, 350}}</string> + </dict> + <key>PBXTopSmartGroupGIDs</key> + <array/> + <key>XCIncludePerspectivesSwitch</key> + <integer>0</integer> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{0, 0}, {185, 368}}</string> + <key>GroupTreeTableConfiguration</key> + <array> + <string>MainColumn</string> + <real>168</real> + </array> + <key>RubberWindowFrame</key> + <string>315 424 744 409 0 0 1440 878 </string> + </dict> + <key>Module</key> + <string>PBXSmartGroupTreeModule</string> + <key>Proportion</key> + <string>185pt</string> + </dict> + <dict> + <key>ContentConfiguration</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>1CA1AED706398EBD00589147</string> + <key>PBXProjectModuleLabel</key> + <string>Detail</string> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{{190, 0}, {554, 368}}</string> + <key>RubberWindowFrame</key> + <string>315 424 744 409 0 0 1440 878 </string> + </dict> + <key>Module</key> + <string>XCDetailModule</string> + <key>Proportion</key> + <string>554pt</string> + </dict> + </array> + <key>Proportion</key> + <string>368pt</string> + </dict> + </array> + <key>MajorVersion</key> + <integer>3</integer> + <key>MinorVersion</key> + <integer>0</integer> + <key>Name</key> + <string>Breakpoints</string> + <key>ServiceClasses</key> + <array> + <string>PBXSmartGroupTreeModule</string> + <string>XCDetailModule</string> + </array> + <key>StatusbarIsVisible</key> + <integer>1</integer> + <key>TableOfContents</key> + <array> + <string>1CDDB66807F98D9800BB5817</string> + <string>1CDDB66907F98D9800BB5817</string> + <string>1CE0B1FE06471DED0097A5F4</string> + <string>1CA1AED706398EBD00589147</string> + </array> + <key>ToolbarConfiguration</key> + <string>xcode.toolbar.config.breakpointsV3</string> + <key>WindowString</key> + <string>315 424 744 409 0 0 1440 878 </string> + <key>WindowToolGUID</key> + <string>1CDDB66807F98D9800BB5817</string> + <key>WindowToolIsVisible</key> + <integer>1</integer> + </dict> + <dict> + <key>Identifier</key> + <string>windowTool.debugAnimator</string> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>Module</key> + <string>PBXNavigatorGroup</string> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Name</key> + <string>Debug Visualizer</string> + <key>ServiceClasses</key> + <array> + <string>PBXNavigatorGroup</string> + </array> + <key>StatusbarIsVisible</key> + <integer>1</integer> + <key>ToolbarConfiguration</key> + <string>xcode.toolbar.config.debugAnimatorV3</string> + <key>WindowString</key> + <string>100 100 700 500 0 0 1280 1002 </string> + </dict> + <dict> + <key>Identifier</key> + <string>windowTool.bookmarks</string> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>Module</key> + <string>PBXBookmarksModule</string> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Name</key> + <string>Bookmarks</string> + <key>ServiceClasses</key> + <array> + <string>PBXBookmarksModule</string> + </array> + <key>StatusbarIsVisible</key> + <integer>0</integer> + <key>WindowString</key> + <string>538 42 401 187 0 0 1280 1002 </string> + </dict> + <dict> + <key>Identifier</key> + <string>windowTool.projectFormatConflicts</string> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>Module</key> + <string>XCProjectFormatConflictsModule</string> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Name</key> + <string>Project Format Conflicts</string> + <key>ServiceClasses</key> + <array> + <string>XCProjectFormatConflictsModule</string> + </array> + <key>StatusbarIsVisible</key> + <integer>0</integer> + <key>WindowContentMinSize</key> + <string>450 300</string> + <key>WindowString</key> + <string>50 850 472 307 0 0 1440 877</string> + </dict> + <dict> + <key>Identifier</key> + <string>windowTool.classBrowser</string> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>BecomeActive</key> + <integer>1</integer> + <key>ContentConfiguration</key> + <dict> + <key>OptionsSetName</key> + <string>Hierarchy, all classes</string> + <key>PBXProjectModuleGUID</key> + <string>1CA6456E063B45B4001379D8</string> + <key>PBXProjectModuleLabel</key> + <string>Class Browser - NSObject</string> + </dict> + <key>GeometryConfiguration</key> + <dict> + <key>ClassesFrame</key> + <string>{{0, 0}, {374, 96}}</string> + <key>ClassesTreeTableConfiguration</key> + <array> + <string>PBXClassNameColumnIdentifier</string> + <real>208</real> + <string>PBXClassBookColumnIdentifier</string> + <real>22</real> + </array> + <key>Frame</key> + <string>{{0, 0}, {630, 331}}</string> + <key>MembersFrame</key> + <string>{{0, 105}, {374, 395}}</string> + <key>MembersTreeTableConfiguration</key> + <array> + <string>PBXMemberTypeIconColumnIdentifier</string> + <real>22</real> + <string>PBXMemberNameColumnIdentifier</string> + <real>216</real> + <string>PBXMemberTypeColumnIdentifier</string> + <real>97</real> + <string>PBXMemberBookColumnIdentifier</string> + <real>22</real> + </array> + <key>PBXModuleWindowStatusBarHidden2</key> + <integer>1</integer> + <key>RubberWindowFrame</key> + <string>385 179 630 352 0 0 1440 878 </string> + </dict> + <key>Module</key> + <string>PBXClassBrowserModule</string> + <key>Proportion</key> + <string>332pt</string> + </dict> + </array> + <key>Proportion</key> + <string>332pt</string> + </dict> + </array> + <key>Name</key> + <string>Class Browser</string> + <key>ServiceClasses</key> + <array> + <string>PBXClassBrowserModule</string> + </array> + <key>StatusbarIsVisible</key> + <integer>0</integer> + <key>TableOfContents</key> + <array> + <string>1C0AD2AF069F1E9B00FABCE6</string> + <string>1C0AD2B0069F1E9B00FABCE6</string> + <string>1CA6456E063B45B4001379D8</string> + </array> + <key>ToolbarConfiguration</key> + <string>xcode.toolbar.config.classbrowser</string> + <key>WindowString</key> + <string>385 179 630 352 0 0 1440 878 </string> + <key>WindowToolGUID</key> + <string>1C0AD2AF069F1E9B00FABCE6</string> + <key>WindowToolIsVisible</key> + <integer>0</integer> + </dict> + <dict> + <key>Identifier</key> + <string>windowTool.refactoring</string> + <key>IncludeInToolsMenu</key> + <integer>0</integer> + <key>Layout</key> + <array> + <dict> + <key>Dock</key> + <array> + <dict> + <key>BecomeActive</key> + <integer>1</integer> + <key>GeometryConfiguration</key> + <dict> + <key>Frame</key> + <string>{0, 0}, {500, 335}</string> + <key>RubberWindowFrame</key> + <string>{0, 0}, {500, 335}</string> + </dict> + <key>Module</key> + <string>XCRefactoringModule</string> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Proportion</key> + <string>100%</string> + </dict> + </array> + <key>Name</key> + <string>Refactoring</string> + <key>ServiceClasses</key> + <array> + <string>XCRefactoringModule</string> + </array> + <key>WindowString</key> + <string>200 200 500 356 0 0 1920 1200 </string> + </dict> + </array> +</dict> +</plist> diff --git a/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser b/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser new file mode 100644 index 0000000..3146928 --- /dev/null +++ b/ZIStoreButtonDemo.xcodeproj/brandon.pbxuser @@ -0,0 +1,259 @@ +// !$*UTF8*$! +{ + 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; + sepNavSelRange = "{779, 0}"; + sepNavVisRange = "{0, 1130}"; + }; + }; + 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */ = { + uiCtxt = { + sepNavFolds = "{\n c = (\n {\n r = \"{1100, 236}\";\n s = 0;\n },\n {\n r = \"{1406, 446}\";\n s = 0;\n },\n {\n r = \"{1924, 351}\";\n s = 0;\n },\n {\n r = \"{2348, 165}\";\n s = 0;\n },\n {\n r = \"{2582, 205}\";\n s = 0;\n },\n {\n r = \"{2854, 118}\";\n s = 0;\n },\n {\n r = \"{3097, 140}\";\n s = 0;\n },\n {\n r = \"{3258, 74}\";\n s = 0;\n }\n );\n r = \"{0, 3341}\";\n s = 0;\n}"; + sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; + sepNavSelRange = "{162, 592}"; + sepNavVisRange = "{0, 1614}"; + }; + }; + 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */ = { + activeExec = 0; + executables = ( + CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */, + ); + }; + 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; + sepNavSelRange = "{165, 593}"; + sepNavVisRange = "{0, 933}"; + }; + }; + 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */ = { + uiCtxt = { + sepNavFolds = "{\n c = (\n {\n r = \"{2514, 1009}\";\n s = 0;\n },\n {\n r = \"{3620, 115}\";\n s = 0;\n },\n {\n r = \"{3772, 155}\";\n s = 0;\n },\n {\n r = \"{3954, 83}\";\n s = 0;\n },\n {\n r = \"{4058, 22}\";\n s = 0;\n }\n );\n r = \"{0, 4088}\";\n s = 0;\n}"; + sepNavIntBoundsRect = "{{0, 0}, {1698, 929}}"; + sepNavSelRange = "{704, 0}"; + sepNavVisRange = "{0, 2683}"; + }; + }; + 29B97313FDCFA39411CA2CEA /* Project object */ = { + activeBuildConfigurationName = Debug; + activeExecutable = CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */; + activeSDKPreference = iphonesimulator4.0; + activeTarget = 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */; + addToTargets = ( + 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */, + ); + breakpoints = ( + ); + codeSenseManager = CABCFBE811F671F800D7D98A /* Code sense */; + executables = ( + CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */, + ); + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 806, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 301497796; + PBXWorkspaceStateSaveDate = 301497796; + }; + perUserProjectItems = { + CABCFCC711F6881300D7D98A /* PBXTextBookmark */ = CABCFCC711F6881300D7D98A /* PBXTextBookmark */; + CABCFCC911F6881300D7D98A /* PBXTextBookmark */ = CABCFCC911F6881300D7D98A /* PBXTextBookmark */; + CAFFD36411F884B30097DE9A /* PBXTextBookmark */ = CAFFD36411F884B30097DE9A /* PBXTextBookmark */; + CAFFD36511F884B30097DE9A /* PBXTextBookmark */ = CAFFD36511F884B30097DE9A /* PBXTextBookmark */; + CAFFD36611F884B30097DE9A /* PBXTextBookmark */ = CAFFD36611F884B30097DE9A /* PBXTextBookmark */; + CAFFD36711F884B30097DE9A /* PBXTextBookmark */ = CAFFD36711F884B30097DE9A /* PBXTextBookmark */; + CAFFD36811F884B30097DE9A /* PBXTextBookmark */ = CAFFD36811F884B30097DE9A /* PBXTextBookmark */; + CAFFD36D11F887F80097DE9A /* PBXTextBookmark */ = CAFFD36D11F887F80097DE9A /* PBXTextBookmark */; + CAFFD36E11F887F80097DE9A /* PBXTextBookmark */ = CAFFD36E11F887F80097DE9A /* PBXTextBookmark */; + }; + sourceControlManager = CABCFBE711F671F800D7D98A /* Source Control */; + userBuildSettings = { + }; + }; + CABCFBDD11F671D900D7D98A /* ZIStoreButtonDemo */ = { + isa = PBXExecutable; + activeArgIndices = ( + ); + argumentStrings = ( + ); + autoAttachOnCrash = 1; + breakpointsEnabled = 1; + configStateDict = { + }; + customDataFormattersEnabled = 1; + dataTipCustomDataFormattersEnabled = 1; + dataTipShowTypeColumn = 1; + dataTipSortType = 0; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + executableSystemSymbolLevel = 0; + executableUserSymbolLevel = 0; + libgmallocEnabled = 0; + name = ZIStoreButtonDemo; + savedGlobals = { + }; + showTypeColumn = 0; + sourceDirectories = ( + ); + variableFormatDictionary = { + }; + }; + CABCFBE711F671F800D7D98A /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + CABCFBE811F671F800D7D98A /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {984, 881}}"; + sepNavSelRange = "{145, 0}"; + sepNavVisRange = "{0, 892}"; + }; + }; + CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */ = { + uiCtxt = { + sepNavFolds = "{\n c = (\n {\n r = \"{3771, 2332}\";\n s = 0;\n },\n {\n r = \"{6149, 51}\";\n s = 0;\n },\n {\n r = \"{6241, 118}\";\n s = 0;\n },\n {\n r = \"{6437, 35}\";\n s = 0;\n },\n {\n r = \"{6493, 22}\";\n s = 0;\n }\n );\n r = \"{0, 6524}\";\n s = 0;\n}"; + sepNavIntBoundsRect = "{{0, 0}, {1236, 1012}}"; + sepNavSelRange = "{145, 0}"; + sepNavVisRange = "{0, 3658}"; + }; + }; + CABCFCC711F6881300D7D98A /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = CABCFCC811F6881300D7D98A /* UIButton.h */; + name = "UIButton.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 4639; + vrLoc = 90; + }; + CABCFCC811F6881300D7D98A /* UIButton.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = UIButton.h; + path = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIButton.h; + sourceTree = "<absolute>"; + }; + CABCFCC911F6881300D7D98A /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = CABCFCCA11F6881300D7D98A /* UIControl.h */; + name = "UIControl.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 3155; + vrLoc = 29; + }; + CABCFCCA11F6881300D7D98A /* UIControl.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = UIControl.h; + path = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIControl.h; + sourceTree = "<absolute>"; + }; + CAFFD36411F884B30097DE9A /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */; + name = "ZIStoreButton.m: 8"; + rLen = 0; + rLoc = 145; + rType = 0; + vrLen = 3658; + vrLoc = 0; + }; + CAFFD36511F884B30097DE9A /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */; + name = "ZIStoreButton.h: 8"; + rLen = 0; + rLoc = 145; + rType = 0; + vrLen = 892; + vrLoc = 0; + }; + CAFFD36611F884B30097DE9A /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; + name = "ZIStoreButtonDemoViewController.m: 22"; + rLen = 0; + rLoc = 704; + rType = 0; + vrLen = 4041; + vrLoc = 0; + }; + CAFFD36711F884B30097DE9A /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */; + name = "ZIStoreButtonDemoViewController.h: 9"; + rLen = 593; + rLoc = 165; + rType = 0; + vrLen = 933; + vrLoc = 0; + }; + CAFFD36811F884B30097DE9A /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */; + name = "ZIStoreButtonDemoAppDelegate.m: 9"; + rLen = 592; + rLoc = 162; + rType = 0; + vrLen = 3341; + vrLoc = 0; + }; + CAFFD36D11F887F80097DE9A /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */; + name = "ZIStoreButtonDemoAppDelegate.h: 9"; + rLen = 606; + rLoc = 162; + rType = 0; + vrLen = 1144; + vrLoc = 0; + }; + CAFFD36E11F887F80097DE9A /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */; + name = "ZIStoreButtonDemoAppDelegate.h: 25"; + rLen = 0; + rLoc = 779; + rType = 0; + vrLen = 1130; + vrLoc = 0; + }; +} diff --git a/ZIStoreButtonDemo.xcodeproj/project.pbxproj b/ZIStoreButtonDemo.xcodeproj/project.pbxproj new file mode 100755 index 0000000..0018069 --- /dev/null +++ b/ZIStoreButtonDemo.xcodeproj/project.pbxproj @@ -0,0 +1,261 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 1D3623260D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */; }; + 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + 2899E5220DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib */; }; + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; + 28D7ACF80DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */; }; + CABCFBEC11F6725800D7D98A /* ZIStoreButton.m in Sources */ = {isa = PBXBuildFile; fileRef = CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */; }; + CABCFBF811F6743000D7D98A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CABCFBF711F6743000D7D98A /* QuartzCore.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButtonDemoAppDelegate.h; sourceTree = "<group>"; }; + 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZIStoreButtonDemoAppDelegate.m; sourceTree = "<group>"; }; + 1D6058910D05DD3D006BFB54 /* ZIStoreButtonDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZIStoreButtonDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 2899E5210DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ZIStoreButtonDemoViewController.xib; sourceTree = "<group>"; }; + 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; }; + 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButtonDemoViewController.h; sourceTree = "<group>"; }; + 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZIStoreButtonDemoViewController.m; sourceTree = "<group>"; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; + 32CA4F630368D1EE00C91783 /* ZIStoreButtonDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButtonDemo_Prefix.pch; sourceTree = "<group>"; }; + 8D1107310486CEB800E47090 /* ZIStoreButtonDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ZIStoreButtonDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; }; + CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZIStoreButton.h; sourceTree = "<group>"; }; + CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZIStoreButton.m; sourceTree = "<group>"; }; + CABCFBF711F6743000D7D98A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, + CABCFBF811F6743000D7D98A /* QuartzCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 1D3623240D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.h */, + 1D3623250D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m */, + 28D7ACF60DDB3853001CB0EB /* ZIStoreButtonDemoViewController.h */, + 28D7ACF70DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m */, + CABCFBEA11F6725800D7D98A /* ZIStoreButton.h */, + CABCFBEB11F6725800D7D98A /* ZIStoreButton.m */, + ); + path = Classes; + sourceTree = "<group>"; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* ZIStoreButtonDemo.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = "<group>"; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* ZIStoreButtonDemo_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = "<group>"; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 2899E5210DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib */, + 28AD733E0D9D9553002E5188 /* MainWindow.xib */, + 8D1107310486CEB800E47090 /* ZIStoreButtonDemo-Info.plist */, + ); + name = Resources; + sourceTree = "<group>"; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 288765A40DF7441C002DB57D /* CoreGraphics.framework */, + CABCFBF711F6743000D7D98A /* QuartzCore.framework */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ZIStoreButtonDemo" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ZIStoreButtonDemo; + productName = ZIStoreButtonDemo; + productReference = 1D6058910D05DD3D006BFB54 /* ZIStoreButtonDemo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ZIStoreButtonDemo" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* ZIStoreButtonDemo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, + 2899E5220DE3E06400AC0155 /* ZIStoreButtonDemoViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* ZIStoreButtonDemoAppDelegate.m in Sources */, + 28D7ACF80DDB3853001CB0EB /* ZIStoreButtonDemoViewController.m in Sources */, + CABCFBEC11F6725800D7D98A /* ZIStoreButton.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ZIStoreButtonDemo_Prefix.pch; + INFOPLIST_FILE = "ZIStoreButtonDemo-Info.plist"; + PRODUCT_NAME = ZIStoreButtonDemo; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ZIStoreButtonDemo_Prefix.pch; + INFOPLIST_FILE = "ZIStoreButtonDemo-Info.plist"; + PRODUCT_NAME = ZIStoreButtonDemo; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = iphoneos4.0; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PREBINDING = NO; + SDKROOT = iphoneos4.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ZIStoreButtonDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ZIStoreButtonDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/ZIStoreButtonDemoViewController.xib b/ZIStoreButtonDemoViewController.xib new file mode 100644 index 0000000..5382c22 --- /dev/null +++ b/ZIStoreButtonDemoViewController.xib @@ -0,0 +1,156 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> + <data> + <int key="IBDocument.SystemTarget">800</int> + <string key="IBDocument.SystemVersion">10C540</string> + <string key="IBDocument.InterfaceBuilderVersion">759</string> + <string key="IBDocument.AppKitVersion">1038.25</string> + <string key="IBDocument.HIToolboxVersion">458.00</string> + <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> + <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="NS.object.0">77</string> + </object> + <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> + <bool key="EncodedWithXMLCoder">YES</bool> + <integer value="6"/> + </object> + <object class="NSArray" key="IBDocument.PluginDependencies"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + </object> + <object class="NSMutableDictionary" key="IBDocument.Metadata"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys" id="0"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBProxyObject" id="372490531"> + <string key="IBProxiedObjectIdentifier">IBFilesOwner</string> + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> + </object> + <object class="IBProxyObject" id="843779117"> + <string key="IBProxiedObjectIdentifier">IBFirstResponder</string> + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> + </object> + <object class="IBUIView" id="774585933"> + <reference key="NSNextResponder"/> + <int key="NSvFlags">274</int> + <string key="NSFrameSize">{320, 460}</string> + <reference key="NSSuperview"/> + <object class="NSColor" key="IBUIBackgroundColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC43NQA</bytes> + <object class="NSColorSpace" key="NSCustomColorSpace"> + <int key="NSID">2</int> + </object> + </object> + <bool key="IBUIClearsContextBeforeDrawing">NO</bool> + <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> + </object> + </object> + <object class="IBObjectContainer" key="IBDocument.Objects"> + <object class="NSMutableArray" key="connectionRecords"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBConnectionRecord"> + <object class="IBCocoaTouchOutletConnection" key="connection"> + <string key="label">view</string> + <reference key="source" ref="372490531"/> + <reference key="destination" ref="774585933"/> + </object> + <int key="connectionID">7</int> + </object> + </object> + <object class="IBMutableOrderedSet" key="objectRecords"> + <object class="NSArray" key="orderedObjects"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBObjectRecord"> + <int key="objectID">0</int> + <reference key="object" ref="0"/> + <reference key="children" ref="1000"/> + <nil key="parent"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-1</int> + <reference key="object" ref="372490531"/> + <reference key="parent" ref="0"/> + <string key="objectName">File's Owner</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-2</int> + <reference key="object" ref="843779117"/> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">6</int> + <reference key="object" ref="774585933"/> + <reference key="parent" ref="0"/> + </object> + </object> + </object> + <object class="NSMutableDictionary" key="flattenedProperties"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>-1.CustomClassName</string> + <string>-2.CustomClassName</string> + <string>6.IBEditorWindowLastContentRect</string> + <string>6.IBPluginDependency</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>ZIStoreButtonDemoViewController</string> + <string>UIResponder</string> + <string>{{239, 654}, {320, 480}}</string> + <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + </object> + </object> + <object class="NSMutableDictionary" key="unlocalizedProperties"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference key="dict.sortedKeys" ref="0"/> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <nil key="activeLocalization"/> + <object class="NSMutableDictionary" key="localizations"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference key="dict.sortedKeys" ref="0"/> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <nil key="sourceID"/> + <int key="maxID">7</int> + </object> + <object class="IBClassDescriber" key="IBDocument.Classes"> + <object class="NSMutableArray" key="referencedPartialClassDescriptions"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBPartialClassDescription"> + <string key="className">ZIStoreButtonDemoViewController</string> + <string key="superclassName">UIViewController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Classes/ZIStoreButtonDemoViewController.h</string> + </object> + </object> + </object> + </object> + <int key="IBDocument.localizationMode">0</int> + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string> + <integer value="3100" key="NS.object.0"/> + </object> + <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> + <string key="IBDocument.LastKnownRelativeProjectPath">ZIStoreButtonDemo.xcodeproj</string> + <int key="IBDocument.defaultPropertyAccessControl">3</int> + <string key="IBCocoaTouchPluginVersion">77</string> + <nil key="IBCocoaTouchSimulationTargetRuntimeIdentifier"/> + </data> +</archive> diff --git a/ZIStoreButtonDemo_Prefix.pch b/ZIStoreButtonDemo_Prefix.pch new file mode 100644 index 0000000..a0cf901 --- /dev/null +++ b/ZIStoreButtonDemo_Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'ZIStoreButtonDemo' target in the 'ZIStoreButtonDemo' project +// + +#ifdef __OBJC__ + #import <Foundation/Foundation.h> + #import <UIKit/UIKit.h> +#endif diff --git a/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM/Contents/Info.plist b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM/Contents/Info.plist new file mode 100644 index 0000000..39ddbe3 --- /dev/null +++ b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM/Contents/Info.plist @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> + <dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleIdentifier</key> + <string>com.apple.xcode.dsym.com.yourcompany.ZIStoreButtonDemo</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>dSYM</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + </dict> +</plist> diff --git a/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM/Contents/Resources/DWARF/ZIStoreButtonDemo b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM/Contents/Resources/DWARF/ZIStoreButtonDemo new file mode 100644 index 0000000..2474126 Binary files /dev/null and b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM/Contents/Resources/DWARF/ZIStoreButtonDemo differ diff --git a/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist new file mode 100644 index 0000000..20255ed Binary files /dev/null and b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist differ diff --git a/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib new file mode 100644 index 0000000..11b1eee Binary files /dev/null and b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib differ diff --git a/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo new file mode 100755 index 0000000..e3ac72c Binary files /dev/null and b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo differ diff --git a/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib new file mode 100644 index 0000000..00f2911 Binary files /dev/null and b/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o new file mode 100644 index 0000000..1652879 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o~$ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o~$ new file mode 100644 index 0000000..b447317 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o~$ differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o~> b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o~> new file mode 100644 index 0000000..e69de29 diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o~? b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o~? new file mode 100644 index 0000000..6cce2f7 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o~? differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemo.LinkFileList b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemo.LinkFileList new file mode 100644 index 0000000..abfaad1 --- /dev/null +++ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemo.LinkFileList @@ -0,0 +1,4 @@ +/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o +/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o +/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o +/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o new file mode 100644 index 0000000..65ba77c Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o~$ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o~$ new file mode 100644 index 0000000..9224df7 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o~$ differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o~> b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o~> new file mode 100644 index 0000000..e69de29 diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o new file mode 100644 index 0000000..2b6e999 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~$ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~$ new file mode 100644 index 0000000..aa155bb Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~$ differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~> b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o~> new file mode 100644 index 0000000..e69de29 diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o new file mode 100644 index 0000000..18a15fb Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap new file mode 100644 index 0000000..5d74c43 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap new file mode 100644 index 0000000..dd8b535 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap new file mode 100644 index 0000000..5d74c43 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap new file mode 100644 index 0000000..1bb5ec7 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo.dep b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo.dep new file mode 100644 index 0000000..20af78f --- /dev/null +++ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo.dep @@ -0,0 +1,12 @@ +ffffffffffffffffffffffffffffffff ebcff396169973d54676391b2a82c9b3 ffffffffffffffffffffffffffffffff 49036 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o +ffffffffffffffffffffffffffffffff 3a1facf008b298b6c368446bd67b5c09 ffffffffffffffffffffffffffffffff 102 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM +ffffffffffffffffffffffffffffffff cc8e20f57b2411221ca97c08195fcfc9 ffffffffffffffffffffffffffffffff 238 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +ffffffffffffffffffffffffffffffff 20231bdbb895e24fb4d971f9f8995467 ffffffffffffffffffffffffffffffff 33688 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +ffffffffffffffffffffffffffffffff 85427a6e95d5920c0f5392a0f786ea93 ffffffffffffffffffffffffffffffff 46344 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o +ffffffffffffffffffffffffffffffff 6ee8d47b1b3cf9af35c774d3f8a8f044 ffffffffffffffffffffffffffffffff 56684 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o +de262bf8812c5ab26061f5ffa91b56c8 c7684a4c49094266e6178deba2c90092 ffffffffffffffffffffffffffffffff 6312 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o +000000004bbfb48c0000000000001d60 de262bf8cad1a4dc6061f5ffa91b430a ffffffffffffffffffffffffffffffff 15232016 /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch +000000004c463a590000000000001a6d 4377dc436b53874a2b6101362d0d0f2c ffffffffffffffffffffffffffffffff 795 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib +000000004c463a590000000000004ea1 d3e04376d9c3ced44eb8c017826d1086 ffffffffffffffffffffffffffffffff 1143 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib +00000000000000000000000000000000 fb89d27dd399bf913fd0ccbd14d98fb1 ffffffffffffffffffffffffffffffff 8 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo +00000000000000000000000000000000 fb89d27dd399bf913fd0ccbd14d98fb1 ffffffffffffffffffffffffffffffff 637 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo.hmap b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo.hmap new file mode 100644 index 0000000..3c8c4c4 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo.hmap differ diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo~.dep b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo~.dep new file mode 100644 index 0000000..e4e25a2 --- /dev/null +++ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo~.dep @@ -0,0 +1,12 @@ +de262bf8816e3dc26061f5ffa91b4163 6ee8d47b1b3cf9af35c774d3f8a8f044 ffffffffffffffffffffffffffffffff 56684 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o +de262bf881220f0b6061f5ffa91b55cb 85427a6e95d5920c0f5392a0f786ea93 ffffffffffffffffffffffffffffffff 0 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o +de262bf881220a366061f5ffa91b575e ebcff396169973d54676391b2a82c9b3 ffffffffffffffffffffffffffffffff 49036 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o +de262bf8812c5ab26061f5ffa91b56c8 c7684a4c49094266e6178deba2c90092 ffffffffffffffffffffffffffffffff 6312 /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o +000000004c463a590000000000004ea1 d3e04376d9c3ced44eb8c017826d1086 ffffffffffffffffffffffffffffffff 1143 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib +000000004c463a590000000000001a6d 4377dc436b53874a2b6101362d0d0f2c ffffffffffffffffffffffffffffffff 795 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib +00000000000000000000000000000000 fb89d27dd399bf913fd0ccbd14d98fb1 ffffffffffffffffffffffffffffffff 637 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist +00000000000000000000000000000000 fb89d27dd399bf913fd0ccbd14d98fb1 ffffffffffffffffffffffffffffffff 8 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo +ffffffffffffffffffffffffffffffff 3a1facf008b298b6c368446bd67b5c09 ffffffffffffffffffffffffffffffff 0 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM +ffffffffffffffffffffffffffffffff cc8e20f57b2411221ca97c08195fcfc9 ffffffffffffffffffffffffffffffff 0 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +ffffffffffffffffffffffffffffffff 20231bdbb895e24fb4d971f9f8995467 ffffffffffffffffffffffffffffffff 0 /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +000000004bbfb48c0000000000001d60 de262bf8cad1a4dc6061f5ffa91b430a ffffffffffffffffffffffffffffffff 15232016 /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/build-state.dat b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/build-state.dat new file mode 100644 index 0000000..edb1b27 --- /dev/null +++ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/build-state.dat @@ -0,0 +1,300 @@ +TZIStoreButtonDemo +v7 +r0 +t301499116.954070 +cCheck dependencies +cProcessInfoPlistFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist ZIStoreButtonDemo-Info.plist +cCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib +cCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib +cProcessPCH /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch ZIStoreButtonDemo_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2 +cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o /Users/brandon/Documents/ZIStoreButtonDemo/main.m normal i386 objective-c com.apple.compilers.gcc.4_2 +cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m normal i386 objective-c com.apple.compilers.gcc.4_2 +cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m normal i386 objective-c com.apple.compilers.gcc.4_2 +cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m normal i386 objective-c com.apple.compilers.gcc.4_2 +cLd /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo normal i386 +cGenerateDSYMFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +cTouch /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk +c000000004C1771EE0000000000000132 +t1276604910 +s306 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics +c000000004BFDFE39000000000027C7D0 +t1274936889 +s2607056 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation +c000000004BFDFE7C000000000029D5D0 +t1274936956 +s2741712 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +c000000004BFDFE6E0000000000001466 +t1274936942 +s5222 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +c000000004C04586B00000000000000C4 +t1275353195 +s196 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/QuartzCore.framework/QuartzCore +c000000004C0458E90000000000151D30 +t1275353321 +s1383728 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +c000000004C0470BB00000000000009CD +t1275359419 +s2509 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit +c000000004C0471620000000001D47210 +t1275359586 +s30700048 + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.h +c000000004C484D05000000000000037C +t1279806725 +s892 +i<UIKit/UIKit.h> +i<QuartzCore/QuartzCore.h> + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m +c000000004C484D11000000000000197C +t1279806737 +s6524 +i"ZIStoreButton.h" + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.h +c000000004C484D31000000000000046A +t1279806769 +s1130 +i<UIKit/UIKit.h> + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m +c000000004C484D290000000000000D0D +t1279806761 +s3341 +i"ZIStoreButtonDemoAppDelegate.h" +i"ZIStoreButtonDemoViewController.h" + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.h +c000000004C484D1F00000000000003A5 +t1279806751 +s933 +i<UIKit/UIKit.h> +i<QuartzCore/QuartzCore.h> + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m +c000000004C484CEF0000000000000FF8 +t1279806703 +s4088 +i"ZIStoreButtonDemoViewController.h" +i"ZIStoreButton.h" +i<QuartzCore/QuartzCore.h> + +N/Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib +c000000004C463A590000000000004EA1 +t1279670873 +s20129 + +N/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib +c000000004C463A590000000000001A6D +t1279670873 +s6765 + +N/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo_Prefix.pch +c000000004C463A5900000000000000CB +t1279670873 +s203 +i<Foundation/Foundation.h> +i<UIKit/UIKit.h> + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +t1279806316 +s238 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM +t1279806316 +s102 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist +t1279805218 +s637 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib +t1279805219 +s1143 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo +t1279805218 +s8 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +t1279806316 +s33688 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib +t1279805219 +s795 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o +t1279805278 +s56684 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemo.LinkFileList +c000000004C4847220000000000000284 +t1279805218 +s644 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o +t1279805219 +s49036 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o +t1279806316 +s46344 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o +t1279805219 +s6312 + +N/Users/brandon/Documents/ZIStoreButtonDemo/main.m +c000000004C463A59000000000000016F +t1279670873 +s367 +i<UIKit/UIKit.h> + +N/var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch +t1279671480 +s15232016 + +NZIStoreButtonDemo-Info.plist +c000000004C463A59000000000000038D +t1279670873 +s909 + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies301499116#301499116#0(0"0(0#1#0"8631221696#0"0# + +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m normal i386 objective-c com.apple.compilers.gcc.4_2 +s301498078.258379 +e301498078.456289 +r1 +xCompileC +xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o +x/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.gcc.4_2 +lSLF07#2@74"Compile /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m301498078#301498078#0(0"0(0#0#66"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m8630914880#2171" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o 0# + +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m normal i386 objective-c com.apple.compilers.gcc.4_2 +s301498019.226548 +e301498019.325151 +r1 +xCompileC +xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o +x/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.gcc.4_2 +lSLF07#2@89"Compile /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m301498019#301498019#0(0"0(0#0#81"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m8632513120#2201" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o 0# + +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m normal i386 objective-c com.apple.compilers.gcc.4_2 +s301499116.741516 +e301499116.920729 +r1 +xCompileC +xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o +x/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.gcc.4_2 +lSLF07#2@92"Compile /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301499116#301499116#0(0"0(0#0#84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m8630713440#2207" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o 0# + +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o /Users/brandon/Documents/ZIStoreButtonDemo/main.m normal i386 objective-c com.apple.compilers.gcc.4_2 +s301498019.225772 +e301498019.324979 +r1 +xCompileC +xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o +x/Users/brandon/Documents/ZIStoreButtonDemo/main.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.gcc.4_2 +lSLF07#2@57"Compile /Users/brandon/Documents/ZIStoreButtonDemo/main.m301498019#301498019#0(0"0(0#0#49"/Users/brandon/Documents/ZIStoreButtonDemo/main.m8632742592#2145" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/main.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o 0# + +CCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib +s301498018.903372 +e301498019.225599 +r1 +xCompileXIB +x/Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib +lSLF07#2@25"CompileXIB MainWindow.xib301498018#301498019#0(0"0(0#0#57"/Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib8632291360#592" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv IBC_MINIMUM_COMPATIBILITY_VERSION 4.0 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib /Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk 0# + +CCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib +s301498018.903882 +e301498019.216301 +r1 +xCompileXIB +x/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib +lSLF07#2@46"CompileXIB ZIStoreButtonDemoViewController.xib301498018#301498019#0(0"0(0#0#78"/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib8632145344#634" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv IBC_MINIMUM_COMPATIBILITY_VERSION 4.0 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk 0# + +CGenerateDSYMFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +s301499116.938235 +e301499116.952099 +r1 +xGenerateDSYMFile +x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM +x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +lSLF07#2@139"GenerateDSYMFile build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo301499116#301499116#0(0"0(0#0#110"/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo8632449632#425" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/dsymutil /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo -o /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM 0# + +CLd /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo normal i386 +s301499116.920802 +e301499116.938157 +r1 +xLd +x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +xnormal +xi386 +lSLF07#2@115"Link /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo301499116#301499116#0(0"0(0#0#0"8632677344#992" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -L/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -filelist /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemo.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -o /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo 0# + +CProcessInfoPlistFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist ZIStoreButtonDemo-Info.plist +s301498018.900152 +e301498018.903316 +r1 +xProcessInfoPlistFile +x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist +xZIStoreButtonDemo-Info.plist +lSLF07#2@36"Process ZIStoreButtonDemo-Info.plist301498018#301498018#0(0"0(0#0#71"/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo-Info.plist8634432512#521" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" builtin-infoPlistUtility ZIStoreButtonDemo-Info.plist -genpkginfo /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -o /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist 0# + +CProcessPCH /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch ZIStoreButtonDemo_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2 +s301364280.086918 +e301364280.568132 +r1 +xProcessPCH +x/var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch +xZIStoreButtonDemo_Prefix.pch +xnormal +xi386 +xobjective-c +xcom.apple.compilers.gcc.4_2 +lSLF07#2@39"Precompile ZIStoreButtonDemo_Prefix.pch301364280#301364280#0(0"0(0#0#71"/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo_Prefix.pch8820361984#2023" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -c /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo_Prefix.pch -o /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch 0# + +CTouch /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +s301499116.952165 +e301499116.954047 +r1 +xTouch +x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +lSLF07#2@98"Touch /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app301499116#301499116#0(0"0(0#0#0"8632332800#296" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /usr/bin/touch -c /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app 0# + diff --git a/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/build-state~.dat b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/build-state~.dat new file mode 100644 index 0000000..4c2b6ec --- /dev/null +++ b/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/build-state~.dat @@ -0,0 +1,308 @@ +TZIStoreButtonDemo +v7 +r0 +t301498019.399244 +cCheck dependencies +cProcessInfoPlistFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist ZIStoreButtonDemo-Info.plist +cCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib +cCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib +cProcessPCH /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch ZIStoreButtonDemo_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2 +cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o /Users/brandon/Documents/ZIStoreButtonDemo/main.m normal i386 objective-c com.apple.compilers.gcc.4_2 +cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m normal i386 objective-c com.apple.compilers.gcc.4_2 +cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m normal i386 objective-c com.apple.compilers.gcc.4_2 +cCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m normal i386 objective-c com.apple.compilers.gcc.4_2 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk +c000000004C1771EE0000000000000132 +t1276604910 +s306 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics +c000000004BFDFE39000000000027C7D0 +t1274936889 +s2607056 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation +c000000004BFDFE7C000000000029D5D0 +t1274936956 +s2741712 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +c000000004BFDFE6E0000000000001466 +t1274936942 +s5222 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +c000000004C04586B00000000000000C4 +t1275353195 +s196 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/QuartzCore.framework/QuartzCore +c000000004C0458E90000000000151D30 +t1275353321 +s1383728 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +c000000004C0470BB00000000000009CD +t1275359419 +s2509 + +N/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit +c000000004C0471620000000001D47210 +t1275359586 +s30700048 + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.h +c000000004C484263000000000000012A +t1279804003 +s298 +i<UIKit/UIKit.h> +i<QuartzCore/QuartzCore.h> + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m +c000000004C484721000000000000172A +t1279805217 +s5930 +i"ZIStoreButton.h" + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.h +c000000004C463AC10000000000000218 +t1279670977 +s536 +i<UIKit/UIKit.h> + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m +c000000004C463ABD0000000000000ABB +t1279670973 +s2747 +i"ZIStoreButtonDemoAppDelegate.h" +i"ZIStoreButtonDemoViewController.h" + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.h +c000000004C4842710000000000000153 +t1279804017 +s339 +i<UIKit/UIKit.h> +i<QuartzCore/QuartzCore.h> + +N/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m +c000000004C4847220000000000000B1C +t1279805218 +s2844 +i"ZIStoreButtonDemoViewController.h" +i"ZIStoreButton.h" +i<QuartzCore/QuartzCore.h> + +N/Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib +c000000004C463A590000000000004EA1 +t1279670873 +s20129 + +N/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib +c000000004C463A590000000000001A6D +t1279670873 +s6765 + +N/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo_Prefix.pch +c000000004C463A5900000000000000CB +t1279670873 +s203 +i<Foundation/Foundation.h> +i<UIKit/UIKit.h> + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +t2 +s0 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM +t2 +s0 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist +t1279805218 +s637 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib +t1279805219 +s1143 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo +t1279805218 +s8 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +t2 +s0 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib +t1279805219 +s795 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o +t1279805219 +s56684 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemo.LinkFileList +c000000004C4847220000000000000284 +t1279805218 +s644 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o +t1279805219 +s49036 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o +t2 +s0 + +N/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o +t1279805219 +s6312 + +N/Users/brandon/Documents/ZIStoreButtonDemo/main.m +c000000004C463A59000000000000016F +t1279670873 +s367 +i<UIKit/UIKit.h> + +N/var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch +t1279671480 +s15232016 + +NZIStoreButtonDemo-Info.plist +c000000004C463A59000000000000038D +t1279670873 +s909 + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies301498018#301498018#0(0"0(0#1#0"8630580992#0"0# + +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m normal i386 objective-c com.apple.compilers.gcc.4_2 +s301498019.280711 +e301498019.399183 +r1 +xCompileC +xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o +x/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.gcc.4_2 +lSLF07#2@74"Compile /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m301498019#301498019#0(0"0(0#0#66"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m8634236256#2171" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButton.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButton.o 0# + +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m normal i386 objective-c com.apple.compilers.gcc.4_2 +s301498019.226548 +e301498019.325151 +r1 +xCompileC +xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o +x/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.gcc.4_2 +lSLF07#2@89"Compile /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m301498019#301498019#0(0"0(0#0#81"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m8632513120#2201" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoAppDelegate.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoAppDelegate.o 0# + +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m normal i386 objective-c com.apple.compilers.gcc.4_2 +s301498019.227235 +e301498019.356074 +r0 +xCompileC +xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o +x/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.gcc.4_2 +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m: In function '-[ZIStoreButtonDemoViewController viewDidLoad]': +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:42: error: expected identifier or '(' before '}' token +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:45: error: 'backgroundLayer' undeclared (first use in this function) +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:45: error: (Each undeclared identifier is reported only once +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:45: error: for each function it appears in.) +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:45: error: expected ';' before '{' token +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:94: error: expected declaration or statement at end of input +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m: At top level: +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:94: warning: '@end' missing in implementation context +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:94: warning: incomplete implementation of class 'ZIStoreButtonDemoViewController' +o/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:94: warning: method definition for '-backgroundLayer' not found +lSLF07#2@92"Compile /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301498019#301498019#0(1545"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m: In function '-[ZIStoreButtonDemoViewController viewDidLoad]': /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:42: error: expected identifier or '(' before '}' token /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:45: error: 'backgroundLayer' undeclared (first use in this function) /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:45: error: (Each undeclared identifier is reported only once /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:45: error: for each function it appears in.) /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:45: error: expected ';' before '{' token /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:94: error: expected declaration or statement at end of input /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m: At top level: /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:94: warning: '@end' missing in implementation context /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:94: warning: incomplete implementation of class 'ZIStoreButtonDemoViewController' /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m:94: warning: method definition for '-backgroundLayer' not found 8(4@43"Expected identifier or '(' before '}' token301498019#148#140#0(6@84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301498018#42#0#42#0#19"expected * before *0(4@57"'backgroundLayer' undeclared (first use in this function)301498019#288#154#0(6@84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301498018#45#0#45#0#43"'*' undeclared (first use in this function)0(4@29"Expected ';' before '{' token301498019#718#126#0(6@84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301498018#45#0#45#0#19"expected * before *0(4@49"Expected declaration or statement at end of input301498019#844#146#0(6@84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301498018#94#0#94#0#49"expected declaration or statement at end of input0(23@13"At top level:301498019#990#100#0(6@84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301498018#0#0#0#0#0"0(22@40"'@end' missing in implementation context301498019#1090#139#0(6@84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301498018#94#0#94#0#40"'@end' missing in implementation context0(22@68"Incomplete implementation of class 'ZIStoreButtonDemoViewController'301498019#1229#167#0(6@84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301498018#94#0#94#0#38"incomplete implementation of class '*'0(22@50"Method definition for '-backgroundLayer' not found301498019#1396#149#0(6@84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m301498018#94#0#94#0#35"method definition for '*' not found0(0#0#84"/Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m8632130720#2207" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/Classes/ZIStoreButtonDemoViewController.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemoViewController.o 1# + +CCompileC build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o /Users/brandon/Documents/ZIStoreButtonDemo/main.m normal i386 objective-c com.apple.compilers.gcc.4_2 +s301498019.225772 +e301498019.324979 +r1 +xCompileC +xbuild/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o +x/Users/brandon/Documents/ZIStoreButtonDemo/main.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.gcc.4_2 +lSLF07#2@57"Compile /Users/brandon/Documents/ZIStoreButtonDemo/main.m301498019#301498019#0(0"0(0#0#49"/Users/brandon/Documents/ZIStoreButtonDemo/main.m8632742592#2145" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -include /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch -c /Users/brandon/Documents/ZIStoreButtonDemo/main.m -o /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/main.o 0# + +CCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib +s301498018.903372 +e301498019.225599 +r1 +xCompileXIB +x/Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib +lSLF07#2@25"CompileXIB MainWindow.xib301498018#301498019#0(0"0(0#0#57"/Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib8632291360#592" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv IBC_MINIMUM_COMPATIBILITY_VERSION 4.0 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/MainWindow.nib /Users/brandon/Documents/ZIStoreButtonDemo/MainWindow.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk 0# + +CCompileXIB /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib +s301498018.903882 +e301498019.216301 +r1 +xCompileXIB +x/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib +lSLF07#2@46"CompileXIB ZIStoreButtonDemoViewController.xib301498018#301498019#0(0"0(0#0#78"/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib8632145344#634" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv IBC_MINIMUM_COMPATIBILITY_VERSION 4.0 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemoViewController.nib /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemoViewController.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk 0# + +CGenerateDSYMFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +s301497616.651180 +e301497616.664363 +r1 +xGenerateDSYMFile +x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM +x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +lSLF07#2@139"GenerateDSYMFile build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo301497616#301497616#0(0"0(0#0#110"/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo8631084192#425" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/dsymutil /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo -o /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app.dSYM 0# + +CLd /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo normal i386 +s301497616.633547 +e301497616.651100 +r1 +xLd +x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo +xnormal +xi386 +lSLF07#2@115"Link /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo301497616#301497616#0(0"0(0#0#0"8632634848#992" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -L/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -filelist /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/Objects-normal/i386/ZIStoreButtonDemo.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -o /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/ZIStoreButtonDemo 0# + +CProcessInfoPlistFile /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist ZIStoreButtonDemo-Info.plist +s301498018.900152 +e301498018.903316 +r1 +xProcessInfoPlistFile +x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist +xZIStoreButtonDemo-Info.plist +lSLF07#2@36"Process ZIStoreButtonDemo-Info.plist301498018#301498018#0(0"0(0#0#71"/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo-Info.plist8634432512#521" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" builtin-infoPlistUtility ZIStoreButtonDemo-Info.plist -genpkginfo /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -o /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app/Info.plist 0# + +CProcessPCH /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch ZIStoreButtonDemo_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2 +s301364280.086918 +e301364280.568132 +r1 +xProcessPCH +x/var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch +xZIStoreButtonDemo_Prefix.pch +xnormal +xi386 +xobjective-c +xcom.apple.compilers.gcc.4_2 +lSLF07#2@39"Precompile ZIStoreButtonDemo_Prefix.pch301364280#301364280#0(0"0(0#0#71"/Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo_Prefix.pch8820361984#2023" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-generated-files.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-own-target-headers.hmap -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-all-target-headers.hmap -iquote /Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/ZIStoreButtonDemo-project-headers.hmap -F/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator -I/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/include -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources/i386 -I/Users/brandon/Documents/ZIStoreButtonDemo/build/ZIStoreButtonDemo.build/Debug-iphonesimulator/ZIStoreButtonDemo.build/DerivedSources -c /Users/brandon/Documents/ZIStoreButtonDemo/ZIStoreButtonDemo_Prefix.pch -o /var/folders/rT/rT4R5oaYFTarlmLpPBeVYE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/ZIStoreButtonDemo_Prefix-ceslvpevikdydmfojhhteushjtyg/ZIStoreButtonDemo_Prefix.pch.gch 0# + +CTouch /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +s301497616.664430 +e301497616.666341 +r1 +xTouch +x/Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app +lSLF07#2@98"Touch /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app301497616#301497616#0(0"0(0#0#0"8630352640#296" cd /Users/brandon/Documents/ZIStoreButtonDemo setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /usr/bin/touch -c /Users/brandon/Documents/ZIStoreButtonDemo/build/Debug-iphonesimulator/ZIStoreButtonDemo.app 0# + diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/categories.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/categories.pbxbtree new file mode 100644 index 0000000..5555623 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/categories.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree new file mode 100644 index 0000000..cd98dae Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/cdecls.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree new file mode 100644 index 0000000..9a2a510 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/decls.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree new file mode 100644 index 0000000..1928375 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/files.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree new file mode 100644 index 0000000..bfbbf2e Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/imports.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header new file mode 100644 index 0000000..92cf6d0 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/pbxindex.header differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/protocols.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/protocols.pbxbtree new file mode 100644 index 0000000..363f0ae Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/protocols.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree new file mode 100644 index 0000000..0fa46b4 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/refs.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control new file mode 100644 index 0000000..94dce71 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/control differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings new file mode 100644 index 0000000..ef90f20 Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/strings.pbxstrings/strings differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/subclasses.pbxbtree b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/subclasses.pbxbtree new file mode 100644 index 0000000..f91c6ed Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/subclasses.pbxbtree differ diff --git a/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols new file mode 100644 index 0000000..9928d0b Binary files /dev/null and b/build/ZIStoreButtonDemo.build/ZIStoreButtonDemo.pbxindex/symbols0.pbxsymbols differ diff --git a/main.m b/main.m new file mode 100644 index 0000000..a5ebc17 --- /dev/null +++ b/main.m @@ -0,0 +1,17 @@ +// +// main.m +// ZIStoreButtonDemo +// +// Created by Brandon Emrich on 7/20/10. +// Copyright Zueos, Inc. 2010. All rights reserved. +// + +#import <UIKit/UIKit.h> + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); + [pool release]; + return retVal; +}
fguillen/Sitoi
1b0869f1210a42440c755383bc962730cd424ba6
adjust anchors
diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index fb3973d..b36e26f 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,185 +1,183 @@ @import "grid.css"; html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, ol, ul, li, fieldset, form, label { margin: 0; padding: 0; border: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; } *:focus { outline: none; } html { font-size: 100.01%; } body { font-size: 62.5%; line-height: 2.38em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; font-family: "helvetica", "arial", "sans-serif"; background: #F4F4F4; color: #35342D; } h1, h2, p, ul, ol { font-size: 1.4em; } strong { font-weight: bold; } em { font-style: italic; } form, fieldset { display: block; } fieldset { margin-top: 2em; } label { font-weight: bold; display: block; margin-right: 0.8em; } a { color: #d6532f; font-weight: bold; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } sup { vertical-align: baseline; } #sitoi { width: 60em; padding: 0em 5em; margin: 0 auto; margin-top: 2.4em; overflow: hidden; } hgroup { margin-bottom: 2.2em; } nav { float: right; } nav ul { margin-top: 0.4em; list-style-type: none; } nav li { float: left; - margin-left: 1.5em; } nav a { display: block; - background: #EEE; padding: 0.4em 1em; } .content { padding: 0 6em; padding-top: 35.6em; background: #FFF url(/images/beta/header.png) center 0 no-repeat; -webkit-border-radius: 8px; -webkit-box-shadow: #EFEFEF 2px 2px 0px; } .content h1 { font-weight: bold; font-size: 1.8em; margin-bottom: 0.8em; } .tutorial { background: url(/images/beta/icons.png) 2em 0.5em no-repeat; overflow: hidden; margin-top: 3.2em; } .step { margin-bottom: 3.4em; padding-left: 14em; overflow: hidden; } .step h2 { font-weight: bold; font-size: 1.6em; margin-bottom: 0.8em; } .step h2 span { color: #FFF; font-size: 0.8em; background: #CC512B; padding: 0.3em 0.6em; margin-right: 0.48em; vertical-align: baseline; -webkit-border-radius: 10px; } .newsletter { padding-top: 3.4em; padding-bottom: 5.2em; border-top: 1px dashed #ddd; background: #FFF; } .newsletter h1 { font-weight: bold; font-size: 1.6em; margin-bottom: 0.6em; } .newsletter label { display: inline; } .newsletter .text { font-size: 1em; padding: 0.3em; width: 200px; margin-right: 0.8em; } .newsletter .submit { font-size: 1em; padding: 0.32em 0.6em 0.4em 0.6em; background: #d6532f; -webkit-border-radius: 4px; border: none; color: #fff; } footer p { color: #999; text-align: center; font-size: 1.1em; margin: 2em 0; } \ No newline at end of file
fguillen/Sitoi
25c5a52474e395b900c15aa2a8558d9194b22c23
product brand coming together
diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index e54f38b..d3c3a2c 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,63 +1,69 @@ <hgroup> - <img src="/images/beta/logo.png" alt="Logo"> + <img src="/images/beta/logo.png"> + <nav> + <ul> + <li><a href="">Apúntate a beta</a></li> + <li><a href="">Contacto</a></li> + </ul> + </nav> </hgroup> -<section class="about"> +<section class="content"> <header><h1>¿Qué es Sitoi?</h1></header> <p> Sitoi es una sencilla herramienta para gestionar <em>online</em> la venta y alquiler de espacios. Si tienes que organizar una feria, un camping, un garaje o incluso una boda, Sitoi es lo que estabas buscando. </p> - <section class="steps"> + <section class="tutorial"> <section class="step"> <header><h2><span>1</span> Sube tu plano</h2></header> <p> No pierdas tiempo dibujando en el ordenador, escanea el plano de tu espacio y súbelo. </p> </section> <section class="step"> <header><h2><span>2</span> Marca los espacios</h2></header> <p> A continuación pincha en cada espacio que quieras vender o alquilar, pon el precio y los m<sup>2</sup>. </p> </section> <section class="step"> <header><h2><span>3</span> ¡A vender o alquilar!</h2></header> <p> Y ya está, dale a publicar y tus clientes pueden pagarte directamente con tarjeta o Paypal. </p> </section> </section> -</section> - -<section class="newsletter"> - <header><h1>Apúntate a la beta</h1></header> - <p> - Sitoi todavía no está listo pero te podemos avisar para - que seas el primero en probarlo. Nunca te enviaremos spam, - prometido. - </p> - <form action="submit" method="get" accept-charset="utf-8"> - <fieldset> + <section class="newsletter"> + <header><h1>Apúntate a la beta</h1></header> <p> - <label>Correo</label> - <input name="email" placeholder="nombre@dominio.com" class="text" value=""> - <input type="submit" class="submit" value="Apuntadme"> + Sitoi todavía no está listo pero te podemos avisar para + que seas el primero en probarlo. Nunca te enviaremos spam, + prometido. </p> - </fieldset> - </form> + + <form action="submit" method="get" accept-charset="utf-8"> + <fieldset> + <p> + <label>Tu correo</label> + <input name="email" placeholder="nombre@dominio.com" class="text" value=""> + <input type="submit" class="submit" value="¡Apuntadme!"> + </p> + </fieldset> + </form> + </section> </section> <footer> <p>© 2010 Sitoi • ¿Tienes dudas? <a href="">Contacta con nosotros</a></p> </footer> \ No newline at end of file diff --git a/public/images/beta/bg.png b/public/images/beta/bg.png new file mode 100644 index 0000000..00c7d8f Binary files /dev/null and b/public/images/beta/bg.png differ diff --git a/public/images/beta/header.png b/public/images/beta/header.png index 3e04cdc..34b9433 100644 Binary files a/public/images/beta/header.png and b/public/images/beta/header.png differ diff --git a/public/images/beta/logo.png b/public/images/beta/logo.png index ff114f2..cb3b6de 100644 Binary files a/public/images/beta/logo.png and b/public/images/beta/logo.png differ diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index 334ef0a..fb3973d 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,180 +1,185 @@ @import "grid.css"; html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, ol, ul, li, fieldset, form, label { margin: 0; padding: 0; border: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; } *:focus { outline: none; } html { font-size: 100.01%; } body { font-size: 62.5%; line-height: 2.38em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; font-family: "helvetica", "arial", "sans-serif"; - background: #FFF; + background: #F4F4F4; color: #35342D; } h1, h2, p, ul, ol { font-size: 1.4em; } strong { font-weight: bold; } em { font-style: italic; } form, fieldset { display: block; } +fieldset { + margin-top: 2em; +} + label { font-weight: bold; display: block; + margin-right: 0.8em; } a { color: #d6532f; font-weight: bold; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } sup { vertical-align: baseline; } -#sitoi { width: 100%; } +#sitoi { + width: 60em; + padding: 0em 5em; + margin: 0 auto; + margin-top: 2.4em; + overflow: hidden; +} hgroup { - background: #4e575c url(/images/beta/header.png) center 12em no-repeat; - color: #fff; - width: 100%; - height: 41.3em; - margin-bottom: 3.6em; - text-align: center; - overflow: hidden; + margin-bottom: 2.2em; } -hgroup h1 { - margin-top: 3.4em; - font-weight: bold; +nav { + float: right; } -hgroup h2 { - font-size: 1.2em; +nav ul { + margin-top: 0.4em; + list-style-type: none; } -hgroup img { - margin-top: 3em; +nav li { + float: left; + margin-left: 1.5em; } -.about, footer { - margin: 0 auto; - width: 46em; +nav a { + display: block; + background: #EEE; + padding: 0.4em 1em; } -.newsletter { - margin: 0 auto; - width: 42em; +.content { + padding: 0 6em; + padding-top: 35.6em; + background: #FFF url(/images/beta/header.png) center 0 no-repeat; + -webkit-border-radius: 8px; + -webkit-box-shadow: #EFEFEF 2px 2px 0px; } -.about h1 { +.content h1 { font-weight: bold; font-size: 1.8em; margin-bottom: 0.8em; } -.steps { +.tutorial { background: url(/images/beta/icons.png) 2em 0.5em no-repeat; - margin: 4.2em 0 2.2em 0; overflow: hidden; + margin-top: 3.2em; } .step { margin-bottom: 3.4em; padding-left: 14em; overflow: hidden; } .step h2 { font-weight: bold; font-size: 1.6em; margin-bottom: 0.8em; } .step h2 span { - color: #fff; + color: #FFF; font-size: 0.8em; - background: #a5d15c; + background: #CC512B; padding: 0.3em 0.6em; margin-right: 0.48em; vertical-align: baseline; -webkit-border-radius: 10px; } .newsletter { - background: #f0f0f0; - border-top: 1px solid #ddd; - padding: 2.4em; + padding-top: 3.4em; + padding-bottom: 5.2em; + border-top: 1px dashed #ddd; + background: #FFF; } .newsletter h1 { font-weight: bold; font-size: 1.6em; margin-bottom: 0.6em; } -.newsletter fieldset { - margin: 2em 0 0.6em 0; -} - .newsletter label { display: inline; - margin-right: 0.6em; - margin-left: 1.4em; } .newsletter .text { font-size: 1em; padding: 0.3em; width: 200px; - margin-right: 0.6em; + margin-right: 0.8em; } .newsletter .submit { font-size: 1em; - padding: 0.38em 0.6em; + padding: 0.32em 0.6em 0.4em 0.6em; background: #d6532f; -webkit-border-radius: 4px; border: none; color: #fff; } footer p { - text-align: center; color: #999; - font-size: 1.2em; - margin: 3.8em 0 1.8em 0; + text-align: center; + font-size: 1.1em; + margin: 2em 0; } \ No newline at end of file
fguillen/Sitoi
81e35c9b81e96526cdf92f87de9d2cc40c259530
go on with the beta page
diff --git a/app/views/layouts/application.erb b/app/views/layouts/application.erb index 086aecd..dd6f879 100644 --- a/app/views/layouts/application.erb +++ b/app/views/layouts/application.erb @@ -1,27 +1,27 @@ <!DOCTYPE html> <html class="no-js"> <head> <!-- - ______ __ ______ ______ __ - /\ ___\ /\ \ /\__ _\ /\ __ \ /\ \ - \ \___ \ \ \ \ \/_/\ \/ \ \ \/\ \ \ \ \ - \/\_____\ \ \_\ \ \_\ \ \_____\ \ \_\ - \/_____/ \/_/ \/_/ \/_____/ \/_/ - + ______ __ ______ ______ __ + /\ ___\ /\ \ /\__ _\ /\ __ \ /\ \ + \ \___ \ \ \ \ \/_/\ \/ \ \ \/\ \ \ \ \ + \/\_____\ \ \_\ \ \_\ \ \_____\ \ \_\ + \/_____/ \/_/ \/_/ \/_____/ \/_/ + Sitoi, gestión (sencilla) de espacios --> <meta charset="utf-8"> <title>Sitoi — Gestión de espacios</title> <%= stylesheet_link_tag "beta/screen.css" %> - <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", "hashgrid.js", "modernizr.js" %> - <script type="text/javascript" src="http://use.typekit.com/bnw8joa.js"></script> - <script type="text/javascript">try{Typekit.load();}catch(e){}</script> + <%= javascript_include_tag "jquery-1.4.2.min.js", "hashgrid.js", "modernizr.js" %> + <!-- <script type="text/javascript" src="http://use.typekit.com/bnw8joa.js"></script> + <script type="text/javascript">try{Typekit.load();}catch(e){}</script> --> </head> <body> <div id="sitoi"> <%= yield %> </div> </body> </html> \ No newline at end of file diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index bbaa336..e54f38b 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,53 +1,63 @@ -<div class="content"> - <div class="section"> - <h1>¿Qué es Sitoi?</h1> - <p> - Sitoi es una sencilla herramienta para gestionar <em>online</em> - la venta y alquiler de espacios. Si tienes que organizar una feria, - un camping o incluso una boda, Sitoi es lo que buscas. - </p> +<hgroup> + <img src="/images/beta/logo.png" alt="Logo"> +</hgroup> + +<section class="about"> + <header><h1>¿Qué es Sitoi?</h1></header> + + <p> + Sitoi es una sencilla herramienta para gestionar <em>online</em> + la venta y alquiler de espacios. Si tienes que organizar una feria, + un camping, un garaje o incluso una boda, Sitoi es lo que estabas + buscando. + </p> - <div id="step-1" class="item"> - <h2><span>1</span> Sube tu plano</h2> + <section class="steps"> + <section class="step"> + <header><h2><span>1</span> Sube tu plano</h2></header> <p> - No pierdas tiempo dibujando en el ordenador, escanea - el plano y súbelo. + No pierdas tiempo dibujando en el ordenador, escanea + el plano de tu espacio y súbelo. </p> - </div> - - <div id="step-2" class="item"> - <h2><span>2</span> Marca los espacios</h2> + </section> + + <section class="step"> + <header><h2><span>2</span> Marca los espacios</h2></header> <p> - Pincha en cada espacio que quieras vender o alquilar, + A continuación pincha en cada espacio que quieras vender o alquilar, pon el precio y los m<sup>2</sup>. </p> - </div> + </section> - <div id="step-3" class="item"> - <h2><span>3</span> ¡A vender o alquilar!</h2> + <section class="step"> + <header><h2><span>3</span> ¡A vender o alquilar!</h2></header> <p> - Y ya está, dale a publicar y tus clientes pueden pagarte - directamente con Paypal. + Y ya está, dale a publicar y tus clientes pueden pagarte + directamente con tarjeta o Paypal. </p> - </div> - </div> + </section> + </section> +</section> + +<section class="newsletter"> + <header><h1>Apúntate a la beta</h1></header> + <p> + Sitoi todavía no está listo pero te podemos avisar para + que seas el primero en probarlo. Nunca te enviaremos spam, + prometido. + </p> - <div class="aside"> + <form action="submit" method="get" accept-charset="utf-8"> + <fieldset> <p> - Sitoi todavía no está listo pero te podemos avisar para - que seas el primero en probarlo. + <label>Correo</label> + <input name="email" placeholder="nombre@dominio.com" class="text" value=""> + <input type="submit" class="submit" value="Apuntadme"> </p> - <form action="submit" method="get" accept-charset="utf-8"> - <fieldset> - <p> - <input name="email" placeholder="Tu correo electrónico" class="text" value=""> - <input type="submit" class="submit" value="Avisadme"> - </p> - </fieldset> - </form> - </div> -</div> + </fieldset> + </form> +</section> -<div class="footer"> +<footer> <p>© 2010 Sitoi • ¿Tienes dudas? <a href="">Contacta con nosotros</a></p> -</div> \ No newline at end of file +</footer> \ No newline at end of file diff --git a/public/images/beta/header.png b/public/images/beta/header.png new file mode 100644 index 0000000..3e04cdc Binary files /dev/null and b/public/images/beta/header.png differ diff --git a/public/images/beta/icons.png b/public/images/beta/icons.png new file mode 100644 index 0000000..fbba974 Binary files /dev/null and b/public/images/beta/icons.png differ diff --git a/public/images/beta/logo.png b/public/images/beta/logo.png index 5ad92b0..ff114f2 100644 Binary files a/public/images/beta/logo.png and b/public/images/beta/logo.png differ diff --git a/public/images/beta/newsletter.png b/public/images/beta/newsletter.png deleted file mode 100644 index 50b869c..0000000 Binary files a/public/images/beta/newsletter.png and /dev/null differ diff --git a/public/images/beta/sneak.png b/public/images/beta/sneak.png deleted file mode 100644 index a295dcf..0000000 Binary files a/public/images/beta/sneak.png and /dev/null differ diff --git a/public/images/beta/step-01.png b/public/images/beta/step-01.png deleted file mode 100644 index 250024b..0000000 Binary files a/public/images/beta/step-01.png and /dev/null differ diff --git a/public/images/beta/step-02.png b/public/images/beta/step-02.png deleted file mode 100644 index ee4d885..0000000 Binary files a/public/images/beta/step-02.png and /dev/null differ diff --git a/public/images/beta/step-03.png b/public/images/beta/step-03.png deleted file mode 100644 index 656a3a2..0000000 Binary files a/public/images/beta/step-03.png and /dev/null differ diff --git a/public/javascripts/jquery-1.4.2.min.js b/public/javascripts/jquery-1.4.2.min.js new file mode 100644 index 0000000..7c24308 --- /dev/null +++ b/public/javascripts/jquery-1.4.2.min.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i? +e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r= +j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g, +"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e= +true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)|| +c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded", +L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype, +"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+ +a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f], +d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]=== +a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&& +!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari= +true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ", +i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ", +" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className= +this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= +e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!= +null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), +fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| +d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this, +"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent= +a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y, +isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit= +{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}}; +if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& +!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, +toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector, +u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "), +function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q]; +if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; +for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length- +1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, +CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}}, +relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]= +l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[]; +h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m= +m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition|| +!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m= +h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>"; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/, +gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length; +c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)? +a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&& +this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]|| +u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length=== +1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay"); +this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a], +"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)}, +animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing= +j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]); +this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length|| +c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement? +function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b= +this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle; +k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&& +f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/public/stylesheets/beta/grid.css b/public/stylesheets/beta/grid.css index ad30dea..24d80a5 100644 --- a/public/stylesheets/beta/grid.css +++ b/public/stylesheets/beta/grid.css @@ -1,17 +1,17 @@ /* grid.css */ #grid { width: 980px; position: absolute; top: 0; left: 50%; margin-left: -490px; background: url(/images/bg-grid-980.gif) repeat-y 0 0; } #grid div.horiz { - height: 23px; + height: 22px; border-bottom: 1px dotted #AAA; margin: 0; padding: 0; } \ No newline at end of file diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index 1f6cfad..334ef0a 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,59 +1,180 @@ @import "grid.css"; -html, body, div, span, h1, h2, h3, h4, h5, h6, +html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, ol, ul, li, fieldset, form, label { margin: 0; padding: 0; border: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; } -*:focus { outline: none; } +*:focus { + outline: none; +} -html { font-size:100.01%; } +html { + font-size: 100.01%; +} body { font-size: 62.5%; - line-height: 2.4em; + line-height: 2.38em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; font-family: "helvetica", "arial", "sans-serif"; background: #FFF; color: #35342D; } -h1, h2 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } -h1 { font-size: 2.2em; } -h2 { font-size: 1.8em; margin-bottom: -0.2em; } -h2 span { font-size: 0.8em; color: #FFF; background: #1C5588; padding: 0.3em 0.5em; margin-right: 0.6em; -webkit-border-radius: 20px; } -p, ul, ol { font-size: 1.4em; } -strong { font-weight: bold; } -em { font-style: italic; } -form, fieldset { display: block; } -label { font-weight: bold; display: block; } -a { color: #1C5588; font-weight: bold; text-decoration: none; } -a:focus, a:hover { text-decoration: underline; } - -#sitoi, .content, .section, .aside, .footer { display: block; overflow: hidden; } -#sitoi { margin: 0 auto; width: 94em; padding-top: 7.2em; } -.section { float: right; width: 44em; } -.section p { font-size: 1.6em; margin: 0.75em 0; } -.item { padding: 1.28em 0; padding-left: 14em; } -#step-1 { margin-top: 3.4em; background: url(/images/beta/step-01.png) no-repeat; } -#step-2 { background: url(/images/beta/step-02.png) 0 0.28em no-repeat; } -#step-3 { background: url(/images/beta/step-03.png) no-repeat; } -.aside { float: left; background: #F5F5F5; margin-top: 33.6em; width: 30em; padding: 2.4em 2em 2.4em 12em; border: 3px solid #EEE; -webkit-border-radius: 12px; } -.aside p { color: #555; } -.aside form { margin-top: 2.4em; } -.aside form .text { width: 13em; margin-right: 0.5em; font-size: 0.9em; padding: 0.25em; } -.aside form .submit { background: #FFF; border: 3px solid #E1E1E1; padding: 0.5em 1.2em; -webkit-border-radius: 20px; font-family: "helvetica", "arial", "sans-serif"; font-size: 0.9em; color: #555; font-weight: bold; } -.footer { clear: both; margin-top: 2.5em; text-align: center; border-top: 1px solid #EEE; } -.footer p { font-size: 1.2em; padding: 2em 0; color: #999; } -.footer a { color: #999; } -.footer a:hover { color: #1C5588; } \ No newline at end of file +h1, h2, p, ul, ol { + font-size: 1.4em; +} + +strong { + font-weight: bold; +} + +em { + font-style: italic; +} + +form, fieldset { + display: block; +} + +label { + font-weight: bold; + display: block; +} + +a { + color: #d6532f; + font-weight: bold; + text-decoration: none; +} + +a:focus, a:hover { + text-decoration: underline; +} + +sup { vertical-align: baseline; } + +#sitoi { width: 100%; } + +hgroup { + background: #4e575c url(/images/beta/header.png) center 12em no-repeat; + color: #fff; + width: 100%; + height: 41.3em; + margin-bottom: 3.6em; + text-align: center; + overflow: hidden; +} + +hgroup h1 { + margin-top: 3.4em; + font-weight: bold; +} + +hgroup h2 { + font-size: 1.2em; +} + +hgroup img { + margin-top: 3em; +} + +.about, footer { + margin: 0 auto; + width: 46em; +} + +.newsletter { + margin: 0 auto; + width: 42em; +} + +.about h1 { + font-weight: bold; + font-size: 1.8em; + margin-bottom: 0.8em; +} + +.steps { + background: url(/images/beta/icons.png) 2em 0.5em no-repeat; + margin: 4.2em 0 2.2em 0; + overflow: hidden; +} + +.step { + margin-bottom: 3.4em; + padding-left: 14em; + overflow: hidden; +} + +.step h2 { + font-weight: bold; + font-size: 1.6em; + margin-bottom: 0.8em; +} + +.step h2 span { + color: #fff; + font-size: 0.8em; + background: #a5d15c; + padding: 0.3em 0.6em; + margin-right: 0.48em; + vertical-align: baseline; + -webkit-border-radius: 10px; +} + +.newsletter { + background: #f0f0f0; + border-top: 1px solid #ddd; + padding: 2.4em; +} + +.newsletter h1 { + font-weight: bold; + font-size: 1.6em; + margin-bottom: 0.6em; +} + +.newsletter fieldset { + margin: 2em 0 0.6em 0; +} + +.newsletter label { + display: inline; + margin-right: 0.6em; + margin-left: 1.4em; +} + +.newsletter .text { + font-size: 1em; + padding: 0.3em; + width: 200px; + margin-right: 0.6em; +} + +.newsletter .submit { + font-size: 1em; + padding: 0.38em 0.6em; + background: #d6532f; + -webkit-border-radius: 4px; + border: none; + color: #fff; +} + +footer p { + text-align: center; + color: #999; + font-size: 1.2em; + margin: 3.8em 0 1.8em 0; +} \ No newline at end of file
fguillen/Sitoi
0d55a49f54125f8678a4c54fab4d2d7ec23dcb32
new colors
diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index ed9df5c..99b0f7d 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,55 +1,53 @@ <div class="content"> <div class="section"> <h1>¿Qué es Sitoi?</h1> <p> Sitoi es una sencilla herramienta para gestionar <em>online</em> - la venta o alquiler de espacios en recintos. + la venta y alquiler de espacios. Si tienes que organizar una feria, + un camping o incluso una boda, Sitoi es lo que buscas. </p> - </div> - - <div class="aside"> - <div class="step"> + <div id="step-1" class="item"> <h2><span>1</span> Sube tu plano</h2> <p> No pierdas tiempo dibujando en el ordenador, escanea el plano y súbelo. </p> </div> - - <div class="step"> + + <div id="step-2" class="item"> <h2><span>2</span> Marca los espacios</h2> <p> Pincha en cada espacio que quieras vender o alquilar, pon el precio y los m<sup>2</sup>. </p> </div> - <div class="step"> + <div id="step-3" class="item"> <h2><span>3</span> ¡A vender o alquilar!</h2> <p> - Dale a publicar y tus clientes pueden pagarte + Y ya está, dale a publicar y tus clientes pueden pagarte directamente con Paypal. </p> </div> + </div> - <div class="newsletter"> + <div class="aside"> + <p> + Sitoi todavía no está listo pero te podemos avisar para + que seas el primero en probarlo. + </p> + <form action="submit" method="get" accept-charset="utf-8"> + <fieldset> <p> - Sitoi todavía no está listo pero te podemos apuntar - para probar la beta. + <input name="email" placeholder="Tu correo electrónico" class="text" value=""> + <input type="submit" class="submit" value="Avisadme"> </p> - <form action="submit" method="get" accept-charset="utf-8"> - <fieldset> - <p> - <input name="email" placeholder="Tu correo electrónico" class="text" value=""> - <input type="submit" class="submit" value="Avisadme"> - </p> - </fieldset> - </form> - </div> + </fieldset> + </form> </div> </div> <div class="footer"> <p>© 2010 Sitoi • <a href="">Contacta con nosotros</a></p> -</div> +</div> \ No newline at end of file diff --git a/public/images/beta/step-01.png b/public/images/beta/step-01.png new file mode 100644 index 0000000..250024b Binary files /dev/null and b/public/images/beta/step-01.png differ diff --git a/public/images/beta/step-02.png b/public/images/beta/step-02.png new file mode 100644 index 0000000..ee4d885 Binary files /dev/null and b/public/images/beta/step-02.png differ diff --git a/public/images/beta/step-03.png b/public/images/beta/step-03.png new file mode 100644 index 0000000..656a3a2 Binary files /dev/null and b/public/images/beta/step-03.png differ diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index a120923..536cf65 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,168 +1,55 @@ -@import "reset.css"; @import "grid.css"; +html, body, div, span, h1, h2, h3, h4, h5, h6, +p, a, ol, ul, li, fieldset, form, label { + margin: 0; + padding: 0; + border: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +*:focus { outline: none; } + html { font-size:100.01%; } body { font-size: 62.5%; line-height: 2.4em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; font-family: "helvetica", "arial", "sans-serif"; - background: #FEFFFE; + background: #FFF; color: #35342D; } -h1, h2 { - font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; - font-weight: bold; -} - -h1 { font-size: 2.2em; margin-bottom: 0.6em; } - -h2 { font-size: 1.8em; } - +h1, h2 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } +h1 { font-size: 2.2em; } +h2 { font-size: 1.8em; margin-bottom: -0.2em; } +h2 span { font-size: 0.8em; color: #FFF; background: #1C5588; padding: 0.3em 0.5em; margin-right: 0.6em; -webkit-border-radius: 20px; } p, ul, ol { font-size: 1.4em; } - strong { font-weight: bold; } - em { font-style: italic; } - form, fieldset { display: block; } - label { font-weight: bold; display: block; } - -a { color: #666; font-weight: bold; text-decoration: none; } - +a { color: #1C5588; font-weight: bold; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } -#sitoi { - display: block; - overflow: hidden; - margin: 0 auto; - padding: 7.2em 4em 0 4em; - width: 96em; -} - -.content { - display: block; - overflow: hidden; -} - -.section { - float: left; - width: 44em; - padding-bottom: 42em; - background: url(/images/beta/logo.png) 0 16em no-repeat; -} - -.section p { - font-size: 1.8em; - width: 20em; -} - -.aside { - float: right; - display: block; - overflow: hidden; - width: 44em; - background: url(/images/beta/sneak.png) no-repeat; -} - -.step { - display: block; - overflow: hidden; - padding-left: 14em; -} - -.step p { - line-height:1.42em; - font-size: 1.6em; - margin: 0.8em 0 2.34em 0; - color: #666; -} - -.step span { - font-size: 0.8em; - color: #FFF; - background: #AEC163; - padding: 0.3em 0.5em; - margin-right: 0.6em; - -webkit-border-radius: 20px; -} - -.newsletter { - display: block; - overflow: hidden; - margin-top: 2em; - padding: 2em 12em 2em 2em; - border: 3px solid #A8211E; - background: #D13834 url(/images/beta/newsletter.png) 33em 3em no-repeat; - -webkit-border-radius: 8px; -} - -.newsletter p { - color: #FFF; - font-weight: bold; - text-shadow: #A8211E 0px 1px 1px; -} - -.newsletter form { - margin: 1.72em 0 0 0; -} - -.newsletter .text { - background-color: #871D1B; - border: 2px solid #81090E; - padding: 0.5em; - font-size: 0.9em; - width: 12em; - margin-right: 0.4em; - color: #FFF; - -webkit-border-radius: 5px; - -webkit-box-shadow: #81090E 1px 1px 1px inset; -} - -.newsletter input::-webkit-input-placeholder { color: #DE4642; } - -.newsletter .submit { - color: #FFF; - font-weight: bold; - background-color: #E74945; - font-size: 1em; - padding: 0.5em 1em; - border: 3px solid #A8211E; - text-shadow: #A8211E 0px 1px 1px; - font-family: "helvetica", "arial", "sans-serif"; - -webkit-border-radius: 20px; -} - -.newsletter .submit:active { - background-color: #871D1B; -} - -.footer { - clear: both; - display: block; - overflow: hidden; - text-align: center; - margin-top: 2em; -} - -.footer p { - color: #CCC; - font-size: 1.2em; - margin-top: 2.2em; -} - -.footer a { - color: #CCC; -} - -.footer a:hover { - color: #666; - text-decoration: none; -} - +#sitoi, .content, .section, .aside, .footer { display: block; overflow: hidden; } +#sitoi { margin: 0 auto; width: 94em; padding-top: 7.2em; } +.section { float: right; width: 44em; } +.section p { font-size: 1.6em; margin: 0.75em 0; } +.item { padding: 1.28em 0; padding-left: 14em; } +#step-1 { margin-top: 3.4em; background: url(/images/beta/step-01.png) no-repeat; } +#step-2 { background: url(/images/beta/step-02.png) 0 0.28em no-repeat; } +#step-3 { background: url(/images/beta/step-03.png) no-repeat; } +.aside { float: left; background:#F5F5F5; margin-top: 33.6em; width: 30em; padding: 2.4em 2em 2.4em 12em; -webkit-border-radius: 12px; } +.aside form { margin-top: 2.4em; } +.aside form .text { width: 16em; margin-right: 1em; } +.footer { clear: both; margin-top: 2.5em; text-align: center; border-top: 1px solid #EEE; } +.footer p { font-size: 1.2em; padding: 2em 0; } \ No newline at end of file
fguillen/Sitoi
7a9e29e998bd0b52e7a0d2616f04deaddc456939
add the logo
diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index 951a6dc..ed9df5c 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,56 +1,55 @@ <div class="content"> <div class="section"> <h1>¿Qué es Sitoi?</h1> <p> Sitoi es una sencilla herramienta para gestionar <em>online</em> - la venta o alquiler de espacios en recintos. Sitoi es perfecto - si estas organizando una feria, un camping, un garaje o incluso una boda. + la venta o alquiler de espacios en recintos. </p> </div> <div class="aside"> <div class="step"> <h2><span>1</span> Sube tu plano</h2> <p> - No pierdas tiempo dibujando el espacio en el ordenador, escanea + No pierdas tiempo dibujando en el ordenador, escanea el plano y súbelo. </p> </div> <div class="step"> <h2><span>2</span> Marca los espacios</h2> <p> Pincha en cada espacio que quieras vender o alquilar, pon el precio y los m<sup>2</sup>. </p> </div> <div class="step"> <h2><span>3</span> ¡A vender o alquilar!</h2> <p> Dale a publicar y tus clientes pueden pagarte directamente con Paypal. </p> </div> <div class="newsletter"> <p> Sitoi todavía no está listo pero te podemos apuntar para probar la beta. </p> <form action="submit" method="get" accept-charset="utf-8"> <fieldset> <p> <input name="email" placeholder="Tu correo electrónico" class="text" value=""> <input type="submit" class="submit" value="Avisadme"> </p> </fieldset> </form> </div> </div> </div> <div class="footer"> <p>© 2010 Sitoi • <a href="">Contacta con nosotros</a></p> </div> diff --git a/public/images/beta/logo.png b/public/images/beta/logo.png index 50db0c3..5ad92b0 100644 Binary files a/public/images/beta/logo.png and b/public/images/beta/logo.png differ diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index 0c68d09..a120923 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,166 +1,168 @@ @import "reset.css"; @import "grid.css"; html { font-size:100.01%; } body { font-size: 62.5%; line-height: 2.4em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; font-family: "helvetica", "arial", "sans-serif"; background: #FEFFFE; color: #35342D; } h1, h2 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } h1 { font-size: 2.2em; margin-bottom: 0.6em; } h2 { font-size: 1.8em; } p, ul, ol { font-size: 1.4em; } strong { font-weight: bold; } em { font-style: italic; } form, fieldset { display: block; } label { font-weight: bold; display: block; } a { color: #666; font-weight: bold; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } #sitoi { display: block; overflow: hidden; margin: 0 auto; padding: 7.2em 4em 0 4em; - width: 94em; - /*background: url(/images/beta/logo.png) 2em 0 no-repeat;*/ + width: 96em; } .content { display: block; overflow: hidden; } .section { float: left; width: 44em; + padding-bottom: 42em; + background: url(/images/beta/logo.png) 0 16em no-repeat; } .section p { font-size: 1.8em; + width: 20em; } .aside { float: right; display: block; overflow: hidden; - width: 46em; + width: 44em; background: url(/images/beta/sneak.png) no-repeat; } .step { display: block; overflow: hidden; padding-left: 14em; } .step p { line-height:1.42em; font-size: 1.6em; margin: 0.8em 0 2.34em 0; color: #666; } .step span { font-size: 0.8em; color: #FFF; background: #AEC163; padding: 0.3em 0.5em; margin-right: 0.6em; -webkit-border-radius: 20px; } .newsletter { display: block; overflow: hidden; - margin-top: 2.4em; - padding: 2em 14.4em 2em 2em; + margin-top: 2em; + padding: 2em 12em 2em 2em; border: 3px solid #A8211E; - background: #D13834 url(/images/beta/newsletter.png) 34em 3em no-repeat; + background: #D13834 url(/images/beta/newsletter.png) 33em 3em no-repeat; -webkit-border-radius: 8px; } .newsletter p { color: #FFF; font-weight: bold; text-shadow: #A8211E 0px 1px 1px; } .newsletter form { margin: 1.72em 0 0 0; } .newsletter .text { background-color: #871D1B; border: 2px solid #81090E; padding: 0.5em; font-size: 0.9em; - width: 12.2em; + width: 12em; margin-right: 0.4em; color: #FFF; -webkit-border-radius: 5px; -webkit-box-shadow: #81090E 1px 1px 1px inset; } .newsletter input::-webkit-input-placeholder { color: #DE4642; } .newsletter .submit { color: #FFF; font-weight: bold; background-color: #E74945; font-size: 1em; padding: 0.5em 1em; border: 3px solid #A8211E; text-shadow: #A8211E 0px 1px 1px; font-family: "helvetica", "arial", "sans-serif"; -webkit-border-radius: 20px; } .newsletter .submit:active { background-color: #871D1B; } .footer { clear: both; display: block; overflow: hidden; text-align: center; - margin-top: 2.2em; + margin-top: 2em; } .footer p { color: #CCC; font-size: 1.2em; - margin: 1.8em 0 0.1em 0; + margin-top: 2.2em; } .footer a { color: #CCC; } .footer a:hover { color: #666; text-decoration: none; }
fguillen/Sitoi
db7997839929b7a187ffbdd284bb7e09c5040721
add more images
diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index b93f884..951a6dc 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,56 +1,56 @@ <div class="content"> <div class="section"> <h1>¿Qué es Sitoi?</h1> <p> Sitoi es una sencilla herramienta para gestionar <em>online</em> la venta o alquiler de espacios en recintos. Sitoi es perfecto - si organizas una feria, un camping o incluso una boda. + si estas organizando una feria, un camping, un garaje o incluso una boda. </p> </div> <div class="aside"> <div class="step"> <h2><span>1</span> Sube tu plano</h2> <p> No pierdas tiempo dibujando el espacio en el ordenador, escanea el plano y súbelo. </p> </div> <div class="step"> <h2><span>2</span> Marca los espacios</h2> <p> Pincha en cada espacio que quieras vender o alquilar, pon el precio y los m<sup>2</sup>. </p> </div> <div class="step"> <h2><span>3</span> ¡A vender o alquilar!</h2> <p> Dale a publicar y tus clientes pueden pagarte directamente con Paypal. </p> </div> <div class="newsletter"> <p> - Sitoi todavía no está listo pero te podemos avisar - para que lo pruebes antes que nadie. + Sitoi todavía no está listo pero te podemos apuntar + para probar la beta. </p> <form action="submit" method="get" accept-charset="utf-8"> <fieldset> <p> <input name="email" placeholder="Tu correo electrónico" class="text" value=""> <input type="submit" class="submit" value="Avisadme"> </p> </fieldset> </form> </div> </div> </div> <div class="footer"> - <p>© 2010 <a href="">Sitoi</a> • <a href="">Contacta con nosotros</a></p> + <p>© 2010 Sitoi • <a href="">Contacta con nosotros</a></p> </div> diff --git a/public/images/beta/newsletter.png b/public/images/beta/newsletter.png index 1f85cbf..50b869c 100644 Binary files a/public/images/beta/newsletter.png and b/public/images/beta/newsletter.png differ diff --git a/public/images/beta/sneak.png b/public/images/beta/sneak.png index c487805..a295dcf 100644 Binary files a/public/images/beta/sneak.png and b/public/images/beta/sneak.png differ diff --git a/public/images/beta/tutorial.png b/public/images/beta/tutorial.png deleted file mode 100644 index a8c506b..0000000 Binary files a/public/images/beta/tutorial.png and /dev/null differ diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index 3d79a3f..0c68d09 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,151 +1,166 @@ @import "reset.css"; @import "grid.css"; html { font-size:100.01%; } body { font-size: 62.5%; line-height: 2.4em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; font-family: "helvetica", "arial", "sans-serif"; background: #FEFFFE; color: #35342D; } h1, h2 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } h1 { font-size: 2.2em; margin-bottom: 0.6em; } h2 { font-size: 1.8em; } p, ul, ol { font-size: 1.4em; } strong { font-weight: bold; } em { font-style: italic; } form, fieldset { display: block; } label { font-weight: bold; display: block; } a { color: #666; font-weight: bold; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } #sitoi { display: block; overflow: hidden; margin: 0 auto; padding: 7.2em 4em 0 4em; width: 94em; /*background: url(/images/beta/logo.png) 2em 0 no-repeat;*/ } .content { display: block; overflow: hidden; } .section { float: left; width: 44em; } .section p { font-size: 1.8em; } .aside { float: right; display: block; overflow: hidden; width: 46em; background: url(/images/beta/sneak.png) no-repeat; } .step { display: block; overflow: hidden; padding-left: 14em; } .step p { line-height:1.42em; font-size: 1.6em; margin: 0.8em 0 2.34em 0; + color: #666; } .step span { font-size: 0.8em; color: #FFF; background: #AEC163; padding: 0.3em 0.5em; margin-right: 0.6em; -webkit-border-radius: 20px; } .newsletter { - color: #FFF; display: block; overflow: hidden; margin-top: 2.4em; - padding: 2.6em 14.4em 2.2em 2.6em; - background: #D13834; - -webkit-border-radius: 8px; + padding: 2em 14.4em 2em 2em; border: 3px solid #A8211E; + background: #D13834 url(/images/beta/newsletter.png) 34em 3em no-repeat; + -webkit-border-radius: 8px; } .newsletter p { - text-shadow: rgba(0,0,0,0.5) 0px 1px 1px; + color: #FFF; font-weight: bold; + text-shadow: #A8211E 0px 1px 1px; } .newsletter form { margin: 1.72em 0 0 0; } .newsletter .text { - background-color: rgba(0,0,0,0.25); - border: 2px solid rgba(0,0,0,0.05); - padding: 0.48em; + background-color: #871D1B; + border: 2px solid #81090E; + padding: 0.5em; font-size: 0.9em; - width: 12em; + width: 12.2em; margin-right: 0.4em; color: #FFF; - -webkit-border-radius: 4px; + -webkit-border-radius: 5px; + -webkit-box-shadow: #81090E 1px 1px 1px inset; } -.newsletter input::-webkit-input-placeholder { color: rgba(255,255,255,1); } +.newsletter input::-webkit-input-placeholder { color: #DE4642; } .newsletter .submit { color: #FFF; - border: 1px solid #303030; - background: rgba(255,255,255,0.05); - font-size: 0.9em; + font-weight: bold; + background-color: #E74945; + font-size: 1em; padding: 0.5em 1em; - -webkit-border-radius: 4px; + border: 3px solid #A8211E; + text-shadow: #A8211E 0px 1px 1px; + font-family: "helvetica", "arial", "sans-serif"; + -webkit-border-radius: 20px; +} + +.newsletter .submit:active { + background-color: #871D1B; } .footer { clear: both; display: block; overflow: hidden; text-align: center; margin-top: 2.2em; } .footer p { color: #CCC; font-size: 1.2em; - margin: 2.1em 0 0.1em 0; + margin: 1.8em 0 0.1em 0; } .footer a { color: #CCC; } + +.footer a:hover { + color: #666; + text-decoration: none; +} +
fguillen/Sitoi
6eaab93d6b6d84ebe4840677077ba7f21a5d70f5
colors getting ready
diff --git a/public/images/beta/logo.png b/public/images/beta/logo.png index 2db176c..50db0c3 100644 Binary files a/public/images/beta/logo.png and b/public/images/beta/logo.png differ diff --git a/public/images/beta/newsletter.png b/public/images/beta/newsletter.png index a938553..1f85cbf 100644 Binary files a/public/images/beta/newsletter.png and b/public/images/beta/newsletter.png differ diff --git a/public/images/beta/sneak.png b/public/images/beta/sneak.png index 8353a36..c487805 100644 Binary files a/public/images/beta/sneak.png and b/public/images/beta/sneak.png differ diff --git a/public/images/beta/tutorial.png b/public/images/beta/tutorial.png index 39e40ee..a8c506b 100644 Binary files a/public/images/beta/tutorial.png and b/public/images/beta/tutorial.png differ diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index 52373b1..3d79a3f 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,145 +1,151 @@ @import "reset.css"; @import "grid.css"; html { font-size:100.01%; } body { font-size: 62.5%; line-height: 2.4em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; font-family: "helvetica", "arial", "sans-serif"; background: #FEFFFE; color: #35342D; } h1, h2 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } h1 { font-size: 2.2em; margin-bottom: 0.6em; } h2 { font-size: 1.8em; } p, ul, ol { font-size: 1.4em; } strong { font-weight: bold; } em { font-style: italic; } form, fieldset { display: block; } label { font-weight: bold; display: block; } a { color: #666; font-weight: bold; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } #sitoi { display: block; overflow: hidden; margin: 0 auto; padding: 7.2em 4em 0 4em; width: 94em; /*background: url(/images/beta/logo.png) 2em 0 no-repeat;*/ } .content { display: block; overflow: hidden; } .section { float: left; width: 44em; } .section p { font-size: 1.8em; } .aside { float: right; display: block; overflow: hidden; width: 46em; background: url(/images/beta/sneak.png) no-repeat; } .step { display: block; overflow: hidden; padding-left: 14em; } .step p { line-height:1.42em; font-size: 1.6em; margin: 0.8em 0 2.34em 0; } .step span { font-size: 0.8em; color: #FFF; - background: #CE3A31; + background: #AEC163; padding: 0.3em 0.5em; margin-right: 0.6em; -webkit-border-radius: 20px; } .newsletter { - color: #DDD; + color: #FFF; display: block; overflow: hidden; margin-top: 2.4em; padding: 2.6em 14.4em 2.2em 2.6em; - background: #182222; - -webkit-border-radius: 4px; + background: #D13834; + -webkit-border-radius: 8px; + border: 3px solid #A8211E; +} + +.newsletter p { + text-shadow: rgba(0,0,0,0.5) 0px 1px 1px; + font-weight: bold; } .newsletter form { margin: 1.72em 0 0 0; } .newsletter .text { - background-color: rgba(255,255,255,0.08); - border: 1px solid rgba(0,0,0,0.05); + background-color: rgba(0,0,0,0.25); + border: 2px solid rgba(0,0,0,0.05); padding: 0.48em; font-size: 0.9em; - width: 14em; + width: 12em; margin-right: 0.4em; color: #FFF; -webkit-border-radius: 4px; } .newsletter input::-webkit-input-placeholder { color: rgba(255,255,255,1); } .newsletter .submit { color: #FFF; border: 1px solid #303030; background: rgba(255,255,255,0.05); font-size: 0.9em; padding: 0.5em 1em; -webkit-border-radius: 4px; } .footer { clear: both; display: block; overflow: hidden; text-align: center; margin-top: 2.2em; } .footer p { color: #CCC; font-size: 1.2em; margin: 2.1em 0 0.1em 0; } .footer a { color: #CCC; }
fguillen/Sitoi
6b9c7d2e236d0f617f074a849092be857e0883b2
getting there
diff --git a/public/images/beta/sneak.png b/public/images/beta/sneak.png new file mode 100644 index 0000000..8353a36 Binary files /dev/null and b/public/images/beta/sneak.png differ diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index 64ce37e..52373b1 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,142 +1,145 @@ @import "reset.css"; @import "grid.css"; html { font-size:100.01%; } body { font-size: 62.5%; line-height: 2.4em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; font-family: "helvetica", "arial", "sans-serif"; background: #FEFFFE; - color: #333; + color: #35342D; } h1, h2 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } h1 { font-size: 2.2em; margin-bottom: 0.6em; } h2 { font-size: 1.8em; } p, ul, ol { font-size: 1.4em; } strong { font-weight: bold; } em { font-style: italic; } form, fieldset { display: block; } label { font-weight: bold; display: block; } a { color: #666; font-weight: bold; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } #sitoi { display: block; overflow: hidden; margin: 0 auto; - padding: 7.2em 2em 0 2em; + padding: 7.2em 4em 0 4em; width: 94em; /*background: url(/images/beta/logo.png) 2em 0 no-repeat;*/ } .content { display: block; overflow: hidden; } .section { float: left; - width: 46em; + width: 44em; } .section p { font-size: 1.8em; } .aside { float: right; display: block; overflow: hidden; width: 46em; + background: url(/images/beta/sneak.png) no-repeat; } .step { display: block; overflow: hidden; padding-left: 14em; } .step p { line-height:1.42em; font-size: 1.6em; margin: 0.8em 0 2.34em 0; } .step span { font-size: 0.8em; color: #FFF; - background: #CCC; + background: #CE3A31; padding: 0.3em 0.5em; margin-right: 0.6em; -webkit-border-radius: 20px; } .newsletter { + color: #DDD; display: block; overflow: hidden; margin-top: 2.4em; padding: 2.6em 14.4em 2.2em 2.6em; - background-color: #EEE; + background: #182222; -webkit-border-radius: 4px; } .newsletter form { margin: 1.72em 0 0 0; } .newsletter .text { - background-color: rgba(0,0,0,0.15); + background-color: rgba(255,255,255,0.08); border: 1px solid rgba(0,0,0,0.05); padding: 0.48em; font-size: 0.9em; width: 14em; margin-right: 0.4em; color: #FFF; -webkit-border-radius: 4px; } -.newsletter input::-webkit-input-placeholder { color: rgba(255,255,255,0.75); } +.newsletter input::-webkit-input-placeholder { color: rgba(255,255,255,1); } .newsletter .submit { - border: 1px solid #FFF; - background: #FFF; + color: #FFF; + border: 1px solid #303030; + background: rgba(255,255,255,0.05); font-size: 0.9em; padding: 0.5em 1em; -webkit-border-radius: 4px; } .footer { clear: both; display: block; overflow: hidden; text-align: center; margin-top: 2.2em; } .footer p { color: #CCC; font-size: 1.2em; margin: 2.1em 0 0.1em 0; } .footer a { color: #CCC; }
fguillen/Sitoi
b9816e647ddbae3899bb5ebc582ee1153f21b660
fix the baseline
diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index 742f760..b93f884 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,56 +1,56 @@ <div class="content"> <div class="section"> <h1>¿Qué es Sitoi?</h1> <p> Sitoi es una sencilla herramienta para gestionar <em>online</em> la venta o alquiler de espacios en recintos. Sitoi es perfecto si organizas una feria, un camping o incluso una boda. </p> </div> <div class="aside"> <div class="step"> - <h3><span>1</span> Sube tu plano</h3> + <h2><span>1</span> Sube tu plano</h2> <p> - No pierdas el tiempo dibujando tu espacio en el ordenador, escanea - el plano y cárgalo en Sitoi. + No pierdas tiempo dibujando el espacio en el ordenador, escanea + el plano y súbelo. </p> </div> <div class="step"> - <h3><span>2</span> Marca los espacios</h3> + <h2><span>2</span> Marca los espacios</h2> <p> Pincha en cada espacio que quieras vender o alquilar, - pon el precio y los metros cuadrados. + pon el precio y los m<sup>2</sup>. </p> </div> <div class="step"> - <h3><span>3</span> ¡A vender o alquilar!</h3> + <h2><span>3</span> ¡A vender o alquilar!</h2> <p> - Ya está, dale a publicar y tus clientes pueden pagarte + Dale a publicar y tus clientes pueden pagarte directamente con Paypal. </p> </div> <div class="newsletter"> <p> Sitoi todavía no está listo pero te podemos avisar para que lo pruebes antes que nadie. </p> <form action="submit" method="get" accept-charset="utf-8"> <fieldset> <p> <input name="email" placeholder="Tu correo electrónico" class="text" value=""> <input type="submit" class="submit" value="Avisadme"> </p> </fieldset> </form> </div> </div> </div> <div class="footer"> <p>© 2010 <a href="">Sitoi</a> • <a href="">Contacta con nosotros</a></p> </div> diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index 4906812..64ce37e 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,147 +1,142 @@ @import "reset.css"; @import "grid.css"; html { font-size:100.01%; } body { font-size: 62.5%; line-height: 2.4em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; font-family: "helvetica", "arial", "sans-serif"; background: #FEFFFE; color: #333; } -h1, h2, h3 { +h1, h2 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } h1 { font-size: 2.2em; margin-bottom: 0.6em; } -h2 { font-size: 2em; margin-bottom: 1.2em; } +h2 { font-size: 1.8em; } -h3 { font-size: 1.8em; } - -p, ul, ol { font-size: 1.6em; } +p, ul, ol { font-size: 1.4em; } strong { font-weight: bold; } em { font-style: italic; } form, fieldset { display: block; } label { font-weight: bold; display: block; } a { color: #666; font-weight: bold; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } #sitoi { display: block; overflow: hidden; margin: 0 auto; - padding: 7.2em 2em 0 2em; + padding: 7.2em 2em 0 2em; width: 94em; /*background: url(/images/beta/logo.png) 2em 0 no-repeat;*/ } .content { display: block; overflow: hidden; } .section { float: left; width: 46em; - padding-top: 44.2em; } .section p { font-size: 1.8em; } .aside { float: right; display: block; overflow: hidden; width: 46em; } .step { display: block; overflow: hidden; padding-left: 14em; } .step p { - margin: 0.8em 0 2.2em 0; + line-height:1.42em; + font-size: 1.6em; + margin: 0.8em 0 2.34em 0; } .step span { font-size: 0.8em; color: #FFF; background: #CCC; padding: 0.3em 0.5em; margin-right: 0.6em; -webkit-border-radius: 20px; } .newsletter { display: block; overflow: hidden; - padding: 1.9em 14.4em 1.9em 2.6em; - background-color: #EEE; margin-top: 2.4em; + padding: 2.6em 14.4em 2.2em 2.6em; + background-color: #EEE; -webkit-border-radius: 4px; } .newsletter form { - margin: 2em 0 0 0; + margin: 1.72em 0 0 0; } .newsletter .text { background-color: rgba(0,0,0,0.15); border: 1px solid rgba(0,0,0,0.05); padding: 0.48em; font-size: 0.9em; width: 14em; margin-right: 0.4em; color: #FFF; -webkit-border-radius: 4px; } .newsletter input::-webkit-input-placeholder { color: rgba(255,255,255,0.75); } .newsletter .submit { border: 1px solid #FFF; background: #FFF; font-size: 0.9em; padding: 0.5em 1em; -webkit-border-radius: 4px; } -.newsletter p { - font-size: 1.4em; - margin: 0.25em 0; -} - .footer { clear: both; display: block; overflow: hidden; text-align: center; + margin-top: 2.2em; } .footer p { color: #CCC; font-size: 1.2em; margin: 2.1em 0 0.1em 0; } .footer a { color: #CCC; }
fguillen/Sitoi
d10596badeddecbf6b5e8e2fe0a00b99677154dc
simplify the copy, better organization
diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index 171ff42..742f760 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,49 +1,56 @@ <div class="content"> - <h1>¿Qué es Sitoi?</h1> - <p> - Sitoi es una sencilla herramienta para gestionar <em>online</em> - la venta o alquiler de espacios en recintos. Si tienes que planificar - espacios en una feria, un camping, un garage o incluso una boda, Sitoi - es lo que estabas buscando. - </p> - - <div class="aside"> - <h2><span>1</span> Sube tu plano</h2> + <div class="section"> + <h1>¿Qué es Sitoi?</h1> <p> - Seguro que quieres dar salida a los espacios lo antes posible. - No pierdas el tiempo dibujando tu espacio en el ordenador, escanea - el plano y cárgalo en Sitoi. + Sitoi es una sencilla herramienta para gestionar <em>online</em> + la venta o alquiler de espacios en recintos. Sitoi es perfecto + si organizas una feria, un camping o incluso una boda. </p> + </div> + + <div class="aside"> - <h2><span>2</span> Marca los espacios</h2> - <p> - Para cada espacio que quieras vender o alquilar pincha sobre el plano. - Sitoi te permite especificar los metros cuadrados, el precio del espacio y otros detalles. - </p> + <div class="step"> + <h3><span>1</span> Sube tu plano</h3> + <p> + No pierdas el tiempo dibujando tu espacio en el ordenador, escanea + el plano y cárgalo en Sitoi. + </p> + </div> - <h2><span>3</span> ¡A vender o alquilar!</h2> - <p> - Ya no hay nada mas que hacer, dale a publicar y tus clientes pueden pagarte - directamente con Paypal. Siéntate a esperar viendo como tus espacios se reservan. - </p> - </div> -</div> + <div class="step"> + <h3><span>2</span> Marca los espacios</h3> + <p> + Pincha en cada espacio que quieras vender o alquilar, + pon el precio y los metros cuadrados. + </p> + </div> -<div class="newsletter"> - <p> - Sitoi todavía no está listo pero te podemos avisar - para que lo pruebes antes que nadie. - </p> - <form action="submit" method="get" accept-charset="utf-8"> - <fieldset> - <p> - <input name="email" placeholder="Tu correo electrónico" class="text" value=""> - <input type="submit" class="submit" value="Avisadme"> - </p> - </fieldset> - </form> + <div class="step"> + <h3><span>3</span> ¡A vender o alquilar!</h3> + <p> + Ya está, dale a publicar y tus clientes pueden pagarte + directamente con Paypal. + </p> + </div> + + <div class="newsletter"> + <p> + Sitoi todavía no está listo pero te podemos avisar + para que lo pruebes antes que nadie. + </p> + <form action="submit" method="get" accept-charset="utf-8"> + <fieldset> + <p> + <input name="email" placeholder="Tu correo electrónico" class="text" value=""> + <input type="submit" class="submit" value="Avisadme"> + </p> + </fieldset> + </form> + </div> + </div> </div> <div class="footer"> - <p>© 2010 <a href="">Sitoi</a> - <a href="">Contacto</a></p> + <p>© 2010 <a href="">Sitoi</a> • <a href="">Contacta con nosotros</a></p> </div> diff --git a/public/stylesheets/beta/grid.css b/public/stylesheets/beta/grid.css index c6a9d97..ad30dea 100644 --- a/public/stylesheets/beta/grid.css +++ b/public/stylesheets/beta/grid.css @@ -1,17 +1,17 @@ /* grid.css */ #grid { width: 980px; position: absolute; top: 0; left: 50%; margin-left: -490px; background: url(/images/bg-grid-980.gif) repeat-y 0 0; } #grid div.horiz { - height: 21px; + height: 23px; border-bottom: 1px dotted #AAA; margin: 0; padding: 0; } \ No newline at end of file diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index 73ae8d8..4906812 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,128 +1,147 @@ @import "reset.css"; @import "grid.css"; html { font-size:100.01%; } body { font-size: 62.5%; - line-height: 2.2em; + line-height: 2.4em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; font-family: "helvetica", "arial", "sans-serif"; background: #FEFFFE; color: #333; } -h1, h2, h3 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; color:#374754; } +h1, h2, h3 { + font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; + font-weight: bold; +} -h1 { font-size: 2.2em; margin-bottom: 1em; } +h1 { font-size: 2.2em; margin-bottom: 0.6em; } -h2 { font-size: 1.8em; margin: 0.66em 0; } +h2 { font-size: 2em; margin-bottom: 1.2em; } -h3 { font-size: 2em; margin: 1.2em 0; } +h3 { font-size: 1.8em; } -p, ul, ol { font-size: 1.8em; margin: 0; } +p, ul, ol { font-size: 1.6em; } strong { font-weight: bold; } em { font-style: italic; } form, fieldset { display: block; } label { font-weight: bold; display: block; } -a { color: #B00929; font-weight: bold; text-decoration: none; } +a { color: #666; font-weight: bold; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } #sitoi { + display: block; + overflow: hidden; margin: 0 auto; - padding: 4.4em 2em 0 2em; + padding: 7.2em 2em 0 2em; width: 94em; - background: url(/images/beta/logo.png) 2em 0 no-repeat; + /*background: url(/images/beta/logo.png) 2em 0 no-repeat;*/ } .content { - float: right; display: block; overflow: hidden; +} + +.section { + float: left; width: 46em; + padding-top: 44.2em; +} + +.section p { + font-size: 1.8em; } .aside { + float: right; + display: block; + overflow: hidden; + width: 46em; +} + +.step { + display: block; overflow: hidden; padding-left: 14em; - margin: 2.2em 0 -3em 0; - background: url(/images/beta/tutorial.png) 0 0 no-repeat; } -.aside span { +.step p { + margin: 0.8em 0 2.2em 0; +} + +.step span { font-size: 0.8em; color: #FFF; - background: #B6261A; + background: #CCC; padding: 0.3em 0.5em; margin-right: 0.6em; -webkit-border-radius: 20px; } -.aside p { - font-size: 1.4em; - margin-bottom: 2.4em; -} - .newsletter { - float: left; display: block; overflow: hidden; - width: 30em; - margin-top: 44em; - padding: 1.68em 2em 1.68em 14em; - /*background: url(/images/beta/newsletter.png) 0 0 no-repeat;*/ + padding: 1.9em 14.4em 1.9em 2.6em; background-color: #EEE; + margin-top: 2.4em; -webkit-border-radius: 4px; } .newsletter form { - margin: 1.72em 0 0 0; + margin: 2em 0 0 0; } .newsletter .text { background-color: rgba(0,0,0,0.15); border: 1px solid rgba(0,0,0,0.05); padding: 0.48em; font-size: 0.9em; width: 14em; margin-right: 0.4em; color: #FFF; -webkit-border-radius: 4px; } .newsletter input::-webkit-input-placeholder { color: rgba(255,255,255,0.75); } .newsletter .submit { border: 1px solid #FFF; background: #FFF; font-size: 0.9em; padding: 0.5em 1em; -webkit-border-radius: 4px; } .newsletter p { font-size: 1.4em; margin: 0.25em 0; - } .footer { clear: both; display: block; overflow: hidden; text-align: center; } .footer p { + color: #CCC; font-size: 1.2em; - padding: 1.8em 0 0 0; + margin: 2.1em 0 0.1em 0; +} + +.footer a { + color: #CCC; }
fguillen/Sitoi
5adf9601aa52040d676503c0d982e00389d4d713
remove some text
diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index cc199ed..171ff42 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,49 +1,49 @@ <div class="content"> <h1>¿Qué es Sitoi?</h1> <p> Sitoi es una sencilla herramienta para gestionar <em>online</em> la venta o alquiler de espacios en recintos. Si tienes que planificar espacios en una feria, un camping, un garage o incluso una boda, Sitoi es lo que estabas buscando. </p> <div class="aside"> - <h2><span>1</span> Sube el plano de tu lugar</h2> + <h2><span>1</span> Sube tu plano</h2> <p> Seguro que quieres dar salida a los espacios lo antes posible. No pierdas el tiempo dibujando tu espacio en el ordenador, escanea el plano y cárgalo en Sitoi. </p> <h2><span>2</span> Marca los espacios</h2> <p> Para cada espacio que quieras vender o alquilar pincha sobre el plano. Sitoi te permite especificar los metros cuadrados, el precio del espacio y otros detalles. </p> <h2><span>3</span> ¡A vender o alquilar!</h2> <p> Ya no hay nada mas que hacer, dale a publicar y tus clientes pueden pagarte directamente con Paypal. Siéntate a esperar viendo como tus espacios se reservan. </p> </div> </div> <div class="newsletter"> <p> Sitoi todavía no está listo pero te podemos avisar para que lo pruebes antes que nadie. </p> <form action="submit" method="get" accept-charset="utf-8"> <fieldset> <p> <input name="email" placeholder="Tu correo electrónico" class="text" value=""> <input type="submit" class="submit" value="Avisadme"> </p> </fieldset> </form> </div> <div class="footer"> <p>© 2010 <a href="">Sitoi</a> - <a href="">Contacto</a></p> -</div> \ No newline at end of file +</div>
fguillen/Sitoi
22c2ea53b68b729a72adf6aa5aa93dc2649170e1
add some images
diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index 50823de..cc199ed 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,49 +1,49 @@ <div class="content"> <h1>¿Qué es Sitoi?</h1> <p> Sitoi es una sencilla herramienta para gestionar <em>online</em> la venta o alquiler de espacios en recintos. Si tienes que planificar espacios en una feria, un camping, un garage o incluso una boda, Sitoi es lo que estabas buscando. </p> <div class="aside"> - <h2>Sube el plano de tu lugar</h2> + <h2><span>1</span> Sube el plano de tu lugar</h2> <p> Seguro que quieres dar salida a los espacios lo antes posible. No pierdas el tiempo dibujando tu espacio en el ordenador, escanea el plano y cárgalo en Sitoi. </p> - <h2>Marca los espacios disponibles</h2> + <h2><span>2</span> Marca los espacios</h2> <p> Para cada espacio que quieras vender o alquilar pincha sobre el plano. Sitoi te permite especificar los metros cuadrados, el precio del espacio y otros detalles. </p> - <h2>… y a vender o alquilar</h2> + <h2><span>3</span> ¡A vender o alquilar!</h2> <p> Ya no hay nada mas que hacer, dale a publicar y tus clientes pueden pagarte directamente con Paypal. Siéntate a esperar viendo como tus espacios se reservan. </p> </div> </div> <div class="newsletter"> <p> Sitoi todavía no está listo pero te podemos avisar para que lo pruebes antes que nadie. </p> <form action="submit" method="get" accept-charset="utf-8"> <fieldset> <p> <input name="email" placeholder="Tu correo electrónico" class="text" value=""> <input type="submit" class="submit" value="Avisadme"> </p> </fieldset> </form> </div> <div class="footer"> <p>© 2010 <a href="">Sitoi</a> - <a href="">Contacto</a></p> </div> \ No newline at end of file diff --git a/public/images/beta/tutorial.png b/public/images/beta/tutorial.png index 72d13b2..39e40ee 100644 Binary files a/public/images/beta/tutorial.png and b/public/images/beta/tutorial.png differ diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index 76bd866..73ae8d8 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,119 +1,128 @@ @import "reset.css"; @import "grid.css"; html { font-size:100.01%; } body { font-size: 62.5%; line-height: 2.2em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; - font-family: "ff-dagny-web-pro-1","ff-dagny-web-pro-2", "arial", "helvetica", "arial", "sans-serif"; + font-family: "helvetica", "arial", "sans-serif"; background: #FEFFFE; color: #333; } -h1, h2, h3 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } +h1, h2, h3 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; color:#374754; } h1 { font-size: 2.2em; margin-bottom: 1em; } h2 { font-size: 1.8em; margin: 0.66em 0; } h3 { font-size: 2em; margin: 1.2em 0; } p, ul, ol { font-size: 1.8em; margin: 0; } strong { font-weight: bold; } em { font-style: italic; } form, fieldset { display: block; } label { font-weight: bold; display: block; } a { color: #B00929; font-weight: bold; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } #sitoi { margin: 0 auto; - padding: 6.6em 2em 0 2em; + padding: 4.4em 2em 0 2em; width: 94em; background: url(/images/beta/logo.png) 2em 0 no-repeat; } .content { float: right; display: block; overflow: hidden; width: 46em; } .aside { overflow: hidden; padding-left: 14em; margin: 2.2em 0 -3em 0; background: url(/images/beta/tutorial.png) 0 0 no-repeat; } +.aside span { + font-size: 0.8em; + color: #FFF; + background: #B6261A; + padding: 0.3em 0.5em; + margin-right: 0.6em; + -webkit-border-radius: 20px; +} + .aside p { font-size: 1.4em; margin-bottom: 2.4em; } .newsletter { float: left; display: block; overflow: hidden; width: 30em; margin-top: 44em; padding: 1.68em 2em 1.68em 14em; - background: url(/images/beta/newsletter.png) 0 0 no-repeat; - background-color: #90CFDD; + /*background: url(/images/beta/newsletter.png) 0 0 no-repeat;*/ + background-color: #EEE; -webkit-border-radius: 4px; } .newsletter form { margin: 1.72em 0 0 0; } .newsletter .text { background-color: rgba(0,0,0,0.15); border: 1px solid rgba(0,0,0,0.05); padding: 0.48em; font-size: 0.9em; width: 14em; margin-right: 0.4em; color: #FFF; -webkit-border-radius: 4px; } .newsletter input::-webkit-input-placeholder { color: rgba(255,255,255,0.75); } .newsletter .submit { border: 1px solid #FFF; background: #FFF; font-size: 0.9em; padding: 0.5em 1em; -webkit-border-radius: 4px; } .newsletter p { font-size: 1.4em; margin: 0.25em 0; } .footer { clear: both; display: block; overflow: hidden; text-align: center; } .footer p { font-size: 1.2em; padding: 1.8em 0 0 0; }
fguillen/Sitoi
0416cdffdc3ff77e708a1b28dc99e37701af02cd
add placeholder
diff --git a/public/images/beta/logo.png b/public/images/beta/logo.png new file mode 100644 index 0000000..e0b6a71 Binary files /dev/null and b/public/images/beta/logo.png differ diff --git a/public/images/beta/newsletter.png b/public/images/beta/newsletter.png new file mode 100644 index 0000000..a938553 Binary files /dev/null and b/public/images/beta/newsletter.png differ diff --git a/public/images/beta/tutorial.png b/public/images/beta/tutorial.png new file mode 100644 index 0000000..72d13b2 Binary files /dev/null and b/public/images/beta/tutorial.png differ diff --git a/public/stylesheets/beta/base.css b/public/stylesheets/beta/base.css deleted file mode 100644 index 905a123..0000000 --- a/public/stylesheets/beta/base.css +++ /dev/null @@ -1,36 +0,0 @@ -/* master.css */ - -html { font-size:100.01%; } - -body { - font-size: 62.5%; - line-height: 2.2em; - font-size: x-small; - font-variant: normal; - font-style: normal; - font-weight: normal; - font-family: "ff-dagny-web-pro-1","ff-dagny-web-pro-2", "arial", "helvetica", "arial", "sans-serif"; -} - -h1, h2, h3 { - font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; - font-weight: bold; -} - -h1 { font-size: 2.2em; } -h2 { font-size: 1.8em; } -h3 { font-size: 1.6em; } - -p, ul, ol { font-size: 1.8em; margin: 1.2em 0; } - -strong { font-weight: bold; } - -em { font-style: italic; } - -form, fieldset { display: block; } - -label { font-weight: bold; display: block; } - -a { color: #00F; text-decoration: none; } - -a:focus, a:hover { text-decoration: underline; } \ No newline at end of file diff --git a/public/stylesheets/beta/master.css b/public/stylesheets/beta/master.css deleted file mode 100644 index 509727b..0000000 --- a/public/stylesheets/beta/master.css +++ /dev/null @@ -1,98 +0,0 @@ -html { font-size:100.01%; } - -body { - font-size: 62.5%; - line-height: 2.2em; - font-size: x-small; - font-variant: normal; - font-style: normal; - font-weight: normal; - font-family: "ff-dagny-web-pro-1","ff-dagny-web-pro-2", "arial", "helvetica", "arial", "sans-serif"; - background: #FEFEFE; -} - -h1, h2, h3 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } - -h1 { font-size: 2.2em; margin-bottom: 1em; } - -h2 { font-size: 1.8em; margin: 0.66em 0; } - -h3 { font-size: 2em; margin: 1.2em 0; } - -p, ul, ol { font-size: 1.8em; margin: 0; } - -strong { font-weight: bold; } - -em { font-style: italic; } - -form, fieldset { display: block; } - -label { font-weight: bold; display: block; } - -a { color: #666; text-decoration: none; } - -a:focus, a:hover { text-decoration: underline; } - -#sitoi { - margin: 0 auto; - padding: 4.4em 2em 0 2em; - width: 94em; -} - -.content { - float: right; - display: block; - overflow: hidden; - width: 46em; -} - -.aside { - overflow: hidden; - padding-left: 14em; - margin: 2.2em 0 -3em 0; -} - -.aside p { - font-size: 1.6em; - margin-bottom: 2em; -} - -.newsletter { - float: left; - display: block; - overflow: hidden; - width: 30em; - margin-top: 46.2em; - padding: 2em 2em 2em 14em; - background: rgba(0,0,0,0.05); - -webkit-border-radius: 4px; -} - -.newsletter form { - margin: 2.4em 0 0 0; -} - -.newsletter .text { - border: 1px solid #CCC; - padding: 0.4em; - font-size: 0.8em; - width: 16em; - margin-right: 0.4em; - -webkit-border-radius: 4px; -} - -.newsletter p { - font-size: 1.6em; -} - -.footer { - clear: both; - display: block; - overflow: hidden; - text-align: center; -} - -.footer p { - font-size: 1.2em; - padding: 1.92em 0 0 0; -} diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index a55f35c..669f0b1 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,5 +1,115 @@ -/* screen.css */ - @import "reset.css"; @import "grid.css"; -@import "master.css"; + +html { font-size:100.01%; } + +body { + font-size: 62.5%; + line-height: 2.2em; + font-size: x-small; + font-variant: normal; + font-style: normal; + font-weight: normal; + font-family: "ff-dagny-web-pro-1","ff-dagny-web-pro-2", "arial", "helvetica", "arial", "sans-serif"; + background: #FFF; + color: #363943; +} + +h1, h2, h3 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } + +h1 { font-size: 2.2em; margin-bottom: 1em; } + +h2 { font-size: 1.8em; margin: 0.66em 0; } + +h3 { font-size: 2em; margin: 1.2em 0; } + +p, ul, ol { font-size: 1.8em; margin: 0; } + +strong { font-weight: bold; } + +em { font-style: italic; } + +form, fieldset { display: block; } + +label { font-weight: bold; display: block; } + +a { color: #8FBFA1; font-weight: bold; text-decoration: none; } + +a:focus, a:hover { text-decoration: underline; } + +#sitoi { + margin: 0 auto; + padding: 6.6em 2em 0 2em; + width: 94em; + background: url(/images/beta/logo.png) 2em 0 no-repeat; +} + +.content { + float: right; + display: block; + overflow: hidden; + width: 46em; +} + +.aside { + overflow: hidden; + padding-left: 14em; + margin: 2.2em 0 -3em 0; + background: url(/images/beta/tutorial.png) 0 0 no-repeat; +} + +.aside p { + font-size: 1.4em; + margin-bottom: 2.4em; +} + +.newsletter { + float: left; + display: block; + overflow: hidden; + width: 30em; + margin-top: 44em; + padding: 1.68em 2em 1.68em 14em; + background: url(/images/beta/newsletter.png) 0 0 no-repeat; + background-color: rgba(0,0,0,0.08); + -webkit-border-radius: 4px; +} + +.newsletter form { + margin: 1.72em 0 0 0; +} + +.newsletter .text { + border: 1px solid #FFF; + padding: 0.48em; + font-size: 0.9em; + width: 14em; + margin-right: 0.4em; + -webkit-border-radius: 4px; +} + +.newsletter .submit { + border: 1px solid #FFF; + background: #FFF; + font-size: 0.9em; + padding: 0.5em 1em; + -webkit-border-radius: 4px; +} + +.newsletter p { + font-size: 1.4em; + margin: 0.25em 0; + +} + +.footer { + clear: both; + display: block; + overflow: hidden; + text-align: center; +} + +.footer p { + font-size: 1.2em; + padding: 1.8em 0 0 0; +}
fguillen/Sitoi
21a097be15debce9ee97f8706627384dac6bdd64
putting the grid in place
diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index f4ec7ea..50823de 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,49 +1,49 @@ <div class="content"> <h1>¿Qué es Sitoi?</h1> <p> Sitoi es una sencilla herramienta para gestionar <em>online</em> la venta o alquiler de espacios en recintos. Si tienes que planificar espacios en una feria, un camping, un garage o incluso una boda, Sitoi es lo que estabas buscando. </p> <div class="aside"> - <h3>Sube el plano de tu lugar</h3> + <h2>Sube el plano de tu lugar</h2> <p> - Lo que te interesa es dar salida a los espacios lo antes posible. + Seguro que quieres dar salida a los espacios lo antes posible. No pierdas el tiempo dibujando tu espacio en el ordenador, escanea el plano y cárgalo en Sitoi. </p> - <h3>Marca los espacios disponibles</h3> + <h2>Marca los espacios disponibles</h2> <p> Para cada espacio que quieras vender o alquilar pincha sobre el plano. - Sitoi te permite especificar los metros cuadrados y el precio del espacio. + Sitoi te permite especificar los metros cuadrados, el precio del espacio y otros detalles. </p> - <h3>… y a vender o alquilar</h3> + <h2>… y a vender o alquilar</h2> <p> Ya no hay nada mas que hacer, dale a publicar y tus clientes pueden pagarte - directamente con Paypal. Siéntate a esperar mientras Sitoi trabaja. + directamente con Paypal. Siéntate a esperar viendo como tus espacios se reservan. </p> </div> </div> <div class="newsletter"> <p> - Sitoi todavía no está listo pero estamos trabajando duro. - Déjanos tu correo y te podemos avisar para que seas uno de los primeros en probarlo. + Sitoi todavía no está listo pero te podemos avisar + para que lo pruebes antes que nadie. </p> <form action="submit" method="get" accept-charset="utf-8"> <fieldset> <p> <input name="email" placeholder="Tu correo electrónico" class="text" value=""> <input type="submit" class="submit" value="Avisadme"> </p> </fieldset> </form> </div> <div class="footer"> - <p>© 2010 Sitoi</p> + <p>© 2010 <a href="">Sitoi</a> - <a href="">Contacto</a></p> </div> \ No newline at end of file diff --git a/public/stylesheets/beta/master.css b/public/stylesheets/beta/master.css index 2fe3f0a..509727b 100644 --- a/public/stylesheets/beta/master.css +++ b/public/stylesheets/beta/master.css @@ -1,57 +1,98 @@ +html { font-size:100.01%; } + body { + font-size: 62.5%; + line-height: 2.2em; + font-size: x-small; + font-variant: normal; + font-style: normal; + font-weight: normal; + font-family: "ff-dagny-web-pro-1","ff-dagny-web-pro-2", "arial", "helvetica", "arial", "sans-serif"; background: #FEFEFE; } +h1, h2, h3 { font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; font-weight: bold; } + +h1 { font-size: 2.2em; margin-bottom: 1em; } + +h2 { font-size: 1.8em; margin: 0.66em 0; } + +h3 { font-size: 2em; margin: 1.2em 0; } + +p, ul, ol { font-size: 1.8em; margin: 0; } + +strong { font-weight: bold; } + +em { font-style: italic; } + +form, fieldset { display: block; } + +label { font-weight: bold; display: block; } + +a { color: #666; text-decoration: none; } + +a:focus, a:hover { text-decoration: underline; } + #sitoi { margin: 0 auto; - margin-top: 9em; - padding: 0 2em; + padding: 4.4em 2em 0 2em; width: 94em; } .content { float: right; display: block; overflow: hidden; width: 46em; - margin-bottom: 2em; } .aside { + overflow: hidden; padding-left: 14em; + margin: 2.2em 0 -3em 0; } .aside p { - font-size: 1.4em; - margin: 1.6em 0; + font-size: 1.6em; + margin-bottom: 2em; } .newsletter { float: left; display: block; overflow: hidden; - -webkit-border-radius: 6px; - border: 1px solid #EEE; - width: 42em; - padding: 2em; - margin-top: 34em; + width: 30em; + margin-top: 46.2em; + padding: 2em 2em 2em 14em; + background: rgba(0,0,0,0.05); + -webkit-border-radius: 4px; } -.newsletter p { - font-size: 1.6em; - margin: 0; +.newsletter form { + margin: 2.4em 0 0 0; } -.newsletter form { - margin-top: 1.6em; +.newsletter .text { + border: 1px solid #CCC; + padding: 0.4em; + font-size: 0.8em; + width: 16em; + margin-right: 0.4em; + -webkit-border-radius: 4px; } -.footer { +.newsletter p { + font-size: 1.6em; +} + +.footer { clear: both; + display: block; + overflow: hidden; text-align: center; } -.footer p { - font-size: 1.4em; - margin: 1.8em; -} \ No newline at end of file +.footer p { + font-size: 1.2em; + padding: 1.92em 0 0 0; +} diff --git a/public/stylesheets/beta/screen.css b/public/stylesheets/beta/screen.css index 0ea1863..a55f35c 100644 --- a/public/stylesheets/beta/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,6 +1,5 @@ /* screen.css */ @import "reset.css"; @import "grid.css"; -@import "base.css"; @import "master.css";
fguillen/Sitoi
1e851672a1ad8a947d32c41977d588a6ca1411ae
TODO fix baseline
diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index e10aa71..f4ec7ea 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,53 +1,49 @@ <div class="content"> <h1>¿Qué es Sitoi?</h1> <p> Sitoi es una sencilla herramienta para gestionar <em>online</em> - la reserva, venta y alquiler de espacios en recintos. Si tienes que planificar + la venta o alquiler de espacios en recintos. Si tienes que planificar espacios en una feria, un camping, un garage o incluso una boda, Sitoi es lo que estabas buscando. </p> <div class="aside"> - <h3>Sube el plano del lugar</h3> + <h3>Sube el plano de tu lugar</h3> <p> - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed - do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. + Lo que te interesa es dar salida a los espacios lo antes posible. + No pierdas el tiempo dibujando tu espacio en el ordenador, escanea + el plano y cárgalo en Sitoi. </p> - <h3>Pincha en los espacios</h3> + <h3>Marca los espacios disponibles</h3> <p> - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed - do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip. + Para cada espacio que quieras vender o alquilar pincha sobre el plano. + Sitoi te permite especificar los metros cuadrados y el precio del espacio. </p> <h3>… y a vender o alquilar</h3> <p> - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed - do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi. + Ya no hay nada mas que hacer, dale a publicar y tus clientes pueden pagarte + directamente con Paypal. Siéntate a esperar mientras Sitoi trabaja. </p> </div> </div> <div class="newsletter"> <p> Sitoi todavía no está listo pero estamos trabajando duro. Déjanos tu correo y te podemos avisar para que seas uno de los primeros en probarlo. </p> <form action="submit" method="get" accept-charset="utf-8"> <fieldset> <p> <input name="email" placeholder="Tu correo electrónico" class="text" value=""> <input type="submit" class="submit" value="Avisadme"> </p> </fieldset> </form> </div> <div class="footer"> <p>© 2010 Sitoi</p> </div> \ No newline at end of file diff --git a/public/stylesheets/beta/master.css b/public/stylesheets/beta/master.css index 0d238e5..2fe3f0a 100644 --- a/public/stylesheets/beta/master.css +++ b/public/stylesheets/beta/master.css @@ -1,58 +1,57 @@ body { background: #FEFEFE; } #sitoi { margin: 0 auto; - margin-top: 4.4em; + margin-top: 9em; padding: 0 2em; width: 94em; } .content { float: right; display: block; overflow: hidden; width: 46em; margin-bottom: 2em; } .aside { padding-left: 14em; } .aside p { font-size: 1.4em; margin: 1.6em 0; - margin-top: 0.8em; } .newsletter { float: left; display: block; overflow: hidden; -webkit-border-radius: 6px; border: 1px solid #EEE; width: 42em; padding: 2em; - margin-top: 36em; + margin-top: 34em; } .newsletter p { font-size: 1.6em; margin: 0; } -.newsletter form p { - margin: 0; +.newsletter form { + margin-top: 1.6em; } .footer { - clear: both; - margin-top: 2em; + clear: both; + text-align: center; } .footer p { - font-size: 1.4em; - margin-top: 1.6em; + font-size: 1.4em; + margin: 1.8em; } \ No newline at end of file
fguillen/Sitoi
deacc6ddd0fd6f2ee6f3604369ff3dcabe57d26b
add a proper font with typekit
diff --git a/app/views/layouts/application.erb b/app/views/layouts/application.erb index d31c471..086aecd 100644 --- a/app/views/layouts/application.erb +++ b/app/views/layouts/application.erb @@ -1,26 +1,27 @@ <!DOCTYPE html> <html class="no-js"> <head> <!-- ______ __ ______ ______ __ /\ ___\ /\ \ /\__ _\ /\ __ \ /\ \ \ \___ \ \ \ \ \/_/\ \/ \ \ \/\ \ \ \ \ \/\_____\ \ \_\ \ \_\ \ \_____\ \ \_\ \/_____/ \/_/ \/_/ \/_____/ \/_/ Sitoi, gestión (sencilla) de espacios --> <meta charset="utf-8"> <title>Sitoi — Gestión de espacios</title> <%= stylesheet_link_tag "beta/screen.css" %> - <%= javascript_include_tag "jquery-1.4.2.js", "hashgrid.js", "modernizr.js" %> - <!--[if IE]><%= javascript_include_tag "html5.js" %><![endif]--> + <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", "hashgrid.js", "modernizr.js" %> + <script type="text/javascript" src="http://use.typekit.com/bnw8joa.js"></script> + <script type="text/javascript">try{Typekit.load();}catch(e){}</script> </head> <body> <div id="sitoi"> <%= yield %> </div> </body> </html> \ No newline at end of file diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index ad614a2..e10aa71 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -1,63 +1,53 @@ -<section id="join"> +<div class="content"> + <h1>¿Qué es Sitoi?</h1> <p> - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed - do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in - reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla - pariatur. + Sitoi es una sencilla herramienta para gestionar <em>online</em> + la reserva, venta y alquiler de espacios en recintos. Si tienes que planificar + espacios en una feria, un camping, un garage o incluso una boda, Sitoi + es lo que estabas buscando. </p> -</section> + <div class="aside"> + <h3>Sube el plano del lugar</h3> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. + </p> -<section id="about"> - - <p> - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed - do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in - reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla - pariatur. - </p> + <h3>Pincha en los espacios</h3> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip. + </p> - <aside> - <header> - <h2>Sitoi es muy muy fácil</h2> - </header> - - <section> - <h3>Sube el plano del lugar</h3> - <p> - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed - do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. - </p> - </section> - - <section> - <h3>Etiqueta los espacios</h3> - <p> - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed - do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip. - </p> - </section> - - <section> - <h3>… y a vender o alquilar</h3> - <p> - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed - do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi. - </p> - </section> - </aside> -</section> + <h3>… y a vender o alquilar</h3> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi. + </p> + </div> +</div> +<div class="newsletter"> + <p> + Sitoi todavía no está listo pero estamos trabajando duro. + Déjanos tu correo y te podemos avisar para que seas uno de los primeros en probarlo. + </p> + <form action="submit" method="get" accept-charset="utf-8"> + <fieldset> + <p> + <input name="email" placeholder="Tu correo electrónico" class="text" value=""> + <input type="submit" class="submit" value="Avisadme"> + </p> + </fieldset> + </form> +</div> -<footer> +<div class="footer"> <p>© 2010 Sitoi</p> -</footer> \ No newline at end of file +</div> \ No newline at end of file diff --git a/public/stylesheets/beta/base.css b/public/stylesheets/beta/base.css index a7283a7..ec13651 100644 --- a/public/stylesheets/beta/base.css +++ b/public/stylesheets/beta/base.css @@ -1,32 +1,36 @@ /* master.css */ html { font-size:100.01%; } body { font-size: 62.5%; - line-height: 2em; + line-height: 2.2em; font-size: x-small; font-variant: normal; font-style: normal; font-weight: normal; - font-family: "helvetica", "arial", "sans-serif"; + font-family: "ff-dagny-web-pro-1","ff-dagny-web-pro-2", "arial", "helvetica", "arial", "sans-serif"; } -h1, h2, h3 { font-weight:bold; } -h1 { font-size:2em; } -h2 { font-size:1.8em; } -h3 { font-size:1.4em; } +h1, h2, h3 { + font-family: "ff-enzo-web-1", "ff-enzo-web-2", "helvetica", "arial", "sans-serif"; + font-weight: 600; +} + +h1 { font-size: 2.2em; } +h2 { font-size: 1.8em; } +h3 { font-size: 1.6em; } -p, ul, ol { font-size: 1.4em; margin: 1.48em 0; } +p, ul, ol { font-size: 1.8em; margin: 1.2em 0; } strong { font-weight: bold; } em { font-style: italic; } form, fieldset { display: block; } label { font-weight: bold; display: block; } a { color: #00F; text-decoration: none; } a:focus, a:hover { text-decoration: underline; } \ No newline at end of file diff --git a/public/stylesheets/beta/grid.css b/public/stylesheets/beta/grid.css index 18146ac..c6a9d97 100644 --- a/public/stylesheets/beta/grid.css +++ b/public/stylesheets/beta/grid.css @@ -1,17 +1,17 @@ /* grid.css */ #grid { width: 980px; position: absolute; top: 0; left: 50%; margin-left: -490px; background: url(/images/bg-grid-980.gif) repeat-y 0 0; } #grid div.horiz { - height: 19px; + height: 21px; border-bottom: 1px dotted #AAA; margin: 0; padding: 0; } \ No newline at end of file diff --git a/public/stylesheets/beta/master.css b/public/stylesheets/beta/master.css index cb491e9..0d238e5 100644 --- a/public/stylesheets/beta/master.css +++ b/public/stylesheets/beta/master.css @@ -1,45 +1,58 @@ +body { + background: #FEFEFE; +} + #sitoi { margin: 0 auto; - margin-top: 6em; + margin-top: 4.4em; padding: 0 2em; width: 94em; } -#join { - background: #EEE; +.content { + float: right; display: block; overflow: hidden; - float: left; width: 46em; - margin-right: 2em; - margin-top: 42em; + margin-bottom: 2em; +} + +.aside { + padding-left: 14em; } -#join p { - margin: 1.4em; +.aside p { + font-size: 1.4em; + margin: 1.6em 0; + margin-top: 0.8em; } -#about { +.newsletter { + float: left; display: block; overflow: hidden; - width: 46em; - margin-bottom: 2em; + -webkit-border-radius: 6px; + border: 1px solid #EEE; + width: 42em; + padding: 2em; + margin-top: 36em; } -#about aside header { - margin-bottom: 2em; +.newsletter p { + font-size: 1.6em; + margin: 0; } -#about aside section { - padding-left: 14em; +.newsletter form p { + margin: 0; } -#about aside section p { - font-size: 1.2em; - margin: 1.72em 0; - margin-top: 0.86em; +.footer { + clear: both; + margin-top: 2em; } -footer { clear: both; margin-top: 2em; } - -footer p { font-size: 1.2em; margin-top: 1.72em; } \ No newline at end of file +.footer p { + font-size: 1.4em; + margin-top: 1.6em; +} \ No newline at end of file
fguillen/Sitoi
1dd97c163c1ba74a3c03836596ec5f673b322bbb
plan some layout
diff --git a/app/controllers/ui_controller.rb b/app/controllers/ui_controller.rb index ddb6ae1..f97b1a6 100644 --- a/app/controllers/ui_controller.rb +++ b/app/controllers/ui_controller.rb @@ -1,4 +1,3 @@ class UiController < ApplicationController def beta;end - def home; end end \ No newline at end of file diff --git a/app/views/layouts/application.erb b/app/views/layouts/application.erb index b53c242..d31c471 100644 --- a/app/views/layouts/application.erb +++ b/app/views/layouts/application.erb @@ -1,28 +1,26 @@ <!DOCTYPE html> <html class="no-js"> <head> <!-- ______ __ ______ ______ __ /\ ___\ /\ \ /\__ _\ /\ __ \ /\ \ \ \___ \ \ \ \ \/_/\ \/ \ \ \/\ \ \ \ \ \/\_____\ \ \_\ \ \_\ \ \_____\ \ \_\ \/_____/ \/_/ \/_/ \/_____/ \/_/ - Sitoi, el (sencillo) gestor espacial - + Sitoi, gestión (sencilla) de espacios + --> <meta charset="utf-8"> <title>Sitoi — Gestión de espacios</title> + <%= stylesheet_link_tag "beta/screen.css" %> <%= javascript_include_tag "jquery-1.4.2.js", "hashgrid.js", "modernizr.js" %> - <%= stylesheet_link_tag "screen.css" %> - <!--[if IE]> - <%= javascript_include_tag "html5.js" %> - <![endif]--> + <!--[if IE]><%= javascript_include_tag "html5.js" %><![endif]--> </head> <body> <div id="sitoi"> <%= yield %> </div> </body> </html> \ No newline at end of file diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb index e69de29..ad614a2 100644 --- a/app/views/ui/beta.html.erb +++ b/app/views/ui/beta.html.erb @@ -0,0 +1,63 @@ +<section id="join"> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. + </p> +</section> + + +<section id="about"> + + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. + </p> + + <aside> + <header> + <h2>Sitoi es muy muy fácil</h2> + </header> + + <section> + <h3>Sube el plano del lugar</h3> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. + </p> + </section> + + <section> + <h3>Etiqueta los espacios</h3> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip. + </p> + </section> + + <section> + <h3>… y a vender o alquilar</h3> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi. + </p> + </section> + </aside> +</section> + + +<footer> + <p>© 2010 Sitoi</p> +</footer> \ No newline at end of file diff --git a/app/views/ui/home.html.erb b/app/views/ui/home.html.erb deleted file mode 100644 index 89a8aa2..0000000 --- a/app/views/ui/home.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<p> - Hello designer! -</p> \ No newline at end of file diff --git a/public/images/bg-grid-660.gif b/public/images/bg-grid-660.gif new file mode 100755 index 0000000..0418c18 Binary files /dev/null and b/public/images/bg-grid-660.gif differ diff --git a/public/images/bg-grid-980.gif b/public/images/bg-grid-980.gif new file mode 100755 index 0000000..a4a8c01 Binary files /dev/null and b/public/images/bg-grid-980.gif differ diff --git a/public/javascripts/hahsgrid.js b/public/javascripts/hashgrid.js similarity index 100% rename from public/javascripts/hahsgrid.js rename to public/javascripts/hashgrid.js diff --git a/public/stylesheets/base.css b/public/stylesheets/base.css deleted file mode 100644 index dd5a84c..0000000 --- a/public/stylesheets/base.css +++ /dev/null @@ -1,107 +0,0 @@ -/* master.css */ - -html { font-size:100.01%; } - -body { - font-size: 62.5%; - line-height: 1.8em; - font-size: x-small; - font-variant: normal; - font-style: normal; - font-weight: normal; - font-family: "lucida grande", "helvetica", "sans-serif"; -} - -h1, h2, h3, h4, h5, h6 { - font-weight:bold; - color: #FFF; -} - -h1 {font-size:1.8em;font-weight:normal;} -h2 {font-size:1.8em;} -h3 {font-size:1.4em;} -h4 {font-size:1.2em;} -h5 {font-size:1.2em;} -h6 {font-size:1em;} - -p, ul, ol { - font-size: 1.2em; - margin: 1.5em 0; -} - -small p { - margin: 1.8em 0; - line-height: 1.8em; -} - -ul, ol { - margin-left: 1.5em; -} - -ul { - list-style-type: square; -} - -ol { - list-style-type: decimal; -} - -strong { - font-weight: bold; -} - -em, dfn { - font-style: italic; -} - -del { - text-decoration: line-through; -} - -sup, sub { - line-height:0; -} - -abbr, acronym { - border-bottom:1px dotted #000; -} - -pre { - margin: 1.5em 0; - white-space: pre; -} - -dl { - margin: 1.5em 0; -} - -dd { - margin-left: 1.5em; -} - -table { - margin: 1.5em 0; - width: 100%; -} - -form, fieldset { - display: block; -} - -label { - font-weight: bold; - display: block; -} - -legend { - font-size: 1.2em; -} - -a { - color: #00F; - text-decoration: none; -} - -a:focus, a:hover { - text-decoration: underline; -} \ No newline at end of file diff --git a/public/stylesheets/beta/base.css b/public/stylesheets/beta/base.css new file mode 100644 index 0000000..a7283a7 --- /dev/null +++ b/public/stylesheets/beta/base.css @@ -0,0 +1,32 @@ +/* master.css */ + +html { font-size:100.01%; } + +body { + font-size: 62.5%; + line-height: 2em; + font-size: x-small; + font-variant: normal; + font-style: normal; + font-weight: normal; + font-family: "helvetica", "arial", "sans-serif"; +} + +h1, h2, h3 { font-weight:bold; } +h1 { font-size:2em; } +h2 { font-size:1.8em; } +h3 { font-size:1.4em; } + +p, ul, ol { font-size: 1.4em; margin: 1.48em 0; } + +strong { font-weight: bold; } + +em { font-style: italic; } + +form, fieldset { display: block; } + +label { font-weight: bold; display: block; } + +a { color: #00F; text-decoration: none; } + +a:focus, a:hover { text-decoration: underline; } \ No newline at end of file diff --git a/public/stylesheets/beta/grid.css b/public/stylesheets/beta/grid.css new file mode 100644 index 0000000..18146ac --- /dev/null +++ b/public/stylesheets/beta/grid.css @@ -0,0 +1,17 @@ +/* grid.css */ + +#grid { + width: 980px; + position: absolute; + top: 0; + left: 50%; + margin-left: -490px; + background: url(/images/bg-grid-980.gif) repeat-y 0 0; +} + +#grid div.horiz { + height: 19px; + border-bottom: 1px dotted #AAA; + margin: 0; + padding: 0; +} \ No newline at end of file diff --git a/public/stylesheets/beta/master.css b/public/stylesheets/beta/master.css new file mode 100644 index 0000000..cb491e9 --- /dev/null +++ b/public/stylesheets/beta/master.css @@ -0,0 +1,45 @@ +#sitoi { + margin: 0 auto; + margin-top: 6em; + padding: 0 2em; + width: 94em; +} + +#join { + background: #EEE; + display: block; + overflow: hidden; + float: left; + width: 46em; + margin-right: 2em; + margin-top: 42em; +} + +#join p { + margin: 1.4em; +} + +#about { + display: block; + overflow: hidden; + width: 46em; + margin-bottom: 2em; +} + +#about aside header { + margin-bottom: 2em; +} + +#about aside section { + padding-left: 14em; +} + +#about aside section p { + font-size: 1.2em; + margin: 1.72em 0; + margin-top: 0.86em; +} + +footer { clear: both; margin-top: 2em; } + +footer p { font-size: 1.2em; margin-top: 1.72em; } \ No newline at end of file diff --git a/public/stylesheets/reset.css b/public/stylesheets/beta/reset.css similarity index 100% rename from public/stylesheets/reset.css rename to public/stylesheets/beta/reset.css diff --git a/public/stylesheets/screen.css b/public/stylesheets/beta/screen.css similarity index 80% rename from public/stylesheets/screen.css rename to public/stylesheets/beta/screen.css index e6548d1..0ea1863 100644 --- a/public/stylesheets/screen.css +++ b/public/stylesheets/beta/screen.css @@ -1,6 +1,6 @@ /* screen.css */ @import "reset.css"; +@import "grid.css"; @import "base.css"; @import "master.css"; -@import "grid.css"; \ No newline at end of file diff --git a/public/stylesheets/grid.css b/public/stylesheets/grid.css deleted file mode 100644 index 043e126..0000000 --- a/public/stylesheets/grid.css +++ /dev/null @@ -1,27 +0,0 @@ -/* grid.css */ - -#grid{ - width: 980px; - position: absolute; - top: 0; - left: 50%; - margin-left: -490px; - background: url(../img/bg-grid-980.gif) repeat-y 0 0; -} - -#grid div.horiz{ - height: 17px; - border-bottom: 1px dotted #AAA; - margin: 0; - padding: 0; -} - -#grid.grid-1 { - background: url(../img/bg-grid-980.gif) repeat-y 0 0; -} - -#grid.grid-2{ - background: url(../img/bg-grid-660.gif) repeat-y 160px 0; - padding: 0 160px; - width: 660px; -} \ No newline at end of file diff --git a/public/stylesheets/master.css b/public/stylesheets/master.css deleted file mode 100644 index e69de29..0000000
fguillen/Sitoi
c76336bfb161a45d49049ddcbcc5994c43ea3ee2
setup the frontend files
diff --git a/app/controllers/ui_controller.rb b/app/controllers/ui_controller.rb index df1d06e..ddb6ae1 100644 --- a/app/controllers/ui_controller.rb +++ b/app/controllers/ui_controller.rb @@ -1,3 +1,4 @@ class UiController < ApplicationController + def beta;end def home; end -end +end \ No newline at end of file diff --git a/app/views/layouts/application.erb b/app/views/layouts/application.erb index da0d3a9..b53c242 100644 --- a/app/views/layouts/application.erb +++ b/app/views/layouts/application.erb @@ -1,14 +1,28 @@ <!DOCTYPE html> - +<html class="no-js"> <head> + <!-- + + ______ __ ______ ______ __ + /\ ___\ /\ \ /\__ _\ /\ __ \ /\ \ + \ \___ \ \ \ \ \/_/\ \/ \ \ \/\ \ \ \ \ + \/\_____\ \ \_\ \ \_\ \ \_____\ \ \_\ + \/_____/ \/_/ \/_/ \/_____/ \/_/ + + Sitoi, el (sencillo) gestor espacial + + --> <meta charset="utf-8"> <title>Sitoi — Gestión de espacios</title> + <%= javascript_include_tag "jquery-1.4.2.js", "hashgrid.js", "modernizr.js" %> + <%= stylesheet_link_tag "screen.css" %> + <!--[if IE]> + <%= javascript_include_tag "html5.js" %> + <![endif]--> </head> - <body> - <div id="sitoi"> <%= yield %> </div> - -</body> \ No newline at end of file +</body> +</html> \ No newline at end of file diff --git a/app/views/ui/beta.html.erb b/app/views/ui/beta.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/public/javascripts/hahsgrid.js b/public/javascripts/hahsgrid.js new file mode 100755 index 0000000..7f78c8a --- /dev/null +++ b/public/javascripts/hahsgrid.js @@ -0,0 +1,290 @@ +/** + * hashgrid (jQuery version) + * http://github.com/dotjay/hashgrid + * Version 4, 29 Mar 2010 + * By Jon Gibbins, accessibility.co.uk + * + * // Using a basic #grid setup + * var grid = new hashgrid(); + * + * // Using #grid with a custom id (e.g. #mygrid) + * var grid = new hashgrid("mygrid"); + * + * // Using #grid with additional options + * var grid = new hashgrid({ + * id: 'mygrid', // id for the grid container + * modifierKey: 'alt', // optional 'ctrl', 'alt' or 'shift' + * showGridKey: 's', // key to show the grid + * holdGridKey: 'enter', // key to hold the grid in place + * foregroundKey: 'f', // key to toggle foreground/background + * jumpGridsKey: 'd', // key to cycle through the grid classes + * numberOfGrids: 2, // number of grid classes used + * classPrefix: 'class', // prefix for the grid classes + * cookiePrefix: 'mygrid' // prefix for the cookie name + * }); + */ + + +/** + * You can call hashgrid from your own code, but it's loaded here by + * default for convenience. + */ +$(document).ready(function() { + + var grid = new hashgrid({ + numberOfGrids: 2 + }); + +}); + + +/** + * hashgrid overlay + */ +var hashgrid = function(set) { + + var options = { + id: 'grid', // id for the grid container + modifierKey: null, // optional 'ctrl', 'alt' or 'shift' + showGridKey: 'g', // key to show the grid + holdGridKey: 'h', // key to hold the grid in place + foregroundKey: 'f', // key to toggle foreground/background + jumpGridsKey: 'j', // key to cycle through the grid classes + numberOfGrids: 1, // number of grid classes used + classPrefix: 'grid-', // prefix for the grid classes + cookiePrefix: 'hashgrid'// prefix for the cookie name + }; + var overlayOn = false, + sticky = false, + overlayZState = 'B', + overlayZBackground = -1, + overlayZForeground = 9999, + classNumber = 1; + + // Apply options + if (typeof set == 'object') { + var k; + for (k in set) options[k] = set[k]; + } + else if (typeof set == 'string') { + options.id = set; + } + + // Remove any conflicting overlay + if ($('#' + options.id).length > 0) { + $('#' + options.id).remove(); + } + + // Create overlay, hidden before adding to DOM + var overlayEl = $('<div></div>'); + overlayEl + .attr('id', options.id) + .css('display', 'none'); + $("body").prepend(overlayEl); + var overlay = $('#' + options.id); + + // Unless a custom z-index is set, ensure the overlay will be behind everything + if (overlay.css('z-index') == 'auto') overlay.css('z-index', overlayZBackground); + + // Override the default overlay height with the actual page height + var pageHeight = parseFloat($(document).height()); + overlay.height(pageHeight); + + // Add the first grid line so that we can measure it + overlay.append('<div class="horiz first-line">'); + + // Calculate the number of grid lines needed + var overlayGridLines = overlay.children('.horiz'), + overlayGridLineHeight = parseFloat(overlayGridLines.css('height')) + parseFloat(overlayGridLines.css('border-bottom-width')); + + // Break on zero line height + if (overlayGridLineHeight <= 0) return true; + + // Add the remaining grid lines + var i, numGridLines = Math.floor(pageHeight / overlayGridLineHeight); + for (i = numGridLines - 1; i >= 1; i--) { + overlay.append('<div class="horiz"></div>'); + } + + // Check for saved state + var overlayCookie = readCookie(options.cookiePrefix + options.id); + if (typeof overlayCookie == 'string') { + var state = overlayCookie.split(','); + state[2] = Number(state[2]); + if ((typeof state[2] == 'number') && !isNaN(state[2])) { + classNumber = state[2].toFixed(0); + overlay.addClass(options.classPrefix + classNumber); + } + if (state[1] == 'F') { + overlayZState = 'F'; + overlay.css('z-index', overlayZForeground); + } + if (state[0] == '1') { + overlayOn = true; + sticky = true; + overlay.show(); + } + } + else { + overlay.addClass(options.classPrefix + classNumber) + } + + // Keyboard controls + $(document).bind('keydown', keydownHandler); + $(document).bind('keyup', keyupHandler); + + /** + * Helpers + */ + + function getModifier(e) { + if (options.modifierKey == null) return true; // Bypass by default + var m = true; + switch(options.modifierKey) { + case 'ctrl': + m = (e.ctrlKey ? e.ctrlKey : false); + break; + + case 'alt': + m = (e.altKey ? e.altKey : false); + break; + + case 'shift': + m = (e.shiftKey ? e.shiftKey : false); + break; + } + return m; + } + + function getKey(e) { + var k = false, c = (e.keyCode ? e.keyCode : e.which); + // Handle keywords + if (c == 13) k = 'enter'; + // Handle letters + else k = String.fromCharCode(c).toLowerCase(); + return k; + } + + function saveState() { + createCookie(options.cookiePrefix + options.id, (sticky ? '1' : '0') + ',' + overlayZState + ',' + classNumber, 1); + } + + /** + * Event handlers + */ + + function keydownHandler(e) { + var source = e.target.tagName.toLowerCase(); + if ((source == 'input') || (source == 'textarea') || (source == 'select')) return true; + var m = getModifier(e); + if (!m) return true; + var k = getKey(e); + if (!k) return true; + switch(k) { + case options.showGridKey: + if (!overlayOn) { + overlay.show(); + overlayOn = true; + } + else if (sticky) { + overlay.hide(); + overlayOn = false; + sticky = false; + saveState(); + } + break; + case options.holdGridKey: + if (overlayOn && !sticky) { + // Turn sticky overlay on + sticky = true; + saveState(); + } + break; + case options.foregroundKey: + if (overlayOn) { + // Toggle sticky overlay z-index + if (overlay.css('z-index') == overlayZForeground) { + overlay.css('z-index', overlayZBackground); + overlayZState = 'B'; + } + else { + overlay.css('z-index', overlayZForeground); + overlayZState = 'F'; + } + saveState(); + } + break; + case options.jumpGridsKey: + if (overlayOn && (options.numberOfGrids > 1)) { + // Cycle through the available grids + overlay.removeClass(options.classPrefix + classNumber); + classNumber++; + if (classNumber > options.numberOfGrids) classNumber = 1; + overlay.addClass(options.classPrefix + classNumber); + if (/webkit/.test( navigator.userAgent.toLowerCase() )) { + forceRepaint(); + } + saveState(); + } + break; + } + } + + function keyupHandler(e) { + var m = getModifier(e); + if (!m) return true; + var k = getKey(e); + if (!k) return true; + if ((k == options.showGridKey) && !sticky) { + overlay.hide(); + overlayOn = false; + } + } + +} + + +/** + * Cookie functions + * + * By Peter-Paul Koch: + * http://www.quirksmode.org/js/cookies.html + */ +function createCookie(name,value,days) { + if (days) { + var date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + var expires = "; expires="+date.toGMTString(); + } + else var expires = ""; + document.cookie = name+"="+value+expires+"; path=/"; +} + +function readCookie(name) { + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for(var i=0;i < ca.length;i++) { + var c = ca[i]; + while (c.charAt(0)==' ') c = c.substring(1,c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); + } + return null; +} + +function eraseCookie(name) { + createCookie(name,"",-1); +} + + +/** + * Forces a repaint (because WebKit has issues) + * http://www.sitepoint.com/forums/showthread.php?p=4538763 + * http://www.phpied.com/the-new-game-show-will-it-reflow/ + */ +function forceRepaint() { + var ss = document.styleSheets[0]; + try { + ss.addRule('.xxxxxx', 'position: relative'); + ss.removeRule(ss.rules.length - 1); + } catch(e){} +} \ No newline at end of file diff --git a/public/javascripts/html5.js b/public/javascripts/html5.js new file mode 100644 index 0000000..ac89535 --- /dev/null +++ b/public/javascripts/html5.js @@ -0,0 +1,5 @@ +// html5shiv MIT @rem remysharp.com/html5-enabling-script +// iepp v1.5.1 MIT @jon_neal iecss.com/print-protector +/*@cc_on(function(p,e){var q=e.createElement("div");q.innerHTML="<z>i</z>";q.childNodes.length!==1&&function(){function r(a,b){if(g[a])g[a].styleSheet.cssText+=b;else{var c=s[l],d=e[j]("style");d.media=a;c.insertBefore(d,c[l]);g[a]=d;r(a,b)}}function t(a,b){for(var c=new RegExp("\\b("+m+")\\b(?!.*[;}])","gi"),d=function(k){return".iepp_"+k},h=-1;++h<a.length;){b=a[h].media||b;t(a[h].imports,b);r(b,a[h].cssText.replace(c,d))}}for(var s=e.documentElement,i=e.createDocumentFragment(),g={},m="abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/ /g, '|'), +n=m.split("|"),f=[],o=-1,l="firstChild",j="createElement";++o<n.length;){e[j](n[o]);i[j](n[o])}i=i.appendChild(e[j]("div"));p.attachEvent("onbeforeprint",function(){for(var a,b=e.getElementsByTagName("*"),c,d,h=new RegExp("^"+m+"$","i"),k=-1;++k<b.length;)if((a=b[k])&&(d=a.nodeName.match(h))){c=new RegExp("^\\s*<"+d+"(.*)\\/"+d+">\\s*$","i");i.innerHTML=a.outerHTML.replace(/\r|\n/g," ").replace(c,a.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");c=i.childNodes[0];c.className+=" iepp_"+ +d;c=f[f.length]=[a,c];a.parentNode.replaceChild(c[1],c[0])}t(e.styleSheets,"all")});p.attachEvent("onafterprint",function(){for(var a=-1,b;++a<f.length;)f[a][1].parentNode.replaceChild(f[a][0],f[a][1]);for(b in g)s[l].removeChild(g[b]);g={};f=[]})}()})(this,document);@*/ \ No newline at end of file diff --git a/public/javascripts/jquery-1.4.2.js b/public/javascripts/jquery-1.4.2.js new file mode 100644 index 0000000..fff6776 --- /dev/null +++ b/public/javascripts/jquery-1.4.2.js @@ -0,0 +1,6240 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function( window, undefined ) { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/, + + // Is it a simple selector + isSimple = /^.[^:#\[\.,]*$/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // Has the ready events already been bound? + readyBound = false, + + // The functions to execute on DOM ready + readyList = [], + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwnProperty = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + indexOf = Array.prototype.indexOf; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context ) { + this.context = document; + this[0] = document.body; + this.selector = "body"; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + doc = (context ? context.ownerDocument || context : document); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = buildFragment( [ match[1] ], [ doc ] ); + selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + if ( elem ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $("TAG") + } else if ( !context && /^\w+$/.test( selector ) ) { + this.selector = selector; + this.context = document; + selector = document.getElementsByTagName( selector ); + return jQuery.merge( this, selector ); + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return (context || rootjQuery).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return jQuery( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if (selector.selector !== undefined) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.4.2", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = jQuery(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + (this.selector ? " " : "") + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // If the DOM is already ready + if ( jQuery.isReady ) { + // Execute the function immediately + fn.call( document, jQuery ); + + // Otherwise, remember the function for later + } else if ( readyList ) { + // Add the function to the wait list + readyList.push( fn ); + } + + return this; + }, + + eq: function( i ) { + return i === -1 ? + this.slice( i ) : + this.slice( i, +i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || jQuery(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging object literal values or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || jQuery.isArray(copy) ) ) { + var clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src) ) ? src + : jQuery.isArray(copy) ? [] : {}; + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // Handle when the DOM is ready + ready: function() { + // Make sure that the DOM is not already loaded + if ( !jQuery.isReady ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 13 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If there are functions bound, to execute + if ( readyList ) { + // Execute all of them + var fn, i = 0; + while ( (fn = readyList[ i++ ]) ) { + fn.call( document, jQuery ); + } + + // Reset the list of functions + readyList = null; + } + + // Trigger any bound ready events + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyBound ) { + return; + } + + readyBound = true; + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + return jQuery.ready(); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent("onreadystatechange", DOMContentLoaded); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return toString.call(obj) === "[object Function]"; + }, + + isArray: function( obj ) { + return toString.call(obj) === "[object Array]"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) { + return false; + } + + // Not own constructor property must be Object + if ( obj.constructor + && !hasOwnProperty.call(obj, "constructor") + && !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwnProperty.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw msg; + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@") + .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]") + .replace(/(?:^|:|,)(?:\s*\[)+/g, "")) ) { + + // Try to use the native JSON parser first + return window.JSON && window.JSON.parse ? + window.JSON.parse( data ) : + (new Function("return " + data))(); + + } else { + jQuery.error( "Invalid JSON: " + data ); + } + }, + + noop: function() {}, + + // Evalulates a script in a global context + globalEval: function( data ) { + if ( data && rnotwhite.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + + if ( jQuery.support.scriptEval ) { + script.appendChild( document.createTextNode( data ) ); + } else { + script.text = data; + } + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction(object); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {} + } + } + + return object; + }, + + trim: function( text ) { + return (text || "").replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // The extra typeof function check is to prevent crashes + // in Safari 2 (See: #3039) + if ( array.length == null || typeof array === "string" || jQuery.isFunction(array) || (typeof array !== "function" && array.setInterval) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array ) { + if ( array.indexOf ) { + return array.indexOf( elem ); + } + + for ( var i = 0, length = array.length; i < length; i++ ) { + if ( array[ i ] === elem ) { + return i; + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = []; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + if ( !inv !== !callback( elems[ i ], i ) ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var ret = [], value; + + // Go through the array, translating each of the items to their + // new value (or values). + for ( var i = 0, length = elems.length; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + proxy: function( fn, proxy, thisObject ) { + if ( arguments.length === 2 ) { + if ( typeof proxy === "string" ) { + thisObject = fn; + fn = thisObject[ proxy ]; + proxy = undefined; + + } else if ( proxy && !jQuery.isFunction( proxy ) ) { + thisObject = proxy; + proxy = undefined; + } + } + + if ( !proxy && fn ) { + proxy = function() { + return fn.apply( thisObject || this, arguments ); + }; + } + + // Set the guid of unique handler to the same of original handler, so it can be removed + if ( fn ) { + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + } + + // So proxy can be declared as an argument + return proxy; + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = /(webkit)[ \/]([\w.]+)/.exec( ua ) || + /(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) || + /(msie) ([\w.]+)/.exec( ua ) || + !/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + browser: {} +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +if ( indexOf ) { + jQuery.inArray = function( elem, array ) { + return indexOf.call( array, elem ); + }; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch( error ) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +function evalScript( i, elem ) { + if ( elem.src ) { + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + } else { + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + } + + if ( elem.parentNode ) { + elem.parentNode.removeChild( elem ); + } +} + +// Mutifunctional method to get and set values to a collection +// The value/s can be optionally by executed if its a function +function access( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; +} + +function now() { + return (new Date).getTime(); +} +(function() { + + jQuery.support = {}; + + var root = document.documentElement, + script = document.createElement("script"), + div = document.createElement("div"), + id = "script" + now(); + + div.style.display = "none"; + div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; + + var all = div.getElementsByTagName("*"), + a = div.getElementsByTagName("a")[0]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return; + } + + jQuery.support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: div.firstChild.nodeType === 3, + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText insted) + style: /red/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: a.getAttribute("href") === "/a", + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55$/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: div.getElementsByTagName("input")[0].value === "on", + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected, + + parentNode: div.removeChild( div.appendChild( document.createElement("div") ) ).parentNode === null, + + // Will be defined later + deleteExpando: true, + checkClone: false, + scriptEval: false, + noCloneEvent: true, + boxModel: null + }; + + script.type = "text/javascript"; + try { + script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); + } catch(e) {} + + root.insertBefore( script, root.firstChild ); + + // Make sure that the execution of code works by injecting a script + // tag with appendChild/createTextNode + // (IE doesn't support this, fails, and uses .text instead) + if ( window[ id ] ) { + jQuery.support.scriptEval = true; + delete window[ id ]; + } + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete script.test; + + } catch(e) { + jQuery.support.deleteExpando = false; + } + + root.removeChild( script ); + + if ( div.attachEvent && div.fireEvent ) { + div.attachEvent("onclick", function click() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + jQuery.support.noCloneEvent = false; + div.detachEvent("onclick", click); + }); + div.cloneNode(true).fireEvent("onclick"); + } + + div = document.createElement("div"); + div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>"; + + var fragment = document.createDocumentFragment(); + fragment.appendChild( div.firstChild ); + + // WebKit doesn't clone checked state correctly in fragments + jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; + + // Figure out if the W3C box model works as expected + // document.body must exist before we can do this + jQuery(function() { + var div = document.createElement("div"); + div.style.width = div.style.paddingLeft = "1px"; + + document.body.appendChild( div ); + jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; + document.body.removeChild( div ).style.display = 'none'; + + div = null; + }); + + // Technique from Juriy Zaytsev + // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ + var eventSupported = function( eventName ) { + var el = document.createElement("div"); + eventName = "on" + eventName; + + var isSupported = (eventName in el); + if ( !isSupported ) { + el.setAttribute(eventName, "return;"); + isSupported = typeof el[eventName] === "function"; + } + el = null; + + return isSupported; + }; + + jQuery.support.submitBubbles = eventSupported("submit"); + jQuery.support.changeBubbles = eventSupported("change"); + + // release memory in IE + root = script = div = all = a = null; +})(); + +jQuery.props = { + "for": "htmlFor", + "class": "className", + readonly: "readOnly", + maxlength: "maxLength", + cellspacing: "cellSpacing", + rowspan: "rowSpan", + colspan: "colSpan", + tabindex: "tabIndex", + usemap: "useMap", + frameborder: "frameBorder" +}; +var expando = "jQuery" + now(), uuid = 0, windowData = {}; + +jQuery.extend({ + cache: {}, + + expando:expando, + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + "object": true, + "applet": true + }, + + data: function( elem, name, data ) { + if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) { + return; + } + + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ], cache = jQuery.cache, thisCache; + + if ( !id && typeof name === "string" && data === undefined ) { + return null; + } + + // Compute a unique ID for the element + if ( !id ) { + id = ++uuid; + } + + // Avoid generating a new cache unless none exists and we + // want to manipulate it. + if ( typeof name === "object" ) { + elem[ expando ] = id; + thisCache = cache[ id ] = jQuery.extend(true, {}, name); + + } else if ( !cache[ id ] ) { + elem[ expando ] = id; + cache[ id ] = {}; + } + + thisCache = cache[ id ]; + + // Prevent overriding the named cache with undefined values + if ( data !== undefined ) { + thisCache[ name ] = data; + } + + return typeof name === "string" ? thisCache[ name ] : thisCache; + }, + + removeData: function( elem, name ) { + if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) { + return; + } + + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ], cache = jQuery.cache, thisCache = cache[ id ]; + + // If we want to remove a specific section of the element's data + if ( name ) { + if ( thisCache ) { + // Remove the section of cache data + delete thisCache[ name ]; + + // If we've removed all the data, remove the element's cache + if ( jQuery.isEmptyObject(thisCache) ) { + jQuery.removeData( elem ); + } + } + + // Otherwise, we want to remove all of the element's data + } else { + if ( jQuery.support.deleteExpando ) { + delete elem[ jQuery.expando ]; + + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + } + + // Completely remove the data cache + delete cache[ id ]; + } + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + if ( typeof key === "undefined" && this.length ) { + return jQuery.data( this[0] ); + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + } + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } else { + return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function() { + jQuery.data( this, key, value ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); +jQuery.extend({ + queue: function( elem, type, data ) { + if ( !elem ) { + return; + } + + type = (type || "fx") + "queue"; + var q = jQuery.data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( !data ) { + return q || []; + } + + if ( !q || jQuery.isArray(data) ) { + q = jQuery.data( elem, type, jQuery.makeArray(data) ); + + } else { + q.push( data ); + } + + return q; + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), fn = queue.shift(); + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift("inprogress"); + } + + fn.call(elem, function() { + jQuery.dequeue(elem, type); + }); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function( i, elem ) { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; + type = type || "fx"; + + return this.queue( type, function() { + var elem = this; + setTimeout(function() { + jQuery.dequeue( elem, type ); + }, time ); + }); + }, + + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + } +}); +var rclass = /[\n\t]/g, + rspace = /\s+/, + rreturn = /\r/g, + rspecialurl = /href|src|style/, + rtype = /(button|input)/i, + rfocusable = /(button|input|object|select|textarea)/i, + rclickable = /^(a|area)$/i, + rradiocheck = /radio|checkbox/; + +jQuery.fn.extend({ + attr: function( name, value ) { + return access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name, fn ) { + return this.each(function(){ + jQuery.attr( this, name, "" ); + if ( this.nodeType === 1 ) { + this.removeAttribute( name ); + } + }); + }, + + addClass: function( value ) { + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.addClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( value && typeof value === "string" ) { + var classNames = (value || "").split( rspace ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className ) { + elem.className = value; + + } else { + var className = " " + elem.className + " ", setClass = elem.className; + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { + setClass += " " + classNames[c]; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.removeClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + var classNames = (value || "").split(rspace); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + var className = (" " + elem.className + " ").replace(rclass, " "); + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[c] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this); + self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, i = 0, self = jQuery(this), + state = stateVal, + classNames = value.split( rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery.data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " "; + for ( var i = 0, l = this.length; i < l; i++ ) { + if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + if ( value === undefined ) { + var elem = this[0]; + + if ( elem ) { + if ( jQuery.nodeName( elem, "option" ) ) { + return (elem.attributes.value || {}).specified ? elem.value : elem.text; + } + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { + return elem.getAttribute("value") === null ? "on" : elem.value; + } + + + // Everything else, we just grab the value + return (elem.value || "").replace(rreturn, ""); + + } + + return undefined; + } + + var isFunction = jQuery.isFunction(value); + + return this.each(function(i) { + var self = jQuery(this), val = value; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call(this, i, self.val()); + } + + // Typecast each time if the value is a Function and the appended + // value is therefore different each time. + if ( typeof val === "number" ) { + val += ""; + } + + if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { + this.checked = jQuery.inArray( self.val(), val ) >= 0; + + } else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(val); + + jQuery( "option", this ).each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + this.selectedIndex = -1; + } + + } else { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + // don't set attributes on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + return undefined; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery(elem)[name](value); + } + + var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ), + // Whether we are setting (or getting) + set = value !== undefined; + + // Try to normalize/fix the name + name = notxml && jQuery.props[ name ] || name; + + // Only do all the following if this is a node (faster for style) + if ( elem.nodeType === 1 ) { + // These attributes require special treatment + var special = rspecialurl.test( name ); + + // Safari mis-reports the default selected property of an option + // Accessing the parent's selectedIndex property fixes it + if ( name === "selected" && !jQuery.support.optSelected ) { + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + + // If applicable, access the attribute via the DOM 0 way + if ( name in elem && notxml && !special ) { + if ( set ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } + + elem[ name ] = value; + } + + // browsers index elements by id/name on forms, give priority to attributes. + if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) { + return elem.getAttributeNode( name ).nodeValue; + } + + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + if ( name === "tabIndex" ) { + var attributeNode = elem.getAttributeNode( "tabIndex" ); + + return attributeNode && attributeNode.specified ? + attributeNode.value : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + + return elem[ name ]; + } + + if ( !jQuery.support.style && notxml && name === "style" ) { + if ( set ) { + elem.style.cssText = "" + value; + } + + return elem.style.cssText; + } + + if ( set ) { + // convert the value to a string (all browsers do this but IE) see #1070 + elem.setAttribute( name, "" + value ); + } + + var attr = !jQuery.support.hrefNormalized && notxml && special ? + // Some attributes require a special call on IE + elem.getAttribute( name, 2 ) : + elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return attr === null ? undefined : attr; + } + + // elem is actually elem.style ... set the style + // Using attr for specific style information is now deprecated. Use style instead. + return jQuery.style( elem, name, value ); + } +}); +var rnamespaces = /\.(.*)$/, + fcleanup = function( nm ) { + return nm.replace(/[^\w\s\.\|`]/g, function( ch ) { + return "\\" + ch; + }); + }; + +/* + * A number of helper functions used for managing events. + * Many of the ideas behind this code originated from + * Dean Edwards' addEvent library. + */ +jQuery.event = { + + // Bind an event to an element + // Original by Dean Edwards + add: function( elem, types, handler, data ) { + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // For whatever reason, IE has trouble passing the window object + // around, causing it to be cloned in the process + if ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) { + elem = window; + } + + var handleObjIn, handleObj; + + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the function being executed has a unique ID + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure + var elemData = jQuery.data( elem ); + + // If no elemData is found then we must be trying to bind to one of the + // banned noData elements + if ( !elemData ) { + return; + } + + var events = elemData.events = elemData.events || {}, + eventHandle = elemData.handle, eventHandle; + + if ( !eventHandle ) { + elemData.handle = eventHandle = function() { + // Handle the second event of a trigger and when + // an event is called after a page has unloaded + return typeof jQuery !== "undefined" && !jQuery.event.triggered ? + jQuery.event.handle.apply( eventHandle.elem, arguments ) : + undefined; + }; + } + + // Add elem as a property of the handle function + // This is to prevent a memory leak with non-native events in IE. + eventHandle.elem = elem; + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = types.split(" "); + + var type, i = 0, namespaces; + + while ( (type = types[ i++ ]) ) { + handleObj = handleObjIn ? + jQuery.extend({}, handleObjIn) : + { handler: handler, data: data }; + + // Namespaced event handlers + if ( type.indexOf(".") > -1 ) { + namespaces = type.split("."); + type = namespaces.shift(); + handleObj.namespace = namespaces.slice(0).sort().join("."); + + } else { + namespaces = []; + handleObj.namespace = ""; + } + + handleObj.type = type; + handleObj.guid = handler.guid; + + // Get the current list of functions bound to this event + var handlers = events[ type ], + special = jQuery.event.special[ type ] || {}; + + // Init the event handler queue + if ( !handlers ) { + handlers = events[ type ] = []; + + // Check for a special event handler + // Only use addEventListener/attachEvent if the special + // events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add the function to the element's handler list + handlers.push( handleObj ); + + // Keep track of which events have been used, for global triggering + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, pos ) { + // don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + var ret, type, fn, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, + elemData = jQuery.data( elem ), + events = elemData && elemData.events; + + if ( !elemData || !events ) { + return; + } + + // types is actually an event object here + if ( types && types.type ) { + handler = types.handler; + types = types.type; + } + + // Unbind all events for the element + if ( !types || typeof types === "string" && types.charAt(0) === "." ) { + types = types || ""; + + for ( type in events ) { + jQuery.event.remove( elem, type + types ); + } + + return; + } + + // Handle multiple events separated by a space + // jQuery(...).unbind("mouseover mouseout", fn); + types = types.split(" "); + + while ( (type = types[ i++ ]) ) { + origType = type; + handleObj = null; + all = type.indexOf(".") < 0; + namespaces = []; + + if ( !all ) { + // Namespaced event handlers + namespaces = type.split("."); + type = namespaces.shift(); + + namespace = new RegExp("(^|\\.)" + + jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)") + } + + eventType = events[ type ]; + + if ( !eventType ) { + continue; + } + + if ( !handler ) { + for ( var j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( all || namespace.test( handleObj.namespace ) ) { + jQuery.event.remove( elem, origType, handleObj.handler, j ); + eventType.splice( j--, 1 ); + } + } + + continue; + } + + special = jQuery.event.special[ type ] || {}; + + for ( var j = pos || 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( handler.guid === handleObj.guid ) { + // remove the given handler for the given type + if ( all || namespace.test( handleObj.namespace ) ) { + if ( pos == null ) { + eventType.splice( j--, 1 ); + } + + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + + if ( pos != null ) { + break; + } + } + } + + // remove generic event handler if no more handlers exist + if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + removeEvent( elem, type, elemData.handle ); + } + + ret = null; + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + var handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + delete elemData.events; + delete elemData.handle; + + if ( jQuery.isEmptyObject( elemData ) ) { + jQuery.removeData( elem ); + } + } + }, + + // bubbling is internal + trigger: function( event, data, elem /*, bubbling */ ) { + // Event object or event type + var type = event.type || event, + bubbling = arguments[3]; + + if ( !bubbling ) { + event = typeof event === "object" ? + // jQuery.Event object + event[expando] ? event : + // Object literal + jQuery.extend( jQuery.Event(type), event ) : + // Just the event type (string) + jQuery.Event(type); + + if ( type.indexOf("!") >= 0 ) { + event.type = type = type.slice(0, -1); + event.exclusive = true; + } + + // Handle a global trigger + if ( !elem ) { + // Don't bubble custom events when global (to avoid too much overhead) + event.stopPropagation(); + + // Only trigger if we've ever bound an event for it + if ( jQuery.event.global[ type ] ) { + jQuery.each( jQuery.cache, function() { + if ( this.events && this.events[type] ) { + jQuery.event.trigger( event, data, this.handle.elem ); + } + }); + } + } + + // Handle triggering a single element + + // don't do events on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + return undefined; + } + + // Clean up in case it is reused + event.result = undefined; + event.target = elem; + + // Clone the incoming data, if any + data = jQuery.makeArray( data ); + data.unshift( event ); + } + + event.currentTarget = elem; + + // Trigger the event, it is assumed that "handle" is a function + var handle = jQuery.data( elem, "handle" ); + if ( handle ) { + handle.apply( elem, data ); + } + + var parent = elem.parentNode || elem.ownerDocument; + + // Trigger an inline bound script + try { + if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) { + if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) { + event.result = false; + } + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (e) {} + + if ( !event.isPropagationStopped() && parent ) { + jQuery.event.trigger( event, data, parent, true ); + + } else if ( !event.isDefaultPrevented() ) { + var target = event.target, old, + isClick = jQuery.nodeName(target, "a") && type === "click", + special = jQuery.event.special[ type ] || {}; + + if ( (!special._default || special._default.call( elem, event ) === false) && + !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) { + + try { + if ( target[ type ] ) { + // Make sure that we don't accidentally re-trigger the onFOO events + old = target[ "on" + type ]; + + if ( old ) { + target[ "on" + type ] = null; + } + + jQuery.event.triggered = true; + target[ type ](); + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (e) {} + + if ( old ) { + target[ "on" + type ] = old; + } + + jQuery.event.triggered = false; + } + } + }, + + handle: function( event ) { + var all, handlers, namespaces, namespace, events; + + event = arguments[0] = jQuery.event.fix( event || window.event ); + event.currentTarget = this; + + // Namespaced event handlers + all = event.type.indexOf(".") < 0 && !event.exclusive; + + if ( !all ) { + namespaces = event.type.split("."); + event.type = namespaces.shift(); + namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + var events = jQuery.data(this, "events"), handlers = events[ event.type ]; + + if ( events && handlers ) { + // Clone the handlers to prevent manipulation + handlers = handlers.slice(0); + + for ( var j = 0, l = handlers.length; j < l; j++ ) { + var handleObj = handlers[ j ]; + + // Filter the functions by class + if ( all || namespace.test( handleObj.namespace ) ) { + // Pass in a reference to the handler function itself + // So that we can later remove it + event.handler = handleObj.handler; + event.data = handleObj.data; + event.handleObj = handleObj; + + var ret = handleObj.handler.apply( this, arguments ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + } + + return event.result; + }, + + props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), + + fix: function( event ) { + if ( event[ expando ] ) { + return event; + } + + // store a copy of the original event object + // and "clone" to set read-only properties + var originalEvent = event; + event = jQuery.Event( originalEvent ); + + for ( var i = this.props.length, prop; i; ) { + prop = this.props[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary + if ( !event.target ) { + event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either + } + + // check if target is a textnode (safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && event.fromElement ) { + event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; + } + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && event.clientX != null ) { + var doc = document.documentElement, body = document.body; + event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); + event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); + } + + // Add which for key events + if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) { + event.which = event.charCode || event.keyCode; + } + + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) + if ( !event.metaKey && event.ctrlKey ) { + event.metaKey = event.ctrlKey; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && event.button !== undefined ) { + event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); + } + + return event; + }, + + // Deprecated, use jQuery.guid instead + guid: 1E8, + + // Deprecated, use jQuery.proxy instead + proxy: jQuery.proxy, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady, + teardown: jQuery.noop + }, + + live: { + add: function( handleObj ) { + jQuery.event.add( this, handleObj.origType, jQuery.extend({}, handleObj, {handler: liveHandler}) ); + }, + + remove: function( handleObj ) { + var remove = true, + type = handleObj.origType.replace(rnamespaces, ""); + + jQuery.each( jQuery.data(this, "events").live || [], function() { + if ( type === this.origType.replace(rnamespaces, "") ) { + remove = false; + return false; + } + }); + + if ( remove ) { + jQuery.event.remove( this, handleObj.origType, liveHandler ); + } + } + + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( this.setInterval ) { + this.onbeforeunload = eventHandle; + } + + return false; + }, + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + } +}; + +var removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + elem.removeEventListener( type, handle, false ); + } : + function( elem, type, handle ) { + elem.detachEvent( "on" + type, handle ); + }; + +jQuery.Event = function( src ) { + // Allow instantiation without the 'new' keyword + if ( !this.preventDefault ) { + return new jQuery.Event( src ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + // Event type + } else { + this.type = src; + } + + // timeStamp is buggy for some events on Firefox(#3843) + // So we won't rely on the native value + this.timeStamp = now(); + + // Mark it as fixed + this[ expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + } + // otherwise set the returnValue property of the original event to false (IE) + e.returnValue = false; + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Checks if an event happened on an element within another element +// Used in jQuery.event.special.mouseenter and mouseleave handlers +var withinElement = function( event ) { + // Check if mouse(over|out) are still within the same parent element + var parent = event.relatedTarget; + + // Firefox sometimes assigns relatedTarget a XUL element + // which we cannot access the parentNode property of + try { + // Traverse up the tree + while ( parent && parent !== this ) { + parent = parent.parentNode; + } + + if ( parent !== this ) { + // set the correct event type + event.type = event.data; + + // handle event if we actually just moused on to a non sub-element + jQuery.event.handle.apply( this, arguments ); + } + + // assuming we've left the element since we most likely mousedover a xul element + } catch(e) { } +}, + +// In case of event delegation, we only need to rename the event.type, +// liveHandler will take care of the rest. +delegate = function( event ) { + event.type = event.data; + jQuery.event.handle.apply( this, arguments ); +}; + +// Create mouseenter and mouseleave events +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + setup: function( data ) { + jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); + }, + teardown: function( data ) { + jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); + } + }; +}); + +// submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function( data, namespaces ) { + if ( this.nodeName.toLowerCase() !== "form" ) { + jQuery.event.add(this, "click.specialSubmit", function( e ) { + var elem = e.target, type = elem.type; + + if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { + return trigger( "submit", this, arguments ); + } + }); + + jQuery.event.add(this, "keypress.specialSubmit", function( e ) { + var elem = e.target, type = elem.type; + + if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { + return trigger( "submit", this, arguments ); + } + }); + + } else { + return false; + } + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialSubmit" ); + } + }; + +} + +// change delegation, happens here so we have bind. +if ( !jQuery.support.changeBubbles ) { + + var formElems = /textarea|input|select/i, + + changeFilters, + + getVal = function( elem ) { + var type = elem.type, val = elem.value; + + if ( type === "radio" || type === "checkbox" ) { + val = elem.checked; + + } else if ( type === "select-multiple" ) { + val = elem.selectedIndex > -1 ? + jQuery.map( elem.options, function( elem ) { + return elem.selected; + }).join("-") : + ""; + + } else if ( elem.nodeName.toLowerCase() === "select" ) { + val = elem.selectedIndex; + } + + return val; + }, + + testChange = function testChange( e ) { + var elem = e.target, data, val; + + if ( !formElems.test( elem.nodeName ) || elem.readOnly ) { + return; + } + + data = jQuery.data( elem, "_change_data" ); + val = getVal(elem); + + // the current data will be also retrieved by beforeactivate + if ( e.type !== "focusout" || elem.type !== "radio" ) { + jQuery.data( elem, "_change_data", val ); + } + + if ( data === undefined || val === data ) { + return; + } + + if ( data != null || val ) { + e.type = "change"; + return jQuery.event.trigger( e, arguments[1], elem ); + } + }; + + jQuery.event.special.change = { + filters: { + focusout: testChange, + + click: function( e ) { + var elem = e.target, type = elem.type; + + if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) { + return testChange.call( this, e ); + } + }, + + // Change has to be called before submit + // Keydown will be called before keypress, which is used in submit-event delegation + keydown: function( e ) { + var elem = e.target, type = elem.type; + + if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") || + (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || + type === "select-multiple" ) { + return testChange.call( this, e ); + } + }, + + // Beforeactivate happens also before the previous element is blurred + // with this event you can't trigger a change event, but you can store + // information/focus[in] is not needed anymore + beforeactivate: function( e ) { + var elem = e.target; + jQuery.data( elem, "_change_data", getVal(elem) ); + } + }, + + setup: function( data, namespaces ) { + if ( this.type === "file" ) { + return false; + } + + for ( var type in changeFilters ) { + jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); + } + + return formElems.test( this.nodeName ); + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialChange" ); + + return formElems.test( this.nodeName ); + } + }; + + changeFilters = jQuery.event.special.change.filters; +} + +function trigger( type, elem, args ) { + args[0].type = type; + return jQuery.event.handle.apply( elem, args ); +} + +// Create "bubbling" focus and blur events +if ( document.addEventListener ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + jQuery.event.special[ fix ] = { + setup: function() { + this.addEventListener( orig, handler, true ); + }, + teardown: function() { + this.removeEventListener( orig, handler, true ); + } + }; + + function handler( e ) { + e = jQuery.event.fix( e ); + e.type = fix; + return jQuery.event.handle.call( this, e ); + } + }); +} + +jQuery.each(["bind", "one"], function( i, name ) { + jQuery.fn[ name ] = function( type, data, fn ) { + // Handle object literals + if ( typeof type === "object" ) { + for ( var key in type ) { + this[ name ](key, data, type[key], fn); + } + return this; + } + + if ( jQuery.isFunction( data ) ) { + fn = data; + data = undefined; + } + + var handler = name === "one" ? jQuery.proxy( fn, function( event ) { + jQuery( this ).unbind( event, handler ); + return fn.apply( this, arguments ); + }) : fn; + + if ( type === "unload" && name !== "one" ) { + this.one( type, data, fn ); + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.add( this[i], type, handler, data ); + } + } + + return this; + }; +}); + +jQuery.fn.extend({ + unbind: function( type, fn ) { + // Handle object literals + if ( typeof type === "object" && !type.preventDefault ) { + for ( var key in type ) { + this.unbind(key, type[key]); + } + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.remove( this[i], type, fn ); + } + } + + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.live( types, data, fn, selector ); + }, + + undelegate: function( selector, types, fn ) { + if ( arguments.length === 0 ) { + return this.unbind( "live" ); + + } else { + return this.die( types, null, fn, selector ); + } + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + + triggerHandler: function( type, data ) { + if ( this[0] ) { + var event = jQuery.Event( type ); + event.preventDefault(); + event.stopPropagation(); + jQuery.event.trigger( event, data, this[0] ); + return event.result; + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, i = 1; + + // link all the functions, so any of them can unbind this click handler + while ( i < args.length ) { + jQuery.proxy( fn, args[ i++ ] ); + } + + return this.click( jQuery.proxy( fn, function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + })); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +var liveMap = { + focus: "focusin", + blur: "focusout", + mouseenter: "mouseover", + mouseleave: "mouseout" +}; + +jQuery.each(["live", "die"], function( i, name ) { + jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { + var type, i = 0, match, namespaces, preType, + selector = origSelector || this.selector, + context = origSelector ? this : jQuery( this.context ); + + if ( jQuery.isFunction( data ) ) { + fn = data; + data = undefined; + } + + types = (types || "").split(" "); + + while ( (type = types[ i++ ]) != null ) { + match = rnamespaces.exec( type ); + namespaces = ""; + + if ( match ) { + namespaces = match[0]; + type = type.replace( rnamespaces, "" ); + } + + if ( type === "hover" ) { + types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); + continue; + } + + preType = type; + + if ( type === "focus" || type === "blur" ) { + types.push( liveMap[ type ] + namespaces ); + type = type + namespaces; + + } else { + type = (liveMap[ type ] || type) + namespaces; + } + + if ( name === "live" ) { + // bind live handler + context.each(function(){ + jQuery.event.add( this, liveConvert( type, selector ), + { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); + }); + + } else { + // unbind live handler + context.unbind( liveConvert( type, selector ), fn ); + } + } + + return this; + } +}); + +function liveHandler( event ) { + var stop, elems = [], selectors = [], args = arguments, + related, match, handleObj, elem, j, i, l, data, + events = jQuery.data( this, "events" ); + + // Make sure we avoid non-left-click bubbling in Firefox (#3861) + if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) { + return; + } + + event.liveFired = this; + + var live = events.live.slice(0); + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { + selectors.push( handleObj.selector ); + + } else { + live.splice( j--, 1 ); + } + } + + match = jQuery( event.target ).closest( selectors, event.currentTarget ); + + for ( i = 0, l = match.length; i < l; i++ ) { + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( match[i].selector === handleObj.selector ) { + elem = match[i].elem; + related = null; + + // Those two events require additional checking + if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { + related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; + } + + if ( !related || related !== elem ) { + elems.push({ elem: elem, handleObj: handleObj }); + } + } + } + } + + for ( i = 0, l = elems.length; i < l; i++ ) { + match = elems[i]; + event.currentTarget = match.elem; + event.data = match.handleObj.data; + event.handleObj = match.handleObj; + + if ( match.handleObj.origHandler.apply( match.elem, args ) === false ) { + stop = false; + break; + } + } + + return stop; +} + +function liveConvert( type, selector ) { + return "live." + (type && type !== "*" ? type + "." : "") + selector.replace(/\./g, "`").replace(/ /g, "&"); +} + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( fn ) { + return fn ? this.bind( name, fn ) : this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } +}); + +// Prevent memory leaks in IE +// Window isn't included so as not to unbind existing unload events +// More info: +// - http://isaacschlueter.com/2006/10/msie-memory-leaks/ +if ( window.attachEvent && !window.addEventListener ) { + window.attachEvent("onunload", function() { + for ( var id in jQuery.cache ) { + if ( jQuery.cache[ id ].handle ) { + // Try/Catch is to handle iframes being unloaded, see #4280 + try { + jQuery.event.remove( jQuery.cache[ id ].handle.elem ); + } catch(e) {} + } + } + }); +} +/*! + * Sizzle CSS Selector Engine - v1.0 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function(){ + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function(selector, context, results, seed) { + results = results || []; + var origContext = context = context || document; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context), + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context ); + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set ); + } + } + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + var ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0]; + } + + if ( context ) { + var ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray(set); + } else { + prune = false; + } + + while ( parts.length ) { + var cur = parts.pop(), pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + } else if ( context && context.nodeType === 1 ) { + for ( var i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + } else { + for ( var i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function(results){ + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort(sortOrder); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[i-1] ) { + results.splice(i--, 1); + } + } + } + } + + return results; +}; + +Sizzle.matches = function(expr, set){ + return Sizzle(expr, null, null, set); +}; + +Sizzle.find = function(expr, context, isXML){ + var set, match; + + if ( !expr ) { + return []; + } + + for ( var i = 0, l = Expr.order.length; i < l; i++ ) { + var type = Expr.order[i], match; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + var left = match[1]; + match.splice(1,1); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace(/\\/g, ""); + set = Expr.find[ type ]( match, context, isXML ); + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = context.getElementsByTagName("*"); + } + + return {set: set, expr: expr}; +}; + +Sizzle.filter = function(expr, set, inplace, not){ + var old = expr, result = [], curLoop = set, match, anyFound, + isXMLFilter = set && set[0] && isXML(set[0]); + + while ( expr && set.length ) { + for ( var type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + var filter = Expr.filter[ type ], found, item, left = match[1]; + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( var i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + var pass = not ^ !!found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + } else { + curLoop[i] = false; + } + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw "Syntax error, unrecognized expression: " + msg; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + match: { + ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + leftMatch: {}, + attrMap: { + "class": "className", + "for": "htmlFor" + }, + attrHandle: { + href: function(elem){ + return elem.getAttribute("href"); + } + }, + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !/\W/.test(part), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + ">": function(checkSet, part){ + var isPartStr = typeof part === "string"; + + if ( isPartStr && !/\W/.test(part) ) { + part = part.toLowerCase(); + + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + } else { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + "": function(checkSet, part, isXML){ + var doneName = done++, checkFn = dirCheck; + + if ( typeof part === "string" && !/\W/.test(part) ) { + var nodeCheck = part = part.toLowerCase(); + checkFn = dirNodeCheck; + } + + checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML); + }, + "~": function(checkSet, part, isXML){ + var doneName = done++, checkFn = dirCheck; + + if ( typeof part === "string" && !/\W/.test(part) ) { + var nodeCheck = part = part.toLowerCase(); + checkFn = dirNodeCheck; + } + + checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML); + } + }, + find: { + ID: function(match, context, isXML){ + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + return m ? [m] : []; + } + }, + NAME: function(match, context){ + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], results = context.getElementsByName(match[1]); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + TAG: function(match, context){ + return context.getElementsByTagName(match[1]); + } + }, + preFilter: { + CLASS: function(match, curLoop, inplace, result, not, isXML){ + match = " " + match[1].replace(/\\/g, "") + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + ID: function(match){ + return match[1].replace(/\\/g, ""); + }, + TAG: function(match, curLoop){ + return match[1].toLowerCase(); + }, + CHILD: function(match){ + if ( match[1] === "nth" ) { + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + ATTR: function(match, curLoop, inplace, result, not, isXML){ + var name = match[1].replace(/\\/g, ""); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + PSEUDO: function(match, curLoop, inplace, result, not){ + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + if ( !inplace ) { + result.push.apply( result, ret ); + } + return false; + } + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + POS: function(match){ + match.unshift( true ); + return match; + } + }, + filters: { + enabled: function(elem){ + return elem.disabled === false && elem.type !== "hidden"; + }, + disabled: function(elem){ + return elem.disabled === true; + }, + checked: function(elem){ + return elem.checked === true; + }, + selected: function(elem){ + // Accessing this property makes selected-by-default + // options in Safari work properly + elem.parentNode.selectedIndex; + return elem.selected === true; + }, + parent: function(elem){ + return !!elem.firstChild; + }, + empty: function(elem){ + return !elem.firstChild; + }, + has: function(elem, i, match){ + return !!Sizzle( match[3], elem ).length; + }, + header: function(elem){ + return /h\d/i.test( elem.nodeName ); + }, + text: function(elem){ + return "text" === elem.type; + }, + radio: function(elem){ + return "radio" === elem.type; + }, + checkbox: function(elem){ + return "checkbox" === elem.type; + }, + file: function(elem){ + return "file" === elem.type; + }, + password: function(elem){ + return "password" === elem.type; + }, + submit: function(elem){ + return "submit" === elem.type; + }, + image: function(elem){ + return "image" === elem.type; + }, + reset: function(elem){ + return "reset" === elem.type; + }, + button: function(elem){ + return "button" === elem.type || elem.nodeName.toLowerCase() === "button"; + }, + input: function(elem){ + return /input|select|textarea|button/i.test(elem.nodeName); + } + }, + setFilters: { + first: function(elem, i){ + return i === 0; + }, + last: function(elem, i, match, array){ + return i === array.length - 1; + }, + even: function(elem, i){ + return i % 2 === 0; + }, + odd: function(elem, i){ + return i % 2 === 1; + }, + lt: function(elem, i, match){ + return i < match[3] - 0; + }, + gt: function(elem, i, match){ + return i > match[3] - 0; + }, + nth: function(elem, i, match){ + return match[3] - 0 === i; + }, + eq: function(elem, i, match){ + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function(elem, match, i, array){ + var name = match[1], filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; + } else if ( name === "not" ) { + var not = match[3]; + + for ( var i = 0, l = not.length; i < l; i++ ) { + if ( not[i] === elem ) { + return false; + } + } + + return true; + } else { + Sizzle.error( "Syntax error, unrecognized expression: " + name ); + } + }, + CHILD: function(elem, match){ + var type = match[1], node = elem; + switch (type) { + case 'only': + case 'first': + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + if ( type === "first" ) { + return true; + } + node = elem; + case 'last': + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + return true; + case 'nth': + var first = match[2], last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + var doneName = match[0], + parent = elem.parentNode; + + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { + var count = 0; + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + parent.sizcache = doneName; + } + + var diff = elem.nodeIndex - last; + if ( first === 0 ) { + return diff === 0; + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + ID: function(elem, match){ + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + TAG: function(elem, match){ + return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; + }, + CLASS: function(elem, match){ + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + ATTR: function(elem, match){ + var name = match[1], + result = Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + POS: function(elem, match, i, array){ + var name = match[2], filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, function(all, num){ + return "\\" + (num - 0 + 1); + })); +} + +var makeArray = function(array, results) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch(e){ + makeArray = function(array, results) { + var ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + } else { + if ( typeof array.length === "number" ) { + for ( var i = 0, l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + } else { + for ( var i = 0; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + if ( a == b ) { + hasDuplicate = true; + } + return a.compareDocumentPosition ? -1 : 1; + } + + var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1; + if ( ret === 0 ) { + hasDuplicate = true; + } + return ret; + }; +} else if ( "sourceIndex" in document.documentElement ) { + sortOrder = function( a, b ) { + if ( !a.sourceIndex || !b.sourceIndex ) { + if ( a == b ) { + hasDuplicate = true; + } + return a.sourceIndex ? -1 : 1; + } + + var ret = a.sourceIndex - b.sourceIndex; + if ( ret === 0 ) { + hasDuplicate = true; + } + return ret; + }; +} else if ( document.createRange ) { + sortOrder = function( a, b ) { + if ( !a.ownerDocument || !b.ownerDocument ) { + if ( a == b ) { + hasDuplicate = true; + } + return a.ownerDocument ? -1 : 1; + } + + var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange(); + aRange.setStart(a, 0); + aRange.setEnd(a, 0); + bRange.setStart(b, 0); + bRange.setEnd(b, 0); + var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange); + if ( ret === 0 ) { + hasDuplicate = true; + } + return ret; + }; +} + +// Utility function for retreiving the text value of an array of DOM nodes +function getText( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += getText( elem.childNodes ); + } + } + + return ret; +} + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date).getTime(); + form.innerHTML = "<a name='" + id + "'/>"; + + // Inject it into the root element, check its status, and remove it quickly + var root = document.documentElement; + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function(match, context, isXML){ + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; + } + }; + + Expr.filter.ID = function(elem, match){ + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + root = form = null; // release memory in IE +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function(match, context){ + var results = context.getElementsByTagName(match[1]); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = "<a href='#'></a>"; + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + Expr.attrHandle.href = function(elem){ + return elem.getAttribute("href", 2); + }; + } + + div = null; // release memory in IE +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, div = document.createElement("div"); + div.innerHTML = "<p class='TEST'></p>"; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function(query, context, extra, seed){ + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && context.nodeType === 9 && !isXML(context) ) { + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(e){} + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + div = null; // release memory in IE + })(); +} + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "<div class='test e'></div><div class='test'></div>"; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function(match, context, isXML) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + div = null; // release memory in IE +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + if ( elem ) { + elem = elem[dir]; + var match = false; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + if ( elem ) { + elem = elem[dir]; + var match = false; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem.sizcache = doneName; + elem.sizset = i; + } + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +var contains = document.compareDocumentPosition ? function(a, b){ + return !!(a.compareDocumentPosition(b) & 16); +} : function(a, b){ + return a !== b && (a.contains ? a.contains(b) : true); +}; + +var isXML = function(elem){ + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function(selector, context){ + var tmpSet = [], later = "", match, + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = getText; +jQuery.isXMLDoc = isXML; +jQuery.contains = contains; + +return; + +window.Sizzle = Sizzle; + +})(); +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + slice = Array.prototype.slice; + +// Implement the identical functionality for filter and not +var winnow = function( elements, qualifier, keep ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return (elem === qualifier) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return (jQuery.inArray( elem, qualifier ) >= 0) === keep; + }); +}; + +jQuery.fn.extend({ + find: function( selector ) { + var ret = this.pushStack( "", "find", selector ), length = 0; + + for ( var i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( var n = length; n < ret.length; n++ ) { + for ( var r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && jQuery.filter( selector, this ).length > 0; + }, + + closest: function( selectors, context ) { + if ( jQuery.isArray( selectors ) ) { + var ret = [], cur = this[0], match, matches = {}, selector; + + if ( cur && selectors.length ) { + for ( var i = 0, l = selectors.length; i < l; i++ ) { + selector = selectors[i]; + + if ( !matches[selector] ) { + matches[selector] = jQuery.expr.match.POS.test( selector ) ? + jQuery( selector, context || this.context ) : + selector; + } + } + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( selector in matches ) { + match = matches[selector]; + + if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) { + ret.push({ selector: selector, elem: cur }); + delete matches[selector]; + } + } + cur = cur.parentNode; + } + } + + return ret; + } + + var pos = jQuery.expr.match.POS.test( selectors ) ? + jQuery( selectors, context || this.context ) : null; + + return this.map(function( i, cur ) { + while ( cur && cur.ownerDocument && cur !== context ) { + if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selectors) ) { + return cur; + } + cur = cur.parentNode; + } + return null; + }); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + if ( !elem || typeof elem === "string" ) { + return jQuery.inArray( this[0], + // If it receives a string, the selector is used + // If it receives nothing, the siblings are used + elem ? jQuery( elem ) : this.parent().children() ); + } + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context || this.context ) : + jQuery.makeArray( selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, slice.call(arguments).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], cur = elem[dir]; + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); +var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g, + rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i, + rtagName = /<([\w:]+)/, + rtbody = /<tbody/i, + rhtml = /<|&#?\w+;/, + rnocache = /<script|<object|<embed|<option|<style/i, + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // checked="checked" or checked (html5) + fcloseTag = function( all, front, tag ) { + return rselfClosing.test( tag ) ? + all : + front + "></" + tag + ">"; + }, + wrapMap = { + option: [ 1, "<select multiple='multiple'>", "</select>" ], + legend: [ 1, "<fieldset>", "</fieldset>" ], + thead: [ 1, "<table>", "</table>" ], + tr: [ 2, "<table><tbody>", "</tbody></table>" ], + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], + col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], + area: [ 1, "<map>", "</map>" ], + _default: [ 0, "", "" ] + }; + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize <link> and <script> tags normally +if ( !jQuery.support.htmlSerialize ) { + wrapMap._default = [ 1, "div<div>", "</div>" ]; +} + +jQuery.fn.extend({ + text: function( text ) { + if ( jQuery.isFunction(text) ) { + return this.each(function(i) { + var self = jQuery(this); + self.text( text.call(this, i, self.text()) ); + }); + } + + if ( typeof text !== "object" && text !== undefined ) { + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + } + + return jQuery.text( this ); + }, + + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append(this); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + return this.each(function() { + jQuery( this ).wrapAll( html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + }, + + append: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 ) { + this.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 ) { + this.insertBefore( elem, this.firstChild ); + } + }); + }, + + before: function() { + if ( this[0] && this[0].parentNode ) { + return this.domManip(arguments, false, function( elem ) { + this.parentNode.insertBefore( elem, this ); + }); + } else if ( arguments.length ) { + var set = jQuery(arguments[0]); + set.push.apply( set, this.toArray() ); + return this.pushStack( set, "before", arguments ); + } + }, + + after: function() { + if ( this[0] && this[0].parentNode ) { + return this.domManip(arguments, false, function( elem ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + } else if ( arguments.length ) { + var set = this.pushStack( this, "after", arguments ); + set.push.apply( set, jQuery(arguments[0]).toArray() ); + return set; + } + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { + if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName("*") ); + jQuery.cleanData( [ elem ] ); + } + + if ( elem.parentNode ) { + elem.parentNode.removeChild( elem ); + } + } + } + + return this; + }, + + empty: function() { + for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName("*") ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + } + + return this; + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function() { + if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var html = this.outerHTML, ownerDocument = this.ownerDocument; + if ( !html ) { + var div = ownerDocument.createElement("div"); + div.appendChild( this.cloneNode(true) ); + html = div.innerHTML; + } + + return jQuery.clean([html.replace(rinlinejQuery, "") + // Handle the case in IE 8 where action=/test/> self-closes a tag + .replace(/=([^="'>\s]+\/)>/g, '="$1">') + .replace(rleadingWhitespace, "")], ownerDocument)[0]; + } else { + return this.cloneNode(true); + } + }); + + // Copy the events from the original to the clone + if ( events === true ) { + cloneCopyEvent( this, ret ); + cloneCopyEvent( this.find("*"), ret.find("*") ); + } + + // Return the cloned set + return ret; + }, + + html: function( value ) { + if ( value === undefined ) { + return this[0] && this[0].nodeType === 1 ? + this[0].innerHTML.replace(rinlinejQuery, "") : + null; + + // See if we can take a shortcut and just use innerHTML + } else if ( typeof value === "string" && !rnocache.test( value ) && + (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) && + !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) { + + value = value.replace(rxhtmlTag, fcloseTag); + + try { + for ( var i = 0, l = this.length; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + if ( this[i].nodeType === 1 ) { + jQuery.cleanData( this[i].getElementsByTagName("*") ); + this[i].innerHTML = value; + } + } + + // If using innerHTML throws an exception, use the fallback method + } catch(e) { + this.empty().append( value ); + } + + } else if ( jQuery.isFunction( value ) ) { + this.each(function(i){ + var self = jQuery(this), old = self.html(); + self.empty().append(function(){ + return value.call( this, i, old ); + }); + }); + + } else { + this.empty().append( value ); + } + + return this; + }, + + replaceWith: function( value ) { + if ( this[0] && this[0].parentNode ) { + // Make sure that the elements are removed from the DOM before they are inserted + // this can help fix replacing a parent with child elements + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this), old = self.html(); + self.replaceWith( value.call( this, i, old ) ); + }); + } + + if ( typeof value !== "string" ) { + value = jQuery(value).detach(); + } + + return this.each(function() { + var next = this.nextSibling, parent = this.parentNode; + + jQuery(this).remove(); + + if ( next ) { + jQuery(next).before( value ); + } else { + jQuery(parent).append( value ); + } + }); + } else { + return this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ); + } + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, table, callback ) { + var results, first, value = args[0], scripts = [], fragment, parent; + + // We can't cloneNode fragments that contain checked, in WebKit + if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) { + return this.each(function() { + jQuery(this).domManip( args, table, callback, true ); + }); + } + + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + args[0] = value.call(this, i, table ? self.html() : undefined); + self.domManip( args, table, callback ); + }); + } + + if ( this[0] ) { + parent = value && value.parentNode; + + // If we're in a fragment, just use that instead of building a new one + if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) { + results = { fragment: parent }; + + } else { + results = buildFragment( args, this, scripts ); + } + + fragment = results.fragment; + + if ( fragment.childNodes.length === 1 ) { + first = fragment = fragment.firstChild; + } else { + first = fragment.firstChild; + } + + if ( first ) { + table = table && jQuery.nodeName( first, "tr" ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + callback.call( + table ? + root(this[i], first) : + this[i], + i > 0 || results.cacheable || this.length > 1 ? + fragment.cloneNode(true) : + fragment + ); + } + } + + if ( scripts.length ) { + jQuery.each( scripts, evalScript ); + } + } + + return this; + + function root( elem, cur ) { + return jQuery.nodeName(elem, "table") ? + (elem.getElementsByTagName("tbody")[0] || + elem.appendChild(elem.ownerDocument.createElement("tbody"))) : + elem; + } + } +}); + +function cloneCopyEvent(orig, ret) { + var i = 0; + + ret.each(function() { + if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) { + return; + } + + var oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData && oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( var type in events ) { + for ( var handler in events[ type ] ) { + jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); + } + } + } + }); +} + +function buildFragment( args, nodes, scripts ) { + var fragment, cacheable, cacheresults, + doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document); + + // Only cache "small" (1/2 KB) strings that are associated with the main document + // Cloning options loses the selected state, so don't cache them + // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment + // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache + if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document && + !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) { + + cacheable = true; + cacheresults = jQuery.fragments[ args[0] ]; + if ( cacheresults ) { + if ( cacheresults !== 1 ) { + fragment = cacheresults; + } + } + } + + if ( !fragment ) { + fragment = doc.createDocumentFragment(); + jQuery.clean( args, doc, fragment, scripts ); + } + + if ( cacheable ) { + jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1; + } + + return { fragment: fragment, cacheable: cacheable }; +} + +jQuery.fragments = {}; + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var ret = [], insert = jQuery( selector ), + parent = this.length === 1 && this[0].parentNode; + + if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { + insert[ original ]( this[0] ); + return this; + + } else { + for ( var i = 0, l = insert.length; i < l; i++ ) { + var elems = (i > 0 ? this.clone(true) : this).get(); + jQuery.fn[ original ].apply( jQuery(insert[i]), elems ); + ret = ret.concat( elems ); + } + + return this.pushStack( ret, name, insert.selector ); + } + }; +}); + +jQuery.extend({ + clean: function( elems, context, fragment, scripts ) { + context = context || document; + + // !context.createElement fails in IE with an error but returns typeof 'object' + if ( typeof context.createElement === "undefined" ) { + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + } + + var ret = []; + + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + if ( typeof elem === "number" ) { + elem += ""; + } + + if ( !elem ) { + continue; + } + + // Convert html string into DOM nodes + if ( typeof elem === "string" && !rhtml.test( elem ) ) { + elem = context.createTextNode( elem ); + + } else if ( typeof elem === "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(rxhtmlTag, fcloseTag); + + // Trim whitespace, otherwise indexOf won't work as expected + var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(), + wrap = wrapMap[ tag ] || wrapMap._default, + depth = wrap[0], + div = context.createElement("div"); + + // Go to html and back, then peel off extra wrappers + div.innerHTML = wrap[1] + elem + wrap[2]; + + // Move to the right depth + while ( depth-- ) { + div = div.lastChild; + } + + // Remove IE's autoinserted <tbody> from table fragments + if ( !jQuery.support.tbody ) { + + // String was a <table>, *may* have spurious <tbody> + var hasBody = rtbody.test(elem), + tbody = tag === "table" && !hasBody ? + div.firstChild && div.firstChild.childNodes : + + // String was a bare <thead> or <tfoot> + wrap[1] === "<table>" && !hasBody ? + div.childNodes : + []; + + for ( var j = tbody.length - 1; j >= 0 ; --j ) { + if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { + tbody[ j ].parentNode.removeChild( tbody[ j ] ); + } + } + + } + + // IE completely kills leading whitespace when innerHTML is used + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); + } + + elem = div.childNodes; + } + + if ( elem.nodeType ) { + ret.push( elem ); + } else { + ret = jQuery.merge( ret, elem ); + } + } + + if ( fragment ) { + for ( var i = 0; ret[i]; i++ ) { + if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { + scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); + + } else { + if ( ret[i].nodeType === 1 ) { + ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) ); + } + fragment.appendChild( ret[i] ); + } + } + } + + return ret; + }, + + cleanData: function( elems ) { + var data, id, cache = jQuery.cache, + special = jQuery.event.special, + deleteExpando = jQuery.support.deleteExpando; + + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + id = elem[ jQuery.expando ]; + + if ( id ) { + data = cache[ id ]; + + if ( data.events ) { + for ( var type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + } else { + removeEvent( elem, type, data.handle ); + } + } + } + + if ( deleteExpando ) { + delete elem[ jQuery.expando ]; + + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + } + + delete cache[ id ]; + } + } + } +}); +// exclude the following css properties to add px +var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + ralpha = /alpha\([^)]*\)/, + ropacity = /opacity=([^)]*)/, + rfloat = /float/i, + rdashAlpha = /-([a-z])/ig, + rupper = /([A-Z])/g, + rnumpx = /^-?\d+(?:px)?$/i, + rnum = /^-?\d/, + + cssShow = { position: "absolute", visibility: "hidden", display:"block" }, + cssWidth = [ "Left", "Right" ], + cssHeight = [ "Top", "Bottom" ], + + // cache check for defaultView.getComputedStyle + getComputedStyle = document.defaultView && document.defaultView.getComputedStyle, + // normalize float css property + styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat", + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn.css = function( name, value ) { + return access( this, name, value, true, function( elem, name, value ) { + if ( value === undefined ) { + return jQuery.curCSS( elem, name ); + } + + if ( typeof value === "number" && !rexclude.test(name) ) { + value += "px"; + } + + jQuery.style( elem, name, value ); + }); +}; + +jQuery.extend({ + style: function( elem, name, value ) { + // don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + return undefined; + } + + // ignore negative width and height values #1599 + if ( (name === "width" || name === "height") && parseFloat(value) < 0 ) { + value = undefined; + } + + var style = elem.style || elem, set = value !== undefined; + + // IE uses filters for opacity + if ( !jQuery.support.opacity && name === "opacity" ) { + if ( set ) { + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + style.zoom = 1; + + // Set the alpha filter to set the opacity + var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"; + var filter = style.filter || jQuery.curCSS( elem, "filter" ) || ""; + style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity; + } + + return style.filter && style.filter.indexOf("opacity=") >= 0 ? + (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "": + ""; + } + + // Make sure we're using the right name for getting the float value + if ( rfloat.test( name ) ) { + name = styleFloat; + } + + name = name.replace(rdashAlpha, fcamelCase); + + if ( set ) { + style[ name ] = value; + } + + return style[ name ]; + }, + + css: function( elem, name, force, extra ) { + if ( name === "width" || name === "height" ) { + var val, props = cssShow, which = name === "width" ? cssWidth : cssHeight; + + function getWH() { + val = name === "width" ? elem.offsetWidth : elem.offsetHeight; + + if ( extra === "border" ) { + return; + } + + jQuery.each( which, function() { + if ( !extra ) { + val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + } + + if ( extra === "margin" ) { + val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; + } else { + val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + } + }); + } + + if ( elem.offsetWidth !== 0 ) { + getWH(); + } else { + jQuery.swap( elem, props, getWH ); + } + + return Math.max(0, Math.round(val)); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style, filter; + + // IE uses filters for opacity + if ( !jQuery.support.opacity && name === "opacity" && elem.currentStyle ) { + ret = ropacity.test(elem.currentStyle.filter || "") ? + (parseFloat(RegExp.$1) / 100) + "" : + ""; + + return ret === "" ? + "1" : + ret; + } + + // Make sure we're using the right name for getting the float value + if ( rfloat.test( name ) ) { + name = styleFloat; + } + + if ( !force && style && style[ name ] ) { + ret = style[ name ]; + + } else if ( getComputedStyle ) { + + // Only "float" is needed here + if ( rfloat.test( name ) ) { + name = "float"; + } + + name = name.replace( rupper, "-$1" ).toLowerCase(); + + var defaultView = elem.ownerDocument.defaultView; + + if ( !defaultView ) { + return null; + } + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle ) { + ret = computedStyle.getPropertyValue( name ); + } + + // We should always get a number back from opacity + if ( name === "opacity" && ret === "" ) { + ret = "1"; + } + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(rdashAlpha, fcamelCase); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !rnumpx.test( ret ) && rnum.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = camelCase === "fontSize" ? "1em" : (ret || 0); + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) { + elem.style[ name ] = old[ name ]; + } + } +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.hidden = function( elem ) { + var width = elem.offsetWidth, height = elem.offsetHeight, + skip = elem.nodeName.toLowerCase() === "tr"; + + return width === 0 && height === 0 && !skip ? + true : + width > 0 && height > 0 && !skip ? + false : + jQuery.curCSS(elem, "display") === "none"; + }; + + jQuery.expr.filters.visible = function( elem ) { + return !jQuery.expr.filters.hidden( elem ); + }; +} +var jsc = now(), + rscript = /<script(.|\s)*?\/script>/gi, + rselectTextarea = /select|textarea/i, + rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i, + jsre = /=\?(&|$)/, + rquery = /\?/, + rts = /(\?|&)_=.*?(&|$)/, + rurl = /^(\w+:)?\/\/([^\/?#]+)/, + r20 = /%20/g, + + // Keep a copy of the old load method + _load = jQuery.fn.load; + +jQuery.fn.extend({ + load: function( url, params, callback ) { + if ( typeof url !== "string" ) { + return _load.call( this, url ); + + // Don't do a request if no elements are being requested + } else if ( !this.length ) { + return this; + } + + var off = url.indexOf(" "); + if ( off >= 0 ) { + var selector = url.slice(off, url.length); + url = url.slice(0, off); + } + + // Default to a GET request + var type = "GET"; + + // If the second parameter was provided + if ( params ) { + // If it's a function + if ( jQuery.isFunction( params ) ) { + // We assume that it's the callback + callback = params; + params = null; + + // Otherwise, build a param string + } else if ( typeof params === "object" ) { + params = jQuery.param( params, jQuery.ajaxSettings.traditional ); + type = "POST"; + } + } + + var self = this; + + // Request the remote document + jQuery.ajax({ + url: url, + type: type, + dataType: "html", + data: params, + complete: function( res, status ) { + // If successful, inject the HTML into all the matched elements + if ( status === "success" || status === "notmodified" ) { + // See if a selector was specified + self.html( selector ? + // Create a dummy div to hold the results + jQuery("<div />") + // inject the contents of the document in, removing the scripts + // to avoid any 'Permission Denied' errors in IE + .append(res.responseText.replace(rscript, "")) + + // Locate the specified elements + .find(selector) : + + // If not, just inject the full result + res.responseText ); + } + + if ( callback ) { + self.each( callback, [res.responseText, status, res] ); + } + } + }); + + return this; + }, + + serialize: function() { + return jQuery.param(this.serializeArray()); + }, + serializeArray: function() { + return this.map(function() { + return this.elements ? jQuery.makeArray(this.elements) : this; + }) + .filter(function() { + return this.name && !this.disabled && + (this.checked || rselectTextarea.test(this.nodeName) || + rinput.test(this.type)); + }) + .map(function( i, elem ) { + var val = jQuery(this).val(); + + return val == null ? + null : + jQuery.isArray(val) ? + jQuery.map( val, function( val, i ) { + return { name: elem.name, value: val }; + }) : + { name: elem.name, value: val }; + }).get(); + } +}); + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function( i, o ) { + jQuery.fn[o] = function( f ) { + return this.bind(o, f); + }; +}); + +jQuery.extend({ + + get: function( url, data, callback, type ) { + // shift arguments if data argument was omited + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = null; + } + + return jQuery.ajax({ + type: "GET", + url: url, + data: data, + success: callback, + dataType: type + }); + }, + + getScript: function( url, callback ) { + return jQuery.get(url, null, callback, "script"); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get(url, data, callback, "json"); + }, + + post: function( url, data, callback, type ) { + // shift arguments if data argument was omited + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = {}; + } + + return jQuery.ajax({ + type: "POST", + url: url, + data: data, + success: callback, + dataType: type + }); + }, + + ajaxSetup: function( settings ) { + jQuery.extend( jQuery.ajaxSettings, settings ); + }, + + ajaxSettings: { + url: location.href, + global: true, + type: "GET", + contentType: "application/x-www-form-urlencoded", + processData: true, + async: true, + /* + timeout: 0, + data: null, + username: null, + password: null, + traditional: false, + */ + // Create the request object; Microsoft failed to properly + // implement the XMLHttpRequest in IE7 (can't request local files), + // so we use the ActiveXObject when it is available + // This function can be overriden by calling jQuery.ajaxSetup + xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ? + function() { + return new window.XMLHttpRequest(); + } : + function() { + try { + return new window.ActiveXObject("Microsoft.XMLHTTP"); + } catch(e) {} + }, + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + script: "text/javascript, application/javascript", + json: "application/json, text/javascript", + text: "text/plain", + _default: "*/*" + } + }, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajax: function( origSettings ) { + var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings); + + var jsonp, status, data, + callbackContext = origSettings && origSettings.context || s, + type = s.type.toUpperCase(); + + // convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Handle JSONP Parameter Callbacks + if ( s.dataType === "jsonp" ) { + if ( type === "GET" ) { + if ( !jsre.test( s.url ) ) { + s.url += (rquery.test( s.url ) ? "&" : "?") + (s.jsonp || "callback") + "=?"; + } + } else if ( !s.data || !jsre.test(s.data) ) { + s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; + } + s.dataType = "json"; + } + + // Build temporary JSONP function + if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) { + jsonp = s.jsonpCallback || ("jsonp" + jsc++); + + // Replace the =? sequence both in the query string and the data + if ( s.data ) { + s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1"); + } + + s.url = s.url.replace(jsre, "=" + jsonp + "$1"); + + // We need to make sure + // that a JSONP style response is executed properly + s.dataType = "script"; + + // Handle JSONP-style loading + window[ jsonp ] = window[ jsonp ] || function( tmp ) { + data = tmp; + success(); + complete(); + // Garbage collect + window[ jsonp ] = undefined; + + try { + delete window[ jsonp ]; + } catch(e) {} + + if ( head ) { + head.removeChild( script ); + } + }; + } + + if ( s.dataType === "script" && s.cache === null ) { + s.cache = false; + } + + if ( s.cache === false && type === "GET" ) { + var ts = now(); + + // try replacing _= if it is there + var ret = s.url.replace(rts, "$1_=" + ts + "$2"); + + // if nothing was replaced, add timestamp to the end + s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : ""); + } + + // If data is available, append data to url for get requests + if ( s.data && type === "GET" ) { + s.url += (rquery.test(s.url) ? "&" : "?") + s.data; + } + + // Watch for a new set of requests + if ( s.global && ! jQuery.active++ ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Matches an absolute URL, and saves the domain + var parts = rurl.exec( s.url ), + remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host); + + // If we're requesting a remote document + // and trying to load JSON or Script with a GET + if ( s.dataType === "script" && type === "GET" && remote ) { + var head = document.getElementsByTagName("head")[0] || document.documentElement; + var script = document.createElement("script"); + script.src = s.url; + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + // Handle Script loading + if ( !jsonp ) { + var done = false; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function() { + if ( !done && (!this.readyState || + this.readyState === "loaded" || this.readyState === "complete") ) { + done = true; + success(); + complete(); + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + if ( head && script.parentNode ) { + head.removeChild( script ); + } + } + }; + } + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); + + // We handle everything using the script element injection + return undefined; + } + + var requestDone = false; + + // Create the request object + var xhr = s.xhr(); + + if ( !xhr ) { + return; + } + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open(type, s.url, s.async, s.username, s.password); + } else { + xhr.open(type, s.url, s.async); + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + // Set the correct header, if data is being sent + if ( s.data || origSettings && origSettings.contentType ) { + xhr.setRequestHeader("Content-Type", s.contentType); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[s.url] ) { + xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]); + } + + if ( jQuery.etag[s.url] ) { + xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]); + } + } + + // Set header so the called script knows that it's an XMLHttpRequest + // Only send the header if it's not a remote XHR + if ( !remote ) { + xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + } + + // Set the Accepts header for the server, depending on the dataType + xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ? + s.accepts[ s.dataType ] + ", */*" : + s.accepts._default ); + } catch(e) {} + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false ) { + // Handle the global AJAX counter + if ( s.global && ! --jQuery.active ) { + jQuery.event.trigger( "ajaxStop" ); + } + + // close opended socket + xhr.abort(); + return false; + } + + if ( s.global ) { + trigger("ajaxSend", [xhr, s]); + } + + // Wait for a response to come back + var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) { + // The request was aborted + if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) { + // Opera doesn't call onreadystatechange before this point + // so we simulate the call + if ( !requestDone ) { + complete(); + } + + requestDone = true; + if ( xhr ) { + xhr.onreadystatechange = jQuery.noop; + } + + // The transfer is complete and the data is available, or the request timed out + } else if ( !requestDone && xhr && (xhr.readyState === 4 || isTimeout === "timeout") ) { + requestDone = true; + xhr.onreadystatechange = jQuery.noop; + + status = isTimeout === "timeout" ? + "timeout" : + !jQuery.httpSuccess( xhr ) ? + "error" : + s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? + "notmodified" : + "success"; + + var errMsg; + + if ( status === "success" ) { + // Watch for, and catch, XML document parse errors + try { + // process the data (runs the xml through httpData regardless of callback) + data = jQuery.httpData( xhr, s.dataType, s ); + } catch(err) { + status = "parsererror"; + errMsg = err; + } + } + + // Make sure that the request was successful or notmodified + if ( status === "success" || status === "notmodified" ) { + // JSONP handles its own success callback + if ( !jsonp ) { + success(); + } + } else { + jQuery.handleError(s, xhr, status, errMsg); + } + + // Fire the complete handlers + complete(); + + if ( isTimeout === "timeout" ) { + xhr.abort(); + } + + // Stop memory leaks + if ( s.async ) { + xhr = null; + } + } + }; + + // Override the abort handler, if we can (IE doesn't allow it, but that's OK) + // Opera doesn't fire onreadystatechange at all on abort + try { + var oldAbort = xhr.abort; + xhr.abort = function() { + if ( xhr ) { + oldAbort.call( xhr ); + } + + onreadystatechange( "abort" ); + }; + } catch(e) { } + + // Timeout checker + if ( s.async && s.timeout > 0 ) { + setTimeout(function() { + // Check to see if the request is still happening + if ( xhr && !requestDone ) { + onreadystatechange( "timeout" ); + } + }, s.timeout); + } + + // Send the data + try { + xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null ); + } catch(e) { + jQuery.handleError(s, xhr, null, e); + // Fire the complete handlers + complete(); + } + + // firefox 1.5 doesn't fire statechange for sync requests + if ( !s.async ) { + onreadystatechange(); + } + + function success() { + // If a local callback was specified, fire it and pass it the data + if ( s.success ) { + s.success.call( callbackContext, data, status, xhr ); + } + + // Fire the global callback + if ( s.global ) { + trigger( "ajaxSuccess", [xhr, s] ); + } + } + + function complete() { + // Process result + if ( s.complete ) { + s.complete.call( callbackContext, xhr, status); + } + + // The request was completed + if ( s.global ) { + trigger( "ajaxComplete", [xhr, s] ); + } + + // Handle the global AJAX counter + if ( s.global && ! --jQuery.active ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + + function trigger(type, args) { + (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args); + } + + // return XMLHttpRequest to allow aborting the request etc. + return xhr; + }, + + handleError: function( s, xhr, status, e ) { + // If a local callback was specified, fire it + if ( s.error ) { + s.error.call( s.context || s, xhr, status, e ); + } + + // Fire the global callback + if ( s.global ) { + (s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] ); + } + }, + + // Counter for holding the number of active queries + active: 0, + + // Determines if an XMLHttpRequest was successful or not + httpSuccess: function( xhr ) { + try { + // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 + return !xhr.status && location.protocol === "file:" || + // Opera returns 0 when status is 304 + ( xhr.status >= 200 && xhr.status < 300 ) || + xhr.status === 304 || xhr.status === 1223 || xhr.status === 0; + } catch(e) {} + + return false; + }, + + // Determines if an XMLHttpRequest returns NotModified + httpNotModified: function( xhr, url ) { + var lastModified = xhr.getResponseHeader("Last-Modified"), + etag = xhr.getResponseHeader("Etag"); + + if ( lastModified ) { + jQuery.lastModified[url] = lastModified; + } + + if ( etag ) { + jQuery.etag[url] = etag; + } + + // Opera returns 0 when status is 304 + return xhr.status === 304 || xhr.status === 0; + }, + + httpData: function( xhr, type, s ) { + var ct = xhr.getResponseHeader("content-type") || "", + xml = type === "xml" || !type && ct.indexOf("xml") >= 0, + data = xml ? xhr.responseXML : xhr.responseText; + + if ( xml && data.documentElement.nodeName === "parsererror" ) { + jQuery.error( "parsererror" ); + } + + // Allow a pre-filtering function to sanitize the response + // s is checked to keep backwards compatibility + if ( s && s.dataFilter ) { + data = s.dataFilter( data, type ); + } + + // The filter can actually parse the response + if ( typeof data === "string" ) { + // Get the JavaScript object, if JSON is used. + if ( type === "json" || !type && ct.indexOf("json") >= 0 ) { + data = jQuery.parseJSON( data ); + + // If the type is "script", eval it in global context + } else if ( type === "script" || !type && ct.indexOf("javascript") >= 0 ) { + jQuery.globalEval( data ); + } + } + + return data; + }, + + // Serialize an array of form elements or a set of + // key/values into a query string + param: function( a, traditional ) { + var s = []; + + // Set traditional to true for jQuery <= 1.3.2 behavior. + if ( traditional === undefined ) { + traditional = jQuery.ajaxSettings.traditional; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( jQuery.isArray(a) || a.jquery ) { + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + }); + + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( var prefix in a ) { + buildParams( prefix, a[prefix] ); + } + } + + // Return the resulting serialization + return s.join("&").replace(r20, "+"); + + function buildParams( prefix, obj ) { + if ( jQuery.isArray(obj) ) { + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || /\[\]$/.test( prefix ) ) { + // Treat each array item as a scalar. + add( prefix, v ); + } else { + // If array item is non-scalar (array or object), encode its + // numeric index to resolve deserialization ambiguity issues. + // Note that rack (as of 1.0.0) can't currently deserialize + // nested arrays properly, and attempting to do so may cause + // a server error. Possible fixes are to modify rack's + // deserialization algorithm or to provide an option or flag + // to force array serialization to be shallow. + buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v ); + } + }); + + } else if ( !traditional && obj != null && typeof obj === "object" ) { + // Serialize object item. + jQuery.each( obj, function( k, v ) { + buildParams( prefix + "[" + k + "]", v ); + }); + + } else { + // Serialize scalar item. + add( prefix, obj ); + } + } + + function add( key, value ) { + // If value is a function, invoke it and return its value + value = jQuery.isFunction(value) ? value() : value; + s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value); + } + } +}); +var elemdisplay = {}, + rfxtypes = /toggle|show|hide/, + rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/, + timerId, + fxAttrs = [ + // height animations + [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ], + // width animations + [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], + // opacity animations + [ "opacity" ] + ]; + +jQuery.fn.extend({ + show: function( speed, callback ) { + if ( speed || speed === 0) { + return this.animate( genFx("show", 3), speed, callback); + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + var old = jQuery.data(this[i], "olddisplay"); + + this[i].style.display = old || ""; + + if ( jQuery.css(this[i], "display") === "none" ) { + var nodeName = this[i].nodeName, display; + + if ( elemdisplay[ nodeName ] ) { + display = elemdisplay[ nodeName ]; + + } else { + var elem = jQuery("<" + nodeName + " />").appendTo("body"); + + display = elem.css("display"); + + if ( display === "none" ) { + display = "block"; + } + + elem.remove(); + + elemdisplay[ nodeName ] = display; + } + + jQuery.data(this[i], "olddisplay", display); + } + } + + // Set the display of the elements in a second loop + // to avoid the constant reflow + for ( var j = 0, k = this.length; j < k; j++ ) { + this[j].style.display = jQuery.data(this[j], "olddisplay") || ""; + } + + return this; + } + }, + + hide: function( speed, callback ) { + if ( speed || speed === 0 ) { + return this.animate( genFx("hide", 3), speed, callback); + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + var old = jQuery.data(this[i], "olddisplay"); + if ( !old && old !== "none" ) { + jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display")); + } + } + + // Set the display of the elements in a second loop + // to avoid the constant reflow + for ( var j = 0, k = this.length; j < k; j++ ) { + this[j].style.display = "none"; + } + + return this; + } + }, + + // Save the old toggle function + _toggle: jQuery.fn.toggle, + + toggle: function( fn, fn2 ) { + var bool = typeof fn === "boolean"; + + if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) { + this._toggle.apply( this, arguments ); + + } else if ( fn == null || bool ) { + this.each(function() { + var state = bool ? fn : jQuery(this).is(":hidden"); + jQuery(this)[ state ? "show" : "hide" ](); + }); + + } else { + this.animate(genFx("toggle", 3), fn, fn2); + } + + return this; + }, + + fadeTo: function( speed, to, callback ) { + return this.filter(":hidden").css("opacity", 0).show().end() + .animate({opacity: to}, speed, callback); + }, + + animate: function( prop, speed, easing, callback ) { + var optall = jQuery.speed(speed, easing, callback); + + if ( jQuery.isEmptyObject( prop ) ) { + return this.each( optall.complete ); + } + + return this[ optall.queue === false ? "each" : "queue" ](function() { + var opt = jQuery.extend({}, optall), p, + hidden = this.nodeType === 1 && jQuery(this).is(":hidden"), + self = this; + + for ( p in prop ) { + var name = p.replace(rdashAlpha, fcamelCase); + + if ( p !== name ) { + prop[ name ] = prop[ p ]; + delete prop[ p ]; + p = name; + } + + if ( prop[p] === "hide" && hidden || prop[p] === "show" && !hidden ) { + return opt.complete.call(this); + } + + if ( ( p === "height" || p === "width" ) && this.style ) { + // Store display property + opt.display = jQuery.css(this, "display"); + + // Make sure that nothing sneaks out + opt.overflow = this.style.overflow; + } + + if ( jQuery.isArray( prop[p] ) ) { + // Create (if needed) and add to specialEasing + (opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1]; + prop[p] = prop[p][0]; + } + } + + if ( opt.overflow != null ) { + this.style.overflow = "hidden"; + } + + opt.curAnim = jQuery.extend({}, prop); + + jQuery.each( prop, function( name, val ) { + var e = new jQuery.fx( self, opt, name ); + + if ( rfxtypes.test(val) ) { + e[ val === "toggle" ? hidden ? "show" : "hide" : val ]( prop ); + + } else { + var parts = rfxnum.exec(val), + start = e.cur(true) || 0; + + if ( parts ) { + var end = parseFloat( parts[2] ), + unit = parts[3] || "px"; + + // We need to compute starting value + if ( unit !== "px" ) { + self.style[ name ] = (end || 1) + unit; + start = ((end || 1) / e.cur(true)) * start; + self.style[ name ] = start + unit; + } + + // If a +=/-= token was provided, we're doing a relative animation + if ( parts[1] ) { + end = ((parts[1] === "-=" ? -1 : 1) * end) + start; + } + + e.custom( start, end, unit ); + + } else { + e.custom( start, val, "" ); + } + } + }); + + // For JS strict compliance + return true; + }); + }, + + stop: function( clearQueue, gotoEnd ) { + var timers = jQuery.timers; + + if ( clearQueue ) { + this.queue([]); + } + + this.each(function() { + // go in reverse order so anything added to the queue during the loop is ignored + for ( var i = timers.length - 1; i >= 0; i-- ) { + if ( timers[i].elem === this ) { + if (gotoEnd) { + // force the next step to be the last + timers[i](true); + } + + timers.splice(i, 1); + } + } + }); + + // start the next in the queue if the last step wasn't forced + if ( !gotoEnd ) { + this.dequeue(); + } + + return this; + } + +}); + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show", 1), + slideUp: genFx("hide", 1), + slideToggle: genFx("toggle", 1), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, callback ) { + return this.animate( props, speed, callback ); + }; +}); + +jQuery.extend({ + speed: function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? speed : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction(easing) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default; + + // Queueing + opt.old = opt.complete; + opt.complete = function() { + if ( opt.queue !== false ) { + jQuery(this).dequeue(); + } + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + }; + + return opt; + }, + + easing: { + linear: function( p, n, firstNum, diff ) { + return firstNum + diff * p; + }, + swing: function( p, n, firstNum, diff ) { + return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; + } + }, + + timers: [], + + fx: function( elem, options, prop ) { + this.options = options; + this.elem = elem; + this.prop = prop; + + if ( !options.orig ) { + options.orig = {}; + } + } + +}); + +jQuery.fx.prototype = { + // Simple function for setting a style value + update: function() { + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); + + // Set display property to block for height/width animations + if ( ( this.prop === "height" || this.prop === "width" ) && this.elem.style ) { + this.elem.style.display = "block"; + } + }, + + // Get the current size + cur: function( force ) { + if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) { + return this.elem[ this.prop ]; + } + + var r = parseFloat(jQuery.css(this.elem, this.prop, force)); + return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0; + }, + + // Start an animation from one number to another + custom: function( from, to, unit ) { + this.startTime = now(); + this.start = from; + this.end = to; + this.unit = unit || this.unit || "px"; + this.now = this.start; + this.pos = this.state = 0; + + var self = this; + function t( gotoEnd ) { + return self.step(gotoEnd); + } + + t.elem = this.elem; + + if ( t() && jQuery.timers.push(t) && !timerId ) { + timerId = setInterval(jQuery.fx.tick, 13); + } + }, + + // Simple 'show' function + show: function() { + // Remember where we started, so that we can go back to it later + this.options.orig[this.prop] = jQuery.style( this.elem, this.prop ); + this.options.show = true; + + // Begin the animation + // Make sure that we start at a small width/height to avoid any + // flash of content + this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur()); + + // Start by showing the element + jQuery( this.elem ).show(); + }, + + // Simple 'hide' function + hide: function() { + // Remember where we started, so that we can go back to it later + this.options.orig[this.prop] = jQuery.style( this.elem, this.prop ); + this.options.hide = true; + + // Begin the animation + this.custom(this.cur(), 0); + }, + + // Each step of an animation + step: function( gotoEnd ) { + var t = now(), done = true; + + if ( gotoEnd || t >= this.options.duration + this.startTime ) { + this.now = this.end; + this.pos = this.state = 1; + this.update(); + + this.options.curAnim[ this.prop ] = true; + + for ( var i in this.options.curAnim ) { + if ( this.options.curAnim[i] !== true ) { + done = false; + } + } + + if ( done ) { + if ( this.options.display != null ) { + // Reset the overflow + this.elem.style.overflow = this.options.overflow; + + // Reset the display + var old = jQuery.data(this.elem, "olddisplay"); + this.elem.style.display = old ? old : this.options.display; + + if ( jQuery.css(this.elem, "display") === "none" ) { + this.elem.style.display = "block"; + } + } + + // Hide the element if the "hide" operation was done + if ( this.options.hide ) { + jQuery(this.elem).hide(); + } + + // Reset the properties, if the item has been hidden or shown + if ( this.options.hide || this.options.show ) { + for ( var p in this.options.curAnim ) { + jQuery.style(this.elem, p, this.options.orig[p]); + } + } + + // Execute the complete function + this.options.complete.call( this.elem ); + } + + return false; + + } else { + var n = t - this.startTime; + this.state = n / this.options.duration; + + // Perform the easing function, defaults to swing + var specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop]; + var defaultEasing = this.options.easing || (jQuery.easing.swing ? "swing" : "linear"); + this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration); + this.now = this.start + ((this.end - this.start) * this.pos); + + // Perform the next step of the animation + this.update(); + } + + return true; + } +}; + +jQuery.extend( jQuery.fx, { + tick: function() { + var timers = jQuery.timers; + + for ( var i = 0; i < timers.length; i++ ) { + if ( !timers[i]() ) { + timers.splice(i--, 1); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + }, + + stop: function() { + clearInterval( timerId ); + timerId = null; + }, + + speeds: { + slow: 600, + fast: 200, + // Default speed + _default: 400 + }, + + step: { + opacity: function( fx ) { + jQuery.style(fx.elem, "opacity", fx.now); + }, + + _default: function( fx ) { + if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) { + fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit; + } else { + fx.elem[ fx.prop ] = fx.now; + } + } + } +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} + +function genFx( type, num ) { + var obj = {}; + + jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() { + obj[ this ] = type; + }); + + return obj; +} +if ( "getBoundingClientRect" in document.documentElement ) { + jQuery.fn.offset = function( options ) { + var elem = this[0]; + + if ( options ) { + return this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + if ( !elem || !elem.ownerDocument ) { + return null; + } + + if ( elem === elem.ownerDocument.body ) { + return jQuery.offset.bodyOffset( elem ); + } + + var box = elem.getBoundingClientRect(), doc = elem.ownerDocument, body = doc.body, docElem = doc.documentElement, + clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, + top = box.top + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop, + left = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft; + + return { top: top, left: left }; + }; + +} else { + jQuery.fn.offset = function( options ) { + var elem = this[0]; + + if ( options ) { + return this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + if ( !elem || !elem.ownerDocument ) { + return null; + } + + if ( elem === elem.ownerDocument.body ) { + return jQuery.offset.bodyOffset( elem ); + } + + jQuery.offset.initialize(); + + var offsetParent = elem.offsetParent, prevOffsetParent = elem, + doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement, + body = doc.body, defaultView = doc.defaultView, + prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle, + top = elem.offsetTop, left = elem.offsetLeft; + + while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) { + if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { + break; + } + + computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle; + top -= elem.scrollTop; + left -= elem.scrollLeft; + + if ( elem === offsetParent ) { + top += elem.offsetTop; + left += elem.offsetLeft; + + if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName)) ) { + top += parseFloat( computedStyle.borderTopWidth ) || 0; + left += parseFloat( computedStyle.borderLeftWidth ) || 0; + } + + prevOffsetParent = offsetParent, offsetParent = elem.offsetParent; + } + + if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) { + top += parseFloat( computedStyle.borderTopWidth ) || 0; + left += parseFloat( computedStyle.borderLeftWidth ) || 0; + } + + prevComputedStyle = computedStyle; + } + + if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) { + top += body.offsetTop; + left += body.offsetLeft; + } + + if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { + top += Math.max( docElem.scrollTop, body.scrollTop ); + left += Math.max( docElem.scrollLeft, body.scrollLeft ); + } + + return { top: top, left: left }; + }; +} + +jQuery.offset = { + initialize: function() { + var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0, + html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"; + + jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } ); + + container.innerHTML = html; + body.insertBefore( container, body.firstChild ); + innerDiv = container.firstChild; + checkDiv = innerDiv.firstChild; + td = innerDiv.nextSibling.firstChild.firstChild; + + this.doesNotAddBorder = (checkDiv.offsetTop !== 5); + this.doesAddBorderForTableAndCells = (td.offsetTop === 5); + + checkDiv.style.position = "fixed", checkDiv.style.top = "20px"; + // safari subtracts parent border width here which is 5px + this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15); + checkDiv.style.position = checkDiv.style.top = ""; + + innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative"; + this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5); + + this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop); + + body.removeChild( container ); + body = container = innerDiv = checkDiv = table = td = null; + jQuery.offset.initialize = jQuery.noop; + }, + + bodyOffset: function( body ) { + var top = body.offsetTop, left = body.offsetLeft; + + jQuery.offset.initialize(); + + if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) { + top += parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0; + left += parseFloat( jQuery.curCSS(body, "marginLeft", true) ) || 0; + } + + return { top: top, left: left }; + }, + + setOffset: function( elem, options, i ) { + // set position first, in-case top/left are set even on static elem + if ( /static/.test( jQuery.curCSS( elem, "position" ) ) ) { + elem.style.position = "relative"; + } + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curTop = parseInt( jQuery.curCSS( elem, "top", true ), 10 ) || 0, + curLeft = parseInt( jQuery.curCSS( elem, "left", true ), 10 ) || 0; + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + var props = { + top: (options.top - curOffset.top) + curTop, + left: (options.left - curOffset.left) + curLeft + }; + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + position: function() { + if ( !this[0] ) { + return null; + } + + var elem = this[0], + + // Get *real* offsetParent + offsetParent = this.offsetParent(), + + // Get correct offsets + offset = this.offset(), + parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); + + // Subtract element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + offset.top -= parseFloat( jQuery.curCSS(elem, "marginTop", true) ) || 0; + offset.left -= parseFloat( jQuery.curCSS(elem, "marginLeft", true) ) || 0; + + // Add offsetParent borders + parentOffset.top += parseFloat( jQuery.curCSS(offsetParent[0], "borderTopWidth", true) ) || 0; + parentOffset.left += parseFloat( jQuery.curCSS(offsetParent[0], "borderLeftWidth", true) ) || 0; + + // Subtract the two offsets + return { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || document.body; + while ( offsetParent && (!/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( ["Left", "Top"], function( i, name ) { + var method = "scroll" + name; + + jQuery.fn[ method ] = function(val) { + var elem = this[0], win; + + if ( !elem ) { + return null; + } + + if ( val !== undefined ) { + // Set the scroll offset + return this.each(function() { + win = getWindow( this ); + + if ( win ) { + win.scrollTo( + !i ? val : jQuery(win).scrollLeft(), + i ? val : jQuery(win).scrollTop() + ); + + } else { + this[ method ] = val; + } + }); + } else { + win = getWindow( elem ); + + // Return the scroll offset + return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] : + jQuery.support.boxModel && win.document.documentElement[ method ] || + win.document.body[ method ] : + elem[ method ]; + } + }; +}); + +function getWindow( elem ) { + return ("scrollTo" in elem && elem.document) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, outerHeight and outerWidth methods +jQuery.each([ "Height", "Width" ], function( i, name ) { + + var type = name.toLowerCase(); + + // innerHeight and innerWidth + jQuery.fn["inner" + name] = function() { + return this[0] ? + jQuery.css( this[0], type, false, "padding" ) : + null; + }; + + // outerHeight and outerWidth + jQuery.fn["outer" + name] = function( margin ) { + return this[0] ? + jQuery.css( this[0], type, false, margin ? "margin" : "border" ) : + null; + }; + + jQuery.fn[ type ] = function( size ) { + // Get window width or height + var elem = this[0]; + if ( !elem ) { + return size == null ? null : this; + } + + if ( jQuery.isFunction( size ) ) { + return this.each(function( i ) { + var self = jQuery( this ); + self[ type ]( size.call( this, i, self[ type ]() ) ); + }); + } + + return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window? + // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode + elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] || + elem.document.body[ "client" + name ] : + + // Get document width or height + (elem.nodeType === 9) ? // is it a document + // Either scroll[Width/Height] or offset[Width/Height], whichever is greater + Math.max( + elem.documentElement["client" + name], + elem.body["scroll" + name], elem.documentElement["scroll" + name], + elem.body["offset" + name], elem.documentElement["offset" + name] + ) : + + // Get or set width or height on the element + size === undefined ? + // Get width or height on the element + jQuery.css( elem, type ) : + + // Set the width or height on the element (default to pixels if value is unitless) + this.css( type, typeof size === "string" ? size : size + "px" ); + }; + +}); +// Expose jQuery to the global object +window.jQuery = window.$ = jQuery; + +})(window); diff --git a/public/javascripts/modernizr.js b/public/javascripts/modernizr.js new file mode 100644 index 0000000..a1de3f7 --- /dev/null +++ b/public/javascripts/modernizr.js @@ -0,0 +1,28 @@ +/*! + * Modernizr JavaScript library 1.5 + * http://www.modernizr.com/ + * + * Copyright (c) 2009-2010 Faruk Ates - http://farukat.es/ + * Dual-licensed under the BSD and MIT licenses. + * http://www.modernizr.com/license/ + * + * Featuring major contributions by + * Paul Irish - http://paulirish.com + */ + window.Modernizr=function(i,e,I){function C(a,b){for(var c in a)if(m[a[c]]!==I&&(!b||b(a[c],D)))return true}function r(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);return!!C([a,"Webkit"+c,"Moz"+c,"O"+c,"ms"+c,"Khtml"+c],b)}function P(){j[E]=function(a){for(var b=0,c=a.length;b<c;b++)J[a[b]]=!!(a[b]in n);return J}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));j[Q]=function(a){for(var b=0,c,h=a.length;b<h;b++){n.setAttribute("type",a[b]);if(c=n.type!== + "text"){n.value=K;/tel|search/.test(n.type)||(c=/url|email/.test(n.type)?n.checkValidity&&n.checkValidity()===false:n.value!=K)}L[a[b]]=!!c}return L}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var j={},s=e.documentElement,D=e.createElement("modernizr"),m=D.style,n=e.createElement("input"),E="input",Q=E+"types",K=":)",M=Object.prototype.toString,y=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d={},L={},J={},N=[],u=function(){var a={select:"input", + change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},b={};return function(c,h){var t=arguments.length==1;if(t&&b[c])return b[c];h=h||document.createElement(a[c]||"div");c="on"+c;var g=c in h;if(!g&&h.setAttribute){h.setAttribute(c,"return;");g=typeof h[c]=="function"}h=null;return t?(b[c]=g):g}}(),F={}.hasOwnProperty,O;O=typeof F!=="undefined"&&typeof F.call!=="undefined"?function(a,b){return F.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"}; + d.canvas=function(){return!!e.createElement("canvas").getContext};d.canvastext=function(){return!!(d.canvas()&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.geolocation=function(){return!!navigator.geolocation};d.crosswindowmessaging=function(){return!!i.postMessage};d.websqldatabase=function(){var a=!!i.openDatabase;if(a)try{a=!!openDatabase("testdb","1.0","html5 test db",2E5)}catch(b){a=false}return a};d.indexedDB=function(){return!!i.indexedDB};d.hashchange=function(){return u("hashchange", + i)&&(document.documentMode===I||document.documentMode>7)};d.historymanagement=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return u("drag")&&u("dragstart")&&u("dragenter")&&u("dragover")&&u("dragleave")&&u("dragend")&&u("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){m.cssText="background-color:rgba(150,255,150,.5)";return(""+m.backgroundColor).indexOf("rgba")!==-1};d.hsla=function(){m.cssText="background-color:hsla(120,40%,100%,.5)";return(""+ + m.backgroundColor).indexOf("rgba")!==-1};d.multiplebgs=function(){m.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(m.background)};d.backgroundsize=function(){return r("backgroundSize")};d.borderimage=function(){return r("borderImage")};d.borderradius=function(){return r("borderRadius","",function(a){return(""+a).indexOf("orderRadius")!==-1})};d.boxshadow=function(){return r("boxShadow")};d.opacity=function(){var a=y.join("opacity:.5;")+"";m.cssText=a;return(""+m.opacity).indexOf("0.5")!== + -1};d.cssanimations=function(){return r("animationName")};d.csscolumns=function(){return r("columnCount")};d.cssgradients=function(){var a=("background-image:"+y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);m.cssText=a;return(""+m.backgroundImage).indexOf("gradient")!==-1};d.cssreflections=function(){return r("boxReflect")};d.csstransforms=function(){return!!C(["transformProperty", + "WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent="@media ("+y.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";e.getElementsByTagName("head")[0].appendChild(b);c.id="modernizr";s.appendChild(c);a=c.offsetHeight===3;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}return a}; + d.csstransitions=function(){return r("transitionProperty")};d.fontface=function(){var a;if(/*@cc_on@if(@_jscript_version>=5)!@end@*/0)a=true;else{var b=e.createElement("style"),c=e.createElement("span"),h,t=false,g=e.body,o,w;b.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}"; + e.getElementsByTagName("head")[0].appendChild(b);c.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");if(!g){g=s.appendChild(e.createElement("fontface"));t=true}c.innerHTML="........";c.id="fonttest";g.appendChild(c);h=c.offsetWidth*c.offsetHeight;c.style.font="99px testfont,_,arial,helvetica";a=h!==c.offsetWidth*c.offsetHeight;var v=function(){if(g.parentNode){a=j.fontface=h!==c.offsetWidth*c.offsetHeight;s.className=s.className.replace(/(no-)?fontface\b/,"")+ + (a?" ":" no-")+"fontface"}};setTimeout(v,75);setTimeout(v,150);addEventListener("load",function(){v();(w=true)&&o&&o(a);setTimeout(function(){t||(g=c);g.parentNode.removeChild(g);b.parentNode.removeChild(b)},50)},false)}j._fontfaceready=function(p){w||a?p(a):(o=p)};return a||h!==c.offsetWidth};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b}; + d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localStorage=function(){return"localStorage"in i&&i.localStorage!==null};d.sessionStorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webworkers=function(){return!!i.Worker}; + d.applicationCache=function(){var a=i.applicationCache;return!!(a&&typeof a.status!="undefined"&&typeof a.update=="function"&&typeof a.swapCache=="function")};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect};d.smil=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg","animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg", + "clipPath")))};for(var z in d)if(O(d,z))N.push(((j[z.toLowerCase()]=d[z]())?"":"no-")+z.toLowerCase());j[E]||P();j.addTest=function(a,b){a=a.toLowerCase();if(!j[a]){b=!!b();s.className+=" "+(b?"":"no-")+a;j[a]=b;return j}};m.cssText="";D=n=null;(function(){var a=e.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1})()&&function(a,b){function c(f,k){if(o[f])o[f].styleSheet.cssText+=k;else{var l=t[G],q=b[A]("style");q.media=f;l.insertBefore(q,l[G]);o[f]=q;c(f,k)}}function h(f, + k){for(var l=new RegExp("\\b("+w+")\\b(?!.*[;}])","gi"),q=function(B){return".iepp_"+B},x=-1;++x<f.length;){k=f[x].media||k;h(f[x].imports,k);c(k,f[x].cssText.replace(l,q))}}for(var t=b.documentElement,g=b.createDocumentFragment(),o={},w="abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video",v=w.split("|"),p=[],H=-1,G="firstChild",A="createElement";++H<v.length;){b[A](v[H]);g[A](v[H])}g= + g.appendChild(b[A]("div"));a.attachEvent("onbeforeprint",function(){for(var f,k=b.getElementsByTagName("*"),l,q,x=new RegExp("^"+w+"$","i"),B=-1;++B<k.length;)if((f=k[B])&&(q=f.nodeName.match(x))){l=new RegExp("^\\s*<"+q+"(.*)\\/"+q+">\\s*$","i");g.innerHTML=f.outerHTML.replace(/\r|\n/g," ").replace(l,f.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");l=g.childNodes[0];l.className+=" iepp_"+q;l=p[p.length]=[f,l];f.parentNode.replaceChild(l[1],l[0])}h(b.styleSheets,"all")});a.attachEvent("onafterprint", + function(){for(var f=-1,k;++f<p.length;)p[f][1].parentNode.replaceChild(p[f][0],p[f][1]);for(k in o)t[G].removeChild(o[k]);o={};p=[]})}(this,e);j._enableHTML5=true;j._version="1.5";s.className=s.className.replace(/\bno-js\b/,"")+" js";s.className+=" "+N.join(" ");return j}(this,this.document); \ No newline at end of file diff --git a/public/stylesheets/base.css b/public/stylesheets/base.css new file mode 100644 index 0000000..dd5a84c --- /dev/null +++ b/public/stylesheets/base.css @@ -0,0 +1,107 @@ +/* master.css */ + +html { font-size:100.01%; } + +body { + font-size: 62.5%; + line-height: 1.8em; + font-size: x-small; + font-variant: normal; + font-style: normal; + font-weight: normal; + font-family: "lucida grande", "helvetica", "sans-serif"; +} + +h1, h2, h3, h4, h5, h6 { + font-weight:bold; + color: #FFF; +} + +h1 {font-size:1.8em;font-weight:normal;} +h2 {font-size:1.8em;} +h3 {font-size:1.4em;} +h4 {font-size:1.2em;} +h5 {font-size:1.2em;} +h6 {font-size:1em;} + +p, ul, ol { + font-size: 1.2em; + margin: 1.5em 0; +} + +small p { + margin: 1.8em 0; + line-height: 1.8em; +} + +ul, ol { + margin-left: 1.5em; +} + +ul { + list-style-type: square; +} + +ol { + list-style-type: decimal; +} + +strong { + font-weight: bold; +} + +em, dfn { + font-style: italic; +} + +del { + text-decoration: line-through; +} + +sup, sub { + line-height:0; +} + +abbr, acronym { + border-bottom:1px dotted #000; +} + +pre { + margin: 1.5em 0; + white-space: pre; +} + +dl { + margin: 1.5em 0; +} + +dd { + margin-left: 1.5em; +} + +table { + margin: 1.5em 0; + width: 100%; +} + +form, fieldset { + display: block; +} + +label { + font-weight: bold; + display: block; +} + +legend { + font-size: 1.2em; +} + +a { + color: #00F; + text-decoration: none; +} + +a:focus, a:hover { + text-decoration: underline; +} \ No newline at end of file diff --git a/public/stylesheets/grid.css b/public/stylesheets/grid.css new file mode 100644 index 0000000..043e126 --- /dev/null +++ b/public/stylesheets/grid.css @@ -0,0 +1,27 @@ +/* grid.css */ + +#grid{ + width: 980px; + position: absolute; + top: 0; + left: 50%; + margin-left: -490px; + background: url(../img/bg-grid-980.gif) repeat-y 0 0; +} + +#grid div.horiz{ + height: 17px; + border-bottom: 1px dotted #AAA; + margin: 0; + padding: 0; +} + +#grid.grid-1 { + background: url(../img/bg-grid-980.gif) repeat-y 0 0; +} + +#grid.grid-2{ + background: url(../img/bg-grid-660.gif) repeat-y 160px 0; + padding: 0 160px; + width: 660px; +} \ No newline at end of file diff --git a/public/stylesheets/master.css b/public/stylesheets/master.css new file mode 100644 index 0000000..e69de29 diff --git a/public/stylesheets/reset.css b/public/stylesheets/reset.css new file mode 100644 index 0000000..7051e43 --- /dev/null +++ b/public/stylesheets/reset.css @@ -0,0 +1,50 @@ +/* reset.css */ + +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, +blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, +dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, +tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, +header, hgroup, nav, section { + margin: 0; + padding: 0; + border: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + +article, aside, dialog, figure, footer, header, hgroup, nav, section { + display: block; +} + +table { + border-collapse: separate; + border-spacing: 0; +} + +caption, th, td { + text-align: left; + font-weight: normal; +} + +table, td, th { + vertical-align: middle; +} + +blockquote:before, blockquote:after, q:before, q:after { + content: ""; +} + +blockquote, q { + quotes: "" ""; +} + +a img { + border: none; +} + +*:focus { + outline: none; +} \ No newline at end of file diff --git a/public/stylesheets/screen.css b/public/stylesheets/screen.css new file mode 100644 index 0000000..e6548d1 --- /dev/null +++ b/public/stylesheets/screen.css @@ -0,0 +1,6 @@ +/* screen.css */ + +@import "reset.css"; +@import "base.css"; +@import "master.css"; +@import "grid.css"; \ No newline at end of file
fguillen/Sitoi
cbde8f435228ce6968595d772bfb132b253616c5
rename and add some more sketches
diff --git a/doc/drafts/03_map_edit_b_and_icon.jpg b/doc/sketch/edit-1.jpg similarity index 100% rename from doc/drafts/03_map_edit_b_and_icon.jpg rename to doc/sketch/edit-1.jpg diff --git a/doc/drafts/02_map_edit.jpg b/doc/sketch/edit-2.jpg similarity index 100% rename from doc/drafts/02_map_edit.jpg rename to doc/sketch/edit-2.jpg diff --git a/doc/drafts/04_use_cases_and_home_flow.jpg b/doc/sketch/flow.jpg similarity index 100% rename from doc/drafts/04_use_cases_and_home_flow.jpg rename to doc/sketch/flow.jpg diff --git a/doc/drafts/01_home.jpg b/doc/sketch/home-1.jpg similarity index 100% rename from doc/drafts/01_home.jpg rename to doc/sketch/home-1.jpg diff --git a/doc/drafts/06_home_proposition_1.jpg b/doc/sketch/home-2.jpg similarity index 100% rename from doc/drafts/06_home_proposition_1.jpg rename to doc/sketch/home-2.jpg diff --git a/doc/drafts/07_home_proposition_2.jpg b/doc/sketch/home-3.jpg similarity index 100% rename from doc/drafts/07_home_proposition_2.jpg rename to doc/sketch/home-3.jpg diff --git a/doc/sketch/icons.jpg b/doc/sketch/icons.jpg new file mode 100644 index 0000000..45a5a7d Binary files /dev/null and b/doc/sketch/icons.jpg differ diff --git a/doc/sketch/logo-1.jpg b/doc/sketch/logo-1.jpg new file mode 100644 index 0000000..0877ab1 Binary files /dev/null and b/doc/sketch/logo-1.jpg differ diff --git a/doc/sketch/logo-2.jpg b/doc/sketch/logo-2.jpg new file mode 100644 index 0000000..fb9a335 Binary files /dev/null and b/doc/sketch/logo-2.jpg differ diff --git a/doc/drafts/05_notes.jpg b/doc/sketch/personas.jpg similarity index 100% rename from doc/drafts/05_notes.jpg rename to doc/sketch/personas.jpg
fguillen/Sitoi
43cedb994798cb15ba779ff499c8ca3cbdfa7cb8
contratos
diff --git a/doc/examples/contract_01.pdf b/doc/examples/contract_01.pdf new file mode 100644 index 0000000..b3528f2 Binary files /dev/null and b/doc/examples/contract_01.pdf differ diff --git a/doc/examples/contract_02.pdf b/doc/examples/contract_02.pdf new file mode 100644 index 0000000..811650b Binary files /dev/null and b/doc/examples/contract_02.pdf differ diff --git a/doc/examples/contract_03.pdf b/doc/examples/contract_03.pdf new file mode 100644 index 0000000..893f698 Binary files /dev/null and b/doc/examples/contract_03.pdf differ diff --git a/doc/examples/contract_04.pdf b/doc/examples/contract_04.pdf new file mode 100644 index 0000000..b0cbf2b Binary files /dev/null and b/doc/examples/contract_04.pdf differ diff --git a/doc/examples/contract_05.pdf b/doc/examples/contract_05.pdf new file mode 100644 index 0000000..7e7fe53 Binary files /dev/null and b/doc/examples/contract_05.pdf differ diff --git a/doc/examples/contract_06.pdf b/doc/examples/contract_06.pdf new file mode 100644 index 0000000..d5a7965 Binary files /dev/null and b/doc/examples/contract_06.pdf differ diff --git a/doc/examples/contract_07.pdf b/doc/examples/contract_07.pdf new file mode 100644 index 0000000..5eed87a Binary files /dev/null and b/doc/examples/contract_07.pdf differ
fguillen/Sitoi
9c5dd2c6c5417f4cb3f778fc761ab5fb91980ddb
add ui controller and autogenerated tests
diff --git a/app/controllers/ui_controller.rb b/app/controllers/ui_controller.rb new file mode 100644 index 0000000..df1d06e --- /dev/null +++ b/app/controllers/ui_controller.rb @@ -0,0 +1,3 @@ +class UiController < ApplicationController + def home; end +end diff --git a/app/helpers/ui_helper.rb b/app/helpers/ui_helper.rb new file mode 100644 index 0000000..8b831d8 --- /dev/null +++ b/app/helpers/ui_helper.rb @@ -0,0 +1,2 @@ +module UiHelper +end diff --git a/app/views/layouts/application.erb b/app/views/layouts/application.erb new file mode 100644 index 0000000..da0d3a9 --- /dev/null +++ b/app/views/layouts/application.erb @@ -0,0 +1,14 @@ +<!DOCTYPE html> + +<head> + <meta charset="utf-8"> + <title>Sitoi — Gestión de espacios</title> +</head> + +<body> + +<div id="sitoi"> +<%= yield %> +</div> + +</body> \ No newline at end of file diff --git a/app/views/ui/home.html.erb b/app/views/ui/home.html.erb new file mode 100644 index 0000000..89a8aa2 --- /dev/null +++ b/app/views/ui/home.html.erb @@ -0,0 +1,3 @@ +<p> + Hello designer! +</p> \ No newline at end of file diff --git a/test/functional/ui_controller_test.rb b/test/functional/ui_controller_test.rb new file mode 100644 index 0000000..42eae92 --- /dev/null +++ b/test/functional/ui_controller_test.rb @@ -0,0 +1,8 @@ +require 'test_helper' + +class UiControllerTest < ActionController::TestCase + # Replace this with your real tests. + test "the truth" do + assert true + end +end diff --git a/test/unit/helpers/ui_helper_test.rb b/test/unit/helpers/ui_helper_test.rb new file mode 100644 index 0000000..21b7a60 --- /dev/null +++ b/test/unit/helpers/ui_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class UiHelperTest < ActionView::TestCase +end
fguillen/Sitoi
17dc73760063b4f4fe633ae906d51899b80a683a
drafts
diff --git a/README b/README deleted file mode 100644 index 37ec8ea..0000000 --- a/README +++ /dev/null @@ -1,243 +0,0 @@ -== Welcome to Rails - -Rails is a web-application framework that includes everything needed to create -database-backed web applications according to the Model-View-Control pattern. - -This pattern splits the view (also called the presentation) into "dumb" templates -that are primarily responsible for inserting pre-built data in between HTML tags. -The model contains the "smart" domain objects (such as Account, Product, Person, -Post) that holds all the business logic and knows how to persist themselves to -a database. The controller handles the incoming requests (such as Save New Account, -Update Product, Show Post) by manipulating the model and directing data to the view. - -In Rails, the model is handled by what's called an object-relational mapping -layer entitled Active Record. This layer allows you to present the data from -database rows as objects and embellish these data objects with business logic -methods. You can read more about Active Record in -link:files/vendor/rails/activerecord/README.html. - -The controller and view are handled by the Action Pack, which handles both -layers by its two parts: Action View and Action Controller. These two layers -are bundled in a single package due to their heavy interdependence. This is -unlike the relationship between the Active Record and Action Pack that is much -more separate. Each of these packages can be used independently outside of -Rails. You can read more about Action Pack in -link:files/vendor/rails/actionpack/README.html. - - -== Getting Started - -1. At the command prompt, start a new Rails application using the <tt>rails</tt> command - and your application name. Ex: rails myapp -2. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options) -3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!" -4. Follow the guidelines to start developing your application - - -== Web Servers - -By default, Rails will try to use Mongrel if it's are installed when started with script/server, otherwise Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails -with a variety of other web servers. - -Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is -suitable for development and deployment of Rails applications. If you have Ruby Gems installed, -getting up and running with mongrel is as easy as: <tt>gem install mongrel</tt>. -More info at: http://mongrel.rubyforge.org - -Say other Ruby web servers like Thin and Ebb or regular web servers like Apache or LiteSpeed or -Lighttpd or IIS. The Ruby web servers are run through Rack and the latter can either be setup to use -FCGI or proxy to a pack of Mongrels/Thin/Ebb servers. - -== Apache .htaccess example for FCGI/CGI - -# General Apache options -AddHandler fastcgi-script .fcgi -AddHandler cgi-script .cgi -Options +FollowSymLinks +ExecCGI - -# If you don't want Rails to look in certain directories, -# use the following rewrite rules so that Apache won't rewrite certain requests -# -# Example: -# RewriteCond %{REQUEST_URI} ^/notrails.* -# RewriteRule .* - [L] - -# Redirect all requests not available on the filesystem to Rails -# By default the cgi dispatcher is used which is very slow -# -# For better performance replace the dispatcher with the fastcgi one -# -# Example: -# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] -RewriteEngine On - -# If your Rails application is accessed via an Alias directive, -# then you MUST also set the RewriteBase in this htaccess file. -# -# Example: -# Alias /myrailsapp /path/to/myrailsapp/public -# RewriteBase /myrailsapp - -RewriteRule ^$ index.html [QSA] -RewriteRule ^([^.]+)$ $1.html [QSA] -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^(.*)$ dispatch.cgi [QSA,L] - -# In case Rails experiences terminal errors -# Instead of displaying this message you can supply a file here which will be rendered instead -# -# Example: -# ErrorDocument 500 /500.html - -ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" - - -== Debugging Rails - -Sometimes your application goes wrong. Fortunately there are a lot of tools that -will help you debug it and get it back on the rails. - -First area to check is the application log files. Have "tail -f" commands running -on the server.log and development.log. Rails will automatically display debugging -and runtime information to these files. Debugging info will also be shown in the -browser on requests from 127.0.0.1. - -You can also log your own messages directly into the log file from your code using -the Ruby logger class from inside your controllers. Example: - - class WeblogController < ActionController::Base - def destroy - @weblog = Weblog.find(params[:id]) - @weblog.destroy - logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") - end - end - -The result will be a message in your log file along the lines of: - - Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1 - -More information on how to use the logger is at http://www.ruby-doc.org/core/ - -Also, Ruby documentation can be found at http://www.ruby-lang.org/ including: - -* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/ -* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) - -These two online (and free) books will bring you up to speed on the Ruby language -and also on programming in general. - - -== Debugger - -Debugger support is available through the debugger command when you start your Mongrel or -Webrick server with --debugger. This means that you can break out of execution at any point -in the code, investigate and change the model, AND then resume execution! -You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug' -Example: - - class WeblogController < ActionController::Base - def index - @posts = Post.find(:all) - debugger - end - end - -So the controller will accept the action, run the first line, then present you -with a IRB prompt in the server window. Here you can do things like: - - >> @posts.inspect - => "[#<Post:0x14a6be8 @attributes={\"title\"=>nil, \"body\"=>nil, \"id\"=>\"1\"}>, - #<Post:0x14a6620 @attributes={\"title\"=>\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]" - >> @posts.first.title = "hello from a debugger" - => "hello from a debugger" - -...and even better is that you can examine how your runtime objects actually work: - - >> f = @posts.first - => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}> - >> f. - Display all 152 possibilities? (y or n) - -Finally, when you're ready to resume execution, you enter "cont" - - -== Console - -You can interact with the domain model by starting the console through <tt>script/console</tt>. -Here you'll have all parts of the application configured, just like it is when the -application is running. You can inspect domain models, change values, and save to the -database. Starting the script without arguments will launch it in the development environment. -Passing an argument will specify a different environment, like <tt>script/console production</tt>. - -To reload your controllers and models after launching the console run <tt>reload!</tt> - -== dbconsole - -You can go to the command line of your database directly through <tt>script/dbconsole</tt>. -You would be connected to the database with the credentials defined in database.yml. -Starting the script without arguments will connect you to the development database. Passing an -argument will connect you to a different database, like <tt>script/dbconsole production</tt>. -Currently works for mysql, postgresql and sqlite. - -== Description of Contents - -app - Holds all the code that's specific to this particular application. - -app/controllers - Holds controllers that should be named like weblogs_controller.rb for - automated URL mapping. All controllers should descend from ApplicationController - which itself descends from ActionController::Base. - -app/models - Holds models that should be named like post.rb. - Most models will descend from ActiveRecord::Base. - -app/views - Holds the template files for the view that should be named like - weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby - syntax. - -app/views/layouts - Holds the template files for layouts to be used with views. This models the common - header/footer method of wrapping views. In your views, define a layout using the - <tt>layout :default</tt> and create a file named default.html.erb. Inside default.html.erb, - call <% yield %> to render the view using this layout. - -app/helpers - Holds view helpers that should be named like weblogs_helper.rb. These are generated - for you automatically when using script/generate for controllers. Helpers can be used to - wrap functionality for your views into methods. - -config - Configuration files for the Rails environment, the routing map, the database, and other dependencies. - -db - Contains the database schema in schema.rb. db/migrate contains all - the sequence of Migrations for your schema. - -doc - This directory is where your application documentation will be stored when generated - using <tt>rake doc:app</tt> - -lib - Application specific libraries. Basically, any kind of custom code that doesn't - belong under controllers, models, or helpers. This directory is in the load path. - -public - The directory available for the web server. Contains subdirectories for images, stylesheets, - and javascripts. Also contains the dispatchers and the default HTML files. This should be - set as the DOCUMENT_ROOT of your web server. - -script - Helper scripts for automation and generation. - -test - Unit and functional tests along with fixtures. When using the script/generate scripts, template - test files will be generated for you and placed in this directory. - -vendor - External libraries that the application depends on. Also includes the plugins subdirectory. - If the app has frozen rails, those gems also go here, under vendor/rails/. - This directory is in the load path. diff --git a/README.md b/README.md new file mode 100644 index 0000000..35f86c8 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Sitoi + +Gestor de Espacios + +* [Wiki](http://sitoi.jottit.com) \ No newline at end of file diff --git a/doc/drafts/01_home.jpg b/doc/drafts/01_home.jpg new file mode 100644 index 0000000..5c21596 Binary files /dev/null and b/doc/drafts/01_home.jpg differ diff --git a/doc/drafts/02_map_edit.jpg b/doc/drafts/02_map_edit.jpg new file mode 100644 index 0000000..a63a535 Binary files /dev/null and b/doc/drafts/02_map_edit.jpg differ diff --git a/doc/drafts/03_map_edit_b_and_icon.jpg b/doc/drafts/03_map_edit_b_and_icon.jpg new file mode 100644 index 0000000..4a8e6c5 Binary files /dev/null and b/doc/drafts/03_map_edit_b_and_icon.jpg differ diff --git a/doc/drafts/04_use_cases_and_home_flow.jpg b/doc/drafts/04_use_cases_and_home_flow.jpg new file mode 100644 index 0000000..5c0001d Binary files /dev/null and b/doc/drafts/04_use_cases_and_home_flow.jpg differ diff --git a/doc/drafts/05_notes.jpg b/doc/drafts/05_notes.jpg new file mode 100644 index 0000000..153acae Binary files /dev/null and b/doc/drafts/05_notes.jpg differ diff --git a/doc/drafts/06_home_proposition_1.jpg b/doc/drafts/06_home_proposition_1.jpg new file mode 100644 index 0000000..0558e46 Binary files /dev/null and b/doc/drafts/06_home_proposition_1.jpg differ diff --git a/doc/drafts/07_home_proposition_2.jpg b/doc/drafts/07_home_proposition_2.jpg new file mode 100644 index 0000000..a869059 Binary files /dev/null and b/doc/drafts/07_home_proposition_2.jpg differ diff --git a/doc/drafts/draft_01.jpeg b/doc/drafts/draft_01.jpeg deleted file mode 100644 index cc66e2d..0000000 Binary files a/doc/drafts/draft_01.jpeg and /dev/null differ
numpy/numpy.org
70860bf9ab198bf365ce58c3a0f86480e0602134
announce the NumPy 2.3.1 release
diff --git a/content/en/news.md b/content/en/news.md index d4cc1ee..daa8e9b 100644 --- a/content/en/news.md +++ b/content/en/news.md @@ -1,516 +1,517 @@ --- title: "News" sidebar: false newsHeader: "NumPy 2.3.0 released!" date: 2025-06-07 --- ### NumPy 2.3.0 released _7 Jun, 2025_ -- The NumPy 2.3.0 release improves free threaded Python support and annotations together with the usual set of bug fixes. It is unusual in the number of expired deprecations, code modernizations, and style cleanups. The latter may not be visible to users, but is important for code maintenance over the long term. Note that we have also upgraded from manylinux2014 to manylinux_2_28. Highlights are: - Interactive examples in the NumPy documentation. - Building NumPy with OpenMP Parallelization. - Preliminary support for Windows on ARM. - Improved support for free threaded Python. - Improved annotations. This release supports Python versions 3.11-3.13, Python 3.14 will be supported when it is released. ### NumPy 2.2.0 released _8 Dec, 2024_ -- The NumPy 2.2.0 release is a quick release that brings us back into sync with the usual twice yearly release cycle. There have been a number of small cleanups, improvements to the StringDType, and better support for free threaded Python. Highlights are: * New functions ``matvec`` and ``vecmat``, * Many improved annotations, * Improved support for the new StringDType, * Improved support for free threaded Python, * Fixes for f2py. This release supports Python versions 3.10-3.13. ### NumPy 2.1.0 released _18 Aug, 2024_ -- NumPy 2.1.0 provides support for Python 3.13 and drops support for Python 3.9. In addition to the usual bug fixes and updated Python support, it helps get NumPy back to its usual release cycle after the extended development of 2.0. The highlights for this release are: - Support for Python 3.13. - Preliminary support for free threaded Python 3.13. - Support for the array-api 2023.12 standard. Python versions 3.10-3.13 are supported by this release. ### NumPy 2.0.0 released _16 Jun, 2024_ -- NumPy 2.0.0 is the first major release since 2006. It is the result of 11 months of development since the last feature release and is the work of 212 contributors spread over 1078 pull requests. It contains a large number of exciting new features as well as changes to both the Python and C APIs. It includes breaking changes that could not happen in a regular minor release - including an ABI break, changes to type promotion rules, and API changes which may not have been emitting deprecation warnings in 1.26.x. Key documents related to how to adapt to changes in NumPy 2.0 include: - The [NumPy 2.0 migration guide](https://numpy.org/devdocs/numpy_2_0_migration_guide.html) - The [2.0.0 release notes](https://numpy.org/devdocs/release/2.0.0-notes.html) - Announcement issue for status updates: [numpy#24300](https://github.com/numpy/numpy/issues/24300) The blog post ["NumPy 2.0: an evolutionary milestone"](https://blog.scientific-python.org/numpy/numpy2/) tells a bit of the story about how this release came together. ### NumPy 2.0 release date: June 16 _23 May, 2024_ -- We are excited to announce that NumPy 2.0 is planned to be released on June 16, 2024. This release has been over a year in the making, and is the first major release since 2006. Importantly, in addition to many new features and performance improvement, it contains **breaking changes** to the ABI as well as the Python and C APIs. It is likely that downstream packages and end user code needs to be adapted - if you can, please verify whether your code works with NumPy `2.0.0rc2`. **Please see the following for more details:** - The [NumPy 2.0 migration guide](https://numpy.org/devdocs/numpy_2_0_migration_guide.html) - The [2.0.0 release notes](https://numpy.org/devdocs/release/2.0.0-notes.html) - Announcement issue for status updates: [numpy#24300](https://github.com/numpy/numpy/issues/24300) ### NumFOCUS end of the year fundraiser _Dec 19, 2023_ -- NumFOCUS has teamed up with PyCharm during their EOY campaign to offer a 30% discount on first-time PyCharm licenses. All year-one revenue from PyCharm purchases from now until December 23rd, 2023 will go directly to the NumFOCUS programs. Use unique URL that will allow to track purchases https://lp.jetbrains.com/support-data-science/ or a coupon code ISUPPORTDATASCIENCE  ### NumPy 1.26.0 released _Sep 16, 2023_ -- [NumPy 1.26.0](https://numpy.org/doc/stable/release/1.26.0-notes.html) is now available. The highlights of the release are: * Python 3.12.0 support. * Cython 3.0.0 compatibility. * Use of the Meson build system * Updated SIMD support * f2py fixes, meson and bind(x) support * Support for the updated Accelerate BLAS/LAPACK library The NumPy 1.26.0 release is a continuation of the 1.25.x series that marks the transition to the Meson build system and provision of support for Cython 3.0.0. A total of 20 people contributed to this release and 59 pull requests were merged. The Python versions supported by this release are 3.9-3.12. ### numpy.org is now available in Japanese and Portuguese _Aug 2, 2023_ -- numpy.org is now available in 2 additional languages: Japanese and Portuguese. This wouldn’t be possible without our dedicated volunteers: _Portuguese:_ * Melissa Weber Mendonça (melissawm) * Ricardo Prins (ricardoprins) * Getúlio Silva (getuliosilva) * Julio Batista Silva (jbsilva) * Alexandre de Siqueira (alexdesiqueira) * Alexandre B A Villares (villares) * Vini Salazar (vinisalazar) _Japanese:_ * Atsushi Sakai (AtsushiSakai) * KKunai * Tom Kelly (TomKellyGenetics) * Yuji Kanagawa (kngwyu) * Tetsuo Koyama (tkoyama010) The work on the translation infrastructure is supported with funding from CZI. Looking ahead, we’d love to translate the website into more languages. If you’d like to help, please connect with the NumPy Translations Team on Slack: https://join.slack.com/t/numpy-team/shared_invite/zt-1gokbq56s-bvEpo10Ef7aHbVtVFeZv2w. (Look for the #translations channel.) We are also building a Translations Team who will be working on localizing documentation and educational content across the Scientific Python ecosystem. If this piqued your interest, join us on the Scientific Python Discord: https://discord.gg/khWtqY6RKr. (Look for the #translation channel.) ### NumPy 1.25.0 released _Jun 17, 2023_ -- [NumPy 1.25.0](https://numpy.org/doc/stable/release/1.25.0-notes.html) is now available. The highlights of the release are: * Support for MUSL, there are now MUSL wheels. * Support for the Fujitsu C/C++ compiler. * Object arrays are now supported in einsum. * Support for the inplace matrix multiplication (``@=``). The NumPy 1.25.0 release continues the ongoing work to improve the handling and promotion of dtypes, increase the execution speed, and clarify the documentation. There has also been preparatory work for the future NumPy 2.0.0, resulting in a large number of new and expired deprecations. A total of 148 people contributed to this release and 530 pull requests were merged. The Python versions supported by this release are 3.9-3.11. ### Fostering an Inclusive Culture: Call for Participation _May 10, 2023_ -- Fostering an Inclusive Culture: Call for Participation How can we be better when it comes to diversity and inclusion? Read the report and find out how to get involved [here](https://contributor-experience.org/docs/posts/dei-report/). ### NumPy documentation team leadership transition _Jan 6, 2023_ –- Mukulika Pahari and Ross Barnowski are appointed as the new NumPy documentation team leads replacing Melissa Mendonça. We thank Melissa for all her contributions to the NumPy official documentation and educational materials, and Mukulika and Ross for stepping up. ### NumPy 1.24.0 released _Dec 18, 2022_ -- [NumPy 1.24.0](https://numpy.org/doc/stable/release/1.24.0-notes.html) is now available. The highlights of the release are: * New "dtype" and "casting" keywords for stacking functions. * New F2PY features and fixes. * Many new deprecations, check them out. * Many expired deprecations, The NumPy 1.24.0 release continues the ongoing work to improve the handling and promotion of dtypes, increase execution speed, and clarify the documentation. There are a large number of new and expired deprecations due to changes in dtype promotion and cleanups. It is the work of 177 contributors spread over 444 pull requests. The supported Python versions are 3.8-3.11. ### Numpy 1.23.0 released _Jun 22, 2022_ -- [NumPy 1.23.0](https://numpy.org/doc/stable/release/1.23.0-notes.html) is now available. The highlights of the release are: * Implementation of ``loadtxt`` in C, greatly improving its performance. * Exposure of DLPack at the Python level for easy data exchange. * Changes to the promotion and comparisons of structured dtypes. * Improvements to f2py. The NumPy 1.23.0 release continues the ongoing work to improve the handling and promotion of dtypes, increase the execution speed, clarify the documentation, and expire old deprecations. It is the work of 151 contributors spread over 494 pull requests. The Python versions supported by this release 3.8-3.10. Python 3.11 will be supported when it reaches the rc stage. ### NumFOCUS DEI research study: call for participation _Apr 13, 2022_ -- NumPy is working with [NumFOCUS](http://numfocus.org/) on a [research project](https://numfocus.org/diversity-inclusion-disc/a-pivotal-time-in-numfocuss-project-aimed-dei-efforts?eType=EmailBlastContent&eId=f41a86c3-60d4-4cf9-86cf-58eb49dc968c) funded by the [Gordon & Betty Moore Foundation](https://www.moore.org/) to understand the barriers to participation that contributors, particularly those from historically underrepresented groups, face in the open-source software community. The research team would like to talk to new contributors, project developers and maintainers, and those who have contributed in the past about their experiences joining and contributing to NumPy. **Interested in sharing your experiences?** Please complete this brief [“Participant Interest” form](https://numfocus.typeform.com/to/WBWVJSqe) which contains additional information on the research goals, privacy, and confidentiality considerations. Your participation will be valuable to the growth and sustainability of diverse and inclusive open-source software communities. Accepted participants will participate in a 30-minute interview with a research team member. ### Numpy 1.22.0 release _Dec 31, 2021_ -- [NumPy 1.22.0](https://numpy.org/doc/stable/release/1.22.0-notes.html) is now available. The highlights of the release are: * Type annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release. * A preliminary version of the proposed [array API Standard](https://data-apis.org/array-api/latest/) is provided (see [NEP 47](https://numpy.org/neps/nep-0047-array-api-standard.html)). This is a step in creating a standard collection of functions that can be used across libraries such as CuPy and JAX. * NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data. * New methods for ``quantile``, ``percentile``, and related functions. The new methods provide a complete set of the methods commonly found in the literature. * The universal functions have been refactored to implement most of [NEP 43](https://numpy.org/neps/nep-0043-extensible-ufuncs.html). This also unlocks the ability to experiment with the future DType API. * A new configurable memory allocator for use by downstream projects. NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. The Python versions supported by this release are 3.8-3.10. ### Advancing an inclusive culture in the scientific Python ecosystem _August 31, 2021_ -- We are happy to announce the Chan Zuckerberg Initiative has [awarded a grant](https://chanzuckerberg.com/newsroom/czi-awards-16-million-for-foundational-open-source-software-tools-essential-to-biomedicine/) to support the onboarding, inclusion, and retention of people from historically marginalized groups on scientific Python projects, and to structurally improve the community dynamics for NumPy, SciPy, Matplotlib, and Pandas. As a part of [CZI's Essential Open Source Software for Science program](https://chanzuckerberg.com/eoss/), this [Diversity & Inclusion supplemental grant](https://cziscience.medium.com/advancing-diversity-and-inclusion-in-scientific-open-source-eaabe6a5488b) will support the creation of dedicated Contributor Experience Lead positions to identify, document, and implement practices to foster inclusive open-source communities. This project will be led by Melissa Mendonça (NumPy), with additional mentorship and guidance provided by Ralf Gommers (NumPy, SciPy), Hannah Aizenman and Thomas Caswell (Matplotlib), Matt Haberland (SciPy), and Joris Van den Bossche (Pandas). This is an ambitious project aiming to discover and implement activities that should structurally improve the community dynamics of our projects. By establishing these new cross-project roles, we hope to introduce a new collaboration model to the Scientific Python communities, allowing community-building work within the ecosystem to be done more efficiently and with greater outcomes. We also expect to develop a clearer picture of what works and what doesn't in our projects to engage and retain new contributors, especially from historically underrepresented groups. Finally, we plan on producing detailed reports on the actions executed, explaining how they have impacted our projects in terms of representation and interaction with our communities. The two-year project is expected to start by November 2021, and we are excited to see the results from this work! [You can read the full proposal here](https://figshare.com/articles/online_resource/Advancing_an_inclusive_culture_in_the_scientific_Python_ecosystem/16548063). ### 2021 NumPy survey _July 12, 2021_ -- At NumPy, we believe in the power of our community. 1,236 NumPy users from 75 countries participated in our inaugural survey last year. The survey findings gave us a very good understanding of what we should focus on for the next 12 months. It’s time for another survey, and we are counting on you once again. It will take about 15 minutes of your time. Besides English, the survey questionnaire is available in 8 additional languages: Bangla, French, Hindi, Japanese, Mandarin, Portuguese, Russian, and Spanish. Follow the link to get started: https://berkeley.qualtrics.com/jfe/form/SV_aaOONjgcBXDSl4q. ### Numpy 1.21.0 release _Jun 23, 2021_ -- [NumPy 1.21.0](https://numpy.org/doc/stable/release/1.21.0-notes.html) is now available. The highlights of the release are: - continued SIMD work covering more functions and platforms, - initial work on the new dtype infrastructure and casting, - universal2 wheels for Python 3.8 and Python 3.9 on Mac, - improved documentation, - improved annotations, - new ``PCG64DXSM`` bitgenerator for random numbers. This NumPy release is the result of 581 merged pull requests contributed by 175 people. The Python versions supported for this release are 3.7-3.9, support for Python 3.10 will be added after Python 3.10 is released. ### 2020 NumPy survey results _Jun 22, 2021_ -- In 2020, the NumPy survey team in partnership with students and faculty from the University of Michigan and the University of Maryland conducted the first official NumPy community survey. Find the survey results here: https://numpy.org/user-survey-2020/. ### Numpy 1.20.0 release _Jan 30, 2021_ -- [NumPy 1.20.0](https://numpy.org/doc/stable/release/1.20.0-notes.html) is now available. This is the largest NumPy release to date, thanks to 180+ contributors. The two most exciting new features are: - Type annotations for large parts of NumPy, and a new `numpy.typing` submodule containing `ArrayLike` and `DtypeLike` aliases that users and downstream libraries can use when adding type annotations in their own code. - Multi-platform SIMD compiler optimizations, with support for x86 (SSE, AVX), ARM64 (Neon), and PowerPC (VSX) instructions. This yielded significant performance improvements for many functions (examples: [sin/cos](https://github.com/numpy/numpy/pull/17587), [einsum](https://github.com/numpy/numpy/pull/18194)). ### Diversity in the NumPy project _Sep 20, 2020_ -- We wrote a [statement on the state of, and discussion on social media around, diversity and inclusion in the NumPy project](/diversity_sep2020). ### First official NumPy paper published in Nature! _Sep 16, 2020_ -- We are pleased to announce the publication of [the first official paper on NumPy](https://www.nature.com/articles/s41586-020-2649-2) as a review article in Nature. This comes 14 years after the release of NumPy 1.0. The paper covers applications and fundamental concepts of array programming, the rich scientific Python ecosystem built on top of NumPy, and the recently added array protocols to facilitate interoperability with external array and tensor libraries like CuPy, Dask, and JAX. ### Python 3.9 is coming, when will NumPy release binary wheels? _Sept 14, 2020_ -- Python 3.9 will be released in a few weeks. If you are an early adopter of Python versions, you may be dissapointed to find that NumPy (and other binary packages like SciPy) will not have binary wheels ready on the day of the release. It is a major effort to adapt the build infrastructure to a new Python version and it typically takes a few weeks for the packages to appear on PyPI and conda-forge. In preparation for this event, please make sure to - update your `pip` to version 20.1 at least to support `manylinux2010` and `manylinux2014` - use [`--only-binary=numpy`](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-only-binary) or `--only-binary=:all:` to prevent `pip` from trying to build from source. ### Numpy 1.19.2 release _Sep 10, 2020_ -- [NumPy 1.19.2](https://numpy.org/devdocs/release/1.19.2-notes.html) is now available. This latest release in the 1.19 series fixes several bugs, prepares for the [upcoming Cython 3.x release](http://docs.cython.org/en/latest/src/changes.html) and pins setuptools to keep distutils working while upstream modifications are ongoing. The aarch64 wheels are built with the latest manylinux2014 release that fixes the problem of differing page sizes used by different linux distros. ### The inaugural NumPy survey is live! _Jul 2, 2020_ -- This survey is meant to guide and set priorities for decision-making about the development of NumPy as software and as a community. The survey is available in 8 additional languages besides English: Bangla, Hindi, Japanese, Mandarin, Portuguese, Russian, Spanish and French. Please help us make NumPy better and take the survey [here](https://umdsurvey.umd.edu/jfe/form/SV_8bJrXjbhXf7saAl). ### NumPy has a new logo! _Jun 24, 2020_ -- NumPy now has a new logo: <img src="/images/logos/numpy_logo.svg" alt="NumPy logo" title="The new NumPy logo" width=300> The logo is a modern take on the old one, with a cleaner design. Thanks to Isabela Presedo-Floyd for designing the new logo, as well as to Travis Vaught for the old logo that served us well for 15+ years. ### NumPy 1.19.0 release _Jun 20, 2020_ -- NumPy 1.19.0 is now available. This is the first release without Python 2 support, hence it was a "clean-up release". The minimum supported Python version is now Python 3.6. An important new feature is that the random number generation infrastructure that was introduced in NumPy 1.17.0 is now accessible from Cython. ### Season of Docs acceptance _May 11, 2020_ -- NumPy has been accepted as one of the mentor organizations for the Google Season of Docs program. We are excited about the opportunity to work with a technical writer to improve NumPy's documentation once again! For more details, please see [the official Season of Docs site](https://developers.google.com/season-of-docs/) and our [ideas page](https://github.com/numpy/numpy/wiki/Google-Season-of-Docs-2020-Project-Ideas). ### NumPy 1.18.0 release _Dec 22, 2019_ -- NumPy 1.18.0 is now available. After the major changes in 1.17.0, this is a consolidation release. It is the last minor release that will support Python 3.5. Highlights of the release includes the addition of basic infrastructure for linking with 64-bit BLAS and LAPACK libraries, and a new C-API for ``numpy.random``. Please see the [release notes](https://github.com/numpy/numpy/releases/tag/v1.18.0) for more details. ### NumPy receives a grant from the Chan Zuckerberg Initiative _Nov 15, 2019_ -- We are pleased to announce that NumPy and OpenBLAS, one of NumPy's key dependencies, have received a joint grant for $195,000 from the Chan Zuckerberg Initiative through their [Essential Open Source Software for Science program](https://chanzuckerberg.com/eoss/) that supports software maintenance, growth, development, and community engagement for open source tools critical to science. This grant will be used to ramp up the efforts in improving NumPy documentation, website redesign, and community development to better serve our large and rapidly growing user base, and ensure the long-term sustainability of the project. While the OpenBLAS team will focus on addressing sets of key technical issues, in particular thread-safety, AVX-512, and thread-local storage (TLS) issues, as well as algorithmic improvements in ReLAPACK (Recursive LAPACK) on which OpenBLAS depends. More details on our proposed initiatives and deliverables can be found in the [full grant proposal](https://figshare.com/articles/Proposal_NumPy_OpenBLAS_for_Chan_Zuckerberg_Initiative_EOSS_2019_round_1/10302167). The work is scheduled to start on Dec 1st, 2019 and continue for the next 12 months. <a name="releases"></a> ## Releases Here is a list of NumPy releases, with links to release notes. Bugfix releases (only the `z` changes in the `x.y.z` version number) have no new features; minor releases (the `y` increases) do. +- NumPy 2.3.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.3.1)) -- _21 Jun 2025_. - NumPy 2.3.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.3.0)) -- _7 Jun 2025_. - NumPy 2.2.6 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.2.6)) -- _17 May 2025_. - NumPy 2.2.5 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.2.5)) -- _19 Apr 2025_. - NumPy 2.2.4 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.2.4)) -- _16 Mar 2025_. - NumPy 2.2.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.2.3)) -- _13 Feb 2025_. - NumPy 2.2.2 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.2.2)) -- _18 Jan 2025_. - NumPy 2.2.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.2.1)) -- _21 Dec 2024_. - NumPy 2.2.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.2.0)) -- _8 Dec 2024_. - NumPy 2.1.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.1.3)) -- _2 Nov 2024_. - NumPy 2.1.2 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.1.2)) -- _5 Oct 2024_. - NumPy 2.1.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.1.1)) -- _3 Sep 2024_. - NumPy 2.0.2 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.0.2)) -- _26 Aug 2024_. - NumPy 2.1.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.1.0)) -- _18 Aug 2024_. - NumPy 2.0.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.0.1)) -- _21 Jul 2024_. - NumPy 2.0.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v2.0.0)) -- _16 Jun 2024_. - NumPy 1.26.4 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.26.4)) -- _5 Feb 2024_. - NumPy 1.26.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.26.3)) -- _2 Jan 2024_. - NumPy 1.26.2 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.26.2)) -- _12 Nov 2023_. - NumPy 1.26.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.26.1)) -- _14 Oct 2023_. - NumPy 1.26.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.26.0)) -- _16 Sep 2023_. - NumPy 1.25.2 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.25.2)) -- _31 Jul 2023_. - NumPy 1.25.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.25.1)) -- _8 Jul 2023_. - NumPy 1.24.4 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.4)) -- _26 Jun 2023_. - NumPy 1.25.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.25.0)) -- _17 Jun 2023_. - NumPy 1.24.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.3)) -- _22 Apr 2023_. - NumPy 1.24.2 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.2)) -- _5 Feb 2023_. - NumPy 1.24.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.1)) -- _26 Dec 2022_. - NumPy 1.24.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.0)) -- _18 Dec 2022_. - NumPy 1.23.5 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.5)) -- _19 Nov 2022_. - NumPy 1.23.4 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.4)) -- _12 Oct 2022_. - NumPy 1.23.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.3)) -- _9 Sep 2022_. - NumPy 1.23.2 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.2)) -- _14 Aug 2022_. - NumPy 1.23.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.1)) -- _8 Jul 2022_. - NumPy 1.23.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.0)) -- _22 Jun 2022_. - NumPy 1.22.4 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.22.4)) -- _20 May 2022_. - NumPy 1.21.6 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.21.6)) -- _12 Apr 2022_. - NumPy 1.22.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.22.3)) -- _7 Mar 2022_. - NumPy 1.22.2 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.22.2)) -- _3 Feb 2022_. - NumPy 1.22.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.22.1)) -- _14 Jan 2022_. - NumPy 1.22.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.22.0)) -- _31 Dec 2021_. - NumPy 1.21.5 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.21.5)) -- _19 Dec 2021_. - NumPy 1.21.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.21.0)) -- _22 Jun 2021_. - NumPy 1.20.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.20.3)) -- _10 May 2021_. - NumPy 1.20.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.20.0)) -- _30 Jan 2021_. - NumPy 1.19.5 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.19.5)) -- _5 Jan 2021_. - NumPy 1.19.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.19.0)) -- _20 Jun 2020_. - NumPy 1.18.4 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.18.4)) -- _3 May 2020_. - NumPy 1.17.5 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.17.5)) -- _1 Jan 2020_. - NumPy 1.18.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.18.0)) -- _22 Dec 2019_. - NumPy 1.17.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.17.0)) -- _26 Jul 2019_. - NumPy 1.16.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.16.0)) -- _14 Jan 2019_. - NumPy 1.15.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.15.0)) -- _23 Jul 2018_. - NumPy 1.14.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.14.0)) -- _7 Jan 2018_.
numpy/numpy.org
fc8c1af14708a79b7a19bf514bd026c7aa9872d7
MAINT: Update toward the future (#867)
diff --git a/content/en/about.md b/content/en/about.md index c6b3b43..8c113b8 100644 --- a/content/en/about.md +++ b/content/en/about.md @@ -1,92 +1,92 @@ --- title: About Us sidebar: false --- NumPy is an open source project that enables numerical computing with Python. It was created in 2005 building on the early work of the Numeric and Numarray libraries. NumPy will always be 100% open source software and free for all to use. It is released under the liberal terms of the [modified BSD license](https://github.com/numpy/numpy/blob/main/LICENSE.txt). NumPy is developed in the open on GitHub, through the consensus of the NumPy and wider scientific Python community. For more information on our governance approach, please see our [Governance Document](https://www.numpy.org/devdocs/dev/governance/index.html). ## Steering Council The NumPy Steering Council is the project's governing body. Its role is to ensure, through working with and serving the broader NumPy community, the long-term sustainability of the project, both as a software package and community. The NumPy Steering Council currently consists of the following members (in alphabetical order, by last name): - Sebastian Berg - Ralf Gommers - Charles Harris - Inessa Pawson - Matti Picus - Stéfan van der Walt - Melissa Weber Mendonça - Marten van Kerkwijk - Nathan Goldbaum Emeritus: - Alex Griffing (2015-2017) - Allan Haldane (2015-2021) - Travis Oliphant (project founder, 2005-2012) - Nathaniel Smith (2012-2021) - Julian Taylor (2013-2021) - Jaime Fernández del Río (2014-2021) - Pauli Virtanen (2008-2021) - Eric Wieser (2017-2025) - Stephan Hoyer (2017-2025) To contact the NumPy Steering Council, please email numpy-team@googlegroups.com. ## Teams The NumPy project leadership is actively working on diversifying contribution pathways to the project.<br> NumPy currently has the following teams: - development - documentation - triage - website - survey - translations - sprint mentors - optimization - funding and grants See the [Team](/teams) page for more info. ## NumFOCUS Subcommittee - Charles Harris - Ralf Gommers - Inessa Pawson - Sebastian Berg - External member: Thomas Caswell ## Sponsors NumPy receives direct funding from the following sources: {{< sponsors >}} ## Institutional Partners Institutional Partners are organizations that support the project by employing people that contribute to NumPy as part of their job. Current Institutional Partners include: - UC Berkeley (Stéfan van der Walt) -- Quansight (Nathan Goldbaum, Ralf Gommers, Matti Picus, Melissa Weber Mendonça, Mateusz Sokol, Rohit Goswami) +- Quansight (Nathan Goldbaum, Ralf Gommers, Matti Picus, Melissa Weber Mendonça, Mateusz Sokol) - NVIDIA (Sebastian Berg) {{< partners >}} ## Donate If you have found NumPy useful in your work, research, or company, please consider a donation to the project commensurate with your resources. Any amount helps! All donations will be used strictly to fund the development of NumPy’s open source software, documentation, and community. NumPy is a Sponsored Project of NumFOCUS, a 501(c)(3) nonprofit charity in the United States. NumFOCUS provides NumPy with fiscal, legal, and administrative support to help ensure the health and sustainability of the project. Visit [numfocus.org](https://numfocus.org) for more information. Donations to NumPy are managed by [NumFOCUS](https://numfocus.org). For donors in the United States, your gift is tax-deductible to the extent provided by law. As with any donation, you should consult with your tax advisor about your particular tax situation. NumPy's Steering Council will make the decisions on how to best use any funds received. Technical and infrastructure priorities are documented on the [NumPy Roadmap](https://www.numpy.org/neps/index.html#roadmap). {{<opencollective>}}
numpy/numpy.org
a96897fc2d67355a3f7318820582e2549c4ca255
Fix indentation in the multiline lists
diff --git a/content/en/learn.md b/content/en/learn.md index 723d29e..117cc0c 100644 --- a/content/en/learn.md +++ b/content/en/learn.md @@ -1,97 +1,99 @@ --- title: Learn sidebar: false --- For the **official NumPy documentation** visit [numpy.org/doc/stable](https://numpy.org/doc/stable). *** Below is a curated collection of educational resources, both for self-learning and teaching others, developed by NumPy contributors and vetted by the community. ## Beginners There's a ton of information about NumPy out there. If you are just starting, we'd strongly recommend the following: <i class="fas fa-chalkboard"></i> **Tutorials** * [NumPy Quickstart Tutorial](https://numpy.org/devdocs/user/quickstart.html) * [NumPy Tutorials](https://numpy.org/numpy-tutorials) A collection of tutorials and -educational materials in the format of Jupyter Notebooks developed and maintained by -the NumPy Documentation team. To submit your own content, visit the -[numpy-tutorials repository on GitHub](https://github.com/numpy/numpy-tutorials). + educational materials in the format of Jupyter Notebooks developed and maintained by + the NumPy Documentation team. To submit your own content, visit the + [numpy-tutorials repository on GitHub](https://github.com/numpy/numpy-tutorials). * [NumPy Illustrated: The Visual Guide to NumPy](https://betterprogramming.pub/3b1d4976de1d?sk=57b908a77aa44075a49293fa1631dd9b) -*by Lev Maximov* + *by Lev Maximov* * [Scientific Python Lectures](https://lectures.scientific-python.org/) Besides covering -NumPy, these lectures offer a broader introduction to the scientific Python ecosystem. + NumPy, these lectures offer a broader introduction to the scientific Python ecosystem. * [NumPy: the absolute basics for beginners](https://numpy.org/devdocs/user/absolute_beginners.html) * [NumPy tutorial](https://github.com/rougier/numpy-tutorial) *by Nicolas Rougier* * [Stanford CS231](http://cs231n.github.io/python-numpy-tutorial/) *by Justin Johnson* * [NumPy User Guide](https://numpy.org/devdocs) <i class="fas fa-book"></i> **Books** * [Guide to NumPy](https://web.mit.edu/dvp/Public/numpybook.pdf) *by Travis E. Oliphant* -This is the first and *free* edition of the book. To purchase the latest edition, -[click here](https://www.amazon.com/exec/obidos/ASIN/151730007X/acmorg-20). + This is the first and *free* edition of the book. To purchase the latest edition, + [click here](https://www.amazon.com/exec/obidos/ASIN/151730007X/acmorg-20). * [From Python to NumPy](https://www.labri.fr/perso/nrougier/from-python-to-numpy/) -*by Nicolas P. Rougier* *(free)* + *by Nicolas P. Rougier* *(free)* * [Elegant SciPy](https://www.amazon.com/Elegant-SciPy-Art-Scientific-Python/dp/1491922877) -*by Juan Nunez-Iglesias, Stefan van der Walt, and Harriet Dashnow* + *by Juan Nunez-Iglesias, Stéfan van der Walt, and Harriet Dashnow* You may also want to check out the [Goodreads list](https://www.goodreads.com/shelf/show/python-scipy) on the subject of "Python+SciPy." Most books there are about the "SciPy ecosystem," which has NumPy at its core. <i class="far fa-file-video"></i> **Videos** * [Introduction to Numerical Computing with NumPy](http://youtu.be/ZB7BZMhfPgk) *by Alex Chabot-Leclerc* *** ## Advanced Try these advanced resources for a better understanding of NumPy concepts like advanced indexing, splitting, stacking, linear algebra, and more. <i class="fas fa-chalkboard"></i> **Tutorials** * [100 NumPy Exercises](http://www.labri.fr/perso/nrougier/teaching/numpy.100/index.html) -*by Nicolas P. Rougier* + *by Nicolas P. Rougier* * [An Introduction to NumPy and Scipy](https://engineering.ucsb.edu/~shell/che210d/numpy.pdf) -*by M. Scott Shell* + *by M. Scott Shell* * [Numpy Medkits](http://mentat.za.net/numpy/numpy_advanced_slides/) -*by Stéfan van der Walt* + *by Stéfan van der Walt* * [NumPy Tutorials](https://numpy.org/numpy-tutorials) A collection of tutorials and educational -materials in the format of Jupyter Notebooks developed and maintained by the NumPy Documentation team. -To submit your own content, visit the [numpy-tutorials repository on GitHub](https://github.com/numpy/numpy-tutorials). + materials in the format of Jupyter Notebooks developed and maintained by the NumPy Documentation team. + To submit your own content, visit the [numpy-tutorials repository on GitHub](https://github.com/numpy/numpy-tutorials). <i class="fas fa-book"></i> **Books** * [Python Data Science Handbook](https://www.amazon.com/Python-Data-Science-Handbook-Essential/dp/1098121228) -*by Jake Vanderplas* + *by Jake Vanderplas* * [Python for Data Analysis](https://www.amazon.com/Python-Data-Analysis-Wrangling-Jupyter/dp/109810403X) -*by Wes McKinney* -* [Numerical Python: Scientific Computing and Data Science Applications with Numpy, SciPy, and Matplotlib](https://www.amazon.com/Numerical-Python-Scientific-Applications-Matplotlib/dp/1484242459) *by Robert Johansson* + *by Wes McKinney* +* [Numerical Python: Scientific Computing and Data Science Applications with Numpy, SciPy, + and Matplotlib](https://www.amazon.com/Numerical-Python-Scientific-Applications-Matplotlib/dp/1484242459) + *by Robert Johansson* <i class="far fa-file-video"></i> **Videos** * [Advanced NumPy - broadcasting rules, strides, and advanced indexing](https://www.youtube.com/watch?v=cYugp9IN1-Q) -*by Juan Nunez-Iglesias* + *by Juan Nunez-Iglesias* *** ## NumPy Talks * [The Future of NumPy Indexing](https://www.youtube.com/watch?v=o0EacbIbf58) *by Jaime Fernández* (2016) * [Evolution of Array Computing in Python](https://www.youtube.com/watch?v=HVLPJnvInzM&t=10s) *by Ralf Gommers* (2019) * [NumPy: what has changed and what is going to change?](https://www.youtube.com/watch?v=YFLVQFjRmPY) *by Matti Picus* (2019) * [Inside NumPy](https://www.youtube.com/watch?v=dBTJD_FDVjU) *by Ralf Gommers, Sebastian Berg, Matti Picus, Tyler Reddy, Stéfan van der Walt, Charles Harris* (2019) * [Brief Review of Array Computing in Python](https://www.youtube.com/watch?v=f176j2g2eNc) *by Travis Oliphant* (2019) *** ## Citing NumPy If NumPy has been significant in your research, and you would like to acknowledge the project in your academic publication, please see [this citation information](/citing-numpy).