• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

blogger


Commit MetaInfo

Révisionf2f590b02c9096c7e90db705f95a845a070c12ea (tree)
l'heure2017-09-08 07:34:14
Auteurumorigu <umorigu@gmai...>
Commiterumorigu

Message de Log

BugTrack/2424 bugtrack: Define bugtrack list style by CSS

Change Summary

Modification

--- a/plugin/bugtrack.inc.php
+++ b/plugin/bugtrack.inc.php
@@ -24,8 +24,9 @@ function plugin_bugtrack_init()
2424 'priority_list' => array('緊急', '重要', '普通', '低'),
2525 'state_list' => array('提案', '着手', '完了', '保留', '却下'),
2626 'state_sort' => array('着手', '保留', '完了', '提案', '却下'),
27- 'state_bgcolor' => array('#ccccff', '#ffcc99', '#ccffcc', '#ffccff', '#cccccc', '#ff3333'),
28- 'header_bgcolor' => '#ffffcc',
27+ 'state_class' => array('bugtrack_state_proposal', 'bugtrack_state_accept',
28+ 'bugrack_state_resolved', 'bugtrack_state_pending', 'bugtrack_state_cancel',
29+ 'bugtrack_state_undef'),
2930 'base' => 'ページ',
3031 'summary' => 'サマリ',
3132 'nosummary'=> 'ここにサマリを記入して下さい',
@@ -373,18 +374,19 @@ function plugin_bugtrack_list_convert()
373374
374375 $state_no = array_search($state, $_plugin_bugtrack['state_sort']);
375376 if ($state_no === NULL || $state_no === FALSE) $state_no = $count_list;
376- $bgcolor = htmlsc($_plugin_bugtrack['state_bgcolor'][$state_no]);
377+ $cssclass = htmlsc($_plugin_bugtrack['state_class'][$state_no]);
377378
378379 $row = <<<EOD
379- <tr>
380- <td style="background-color:$bgcolor">$page_link</td>
381- <td style="background-color:$bgcolor">$state</td>
382- <td style="background-color:$bgcolor">$priority</td>
383- <td style="background-color:$bgcolor">$category</td>
384- <td style="background-color:$bgcolor">$name</td>
385- <td style="background-color:$bgcolor">$summary</td>
380+ <tr class="$cssclass">
381+ <td>$page_link</td>
382+ <td>$state</td>
383+ <td>$priority</td>
384+ <td>$category</td>
385+ <td>$name</td>
386+ <td>$summary</td>
386387 </tr>
387388 EOD;
389+ $row = preg_replace('#(?<=>)\n\s+#', '', $row) . "\n"; // Reduce space size
388390 $rec = &$data[$i];
389391 $rec[] = $state_no; // color number
390392 $rec[] = $row; // HTML content
@@ -407,10 +409,9 @@ EOD;
407409 list($page_name, $no, $summary, $name, $priority, $state, $category, $filetime, $state_no, $html) = $line;
408410 $table[$state_no][$no] = $html;
409411 }
410- $table_html = ' <tr>' . "\n";
411- $bgcolor = htmlsc($_plugin_bugtrack['header_bgcolor']);
412+ $table_html = ' <tr class="bugtrack_list_header">' . "\n";
412413 foreach (array('pagename', 'state', 'priority', 'category', 'name', 'summary') as $item)
413- $table_html .= ' <th style="background-color:' . $bgcolor . '">' .
414+ $table_html .= ' <th>' .
414415 htmlsc($_plugin_bugtrack[$item]) . '</th>' . "\n";
415416 $table_html .= ' </tr>' . "\n";
416417 for ($i = 0; $i <= $count_list; ++$i) {
@@ -451,11 +452,10 @@ function plugin_bugtrack_list_pageinfo($page, $no = NULL, $recurse = TRUE, $file
451452 $$item = ''; // Data not found
452453 }
453454 }
454-
455455 if (preg_match("/\*([^\n]*)/", $body, $matches)) {
456456 $summary = $matches[1];
457457 make_heading($summary);
458+ $summary = trim($summary);
458459 }
459-
460460 return array($page, $no, $summary, $name, $priority, $state, $category, $filetime);
461461 }
--- a/skin/pukiwiki.css
+++ b/skin/pukiwiki.css
@@ -618,6 +618,29 @@ span.topicpath-top {
618618 user-select: none;
619619 }
620620
621+/* bugtrack.inc.php */
622+tr.bugtrack_list_header th {
623+ background-color: #ffffcc;
624+}
625+tr.bugtrack_state_proposal td {
626+ background-color: #ccccff;
627+}
628+tr.bugtrack_state_accept td {
629+ background-color: #ffcc99;
630+}
631+tr.bugrack_state_resolved td {
632+ background-color: #ccffcc;
633+}
634+tr.bugtrack_state_pending td {
635+ background-color: #ffccff;
636+}
637+tr.bugtrack_state_cancel td {
638+ background-color: #cccccc;
639+}
640+tr.bugtrack_state_undef td {
641+ background-color: #ff3333;
642+}
643+
621644 @media print {
622645 a:link,
623646 a:visited {
--- a/skin/tdiary.css
+++ b/skin/tdiary.css
@@ -494,6 +494,29 @@ span.topicpath-top {
494494 user-select: none;
495495 }
496496
497+/* bugtrack.inc.php */
498+tr.bugtrack_list_header th {
499+ background-color: #ffffcc;
500+}
501+tr.bugtrack_state_proposal td {
502+ background-color: #ccccff;
503+}
504+tr.bugtrack_state_accept td {
505+ background-color: #ffcc99;
506+}
507+tr.bugrack_state_resolved td {
508+ background-color: #ccffcc;
509+}
510+tr.bugtrack_state_pending td {
511+ background-color: #ffccff;
512+}
513+tr.bugtrack_state_cancel td {
514+ background-color: #cccccc;
515+}
516+tr.bugtrack_state_undef td {
517+ background-color: #ff3333;
518+}
519+
497520 @media print {
498521 img#logo,
499522 div#navigator,