Initial commit
9
YtManagerApp/static/YtManagerApp/css/style.css
Normal file
@ -0,0 +1,9 @@
|
||||
/* Some material font helpers */
|
||||
|
||||
.material-folder::before {
|
||||
content: "\e2c7";
|
||||
}
|
||||
|
||||
.material-person::before {
|
||||
content: "\e7fd";
|
||||
}
|
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
|
After Width: | Height: | Size: 229 B |
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
|
After Width: | Height: | Size: 247 B |
8601
YtManagerApp/static/YtManagerApp/import/jstree/jstree.js
Normal file
6
YtManagerApp/static/YtManagerApp/import/jstree/jstree.min.js
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 6.4 KiB |
1
YtManagerApp/static/YtManagerApp/import/jstree/themes/default-dark/style.min.css
vendored
Normal file
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 2.2 KiB |
1
YtManagerApp/static/YtManagerApp/import/jstree/themes/default/style.min.css
vendored
Normal file
After Width: | Height: | Size: 1.4 KiB |
50
YtManagerApp/static/YtManagerApp/js/subtree.js
Normal file
@ -0,0 +1,50 @@
|
||||
function onSelectionChanged(e, data)
|
||||
{
|
||||
node = data.instance.get_selected(true)[0];
|
||||
}
|
||||
|
||||
function validateChange(operation, node, parent, position, more)
|
||||
{
|
||||
if (more.dnd)
|
||||
{
|
||||
// create_node, rename_node, delete_node, move_node and copy_node
|
||||
if (operation === "copy_node" || operation === "move_node")
|
||||
{
|
||||
if (more.ref.type === "sub")
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function setupTree(dataIn)
|
||||
{
|
||||
$("#tree-wrapper").jstree({
|
||||
core : {
|
||||
data : {
|
||||
url : 'ajax/get_children'
|
||||
},
|
||||
check_callback : validateChange,
|
||||
themes : {
|
||||
dots : false
|
||||
},
|
||||
},
|
||||
types : {
|
||||
folder : {
|
||||
icon : "material-icons material-folder"
|
||||
},
|
||||
sub : {
|
||||
icon : "material-icons material-person",
|
||||
max_depth : 0
|
||||
}
|
||||
},
|
||||
plugins : [ "types", "wholerow", "dnd" ]
|
||||
});
|
||||
$("#tree-wrapper").on("changed.jstree", onSelectionChanged);
|
||||
}
|
||||
|
||||
$(document).ready(function ()
|
||||
{
|
||||
setupTree();
|
||||
})
|