mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 08:56:20 +00:00
refactor(edit) show: add isDir
This commit is contained in:
parent
0d3064c406
commit
0419225c5f
1 changed files with 2 additions and 1 deletions
|
|
@ -43,6 +43,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
|
|||
this.show = function(pValue) {
|
||||
var lMode,
|
||||
lName = DOM.getCurrentName(),
|
||||
isDir = DOM.isCurrentIsDir(),
|
||||
lExt = Util.getExtension(lName);
|
||||
|
||||
if (!Loading) {
|
||||
|
|
@ -65,7 +66,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
|
|||
if (!Modelist)
|
||||
Modelist = ace.require('ace/ext/modelist');
|
||||
|
||||
if (DOM.isCurrentIsDir())
|
||||
if (isDir)
|
||||
lMode = Modelist.modesByName.json.mode
|
||||
else
|
||||
lMode = Modelist.getModeForPath(lName).mode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue