Changeset 794

Show
Ignore:
Timestamp:
02/25/10 01:16:10 (5 months ago)
Author:
alex94040
Message:

Fixes #481 (put bindings of events into .ready()). Code by kristof; review/testing by alex94040.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • framework/branches/2.0/includes/qcubed/_core/base_controls/QFormBase.class.php

    r763 r794  
    11131113                        // Setup End Script 
    11141114                        $strEndScript = ''; 
     1115                        $strEvents = ''; 
    11151116 
    11161117                        // First, call regC on all Controls 
     
    11251126                        foreach ($this->GetAllControls() as $objControl) 
    11261127                                if ($objControl->Rendered) 
    1127                                         $strEndScript .= $objControl->GetEndScript(); 
     1128                                        $strEvents .= $objControl->GetEndScript(); 
    11281129                        foreach ($this->objGroupingArray as $objGrouping) 
    1129                                 $strEndScript .= $objGrouping->Render(); 
     1130                                $strEvents .= $objGrouping->Render(); 
    11301131 
    11311132                        // Run End Script Compressor 
     
    11961197 
    11971198                        // Create Final EndScript Script 
    1198                         $strEndScript = sprintf('<script type="text/javascript">qc.registerForm(); %s</script>', $strEndScript); 
     1199                        $strEndScript = sprintf('<script type="text/javascript">qc.registerForm(); %s; $j(document).ready(function() { %s }); </script>', $strEndScript, $strEvents); 
    11991200 
    12001201                        // Persist Controls (if applicable)