Ticket #853: QAutocompleteBase.class.php.r1481.diff

File QAutocompleteBase.class.php.r1481.diff, 0.8 KB (added by kon, 11 months ago)

getting the response callback to update the list via the "autocomplete" data instead of the custom attribute self::RESPONSE_ATTR

  • includes/qcubed/_core/base_controls/QAutocompleteBase.class.php

     
    161161                 
    162162                // Response to an ajax request for data 
    163163                protected function prepareAjaxList($dataSource) { 
    164                         $strJS = JavaScriptHelper::customDataRetrieval($this, self::RESPONSE_ATTR, "response"); 
    165164                        $list = $dataSource ? JavaScriptHelper::toJsObject($dataSource) : "[]"; 
    166                         $strJS .= 'response(' . $list .');'; 
     165                        $strJS = sprintf('$j("#%s").data("autocomplete").response(%s);', $this->ControlId, $list); 
    167166                        QApplication::ExecuteJavaScript($strJS, true); 
    168167                } 
    169168 
     
    250249                } 
    251250                 
    252251        } 
    253 ?> 
    254  No newline at end of file 
     252?>