changed the code revision view to show information in collasible boxes

This commit is contained in:
hyung-hwan 2015-04-19 16:18:29 +00:00
parent be199e68ee
commit 60de017146
5 changed files with 69 additions and 60 deletions

View File

@ -208,8 +208,27 @@ function hide_unneeded_divs()
} }
$(function() { $(function() {
$("#code_revision_mainarea_result_msg_container").accordion ({
collapsible: true
});
$("#code_revision_mainarea_result_files").accordion ({
collapsible: true
});
$("#code_revision_mainarea_result_properties").accordion ({
collapsible: true
});
$("#code_revision_mainarea_result_comments").accordion ({
collapsible: true
});
hide_unneeded_divs (); hide_unneeded_divs ();
render_wiki (); render_wiki ();
}); });
</script> </script>
@ -355,7 +374,8 @@ $history = $file['history'];
<div class="result" id="code_revision_mainarea_result"> <div class="result" id="code_revision_mainarea_result">
<div class="title"><?php print $this->lang->line('Message')?>&nbsp; <div id="code_revision_mainarea_result_msg_container" class="collapsible-box">
<div class="collapsible-box-header" ><?php print $this->lang->line('Message')?>&nbsp;
<?php if ($can_edit): ?> <?php if ($can_edit): ?>
<span class='anchor'> <span class='anchor'>
<?php print anchor ("#", $this->lang->line('Edit'), <?php print anchor ("#", $this->lang->line('Edit'),
@ -365,14 +385,16 @@ $history = $file['history'];
<?php endif; ?> <?php endif; ?>
</div> </div>
<div id="code_revision_mainarea_result_msg"> <div id="code_revision_mainarea_result_msg" class="collapsible-box-panel">
<pre id="code_revision_mainarea_result_msg_text" class="pre-wrapped"> <pre id="code_revision_mainarea_result_msg_text" class="pre-wrapped">
<?php print htmlspecialchars($history['msg']); ?> <?php print htmlspecialchars($history['msg']); ?>
</pre> </pre>
</div> </div>
</div>
<div id="code_revision_mainarea_result_files"> <div id="code_revision_mainarea_result_files" class="collapsible-box">
<div class="title"><?php print $this->lang->line('Files')?></div> <div class="collapsible-box-header"><?php print $this->lang->line('Files')?></div>
<div id="code_revision_mainarea_result_files_table_container" class="collapsible-box-panel">
<table id="code_revision_mainarea_result_files_table"> <table id="code_revision_mainarea_result_files_table">
<?php <?php
/* /*
@ -410,9 +432,11 @@ $history = $file['history'];
?> ?>
</table> </table>
</div> </div>
</div>
<div id="code_revision_mainarea_result_properties"> <div id="code_revision_mainarea_result_properties" class="collapsible-box">
<div class="title"><?php print $this->lang->line('CODE_PROPERTIES');?></div> <div class="collapsible-box-header"><?php print $this->lang->line('CODE_PROPERTIES');?></div>
<div id="code_revision_mainarea_result_properties_table_container" class="collapsible-box-panel">
<table id="code_revision_mainarea_result_properties_table"> <table id="code_revision_mainarea_result_properties_table">
<?php <?php
$rowclasses = array ('odd', 'even'); $rowclasses = array ('odd', 'even');
@ -422,8 +446,8 @@ $history = $file['history'];
if (array_key_exists('props', $p) && array_key_exists('prev_props', $p)) if (array_key_exists('props', $p) && array_key_exists('prev_props', $p))
{ {
$common_props = array_intersect_assoc ($p['props'], $p['prev_props']); $common_props = array_intersect_assoc ($p['props'], $p['prev_props']);
$added_props = array_diff_assoc ($p['props'], $common_props); $added_props = array_diff_assoc ($p['props'], $common_props);
$deleted_props = array_diff_assoc ($p['prev_props'], $common_props); $deleted_props = array_diff_assoc ($p['prev_props'], $common_props);
if (count($added_props) > 0 || count($deleted_props) > 0) if (count($added_props) > 0 || count($deleted_props) > 0)
{ {
@ -474,9 +498,10 @@ $history = $file['history'];
?> ?>
</table> </table>
</div> </div>
</div>
<div id="code_revision_mainarea_result_comments"> <div id="code_revision_mainarea_result_comments" class="collapsible-box">
<div class="title"><?php print $this->lang->line('Comment')?>&nbsp; <div class="collapsible-box-header"><?php print $this->lang->line('Comment')?>&nbsp;
<?php if ($is_loggedin): ?> <?php if ($is_loggedin): ?>
<span class='anchor'> <span class='anchor'>
<?php print anchor ("#", $this->lang->line('New'), <?php print anchor ("#", $this->lang->line('New'),
@ -486,7 +511,7 @@ $history = $file['history'];
<?php endif; ?> <?php endif; ?>
</div> </div>
<div id="code_revision_mainarea_review_comment"> <div id="code_revision_mainarea_review_comment" class="collapsible-box-panel">
<?php <?php
for ($i = $review_count; $i > 0; $i--) for ($i = $review_count; $i > 0; $i--)
{ {
@ -520,7 +545,6 @@ $history = $file['history'];
</div> <!-- code_revision_mainarea_review_comment --> </div> <!-- code_revision_mainarea_review_comment -->
</div> <!-- code_revision_mainarea_result_comments --> </div> <!-- code_revision_mainarea_result_comments -->
</div> <!-- code_revision_mainarea_result --> </div> <!-- code_revision_mainarea_result -->
</div> <!-- code_revision_mainarea --> </div> <!-- code_revision_mainarea -->

View File

@ -54,6 +54,7 @@ function render_wiki()
$("#project_home_sidebar_log_all_button").button ().click (function () { $("#project_home_sidebar_log_all_button").button ().click (function () {
$(location).attr ('href', codepot_merge_path("<?php print site_url(); ?>", "/project/log/" + "<?php print $project->id; ?>")); $(location).attr ('href', codepot_merge_path("<?php print site_url(); ?>", "/project/log/" + "<?php print $project->id; ?>"));
return false;
}); });
} }

View File

@ -60,6 +60,7 @@ $(function () {
$("#site_home_sidebar_log_all_button").button ().click (function () { $("#site_home_sidebar_log_all_button").button ().click (function () {
$(location).attr ('href', codepot_merge_path("<?php print site_url(); ?>", "/site/log")); $(location).attr ('href', codepot_merge_path("<?php print site_url(); ?>", "/site/log"));
return false;
}); });
}); });
</script> </script>

View File

@ -110,65 +110,31 @@
overflow: auto; overflow: auto;
} }
#code_revision_mainarea_result .title .anchor { #code_revision_mainarea_result .collapsible-box{
font-size: 70%; margin-top: 0.5em;
} }
#code_revision_mainarea_result_msg { #code_revision_mainarea_result_msg {
} }
#code_revision_mainarea_result_msg_text { #code_revision_mainarea_result_msg_text {
padding: 0.5em 0.5em 0.5em 0.5em; line-height: 1.3em;
padding: 0 0.2em 0 0.2em;
line-height: 1.2em;
background-color: #F8F8FA;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
#code_revision_mainarea_result_files_table td {
white-space: nowrap;
}
#code_revision_mainarea_result_files_table td.M {
white-space: nowrap;
background-image:url(images/page_white_edit.png);
background-position:2px 50%;
background-repeat:no-repeat;
padding-left: 22px;
}
#code_revision_mainarea_result_files_table td.D {
white-space: nowrap;
background-image:url(images/page_white_delete.png);
background-position:2px 50%;
background-repeat:no-repeat;
padding-left: 22px;
}
#code_revision_mainarea_result_files_table td.A {
white-space: nowrap;
background-image:url(images/page_white_add.png);
background-position:2px 50%;
background-repeat:no-repeat;
padding-left: 22px;
}
#code_revision_mainarea_result_files_table td.R {
white-space: nowrap;
background-image:url(images/page_white_add.png);
background-position:2px 50%;
background-repeat:no-repeat;
padding-left: 22px;
} }
#code_revision_mainarea_result_files_table,
#code_revision_mainarea_result_properties_table { #code_revision_mainarea_result_properties_table {
border-spacing: 0; padding: 0.5em 0 0.5em 0;
border-collapse: collapse; background: inherit;
line-height: 1.5em;
} }
#code_revision_mainarea_result_files_table td,
#code_revision_mainarea_result_properties_table td {
white-space: nowrap;
}
#code_revision_mainarea_result_files_table td.M,
#code_revision_mainarea_result_properties_table td.M { #code_revision_mainarea_result_properties_table td.M {
white-space: nowrap; white-space: nowrap;
background-image:url(images/page_white_edit.png); background-image:url(images/page_white_edit.png);
@ -177,6 +143,7 @@
padding-left: 22px; padding-left: 22px;
} }
#code_revision_mainarea_result_files_table td.D,
#code_revision_mainarea_result_properties_table td.D { #code_revision_mainarea_result_properties_table td.D {
white-space: nowrap; white-space: nowrap;
background-image:url(images/page_white_delete.png); background-image:url(images/page_white_delete.png);
@ -185,6 +152,7 @@
padding-left: 22px; padding-left: 22px;
} }
#code_revision_mainarea_result_files_table td.A,
#code_revision_mainarea_result_properties_table td.A { #code_revision_mainarea_result_properties_table td.A {
white-space: nowrap; white-space: nowrap;
background-image:url(images/page_white_add.png); background-image:url(images/page_white_add.png);
@ -193,6 +161,15 @@
padding-left: 22px; padding-left: 22px;
} }
#code_revision_mainarea_result_files_table td.R,
#code_revision_mainarea_result_properties_table td.R {
white-space: nowrap;
background-image:url(images/page_white_add.png);
background-position:2px 50%;
background-repeat:no-repeat;
padding-left: 22px;
}
.review_comment_title { .review_comment_title {
padding: 3px 3px 3px 3px; padding: 3px 3px 3px 3px;
margin-top: 5px; margin-top: 5px;

View File

@ -107,6 +107,12 @@ body {
margin: 1px 0 0 0; margin: 1px 0 0 0;
} }
.content .collapsible-box-panel {
line-height: 2em;
margin: 1px 0 0 0;
padding: 0.2em 0.2em 0.2em 0.2em !important; /* !important so that jquery-ui.css doesn't override this */
}
.content .taskbar { .content .taskbar {
font-size: 1em; font-size: 1em;
/*font-weight: bold;*/ /*font-weight: bold;*/