Ticket #359 (closed enhancement: fixed)

Opened 6 months ago

Last modified 6 months ago

Improvement to the Java Script management

Reported by: dramirez Assigned to: dramirez
Priority: normal Milestone: 0.9.2
Component: core Version: 0.9.1
Severity: normal Keywords:
Cc: Patch Included: 1
Review Stage: reviewed

Description

Using the $metatags for add JavaScript? libraries allows plugins to put JavaScript? functions that could create conflicts with others plugins and at the same time make the page load great loading libraries that wouldn't be used in all contexts.

A solution for this issue would be create a mechanism that standardize the way you add JS libraries and the way you use it.

Attachments

templates.patch (3.0 kB) - added by dramirez on 05/30/08 16:49:32.
templates-1.patch (1.8 kB) - added by dramirez on 06/07/08 00:56:32.
templates-2.diff (468 bytes) - added by dramirez on 06/07/08 08:33:10.

Change History

05/30/08 16:49:32 changed by dramirez

  • attachment templates.patch added.

05/30/08 16:50:41 changed by dramirez

  • haspatch set to 1.

The patch provided add some functions similar to templates_context ones for manage JavaScript? inclusion.

05/30/08 16:51:08 changed by dramirez

  • review_stage changed from unreviewed to readyforcheckin.

05/30/08 16:53:12 changed by dramirez

  • status changed from new to closed.
  • resolution set to fixed.

Fixed on [1595]

06/07/08 00:20:31 changed by joerosa

  • status changed from closed to reopened.
  • resolution deleted.

Is not ready to commit - there are Notices and Warnings:

Notice: Undefined property: stdClass::$js_setup in --> elgg/lib/templates.php on line 1324

Warning: Invalid argument supplied for foreach() in --> elgg/lib/templates.php on line 1326

Notice: Undefined variable: resp in --> elgg/lib/templates.php on line 1345

06/07/08 00:56:32 changed by dramirez

  • attachment templates-1.patch added.

06/07/08 00:58:06 changed by dramirez

  • status changed from reopened to closed.
  • resolution set to fixed.
  • review_stage changed from readyforcheckin to reviewed.

Those warnings are fixed on templates-1.patch and [1595]

06/07/08 01:41:36 changed by joerosa

  • status changed from closed to reopened.
  • resolution deleted.

Hi Diego - sorry to be a pain, but there is one Notice, still:

Notice: Undefined index: global in --> elgg/lib/templates.php on line 1322

06/07/08 01:57:28 changed by joerosa

And if it helps, i've installed the messages plug-in ontop (it uses this functionality), then it creates several messages:

Notice: Undefined index: global in --> elgg/lib/templates.php on line 1322

Notice: Undefined index: messages in --> elgg/lib/templates.php on line 1322

06/07/08 08:33:10 changed by dramirez

  • attachment templates-2.diff added.

06/07/08 08:34:12 changed by dramirez

  • status changed from reopened to closed.
  • resolution set to fixed.

Despite this is just a warning (if you change your PHP config to E_ERROR | ~ E_WARNING it is not showed) the line for your warning looks weird. If you take a look in the last version for that file on that line ther is not reference to 'global' or another key.

However I commit another fix for this.

06/07/08 08:36:27 changed by dramirez

Sorry, you need to change your error reporting to E_ALL & ~E_NOTICE