diff --git a/module/doc/js/view.js b/module/doc/js/view.js
index 34edfddc4f..5e9c9cc82e 100644
--- a/module/doc/js/view.js
+++ b/module/doc/js/view.js
@@ -40,6 +40,14 @@ $(function()
}
setTimeout($.resetToolbarPosition, 50);
});
+
+ if(!canDeleteFile)
+ {
+ $('.detail-content .files-list li').each(function()
+ {
+ $(this).find('a[onclick^=deleteFile]').remove();
+ });
+ }
})
function deleteFile(fileID)
diff --git a/module/doc/view/view.html.php b/module/doc/view/view.html.php
index 0d1be15e9d..01ce02b66d 100644
--- a/module/doc/view/view.html.php
+++ b/module/doc/view/view.html.php
@@ -118,7 +118,7 @@ js::set('docID', $doc->id);
id}");?>" alt="title?>">
files[$file->id]);?>
@@ -213,5 +213,6 @@ js::set('docID', $doc->id);