Hi, I have a problem with changing my module under Joomla 3. I have referenceerror dhtmlxgridobject is not defined. This is my code:
[code]<?php
// No direct access
defined(’_JEXEC’) or die(‘Restricted access’);
$doc = JFactory::getDocument();
$doc->addStyleSheet(JURI::root().‘media/com_telecomax/css/dhtmlxgrid/dhtmlxgrid.css’);
$doc->addStyleSheet(JURI::root().‘media/com_telecomax/css/dhtmlxgrid/skins/dhtmlxgrid_dhx_skyblue.css’);
$doc->addScript(JURI::root() . “components/com_telecomax/dhtmlxgrid/dhtmlxcommon.js”);
$doc->addScript(JURI::root() . “components/com_telecomax/dhtmlxgrid/dhtmlxgrid.js”);
$doc->addScript(JURI::root() . “components/com_telecomax/dhtmlxgrid/dhtmlxgridcell.js”);
$doc->addScript(JURI::root() . “components/com_telecomax/dhtmlxgrid/dhtmlxdataprocessor.js”);
$doc->addScript(JURI::root() . “components/com_telecomax/dhtmlxgrid/excells/dhtmlxgrid_excell_acheck.js”);
$doc->addScript(JURI::root() . “components/com_telecomax/dhtmlxgrid/ext/dhtmlxgrid_filter.js”);
$doc->addScript(JURI::root() . “components/com_telecomax/dhtmlxgrid/ext/dhtmlxgrid_srnd.js”);
?>
<p><label for="com_telecomaxc_userfield_<?php echo $field; ?>">
<input type="checkbox" name="userfield_<?php echo $field; ?>" id="com_telecomaxc_userfield_<?php echo $field; ?>"<?php if (isset($this->data['userAdminFields'][$field]) && $this->data['userAdminFields'][$field]) echo ' checked="checked"'; ?> />
<?php echo ucfirst(JText::_('COM_TELECOMAX_'.str_replace(' ', '_', $field))); ?></label></p>
<?php }
function AddPrefJtext($Str){
return 'COM_TELECOMAX_' . str_replace(array(' ', '-'), array('_', '_'), $Str);
}
?>
Try it
[/code]
When I look in firebug there is
<script>
mygrid = new dhtmlXGridObject('com_telecomax_callhistory_data');
mygrid.setImagePath("/media/com_telecomax/images/dhtmlxgrid/");
mygrid.setHeader("Имя, Фамилия, Е-майл, Адрес, Город, Штат/Регион, Страна, Почтовый код, Телефон, Факс, Подписка, Кредит");
mygrid.setInitWidths("100,100,160,210,110,110,110,65,80,80,60,110");
mygrid.setColAlign("left,left,left,left,left,left,left,left,left,left,left,left");
mygrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ch,price");
mygrid.setColSorting("str,str,str,str,str,str,str,str,str,str,int,int");
mygrid.enableAutoWidth(true);
mygrid.init();
mygrid.enableSmartRendering(true);
mygrid.setSkin("dhx_skyblue");
mygrid.parse({"rows":[{"id":1,"data":["hottern","Bielova1","hottern@gmail.com","ghgjgjg 6576","kharkov","kharkov","222","61171","380632636191","2543534","0","0"]}],"page":1,"pages":1}, "json");
</script>
<?php echo ucfirst(JText::_('COM_TELECOMAX_'.str_replace(' ', '_', $field))); ?> |
---|
<?php echo $item; ?> |