0
0
Fork 0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2025-03-13 04:53:21 +00:00

Fixing line endings in jstree

This commit is contained in:
Daniel Samson 2017-04-19 09:51:50 +01:00
parent e5703f7d21
commit e26cd5cda0
10 changed files with 2623 additions and 2623 deletions
include/javascript/jstree
LICENSE-MIT
demo/basic
src/themes
test

View file

@ -1,22 +1,22 @@
Copyright (c) 2014 Ivan Bozhanov
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.
Copyright (c) 2014 Ivan Bozhanov
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.

View file

@ -1,146 +1,146 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jstree basic demos</title>
<style>
html { margin:0; padding:0; font-size:62.5%; }
body { max-width:800px; min-width:300px; margin:0 auto; padding:20px 10px; font-size:14px; font-size:1.4em; }
h1 { font-size:1.8em; }
.demo { overflow:auto; border:1px solid silver; min-height:100px; }
</style>
<link rel="stylesheet" href="../../dist/themes/default/style.min.css" />
</head>
<body>
<h1>HTML demo</h1>
<div id="html" class="demo">
<ul>
<li data-jstree='{ "opened" : true }'>Root node
<ul>
<li data-jstree='{ "selected" : true }'>Child node 1</li>
<li>Child node 2</li>
</ul>
</li>
</ul>
</div>
<h1>Inline data demo</h1>
<div id="data" class="demo"></div>
<h1>Data format demo</h1>
<div id="frmt" class="demo"></div>
<h1>AJAX demo</h1>
<div id="ajax" class="demo"></div>
<h1>Lazy loading demo</h1>
<div id="lazy" class="demo"></div>
<h1>Callback function data demo</h1>
<div id="clbk" class="demo"></div>
<h1>Interaction and events demo</h1>
<button id="evts_button">select node with id 1</button> <em>either click the button or a node in the tree</em>
<div id="evts" class="demo"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="../../dist/jstree.min.js"></script>
<script>
// html demo
$('#html').jstree();
// inline data demo
$('#data').jstree({
'core' : {
'data' : [
{ "text" : "Root node", "children" : [
{ "text" : "Child node 1" },
{ "text" : "Child node 2" }
]}
]
}
});
// data format demo
$('#frmt').jstree({
'core' : {
'data' : [
{
"text" : "Root node",
"state" : { "opened" : true },
"children" : [
{
"text" : "Child node 1",
"state" : { "selected" : true },
"icon" : "jstree-file"
},
{ "text" : "Child node 2", "state" : { "disabled" : true } }
]
}
]
}
});
// ajax demo
$('#ajax').jstree({
'core' : {
'data' : {
"url" : "./root.json",
"dataType" : "json" // needed only if you do not supply JSON headers
}
}
});
// lazy demo
$('#lazy').jstree({
'core' : {
'data' : {
"url" : "//www.jstree.com/fiddle/?lazy",
"data" : function (node) {
return { "id" : node.id };
}
}
}
});
// data from callback
$('#clbk').jstree({
'core' : {
'data' : function (node, cb) {
if(node.id === "#") {
cb([{"text" : "Root", "id" : "1", "children" : true}]);
}
else {
cb(["Child"]);
}
}
}
});
// interaction and events
$('#evts_button').on("click", function () {
var instance = $('#evts').jstree(true);
instance.deselect_all();
instance.select_node('1');
});
$('#evts')
.on("changed.jstree", function (e, data) {
if(data.selected.length) {
alert('The selected node is: ' + data.instance.get_node(data.selected[0]).text);
}
})
.jstree({
'core' : {
'multiple' : false,
'data' : [
{ "text" : "Root node", "children" : [
{ "text" : "Child node 1", "id" : 1 },
{ "text" : "Child node 2" }
]}
]
}
});
</script>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jstree basic demos</title>
<style>
html { margin:0; padding:0; font-size:62.5%; }
body { max-width:800px; min-width:300px; margin:0 auto; padding:20px 10px; font-size:14px; font-size:1.4em; }
h1 { font-size:1.8em; }
.demo { overflow:auto; border:1px solid silver; min-height:100px; }
</style>
<link rel="stylesheet" href="../../dist/themes/default/style.min.css" />
</head>
<body>
<h1>HTML demo</h1>
<div id="html" class="demo">
<ul>
<li data-jstree='{ "opened" : true }'>Root node
<ul>
<li data-jstree='{ "selected" : true }'>Child node 1</li>
<li>Child node 2</li>
</ul>
</li>
</ul>
</div>
<h1>Inline data demo</h1>
<div id="data" class="demo"></div>
<h1>Data format demo</h1>
<div id="frmt" class="demo"></div>
<h1>AJAX demo</h1>
<div id="ajax" class="demo"></div>
<h1>Lazy loading demo</h1>
<div id="lazy" class="demo"></div>
<h1>Callback function data demo</h1>
<div id="clbk" class="demo"></div>
<h1>Interaction and events demo</h1>
<button id="evts_button">select node with id 1</button> <em>either click the button or a node in the tree</em>
<div id="evts" class="demo"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="../../dist/jstree.min.js"></script>
<script>
// html demo
$('#html').jstree();
// inline data demo
$('#data').jstree({
'core' : {
'data' : [
{ "text" : "Root node", "children" : [
{ "text" : "Child node 1" },
{ "text" : "Child node 2" }
]}
]
}
});
// data format demo
$('#frmt').jstree({
'core' : {
'data' : [
{
"text" : "Root node",
"state" : { "opened" : true },
"children" : [
{
"text" : "Child node 1",
"state" : { "selected" : true },
"icon" : "jstree-file"
},
{ "text" : "Child node 2", "state" : { "disabled" : true } }
]
}
]
}
});
// ajax demo
$('#ajax').jstree({
'core' : {
'data' : {
"url" : "./root.json",
"dataType" : "json" // needed only if you do not supply JSON headers
}
}
});
// lazy demo
$('#lazy').jstree({
'core' : {
'data' : {
"url" : "//www.jstree.com/fiddle/?lazy",
"data" : function (node) {
return { "id" : node.id };
}
}
}
});
// data from callback
$('#clbk').jstree({
'core' : {
'data' : function (node, cb) {
if(node.id === "#") {
cb([{"text" : "Root", "id" : "1", "children" : true}]);
}
else {
cb(["Child"]);
}
}
}
});
// interaction and events
$('#evts_button').on("click", function () {
var instance = $('#evts').jstree(true);
instance.deselect_all();
instance.select_node('1');
});
$('#evts')
.on("changed.jstree", function (e, data) {
if(data.selected.length) {
alert('The selected node is: ' + data.instance.get_node(data.selected[0]).text);
}
})
.jstree({
'core' : {
'multiple' : false,
'data' : [
{ "text" : "Root node", "children" : [
{ "text" : "Child node 1", "id" : 1 },
{ "text" : "Child node 2" }
]}
]
}
});
</script>
</body>
</html>

View file

@ -1,50 +1,50 @@
/* jsTree default dark theme */
@theme-name: default-dark;
@hovered-bg-color: #555;
@hovered-shadow-color: #555;
@disabled-color: #666666;
@disabled-bg-color: #333333;
@clicked-bg-color: #5fa2db;
@clicked-shadow-color: #666666;
@clicked-gradient-color-1: #5fa2db;
@clicked-gradient-color-2: #5fa2db;
@search-result-color: #ffffff;
@mobile-wholerow-bg-color: #333333;
@mobile-wholerow-shadow: #111111;
@mobile-wholerow-bordert: #666;
@mobile-wholerow-borderb: #000;
@responsive: true;
@image-path: "";
@base-height: 40px;
@import "../mixins.less";
@import "../base.less";
@import "../main.less";
.jstree-@{theme-name} {
background:#333;
.jstree-anchor { color:#999; text-shadow:1px 1px 0 rgba(0,0,0,0.5); }
.jstree-clicked, .jstree-checked { color:white; }
.jstree-hovered { color:white; }
#jstree-marker& {
border-left-color:#999;
background:transparent;
}
.jstree-anchor > .jstree-icon { opacity:0.75; }
.jstree-clicked > .jstree-icon,
.jstree-hovered > .jstree-icon,
.jstree-checked > .jstree-icon { opacity:1; }
}
// theme variants
.jstree-@{theme-name} {
&.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); }
&.jstree-rtl .jstree-last { background:transparent; }
}
.jstree-@{theme-name}-small {
&.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); }
&.jstree-rtl .jstree-last { background:transparent; }
}
.jstree-@{theme-name}-large {
&.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); }
&.jstree-rtl .jstree-last { background:transparent; }
/* jsTree default dark theme */
@theme-name: default-dark;
@hovered-bg-color: #555;
@hovered-shadow-color: #555;
@disabled-color: #666666;
@disabled-bg-color: #333333;
@clicked-bg-color: #5fa2db;
@clicked-shadow-color: #666666;
@clicked-gradient-color-1: #5fa2db;
@clicked-gradient-color-2: #5fa2db;
@search-result-color: #ffffff;
@mobile-wholerow-bg-color: #333333;
@mobile-wholerow-shadow: #111111;
@mobile-wholerow-bordert: #666;
@mobile-wholerow-borderb: #000;
@responsive: true;
@image-path: "";
@base-height: 40px;
@import "../mixins.less";
@import "../base.less";
@import "../main.less";
.jstree-@{theme-name} {
background:#333;
.jstree-anchor { color:#999; text-shadow:1px 1px 0 rgba(0,0,0,0.5); }
.jstree-clicked, .jstree-checked { color:white; }
.jstree-hovered { color:white; }
#jstree-marker& {
border-left-color:#999;
background:transparent;
}
.jstree-anchor > .jstree-icon { opacity:0.75; }
.jstree-clicked > .jstree-icon,
.jstree-hovered > .jstree-icon,
.jstree-checked > .jstree-icon { opacity:1; }
}
// theme variants
.jstree-@{theme-name} {
&.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); }
&.jstree-rtl .jstree-last { background:transparent; }
}
.jstree-@{theme-name}-small {
&.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); }
&.jstree-rtl .jstree-last { background:transparent; }
}
.jstree-@{theme-name}-large {
&.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); }
&.jstree-rtl .jstree-last { background:transparent; }
}

View file

@ -1,22 +1,22 @@
/* jsTree default theme */
@theme-name: default;
@hovered-bg-color: #e7f4f9;
@hovered-shadow-color: #cccccc;
@disabled-color: #666666;
@disabled-bg-color: #efefef;
@clicked-bg-color: #beebff;
@clicked-shadow-color: #999999;
@clicked-gradient-color-1: #beebff;
@clicked-gradient-color-2: #a8e4ff;
@search-result-color: #8b0000;
@mobile-wholerow-bg-color: #ebebeb;
@mobile-wholerow-shadow: #666666;
@mobile-wholerow-bordert: rgba(255,255,255,0.7);
@mobile-wholerow-borderb: rgba(64,64,64,0.2);
@responsive: true;
@image-path: "";
@base-height: 40px;
@import "../mixins.less";
@import "../base.less";
/* jsTree default theme */
@theme-name: default;
@hovered-bg-color: #e7f4f9;
@hovered-shadow-color: #cccccc;
@disabled-color: #666666;
@disabled-bg-color: #efefef;
@clicked-bg-color: #beebff;
@clicked-shadow-color: #999999;
@clicked-gradient-color-1: #beebff;
@clicked-gradient-color-2: #a8e4ff;
@search-result-color: #8b0000;
@mobile-wholerow-bg-color: #ebebeb;
@mobile-wholerow-shadow: #666666;
@mobile-wholerow-bordert: rgba(255,255,255,0.7);
@mobile-wholerow-borderb: rgba(64,64,64,0.2);
@responsive: true;
@image-path: "";
@base-height: 40px;
@import "../mixins.less";
@import "../base.less";
@import "../main.less";

View file

@ -1,67 +1,67 @@
@media (max-width: 768px) {
// background image
.jstree-icon { background-image:url("@{image-path}@{base-height}.png"); }
.jstree-node,
.jstree-leaf > .jstree-ocl { background:transparent; }
.jstree-node { min-height:@base-height; line-height:@base-height; margin-left:@base-height; min-width:@base-height; white-space:nowrap; }
.jstree-anchor { line-height:@base-height; height:@base-height; }
.jstree-icon, .jstree-icon:empty { width:@base-height; height:@base-height; line-height:@base-height; }
> .jstree-container-ul > .jstree-node { margin-left:0; }
&.jstree-rtl .jstree-node { margin-left:0; margin-right:@base-height; background:transparent; }
&.jstree-rtl .jstree-container-ul > .jstree-node { margin-right:0; }
.jstree-ocl,
.jstree-themeicon,
.jstree-checkbox { background-size:(@base-height * 3) (@base-height * 6); }
.jstree-leaf > .jstree-ocl,
&.jstree-rtl .jstree-leaf > .jstree-ocl { background:transparent; }
.jstree-open > .jstree-ocl { background-position:0 0px !important; }
.jstree-closed > .jstree-ocl { background-position:0 -(@base-height * 1) !important; }
&.jstree-rtl .jstree-closed > .jstree-ocl { background-position:-(@base-height * 1) 0px !important; }
.jstree-themeicon { background-position:-(@base-height * 1) -(@base-height * 1); }
.jstree-checkbox, .jstree-checkbox:hover { background-position:-(@base-height * 1) -(@base-height * 2); }
&.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
&.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
.jstree-checked > .jstree-checkbox,
.jstree-checked > .jstree-checkbox:hover { background-position:0 -(@base-height * 2); }
.jstree-anchor > .jstree-undetermined, .jstree-anchor > .jstree-undetermined:hover { background-position:0 -(@base-height * 3); }
.jstree-anchor { font-weight:bold; font-size:1.1em; text-shadow:1px 1px white; }
> .jstree-striped { background:transparent; }
.jstree-wholerow { border-top:1px solid @mobile-wholerow-bordert; border-bottom:1px solid @mobile-wholerow-borderb; background:@mobile-wholerow-bg-color; height:@base-height; }
.jstree-wholerow-hovered { background:@hovered-bg-color; }
.jstree-wholerow-clicked { background:@clicked-bg-color; }
// thanks to PHOTONUI
.jstree-children .jstree-last > .jstree-wholerow { box-shadow: inset 0 -6px 3px -5px @mobile-wholerow-shadow; }
.jstree-children .jstree-open > .jstree-wholerow { box-shadow: inset 0 6px 3px -5px @mobile-wholerow-shadow; border-top:0; }
.jstree-children .jstree-open + .jstree-open { box-shadow:none; }
// experiment
.jstree-node,
.jstree-icon,
.jstree-node > .jstree-ocl,
.jstree-themeicon,
.jstree-checkbox { background-image:url("@{image-path}@{base-height}.png"); background-size:(@base-height * 3) (@base-height * 6); }
.jstree-node { background-position:-(@base-height * 2) 0; background-repeat:repeat-y; }
.jstree-last { background:transparent; }
.jstree-leaf > .jstree-ocl { background-position:-(@base-height * 1) -(@base-height * 3); }
.jstree-last > .jstree-ocl { background-position:-(@base-height * 1) -(@base-height * 4); }
/*
.jstree-open > .jstree-ocl,
.jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; }
*/
.jstree-themeicon-custom { background-color:transparent; background-image:none; background-position:0 0; }
.jstree-file { background:url("@{image-path}@{base-height}.png") 0 -(@base-height * 4) no-repeat; background-size:(@base-height * 3) (@base-height * 6); }
.jstree-folder { background:url("@{image-path}@{base-height}.png") -(@base-height * 1) -(@base-height * 1) no-repeat; background-size:(@base-height * 3) (@base-height * 6); }
> .jstree-container-ul > .jstree-node { margin-left:0; margin-right:0; }
@media (max-width: 768px) {
// background image
.jstree-icon { background-image:url("@{image-path}@{base-height}.png"); }
.jstree-node,
.jstree-leaf > .jstree-ocl { background:transparent; }
.jstree-node { min-height:@base-height; line-height:@base-height; margin-left:@base-height; min-width:@base-height; white-space:nowrap; }
.jstree-anchor { line-height:@base-height; height:@base-height; }
.jstree-icon, .jstree-icon:empty { width:@base-height; height:@base-height; line-height:@base-height; }
> .jstree-container-ul > .jstree-node { margin-left:0; }
&.jstree-rtl .jstree-node { margin-left:0; margin-right:@base-height; background:transparent; }
&.jstree-rtl .jstree-container-ul > .jstree-node { margin-right:0; }
.jstree-ocl,
.jstree-themeicon,
.jstree-checkbox { background-size:(@base-height * 3) (@base-height * 6); }
.jstree-leaf > .jstree-ocl,
&.jstree-rtl .jstree-leaf > .jstree-ocl { background:transparent; }
.jstree-open > .jstree-ocl { background-position:0 0px !important; }
.jstree-closed > .jstree-ocl { background-position:0 -(@base-height * 1) !important; }
&.jstree-rtl .jstree-closed > .jstree-ocl { background-position:-(@base-height * 1) 0px !important; }
.jstree-themeicon { background-position:-(@base-height * 1) -(@base-height * 1); }
.jstree-checkbox, .jstree-checkbox:hover { background-position:-(@base-height * 1) -(@base-height * 2); }
&.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
&.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
.jstree-checked > .jstree-checkbox,
.jstree-checked > .jstree-checkbox:hover { background-position:0 -(@base-height * 2); }
.jstree-anchor > .jstree-undetermined, .jstree-anchor > .jstree-undetermined:hover { background-position:0 -(@base-height * 3); }
.jstree-anchor { font-weight:bold; font-size:1.1em; text-shadow:1px 1px white; }
> .jstree-striped { background:transparent; }
.jstree-wholerow { border-top:1px solid @mobile-wholerow-bordert; border-bottom:1px solid @mobile-wholerow-borderb; background:@mobile-wholerow-bg-color; height:@base-height; }
.jstree-wholerow-hovered { background:@hovered-bg-color; }
.jstree-wholerow-clicked { background:@clicked-bg-color; }
// thanks to PHOTONUI
.jstree-children .jstree-last > .jstree-wholerow { box-shadow: inset 0 -6px 3px -5px @mobile-wholerow-shadow; }
.jstree-children .jstree-open > .jstree-wholerow { box-shadow: inset 0 6px 3px -5px @mobile-wholerow-shadow; border-top:0; }
.jstree-children .jstree-open + .jstree-open { box-shadow:none; }
// experiment
.jstree-node,
.jstree-icon,
.jstree-node > .jstree-ocl,
.jstree-themeicon,
.jstree-checkbox { background-image:url("@{image-path}@{base-height}.png"); background-size:(@base-height * 3) (@base-height * 6); }
.jstree-node { background-position:-(@base-height * 2) 0; background-repeat:repeat-y; }
.jstree-last { background:transparent; }
.jstree-leaf > .jstree-ocl { background-position:-(@base-height * 1) -(@base-height * 3); }
.jstree-last > .jstree-ocl { background-position:-(@base-height * 1) -(@base-height * 4); }
/*
.jstree-open > .jstree-ocl,
.jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; }
*/
.jstree-themeicon-custom { background-color:transparent; background-image:none; background-position:0 0; }
.jstree-file { background:url("@{image-path}@{base-height}.png") 0 -(@base-height * 4) no-repeat; background-size:(@base-height * 3) (@base-height * 6); }
.jstree-folder { background:url("@{image-path}@{base-height}.png") -(@base-height * 1) -(@base-height * 1) no-repeat; background-size:(@base-height * 3) (@base-height * 6); }
> .jstree-container-ul > .jstree-node { margin-left:0; margin-right:0; }
}

View file

@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Test Suite</title>
<!-- Load local QUnit. -->
<link rel="stylesheet" href="libs/qunit.css" media="screen">
<script src="libs/qunit.js"></script>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture">this had better work.</div>
<!-- Load local lib and tests. -->
<script src="test.js"></script>
</body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Test Suite</title>
<!-- Load local QUnit. -->
<link rel="stylesheet" href="libs/qunit.css" media="screen">
<script src="libs/qunit.js"></script>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture">this had better work.</div>
<!-- Load local lib and tests. -->
<script src="test.js"></script>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,11 @@
test('basic test', function() {
expect(1);
ok(true, 'this had better work.');
});
test('can access the DOM', function() {
expect(1);
var fixture = document.getElementById('qunit-fixture');
equal(fixture.innerText || fixture.textContent, 'this had better work.', 'should be able to access the DOM.');
test('basic test', function() {
expect(1);
ok(true, 'this had better work.');
});
test('can access the DOM', function() {
expect(1);
var fixture = document.getElementById('qunit-fixture');
equal(fixture.innerText || fixture.textContent, 'this had better work.', 'should be able to access the DOM.');
});

View file

@ -1,44 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Light theme visual tests</title>
<link rel="stylesheet" href="../../../dist/themes/default/style.min.css">
<link rel="stylesheet" href="../../../dist/themes/default-dark/style.min.css">
<style>.tree { border:1px solid black; padding:10px; width:300px; margin:20px; float:left; min-height:200px; }</style>
</head>
<body style="background:white;">
<div class="tree" id="empty"></div>
<div class="tree" id="core"><ul><li>asdf</li></ul></div>
<div class="tree" id="tree">
<ul>
<li>Node 01
<ul>
<li>Node</li>
<li>Node</li>
</ul>
</li>
<li>Node 02</li>
<li data-jstree='{"opened" : true}'>Node 03
<ul>
<li>Node</li>
<li>Node</li>
</ul>
</li>
<li>Node 04</li>
<li>Node 05</li>
</ul>
</div>
<div class="tree" id="full"><ul><li data-jstree='{ "selected" : true, "type" : "file" }'>full</li><li>asdf</li></ul></div>
<div class="tree" id="dark"><ul><li data-jstree='{ "selected" : true, "type" : "file"}'>full</li><li>asdf</li></ul></div>
<script src="./../../../dist/libs/jquery.js"></script>
<script src="../../../dist/jstree.min.js"></script>
<script>
$('#empty').jstree();
$('#tree, #core').jstree();
$('#full').jstree({ plugins : ["checkbox","sort","types","wholerow"], "types" : { "file" : { "icon" : "jstree-file" } } });
$('#dark').jstree({ plugins : ["checkbox","sort","types","wholerow"], "core" : { "themes" : { "name" : "default-dark" } }, "types" : { "file" : { "icon" : "jstree-file" } } });
</script>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Light theme visual tests</title>
<link rel="stylesheet" href="../../../dist/themes/default/style.min.css">
<link rel="stylesheet" href="../../../dist/themes/default-dark/style.min.css">
<style>.tree { border:1px solid black; padding:10px; width:300px; margin:20px; float:left; min-height:200px; }</style>
</head>
<body style="background:white;">
<div class="tree" id="empty"></div>
<div class="tree" id="core"><ul><li>asdf</li></ul></div>
<div class="tree" id="tree">
<ul>
<li>Node 01
<ul>
<li>Node</li>
<li>Node</li>
</ul>
</li>
<li>Node 02</li>
<li data-jstree='{"opened" : true}'>Node 03
<ul>
<li>Node</li>
<li>Node</li>
</ul>
</li>
<li>Node 04</li>
<li>Node 05</li>
</ul>
</div>
<div class="tree" id="full"><ul><li data-jstree='{ "selected" : true, "type" : "file" }'>full</li><li>asdf</li></ul></div>
<div class="tree" id="dark"><ul><li data-jstree='{ "selected" : true, "type" : "file"}'>full</li><li>asdf</li></ul></div>
<script src="./../../../dist/libs/jquery.js"></script>
<script src="../../../dist/jstree.min.js"></script>
<script>
$('#empty').jstree();
$('#tree, #core').jstree();
$('#full').jstree({ plugins : ["checkbox","sort","types","wholerow"], "types" : { "file" : { "icon" : "jstree-file" } } });
$('#dark').jstree({ plugins : ["checkbox","sort","types","wholerow"], "core" : { "themes" : { "name" : "default-dark" } }, "types" : { "file" : { "icon" : "jstree-file" } } });
</script>
</body>
</html>

View file

@ -1,42 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mobile theme visual tests</title>
<link rel="stylesheet" href="../../../dist/themes/default/style.min.css">
<link rel="stylesheet" href="../../../dist/themes/default-dark/style.min.css">
<style>.tree { border:1px solid black; padding:10px; width:300px; margin:20px; float:left; min-height:200px; }</style>
</head>
<body style="background:white;">
<div class="tree" id="tree">
<ul>
<li>Node 01
<ul>
<li>Node</li>
<li>Node</li>
</ul>
</li>
<li>Node 02</li>
<li data-jstree='{"opened" : true}'>Node 03
<ul>
<li>Node</li>
<li>Node</li>
</ul>
</li>
<li>Node 04</li>
<li>Node 05</li>
</ul>
</div>
<div class="tree" id="full"><ul><li data-jstree='{ "selected" : true, "type" : "file" }'>full</li><li>asdf</li></ul></div>
<div class="tree" id="dark"><ul><li data-jstree='{ "selected" : true, "type" : "file"}'>full</li><li>asdf</li></ul></div>
<script src="./../../../dist/libs/jquery.js"></script>
<script src="../../../dist/jstree.min.js"></script>
<script>
$.jstree.defaults.core.themes.responsive = true;
$('#tree').jstree();
$('#full').jstree({ plugins : ["checkbox","sort","types","wholerow"], "types" : { "file" : { "icon" : "jstree-file" } } });
$('#dark').jstree({ plugins : ["checkbox","sort","types","wholerow"], "core" : { "themes" : { "name" : "default-dark" } }, "types" : { "file" : { "icon" : "jstree-file" } } });
</script>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mobile theme visual tests</title>
<link rel="stylesheet" href="../../../dist/themes/default/style.min.css">
<link rel="stylesheet" href="../../../dist/themes/default-dark/style.min.css">
<style>.tree { border:1px solid black; padding:10px; width:300px; margin:20px; float:left; min-height:200px; }</style>
</head>
<body style="background:white;">
<div class="tree" id="tree">
<ul>
<li>Node 01
<ul>
<li>Node</li>
<li>Node</li>
</ul>
</li>
<li>Node 02</li>
<li data-jstree='{"opened" : true}'>Node 03
<ul>
<li>Node</li>
<li>Node</li>
</ul>
</li>
<li>Node 04</li>
<li>Node 05</li>
</ul>
</div>
<div class="tree" id="full"><ul><li data-jstree='{ "selected" : true, "type" : "file" }'>full</li><li>asdf</li></ul></div>
<div class="tree" id="dark"><ul><li data-jstree='{ "selected" : true, "type" : "file"}'>full</li><li>asdf</li></ul></div>
<script src="./../../../dist/libs/jquery.js"></script>
<script src="../../../dist/jstree.min.js"></script>
<script>
$.jstree.defaults.core.themes.responsive = true;
$('#tree').jstree();
$('#full').jstree({ plugins : ["checkbox","sort","types","wholerow"], "types" : { "file" : { "icon" : "jstree-file" } } });
$('#dark').jstree({ plugins : ["checkbox","sort","types","wholerow"], "core" : { "themes" : { "name" : "default-dark" } }, "types" : { "file" : { "icon" : "jstree-file" } } });
</script>
</body>
</html>