diabled the edit button for image files and pdf files in the code file view

This commit is contained in:
hyung-hwan 2016-02-17 07:51:53 +00:00
parent 664891d56b
commit c33b186641

View File

@ -222,7 +222,9 @@ $(function () {
return false; // prevent the default behavior return false; // prevent the default behavior
}); });
<?php if (!$is_special_stream): ?>
$("#code_file_mainarea_edit_button").button(); $("#code_file_mainarea_edit_button").button();
<?php endif; ?>
<?php if ($file['created_rev'] != $file['head_rev']): ?> <?php if ($file['created_rev'] != $file['head_rev']): ?>
$("#code_file_headrev_button").button().click (function() { $("#code_file_headrev_button").button().click (function() {
@ -403,7 +405,7 @@ $this->load->view (
print ' | '; print ' | ';
printf ('%s: %s', $this->lang->line('Size'), $file['size']); printf ('%s: %s', $this->lang->line('Size'), $file['size']);
if ((isset($login['id']) && $login['id'] != '')) if ((isset($login['id']) && $login['id'] != '') && !$is_special_stream)
{ {
print ' '; print ' ';
print anchor ("code/edit/{$project->id}/{$hex_headpath}{$revreq}", $this->lang->line('Edit'), 'id="code_file_mainarea_edit_button"'); print anchor ("code/edit/{$project->id}/{$hex_headpath}{$revreq}", $this->lang->line('Edit'), 'id="code_file_mainarea_edit_button"');