*** twiki-beijing-orig/bin/edit Sat Jan 4 18:04:56 2003 --- twiki-beijing/bin/edit Mon Dec 29 14:47:52 2003 *************** *** 1,4 **** ! #!/usr/bin/perl -wT # # TWiki Collaboration Platform, http://TWiki.org/ # --- 1,4 ---- ! #!/usr/local/bin/perl -wT # # TWiki Collaboration Platform, http://TWiki.org/ # *************** *** 70,75 **** --- 70,77 ---- my $extra = ""; my $wikiUserName = &TWiki::userToWikiName( $userName ); + $query->{'jscalendar'} = 0; + if( ! &TWiki::Store::webExists( $webName ) ) { my $url = &TWiki::getOopsUrl( $webName, $topic, "oopsnoweb" ); TWiki::redirect( $query, $url ); *************** *** 254,259 **** --- 256,270 ---- $tmpl =~ s/%TEXT%/$text/go; $tmpl =~ s|( ?) *\n?|$1|gois; # remove tags + if ($query->{'jscalendar'}) { + # add header data for jscalendar if used. Use header in jscalendar.tmpl + my $jstmpl = &TWiki::Store::readTemplate( "jscalendar", $skin ); + my $jscalendaroptions = &TWiki::Store::readTemplate( "jscalendaroptions", $skin ); + $jstmpl = &TWiki::handleCommonTags( $jstmpl, $topic ); + $tmpl =~ s/%JSCALENDAROPTIONS%/$jscalendaroptions/go; + $tmpl =~ s/<\/head>/$jstmpl<\/head>/o; + } + TWiki::writeHeaderFull ( $query, 'edit', 'text/html', length($tmpl) ); print $tmpl;