Changeset 795

Show
Ignore:
Timestamp:
02/25/10 01:32:40 (6 months ago)
Author:
alex94040
Message:

Fixes #454 (Remove / replace QCodo listbox.js). Code by alex94040, review/little tweaks by alex94040.

Location:
framework/branches/2.0
Files:
1 removed
2 modified

Legend:

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

    r682 r795  
    3333                protected $strSelectionMode = QSelectionMode::Single; 
    3434 
    35                 // SETTINGS 
    36                 protected $strJavaScripts = 'listbox.js'; 
    37  
    3835                ////////// 
    3936                // Methods 
  • framework/branches/2.0/includes/qcubed/controls/QListBox.class.php

    r173 r795  
    2929                 */ 
    3030                protected function GetResetButtonHtml() { 
    31                         $strToReturn = sprintf(' <a href="#" onclick="__resetListBox(%s, %s); return false;" class="listboxReset">%s</a>', 
    32                                 "'" . $this->Form->FormId . "'", 
    33                                 "'" . $this->strControlId . "'", 
    34                                 QApplication::Translate('Reset')); 
     31                        $strJavaScriptOnClick = sprintf('$j("#%s").val(null);$j("#%s").trigger("change"); return false;', $this->strControlId,$this->strControlId); 
     32                         
     33                        $strToReturn = sprintf(' <a id="reset_ctl_%s" href="#" class="listboxReset">%s</a>', 
     34                                $this->strControlId, 
     35                                QApplication::Translate('Reset') 
     36                        ); 
    3537 
     38                        QApplication::ExecuteJavaScript(sprintf('$j("#reset_ctl_%s").bind("%s", function(){ %s });', $this->strControlId, "click",  $strJavaScriptOnClick)); 
     39                                         
    3640                        return $strToReturn; 
    3741                }