Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

Commit

Permalink
Files_Texteditor: Allow editing of empty files. Fixes bug 207 in core…
Browse files Browse the repository at this point in the history
… repo.
  • Loading branch information
tomneedham committed Nov 5, 2012
1 parent 89d3f05 commit 8f68017
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions files_texteditor/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function setSyntaxMode(ext){
filetype["jsm"] = "javascript";
filetype["json"] = "json";
filetype["latex"] = "latex";
filetype["less"] = "less";
filetype["less"] = "less";
filetype["ly"] = "latex";
filetype["ily"] = "latex";
filetype["lua"] = "lua";
Expand All @@ -48,7 +48,7 @@ function setSyntaxMode(ext){
filetype["scad"] = "scad"; // seems to be something like 3d model files printed with e.g. reprap
filetype["scala"] = "scala";
filetype["scss"] = "scss"; // "sassy css"
filetype["sh"] = "sh";
filetype["sh"] = "sh";
filetype["sql"] = "sql";
filetype["svg"] = "svg";
filetype["textile"] = "textile"; // related to markdown
Expand Down Expand Up @@ -313,6 +313,10 @@ $(document).ready(function(){
showFileEditor($('#dir').val(),filename);
});
FileActions.setDefault('application/xml','Edit');
FileActions.register('application/x-empty','Edit', OC.PERMISSION_READ, '',function(filename){
showFileEditor($('#dir').val(),filename);
});
FileActions.setDefault('application/x-empty','Edit');
}
OC.search.customResults.Text=function(row,item){
var text=item.link.substr(item.link.indexOf('&file=')+6);
Expand Down

0 comments on commit 8f68017

Please sign in to comment.