← Back to team overview

mahara-contributors team mailing list archive

[Bug 1429525] [NEW] Blocktype JavaScript is not called when loaded with AJAX

 

Public bug reported:

With the new AJAX block loading (Bug #1419399), <script> tags inside the
blocktype tpl file are called but any code inside addLoadEvent is not.
This means that some blocktypes now don't work properly.

For example, I send a message to a user and then go to that user's Dashboard. If I click on the message in the Inbox block (which is now loaded with AJAX) I get taken straight to the Reply page instead of having the message content appear on the same page. 
This seems to be because that logic is activated with addLoadEvent in theme/raw/blocktype/inbox/templates/inbox.tpl:37

The issue also appears in the Group pages blocktype - pagination doesn't
work (when Bug #1429518 is fixed) and is probably also found in My
friends and My groups (untested).

Affects latest master

** Affects: mahara
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1429525

Title:
  Blocktype JavaScript is not called when loaded with AJAX

Status in Mahara ePortfolio:
  New

Bug description:
  With the new AJAX block loading (Bug #1419399), <script> tags inside
  the blocktype tpl file are called but any code inside addLoadEvent is
  not. This means that some blocktypes now don't work properly.

  For example, I send a message to a user and then go to that user's Dashboard. If I click on the message in the Inbox block (which is now loaded with AJAX) I get taken straight to the Reply page instead of having the message content appear on the same page. 
  This seems to be because that logic is activated with addLoadEvent in theme/raw/blocktype/inbox/templates/inbox.tpl:37

  The issue also appears in the Group pages blocktype - pagination
  doesn't work (when Bug #1429518 is fixed) and is probably also found
  in My friends and My groups (untested).

  Affects latest master

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1429525/+subscriptions


Follow ups

References