JS Filer: Display and manipulate a HTML treeview control

Recommend this page to a friend!
  Info   View files Example   View files View files (31)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2023-10-28 (-6 hours ago) RSS 2.0 feedNot enough user ratingsTotal: 172 All time: 302 This week: 4Up
Version License JavaScript version Categories
js-filer 1.3.6GNU Free Document...5HTML, AJAX, jQuery, Files and Folders
Description 

Author

This is a jQuery plugin that can display and manipulate a HTML treeview control of hierarchical data.

It can render a hierarchical list of nested nodes inside a given page element and provides command menu to alter those nodes.

Currently it can add, rename, remove, search, copy and move treeview nodes and leaf elements.

Manipulate actions can be synchronized with the server data using AJAX requests.

Innovation Award
JavaScript Programming Innovation award nominee
October 2016
Number 4


Prize: One year server license IP to country, region, city, latitude, longitude, ZIP code, time zone, area code database
Treeviews are very useful to display and manipulate data structures that are organized in a hierarchy, like for instance files and folders.

This jQuery plugin provides a means to let the user perform several tree element manipulation operations like adding, renaming, removing, searching, copying and moving treeview nodes and leaf elements.

Manuel Lemos
Picture of Vallo Reima
  Performance   Level  
Name: Vallo Reima <contact>
Classes: 6 packages by
Country: Estonia Estonia
Age: ???
All time rank: 351 in Estonia Estonia
Week rank: 6 Up1 in Estonia Estonia Equal
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

Details

jsFiler npm version

Purpose

A cross-browser jQuery plugin to display and modify the tree view of any hierarchical data (file directories, inventory lists, ...) supplied from server-side.

Composition

jsFiler is built on top of the [jsTree] extending its functionality: command menus, dialogues, server communication. It is configurable for different tree applications and expects the back-end support. The (multi)tree and operations behaviour are specified via configuration parameters and user callbacks.

Features

  • default/customized tree and command icons;
  • tree behavior options;
  • standard command set extensible by user commands;
  • different command menu configurations;
  • multi-tree handling;
  • copy/move between the trees;
  • make Ajax json requests;
  • synchronize tree events and Ajax calls;
  • tree event and request/response callbacks;
  • node name validation;
  • delete/replace confirmation;
  • search options;
  • multilingual support.

Creation

Examine the demo for the details (see Installation):

  1. supply necessary CSS/JS assets;
  2. supply html/css with the elements to hold the tree;
  3. activate the tree via jQuery passing the tree parameters:

    
    element - selector of the element containing the tree</br>
    options - configuration parameters object
    
    For example:
    
    

Configuration

The options can be passed during activation and after that.

  • menuMode - the command menu: 1 - right-click menu, 2 - icon menu, 3 - both (integer, default is 1)
  • mainMenu - icon menu element selector (string, default is '' placing behind the current node)
  • iconPath - user path to tree and menu icons (string, default is '' using own css)
  • checkBox - node checkboxes: 0 - no, 1 - yes, 2 - cascading (integer, default is 0)
  • canDrag - allow drag'n drop (boolean, default is true)
  • rootSingle - allow multiple roots (boolean, default is false)
  • rootLeaf - allow leafs for root node (boolean, default is true)
  • saveState - save opened/selected state (boolean, default is false)
  • selectOpen - open the subtree by node selection (0 - don't, 1 - by click, 2 - by dblclick; default is 2)
  • knotRemove - knots deletion: 0 - empty only, 1 - +copied, 2 - all (integer, default is 0)
  • nameDupl - duplicate child names: 2 - allow, 1 - case-sensitive, 0 - no (integer, default is 0)
  • nameTrim - node name trim pattern (string, default is /^\s+|\s+$/g)
  • nameValidate - node name validation pattern (string, default is false; Windows-like: /^[^\\\/?%*:|'\"<>]+$/)
  • urlAjax - ajax request url (string, default is ajax.php)
  • userAuth - user authorization token (string, default is null)

Operation

The tree has 3 types of the nodes: root, folder, file. Click the pointer before the tree node icon to open/close the sub-nodes. Click the node and select the required command from the right-click or icon menu. Use drag'n drop to move/copy the nodes.

Installation

Unzip the files to some web server directory:

  1. jsfiler.js - the plugin
  2. jsfiler.css - plugin styles/icons
  3. icons - tree & command icons folder
  4. demo.html - the demo
  5. ajax.php - server-side emulator for the demo
  6. readme.md - quick overview

PHP support is required to run the demo.html. Use the mode parameter to try different menu modes (mode=rm is default):

  • r - right-click menu
  • m - main menu
  • n - node menu

The demo must function like [here].

Revision Credits

[Ivan Bozhanov] of jsTree

License

jsFiler is released under the [GPL v.3].

(c) 2015 Vallo Reima

Feedback

Examine the [Remote File Manager] solution that implements jsFiler via extended command set, enhanced dialog and callbacks.

If you have any questions, comments, ideas, or would like to leave any other kind of feedback, feel free to [contact me].

ChangeLog

  • Apr 2017 - selectOpen option, default 2
  • Feb 2018 - checkBox option, values 0|1|2

[here]: http://vregistry.com/samples/demo/?app=jsfiler [Ivan Bozhanov]: http://vakata.com/en/ [jsTree]: https://www.jstree.com/ [GPL v.3]: https://www.gnu.org/licenses/gpl-3.0.html [contact me]: mailto:vallo@vregistry.com?subject=jsFiler [Remote File Manager]: http://vregistry.com/filer/

  Files folder image Files  
File Role Description
Files folder imageicons (21 files)
Accessible without login Plain text file ajax.php Data Auxiliary data
Accessible without login Plain text file demo.html Example Example
Accessible without login Image file favicon.ico Data Auxiliary data
Accessible without login Plain text file jsfiler.css Data Auxiliary data
Plain text file jsfiler.js Class Class source
Accessible without login Plain text file jsfiler.min.css Data Auxiliary data
Plain text file jsfiler.min.js Class Class source
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  icons  
File Role Description
  Accessible without login Image file c_ad.png Icon Icon image
  Accessible without login Image file c_add-no.png Icon Icon image
  Accessible without login Image file c_add.png Icon Icon image
  Accessible without login Image file c_cpy-no.png Icon Icon image
  Accessible without login Image file c_cpy.png Icon Icon image
  Accessible without login Image file c_cut-no.png Icon Icon image
  Accessible without login Image file c_cut.png Icon Icon image
  Accessible without login Image file c_del-no.png Icon Icon image
  Accessible without login Image file c_del.png Icon Icon image
  Accessible without login Image file c_new-no.png Icon Icon image
  Accessible without login Image file c_new.png Icon Icon image
  Accessible without login Image file c_pst-no.png Icon Icon image
  Accessible without login Image file c_pst.png Icon Icon image
  Accessible without login Image file c_ren-no.png Icon Icon image
  Accessible without login Image file c_ren.png Icon Icon image
  Accessible without login Image file c_sch-no.png Icon Icon image
  Accessible without login Image file c_sch.png Icon Icon image
  Accessible without login Image file t_knot.png Icon Icon image
  Accessible without login Image file t_knot_leaf.png Icon Icon image
  Accessible without login Image file t_leaf.png Icon Icon image
  Accessible without login Image file t_root.png Icon Icon image

 Version Control Unique User Downloads Download Rankings  
 100%
Total:172
This week:0
All time:302
This week:4Up