is not used any more and exists only for history. Post new tickets on the Github account. n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 13 years ago

Last modified 10 years ago

#597 delayed new feature

jelix template :{metajscode} a new html plugin

Reported by: bibo Owned by:
Priority: normal Milestone:
Component: jelix:plugins:tpl Version: trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:


this plugin would allow to put your javascript just beside its html siblings in templates AND still would be generated in the <head> section of the html response.

It would be nice to be able to do as below.

  var themePath = '{$j_themepath}';
  jQuery(function (){
    $('#jform1_category').change( function(){
     if ($(this).val() == 'par') $('#jform1').submit();
    $('#jform1_birthday').datepicker({showOn: 'both', buttonImage: themePath+'Images/calendar.gif', buttonImageOnly: true, minDate: '-60y', maxDate: '-10y', yearRange: '-60:0', firstDay: 1, defaultDate:'-10y'});
  } );

metajscode would call addJSCode of course under the hood.

Change History (3)

comment:1 Changed 13 years ago by bballizlife

I think this could be a nice idea for some times you don't want/need to put your JS code in a separate file.

comment:2 Changed 12 years ago by laurentj

  • Component changed from jelix:plugins to jelix:plugins:tpl

comment:3 Changed 10 years ago by laurentj

  • Status changed from new to delayed
Note: See TracTickets for help on using tickets.