How to use the webdav/File.TYPE function in webdav

To help you get started, we’ve selected a few webdav examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github avantgardnerio / js-upload-manager / src / main / webapp / src / renderers / FileRenderer.js View on Github external
var createLink = function (text, item, cell, selectedItems) {
            var link = $('<a>');

            // Calculate path
            var path = text.substr(currentPath.length);
            var href = text;
            if (path === '') {
                path = '.';
            }
            if (currentPath.length &gt; text.length) {
                path = '..';
            }
            if (item.getContentType() === File.TYPE.DIRECTORY) {
                href = '#path=' + item.getPath();
                link.click(function () {
                    self.dispatch(new SelectionEvent(item, true));
                });
            }
            var selected = selectedItems.indexOf(item) &gt;= 0;

            // Checkbox
            var checkbox = $('<input>');
            checkbox.attr('type', 'checkbox');
            checkbox.prop('checked', selected);
            checkbox.click(function () {
                var checked = checkbox.prop('checked');
                self.dispatch(new SelectionEvent(item, checked));
            });
            cell.append(checkbox);</a>
github avantgardnerio / js-upload-manager / src / main / webapp / src / widgets / WebDavBrowser.js View on Github external
var onSelect = function(ev) {
            var item = ev.getItem();
            if (item.getContentType() !== File.TYPE.DIRECTORY) {
                return;
            }
            fileRenderer.setPath(item.getPath());
            client.navigate(item.getRelativePath());
        };
github avantgardnerio / js-upload-manager / src / main / webapp / src / webdav / WebDavClient.js View on Github external
$(xml.documentElement).children('D\\:response').each(function(index, response) {
                var file = new File(response, rootPath);
                if(file.getContentType() === File.TYPE.DIRECTORY) {
                    folders[file.getPath()] = file;
                }
                files.addItem(file);
            });

webdav

WebDAV client for NodeJS

MIT
Latest version published 5 months ago

Package Health Score

80 / 100
Full package analysis