bug fix
This commit is contained in:
@@ -59,7 +59,9 @@
|
|||||||
var _$articles_link;
|
var _$articles_link;
|
||||||
var _node_pop_up;
|
var _node_pop_up;
|
||||||
// Colors depend on drupalSettings loaded by edlp_corpus.module
|
// Colors depend on drupalSettings loaded by edlp_corpus.module
|
||||||
var _ecolors = drupalSettings.edlp_corpus.colors;
|
var _settings = drupalSettings.edlp_corpus;
|
||||||
|
// load_corpus_ajax_url
|
||||||
|
var _ecolors = _settings.colors;
|
||||||
//console.log('Corpus : _ecolors', _ecolors);
|
//console.log('Corpus : _ecolors', _ecolors);
|
||||||
// Physics
|
// Physics
|
||||||
var _attracter,
|
var _attracter,
|
||||||
@@ -114,7 +116,9 @@
|
|||||||
function loadCorpus(){
|
function loadCorpus(){
|
||||||
// console.log('drupalSettings',drupalSettings);
|
// console.log('drupalSettings',drupalSettings);
|
||||||
// console.log('window.location', window.location);
|
// console.log('window.location', window.location);
|
||||||
var path = window.location.origin + drupalSettings.basepath + "edlp/corpus";
|
// var path = window.location.origin + drupalSettings.basepath + "edlp/corpus";
|
||||||
|
var ajax_path = _settings.load_corpus_ajax_url;
|
||||||
|
var path = window.location.origin + Drupal.url(ajax_path);
|
||||||
$.getJSON(path, {})
|
$.getJSON(path, {})
|
||||||
.done(function(data){
|
.done(function(data){
|
||||||
onCorpusLoaded(data);
|
onCorpusLoaded(data);
|
||||||
|
|||||||
@@ -59,7 +59,9 @@
|
|||||||
var _$articles_link;
|
var _$articles_link;
|
||||||
var _node_pop_up;
|
var _node_pop_up;
|
||||||
// Colors depend on drupalSettings loaded by edlp_corpus.module
|
// Colors depend on drupalSettings loaded by edlp_corpus.module
|
||||||
var _ecolors = drupalSettings.edlp_corpus.colors;
|
var _settings = drupalSettings.edlp_corpus;
|
||||||
|
// load_corpus_ajax_url
|
||||||
|
var _ecolors = _settings.colors;
|
||||||
//console.log('Corpus : _ecolors', _ecolors);
|
//console.log('Corpus : _ecolors', _ecolors);
|
||||||
// Physics
|
// Physics
|
||||||
var _attracter,
|
var _attracter,
|
||||||
@@ -114,7 +116,9 @@
|
|||||||
function loadCorpus(){
|
function loadCorpus(){
|
||||||
// console.log('drupalSettings',drupalSettings);
|
// console.log('drupalSettings',drupalSettings);
|
||||||
// console.log('window.location', window.location);
|
// console.log('window.location', window.location);
|
||||||
var path = window.location.origin + drupalSettings.basepath + "edlp/corpus";
|
// var path = window.location.origin + drupalSettings.basepath + "edlp/corpus";
|
||||||
|
var ajax_path = _settings.load_corpus_ajax_url;
|
||||||
|
var path = window.location.origin + Drupal.url(ajax_path);
|
||||||
$.getJSON(path, {})
|
$.getJSON(path, {})
|
||||||
.done(function(data){
|
.done(function(data){
|
||||||
onCorpusLoaded(data);
|
onCorpusLoaded(data);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
use Drupal\Core\Entity\EntityInterface;
|
use Drupal\Core\Entity\EntityInterface;
|
||||||
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
|
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
|
||||||
|
use Drupal\Core\Url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements hook_theme().
|
* Implements hook_theme().
|
||||||
@@ -137,6 +138,9 @@ function edlp_corpus_page_attachments(array &$attachments) {
|
|||||||
|
|
||||||
$attachments['#attached']['drupalSettings']['edlp_corpus']['colors'] = $js_list;
|
$attachments['#attached']['drupalSettings']['edlp_corpus']['colors'] = $js_list;
|
||||||
|
|
||||||
|
// load corpus
|
||||||
|
$url = Url::fromRoute('edlp_corpus.corpusjson');
|
||||||
|
$attachments['#attached']['drupalSettings']['edlp_corpus']['load_corpus_ajax_url'] = $url->getInternalPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
edlp_search-library:
|
edlp_search-library:
|
||||||
js:
|
js:
|
||||||
assets/scripts/edlp_search.js: { scope: footer }
|
assets/dist/scripts/edlp_search.min.js: { scope: footer }
|
||||||
dependencies:
|
dependencies:
|
||||||
- core/drupalSettings
|
- core/drupalSettings
|
||||||
- core/jquery
|
- core/jquery
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
edlp_studio-library:
|
edlp_studio-library:
|
||||||
js:
|
js:
|
||||||
assets/scripts/edlp_studio.js: { scope: footer }
|
assets/dist/scripts/edlp_studio.min.js: { scope: footer }
|
||||||
dependencies:
|
dependencies:
|
||||||
- core/drupalSettings
|
- core/drupalSettings
|
||||||
- core/jquery
|
- core/jquery
|
||||||
|
|||||||
Reference in New Issue
Block a user