Changeset 1059

Show
Ignore:
Timestamp:
04/09/07 14:33:06 (2 years ago)
Author:
ben
Message:

Javascript workaround for widgets.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/widget/edit.php

    r1046 r1059  
    4343             
    4444            // Get any data 
    45             $widget_data = optional_param('widget_data'); 
     45            $js_override = optional_param('widget_allcontent'); 
     46            if ($js_override == "yes" 
     47                && in_array($widget->type, $CFG->widgets->allcontent)) { 
     48                $widget_data = optional_param('widget_data','',null); 
     49            } else { 
     50                $widget_data = optional_param('widget_data'); 
     51            } 
    4652             
    4753            if (!empty($widget_data)) { 
  • devel/mod/widget/lib.php

    r1057 r1059  
    2222         
    2323        $function['init'][] = $CFG->dirroot . "mod/widget/init.php"; 
     24         
     25        // Initialise the 'allcontent' widget array - i.e., widgets where Javascript is allowed 
     26         
     27        if ($isset($CFG->widgets->allcontent)) { 
     28            $CFG->widgets->allcontent = array(); 
     29        } 
    2430         
    2531        // register the widgets that this module provides