Skip to content

Commit

Permalink
Item8061:
Browse files Browse the repository at this point in the history
   * foswikification
   * minor code cleanup
   * minor css cleanup to make them more wikipedia-like



git-svn-id: http://svn.foswiki.org/trunk/MediaWikiTablePlugin@2534 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Feb 19, 2009
1 parent 2dce1e9 commit 45489ae
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
7 changes: 4 additions & 3 deletions data/System/MediaWikiTablePlugin.txt
Expand Up @@ -35,7 +35,7 @@ you might also be interested in the Foswiki:Extensions/EditSyntaxPlugin.

If you want to import content in <nop>MediaWiki format and convert it
to Foswiki markup as much as possible then use the
Foswiki:Extensions/MediaWiki2TWikiAddOn.
Foswiki:Extensions/MediaWiki2FoswikiAddOn.

---++ Syntax Rules
The entire *table* is encased with curly brackets and a vertical bar character
Expand Down Expand Up @@ -342,7 +342,7 @@ are not under consideration here.
The the notion of =n/a= in some cases means that the element under consideration
is not represented in the markup model.

<table class="twikiTable">
<table class="foswikiTable">
<tr>
<th>&nbsp;</th>
<th>XHTML</th>
Expand Down Expand Up @@ -1242,8 +1242,9 @@ Wiki markup like <code>_text_</code> instead of "font-style:italic".
| Plugin Author: | Michael Daum |
| Copyright &copy;: | 2006-2009, Michael Daum http://michaeldaumconsulting.com |
| License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
| Plugin Version: | v1.11 |
| Plugin Version: | v1.20 |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 19 Feb 2009: | converted to foswiki |
| 08 Jan 2009: | certified on foswiki/compat |
| 17 Jul 2008: | fixed some Wikipedia:Mojibake in documentation |
| 13 Nov 2007: | minor performance tweaks |
Expand Down
16 changes: 6 additions & 10 deletions lib/Foswiki/Plugins/MediaWikiTablePlugin.pm
Expand Up @@ -12,26 +12,25 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

package TWiki::Plugins::MediaWikiTablePlugin;
package Foswiki::Plugins::MediaWikiTablePlugin;

use strict;
use vars qw(
$VERSION $RELEASE $NO_PREFS_IN_TOPIC $SHORTDESCRIPTION
$doneHeader $header $isInitialized
$doneHeader $header
);

$VERSION = '$Rev$';
$RELEASE = 'v1.11';
$RELEASE = 'v1.20';
$NO_PREFS_IN_TOPIC = 1;
$SHORTDESCRIPTION = 'Format tables the <nop>MediaWiki way';

$header = <<'HERE';
<link rel="stylesheet" href="%PUBURLPATH%/%TWIKIWEB%/MediaWikiTablePlugin/style.css" type="text/css" media="all" />
<link rel="stylesheet" href="%PUBURLPATH%/%SYSTEMWEB%/MediaWikiTablePlugin/style.css" type="text/css" media="all" />
HERE

###############################################################################
sub initPlugin {
$isInitialized = 0;
$doneHeader = 0;
return 1;
}
Expand All @@ -47,11 +46,8 @@ sub commonTagsHandler {

###############################################################################
sub handleMWTable {
unless ($isInitialized) {
require TWiki::Plugins::MediaWikiTablePlugin::Core;
$isInitialized = 1;
}
return TWiki::Plugins::MediaWikiTablePlugin::Core::handleMWTable(@_);
require Foswiki::Plugins::MediaWikiTablePlugin::Core;
return Foswiki::Plugins::MediaWikiTablePlugin::Core::handleMWTable(@_);
}

1;
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/MediaWikiTablePlugin/Core.pm
Expand Up @@ -12,15 +12,15 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

package TWiki::Plugins::MediaWikiTablePlugin::Core;
package Foswiki::Plugins::MediaWikiTablePlugin::Core;

use strict;

use constant DEBUG => 0; # toggle me

###############################################################################
sub writeDebug {
#&TWiki::Func::writeDebug('- MediaWikiTablePlugin::Core - '.$_[0]) if DEBUG;
#&Foswiki::Func::writeDebug('- MediaWikiTablePlugin::Core - '.$_[0]) if DEBUG;
print STDERR '- MediaWikiTablePlugin::Core - '.$_[0]."\n" if DEBUG;
}

Expand Down
10 changes: 5 additions & 5 deletions lib/Foswiki/Plugins/MediaWikiTablePlugin/MANIFEST
@@ -1,5 +1,5 @@
data/TWiki/MediaWikiTablePlugin.txt 0644
lib/TWiki/Plugins/MediaWikiTablePlugin/Core.pm 0644
lib/TWiki/Plugins/MediaWikiTablePlugin.pm 0644
pub/TWiki/MediaWikiTablePlugin/style.css 0644
pub/TWiki/MediaWikiTablePlugin/wikiringlogo40x40.png 0644
data/System/MediaWikiTablePlugin.txt 0644
lib/Foswiki/Plugins/MediaWikiTablePlugin/Core.pm 0644
lib/Foswiki/Plugins/MediaWikiTablePlugin.pm 0644
pub/System/MediaWikiTablePlugin/style.css 0644
pub/System/MediaWikiTablePlugin/wikiringlogo40x40.png 0644
7 changes: 4 additions & 3 deletions pub/System/MediaWikiTablePlugin/style.css
Expand Up @@ -4,17 +4,18 @@
margin: 1em 1em 1em 0;
border: 1px #aaaaaa solid;
border-collapse: collapse;
background: #fffaff;
background: #f9f9f9;
}
.wikitable th {
background:#f2f2f2;
text-align:center;
}
.wikitable th,
.wikitable td {
border: 1px #aaaaaa solid;
padding: 0.2em;
}
.wikitable caption {
margin-left: inherit;
margin-right: inherit;
font-weight: bold;
}

0 comments on commit 45489ae

Please sign in to comment.