gilek / bootstrap-gtreetable Goto Github PK
View Code? Open in Web Editor NEWExtension of Tweeter Bootstrap 3 framework which allows to use tree structure inside HTML table.
Home Page: http://gtreetable2.gilek.net
License: MIT License
Extension of Tweeter Bootstrap 3 framework which allows to use tree structure inside HTML table.
Home Page: http://gtreetable2.gilek.net
License: MIT License
Steps to reproduce:
1.Under "root", create new node n1.
2.Under "root", create new node n2.
3.Under n1, create new node n11.
4.Under n2, create new node n21.
5. Make sure that n1 and n2 are collapsed showing n11, respectively n21.
6.Under "root", create new node n3.
Problems
Hello,
your treetable is very nice, but the sample you provided which is downloadable is not enough due to the absence of the PHP file or on how to load it from JSON.
can you help by provided the files?
thank you so much
How to rename action title on each node. eg on level 0 I need add Segment & Category,
on level 1 I need add Category & SubCategory and on level 2 I need add subcategory.
@gilek can u add some Api methods like openAll and closeAll.
Hi,
how to completely hide Actions button on node level?
setting defaultActions: null, actions: null doesn't do much :(
Hello
Tell me how can I show tree immediately disclosed? (Solution: return the full array)
And if I can display a list other than root?
Hello!
Now dataSource method must function return:
dataSource: function(id){
return "tree/items/url/" + id + "/";
}
I think, good idea is removing this function and adding URL and method propertyes to function interface:
$().gtreetable({
url: "tree/items/url/",
method: "GET"
});
Internal plugin send data via this URL:
$.ajax({
method: this.method,
url: this.url,
data: {
parentId: undefined, //For root, tree item id for real hive
level: 0 //For django-mptt, for example
}
}).success(function(items){
if ($.isArray(items)){
//Work to inserting items into DOM
}
});
No commit since a year. Did the author give up on his project ?
How is the cache supposed to work? I would like to preserve the state of the menu on page load - is that what the cache does?
Is there a different way to cache the state of the menu across page loads?
Thanks!
There's not nearly enough details in the configuration section to understand how this is used. How is data pulled back from the AJAX query into the table? How do you specify elements from your JSON model? What is "template" configuration and how is it used?
If you don't want to include documentation, at least provide a couple examples of these things in play so we can see how it works.
In other words, I would like to display the whole tree with all nodes / children visible to user.
..is there any way to do that? eg I do not want to have the 'update' action
Hi all!
Is there a way to make search in tree in this plugin? Searching in tree like jstree plugin has with ajax. Thanks!
Root nodes in the tree are expected to be returned as a list. The Flask framework's implementation of json (jsonify
) treats top-level lists as a security risk:
The problem are arrays at top-level in JSON. [...] An attacker can use this (like above) to get all the data you exported in your JSON file.
There is more information about a workaround in this issue:
I appreciate that top-level array elements are not allowed to be created in Flask's jsonify() implementation (http://flask.pocoo.org/docs/0.10/security/#json-security). Also, there are for sure straight-forward strategies for solving this in application code, for example by wrapping the list in a dictionary: jsonify({"items": collection}).
Dragged node takes incorrect position when it dropped as child to node that already has last expanded child.
It inserts after last child, but it's own children draw after new node and can moved with it.
Problem can easy solved if you will insert dropped node as first child.
Thanks.
Guys,
it is not really an issue,
I would like to know whether is there a way to add additional fields instead of only one field when an user wants to add a new child?
Thanks in advance
Hello,
I am trying to use this extension.
My problem is, I don't know how to write my structure in the Json file.
I write something like that ( I see this exemple of the second issue ) :
{"nodes": [ {"id":4070,"name":"123.","level":0,"type":"default"}, {"id":4005,"name":"1254.","level":0,"type":"default"} ] }
I have datas who are displays.
But When I click on the arrow I have this display :
It displays under the arrow the datas who are already display.
Furthermore I don't know how to write the childrens of a category.
Thank you for the future help.
I registery language file. Use the widget:
return $this->render(
'@gilek/gtreetable/views/widget',
[
'title' => Yii::t('tree', 'Tree'),
'options' => [
'draggable' => true,
'manyroots' => true,
'language' => Language::getCurrentCode(),
],
]
);
Crashes error 404 because:
gilek\gtreetable\Widget
...
if (array_key_exists('language', $this->options) && $this->options['language'] !== null) {
$assetBundle->language = $this->options['language'];
}
it is better to use file_exists.
hey,
could you include the less file that the css is generated from to the project?
this might help integration into bootstrap if we could use the style with our bootstrap variables.
thx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.