- Timestamp:
- 11/23/08 21:47:27 (4 years ago)
- Location:
- trunk/EditTablePlugin/lib/Foswiki
- Files:
-
- 1 edited
- 1 moved
-
. (moved) (moved from trunk/EditTablePlugin/lib/TWiki)
-
Plugins/EditTablePlugin.pm (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin.pm
r781 r893 1 1 # Plugin for Foswiki - The Free Open Source Wiki, http://foswiki.org/ 2 2 # 3 # Copyright (C) 2008 Arthur Clemens, arthur@visiblearea.com 3 # Copyright (C) 2008 Arthur Clemens, arthur@visiblearea.com and Foswiki contributors 4 4 # Copyright (C) 2002-2007 Peter Thoeny, peter@thoeny.org and TWiki 5 5 # Contributors. … … 19 19 # This is the EditTablePlugin used to edit tables in place. 20 20 21 package TWiki::Plugins::EditTablePlugin;21 package Foswiki::Plugins::EditTablePlugin; 22 22 23 23 use strict; … … 29 29 ); 30 30 31 # This should always be $Rev: 17303 $ so that TWiki can determine the checked-in31 # This should always be $Rev: 17303 $ so that Foswiki can determine the checked-in 32 32 # status of the plugin. It is used by the build automation tools, so 33 33 # you should leave it alone. … … 49 49 50 50 # check for Plugins.pm versions 51 if ( $ TWiki::Plugins::VERSION < 1.026 ) {52 TWiki::Func::writeWarning(51 if ( $Foswiki::Plugins::VERSION < 1.026 ) { 52 Foswiki::Func::writeWarning( 53 53 "Version mismatch between EditTablePlugin and Plugins.pm"); 54 54 return 0; 55 55 } 56 56 57 $query = TWiki::Func::getCgiQuery();57 $query = Foswiki::Func::getCgiQuery(); 58 58 if ( !$query ) { 59 59 return 0; … … 61 61 62 62 # Get plugin debug flag 63 $debug = TWiki::Func::getPreferencesFlag('EDITTABLEPLUGIN_DEBUG');63 $debug = Foswiki::Func::getPreferencesFlag('EDITTABLEPLUGIN_DEBUG'); 64 64 $usesJavascriptInterface = 65 TWiki::Func::getPreferencesFlag('EDITTABLEPLUGIN_JAVASCRIPTINTERFACE');65 Foswiki::Func::getPreferencesFlag('EDITTABLEPLUGIN_JAVASCRIPTINTERFACE'); 66 66 $viewModeHeaderDone = 0; 67 67 $editModeHeaderDone = 0; … … 69 69 70 70 # Plugin correctly initialized 71 TWiki::Func::writeDebug(72 "- TWiki::Plugins::EditTablePlugin::initPlugin( $web.$topic ) is OK")71 Foswiki::Func::writeDebug( 72 "- Foswiki::Plugins::EditTablePlugin::initPlugin( $web.$topic ) is OK") 73 73 if $debug; 74 74 … … 78 78 sub beforeCommonTagsHandler { 79 79 return unless $_[0] =~ /%EDIT(TABLE|CELL){(.*)}%/os; 80 require TWiki::Plugins::EditTablePlugin::Core;81 TWiki::Plugins::EditTablePlugin::Core::protectVariables(80 require Foswiki::Plugins::EditTablePlugin::Core; 81 Foswiki::Plugins::EditTablePlugin::Core::protectVariables( 82 82 $_[0] ); 83 83 } … … 87 87 88 88 addViewModeHeadersToHead(); 89 require TWiki::Plugins::EditTablePlugin::Core;90 TWiki::Plugins::EditTablePlugin::Core::process( $_[0], $_[1], $_[2], $topic,89 require Foswiki::Plugins::EditTablePlugin::Core; 90 Foswiki::Plugins::EditTablePlugin::Core::process( $_[0], $_[1], $_[2], $topic, 91 91 $web ); 92 92 } … … 123 123 return if ( !$_[0] ); 124 124 $_[0] =~ s/\$n\(\)/\n/gos; # expand '$n()' to new line 125 my $alpha = TWiki::Func::getRegularExpression('mixedAlpha');125 my $alpha = Foswiki::Func::getRegularExpression('mixedAlpha'); 126 126 $_[0] =~ s/\$n([^$alpha]|$)/\n$1/gos; # expand '$n' to new line 127 127 $_[0] =~ s/\$nop(\(\))?//gos; # remove filler, useful for nested search … … 147 147 </style> 148 148 EOF 149 TWiki::Func::addToHEAD( 'EDITTABLEPLUGIN', $header );149 Foswiki::Func::addToHEAD( 'EDITTABLEPLUGIN', $header ); 150 150 } 151 151 … … 162 162 if !$usesJavascriptInterface && ( $paramJavascriptInterface ne 'on' ); 163 163 164 require TWiki::Contrib::BehaviourContrib;165 TWiki::Contrib::BehaviourContrib::addHEAD();164 require Foswiki::Contrib::BehaviourContrib; 165 Foswiki::Contrib::BehaviourContrib::addHEAD(); 166 166 167 167 $editModeHeaderDone = 1; … … 181 181 EOF 182 182 183 TWiki::Func::addToHEAD( 'EDITTABLEPLUGIN', $header );183 Foswiki::Func::addToHEAD( 'EDITTABLEPLUGIN', $header ); 184 184 } 185 185 … … 193 193 . $tableId . '" />'; 194 194 $header .= "\n"; 195 TWiki::Func::addToHEAD( 'EDITTABLEPLUGIN_NO_JAVASCRIPTINTERFACE', $header );195 Foswiki::Func::addToHEAD( 'EDITTABLEPLUGIN_NO_JAVASCRIPTINTERFACE', $header ); 196 196 } 197 197 … … 205 205 . $footerCount . '" />'; 206 206 $header .= "\n"; 207 TWiki::Func::addToHEAD( 'EDITTABLEPLUGIN_HEADERFOOTERCOUNT', $header );207 Foswiki::Func::addToHEAD( 'EDITTABLEPLUGIN_HEADERFOOTERCOUNT', $header ); 208 208 } 209 209
Note: See TracChangeset
for help on using the changeset viewer.
