r47263 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47262‎ | r47263 | r47264 >
Date:14:26, 14 February 2009
Author:jnatividad
Status:deferred
Tags:
Comment:
implements bug 17491 - add CSS support
Modified paths:
  • /trunk/extensions/SemanticResultFormats/Ploticus/SRF_Ploticus.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/Ploticus/SRF_Ploticus.php
@@ -269,17 +269,17 @@
270270 // PLOT ROW - colspan 3
271271 // TODO: use CSS, create stylesheet
272272 // TODO: generate CSS unique id for each SRF-Ploticus occurence
273 - $rtnstr = '<table class="srfptable" cols="3"' .
 273+ $rtnstr = '<table class="srfptable" id="srfptblid' . $smwgIQRunningNumber . '" cols="3"' .
274274 (empty($this->m_tblwidth) ? ' ' : ' width="'. $this->m_tblwidth . '" ') .
275275 (empty($this->m_tblheight) ? ' ' : ' height="'. $this->m_tblheight . '" ') .
276276 '><tr>';
277277 if (!empty($errorData) && !$this->m_debug) {
278278 // there was an error. We do the not debug check since ploticus by default sends the debug trace to stderr too
279279 // so when debug is on, having a non-empty errorData does not necessarily indicate an error.
280 - $rtnstr .= '<th colspan="3"><strong>Error processing ploticus data:</strong></th></tr><tr><td colspan="3" align="center">' .
 280+ $rtnstr .= '<td class="srfperror" colspan="3"><strong>Error processing ploticus data:</strong></td></tr><tr><td colspan="3" align="center">' .
281281 $errorData . '</td></tr>';
282282 } else {
283 - $rtnstr .= '<td colspan="3" align="center">';
 283+ $rtnstr .= '<td class="srfpplot" colspan="3" align="center">';
284284 switch ($this->m_imageformat) {
285285 case 'svg':
286286 case 'svgz':
@@ -329,7 +329,7 @@
330330 $rtnstr .= '</td></tr>';
331331 }
332332 // INFOROW - colspan 3
333 - $rtnstr .= '<tr><td width="33%" colspan="1">';
 333+ $rtnstr .= '<tr><td class="srfpaction" width="33%" colspan="1">';
334334
335335 // INFOROW - ACTIONS - col 1
336336 // if showcsv or debug is on, add link to data file (CSV)
@@ -359,7 +359,7 @@
360360
361361 // INFOROW - TIMESTAMP - col 3
362362 // if showtimestamp is on, add plot generation timestamp
363 - $rtnstr .= '</td><td width="33%" colspan="1" align="right">';
 363+ $rtnstr .= '</td><td class="srfptimestamp" width="33%" colspan="1" align="right">';
364364 if ($this->m_showtimestamp) {
365365 $rtnstr .= '<small> Generated: ' . date('Y-m-d h:i:s A', $graphLastGenerated) . '</small>';
366366 }
@@ -369,13 +369,13 @@
370370 // DEBUGROW - colspan 3, only display when debug is on
371371 // add link to script or display ploticus cmdline/script
372372 if ($this->m_debug) {
 373+ $rtnstr .= '<tr><td class="srfpdebug" align="center" colspan="3"><strong>DEBUG: ';
373374 if ($this->m_ploticusmode == 'script') {
374 - $rtnstr .= '<tr><td align="center" colspan="3"><strong>DEBUG: <a href="' .
375 - $scriptURL . '" target="_blank">SCRIPT</a> (<a href="'.
 375+ $rtnstr .= '<a href="' . $scriptURL . '" target="_blank">SCRIPT</a> (<a href="'.
376376 $errorURL . '" target="_blank">Ploticus Trace</a>)</strong></td></tr>';
377377 } else {
378 - $rtnstr .= '<tr><td align="center" colspan="3"><strong>DEBUG: PREFAB (<a href="' .
379 - $errorURL .'" target="_blank">Ploticus Trace</a>)</strong></td></tr><tr><td colspan="3">' .
 378+ $rtnstr .= 'PREFAB (<a href="' . $errorURL .
 379+ '" target="_blank">Ploticus Trace</a>)</strong></td></tr><tr><td colspan="3">' .
380380 $commandline . '</td></tr>';
381381 }
382382 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r47505implemented CSV format (bug 17490); use CSS throughout and removed hardcoded ...jnatividad19:12, 19 February 2009

Status & tagging log