From c33b1866411dcc5fe40c7d39a48d13e9d26d2874 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 17 Feb 2016 07:51:53 +0000 Subject: [PATCH] diabled the edit button for image files and pdf files in the code file view --- codepot/src/codepot/views/code_file.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codepot/src/codepot/views/code_file.php b/codepot/src/codepot/views/code_file.php index 223d4ff7..22e9c111 100644 --- a/codepot/src/codepot/views/code_file.php +++ b/codepot/src/codepot/views/code_file.php @@ -222,7 +222,9 @@ $(function () { return false; // prevent the default behavior }); + $("#code_file_mainarea_edit_button").button(); + $("#code_file_headrev_button").button().click (function() { @@ -403,7 +405,7 @@ $this->load->view ( print ' | '; 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 anchor ("code/edit/{$project->id}/{$hex_headpath}{$revreq}", $this->lang->line('Edit'), 'id="code_file_mainarea_edit_button"');