function showTOC() {
global $wgOut, $wgShowEXIF, $wgLang;
- $r= '<div class="imagepagetoc"><table id="toc" border="0"><tr><td valign="top"><b>'.wfMsg( 'toc' ).'</b><br />';
- $r .= '<a href="#toc">' . $wgLang->getNStext( NS_IMAGE ) . '</a href> - ';
- $r .= '<a href="#imghistory">' . wfMsg( 'imghistory' ) . '</a href> - ';
- $r .= '<a href="#imagelinks">' . wfMsg( 'imagelinks' ) . '</a href>';
+ $r= '<div class="imagepagetoc"><table class="toc"><tr><td><b>'.htmlspecialchars( wfMsg( 'toc' )) .'</b><br />';
+ $r .= '<a href="#toc">' . htmlspecialchars( $wgLang->getNStext( NS_IMAGE ) ) . '</a> - ';
+ $r .= '<a href="#imghistory">' . htmlspecialchars( wfMsg( 'imghistory' ) ) . '</a> - ';
+ $r .= '<a href="#imagelinks">' . htmlspecialchars( wfMsg( 'imagelinks' ) ) . '</a>';
if ( $wgShowEXIF ) {
- $r .= ' - <a href="#exifdata">' . wfMsg( 'exifdata' ) . '</a>';
+ $r .= ' - <a href="#exifdata">' . htmlspecialchars( wfMsg( 'exifdata' ) ) . '</a>';
}
/** @todo document */
function tocList($toc) {
- return "<div id='toc'>\n"
+ return "<table id='toc' class='toc'><tr><td>"
. "<div id='toctitle'><h2>" . wfMsg('toc') . "</h2></div>\n"
. $toc
- . "</ul>\n</div>\n"
+ . "</ul>\n</td></tr></table>\n"
. '<script type="text/javascript">'
. ' if (window.showTocToggle) {'
. ' var tocShowText = "' . addslashes( wfMsg('showtoc') ) . '";'
. ' var tocHideText = "' . addslashes( wfMsg('hidetoc') ) . '"; '
. ' showTocToggle();'
. ' } '
- . '</script>'
- . "<div class='visualClear'></div>\n";
+ . "</script>\n";
}
/** @todo document */
img.tex { vertical-align: middle; }
span.texhtml { font-family: serif; }
-/* IE/mac fixes */
-#toc {
- display: inline-table;
-}
-#toc h2, #toc div, #toc ul, #toc li {
- float: left;
- clear: left;
-}
-@media all {
- #toc {
- display: block;
- text-align: center;
- }
- #toc * {
- float: none!important;
- }
-}
-/* end IE/mac fixes */
-#toc {
- border: 1px solid #88a;
- background-color: #f7f8ff;
- padding: 5px;
- font-size: 95%;
- float: left;
+#toc,
+.toc {
+ border: 1px solid #bba;
+ background-color: #f7f8ff;
+ padding: 5px;
+ font-size: 95%;
+ text-align: center;
}
-#toc h2 {
- display: inline;
- border: none;
- padding: 0;
- font-size: 100%;
- font-weight: bold;
+#toc h2,
+.toc h2 {
+ display: inline;
+ border: none;
+ padding: 0;
+ font-size: 100%;
+ font-weight: bold;
}
-#toc ul {
- list-style-type: none;
- list-style-image: none;
- margin-left: 0;
- padding-left: 0;
- text-align: left;
+#toc ul,
+.toc ul {
+ list-style-type: none;
+ list-style-image: none;
+ margin-left: 0;
+ padding-left: 0;
+ text-align: left;
}
-#toc ul ul {
- margin: 0 0 0 2em;
+#toc ul ul,
+.toc ul ul {
+ margin: 0 0 0 2em;
}
-#toc .toctoggle {
- font-size: 95%;
+#toc .toctoggle,
+.toc .toctoggle {
+ font-size: 94%;
}
color: #888;
font-style: italic;
}
+
+
+/* Classes for EXIF data display */
+table.exif {
+ margin-left: 0.5em;
+}
+
+table.exif caption { font-weight: bold; }
+table.exif th { font-weight: normal; }
+table.exif td { padding: 0.1em; }
+
+table.exif {
+ border: none;
+ border-collapse: collapse;
+}
+table.exif td, table.exif th {
+ border: 1px solid #aaaaaa;
+ padding-left: 4px;
+ padding-right: 4px;
+}
+table.exif th {
+ background-color: #f9f9f9;
+}
+table.exif td {
+ background-color: #fcfcfc;
+}
+table.exif td.spacer {
+ background: inherit;
+ border-top: none;
+ border-bottom: none;
+}
+
+.visualClear {
+ clear: both;
+}
** content styles
*/
-/* IE/mac fixes */
-#toc {
- display: inline-table;
-}
-#toc div, #toc h2, #toc ul, #toc li, #toc a {
- float: left;
- clear: left;
-}
-#toc .toctoggle * {
- float: none;
- clear: none;
-}
-#toc h2 {
- margin-right: .3em;
-}
-@media all {
- #toc {
- display: block;
- text-align: center;
- }
- #toc * {
- float: none !important;
- }
- #toc h2 {
- margin-right: 0;
- }
+#toc,
+.toc {
+ border: 1px solid #aaa;
+ background-color: #f9f9f9;
+ padding: 5px;
+ font-size: 95%;
+ text-align: center;
}
-/* end IE/mac fixes */
-
-#toc {
- border: 1px solid #aaa;
- background-color: #f9f9f9;
- padding: 5px;
- font-size: 95%;
- float: left;
+#toc h2,
+.toc h2 {
+ display: inline;
+ border: none;
+ padding: 0;
+ font-size: 100%;
+ font-weight: bold;
}
-#toc h2 {
- display: inline;
- border: none;
- padding: 0;
- font-size: 100%;
- font-weight: bold;
+#toc ul,
+.toc ul {
+ list-style-type: none;
+ list-style-image: none;
+ margin-left: 0;
+ padding-left: 0;
+ text-align: left;
}
-#toc ul {
- list-style-type: none;
- list-style-image: none;
- margin-left: 0;
- padding-left: 0;
- text-align: left;
+#toc ul ul,
+.toc ul ul {
+ margin: 0 0 0 2em;
}
-#toc ul ul {
- margin: 0 0 0 2em;
+#toc .toctoggle,
+.toc .toctoggle {
+ font-size: 94%;
}
-#toc .toctoggle {
- font-size: 94%;
- }
/* images */
text-indent: -2em;
}
-div.imagepagetoc table {
+div.imagepagetoc table.toc {
margin-bottom: 1em;
}