Revision: 53123 Author: avar Date: 2009-07-11 22:01:01 +0000 (Sat, 11 Jul 2009)
Log Message: ----------- * (bug 19657) Remove caption support: After some experimenting about with embedding the parser I determined that this is just the wrong approach. If someone wants a map caption they can trivially add one by combining the <slippymap/> tag with a HTML table. Supporting this in the extension is always going to be a limited hack that just adds complexity. Modified Paths: -------------- trunk/extensions/SlippyMap/SlippyMap.class.php trunk/extensions/SlippyMap/SlippyMap.css trunk/extensions/SlippyMap/slippyMapParserTests.txt Modified: trunk/extensions/SlippyMap/SlippyMap.class.php =================================================================== --- trunk/extensions/SlippyMap/SlippyMap.class.php 2009-07-11 21:52:26 UTC (rev 53122) +++ trunk/extensions/SlippyMap/SlippyMap.class.php 2009-07-11 22:01:01 UTC (rev 53123) @@ -32,7 +32,6 @@ 'width', 'height', - 'caption', 'marker' ); @@ -286,10 +285,6 @@ } } } - - if ( $key == 'caption' ) { - $this->caption = "foo"; - } } wfProfileOut( __METHOD__ ); @@ -342,10 +337,6 @@ $mapcode .= self::getDynamicMap( $id ); } - if ( $this->caption ) { - $mapcode .= "<div class='mapcaption'>" . $this->parser->recursiveTagParse($this->caption) . "</div>"; - } - $mapcode .= <<<EOT <!-- /mapframe --> Modified: trunk/extensions/SlippyMap/SlippyMap.css =================================================================== --- trunk/extensions/SlippyMap/SlippyMap.css 2009-07-11 21:52:26 UTC (rev 53122) +++ trunk/extensions/SlippyMap/SlippyMap.css 2009-07-11 22:01:01 UTC (rev 53123) @@ -19,13 +19,6 @@ border: none; } -.mapcaption { - position:relative; - clear:right; - float:right; - width: 100%; -} - /* * Force override of delay-loaded styles from openlayers/theme/default/style.css * TODO In the long run, we should probably create a MediaWiki theme @@ -58,4 +51,4 @@ width:36px; height:19px; background-image:url('reset-button.png'); -} \ No newline at end of file +} Modified: trunk/extensions/SlippyMap/slippyMapParserTests.txt =================================================================== --- trunk/extensions/SlippyMap/slippyMapParserTests.txt 2009-07-11 21:52:26 UTC (rev 53122) +++ trunk/extensions/SlippyMap/slippyMapParserTests.txt 2009-07-11 22:01:01 UTC (rev 53123) @@ -254,34 +254,3 @@ </p><p><strong class="error">SlippyMap error: The value <tt>false</tt> is not valid for the <tt>marker</tt> attribute, valid markers are <tt>0</tt> and <tt>1</tt>.</strong> </p> !! end - - -!! test -SlippyMap: Valid caption arguments -!! input -== Valid == - -<slippymap lat=61 lon=95 zoom=1 caption="2134aoe huashu 1234g 'h,p1`309432324cg1`032" dummy/> -<slippymap lat=61 lon=95 zoom=1 caption="<<<<<" dummy/> - -!! result -<a name="Valid" id="Valid"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Valid">edit</a>]</span> <span class="mw-headline"> Valid </span></h2> -<p>A dummy map -A dummy map -</p> -!! end - -!! test -SlippyMap: Invalid extra arguments -!! input -== Invalid == - -<slippymap lat=61 lon=95 zoom=1 1=2 3=4 dummy/> -<slippymap lat=61 lon=95 zoom=1 foo=bar zar=gar dummy/> - -!! result -<a name="Invalid" id="Invalid"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Invalid">edit</a>]</span> <span class="mw-headline"> Invalid </span></h2> -<strong class="error">SlippyMap errors:<ul><li class="error">The attribute <tt>1</tt> is unknown.</li><li class="error">The attribute <tt>3</tt> is unknown.</li></ul></strong> -<strong class="error">SlippyMap errors:<ul><li class="error">The attribute <tt>foo</tt> is unknown.</li><li class="error">The attribute <tt>zar</tt> is unknown.</li></ul></strong> - -!! end _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs