added a codeBlock tag to creole and changed wiki-show and project-home pages to use prettify to render the codeBlock regiion

This commit is contained in:
hyung-hwan 2015-02-02 02:36:34 +00:00
parent d7fe16c2ea
commit 82102eab8b
2 changed files with 22 additions and 1 deletions

View File

@ -12,6 +12,13 @@
<script type="text/javascript" src="<?=base_url_make('/js/creole.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/prettify.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/lang-css.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/lang-lisp.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/lang-lua.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/lang-sql.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/lang-vb.js')?>"></script>
<script type="text/javascript">
function render_wiki()
{
@ -21,6 +28,8 @@ function render_wiki()
"<?=site_url()?>/wiki/show/<?=$project->id?>/",
"<?=site_url()?>/wiki/attachment0/<?=$project->id?>/"
);
prettyPrint ();
}
</script>
@ -125,6 +134,10 @@ foreach ($urls as $url)
}
?>
</ul>
<pre>
<?php //print_r ($urls); ?>
<?php //print_r ($_SERVER); ?>
</pre>
</div>
<div class="box">

View File

@ -8,6 +8,13 @@
<script type="text/javascript" src="<?=base_url_make('/js/creole.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/prettify.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/lang-css.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/lang-lisp.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/lang-lua.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/lang-sql.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/prettify/lang-vb.js')?>"></script>
<title><?=htmlspecialchars($wiki->name)?></title>
</head>
@ -18,13 +25,14 @@ $hexname = $this->converter->AsciiToHex ($wiki->name);
<script type="text/javascript">
function render_wiki()
{
creole_render_wiki (
"wiki_show_mainarea_wiki_text",
"wiki_show_mainarea_wiki",
"<?=site_url()?>/wiki/show/<?=$project->id?>/",
"<?=site_url()?>/wiki/attachment/<?=$project->id?>/<?=$hexname?>/"
);
prettyPrint ();
}
</script>