Revision: 2696
http://xims.svn.sourceforge.net/xims/?rev=2696&view=rev
Author: hajn
Date: 2011-07-26 15:30:36 +0000 (Tue, 26 Jul 2011)
Log Message:
-----------
modified to support CodeMirror 1.0 syntax highlighting
Modified Paths:
--------------
trunk/xims/lib/XIMS/CGI/DocBookXML.pm
Modified: trunk/xims/lib/XIMS/CGI/DocBookXML.pm
===================================================================
--- trunk/xims/lib/XIMS/CGI/DocBookXML.pm 2011-07-26 15:26:34 UTC (rev 2695)
+++ trunk/xims/lib/XIMS/CGI/DocBookXML.pm 2011-07-26 15:30:36 UTC (rev 2696)
@@ -1,109 +1,142 @@
-
-=head1 NAME
-
-XIMS::CGI::DocBookXML -- Basic DocBookXML Application Class
-
-=head1 VERSION
-
-$Id: sDocBookXML.pm 2183 2009-01-03 16:45:48Z pepl $
-
-=head1 SYNOPSIS
-
- use XIMS::CGI::DocBookXML;
-
-=head1 DESCRIPTION
-
-This module bla bla
-
-=head1 SUBROUTINES/METHODS
-
-=cut
-
-package XIMS::CGI::DocBookXML;
-
-use strict;
-use base qw( XIMS::CGI::Document );
-
-our ($VERSION) = ( q$Revision: 2183 $ =~ /\s+(\d+)\s*$/ );
-
-=head2 event_edit()
-
-=cut
-
-sub event_edit {
- XIMS::Debug( 5, "called" );
- my ( $self, $ctxt) = @_;
-
- $ctxt->properties->content->escapebody( 1 );
-
- # event edit in SUPER implements operation control
- $self->SUPER::event_edit( $ctxt );
- return 0 if $ctxt->properties->application->style() eq 'error';
-
- $ctxt->properties->application->style( "edit" );
- return 0;
-}
-
-=head2 event_exit()
-
-=cut
-
-sub event_exit {
- XIMS::Debug( 5, "called" );
- my ( $self, $ctxt ) = @_;
-
- $self->SUPER::event_exit( $ctxt );
- $ctxt->properties->content->escapebody( 0 ) unless $self->testEvent(); # do not escape body for event_default
-
- return 0;
-}
-
-
-1;
-__END__
-
-=head1 DIAGNOSTICS
-
-Look at the F<error_log> file for messages.
-
-=head1 CONFIGURATION AND ENVIRONMENT
-
-in F<httpd.conf>: yadda, yadda...
-
-Optional section , remove if bogus
-
-=head1 DEPENDENCIES
-
-Optional section, remove if bogus.
-
-=head1 INCOMPATABILITIES
-
-Optional section, remove if bogus.
-
-=head1 BUGS AND LIMITATION
-
-Grep the source file for: XXX, TODO, ITS_A_HACK_ALARM.
-
-=head1 LICENCE AND COPYRIGHT
-
-Copyright (c) 2002-2011 The XIMS Project.
-
-See the file F<LICENSE> for information and conditions for use, reproduction,
-and distribution of this work, and for a DISCLAIMER OF ALL WARRANTIES.
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# cperl-close-paren-offset: -4
-# cperl-continued-statement-offset: 4
-# cperl-indent-level: 4
-# cperl-indent-parens-as-block: t
-# cperl-merge-trailing-else: nil
-# cperl-tab-always-indent: t
-# fill-column: 78
-# indent-tabs-mode: nil
-# End:
-# ex: set ts=4 sr sw=4 tw=78 ft=perl et :
-
+
+=head1 NAME
+
+XIMS::CGI::DocBookXML -- Basic DocBookXML Application Class
+
+=head1 VERSION
+
+$Id: sDocBookXML.pm 2183 2009-01-03 16:45:48Z pepl $
+
+=head1 SYNOPSIS
+
+ use XIMS::CGI::DocBookXML;
+
+=head1 DESCRIPTION
+
+This module bla bla
+
+=head1 SUBROUTINES/METHODS
+
+=cut
+
+package XIMS::CGI::DocBookXML;
+
+use strict;
+use base qw( XIMS::CGI::XML);
+
+our ($VERSION) = ( q$Revision: 2183 $ =~ /\s+(\d+)\s*$/ );
+
+=head2 event_create()
+
+=cut
+
+sub event_create {
+ XIMS::Debug( 5, "called" );
+ my ( $self, $ctxt) = @_;
+
+ # event edit in SUPER implements operation control
+ $self->SUPER::event_create( $ctxt );
+ return 0 if $ctxt->properties->application->style eq 'error';
+
+ # check if a WYSIWYG Editor is to be used based on cookie or config
+ my $ed = $self->_set_wysiwyg_editor( $ctxt );
+ $ctxt->properties->application->style( "create" . $ed );
+ # $ctxt->properties->application->style( "create" );
+
+ # look for inherited CSS assignments
+ if ( not defined $ctxt->object->css_id() ) {
+ my $css = $ctxt->object->css;
+ $ctxt->object->css_id( $css->id ) if defined $css;
+ }
+
+ $self->resolve_content( $ctxt, [ qw( CSS_ID ) ] );
+
+ return 0;
+}
+
+=head2 event_edit()
+
+=cut
+
+sub event_edit {
+ XIMS::Debug( 5, "called" );
+ my ( $self, $ctxt) = @_;
+
+ $ctxt->properties->content->escapebody( 1 );
+
+ # event edit in SUPER implements operation control
+ $self->SUPER::event_edit( $ctxt );
+ return 0 if $ctxt->properties->application->style() eq 'error';
+
+ # check if a WYSIWYG Editor is to be used based on cookie or config
+ my $ed = $self->_set_wysiwyg_editor( $ctxt );
+ $ctxt->properties->application->style( "edit" . $ed );
+
+ $self->resolve_content( $ctxt, [ qw( CSS_ID ) ] );
+
+ return 0;
+}
+
+=head2 event_exit()
+
+=cut
+
+sub event_exit {
+ XIMS::Debug( 5, "called" );
+ my ( $self, $ctxt ) = @_;
+
+ $self->SUPER::event_exit( $ctxt );
+ $ctxt->properties->content->escapebody( 0 ) unless $self->testEvent(); # do not escape body for event_default
+
+ return 0;
+}
+
+
+1;
+__END__
+
+=head1 DIAGNOSTICS
+
+Look at the F<error_log> file for messages.
+
+=head1 CONFIGURATION AND ENVIRONMENT
+
+in F<httpd.conf>: yadda, yadda...
+
+Optional section , remove if bogus
+
+=head1 DEPENDENCIES
+
+Optional section, remove if bogus.
+
+=head1 INCOMPATABILITIES
+
+Optional section, remove if bogus.
+
+=head1 BUGS AND LIMITATION
+
+Grep the source file for: XXX, TODO, ITS_A_HACK_ALARM.
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2002-2011 The XIMS Project.
+
+See the file F<LICENSE> for information and conditions for use, reproduction,
+and distribution of this work, and for a DISCLAIMER OF ALL WARRANTIES.
+
+=cut
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# cperl-close-paren-offset: -4
+# cperl-continued-statement-offset: 4
+# cperl-indent-level: 4
+# cperl-indent-parens-as-block: t
+# cperl-merge-trailing-else: nil
+# cperl-tab-always-indent: t
+# fill-column: 78
+# indent-tabs-mode: nil
+# End:
+# ex: set ts=4 sr sw=4 tw=78 ft=perl et :
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|