Changeset 19733


Ignore:
Timestamp:
Jan 3, 2013, 12:05:11 AM (11 years ago)
Author:
julien1311
Message:

Correction javascript

Location:
extensions/Piwecard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Piwecard/include/ecard.class.php

    r19732 r19733  
    277277                // Init user groups
    278278                $this->get_user_groups();
    279 
    280                 // CSS and JS file for the template
    281                 $file = "lightbox-form";
    282                 $template->append('<link rel="stylesheet" type="text/css" href="'.ECARD_PATH . 'template/'.$file.'.css">');
    283                 $template->append('<script src="'.ECARD_PATH .'js/'.$file.'.js" type="text/javascript"></script>');             
    284279
    285280                // Only on category page!
  • extensions/Piwecard/main.inc.php

    r19732 r19733  
    4949add_event_handler('loc_end_index', array(&$ecard, 'index_ecard'));
    5050
     51add_event_handler('loc_end_page_header', 'css_js_ecard');
    5152
    52 set_plugin_data($plugin['id'], $ecard)
     53set_plugin_data($plugin['id'], $ecard);
    5354
     55function css_js_ecard() {
     56        global $template;
     57       
     58        $file = "lightbox-form";
     59        $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.ECARD_PATH . 'template/'.$file.'.css">');
     60        $template->append('head_elements', '<script src="'.ECARD_PATH .'js/'.$file.'.js" type="text/javascript"></script>');
     61}       
    5462?>
Note: See TracChangeset for help on using the changeset viewer.