Skip to content

Commit 1f072f8

Browse files
committed
investigation: add logs to controleurs.js
1 parent 58a660f commit 1f072f8

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

plugins/thematique/squelettes/js/controleurs.js

+33-2
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ function showReponseInTimeline(numero) {
392392
*/
393393

394394
function call(opts) {
395-
console.log(opts);
395+
console.log('opts', opts);
396396

397397
if (opts.type == 'rubrique' && opts.type_objet == 'travail_en_cours') {
398398
toggleSidebarExpand();
@@ -463,11 +463,17 @@ function callReponse(id_reponse) {
463463
setFullscreenModeToCols(true);
464464

465465
var id_consigne = getIdConsigneFromIdReponse(id_reponse);
466+
console.log('id_consigne', id_consigne);
467+
466468
var id_classe = getIdClasseFromIdReponse(id_reponse);
469+
console.log('id_classe', id_classe);
470+
467471

468472
updateMenuIcon(['consignes-' + id_consigne, 'classes-' + id_classe], 'mainView');
469473

470474
var url = CCN.projet.url_popup_reponse + "&id_article=" + id_reponse;
475+
console.log('url', url);
476+
471477
showConsigneInTimeline(id_consigne);
472478

473479
loadContentInMainSidebar(
@@ -482,11 +488,19 @@ function callReponse(id_reponse) {
482488
);
483489
}
484490
);
491+
console.log('load content in main sidebar ended');
492+
485493

486494
var url_travail_en_cours = 'spip.php?page=rubrique&mode=detail&id_rubrique=' + CCN.travailEnCoursId;
495+
console.log('url_travail_en_cours', url_travail_en_cours);
496+
497+
console.log('load content in lateral sidebar start');
487498
loadContentInLateralSidebar(url_travail_en_cours, 'rubrique', 'travail_en_cours');
499+
console.log('load content in lateral sidebar end');
488500

489501
showReponseInTimeline(id_reponse);
502+
console.log('end callReponse');
503+
490504
}
491505

492506

@@ -979,13 +993,21 @@ function changeCouleurLogoMenu(val) {
979993
*/
980994

981995
function updateUrl(object, title, url) {
996+
console.log('updateUrl (callback from loadContentInMainSidebar', object, title, url);
997+
982998
currentState = object;
983999

1000+
console.log('CCN.hash', CCN.hash);
1001+
9841002
if (CCN.hash != '') {
985-
if (CCN.hash.substring(0, 5) == 'forum') {
1003+
if (CCN.hash.substring(0, 5) == 'forum') { console.log('forum l-9995');
9861004

9871005
} else {
1006+
console.log('!forum l-9998');
1007+
9881008
History.pushState(object, title, url + '#' + CCN.hash);
1009+
console.log('push end l-1001');
1010+
9891011
}
9901012

9911013
setTimeout(
@@ -1008,9 +1030,14 @@ function updateUrl(object, title, url) {
10081030
}, 500
10091031
);
10101032
} else {
1033+
console.log('ccn.hash == empty l-1028');
10111034
History.pushState(object, title, url);
1035+
console.log('push end l-1027');
10121036
}
10131037
antiPushState = false;
1038+
1039+
console.log('updateUrl end l-1031');
1040+
10141041
}
10151042

10161043

@@ -1059,6 +1086,8 @@ function reload(url) {
10591086
*/
10601087

10611088
function loadContentInMainSidebar(url, typePage, typeObjet, callback) {
1089+
console.log('loading content in main sidebar', 'url:', url, 'typePage:', typePage, 'typeObjet:', typeObjet);
1090+
10621091

10631092
$('body').addClass('loading');
10641093
showSidebar();
@@ -1104,6 +1133,8 @@ function loadContentInMainSidebar(url, typePage, typeObjet, callback) {
11041133
*/
11051134

11061135
function loadContentInLateralSidebar(url, typePage, typeObjet, callback) {
1136+
console.log('loading content in lateral sidebar', 'url:', url, 'typePage:', typePage, 'typeObjet:', typeObjet);
1137+
11071138
console.log(
11081139
'%c Lateral' + ' %c ' + url + ' ',
11091140
'background:#FFA000;color:#fff;padding:2px;border-radius:2px;',

0 commit comments

Comments
 (0)