changed the file show view to display information dynamically

This commit is contained in:
hyung-hwan 2015-02-05 09:28:09 +00:00
parent eb142f5bb7
commit ab299867ee
2 changed files with 85 additions and 18 deletions

View File

@ -15,7 +15,35 @@
<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" src="<?=base_url_make('/js/jquery.min.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery-ui.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/jquery-ui.css')?>" />
<script type="text/javascript">
$(function () {
if ($("#file_show_mainarea_result_info").is(":visible"))
btn_label = "<?=$this->lang->line('Hide details')?>";
else
btn_label = "<?=$this->lang->line('Show details')?>";
btn = $("#file_show_mainarea_details_button").button({"label": btn_label}).click (function () {
if ($("#file_show_mainarea_result_info").is(":visible"))
{
$("#file_show_mainarea_result_info").hide("blind",{},200);
$("#file_show_mainarea_details_button").button(
"option", "label", "<?=$this->lang->line('Show details')?>");
}
else
{
$("#file_show_mainarea_result_info").show("blind",{},200);
$("#file_show_mainarea_details_button").button(
"option", "label", "<?=$this->lang->line('Hide details')?>");
}
});
});
function render_wiki()
{
creole_render_wiki (
@ -66,34 +94,44 @@ $this->load->view (
<!---------------------------------------------------------------------------->
<div class="sidebar" id="file_show_sidebar">
<div class="box">
<ul>
<li><?=$this->lang->line('Created on')?> <?= $file->updatedon ?></li>
<li><?=$this->lang->line('Last updated on')?> <?= $file->updatedon ?></li>
<li><?=$this->lang->line('Last updated by')?> <?= $file->updatedby ?></li>
</ul>
</div>
<div class="box">
<div class="boxtitle"><?=$this->lang->line('MD5')?></div>
<?= $file->md5sum ?>
</div>
<?= anchor ("file/get/{$project->id}/". $this->converter->AsciiToHex($file->name), '['.$this->lang->line('Download').']') ?>
</div>
<div class="mainarea" id="file_show_mainarea">
<div class="title"><?=htmlspecialchars($file->name)?></div>
<div class="infostrip" id="wiki_show_mainarea_infostrip">
<?= anchor ("file/get/{$project->id}/". $this->converter->AsciiToHex($file->name), $this->lang->line('Download')) ?>
| <a id="file_show_mainarea_details_button" href='#'><?=$this->lang->line('Details')?></a>
</div>
<div id="file_show_mainarea_result">
<div id="file_show_mainarea_wiki">
<pre id="file_show_mainarea_wiki_text" style="visibility: hidden">
<?php print htmlspecialchars($file->description); ?>
</pre>
</div> <!-- file_show_mainarea_wiki -->
<div id="file_show_mainarea_result_info">
<ul>
<li><?=$this->lang->line('Created on')?> <?= $file->updatedon ?></li>
<li><?=$this->lang->line('Created by')?> <?= $file->createdby ?></li>
<li><?=$this->lang->line('Last updated on')?> <?= $file->updatedon ?></li>
<li><?=$this->lang->line('Last updated by')?> <?= $file->updatedby ?></li>
</ul>
<div class="title"><?=$this->lang->line('MD5')?></div>
<?= $file->md5sum ?>
</div> <!-- file_show_mainarea_result_info -->
</div> <!-- file_show_mainarea_result -->
</div> <!-- file_show_mainarea -->

View File

@ -10,6 +10,35 @@
white-space: nowrap;
}
#file_show_mainarea_result {
position: relative;
}
#file_show_mainarea_result_info {
position: absolute;
top: 5px;
right: 2px;
width: 22em;
background: #E5ECF9 none repeat scroll 0 0;
border: #D4DBE8 1px solid;
overflow: auto;
padding: 0.2em 0.4em 0.2em 0.4em;
font-size: 0.9em;
}
#file_show_mainarea_result_info ul {
padding-left: 2em;
}
#file_show_mainarea_result_info .title {
background-color: #8888FF;
color: #FFFFFF;
border: #D4DBE8 1px solid;
margin: 0.3em 0 0.3em 0;
padding: 0.1em 0.1em 0.1em 0.1em;
font-size: inherit;
text-transform: uppercase;
}
#file_edit_mainarea_description {
width: 100%;