diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-10-08 07:19:33 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-10-09 12:01:56 +0100 |
| commit | 71378461661e7642e52abe7d41c9cfffb3e5369b (patch) | |
| tree | 3542baf9d94e2361fcf3858badef30c75048b974 /resources/js/treeview.js | |
| parent | 01202f8037e516171a36f999e52383b38b2f3b10 (diff) | |
| download | webtrees-71378461661e7642e52abe7d41c9cfffb3e5369b.tar.gz webtrees-71378461661e7642e52abe7d41c9cfffb3e5369b.tar.bz2 webtrees-71378461661e7642e52abe7d41c9cfffb3e5369b.zip | |
Working on routing
Diffstat (limited to 'resources/js/treeview.js')
| -rw-r--r-- | resources/js/treeview.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/resources/js/treeview.js b/resources/js/treeview.js index b625d43f30..0b2f1b90f7 100644 --- a/resources/js/treeview.js +++ b/resources/js/treeview.js @@ -24,7 +24,8 @@ function TreeViewHandler(treeview_instance, ged) { this.boxWidth = 180; // default family box width this.boxExpandedWidth = 250; // default expanded family box width this.cookieDays = 3; // lifetime of preferences memory, in days - this.ajaxUrl = "index.php?route=module&module=tree&ged=" + encodeURIComponent(ged) + "&instance=" + treeview_instance + "&action="; + this.ajaxUrl1 = "index.php?route=/module/tree/"; + this.ajaxUrl2 = "&ged=" + encodeURIComponent(ged) + "&instance=" + treeview_instance; this.container = this.treeview.parent(); // Store the container element ("#" + treeview_instance + "_out") this.auto_box_width = false; @@ -175,7 +176,7 @@ TreeViewHandler.prototype.updateTree = function (center, button) { tv.updating = true; tv.setLoading(); jQuery.ajax({ - url: tv.ajaxUrl + "Persons", + url: tv.ajaxUrl1 + "Persons" + tv.ajaxUrl2, dataType: "json", data: "q=" + to_load.join(";"), success: function (ret) { @@ -310,7 +311,7 @@ TreeViewHandler.prototype.expandBox = function (box, event) { tv.updating = true; tv.setLoading(); // perform the Ajax request and load the result in the box - box.load(tv.ajaxUrl + "Details&pid=" + pid, function () { + box.load(tv.ajaxUrl1 + "Details&pid=" + pid + tv.ajaxUrl2, function () { // If Lightbox module is active, we reinitialize it for the new links if (typeof CB_Init === "function") { CB_Init(); |
