mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
minor changes
This commit is contained in:
parent
0dec6bc042
commit
f43bb8ed42
2 changed files with 11 additions and 5 deletions
|
|
@ -192,8 +192,13 @@
|
|||
lRet = main.sendFile( pParams );
|
||||
}
|
||||
else if( Util.isContainStr(p.name, FS) || Util.strCmp( p.name, '/') ){
|
||||
if( !main.getQuery(p.request) )
|
||||
var lQuery = main.getQuery(p.request);
|
||||
|
||||
if( !lQuery )
|
||||
p.request.url += '?html';
|
||||
else if(lQuery === '?download')
|
||||
lQuery += '&&html';
|
||||
|
||||
|
||||
var lName = Minify.allowed.html ?
|
||||
Minify.getName(INDEX) : INDEX;
|
||||
|
|
|
|||
|
|
@ -446,12 +446,13 @@ CloudCmd._changeLinks = function(pPanelID){
|
|||
lOnDragStart_f = function(pEvent){
|
||||
var lElement = pEvent.target,
|
||||
lLink = lElement.href,
|
||||
lName = lElement.textContent,
|
||||
/* if it's directory - adding json extension */
|
||||
lType = lElement.parentElement.nextSibling;
|
||||
lName = lElement.textContent;
|
||||
|
||||
if(lType && lType.textContent === '<dir>')
|
||||
/* if it's directory - adding json extension */
|
||||
if( DOM.isCurrentDir() ){
|
||||
lName += '.json';
|
||||
lLink += '?json';
|
||||
}
|
||||
|
||||
pEvent.dataTransfer.setData("DownloadURL",
|
||||
'application/octet-stream' + ':' +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue