Foxtrott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70867


Change subject: bugfix (timeline loaded partially)
......................................................................

bugfix (timeline loaded partially)

The Simile timeline module often only loads partially since the ResourceLoader 
was introduced.
Reason seems to be, that it loads its files by appending script tags to the 
head which is
already read by the browser when the ResourceLoader loads modules. Requesting a 
'top' position
for the module seems to fix this.

Second change is the removal of a deprecated function call and replacing it by 
a jQuery event
hook registration.

Change-Id: I656b14198c94da3b9b9bc6e2b587247855faa572
---
M Resources.php
M formats/timeline/resources/ext.srf.timeline.js
2 files changed, 3 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticResultFormats 
refs/changes/67/70867/1

diff --git a/Resources.php b/Resources.php
index 07eaa9e..52b18e2 100644
--- a/Resources.php
+++ b/Resources.php
@@ -507,7 +507,8 @@
                'dependencies' => array(
                        'ext.smile.timeline',
                        'mediawiki.legacy.wikibits'
-               )
+               ),
+               'position' => 'top',
        ),
 
        // D3
diff --git a/formats/timeline/resources/ext.srf.timeline.js 
b/formats/timeline/resources/ext.srf.timeline.js
index ac8d0c8..693b1fd 100644
--- a/formats/timeline/resources/ext.srf.timeline.js
+++ b/formats/timeline/resources/ext.srf.timeline.js
@@ -5,7 +5,7 @@
 
 var smwtl;
 
-addOnloadHook(smw_timeline_init);
+jQuery(smw_timeline_init);
 
 function smw_timeline_init() {
        if (!document.getElementsByName) return;

-- 
To view, visit https://gerrit.wikimedia.org/r/70867
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I656b14198c94da3b9b9bc6e2b587247855faa572
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticResultFormats
Gerrit-Branch: master
Gerrit-Owner: Foxtrott <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to