Skip to content

Commit cd9175b

Browse files
authored
Merge pull request #634 from cloudscribe/feature/500
Feature/500
2 parents f181ed2 + 5e3f346 commit cd9175b

File tree

4 files changed

+8861
-5176
lines changed

4 files changed

+8861
-5176
lines changed

src/cloudscribe.SimpleContent.Web/js/pagetree.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Author: Joe Audette
22
// Version: 2018-02-12
3+
var tetherInstance;
34
$(function () {
45

56
String.format = function () {
@@ -10,7 +11,7 @@ $(function () {
1011
}
1112
return s;
1213
};
13-
14+
1415
var pageTree = {
1516
ui: {
1617
treeDiv: $('#tree1'),
@@ -49,12 +50,20 @@ $(function () {
4950
pageTree.ui.newChildLink.attr('href', this.urls.newPageUrl + "?parentslug=" + node.slug);
5051
pageTree.ui.pubStatusLabel.html(node.pubstatus);
5152
pageTree.ui.cmdBarDiv.show();
52-
new Tether({
53+
tetherInstance = new Tether({
5354
element: '.commandPanel',
5455
target: '.jqtree-selected',
5556
attachment: 'top left',
5657
targetAttachment: 'top right'
5758
});
59+
setTimeout(function () {
60+
if (tetherInstance) {
61+
tetherInstance.position();
62+
}
63+
});
64+
setTimeout(function () {
65+
tetherInstance.position();
66+
})
5867
if (node.childcount > 1) {
5968
pageTree.ui.sortLi.show();
6069
} else {
@@ -272,3 +281,9 @@ $(function () {
272281
};
273282
pageTree.init();
274283
});
284+
285+
$(window).on('scroll', function () {
286+
if (tetherInstance) {
287+
tetherInstance.position();
288+
}
289+
});

src/cloudscribe.SimpleContent.Web/js/pagetree.min.js

Lines changed: 1 addition & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)