diff --git a/examples/audio/playInternetRadio/streaming.txt b/examples/audio/playInternetRadio/streaming.sh similarity index 100% rename from examples/audio/playInternetRadio/streaming.txt rename to examples/audio/playInternetRadio/streaming.sh diff --git a/handlers/editorHandler.py b/handlers/editorHandler.py index 8112da5f..75aa0b1b 100755 --- a/handlers/editorHandler.py +++ b/handlers/editorHandler.py @@ -190,7 +190,7 @@ def createNewFile(self, rq): if ((".html" in name) or (".py" in name) or (".json" in name) or (".css" in name) or (".txt" in name) or (".js" in name) or (".md" in name) or (".svg" in name) or (".xml" in name) or - (".less" in name) or (".coffee" in name)): + (".less" in name) or (".coffee" in name) or (".sh" in name)): weioFiles.saveRawContentToFile(confFile["last_opened_project"] + "/" + name, contents.encode('utf-8')) else : diff --git a/weioLib/weioFiles.py b/weioLib/weioFiles.py index b7512b44..b4dfd619 100755 --- a/weioLib/weioFiles.py +++ b/weioLib/weioFiles.py @@ -130,7 +130,8 @@ def getFileType(path): ".svg": "svg", ".xml":"xml", ".less":"less", - ".coffee":"coffee" + ".coffee":"coffee", + ".sh":"shell" } images = { diff --git a/www/editor.html b/www/editor.html index eeaf1b02..24ed479e 100644 --- a/www/editor.html +++ b/www/editor.html @@ -145,6 +145,9 @@

Create new file

+ + diff --git a/www/libs/weio/editor.js b/www/libs/weio/editor.js index d410a964..2c597c53 100755 --- a/www/libs/weio/editor.js +++ b/www/libs/weio/editor.js @@ -274,7 +274,7 @@ $(document).ready(function () { if ((path.indexOf(".css") != -1) || (path.indexOf(".py") != -1) || (path.indexOf(".js") != -1) || (path.indexOf(".html") != -1) || (path.indexOf(".txt") != -1) || (path.indexOf(".md") != -1) || (path.indexOf(".json") != -1) || (path.indexOf(".xml") != -1) || (path.indexOf(".less") != -1) || - (path.indexOf(".cofee") != -1) || (path.indexOf(".svg") != -1) || + (path.indexOf(".cofee") != -1) || (path.indexOf(".svg") != -1) || (path.indexOf(".sh") != -1) || // images (path.indexOf(".png") != -1) || (path.indexOf(".jpg") != -1) || (path.indexOf(".bmp") != -1) || (path.indexOf(".gif") != -1) @@ -560,7 +560,7 @@ function handleFileSelect(evt) { if ((fileName.indexOf(".html") != -1) || (fileName.indexOf(".py") != -1) || (fileName.indexOf(".json") != -1) || (fileName.indexOf(".css") != -1) || (fileName.indexOf(".txt") != -1) || (fileName.indexOf(".js") != -1) || (fileName.indexOf(".md") != -1) || (fileName.indexOf(".svg") != -1) || (fileName.indexOf(".xml") != -1) || - (fileName.indexOf(".less") != -1) || (fileName.indexOf(".coffee") != -1)) { + (fileName.indexOf(".less") != -1) || (fileName.indexOf(".coffee") != -1) || (fileName.indexOf(".sh") != -1)) { reader.readAsText(f); } else { reader.readAsDataURL(f);