Skip to content
Snippets Groups Projects
Commit 8fe64b88 authored by Mingsong Hu's avatar Mingsong Hu
Browse files

Issue #3437801 by Mingsong: Drupal in a subdirectory

parent d1617423
No related branches found
No related tags found
No related merge requests found
...@@ -63,11 +63,7 @@ ...@@ -63,11 +63,7 @@
treeContainer.jstree({ treeContainer.jstree({
core: { core: {
data: { data: {
url: function(node) { url: dataURL,
return Drupal.url(
dataURL
);
},
data: function(node) { data: function(node) {
return { return {
id: node.id, id: node.id,
......
...@@ -164,10 +164,10 @@ class SearchForm extends FormBase { ...@@ -164,10 +164,10 @@ class SearchForm extends FormBase {
// Pass data to js file. // Pass data to js file.
$form['#attached']['drupalSettings'] = [ $form['#attached']['drupalSettings'] = [
'data_url_' . $field_edit_id => mb_substr(Url::fromRoute('entity_reference_tree.json', [ 'data_url_' . $field_edit_id => Url::fromRoute('entity_reference_tree.json', [
'entity_type' => $entity_type, 'entity_type' => $entity_type,
'bundles' => $bundles, 'bundles' => $bundles,
])->toString(), 1) . '?token=' . \Drupal::csrfToken()->get($bundles), ])->toString() . '?token=' . \Drupal::csrfToken()->get($bundles),
'tree_limit_' . $field_edit_id => empty($limit) ? -1 : $limit, 'tree_limit_' . $field_edit_id => empty($limit) ? -1 : $limit,
]; ];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment