// requires DropZone ยช toMarkdown if (typeof jQuery === 'undefined') { throw new Error('YavscRemoteFs script requires jQuery'); } if (typeof Dropzone === 'undefined') { throw new Error('YavscRemoteFs requires Dropzone'); } if (typeof updateMD === 'undefined') { throw new Error('YavscRemoteFs requires md-helpers.js'); } (function($, Dropzone, updateMD) { window.RemoteFS = (function ($) { /* var Combine = function (patha, pathb) { if (!patha) return pathb; if (!pathb) return patha; return patha + '/' + pathb; }; */ var OpenDir = function ($view, sub) { $view.data('path', sub); InitDir($view); }; var InitDir = function ($view) { var path = $view.data('path'); var owner = $view.data('owner'); var fsiourl = path ? '/api/fs/' + path : '/api/fs'; $view.empty(); $.get(fsiourl, function(data) { $('').click(function() { OpenDir($view, null); }).appendTo($view); var npath = null; if (path) $.each(path.split('/'), function () { var part = this; if (npath) npath = npath + '/' + part; else npath = part; $('