findertree

WebJar for findertree

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

finder-tree
Последняя версия

Последняя версия

0.1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

findertree
WebJar for findertree
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/jperugini/finder-tree

Скачать finder-tree

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/finder-tree/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>finder-tree</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/finder-tree/
implementation 'org.webjars.bower:finder-tree:0.1.2'
// https://jarcasting.com/artifacts/org.webjars.bower/finder-tree/
implementation ("org.webjars.bower:finder-tree:0.1.2")
'org.webjars.bower:finder-tree:jar:0.1.2'
<dependency org="org.webjars.bower" name="finder-tree" rev="0.1.2">
  <artifact name="finder-tree" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='finder-tree', version='0.1.2')
)
libraryDependencies += "org.webjars.bower" % "finder-tree" % "0.1.2"
[org.webjars.bower/finder-tree "0.1.2"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

Angular FinderTree

Angular Finder Tree is a directive that generate a selectable tree similar to a file explorer.

Requirements

AngularJS v1.2+

Demo

###Browser support

Chrome Firefox Safari Opera IE9+
ok ok ok ok ok

##Install

1. Run the following comand in your termial

$ bower install finder-tree --save

2. Add the javascript and css files to your index.html

<!DOCTYPE HTML>
<html>
	<head>
		<link href="finder-tree/dist/finder-tree.min.css" rel="stylesheet" type="text/css" />
		</head>
	<body ng-app="app">
  		//.....
  		<script src="finder-tree/dist/finder-tree.min.js"></script>
	</body>
</html>

3. Add module dependency in your app.js

angular.module('app', [
  'finderTree'
 ]);

4. Call the directive

<finder-tree data="data" ng-model="model" search-filter="search"></finder-tree>

Configuring Finder Tree

JSON Data

  • The JSON data passed to the directive should be a tree of elements:
{
	'name': 'MainDir',
	'dirs': [{
		'name': 'SubDir1',
		'dirs': [{
			'name': 'SubSubDir1',
			'dirs': [{...}],
			'files': [{...}]
			}, {
			...
		}],
		'files': [{
				'name': File1'
				}, {
				....
		}]
	}
}

Each layer of the data structure MUST contain a property dirs and a property files even if this is empty. For example: 'dirs': [{ 'name': 'SubSubDir1', 'dirs': [], 'files': [] }, { ... }],

  • ng-model should be any variable in your controller. The directive will store the selected file and the path to the file.
    • The file can contain any attribut you want, it will be passed to the model when the file is selected.
    • The path is an array containing the list of the folders name in which the file is located.
{
	'name': 'File1',
	'any other attribute': '',
	'path': ['Array path to file1']
}
  • search-filter is used to find specific document within any directory of your data. Pass it a string variable and it will filter the element for you.

Theme

You can edit the default Css file finder-tree.css if you want to make a new theme.

Contributing

Feel free to contribute by forking, opening issues, pull requests etc.

License

Released under the terms of MIT License.

Версии библиотеки

Версия
0.1.2