Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • faproietti/XRF-App
  • chnet/XRF-App
2 results
Show changes
Showing
with 0 additions and 2577 deletions
# 2.23.0-0 / Unreleased
* **The external dependency on jQuery UI was removed**.
A new library `jquery.fancytree-all-deps.min.js` is now added to the
distribution. It includes all dependencies on jQuery UI, so the only
remaining external dependency is jQuery.<br>
Continue to use `jquery.fancytree-all.min.js` if jQuery UI is already
included anyway.
* **Refactored the select behavior**
[details](https://github.com/mar10/fancytree/wiki/SpecSelect):
<!-- [details](https://github.com/mar10/fancytree/wiki#selection-and-checkboxes) -->
* BREAKING CHANGES:
* The `hideCheckbox` option was removed. Use `checkbox: false` instead.<br>
Note that the `<li class='hideCheckbox'>` is still parsed from input
HTML and converted accordingly.
* The optional modifier class `<div class='fancytree-radio'>` was removed.
This class was used on the *container* to turn all checkbox items into
radio buttons.<br>
Instead, this class is now added to `<span class="fancytree-checkbox fancytree-radio">`.
Use the `tree.checkox: "radio"` option to activate this for the whole tree.
* The callback signature for the `tree.tooltip` option has changed to
`tooltip(event, data)`
* [Added] Allow control of selection status propagation with new options:
`unselectable`, `unselectableIgnore`, `unselectableStatus`.
* [Added] node option `radiogroup` enables single-select for child nodes
* [Added] option `opts.noEvents` to `setSelected(flag, opts)`
* [Improved] Option 'checkbox' can have the string value "radio" (only visual
effect)
* [Improved] `aria` option is now on by default
* Use the new dynamic options pattern for
`checkbox`, `icon`, `tooltip`, `unselectable`, `unselectableIgnore`,
`unselectableStatus`.<br>
See also <a href="https://github.com/mar10/fancytree/wiki#dynamic-options">dynamic options</a>.
* [Added] New method `node.visitSiblings()`
* [Added] #730 ext-persist option `expandOpts` is passed to setExpanded()
Allows to suppress animation or event generation.
# 2.22.5 / 2017-05-11
* [Improved] #709 experimental ext-ariagrid
# 2.22.4 / 2017-05-06
* [Improved] #709 experimental ext-ariagrid
# 2.22.3 / 2017-05-05
* [Improved] #709 experimental ext-ariagrid
# 2.22.2 / 2017-04-29
* [Fixed] #729 Fix regression with addChild performance improvements (#708)
# 2.22.1 / 2017-04-21
* [Fixed] #722 Fix regression with addChild performance improvements (#708)
# 2.22.0 / 2017-04-11
* [Added] ext-dnd5 now part of standard distribution
* [Added] #693 ext-dnd/dnd5: configurable drop marker offset
* [Added] #616 ext-wide: configurable left padding
* [Added] New method $.ui.fancytree.evalOption()
* [Improved] #601 ext-filter: improve performance (don't render hidden nodes)
* [Improved] ext-contextMenu: disable keyboard while popup is open and restore focus
* [Improved] #701 ext-hotkeys: Prevent default behavior on hot key combination
* [Improved] #708 speedup improvement for addChildren
* [Fixed] #680 ext-dnd5: top level nodes not draggable
* [Fixed] #681 ext-table: exception when a lazy node has `children: []`
* [Fixed] #699 ext-dnd5: Icon remains after dnd is cancelled
* [Fixed] #702 $.ui.fancytree.getNode(jQuery)' for jQuery v3.x
* [Fixed] #706 Fix DND where fancytree-title span is not a direct child due to custom layouts
* [Fixed] #712 When clicking in a scrolled tree for the first time, focus is not set properly
* [Fixed] #716 ext-wide: animation 'jumps' (jQuery UI 1.12)
* [Fixed] #717, #719 expand/collapse shows displaced child nodes when scrolled (jQuery UI 1.12)
* Update demos to jQuery 3.2.1 / jQuery UI 1.12.1
# 2.21.0 / 2017-01-15
* [Added] New extension 'ext-dnd5' (beta) for native HTML5 drag'n'drop support
* [Added] `rtl` option for right-to-left script support
* [Added] Add $.ui.fancytree.overrideMethod()
* [Added] hook `treeSetOption` allows extensions to update on option changes
* [Changed] standard CSS no longer defines `overflow: auto` for the container.
If the tree container has a fixed height, `overflow: auto` or `overflow: scroll`
should be added to make it scrollable.
(Otherwise this always would be the scroll parent for ext-dnd5.)
* [Improved] better support for initializing from embedded JSON using the
`data-type="json"` attribute
* [Fixed] corner case of #658 when ext-edit is loaded, but inactive
* [Fixed] #396 Don't load 'loading.gif' for glyph skins
* [Fixed] #675 ext-table: node.render(false) puts first node at end
# 2.20.0 / 2016-11-13
* [Added] #419 `modifyChild` event. This event is also a good place to
implement auto sorting (#559)
* [Added] #419 node.triggerModifyChild() and node.triggerModify()
* [Added] #595 add custom node filter to `generateFormElements()`
* [Added] #610 `tree.tooltip` option allows automatic or custom tooltips
* [Added] #620 improved tooltip escaping to allow newlines
* [DEPRECATED] `removeNode` event. Listen for `modifyChild` with operation
'remove' instead (which is fired on the parent)
* [Improved] ThemeRoller theme
* [Improved] ext-filter
- #297 add filter option 'hideExpanders' to remove expanders if all child
nodes are hidden by filter
- Filter options and the `opts` argument of `filterNodes()` / `filterBranches()`
have been unified
- [Fixed] #230 themeroller theme compatible with ext-filter
- [Fixed] #528 autoCollapse option blocks filter's autoExpand option
- [Fixed] #529 Filter: Mark matching nodes even if parent was matched in branch mode
- [Fixed] #643 Exceptions in ext-filter if expression contains special chars
- [Fixed] #658 ext-filter does not work with ext-edit `editCreateNode()`
* [Improved] #656 WAI-ARIA support
- Set focus to first node on first tab-in
- Support [home] and [end] keys
- Set aria-activedescendant on container to active ID
- Set aria-multiselectable on container if selectMode != 1
- Set aria-treeitem, -selected, -expanded, on title span instead `<li>`
* [Fixed] #576 `loadKeyPath()` sometimes gets the root wrong
* [Fixed] #615 Drag & drop helper icons lose indentation with table extension
* [Fixed] #632 Tabbing is not working if there is an anchor tag in treeview
* [Fixed] #644 New nodes created with ext-edit, are hidden in filtered trees
* [Fixed] #647 ext-table: tree.render(true) does not discard existing markup
* [Fixed] #659 handling of function keys, when quicksearch is on
* Use QUnit 2.0
# 2.19.0 / 2016-08-11
* [Added] #607 tree.enableUpdate() to temporarily disable rendering to improve
performance on bulk updates
* [Added] modifier class `.fancytree-connectors` to be set on container<br>
Note: Experimental! Not required for skin-xp and not compatible with ext-table
* [Added] #623 ext-edit: `data.originalEvent` is now passed to `beforeClose`
* [Fixed] #604 Set `source` option does not update tree
* [Fixed] #609 node.load(true); doesn't maintain expanded
* [Fixed] #621 Cannot focus embedded input controls
* [Improved] #611 Keyboard navigation honors autoScroll option
* Extensions inherit main version number
# 2.18.0 / 2016-05-02
* [Added] #586 node.discardMarkup() (useful in the `collapsed` event)
* [Added] #171 new option `.escapeTitles`
* [Added] new callback `.enhanceTitle()`
* [Fixed] #515 Html tags included in filter results
* [Fixed] #593 ext-dnd revert position fails for tables
# 2.17.0 / 2016-04-11
* [Added] `node.addClass()`, `.removeClass()`, and `.toggleClass()`
* [Added] ext-filter: matcher-callback for `tree.filterNodes()` may now return
`"branch"` and `"skip"`
* [Added] ext-filter: new option`nodata` allows to configure a status node for
empty results
* [Added] `digits` argument to `node.getIndexHier(separator, digits)`
* [Added] tree option `.tabindex`, default is "0". Pass "" to resolve #577
* [DEPRECATED] tree option `.tabbable`. Use `.tabindex` instead
* [Added] New option `mode='firstChild'` for `node.moveTo()`
* [Added] New option `digits=<int>` for `node.getIndexHier()`
* [Fixed] ext-filter: branch mode honors `autoExpand: true`
* [Fixed] #584: aria-labelledby ids not unique
* Update to jQuery UI 1.11.4
# 2.16.1 / 2016-03-18
* [Added] ext-glyph: new icon for 'nodata' status nodes
* [Fixed] #575 missing loading icon in non-bootstrap themes.<br>
Glyph themes now display status images in icon span (was expander span before)
# 2.16.0 / 2016-03-16
* [Added] ext-clones: new method node.setRefKey(refKey)
* [Added] modifier class `.fancytree-fade-expander` to be set on container
* [Added] ext-dnd: `.dragExpand()` callback to prevent auto-expand
* [Improved] load error reporting
* [Improved] bootstrap theme icons and style (samples use bootstrap 3.3)
* [Improved] status nodes don't have icons
* [Improved] pass data argument to `source` callback
* [Improved] Handle exceptions inside `postProcess`
* [Improved] #568 ext-dnd: Auto-expanding of collapsed nodes should also work
when dropping is not allowed
* [Improved] #567 ext-dnd: fix revert position
* [Improved] #565 ext-dnd: fix intermediate display of wrong icon (sending 'over' after 'enter')
* [Fixed] #569 node.navigate does not return a Promise object
* [Fixed] #563 `tree.reactivate(false)` sets fancytree-treefocus and `tree.reactivate(true)`
doesn't set keyboard focus
* [Fixed] #562 Node span tag leaks outside table cell
* [Fixed] #526 tree.setFocus() does not set keyboard focus
* Updated to jQuery 1.12.1
* Updated grunt devDependencies
* Add jQuery 3.0 beta to test suite
* Added LICENSE.txt to dist
# 2.15.0 / 2016-01-11
* [Changed] Renamed class `fancytree-statusnode-wait` to `fancytree-statusnode-loading`
* [Added] new event `renderStatusColumns`
* [DEPRECATED] ext-table option `customStatus`. Use `renderStatusColumns` instead
* [Added] new event `clickPaging`
* [Added] new mode `nodata` for use with node.setStatus()
* [Added] new method `node.addPagingNode()`
* [Added] new method `node.replaceWith()`
* [Added] new type 'paging' for `node.statusNodeType`
* [Added] #542 new method `node.getSelectedNodes()`
* [Added] Helper class `glyphicon-spin` to allow rotating loading icon with bootstrap
* [Improved] #356: serialize load requests
* [Improved] #538: Be more robust if site css defines custom li:before
* [Improved] ext-table: Define table row templates in `<tbody>`
* [Improved] ext-table: `<thead>` is now optional if `<tbody>` contains `<td>`s
# 2.14.0 / 2015-12-19
* [CHANGED] #519 Refactored custom icon configuration:<br>
(see also the [theming tutorial](https://github.com/mar10/fancytree/wiki/TutorialTheming))
* [Added] `options.icon` option/callback.<br>
Valid values are true, false, a string containing a class name or image
url, or a callback returning that.
* [Changed] `node.icon` option. Valid values are true, false, or a string
containing a class name or image url.<br>
This option existed before, but was stored in the `node.data.icon` namespace,
and did not accept class names.
* [DEPRECATED] `options.iconClass` callback: use `options.icon` instead
* [DEPRECATED] `options.icons`: use `options.icon` instead
* [DEPRECATED] `node.data.iconclass` option: use `node.icon` instead
* [DEPRECATED] `node.data.icon` option: use `node.icon` instead
* [Added] `tree.clear()` method.
* [Added] #520 ext-persist: new event `beforeRestore`
* [Fixed] #533 table-ext: nodeSetExpanded triggers redundant events
# 2.13.0 / 2015-11-16
* [Changed] If a node is initalized as `lazy: true`, and `children: []`,
treat it as 'loaded leaf node'.<br>
This is consistent with a lazy node that has no children property at all (i.e.
`undefined`). This would issue a lazyLoad event and a resopnse of `[]` would
mark the node as leaf node.
* [Added] new function $.ui.fancytree.getTree()
* [Added] ext-filter methods node.isMatched() and tree.isFilterActive()
* [Added] CSS for ext-childcounter badges is now part of the standard themes
* [Added] ext-childcounter method node.updateCounter()`
* [Fixed] #507 data-hideCheckbox="true"
* [Fixed] #513 activeVisible option does not work on init
* [Fixed] #516 ExtPersist requires cookie.js even when not using cookies
# 2.12.0 / 2015-09-10
* [Changed] Documented `iconClass` callback and changed signature from
`iconClass(node)` to `iconClass(event, data)`
* [Added] ext-dnd events `initHelper` and `updateHelper`
* [Added] ext-dnd option `smartRevert`
* [Added] #146 sample for multi-node drag'n'drop
* [Added] Sample for modifier keys to control copy/move behavior while dragging
* [Added] `highlight` and `fuzzy` options to ext-filter
* [Added] `fireActivate` option to ext-persist (default: true)
* [Added] #496 new methods tree.findFirst() / .findAll()
* [Improved] clearFilter() performance #491
* [Improved] dnd registers global handlers to cancel on ESC and mousedown
* [Fixed] #475 Font color while editing node title with bootstrap skin
* [Fixed] #484 Glyph plugin: Missing margin-left for span.fancytree-custom-icon
* [Fixed] #486 node.render(true) moves the node to the end of the list
* [Fixed] #489 `focusOnClick` option is ignored for tables if 'dnd' is listed after 'table' extension
* [Fixed] #495 Double clicking on expander with lazy-load causes assertion error
# 2.11.0 / 2015-07-26
* [Changed] Adding `fancytree-plain` class to container (if not table), allowing for more efficient css
* [Changed] #434: Use data-uris to inline loading.gif image
* [Changed] #460: Use padding-left instead of margin-left for table indent
* [Changed] #465: Add `node` argument to the `toDict()` callback
* [Improved] Nicer bootstrap theme and added table to the example
* [Improved] #464: ext-dnd supports ext-glyph
* [Improved] #466: Add counter badges to ext-filter
* [Fixed] Win8 theme jumpy hover effects
* [Fixed] #411: ext-edit fails with ext-table, when edit was cancelled
* [Fixed] #463: ext-table: render(deep) does not work
* [Fixed] #470: Wide plugin not present in jquery.fancytree-all.min.js
# 2.10.2 / 2015-07-02
* [Fixed] Add `dist/skin-custom-1` sample (again)
* [Fixed] #459 Don't collapse root folder when last node is removed
# 2.10.1 / 2015-06-27
* [Changed] Undo #340: Revert dist folder layout to v2.9.0, but add
dist/skin-common.less
# 2.10.0 / 2015-06-26 [YANKED]
* [Changed] #340: New dist folder layout: moved skin-* folders into src/ folder
(**Note:** this change was reverted in v2.10.1)
* [Improved] Update to jQuery UI 1.11.4, jQuery 1.11.3
* [Improved] #340: add `dist/skin-common.less` to fix theme imports
* [Improved] #443 Support js-cookie (still compatible with jquery-cookie)
* [Fixed] #415 selected and unselectable shows unchecked checkbox
* [Fixed] #427 table + themeroller: apply color to TR
* [Fixed] #442 filterBranches shall use opts to allow autoExpand
* [Fixed] #445 enter key not handled correctly
* [Fixed] #449 After deleting last child, parent node remains expanded
* [Fixed] #452 destroy not removing nodes with ext-table
* [Fixed] #457 Autoscroll fails with lazyloading returning empty list
# 2.9.0 / 2015-04-19
* [Changed] ext-filter: `tree.filterNodes(filter, opts)` now accept an `opts`
object instead of `leavesOnly`
* [Improved] #417 only raise exception about data being a string if dataType is "json"
* [Added] #394 New option `autoExpand` for [ext-filter]
* [Fixed] #402, #405 rare exception in dnd events
* [Fixed] #420 nodeSetActive not returning promise
* [Fixed] #270 Keyboard focus not working when using dnd extension
# 2.8.1 / 2015-03-01
* [Improved] generateFormElements() new argument `opts`, default: `{stopOnParents: true}`
* [Fixed] #393 ext-table: checkboxColumnIdx not working
* [Fixed] #397 ext-edit: Creating sub category fails
* [Fixed] #403 generateFormElements() doesn't work with string args
# 2.8.0 / 2015-02-08
* [Changed] Deprecated ext-menu (was never officially supported, see http://localhost:8080/demo/index.html#sample-ext-menu.html)
* [Improved] Bluring the widget will now blur the focused node too.
* [Improved] Persistence will only set node focus if widget had focus (otherwise only activate the node).
* [Improved] Set default focus on first keypress to active node (first node otherwise)
* [Improved] #383 Accept [ECMAScript 6 Promise](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise) as source
* [Added] `_superApply()` for hook handlers.
* [Added] eventToString() supports mouse events
* [Fixed] persistence for focus (when using non-cookie storage)
* [Fixed] #391 Exception on autoscrolling filtered trees
# 2.7.0 / 2014-12-21
* [CHANGED] Dropped `fx` option. Use `toggleEffect` instead.
* [CHANGED] 'win8' and 'bootstrap' skins where modified to highlight the
title span instead of the node span, in order to be compatible with
[ext-wide]. The original skins are available as 'skin-win8-n' and
'skin-bootstrap-n' respectively.
* [Added] ext-wide extension (experimental)
* [Added] LESS files to distribution
* [Added] Publish on [cdnjs](https://cdnjs.com/libraries/jquery.fancytree)
* [Improved] tree.reactivate() returns a promise
* [Fixed] #246 Gaps when filtering in hide mode (patch by @lefunque)
* [Fixed] #287 wrong image on hovers
* [Fixed] #368 Standard browser behavior prevented (e.g. zoom with Ctrl+'+'/'-')
* [Fixed] #369 Suppress warning, when dropping top- on top-node
# 2.6.0 / 2014-11-29
* [Added] Option `focusOnSelect` to set focus when node is checked by a mouse
click (default: false)
* [Added] `restore` event, sent after ext-persist has restored the tree state
* [Improved] #359 Better navigation performance when skipping hidden nodes
* Publish on npm Registry
# 2.5.0 / 2014-11-23
* [CHANGED] [ext-persist] overrideSource option now defaults to true
* [Added] [ext-filter] Option `autoApply` re-applies filter on lazy loading
(on by default)
* [Added] quicksearch: navigate to next node by typing the first letters
* [Improved] [ext-dnd] Make draggable helper and parent configurable
* [Improved] #153 Add class `fancytree-unselectable` to respective nodes and
dimm unselectable checkboxes
* [Improved] Update to jQuery 1.1.11, jQuery UI 1.11.2
* [Improved] New mode 'firstChild' for node.addNode()
* [Fixed] #324 Fix problem where minExpandLevel was not expanding root node
* [Fixed] #300 dnd.focusOnClick for jQuery UI 1.11
* [Fixed] #354 [ext-persist] with selectMode 3
# 2.4.1 / 2014-09-23
* [Fixed] Regression #323
# 2.4.0 / 2014-09-21
* [CHANGED] Renamed dist/jquery.fancytree-custom.min.js to jquery.fancytree-all.min.js
* [CHANGED] ext-edit callbacks no longer pass `data.value` (use `data.input.val()` instead).
* [Added] CDN support (http://www.jsdelivr.com/#!jquery.fancytree)
* [Added] New method `node.visitAndLoad()`
* [Added] New method `node.editCreateNode()` (ext-edit)
* [Added] New method `node.isRootNode()`
* [Added] New method `node.isTopLevel()`
* [Added] New option `id` to override default tree id
* [Added] New argument `stopOnParents` for tree.generateFormElements()
* [Improved] #294 node.load() should resolve 'ok', if node is already loaded
* [Improved] #293 minExpandLevel does not auto-expand
* [Improved] #313 Allow HTML in tooltips
* [Fixed] crash in scrollIntoView() when parent is `window`
* [Fixed] #305 Checkbox doesn't show with Glyph + Table
* [Fixed] #316 Fix hasChildren() when children = []
* [Fixed] #237 ajax LoadError not updated in StatusNode with Table ext
* [Fixed] #295 loadKeyPath with multiple paths
* [DEPRECATED] node.isRoot(). Use node.isRootNode() instead
# 2.3.0 / 2014-08-17
* [CHANGED] renamed (undocumented) event 'loaderror' to 'loadError'
* [Added] postProcess now allows to signal error conditions (so it becomes easy to handle custom ajax response formats)
* [Added] node.setStatus()
* [Added] ext-clones to the standard distribution.
* [Improved] loadError allows to return `false` to prevent default handling
* [Fixed] #258 Fix moveTo when moving a node to same parent
* [Fixed] #257 Glyph expander sometimes disappears
# 2.2.0 / 2014-06-28
* [Added] Option dnd.focusOnClick sets focus to tree widget, even when dragging
is enabled
* [Added] node.info()
* [Improved] #245 tree.generateInput() now returns data using PHPs array
convention, i.e. by appending brackets to the name: 'ft_1[]'.
* [Fixed] #250: Children lazy empty nodes remain checked when parent is
unchecked with hierarchical multi-selection
* [Fixed] #272 Navigation in filtered trees
# 2.1.0 / 2014-05-29
* [Added] #210: [ext-persist] optionally store information in sessionStorage or localStorage
* [Added] #64 [ext-filter] filterBranches() will restrict display to sub-trees
* [Added] New options 'scrollParent' and 'scrollOfs' are evaluated by node.scrollIntoView()
(which is also called on expand). This allows autoScroll to work with
[ext-table]: set scrollParent to `window` or a wrapper DIV with overflow: auto
* [Added] [ext-wide] use 100% wide selection bar (experimental)
* [Added] $.ui.fancytree.debounce()
* [Improved] [ext-columnview] css
* [Improved] skin-win8 now includes the loading.gif as inline CSS for faster response
* [Improved] Add 'fancytree-icon' class to icon IMG
* [Improved] css v-align for checkboxes and icons
* [Fixed] #217: persistence when node keys are numeric
* [Fixed] #228: html in node title prevents click
* [Fixed] #235: D'n'd helper is displaced, when window is scrolled
* [Fixed] #241: fromDict() does not update node title
* [Fixed] relative custom imagePath option
* [DEPRECATED] [ext-filter] Use filterNodes() instead of applyFilter()
* [DEPRECATED] [ext-filter] 'leavesOnly' option removed (see filterNodes())
# 2.0.0 / 2014-05-01
* [Added] [ext-clones] #213 New method Fancytree.changeRefKey()
# 2.0.0-12 / 2014-04-29
* [Added] /dist/src folder contains uncompressed extensions for bower
* [Improved] cleanup
# 2.0.0-11 / 2014-04-27
* [Added] /dist/jquery.fancytree-custom.min.js with AMD support
* [Added] #56: Allow to set special node.attributes from data-...
* [Added] #191: Allow to set additional tree.data attributes from <ul data-...>
* [Added] [ext-childcounter] #202: Allow lazy children count
* [Improved] #192: Removed 'height: 100%' for container (was introduced to fix
an IE 9 bug, that now should be solved by 'min-height: 0%')
* [Improved] [ext-table] #93 renderColumns called for status nodes
(added 'customStatus' option)
* [Improved] [ext-dnd] #196 Make draggable/droppable options configurable
* [Fixed] [ext-glyph] #194 Render noExpander icon from icon map for leaf nodes
* [Fixed] #197: Allow special characters in tooltips
* [Fixed] #68: renderStatus method doesn't render 'loading' status
* [Fixed] #201: originalEvent not passed along to activate callback
* [Fixed] [ext-glyph] compatible with ext-table
# 2.0.0-10 / 2014-04-13
* [Added] New method node.appendSibling()
* [Improved] setExpanded resolves promise *after* scrollIntoView
* [Improved] Allow to return false in lazyLoad for manual loading.
* [Improved] [ext-table] trigger expand event *after* anPimations
* [Improved] [ext-gridnav] skips empty and merged cells
* [Improved] grunt build no longer depends on tabfix.py
* [Fixed] selectMode: 1 + "selected": true looks buggy
# 2.0.0-9 / 2014-04-02
* [Added] New helper method $.ui.fancytree.escapeHtml().
* [Added] [ext-clones] new method node.reRegister(key, refKey)
* [Added] Support for bower.
* [Added] dist/ folder to repository
* [Improved] [ext-edit] handles `<`, `>`, ...
* [Improved] [ext-table] node.render(force) trigger renderColumns event
* [Fixed] [ext-table] #178 children are not displayed when filtering
# 2.0.0-8 / 2014-04-01
* [FEATURE] #18: load lazy nodes, if initialized as 'expanded'.
* [FEATURE] #162: Optional parameter `noEvents` for node.setActive() and .setExpanded().
* [CHANGE] Prefixed all Less variables with '@fancy-' and introduced '@fancy-image-dir'.
* [CHANGE] 'loadChildren' event is now also triggered for initial tree load (before it was only triggered for lazy child nodes)
* [BUGFIX] #117: line height too large when using doctype xhtml
* [BUGFIX] #115: Fixed error when trying to drag table headers
* [BUGFIX] #163: lazy load throws error if autoscroll: true and result is empty
* [FEATURE] [ext-clones] (experimental) new extension that introduces
`node.refKey`, which may occur multiple times in one tree (as opposed to `key`,
which must be unique).
New methods `node.isClone()`, `node.getCloneList()` and `tree.getNodesByRef()`.
Optionally, clones are tagged wit the `fancytree-clone` class.
* [FEATURE] New option 'defaultKey'. This calback allows to generate keys while loading.
* build process creates /dist folder
* "bower install fancytree" delivers dist folder
# 2.0.0-7 / 2014-03-09
* [BREAKING CHANGE] node.isStatusNode() is now a function (was a property before).
Added new property `node.statusNodeType`.
* [BREAKING CHANGE] Renamed ext-awesome to ext-glyph
* [DEPRECATION] Deprecated event `lazyload`, use `lazyLoad` (upper case L) instead.
* [DEPRECATION] Deprecated methods node.lazyLoad() and node.discard(). use load() and resetLazy() instead.
* [FEATURE] Added node.isUndefined(), isLoaded(), resetLazy(), load(), resetLazy()
* [FEATURE] [ext-persist] Added option `expandLazy` for recursive loading (still experimental).
* [FEATURE] [ext-filter] 'mode: hide' now works with ext-table (still experimental).
* [FEATURE] node.makeVisible() accepts options, scrolls into view, and returns a promise.
* [FEATURE] Sample xxl and bootstrap themes.
* [CHANGE] nodeRenderStatus() is now implicitly called by nodeRenderTitle().<br>
This also means that now all markup and css classes are finshed, when `renderNode`
is fired.
* [CHANGE] Calling setExpanded() on a leaf node fires .done() (not .fail())
* [CHANGE] Removing the last child node collapses the parent; lazy nodes become empty (not undefined).
# 2.0.0-6 / 2014-02-08
* [BREAKING CHANGE] Removed 'name' argument from `$.ui.fancytree.registerExtension()`
(now the extension object requires a 'name' property)
* [DEPRECATION] Deprecated startEdit/endEdit to use editStart/editEnd
* [FEATURE] New method `tree._requireExtension()`
* [FEATURE] Fixed d'n'd for ext-table
* [FEATURE] New option `titlesTabbable`
* [FEATURE] New argument `opts` for setExpanded() and setActive()
* [BUGFIX] ext-edit: fixed loosing focus and made chainable
* [BUGFIX] ext-filter: fixed navigation for hidden nodes
* Added browser test matrix (saucelabs)
# 2.0.0-5 / 2013-12-23
* [BREAKING CHANGE] Refactored drag'n'drop extension.
For example `dnd.onDrop(node)` --> `dnd.dragDrop(node, data)`.
See [[TutorialExtDnd]]
* [BREAKING CHANGE] Renamed `rencercolumns` event to `renderColumns`
* [BREAKING CHANGE] Renamed `fancytree-focused` class to `fancytree-treefocus` (container only)
* [FEATURE] Experimental `ext-gridnav` implents key navigation for tables.
Refactored keyboard handling. Keydown handlers are now bound to the container instead of document
(Co-work with Koloto)
* [FEATURE] Allow to return 'preventNav' in keydown event to prevent withput blocking keys in embedded input controls.
* [FEATURE] New method `node.navigate()` to support custom keyboard handlers
* [FEATURE] Refactored CSS style to use a common LESS template
* [FEATURE] Improvement of lazy load errors handling (Koloto, issue #87)
* [FEATURE] Allow to pass metadata with `source` on initialization
* [FEATURE] The edit extension is now beta
* [BUGFIX] Fixed BACKSPACE on top-level nodes
* [BUGFIX] Fixed #71, #75, #90, #104, #105
* Improved table render speed by 15%
* `grunt dev` combines `grunt server` + `grunt watch` (trigger jshint and
less on save)
# 2.0.0-4 / 2013-10-14
* Misc. fixes
# 2.0.0-3
* [BREAKING CHANGE] Changed extension syntax
* [FEATURE] Edit extension (alpha)
# 2.0.0-2 / 2013-09-15
* [BREAKING CHANGE] Renamed `onCustomRender` to `renderTitle`.
`renderTitle`, `renderNode` and `createNode` events are only triggered as options callback (not DOM events), for performance reasons.
* [BREAKING CHANGE] Renamed `data.orgEvent` to `data.originalEvent`
* [BREAKING CHANGE] Renamed events to camelCase as suggested by the jQuery style guide (`rendernnode` -> `renderNode`, ...)
* See also [[WhatsNew]] since Dynatree 1.x in general.
# 1.x
* See [Dynatree](https://code.google.com/p/dynatree/)
###
Build scripts for Fancytree
###
# jshint directives for the generated JS:
###jshint node: true, unused: false ###
"use strict"
module.exports = (grunt) ->
grunt.initConfig
pkg:
grunt.file.readJSON("package.json")
# Project metadata, used by the <banner> directive.
meta:
# banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
banner: "/*! <%= pkg.title || pkg.name %> - @VERSION - @DATE\n" +
# "<%= grunt.template.today('yyyy-mm-dd HH:mm') %>\n" +
"<%= pkg.homepage ? ' * ' + pkg.homepage + '\\n' : '' %>" +
" * Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" +
" Licensed <%= _.map(pkg.licenses, 'type').join(', ') %> */\n"
clean:
build:
src: [ "build" ]
dist:
src: [ "dist" ]
extMin:
src: [ "build/jquery.fancytree.*.min.js" ]
# compress:
# dist:
# options:
# archive: "archive/<%= pkg.name %>-<%= pkg.version %>.zip"
# files: [
# {expand: true, cwd: "dist/", src: ["**/*"], dest: ""}
# ]
concat:
core:
options:
stripBanners: true
src: ["<banner:meta.banner>"
# "lib/intro.js"
"src/<%= pkg.name %>.js"
# "lib/outro.js"
]
dest: "build/<%= pkg.name %>.js"
all:
options:
stripBanners: true
src: [
"<%= meta.banner %>"
# "lib/intro.js"
"src/jquery.fancytree.js"
# "build/jquery.fancytree.ariagrid.js"
"src/jquery.fancytree.childcounter.js"
"src/jquery.fancytree.clones.js"
# "src/jquery.fancytree.columnview.js"
"src/jquery.fancytree.dnd.js"
"src/jquery.fancytree.dnd5.js"
"src/jquery.fancytree.edit.js"
"src/jquery.fancytree.filter.js"
# "src/jquery.fancytree.fixed.js"
"src/jquery.fancytree.glyph.js"
"src/jquery.fancytree.gridnav.js"
# "src/jquery.fancytree.menu.js"
"src/jquery.fancytree.persist.js"
"src/jquery.fancytree.table.js"
"src/jquery.fancytree.themeroller.js"
"src/jquery.fancytree.wide.js"
# "lib/outro.js"
]
dest: "build/<%= pkg.name %>-all.js"
custom:
options:
banner: "<%= meta.banner %>"
stripBanners: true
process: (src, fspec) ->
# Remove all comments, including /*! ... */
src = src.replace(/\/\*(.|\n)*\*\//g, "")
if /fancytree..+.min.js/.test(fspec)
# If it is an extension:
# Prepend a one-liner instead
fspec = fspec.substr(6) # strip 'build/'
src = "\n/*! Extension '" + fspec + "' */" + src
return src
src: [
"lib/intro.js"
"build/jquery.fancytree.min.js"
# "build/jquery.fancytree.ariagrid.min.js"
"build/jquery.fancytree.childcounter.min.js"
"build/jquery.fancytree.clones.min.js"
# "build/jquery.fancytree.columnview.min.js"
"build/jquery.fancytree.dnd.min.js"
"build/jquery.fancytree.dnd5.min.js"
"build/jquery.fancytree.edit.min.js"
"build/jquery.fancytree.filter.min.js"
# "build/jquery.fancytree.fixed.min.js"
"build/jquery.fancytree.glyph.min.js"
"build/jquery.fancytree.gridnav.min.js"
# "build/jquery.fancytree.menu.min.js"
"build/jquery.fancytree.persist.min.js"
"build/jquery.fancytree.table.min.js"
"build/jquery.fancytree.themeroller.min.js"
"build/jquery.fancytree.wide.min.js"
"lib/outro.js"
]
dest: "build/<%= pkg.name %>-all.min.js"
"all-deps":
options:
banner: "<%= meta.banner %>"
stripBanners: true
process: (src, fspec) ->
# Remove all comments, including /*! ... */
# (but keep disclaimer for jQuery-UI)
if not /jquery-ui..+.min.js/.test(fspec)
src = src.replace(/\/\*(.|\n)*\*\//g, "")
if /jquery.fancytree.min.js/.test(fspec)
src = "\n/*! Fancytree Core */" + src
if /fancytree..+.min.js/.test(fspec)
# If it is an extension:
# Prepend a one-liner instead
fspec = fspec.substr(6) # strip 'build/'
src = "\n/*! Extension '" + fspec + "' */" + src
return src
src: [
"lib/intro.js"
"src/jquery-ui-dependencies/jquery-ui.min.js"
# "build/jquery.fancytree.ariagrid.min.js"
"build/jquery.fancytree.min.js"
"build/jquery.fancytree.childcounter.min.js"
"build/jquery.fancytree.clones.min.js"
# "build/jquery.fancytree.dnd.min.js"
"build/jquery.fancytree.dnd5.min.js"
"build/jquery.fancytree.edit.min.js"
"build/jquery.fancytree.filter.min.js"
# "build/jquery.fancytree.fixed.min.js"
"build/jquery.fancytree.glyph.min.js"
"build/jquery.fancytree.gridnav.min.js"
"build/jquery.fancytree.persist.min.js"
"build/jquery.fancytree.table.min.js"
# "build/jquery.fancytree.themeroller.min.js"
"build/jquery.fancytree.wide.min.js"
"lib/outro.js"
]
dest: "build/<%= pkg.name %>-all-deps.min.js"
connect:
forever:
options:
port: 8080
base: "./"
keepalive: true
dev: # pass on, so subsequent tasks (like watch) can start
options:
port: 8080
base: "./"
keepalive: false
sauce:
options:
hostname: "localhost"
port: 9999
base: ""
keepalive: false
copy:
build: # copy production files to build folder
files: [{
expand: true # required for cwd
cwd: "src/"
src: [
"skin-**/*.{css,gif,md,png,less}"
"skin-common.less"
"*.txt"
]
dest: "build/"
}, {
expand: true
cwd: "src/"
src: [
"jquery.*.js"
]
# src: [
# "skin-**/*.{css,gif,png,less,md}"
# "*.txt"
# "jquery.*.js"
# "skin-common.less"
# ]
dest: "build/src/"
}, {
# src: ["*.txt", "*.md"]
src: ["LICENSE.txt"]
dest: "build/"
}]
dist: # copy build folder to dist
files: [{expand: true, cwd: "build/", src: ["**"], dest: "dist/"}]
cssmin:
options:
report: "min"
build:
expand: true
cwd: "build/"
src: ["**/*.fancytree.css", "!*.min.css"]
dest: "build/"
ext: ".fancytree.min.css"
devUpdate:
main:
options:
reportUpdated: true
updateType: 'prompt' # 'report'
docco:
docs:
src: ["src/jquery.fancytree.childcounter.js"]
options:
output: "doc/annotated-src"
eslint:
# options:
# # See https://github.com/sindresorhus/grunt-eslint/issues/119
# quiet: true
# We have to explicitly declare "src" property otherwise "newer"
# task wouldn't work properly :/
dist:
src: "dist/jquery.js"
dev:
# src: [ "src/**/*.js", "test/**/*.js", "build/**/*.js" ]
src: [ "src/jquery.fancytree.ariagrid.js" ]
exec:
tabfix:
# Cleanup whitespace according to http://contribute.jquery.org/style-guide/js/
# (requires https://github.com/mar10/tabfix)
# cmd: "tabfix -t --line=UNIX -r -m*.js,*.css,*.html,*.json -inode_modules src demo test"
cmd: "tabfix -t -r -m*.js,*.css,*.html,*.json -inode_modules src demo test"
upload:
# FTP upload the demo files (requires https://github.com/mar10/pyftpsync)
cmd: "pyftpsync --progress upload . ftp://www.wwwendt.de/tech/fancytree --delete-unmatched --omit build,node_modules,.*,_*"
# cmd: "pyftpsync --progress upload . ftp://www.wwwendt.de/tech/fancytree --omit build,node_modules,.*,_* -x"
upload_force:
# FTP upload the demo files (requires https://github.com/mar10/pyftpsync)
cmd: "pyftpsync --progress upload . ftp://www.wwwendt.de/tech/fancytree --delete-unmatched --omit build,node_modules,.*,_* --resolve=local --force"
# htmllint:
# all: ["demo/**/*.html", "doc/**/*.html", "test/**/*.html"]
# jsdoc:
# build:
# src: ["src/*.js", "doc/README.md", "doc/jsdoctest.js"]
# options:
# destination: "doc/jsdoc_new"
# # template: "bin/jsdoc3-moogle",
# # template: "node_modules/ink-docstrap/template",
# template: "../docstrap/template",
# configure: "doc/jsdoc.conf.json"
# verbose: true
jshint:
options:
# Linting according to http://contribute.jquery.org/style-guide/js/
jshintrc: ".jshintrc"
beforeConcat: [
# "Gruntfile.js"
"src/*.js"
"3rd-party/**/jquery.fancytree.*.js"
"test/unit/*.js"
"demo/**/*.js"
]
afterConcat: [
"<%= concat.core.dest %>"
"<%= concat.all.dest %>"
]
less:
development:
options:
# paths: ["src/"]
# report: "min"
compress: false
yuicompress: false
# optimization: 10
files: [
{expand: true, cwd: "src/", src: "**/ui.fancytree.less", dest: "src/", ext: ".fancytree.css"}
]
qunit:
build: [
"test/unit/test-core-build.html"
]
develop: [
"test/unit/test-core.html"
"test/unit/test-ext-filter.html"
"test/unit/test-ext-table.html"
"test/unit/test-ext-misc.html"
]
replace: # grunt-text-replace
production:
src: ["build/**/*.js"]
overwrite : true
replacements: [ {
from : /@DATE/g
# https://github.com/felixge/node-dateformat
to : "<%= grunt.template.today('isoUtcDateTime') %>"
},{
from : /buildType:\s*\"[a-zA-Z]+\"/g
to : "buildType: \"production\""
},{
from : /debugLevel:\s*[0-9]/g
to : "debugLevel: 1"
} ]
release:
src: ["dist/**/*.js"]
overwrite : true
replacements: [ {
from : /@VERSION/g
to : "<%= pkg.version %>"
} ]
"saucelabs-qunit":
ui_109:
options:
testname: "Fancytree qunit tests (jQuery 1.9, jQuery UI 1.9)"
urls: ["http://localhost:9999/test/unit/test-jQuery19-ui19.html"]
build: process.env.TRAVIS_JOB_ID
throttled: 5
recordVideo: false
videoUploadOnPass: false
# jQuery 1.9 dropped supports IE 6..?
# jQuery UI 1.9 supports IE 6+ and ?
browsers: [
{ browserName: "internet explorer", version: "6", platform: "Windows XP" }
]
ui_110:
options:
testname: "Fancytree qunit tests (jQuery 1.10, jQuery UI 1.10)"
urls: ["http://localhost:9999/test/unit/test-jQuery110-ui110.html"]
build: process.env.TRAVIS_JOB_ID
throttled: 5
recordVideo: false
videoUploadOnPass: false
# jQuery 1.10 dropped support for IE 6
# jQuery UI 1.10 supports IE 7+ and ?
browsers: [
{ browserName: "internet explorer", version: "7", platform: "Windows XP" }
{ browserName: "internet explorer", version: "8", platform: "Windows 7" }
]
ui_111:
options:
testname: "Fancytree qunit tests (jQuery 1.11, jQuery UI 1.11)"
urls: ["http://localhost:9999/test/unit/test-jQuery111-ui111.html"]
build: process.env.TRAVIS_JOB_ID
throttled: 5
recordVideo: false
videoUploadOnPass: false
# jQuery 1.11 supports IE + and latest Chrome/Edge/Firefox/Safari (-1)
# jQuery UI 1.11 supports IE 7+ and ?
browsers: [
{ browserName: "internet explorer", version: "9", platform: "Windows 7" }
{ browserName: "internet explorer", version: "10", platform: "Windows 8" }
{ browserName: "safari", version: "7", platform: "OS X 10.9" }
{ browserName: "safari", version: "8", platform: "OS X 10.10" }
]
ui_112:
options:
testname: "Fancytree qunit tests (jQuery 3, jQuery UI 1.12)"
urls: ["http://localhost:9999/test/unit/test-core.html"]
build: process.env.TRAVIS_JOB_ID
throttled: 5
recordVideo: false
videoUploadOnPass: false
# jQuery 3 supports IE 9+ and latest Chrome/Edge/Firefox/Safari (-1)
# jQuery UI 1.12 supports IE 11 and latest Chrome/Edge/Firefox/Safari (-1)
browsers: [
{ browserName: "chrome", platform: "Windows 8.1" }
{ browserName: "firefox", platform: "Windows 8.1" }
{ browserName: "firefox", platform: "Linux" }
{ browserName: "internet explorer", version: "11", platform: "Windows 8.1" }
{ browserName: "microsoftedge", platform: "Windows 10" }
{ browserName: "safari", version: "9", platform: "OS X 10.11" }
{ browserName: "safari", version: "10", platform: "OS X 10.12" }
]
uglify:
# build:
# options:
# banner: "<%= meta.banner %>"
# # preserveComments: "some"
# report: "min"
# sourceMap:
# (path) -> path.replace(/.js/, ".js.map")
# sourceMappingURL:
# (path) -> path.replace(/^build\//, "") + ".map"
# sourceMapPrefix: 1 # strip 'build/' from paths
# files:
# "build/<%= pkg.name %>.min.js": ["<%= concat.core.dest %>"],
# "build/<%= pkg.name %>-all.min.js": ["<%= concat.all.dest %>"]
custom:
options: # see https://github.com/gruntjs/grunt-contrib-uglify/issues/366
report: "min"
# preserveComments: "some"
preserveComments: /(?:^!|@(?:license|preserve|cc_on))/
files: [
{
src: ["**/jquery.fancytree*.js", "!*.min.js"]
cwd: "src/"
dest: "build/"
expand: true
rename: (dest, src) ->
folder = src.substring(0, src.lastIndexOf("/"))
filename = src.substring(src.lastIndexOf("/"), src.length)
filename = filename.substring(0, filename.lastIndexOf("."))
return dest + folder + filename + ".min.js"
}
]
# map_all:
# options:
# compress: false
# mangle: false
# sourceMap: true
# preserveComments: 'all'
# files: [
# {
# src: 'build/jquery.fancytree-all.min.js'
# dest: 'build/jquery.fancytree-all.min.js.map'
# }
# ]
watch:
less:
files: "src/**/*.less"
tasks: ["less:development"]
jshint:
options:
atBegin: true
files: ["src/*.js", "test/unit/*.js", "demo/**/*.js"]
tasks: ["jshint:beforeConcat", "eslint:dev"]
yabs:
release:
common: # defaults for all tools
manifests: ['package.json', 'bower.json']
# The following tools are run in order:
run_test: { tasks: ['test'] }
check: { branch: ['master'], canPush: true, clean: true, cmpVersion: 'gte' }
bump: {} # 'bump' also uses the increment mode `yabs:release:MODE`
run_build: { tasks: ['make_release'] }
commit: { add: '.' }
tag: {}
push: { tags: true, useFollowTags: true },
githubRelease:
repo: 'mar10/fancytree'
draft: false
npmPublish: {}
bump_develop: { inc: 'prepatch' }
commit_develop: { message: 'Bump prerelease ({%= version %}) [ci skip]' }
push_develop: {}
# ----------------------------------------------------------------------------
# Load "grunt*" dependencies
for key of grunt.file.readJSON("package.json").devDependencies
grunt.loadNpmTasks key if key isnt "grunt" and key.indexOf("grunt") is 0
# Register tasks
grunt.registerTask "server", ["connect:forever"]
grunt.registerTask "dev", ["connect:dev", "watch"]
grunt.registerTask "tabfix", ["exec:tabfix"]
grunt.registerTask "test", [
"jshint:beforeConcat",
"eslint:dev",
# "csslint",
# "htmllint",
"qunit:develop"
]
grunt.registerTask "sauce", ["connect:sauce", "saucelabs-qunit"]
if parseInt(process.env.TRAVIS_PULL_REQUEST, 10) > 0
# saucelab keys do not work on forks
# http://support.saucelabs.com/entries/25614798
grunt.registerTask "travis", ["test"]
else
grunt.registerTask "travis", ["test", "sauce"]
grunt.registerTask "default", ["test"]
grunt.registerTask "ci", ["test"] # Called by 'npm test'
grunt.registerTask "build", [
"less:development"
"test"
# "jsdoc:build"
"docco:docs"
"clean:build"
"copy:build"
"cssmin:build"
"concat:core"
"concat:all"
"uglify:custom"
"concat:custom"
"concat:all-deps"
"clean:extMin"
"replace:production"
"jshint:afterConcat"
# "uglify:build"
"qunit:build"
]
grunt.registerTask "make_release", [
"exec:tabfix"
"build"
"clean:dist"
"copy:dist"
"clean:build"
"replace:release"
# "compress:dist"
]
grunt.registerTask "upload", [
"build"
"exec:upload"
]
grunt.registerTask "upload_force", [
"build"
"exec:upload_force"
]
Copyright 2008-2017 Martin Wendt,
http://wwWendt.de/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# ![logo](doc/logo.png?raw=true) Fancytree [![GitHub version](https://badge.fury.io/gh/mar10%2Ffancytree.svg)](https://github.com/mar10/fancytree/releases/latest) [![Build Status](https://travis-ci.org/mar10/fancytree.png?branch=master)](https://travis-ci.org/mar10/fancytree) [![Selenium Test Status](https://saucelabs.com/buildstatus/sauce-fancytree)](https://saucelabs.com/u/sauce-fancytree) [![npm](https://img.shields.io/npm/dm/jquery.fancytree.svg)](https://www.npmjs.com/package/jquery.fancytree)
Fancytree (sequel of [DynaTree 1.x](https://code.google.com/p/dynatree/)) is a
jQuery tree view / tree grid plugin with support for keyboard, inline editing,
filtering, checkboxes, drag'n'drop, and lazy loading.
[ ![sample](doc/teaser2.png?raw=true) ](http://wwwendt.de/tech/fancytree/demo "Live demo")
### Status
[![GitHub version](https://badge.fury.io/gh/mar10%2Ffancytree.svg)](https://github.com/mar10/fancytree/releases/latest)
See the [change log](https://github.com/mar10/fancytree/blob/master/CHANGELOG.md)
for details.
### Get Started
* [Try the live demo](http://wwwendt.de/tech/fancytree/demo).
* [Read the documentation](https://github.com/mar10/fancytree/wiki).
* [Check the Q&A forum](https://groups.google.com/forum/#!forum/fancytree) or [Stackoverflow](http://stackoverflow.com/questions/tagged/fancytree) if you have questions.
* Play with [jsFiddle](http://jsfiddle.net/mar10/KcxRd/)
or [Plunker](http://plnkr.co/edit/8sdy3r?p=preview)
* [Contribute](https://github.com/mar10/fancytree/wiki/HowtoContribute)
### Credits
Thanks to all [contributors](https://github.com/mar10/fancytree/contributors).
### Browser Status Matrix
[![Selenium Test Status](https://saucelabs.com/browser-matrix/sauce-fancytree.svg)](https://saucelabs.com/u/sauce-fancytree)
{
"tags": {
"allowUnknownTags": true
},
"source": {
"includePattern": ".+\\.js(doc)?$",
"excludePattern": "(^|\\/)_"
},
"plugins": [],
"jsVersion": 180
}
\ No newline at end of file
The default template for JSDoc 3 uses: [the Taffy Database library](http://taffydb.com/) and the [Underscore Template library](http://documentcloud.github.com/underscore/#template).
/*global env: true, publish: true */
(function() {
var template = require('jsdoc/template'),
fs = require('fs'),
helper = require('jsdoc/util/templateHelper'),
scopeToPunc = { 'static': '.', 'inner': '~', 'instance': '#' },
hasOwnProp = Object.prototype.hasOwnProperty;
/**
@global
@param {TAFFY} data See <http://taffydb.com/>.
@param {object} opts
@param {Tutorial} tutorials
*/
// exports.publish = function(data, opts, tutorials) {
publish = function(data, opts, tutorials) {
var defaultTemplatePath = 'templates/default';
var templatePath = (opts.template) ? opts.template : defaultTemplatePath;
var out = '',
view = new template.Template(env.dirname + '/' + templatePath + '/tmpl');
// set up templating
view.layout = 'layout.tmpl';
// set up tutorials for helper
helper.setTutorials(tutorials);
function find(spec) {
return data.get( data.find(spec) );
}
function htmlsafe(str) {
return str.replace(/</g, '&lt;');
}
function addSignatureParams(f) {
var pnames = [];
if (f.params) {
f.params.forEach(function(p) {
if (p.name && p.name.indexOf('.') === -1) {
if (p.optional) { pnames.push('<span class="optional">'+p.name+'</span>'); }
else { pnames.push(p.name); }
}
});
}
f.signature = (f.signature || '') + '('+pnames.join(', ')+')';
}
function generateAncestry(thisdoc) {
var ancestors = [],
doc = thisdoc;
while (doc = doc.memberof) {
doc = find({longname: doc});
if (doc) { doc = doc[0]; }
if (!doc) { break; }
ancestors.unshift( linkto(doc.longname, (scopeToPunc[doc.scope] || '') + doc.name) );
}
if (ancestors.length) {
ancestors[ancestors.length-1] += (scopeToPunc[thisdoc.scope] || '');
}
return ancestors;
}
function addSignatureReturns(f) {
var returnTypes = [];
if (f.returns) {
f.returns.forEach(function(r) {
if (r.type && r.type.names) {
if (! returnTypes.length) { returnTypes = r.type.names; }
}
});
}
if (returnTypes && returnTypes.length) {
returnTypes = returnTypes.map(function(r) {
return linkto(r);
});
}
f.signature = '<span class="signature">'+(f.signature || '') + '</span>' + '<span class="type-signature">'+(returnTypes.length? ' &rarr; {'+returnTypes.join('|')+'}' : '')+'</span>';
}
function addSignatureType(f) {
var types = [];
if (f.type && f.type.names) {
types = f.type.names;
}
if (types && types.length) {
types = types.map(function(t) {
return linkto(t, htmlsafe(t));
});
}
f.signature = (f.signature || '') + '<span class="type-signature">'+(types.length? ' :'+types.join('|') : '')+'</span>';
}
function addAttribs(f) {
var attribs = [];
if (f.virtual) {
attribs.push('virtual');
}
if (f.access && f.access !== 'public') {
attribs.push(f.access);
}
if (f.scope && f.scope !== 'instance' && f.scope !== 'global') {
if (f.kind == 'function' || f.kind == 'member' || f.kind == 'constant') {
attribs.push(f.scope);
}
}
if (f.readonly === true) {
if (f.kind == 'member') {
attribs.push('readonly');
}
}
if (f.kind === 'constant') {
attribs.push('constant');
f.kind = 'member';
}
f.attribs = '<span class="type-signature">'+htmlsafe(attribs.length? '<'+attribs.join(', ')+'> ' : '')+'</span>';
}
data.remove({undocumented: true});
data.remove({ignore: true});
if (!opts.private) { data.remove({access: 'private'}); }
data.remove({memberof: '<anonymous>'});
var packageInfo = (find({kind: 'package'}) || []) [0];
//function renderLinks(text) {
// return helper.resolveLinks(text);
//}
data.forEach(function(doclet) {
doclet.attribs = '';
if (doclet.examples) {
doclet.examples = doclet.examples.map(function(example) {
var caption, code;
if (example.match(/^\s*<caption>([\s\S]+?)<\/caption>(\s*[\n\r])([\s\S]+)$/i)) {
caption = RegExp.$1;
code = RegExp.$3;
}
return {
caption: caption || '',
code: code || example
};
});
}
if (doclet.see) {
doclet.see.forEach(function(seeItem, i) {
doclet.see[i] = hashToLink(doclet, seeItem);
});
}
});
data.orderBy(['longname', 'version', 'since']);
// kinds of containers
var globals = find( {kind: ['member', 'function', 'constant', 'typedef'], memberof: {isUndefined: true}} ),
modules = find({kind: 'module'}),
externals = find({kind: 'external'}),
mixins = find({kind: 'mixin'}),
namespaces = find({kind: 'namespace'});
var outdir = opts.destination;
if (packageInfo && packageInfo.name) {
outdir += '/' + packageInfo.name + '/' + packageInfo.version + '/';
}
fs.mkPath(outdir);
// copy static files to outdir
var fromDir = env.dirname + '/' + templatePath + '/static',
staticFiles = fs.ls(fromDir, 3);
staticFiles.forEach(function(fileName) {
var toDir = fs.toDir(fileName.replace(fromDir, outdir));
fs.mkPath(toDir);
fs.copyFile(fileName, toDir);
});
function linkto(longname, linktext) {
var url = helper.longnameToUrl[longname];
return url? '<a href="'+url+'">'+(linktext || longname)+'</a>' : (linktext || longname);
}
function tutoriallink(tutorial) {
return helper.toTutorial(tutorial);
}
var containers = ['class', 'module', 'external', 'namespace', 'mixin'];
data.forEach(function(doclet) {
var url = helper.createLink(doclet);
helper.registerLink(doclet.longname, url);
});
data.forEach(function(doclet) {
var url = helper.longnameToUrl[doclet.longname];
if (url.indexOf('#') > -1) {
doclet.id = helper.longnameToUrl[doclet.longname].split(/#/).pop();
}
else {
doclet.id = doclet.name;
}
if (doclet.kind === 'function' || doclet.kind === 'class') {
addSignatureParams(doclet);
addSignatureReturns(doclet);
addAttribs(doclet);
}
});
// do this after the urls have all been generated
data.forEach(function(doclet) {
doclet.ancestors = generateAncestry(doclet);
doclet.signature = '';
if (doclet.kind === 'member') {
addSignatureType(doclet);
addAttribs(doclet);
}
if (doclet.kind === 'constant') {
addSignatureType(doclet);
addAttribs(doclet);
}
});
var nav = '<h2><a href="index.html">Index</a></h2>',
seen = {};
var moduleNames = find({kind: 'module'});
moduleNames.sort(function(a, b) {
return a.name > b.name;
});
if (moduleNames.length) {
nav += '<h3>Modules</h3><ul>';
moduleNames.forEach(function(m) {
if ( !hasOwnProp.call(seen, m.longname) ) {
nav += '<li>'+linkto(m.longname, m.name)+'</li>';
}
seen[m.longname] = true;
});
nav += '</ul>';
}
var externalNames = find({kind: 'external'});
externalNames.sort(function(a, b) {
return a.name > b.name;
});
if (externalNames.length) {
nav += '<h3>Externals</h3><ul>';
externalNames.forEach(function(e) {
if ( !hasOwnProp.call(seen, e.longname) ) {
nav += '<li>'+linkto( e.longname, e.name.replace(/(^"|"$)/g, '') )+'</li>';
}
seen[e.longname] = true;
});
nav += '</ul>';
}
var classNames = find({kind: 'class'});
classNames.sort(function(a, b) {
return a.name > b.name;
});
if (classNames.length) {
var moduleClasses = 0;
classNames.forEach(function(c) {
var moduleSameName = find({kind: 'module', longname: c.longname});
if (moduleSameName.length) {
c.name = c.name.replace('module:', 'require("')+'")';
moduleClasses++;
moduleSameName[0].module = c;
}
if (moduleClasses !== -1 && moduleClasses < classNames.length) {
nav += '<h3>Classes</h3><ul>';
moduleClasses = -1;
}
if ( !hasOwnProp.call(seen, c.longname) ) {
nav += '<li>'+linkto(c.longname, c.name)+'</li>';
}
seen[c.longname] = true;
});
nav += '</ul>';
}
var namespaceNames = find({kind: 'namespace'});
namespaceNames.sort(function(a, b) {
return a.name > b.name;
});
if (namespaceNames.length) {
nav += '<h3>Namespaces</h3><ul>';
namespaceNames.forEach(function(n) {
if ( !hasOwnProp.call(seen, n.longname) ) {
nav += '<li>'+linkto(n.longname, n.name)+'</li>';
}
seen[n.longname] = true;
});
nav += '</ul>';
}
// var constantNames = find({kind: 'constants'});
// if (constantNames.length) {
// nav += '<h3>Constants</h3><ul>';
// constantNames.forEach(function(c) {
// if ( !hasOwnProp.call(seen, c.longname) ) {
// nav += '<li>'+linkto(c.longname, c.name)+'</li>';
// }
// seen[c.longname] = true;
// });
//
// nav += '</ul>';
// }
var mixinNames = find({kind: 'mixin'});
mixinNames.sort(function(a, b) {
return a.name > b.name;
});
if (mixinNames.length) {
nav += '<h3>Mixins</h3><ul>';
mixinNames.forEach(function(m) {
if ( !hasOwnProp.call(seen, m.longname) ) {
nav += '<li>'+linkto(m.longname, m.name)+'</li>';
}
seen[m.longname] = true;
});
nav += '</ul>';
}
if (tutorials.children.length) {
nav += '<h3>Tutorials</h3><ul>';
tutorials.children.forEach(function(t) {
nav += '<li>'+tutoriallink(t.name)+'</li>';
});
nav += '</ul>';
}
var globalNames = find({kind: ['member', 'function', 'constant', 'typedef'], 'memberof': {'isUndefined': true}});
globalNames.sort(function(a, b) {
return a.name > b.name;
});
if (globalNames.length) {
nav += '<h3>Global</h3><ul>';
globalNames.forEach(function(g) {
if ( g.kind !== 'typedef' && !hasOwnProp.call(seen, g.longname) ) {
nav += '<li>'+linkto(g.longname, g.name)+'</li>';
}
seen[g.longname] = true;
});
nav += '</ul>';
}
// add template helpers
view.find = find;
view.linkto = linkto;
view.tutoriallink = tutoriallink;
view.htmlsafe = htmlsafe;
// once for all
view.nav = nav;
function generate(title, docs, filename) {
var data = {
title: title,
docs: docs
};
var path = outdir + '/' + filename,
html = view.render('container.tmpl', data);
html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
fs.writeFileSync(path, html);
}
for (var longname in helper.longnameToUrl) {
if ( hasOwnProp.call(helper.longnameToUrl, longname) ) {
var classes = find({kind: 'class', longname: longname});
if (classes.length) { generate('Class: '+classes[0].name, classes, helper.longnameToUrl[longname]); }
var modules = find({kind: 'module', longname: longname});
if (modules.length) { generate('Module: '+modules[0].name, modules, helper.longnameToUrl[longname]); }
var namespaces = find({kind: 'namespace', longname: longname});
if (namespaces.length) { generate('Namespace: '+namespaces[0].name, namespaces, helper.longnameToUrl[longname]); }
// var constants = find({kind: 'constant', longname: longname});
// if (constants.length) { generate('Constant: '+constants[0].name, constants, helper.longnameToUrl[longname]); }
var mixins = find({kind: 'mixin', longname: longname});
if (mixins.length) { generate('Mixin: '+mixins[0].name, mixins, helper.longnameToUrl[longname]); }
var externals = find({kind: 'external', longname: longname});
if (externals.length) { generate('External: '+externals[0].name, externals, helper.longnameToUrl[longname]); }
}
}
if (globals.length) { generate('Global', [{kind: 'globalobj'}], 'global.html'); }
// index page displays information from package.json and lists files
var files = find({kind: 'file'}),
packages = find({kind: 'package'});
generate('Fancytree API Reference', // used as page tile and header. was 'Index'
packages.concat(
[{kind: 'mainpage', readme: opts.readme, longname: (opts.mainpagetitle) ? opts.mainpagetitle : 'Main Page'}]
).concat(files)
, 'index.html');
function generateTutorial(title, tutorial, filename) {
var data = {
title: title,
header: tutorial.title,
content: tutorial.parse(),
children: tutorial.children
};
var path = outdir + '/' + filename,
html = view.render('tutorial.tmpl', data);
// yes, you can use {@link} in tutorials too!
html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
fs.writeFileSync(path, html);
}
// tutorials can have only one parent so there is no risk for loops
function saveChildren(node) {
node.children.forEach(function(child) {
generateTutorial('Tutorial: '+child.title, child, helper.tutorialToUrl(child.name));
saveChildren(child);
});
}
saveChildren(tutorials);
};
function hashToLink(doclet, hash) {
if ( !/^(#.+)/.test(hash) ) { return hash; }
var url = helper.createLink(doclet);
url = url.replace(/(#.+|$)/, hash);
return '<a href="'+url+'">'+hash+'</a>';
}
}());
html
{
overflow: auto;
background-color: #fff;
}
body
{
font: 14px "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans serif;
line-height: 130%;
color: #000;
background-color: #fff;
}
a {
color: #444;
}
a:visited {
color: #444;
}
a:active {
color: #444;
}
header
{
display: block;
padding: 6px 4px;
}
.class-description {
font-style: italic;
font-family: Palatino, 'Palatino Linotype', serif;
font-size: 130%;
line-height: 140%;
margin-bottom: 1em;
margin-top: 1em;
}
#main {
float: left;
width: 100%;
}
section
{
display: block;
background-color: #fff;
padding: 12px 24px;
border-bottom: 1px solid #ccc;
margin-right: 240px;
}
.variation {
display: none;
}
.optional:after {
content: "opt";
font-size: 60%;
color: #aaa;
font-style: italic;
font-weight: lighter;
}
nav
{
display: block;
float: left;
margin-left: -230px;
margin-top: 28px;
width: 220px;
border-left: 1px solid #ccc;
padding-left: 9px;
}
nav ul {
font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;
font-size: 100%;
line-height: 17px;
padding:0;
margin:0;
list-style-type:none;
}
nav h2 a, nav h2 a:visited {
color: #A35A00;
text-decoration: none;
}
nav h3 {
margin-top: 12px;
}
nav li {
margin-top: 6px;
}
nav a {
color: #5C5954;
}
nav a:visited {
color: #5C5954;
}
nav a:active {
color: #5C5954;
}
footer {
display: block;
padding: 6px;
margin-top: 12px;
font-style: italic;
font-size: 90%;
}
h1
{
font-size: 200%;
font-weight: bold;
letter-spacing: -0.01em;
margin: 6px 0 9px 0;
}
h2
{
font-size: 170%;
font-weight: bold;
letter-spacing: -0.01em;
margin: 6px 0 3px 0;
}
h3
{
font-size: 150%;
font-weight: bold;
letter-spacing: -0.01em;
margin-top: 16px;
margin: 6px 0 3px 0;
}
h4
{
font-size: 130%;
font-weight: bold;
letter-spacing: -0.01em;
margin-top: 16px;
margin: 18px 0 3px 0;
color: #A35A00;
}
h5, .container-overview .subsection-title
{
font-size: 120%;
font-weight: bold;
letter-spacing: -0.01em;
margin: 8px 0 3px -16px;
}
h6
{
font-size: 100%;
letter-spacing: -0.01em;
margin: 6px 0 3px 0;
font-style: italic;
}
.ancestors { color: #999; }
.ancestors a
{
color: #999 !important;
text-decoration: none;
}
.important
{
font-weight: bold;
color: #950B02;
}
.yes-def {
text-indent: -1000px;
}
.type-signature {
color: #aaa;
}
.name, .signature {
font-family: Consolas, "Lucida Console", Monaco, monospace;
}
.details { margin-top: 14px; }
.details dt { width:100px; float:left; border-left: 2px solid #DDD; padding-left: 10px; padding-top: 6px; }
.details dd { margin-left: 50px; }
.details ul { margin: 0; }
.details ul { list-style-type: none; }
.details li { margin-left: 30px; padding-top: 6px; }
.description {
margin-bottom: 1em;
margin-left: -16px;
margin-top: 1em;
}
.code-caption
{
font-style: italic;
font-family: Palatino, 'Palatino Linotype', serif;
font-size: 107%;
margin: 0;
}
.sh_sourceCode
{
border: 1px solid #ddd;
width: 80%;
}
.sh_sourceCode code
{
font-family: Consolas, 'Lucida Console', Monaco, monospace;
font-size: 100%;
line-height: 18px;
display: block;
padding: 4px 12px;
margin: 0;
background-color: #fff;
color: #000;
border-left: 3px #ddd solid;
}
.params, .props, .methods
{
border-spacing: 0;
border: 0;
border-collapse: collapse;
}
.params .name, .props .name, .name code {
color: #A35A00;
font-family: Consolas, 'Lucida Console', Monaco, monospace;
font-size: 100%;
}
.params td, .params th, .props td, .props th, .methods td, .methods th
{
border: 1px solid #ddd;
margin: 0px;
text-align: left;
vertical-align: top;
padding: 4px 6px;
display: table-cell;
}
.params thead tr, .props thead tr, .methods thead tr
{
background-color: #ddd;
font-weight: bold;
}
.params .params thead tr, .props .props thead tr, .methods .methods thead tr
{
background-color: #fff;
font-weight: bold;
}
.params .params tbody tr:hover td,
.props .props tbody tr:hover td,
.methods .methods tbody tr:hover td
{
background-color: #ddd;
}
/* MODIFIED */
.showHover
{
display: none;
}
tr:hover .showHover
{
display: inline-block;
}
.params th, .props th, .methods th { border-right: 1px solid #aaa; }
.params thead .last, .props thead .last, .methods thead .last { border-right: 1px solid #ddd; }
.disabled {
color: #454545;
}
table.methods tbody tr {
cursor: pointer;
}
table.methods tbody tr:hover {
background-color: seashell;
}
nav {
margin-left: -250px; /* prevent GitHub logo to overlap TOC links */
}
\ No newline at end of file
.sh_sourceCode {
background-color: #ffffff;
color: #000000;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_keyword {
color: #000000;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_type {
color: #a52a2a;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_string {
color: #006400;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_regexp {
color: #006400;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_specialchar {
color: #2e8b57;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_comment {
color: #000000;
font-weight: normal;
font-style: italic;
}
.sh_sourceCode .sh_number {
color: #006400;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_preproc {
color: #27408b;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_symbol {
color: #000000;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_function {
color: #000000;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_cbracket {
color: #000000;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_url {
color: #006400;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_date {
color: #000000;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_time {
color: #000000;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_file {
color: #000000;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_ip {
color: #006400;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_name {
color: #006400;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_variable {
color: #dda0dd;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_oldfile {
color: #2e8b57;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_newfile {
color: #006400;
font-weight: normal;
font-style: normal;
}
.sh_sourceCode .sh_difflines {
color: #000000;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_selector {
color: #dda0dd;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_property {
color: #000000;
font-weight: bold;
font-style: normal;
}
.sh_sourceCode .sh_value {
color: #006400;
font-weight: normal;
font-style: normal;
}
<?js
var self = this;
docs.forEach(function(doc, i) {
?>
<?js if (doc.kind === 'mainpage' || (doc.kind === 'package')) { ?>
<?js= self.partial('mainpage.tmpl', doc) ?>
<?js } else { ?>
<section>
<header>
<h2><?js if (doc.ancestors && doc.ancestors.length) { ?>
<span class="ancestors"><?js= doc.ancestors.join('') ?></span>
<?js } ?>
<?js= doc.name ?>
<?js if (doc.variation) { ?>
<sup class="variation"><?js= doc.variation ?></sup>
<?js } ?></h2>
<?js if (doc.classdesc) { ?>
<div class="class-description"><?js= doc.classdesc ?></div>
<?js } ?>
</header>
<article>
<div class="container-overview">
<?js if (doc.kind === 'module' && doc.module) { ?>
<?js= self.partial('method.tmpl', doc.module) ?>
<?js } ?>
<?js if (doc.kind === 'class') { ?>
<?js= self.partial('method.tmpl', doc) ?>
<?js } else { ?>
<?js if (doc.description) { ?>
<div class="description"><?js= doc.description ?></div>
<?js } ?>
<?js= self.partial('details.tmpl', doc) ?>
<?js if (doc.examples && doc.examples.length) { ?>
<h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
<?js= self.partial('examples.tmpl', doc.examples) ?>
<?js } ?>
<?js } ?>
</div>
<?js if (doc.augments && doc.augments.length) { ?>
<h3 class="subsection-title">Extends</h3>
<ul><?js doc.augments.forEach(function(a) { ?>
<li><?js= self.linkto(a, a) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js if (doc.mixes && doc.mixes.length) { ?>
<h3 class="subsection-title">Mixes In</h3>
<ul><?js doc.mixes.forEach(function(a) { ?>
<li><?js= self.linkto(a, a) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js if (doc.requires && doc.requires.length) { ?>
<h3 class="subsection-title">Requires</h3>
<ul><?js doc.requires.forEach(function(r) { ?>
<li><?js= self.linkto(r, r) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js
var classes = self.find({kind: 'class', memberof: doc.longname});
if (doc.kind !== 'globalobj' && classes && classes.length) {
?>
<h3 class="subsection-title">Classes</h3>
<dl><?js classes.forEach(function(c) { ?>
<dt><?js= self.linkto(c.longname, c.name) ?></dt>
<dd><?js if (c.summary) { ?><?js= c.summary ?><?js } ?></dd>
<?js }); ?></dl>
<?js } ?>
<?js
var namespaces = self.find({kind: 'namespace', memberof: doc.longname});
if (doc.kind !== 'globalobj' && namespaces && namespaces.length) {
?>
<h3 class="subsection-title">Namespaces</h3>
<dl><?js namespaces.forEach(function(n) { ?>
<dt><a href="namespaces.html#<?js= n.longname ?>"><?js= self.linkto(n.longname, n.name) ?></a></dt>
<dd><?js if (n.summary) { ?><?js= n.summary ?><?js } ?></dd>
<?js }); ?></dl>
<?js } ?>
<?js
var members = self.find({kind: 'member', memberof: title === 'Globals'? {isUndefined: true} : doc.longname});
if (members && members.length && members.forEach) {
?>
<h3 class="subsection-title">Members</h3>
<dl><?js members.forEach(function(p) { ?>
<?js= self.partial('members.tmpl', p) ?>
<?js }); ?></dl>
<?js } ?>
<!--
<?js
var methods = self.find({kind: 'function', memberof: title === 'Globals'? {isUndefined: true} : doc.longname});
if (methods && methods.length && methods.forEach) {
?>
<h3 class="subsection-title">Methods Overview</h3>
<dl class="methods-overview">
<?js methods.forEach(function(m) { ?>
<dt>
<?js= self.partial('method_sig.tmpl', m) ?>
<a href="#<?js=m.id?>">details</a>
</dt>
<dd>
<div class="description">
<?js= m.description ?>
</div>
</dd>
<?js }); ?>
</dl>
XXX
<table class="methods">
<?js methods.forEach(function(m) { ?>
<tr>
<td>
<?js= self.partial('method_sig.tmpl', m) ?>
</td>
<td class="description">
<?js= m.description ?>
</td>
<td>
<a href="#<?js=m.id?>">details</a>
</td>
</tr>
<?js }); ?>
</table>
<?js } ?>
-->
<?js
var methods = self.find({kind: 'function', memberof: title === 'Globals'? {isUndefined: true} : doc.longname});
if (methods && methods.length && methods.forEach) {
?>
<h3 class="subsection-title">Methods Details</h3>
<dl><?js methods.forEach(function(m) { ?>
<?js= self.partial('method.tmpl', m) ?>
<?js }); ?></dl>
<?js } ?>
<?js
var typedefs = self.find({kind: 'typedef', memberof: doc.longname});
if (typedefs && typedefs.length && typedefs.forEach) {
?>
<h3 class="subsection-title">TypeDefs</h3>
<dl><?js typedefs.forEach(function(e) { ?>
<?js= self.partial('members.tmpl', e) ?>
<?js }); ?></dl>
<?js } ?>
<?js
var events = self.find({kind: 'event', memberof: doc.longname});
if (events && events.length && events.forEach) {
?>
<h3 class="subsection-title">Events</h3>
<dl><?js events.forEach(function(e) { ?>
<?js= self.partial('method.tmpl', e) ?>
<?js }); ?></dl>
<?js } ?>
</article>
</section>
<?js } ?>
<?js }); ?>
<?js var self = this; ?>
<dl class="details">
<?js
var properties = data.properties;
if (properties && properties.length && properties.forEach) {
?>
<h5 class="subsection-title">Properties:</h5>
<dl><?js= this.partial('properties.tmpl', properties) ?></dl>
<?js } ?>
<?js
var methods = self.find({kind: 'function', memberof: data.longname});
if (methods && methods.length && methods.forEach) {
?>
<h5 class="subsection-title">Methods:</h5>
<dl><?js= this.partial('methods.tmpl', methods) ?></dl>
<?js } ?>
<?js if (data.version) {?>
<dt class="tag-version">Version:</dt>
<dd class="tag-version"><ul class="dummy"><li><?js= version ?></li></ul></dd>
<?js } ?>
<?js if (data.since) {?>
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li><?js= since ?></dd>
<?js } ?>
<?js if (data.deprecated) { ?>
<dt class="important tag-deprecated">Deprecated:</dt><?js
if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js }
else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li><ul></dd><?js }
?>
<?js } ?>
<?js if (data.author && author.length) {?>
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul><?js author.forEach(function(a) { ?>
<li><?js= a ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
<?js if (data.copyright) {?>
<dt class="tag-copyright">Copyright:</dt>
<dd class="tag-copyright"><ul class="dummy"><li><?js= copyright ?></li></ul></dd>
<?js } ?>
<?js if (data.license) {?>
<dt class="tag-license">License:</dt>
<dd class="tag-license"><ul class="dummy"><li><?js= license ?></li></ul></dd>
<?js } ?>
<?js if (data.defaultvalue) {?>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li><?js= data.defaultvalue ?></li></ul></dd>
<?js } ?>
<!--
<?js if (data.meta) {?>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li><?js= meta.filename ?>, line <?js= meta.lineno ?></li></ul></dd>
<?js } ?>
-->
<?js if (data.tutorials && tutorials.length) {?>
<dt class="tag-tutorial">Tutorials:</dt>
<dd class="tag-tutorial">
<ul><?js tutorials.forEach(function(t) { ?>
<li><?js= tutoriallink(t) ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
<?js if (data.see && see.length) {?>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul><?js see.forEach(function(s) { ?>
<li><?js= self.linkto(s) ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
<?js if (data.todo && todo.length) {?>
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul><?js todo.forEach(function(t) { ?>
<li><?js= t ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
</dl>
<pre><code><?js= data ?></code></pre>
<?js
data.forEach(function(example) {
if (example.caption) {
?>
<p class="code-caption"><?js= example.caption ?></p>
<?js } ?>
<pre class="sh_javascript"><code><?js= example.code ?></code></pre>
<?js
});
?>
\ No newline at end of file
<?js if (data.description) { ?>
<div class="param-desc">
<?js= description ?>
</div>
<?js } ?>
<?js if (data.type && data.type.names) { ?>
<dl>
<dt>
Type
</dt>
<dd>
<?js
var typeNames = data.type.names,
self = this;
typeNames.forEach(function(name, i) { ?>
<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span> <?js if (i < typeNames.length-1) { ?>|<?js } ?>
<?js }); ?>
</dd>
</dl>
<?js } ?>
\ No newline at end of file
<li>
<?js= data ?>
</li>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: <?js= title ?></title>
<script src="http://shjs.sourceforge.net/sh_main.min.js"> </script>
<script src="http://shjs.sourceforge.net/lang/sh_javascript.min.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/node-dark.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title"><?js= title ?></h1>
<?js= content ?>
</div>
<nav>
<?js= this.nav ?>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3</a> on <?js= (new Date()) ?>
using <a href="https://github.com/mar10/fancytree/tree/master/bin/jsdoc3-moogle " target="_blank">fancytree custom template</a>.
</footer>
<script> sh_highlightDocument(); </script>
<a href="https://github.com/mar10/fancytree/"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://github-camo.global.ssl.fastly.net/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkmerightorange_ff7600.png"></a>
</body>
</html>
<?js
var self = this;
?>
<?js if (data.kind === 'package') { ?>
<h3><?js= data.name ?> <?js= data.version ?></h3>
<?js } ?>
<?js if (data.readme) { ?>
<section>
<article><?js= data.readme ?></article>
</section>
<?js } ?>
<dt>
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + name + data.signature ?></h4>
<?js if (data.summary) { ?>
<p class="summary"><?js= summary ?></p>
<?js } ?>
</dt>
<dd>
<?js if (data.description) { ?>
<div class="description">
<?js= data.description ?>
</div>
<?js } ?>
<?js= this.partial('details.tmpl', data) ?>
<?js if (data.examples && examples.length) { ?>
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
<?js= this.partial('examples.tmpl', examples) ?>
<?js } ?>
</dd>
<?js var self = this; ?>
<dt>
<h4 class="name" id="<?js= id ?>">
<!--
<? js= data.attribs + (kind == 'class'? 'new ':'') + name + data.signature ?>
-->
<?js= this.partial('method_sig.tmpl', data) ?>
</h4>
<?js if (data.summary) { ?>
<p class="summary"><?js= summary ?></p>
<?js } ?>
</dt>
<dd>
<?js if (data.description) { ?>
<div class="description">
<?js= data.description ?>
</div>
<?js } ?>
<?js if (data['this']) { ?>
<h5>This:</h5>
<ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul>
<?js } ?>
<?js if (data.params && params.length) { ?>
<h5>Parameters:</h5>
<?js= this.partial('params.tmpl', params) ?>
<?js } ?>
<?js= this.partial('details.tmpl', data) ?>
<?js if (data.fires && fires.length) { ?>
<h5>Fires:</h5>
<ul><?js fires.forEach(function(f) { ?>
<?js= self.partial('fires.tmpl', self.linkto(f) ) ?>
<?js }); ?></ul>
<?js } ?>
<?js if (data.exceptions && exceptions.length) { ?>
<h5>Throws:</h5>
<?js if (exceptions.length > 1) { ?><ul><?js
exceptions.forEach(function(r) { ?>
<li><?js= self.partial('exceptions.tmpl', r) ?></li>
<?js });
?></ul><?js } else {
exceptions.forEach(function(r) { ?>
<?js= self.partial('exceptions.tmpl', r) ?>
<?js });
} } ?>
<?js if (data.returns && returns.length) { ?>
<h5>Returns:</h5>
<?js if (returns.length > 1) { ?><ul><?js
returns.forEach(function(r) { ?>
<li><?js= self.partial('returns.tmpl', r) ?></li>
<?js });
?></ul><?js } else {
returns.forEach(function(r) { ?>
<?js= self.partial('returns.tmpl', r) ?>
<?js });
} } ?>
<?js if (data.examples && examples.length) { ?>
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
<?js= this.partial('examples.tmpl', examples) ?>
<?js } ?>
</dd>
<?js
var params = data.params,
funcname = data.name,
returns = data.returns,
args = "()",
ret = (data.kind === "class" ? "new" : "void");
if(returns){
var returnTypes = [];
returns.forEach(function(r) {
if (r.type && r.type.names) {
if (! returnTypes.length) { returnTypes = r.type.names; }
}
});
ret = (returnTypes.length ? '{' + returnTypes.join('|') + '}' : '');
}
if(params){
args = [];
params.forEach(function(param) {
if (!param) { return; }
var name = param.name;
if (param.optional || param.nullable) {
name = "<span class='optional'>" + name + "</span>";
}
if (typeof param.defaultvalue !== 'undefined') {
name = name + "=<span class='default'>" + param.defaultvalue + "</span>";
}
args.push(name);
});
args = "(" + args.join(", ") + ")";
}
?>
<span class="type-signature"><?js= ret ?></span>
<span class="name"><?js= funcname ?></span><span class=""><?js= args ?></span>