mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(listeners) changeLinks
This commit is contained in:
parent
c9a0a3748d
commit
58cc050e97
1 changed files with 6 additions and 4 deletions
|
|
@ -129,16 +129,18 @@ var Util, DOM, CloudCmd;
|
|||
*/
|
||||
lOnDragStart_f = function(pEvent) {
|
||||
var lElement = pEvent.target,
|
||||
EXT = 'json',
|
||||
isDir = DOM.isCurrentIsDir(),
|
||||
lLink = lElement.href,
|
||||
lName = lElement.textContent;
|
||||
|
||||
/* if it's directory - adding json extension */
|
||||
if( DOM.isCurrentIsDir() ){
|
||||
lName += '.json';
|
||||
lLink += '?json';
|
||||
if (isDir) {
|
||||
lName += '.' + EXT;
|
||||
lLink += '?' + EXT;
|
||||
}
|
||||
|
||||
pEvent.dataTransfer.setData("DownloadURL",
|
||||
pEvent.dataTransfer.setData('DownloadURL',
|
||||
'application/octet-stream' + ':' +
|
||||
lName + ':' +
|
||||
lLink);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue