Skip to content

Commit

Permalink
1.0.81
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbrg committed Dec 1, 2017
1 parent 0151bd1 commit 131ec49
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 28 deletions.
33 changes: 30 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"version": "1.0.80",
"version": "1.0.81",
"manifest_version": 2,
"minimum_chrome_version": "51",
"name": "Code Pad IDE",
"short_name": "Code Pad IDE",
"description": "An multi-language code IDE / text editor crafted for ChromeOS, built as a hobby free to use and amend!",
"description": "An multi-language code IDE / text editor crafted for the Chrome OS, built as a hobby, free to use and to amend!",
"author": "Andrew Borg",
"homepage_url": "https://github.com/andrewbrg/codepad-chrome-app",
"offline_enabled": true,
Expand Down Expand Up @@ -108,7 +108,34 @@
"types": [
"text/*",
"image/svg+xml",
"application/*"
"application/x-bsh",
"application/java",
"application/java-byte-code",
"application/x-java-class",
"application/x-x509-ca-cert",
"application/x-x509-user-cert",
"application/pkix-cert",
"application/x-csh",
"application/x-pointplus",
"application/x-javascript",
"application/javascript",
"application/ecmascript",
"application/rtf",
"application/x-rtf",
"application/x-lisp",
"application/x-bytecode.python",
"application/x-bsh",
"application/x-sh",
"application/x-shar",
"application/xml",
"application/plain",
"application/x-pkcs7-signature",
"application/pkcs7-mime",
"application/x-pkcs7-mime",
"application/pkcs7-mime",
"application/x-pkcs7-mime",
"application/x-pkcs7-certreqresp",
"application/pkcs7-signature"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/html/modals/file/confirm.close.tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<p class="text-center">This file has been modified, do you want to save your changes?</p>
<div class="row">
<div class="col-4">
<button class="action-save-tab btn btn-primary btn-sm btn-expanded" type="button" aria-label="Save">
<button class="action-save btn btn-primary btn-sm btn-expanded" type="button" aria-label="Save">
<i class="fa fa-fw fa-check"></i>&nbsp;Save
</button>
</div>
Expand Down
40 changes: 20 additions & 20 deletions src/js/handlers/editors.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var EditorsHandler = function () {
this.defaultFileExt = null;
this.undefinedFileMode = null;
this.undefinedFileIcon = null;

this.undefinedFileName = null;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Private Helper
Expand Down Expand Up @@ -60,6 +60,8 @@ var EditorsHandler = function () {
that.undefinedFileMode = data.undefinedFile.mode;
// noinspection JSUnresolvedVariable
that.undefinedFileIcon = data.undefinedFile.icon;
// noinspection JSUnresolvedVariable
that.undefinedFileName = data.undefinedFile.name;

deferred.resolve();
});
Expand Down Expand Up @@ -256,27 +258,25 @@ var EditorsHandler = function () {
return false;
}

var that = this;
var that = this;
var aceEditor = this.getEditor(idx);

if (typeof aceEditor === typeof undefined) {
return false;
}

idx = parseInt(idx);
if (typeof fileEntry !== typeof undefined) {
chrome.fileSystem.getDisplayPath(fileEntry, function (path) {
var aceEditor = that.getEditor(idx);
if (typeof aceEditor !== typeof undefined) {
this._getTabMode(idx).then(function (data) {
if (JSON.parse(data).mode === that.undefinedFileMode) {
chrome.fileSystem.getDisplayPath(fileEntry, function (path) {
that.getEditor(idx).setOption('mode', that.Modelist.getModeForPath(path).mode);
that._populateStatusBar(idx);
}
});
}
else {
this._getTabMode(idx).then(function (data) {
var aceEditor = that.getEditor(idx);
if (typeof aceEditor !== typeof undefined) {
that.getEditor(idx).setOption('mode', 'ace/mode/' + JSON.parse(data).mode);
that._populateStatusBar(idx);
}
});
}
});
} else {
that.getEditor(idx).setOption('mode', 'ace/mode/' + JSON.parse(data).mode);
that._populateStatusBar(idx);
}
});
};

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -391,7 +391,7 @@ var EditorsHandler = function () {
deferred.resolve(JSON.stringify({
"icon": that.undefinedFileIcon,
"mode": that.undefinedFileMode,
"name": "Text"
"name": that.undefinedFileName
}));
}
if (data.hasOwnProperty(ext)) {
Expand Down Expand Up @@ -664,7 +664,7 @@ var EditorsHandler = function () {
}
});
});

ace.require("ace/ext/chromevox");
};

Expand Down
2 changes: 0 additions & 2 deletions src/js/handlers/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ var FilesHandler = function () {

var valid = false;

console.log(file.type);

if (typeof file.type === typeof undefined ||
file.type === 'undefined' ||
file.type === '') {
Expand Down
19 changes: 17 additions & 2 deletions src/settings/ace.modes.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"json": {
"icon": "icon-javascript-alt",
"mode": "javascript",
"mode": "json",
"name": "JSON"
},
"less": {
Expand Down Expand Up @@ -84,6 +84,11 @@
"mode": "perl",
"name": "Perl"
},
"pgsql": {
"icon": "devicon devicon-postgresql-plain",
"mode": "pgsql",
"name": "Postgre SQL"
},
"py": {
"icon": "icon-python",
"mode": "python",
Expand All @@ -109,6 +114,11 @@
"mode": "scala",
"name": "Scala"
},
"scss": {
"icon": "icon-css3-alt",
"mode": "scss",
"name": "Scss"
},
"sql": {
"icon": "icon-database",
"mode": "sql",
Expand All @@ -119,8 +129,13 @@
"mode": "typescript",
"name": "TypeScript"
},
"vb": {
"icon": "devicon devicon-visualstudio-plain",
"mode": "vbscript",
"name": "VB Script"
},
"txt": {
"icon": "devicon devicon-devicon-plain",
"icon": "devicon fa fa-file-text",
"mode": "textfile",
"name": "Plain text"
},
Expand Down

0 comments on commit 131ec49

Please sign in to comment.