Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
odoscope stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Davis committed Sep 18, 2017
1 parent 4d975c9 commit 94fda4f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/infinite_odoscope/infinite_odoscope.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ odoscope.manager:
version: 1
# header: true
js:
js/managers/odoscope-manager.js: { }
js/managers/odoscope-manager.js: { }

odoscope.article:
version: 1
Expand Down
18 changes: 12 additions & 6 deletions modules/infinite_odoscope/js/managers/odoscope-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
OdoscopeManager.getInstance().activate(tmpOdoscopeAttr);
};

window.oscInitializeArticlePageRendering = function (pDecisionFunction, pConfig, p1, p2) {
console.log("%codoscope | articlePageRendering", "color: green; font-weight: bold;", pConfig, p1, p2);
window.oscInitializeArticlePageRendering = function (pDecisionFunction, pConfig) {
console.log("%codoscope | articlePageRendering", "color: green; font-weight: bold;", pConfig);

pDecisionFunction({}, function (pArticles, p1, p2) {
console.log("%codoscope | articlePageRendering | decision", "color: green; font-weight: bold;", OdoscopeManager.getInstance().getGroup(), pArticles, p1, p2);
Expand Down Expand Up @@ -120,11 +120,17 @@
if (typeof window.oscCallbackCalls != "undefined") {
$(document).ready(function () {

_.delay(function () {
jQuery(window.oscCallbackCalls).each(function (pIndex, pItem) {
jQuery(window.oscCallbackCalls).each(function (pIndex, pItem) {
if (pItem.functionName == "oscInfiniteBlockViewUpdated") {

_.delay(function () {
window[pItem.functionName].apply(null, pItem.arguments);
}, 0);
} else {
window[pItem.functionName].apply(null, pItem.arguments);
});
}, 1);
}

});

});
}
Expand Down
9 changes: 9 additions & 0 deletions modules/infinite_odoscope/js/utils/head-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,13 @@ window.oscTeaserElementReplaced = function () {
arguments: [].slice.call(arguments)
}
);
};

window.oscInitializeArticlePageRendering = function () {
window.oscCallbackCalls.push(
{
functionName: 'oscInitializeArticlePageRendering',
arguments: [].slice.call(arguments)
}
);
};

0 comments on commit 94fda4f

Please sign in to comment.