Skip to content

Commit

Permalink
Merge pull request #2913 from amottier/platform-tree-remove-throbber
Browse files Browse the repository at this point in the history
XWIKI-20616: Update jstree files and remove reference to throbber.gif
  • Loading branch information
mflorea authored Jul 26, 2024
2 parents cb9a876 + b290525 commit f568555
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
// base jstree
.jstree-node, .jstree-children, .jstree-container-ul { display:block; margin:0; padding:0; list-style-type:none; list-style-image:none; }
.jstree-node { white-space:nowrap; }
// XWiki customization start
//.jstree-anchor { display:inline-block; color:black; white-space:nowrap; padding:0 4px 0 1px; margin:0; vertical-align:top; }
.jstree-anchor { display:inline-block; white-space:nowrap; padding:0 4px 0 1px; margin:0; vertical-align:top; }
// XWiki customization end
.jstree-anchor:focus { outline:0; }
// XWiki customization start
// .jstree-anchor, .jstree-anchor:link, .jstree-anchor:visited, .jstree-anchor:hover, .jstree-anchor:active { text-decoration:none; color:inherit; }
// .jstree-icon { display:inline-block; text-decoration:none; margin:0; padding:0; vertical-align:top; text-align:center; }
.jstree-anchor, .jstree-anchor:link, .jstree-anchor:visited, .jstree-anchor:hover, .jstree-anchor:active { text-decoration:none; }
.jstree-icon { color:@text-color; display:inline-block; text-decoration:none; margin:0; padding:0; vertical-align:top; text-align:center; }
// XWiki customization end
.jstree-icon:empty { display:inline-block; text-decoration:none; margin:0; padding:0; vertical-align:top; text-align:center; }
.jstree-ocl { cursor:pointer; }
.jstree-leaf > .jstree-ocl { cursor:default; }
Expand All @@ -16,6 +23,7 @@
.jstree-anchor > .jstree-themeicon-hidden { display:none; }
.jstree-hidden, .jstree-node.jstree-hidden { display:none; }

// XWiki customization start
.jstree-no-links {
.jstree-anchor:focus {
outline: 0;
Expand Down Expand Up @@ -43,6 +51,7 @@
text-decoration: none;
}
}
// XWiki customization end

// base jstree rtl
.jstree-rtl {
Expand All @@ -66,6 +75,7 @@
.jstree-contextmenu .jstree-anchor {
-webkit-user-select: none; /* disable selection/Copy of UIWebView */
-webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */
user-select: none;
}
.vakata-context {
display:none;
Expand All @@ -81,6 +91,7 @@
}
> a:focus { outline:0; }
}
.vakata-context-no-icons { margin-left:0; }
.vakata-context-hover > a { position:relative; background-color:#e8eff7; box-shadow:0 0 2px #0a6aa1; }
.vakata-context-separator {
> a, > a:hover { background:white; border:0; border-top:1px solid #e2e3e3; height:1px; min-height:1px; max-height:1px; padding:0; margin:0 0 0 2.4em; border-left:1px solid #e0e0e0; text-shadow:0 0 0 transparent; box-shadow:0 0 0 transparent; border-radius:0; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,26 @@
.jstree-anchor,
.jstree-animated,
.jstree-wholerow { transition:background-color 0.15s, box-shadow 0.15s; }
// XWiki customization start
// .jstree-hovered { background:@hovered-bg-color; border-radius:2px; box-shadow:inset 0 0 1px @hovered-shadow-color; }
// .jstree-context { background:@hovered-bg-color; border-radius:2px; box-shadow:inset 0 0 1px @hovered-shadow-color; }
// .jstree-clicked { background:@clicked-bg-color; border-radius:2px; box-shadow:inset 0 0 1px @clicked-shadow-color; }
.jstree-hovered { background:@hovered-bg-color; border-radius:3px; box-shadow:inset 0 0 1px @hovered-shadow-color; }
.jstree-context { background:@hovered-bg-color; border-radius:3px; box-shadow:inset 0 0 1px @hovered-shadow-color; }
.jstree-clicked { background:@clicked-bg-color; border-radius:3px; box-shadow:inset 0 0 1px @clicked-shadow-color; }
// XWiki customization end
.jstree-no-icons .jstree-anchor > .jstree-themeicon { display:none; }
.jstree-disabled {
// XWiki customization start
// background:transparent; color:@disabled-color;
background:transparent; color:@disabled-color; opacity:@disabled-opacity;
// XWiki customization end
&.jstree-hovered { background:transparent; box-shadow:none; }
&.jstree-clicked { background:@disabled-bg-color; }
// XWiki customization start
// > .jstree-icon { opacity:0.8; filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale"); /* Firefox 10+ */ filter: gray; /* IE6-9 */ -webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */ }
> .jstree-icon { filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale"); /* Firefox 10+ */ filter: gray; /* IE6-9 */ -webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */ }
// XWiki customization end
}
// search
.jstree-search { font-style:italic; color:@search-result-color; font-weight:bold; }
Expand Down Expand Up @@ -43,17 +54,17 @@
.jstree-@{theme-name} {
.jstree-theme(24px, "@{image-path}32px.png", 32px);
&.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); }
&.jstree-rtl .jstree-last { background:transparent; }
&.jstree-rtl .jstree-last { background-image:none; }
}
.jstree-@{theme-name}-small {
.jstree-theme(18px, "@{image-path}32px.png", 32px);
&.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); }
&.jstree-rtl .jstree-last { background:transparent; }
&.jstree-rtl .jstree-last { background-image:none; }
}
.jstree-@{theme-name}-large {
.jstree-theme(32px, "@{image-path}32px.png", 32px);
&.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); }
&.jstree-rtl .jstree-last { background:transparent; }
&.jstree-rtl .jstree-last { background-image:none; }
}

// mobile theme attempt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.jstree-node,
.jstree-icon { background-image:url("@{image}"); }
.jstree-node { background-position:-(@image-height * 9 + @correction) -@correction; background-repeat:repeat-y; }
.jstree-last { background:transparent; }
.jstree-last { background-image:none; }

.jstree-open > .jstree-ocl { background-position:-(@image-height * 4 + @correction) -@correction; }
.jstree-closed > .jstree-ocl { background-position:-(@image-height * 3 + @correction) -@correction; }
Expand Down Expand Up @@ -67,7 +67,7 @@

&.jstree-rtl {
.jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); background-position: 100% 1px; background-repeat:repeat-y; }
.jstree-last { background:transparent; }
.jstree-last { background-image:none; }
.jstree-open > .jstree-ocl { background-position:-(@image-height * 4 + @correction) -(@image-height * 1 + @correction); }
.jstree-closed > .jstree-ocl { background-position:-(@image-height * 3 + @correction) -(@image-height * 1 + @correction); }
.jstree-leaf > .jstree-ocl { background-position:-(@image-height * 2 + @correction) -(@image-height * 1 + @correction); }
Expand All @@ -80,7 +80,10 @@
}
.jstree-themeicon-custom { background-color:transparent; background-image:none; background-position:0 0; }

> .jstree-container-ul .jstree-loading > .jstree-ocl { background:url("@{image-path}throbber.gif") center center no-repeat; }
// XWiki customization start
// This line is commented out compared to upstream source as throbber.gif is not available in xwiki-platofrm-tree-webjar and this style is override in tree.less to use spinner.gif.
// > .jstree-container-ul .jstree-loading > .jstree-ocl { background:url("@{image-path}throbber.gif") center center no-repeat; }
// XWiki customization end

.jstree-file { background:url("@{image}") -(@image-height * 3 + @correction) -(@image-height * 2 + @correction) no-repeat; }
.jstree-folder { background:url("@{image}") -(@image-height * 8 + @correction) -(@correction) no-repeat; }
Expand All @@ -101,5 +104,4 @@
.jstree-ellipsis { overflow: hidden; }
// base height + PADDINGS!
.jstree-ellipsis .jstree-anchor { width: calc(100% ~"-" (@base-height + 5px)); text-overflow: ellipsis; overflow: hidden; }
.jstree-ellipsis.jstree-no-icons .jstree-anchor { width: calc(100% ~"-" 5px); }
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
.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-last { background-image:none; }
.jstree-leaf > .jstree-ocl { background-position:-(@base-height * 1) -(@base-height * 3); }
.jstree-last > .jstree-ocl { background-position:-(@base-height * 1) -(@base-height * 4); }
/*
Expand Down

0 comments on commit f568555

Please sign in to comment.