added icons to Enstyle and Destyle labels

This commit is contained in:
hyung-hwan 2015-04-23 00:40:08 +00:00
parent 5ea48cee2d
commit 12bd1ca41e
2 changed files with 14 additions and 4 deletions

View File

@ -22,6 +22,11 @@
<script type="text/javascript" src="<?php print base_url_make('/js/jquery-ui.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/jquery-ui.css')?>" />
<?php
$enstyle_anchor_text = '<i class="fa fa-magic"></i> ' . $this->lang->line('Enstyle');
$destyle_anchor_text = '<i class="fa fa-times"></i> ' . $this->lang->line('Destyle');
?>
<script type="text/javascript">
$(function () {
<?php
@ -61,13 +66,13 @@ function showRawCode()
if (showing_raw_code)
{
$("#code_file_style_anchor").text("<?php print $this->lang->line('Destyle')?>");
$("#code_file_style_anchor").html('<?php print $destyle_anchor_text; ?>');
$("#code_file_mainarea_result_code").removeClass("prettyprinted");
prettyPrint();
}
else
{
$("#code_file_style_anchor").text("<?php print $this->lang->line('Enstyle')?>");
$("#code_file_style_anchor").html('<?php print $enstyle_anchor_text ?>');
$("#code_file_mainarea_result_code").html($("#code_file_mainarea_result_raw").html());
}
@ -194,7 +199,7 @@ $this->load->view (
print ' | ';
print anchor (
"code/file/{$project->id}/${xpar}{$revreq}",
$this->lang->line('Destyle'),
$destyle_anchor_text,
array('id' => 'code_file_style_anchor',
'onClick' => 'showRawCode(); return false;')
);

View File

@ -7,10 +7,15 @@
}
#code_folder_mainarea_result_table tr {
vertical-align: top;
vertical-align: middle;
white-space: nowrap;
}
#code_folder_mainarea_result_table tr th,
#code_folder_mainarea_result_table tr td {
padding: 0.2em 0.2em 0.2em 0.2em;
}
#code_folder_mainarea_result_readme {
padding: 0.2em 0.2em 0.2em 0.2em;
}