added the Enstyle/Destyle anchor into the code view
This commit is contained in:
parent
8d5b631e7e
commit
a6d9332f37
@ -18,11 +18,13 @@ $lang['Created on'] = 'Created on';
|
|||||||
$lang['Date'] = 'Date';
|
$lang['Date'] = 'Date';
|
||||||
$lang['Delete'] = 'Delete';
|
$lang['Delete'] = 'Delete';
|
||||||
$lang['Description'] = 'Description';
|
$lang['Description'] = 'Description';
|
||||||
|
$lang['Destyle'] = 'Destyle';
|
||||||
$lang['Details'] = 'Details';
|
$lang['Details'] = 'Details';
|
||||||
$lang['Difference'] = 'Diff';
|
$lang['Difference'] = 'Diff';
|
||||||
$lang['Directory'] = 'Directory';
|
$lang['Directory'] = 'Directory';
|
||||||
$lang['Download'] = 'Download';
|
$lang['Download'] = 'Download';
|
||||||
$lang['Edit'] = 'Edit';
|
$lang['Edit'] = 'Edit';
|
||||||
|
$lang['Enstyle'] = 'Enstyle';
|
||||||
$lang['Error'] = 'Error';
|
$lang['Error'] = 'Error';
|
||||||
$lang['File'] = 'File';
|
$lang['File'] = 'File';
|
||||||
$lang['Files'] = 'Files';
|
$lang['Files'] = 'Files';
|
||||||
|
@ -16,11 +16,13 @@ $lang['Created on'] = 'Waktu dibuat';
|
|||||||
$lang['Date'] = 'Date';
|
$lang['Date'] = 'Date';
|
||||||
$lang['Delete'] = 'Hapus';
|
$lang['Delete'] = 'Hapus';
|
||||||
$lang['Description'] = 'Penjelasan';
|
$lang['Description'] = 'Penjelasan';
|
||||||
|
$lang['Destyle'] = 'Destyle';
|
||||||
$lang['Details'] = 'Detail';
|
$lang['Details'] = 'Detail';
|
||||||
$lang['Difference'] = 'Beda';
|
$lang['Difference'] = 'Beda';
|
||||||
$lang['Directory'] = 'Direktori';
|
$lang['Directory'] = 'Direktori';
|
||||||
$lang['Download'] = 'Download';
|
$lang['Download'] = 'Download';
|
||||||
$lang['Edit'] = 'Rubah';
|
$lang['Edit'] = 'Rubah';
|
||||||
|
$lang['Enstyle'] = 'Enstyle';
|
||||||
$lang['Error'] = 'Error';
|
$lang['Error'] = 'Error';
|
||||||
$lang['File'] = 'File';
|
$lang['File'] = 'File';
|
||||||
$lang['Files'] = 'File';
|
$lang['Files'] = 'File';
|
||||||
|
@ -18,11 +18,13 @@ $lang['Created on'] = '최초생성시간';
|
|||||||
$lang['Date'] = '날짜';
|
$lang['Date'] = '날짜';
|
||||||
$lang['Delete'] = '삭제';
|
$lang['Delete'] = '삭제';
|
||||||
$lang['Description'] = '설명';
|
$lang['Description'] = '설명';
|
||||||
|
$lang['Destyle'] = '모양새제거';
|
||||||
$lang['Details'] = '상세내역';
|
$lang['Details'] = '상세내역';
|
||||||
$lang['Difference'] = '차이점';
|
$lang['Difference'] = '차이점';
|
||||||
$lang['Directory'] = '디렉토리';
|
$lang['Directory'] = '디렉토리';
|
||||||
$lang['Download'] = '내려받음';
|
$lang['Download'] = '내려받음';
|
||||||
$lang['Edit'] = '수정';
|
$lang['Edit'] = '수정';
|
||||||
|
$lang['Enstyle'] = '모양새내기';
|
||||||
$lang['Error'] = '오류';
|
$lang['Error'] = '오류';
|
||||||
$lang['File'] = '파일';
|
$lang['File'] = '파일';
|
||||||
$lang['Files'] = '파일';
|
$lang['Files'] = '파일';
|
||||||
|
@ -48,12 +48,39 @@ $(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function renderCode()
|
||||||
|
{
|
||||||
|
$("#code_file_mainarea_result_raw").html ($("#code_file_mainarea_result_pre").html())
|
||||||
|
prettyPrint ();
|
||||||
|
}
|
||||||
|
|
||||||
|
var showing_raw_code = false;
|
||||||
|
|
||||||
|
function showRawCode()
|
||||||
|
{
|
||||||
|
if (showing_raw_code)
|
||||||
|
{
|
||||||
|
|
||||||
|
$("#code_file_style_anchor").text("<?=$this->lang->line('Destyle')?>");
|
||||||
|
$("#code_file_mainarea_result_pre").removeClass("prettyprinted");
|
||||||
|
prettyPrint();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#code_file_style_anchor").text("<?=$this->lang->line('Enstyle')?>");
|
||||||
|
$("#code_file_mainarea_result_pre").html($("#code_file_mainarea_result_raw").html());
|
||||||
|
}
|
||||||
|
|
||||||
|
showing_raw_code = !showing_raw_code;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<title><?=htmlspecialchars($project->name)?></title>
|
<title><?=htmlspecialchars($project->name)?></title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body onload="prettyPrint()">
|
<body onload="renderCode()">
|
||||||
|
|
||||||
<div class="content" id="code_file_content">
|
<div class="content" id="code_file_content">
|
||||||
|
|
||||||
@ -164,6 +191,14 @@ $this->load->view (
|
|||||||
print anchor (
|
print anchor (
|
||||||
"code/fetch/{$project->id}/${xpar}{$revreq}",
|
"code/fetch/{$project->id}/${xpar}{$revreq}",
|
||||||
$this->lang->line('Download'));
|
$this->lang->line('Download'));
|
||||||
|
|
||||||
|
print ' | ';
|
||||||
|
print anchor (
|
||||||
|
"code/file/{$project->id}/${xpar}{$revreq}",
|
||||||
|
$this->lang->line('Destyle'),
|
||||||
|
array('id' => 'code_file_style_anchor',
|
||||||
|
'onClick' => 'showRawCode(); return false;')
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
</div> <!-- code_file_mainarea_menu -->
|
</div> <!-- code_file_mainarea_menu -->
|
||||||
|
|
||||||
@ -228,6 +263,12 @@ if (array_key_exists('properties', $file) && count($file['properties']) > 0)
|
|||||||
</pre>
|
</pre>
|
||||||
</div> <!-- code_file_mainarea_result_info -->
|
</div> <!-- code_file_mainarea_result_info -->
|
||||||
|
|
||||||
|
|
||||||
|
<div style="display:none">
|
||||||
|
<pre id="code_file_mainarea_result_raw">
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div> <!-- code_file_mainarea_result -->
|
</div> <!-- code_file_mainarea_result -->
|
||||||
|
|
||||||
</div> <!-- code_file_mainarea -->
|
</div> <!-- code_file_mainarea -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user