Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 3 Ответов
  • 1563 Просмотров
*

zeroptional

  • Осваиваюсь на форуме
  • 17
  • 0 / 0
Всем привет. Столкнулся с проблемой Iprice Calculator Light - хочу сделать чтобы по клику по строчки категории все её элементы исчезали. Пытался использовать вот эти примеры (http://jsfiddle.net/CAQxQ/13/ ; http://jsfiddle.net/oneboy/CAQxQ/12/ ), но безуспешно, почему-то не работают. Помогите, может я просто некорректно вставляю их.

Код
<?php
/**
 * @package Joomla
 * @copyright Copyright (C) 2013 IPrice web solutions. All rights reserved.
 * @license GNU/GPL, see LICENSE.php
*/
defined( '_JEXEC' ) or die( 'Restricted access' );

$ver30 = version_compare(JVERSION, '3.0', 'ge');


$itemid = JRequest::getVar('Itemid', '');

$introtext = $this->params->get('introtext','');
$headertext = $this->params->get('headertext','');
$usecents = (int) $this->params->get('usecents','1');
$showprices = (int) $this->params->get('showprices','1');
$numselitems = (int) $this->params->get('numselitems','0');
$usetabs  =  (int) $this->params->get('use_tabs','1');
if ($usetabs) {
if($ver30)
jimport('joomla.html.html.bootstrap');
else
jimport('joomla.html.pane');
}


$totalratio = (float) str_replace(',','.', $this->params->get('totalratio','0'));
$showtotalratio = (int)$this->params->get('showtotalratio','1');
$totalratioview = (int) $this->params->get('totalratioview','0');

if ($totalratio) {
if ($totalratioview==1)
$totalratiodisplay = ($totalratio-1)*100 . '%';
else
$totalratiodisplay = (string) $totalratio;
}

$countdig = ($usecents == 1 ? "2" : "0" );

$sym = trim($this->curr->symbol);
if ($this->curr->symplace) {
  $currmask = $sym.($this->curr->usespace == 1 ? " " : "" ).($usecents == 1 ? "%01.2f" : "%d" );
  $currmaskjs = "'".$sym."'+".($this->curr->usespace == 1 ? "' '+" : "" )."%s";
}
else {
  $currmask = ($usecents == 1 ? "%01.2f" : "%d" ).($this->curr->usespace == 1 ? " " : "" ).$sym;
  $currmaskjs = "%s".($this->curr->usespace == 1 ? "+' '" : "" )."+'".$sym."'";
}

$user   = &JFactory::getUser();

$doc =& JFactory::getDocument();
$doc->addStyleSheet(  JURI::base(true)."/components/com_ipricecalc/views/price/tmpl/ipricecalc.css" );

?>

<script language="javascript" type="text/javascript">
var numselitems = <?php echo (int)$numselitems; ?>;

if (!numselitems) numselitems = 1;

function form_hasValue(object, obj_type, optional_1, optional_2, optional_3) {
switch (obj_type) {
case "TEXT":
if (object.value.length < 5) {return false;}
return true;
case "EMAIL":
if (object.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) {return false;}
return true;
case "TEXTAREA":
if (object.value.length < 1) {return false;}
return true;
case "SELECT":
        for (i=0; i < object.length; i++) {
if (object.options[i].selected && object.options[object.selectedIndex].value != 0 ) {return true;}
}
return false;
case "SINGLE_VALUE_RADIO":
if (object.checked) {return true;}
return false;
case "SINGLE_VALUE_CHECKBOX":
if (object.checked) {return true;}
return false;
case "RADIO":
        for (i=0; i < object.length; i++) {
if (object[i].checked) {return true;}
}
    return false;
case "CHECKBOX":
        for (i=0; i < object.length; i++) {
if (object[i].checked) {return true;}
}
    return false;
case "INTEGER":
if (object.value.length == 0) {return false;}
else {
if (object.value.search(/^\d+$/) == -1) {return false;}
}
return true;
case "NUMBER":
if (object.value.search(/^\-?\+?\d*\.?\d+$/) == -1) {return false;}
return true;
case "PHONE_NUMBER":
if (object.value.search(/^[ \+\-\(\)\d]{5,}$/) == -1) {return false;}
return true;
case "SELECTNOTZERO":
        for (i=0; i < object.length; i++) {
if (object.options[i].selected) {
if(object.options[i].value != 0) {return true;}
}
}
return false;
}
}

function checkHaveValues (checkList) {
var loopLength = checkList.length / 3;
for (x=0;x<loopLength;x++) {
var message = checkList[(x*3)];
var checkItem = checkList[(x*3)+1];
var type = checkList[(x*3)+2];
if (!form_hasValue(checkItem,type)) {
alert(message);
if (checkItem.type == "TEXT" || checkItem.type == "PASSWORD") {
checkItem.focus();
}
return false;
}
}
return true;
}

function ipricevalidate(formName) {
if (!checkHaveValues(new Array(
"<?php echo JText::_('Contact_person_needed');?>",formName.fio,"TEXT",
"<?php echo JText::_('Phone_number_needed');?>",formName.phone,"TEXT",
"<?php echo JText::_('Correct_email_needed');?>",formName.email,"EMAIL")))
{return false;}
else {
formName.submit();
return true;
}

}

function show_desc(iid) {
if (iid.style.display == '') iid.style.display='none'; else iid.style.display='';
};

var price_list=new Array();

function initprice(){
<?php
$curcatnum = -1;
$itemnum = -1;
$curcat = '';
foreach ($this->items as $item) {
$itemnum++;
    if ($curcat != $item->category) {
$curcatnum++;
$itemnum = 0;
    $curcat = $item->category;
    echo ('price_list['.$curcatnum.'] = new Array();'."\n");
};
echo (" price_list[".$curcatnum."][".$itemnum."] = ".$item->cost."; ");
}
?>
}

function check_event(checknum){
var sum_ = new Array();
var j;
var jj = 0;
var numsel = 0;

for (var i = 0; i < price_list.length; i++){
sum_[i]=0;
for (j = 0; j < price_list[i].length; j++){
tot=0;
i_type = document.getElementById('itemtype_'+jj).value;
if (i_type == 0)
inp = document.getElementById('i_box_'+jj);
else if (i_type == 1)
inp = document.getElementById('i_'+jj);
else
inp = document.getElementById('i_radio_'+jj);

if((i_type == 0 || i_type == 2) && inp.checked) {
numsel++;
tot = price_list[i][j];
}
else if (i_type == 1 && inp.value != '0') {
numsel++;
tot = price_list[i][j] * inp.value;
};
sum_[i] = sum_[i] + tot;
el = document.getElementById('total_'+jj);
if (el)
el.innerHTML = <?php echo sprintf($currmaskjs,'tot.toFixed('.$countdig.')'); ?>;
jj++;
};
};
var SUM=0,zero=0;
for(i=0; i<price_list.length;i++) {
SUM = SUM + sum_[i];
el = document.getElementById('results_'+i);
if (el) {
el.innerHTML = <?php echo sprintf($currmaskjs,'zero.toFixed('.$countdig.')'); ?>;
/* if (numsel >= numselitems)*/
el.innerHTML = <?php echo sprintf($currmaskjs,'sum_[i].toFixed('.$countdig.')'); ?>;
}
}
elr = document.getElementById('results_bottom');
elg = document.getElementById('grandtotal');
if (elr)
elr.innerHTML = <?php echo sprintf($currmaskjs,'zero.toFixed('.$countdig.')'); ?>;
<?php if ($totalratio) { ?>
if (elg)
elg.innerHTML = <?php echo sprintf($currmaskjs,'zero.toFixed('.$countdig.')'); ?>;
<?php } ?>
if (numsel >= numselitems) {
if (elr)
elr.innerHTML = <?php echo sprintf($currmaskjs,'SUM.toFixed('.$countdig.')'); ?>;
<?php if ($totalratio) { ?>
SUM = SUM * <?php echo $totalratio; ?>;
if (elg)
elg.innerHTML = <?php echo sprintf($currmaskjs,'SUM.toFixed('.$countdig.')'); ?>;
<?php } ?>
}
if (checknum && numsel < numselitems) {
alert("<?php echo JText::_('NEEDED_ITEMS_NOT_SELECTED')?>"+" "+numselitems);
return false;
} else
return true;
};
</script>

<?php

if ($headertext) { ?>
<h2><?php echo $headertext;?></h2>
<?php
}

if ($introtext) { ?>
<div class="iprice_intro"><?php echo $introtext;?></div>
<?php
}
?>

<form action="index.php?option=com_ipricecalc" name="filter_form" id="filter_form" method="post" >
<?php
$currselect = (int)$this->params->get('showcurrselect','2');
if ($currselect) {
require_once( JPATH_SITE.'/components/com_ipricecalc/helpers/html.php');
JHTMLIpriceList::currSelectorHTML($this->curr->currcode);
echo '<div style="clear:both"></div>';
}
?>
<input type="hidden" name="redir" value="<?php echo urlencode(JFactory::getURI()->toString());?>" />
<input type="hidden" name="task" value="submitfilter" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>

<form action="" name="calc_form" method="POST" >


<script language="javascript" type="text/javascript">

function pressplus(objid) {
var qty_el = document.getElementById(objid);
if( !isNaN( qty_el.value )) qty_el.value++; else qty_el.value=1;
check_event(false);
}
function pressminus(objid) {
var qty_el = document.getElementById(objid);
if( !isNaN( qty_el.value ) && qty_el.value>0) qty_el.value--; else qty_el.value=0;
check_event(false);
}
</script>


<?php

defined( '_JEXEC' ) or die( 'Restricted access' );

$usecents = (int) $this->params->get('usecents','1');
$showprices = (int) $this->params->get('showprices','1');
$numselitems = (int) $this->params->get('numselitems','0');

$countdig = ($usecents == 1 ? "2" : "0" );

$sym = trim($this->curr->symbol);
if ($this->curr->symplace) {
  $currmask = $sym.($this->curr->usespace == 1 ? " " : "" ).($usecents == 1 ? "%01.2f" : "%d" );
  $currmaskjs = "'".$sym."'+".($this->curr->usespace == 1 ? "' '+" : "" )."%s";
}
else {
  $currmask = ($usecents == 1 ? "%01.2f" : "%d" ).($this->curr->usespace == 1 ? " " : "" ).$sym;
  $currmaskjs = "%s".($this->curr->usespace == 1 ? "+' '" : "" )."+'".$sym."'";
}

$i = -1;
$curcatnum = -1;
$itemnum = -1;
$curcat = '';
$totalcolspan = 2;
$totalpricecolspan = 1;
$delimcolspan = 3;
$headerHTML = '<table class="tablenoborder" width="100%" border="0" align="center" cellPadding=3 cellSpacing=0 >'."\n";
$headerHTML .= '<tr class="tablzag3"><td class="tablzag3">'.JText::_('Item_name').'</td><td class="tablzag3" align="center">'.JText::_('Short_description')
.'</td><td align=center class="tablzag3">'.JText::_('Select').'</td>';
if ($showprices) {
$headerHTML .= '<td align=center class="tablzag3">'.JText::_('Cost').'</td>';
$headerHTML .= '<td align=center class="tablzag3">'.JText::_('Total').'</td>';
$totalcolspan = $totalcolspan+2;
$totalpricecolspan = 0;
$delimcolspan = $delimcolspan+2;
}
$headerHTML .= '</tr>'."\n";

if ($usetabs) {
if ($ver30) {
$ccnum = -1;
$catid=-1;
echo '<ul class="nav nav-tabs" id="myTab">';
foreach ($this->items as $item)
if ($catid != $item->catid) {
$ccnum++;
$catid = $item->catid;
echo  '<li><a data-toggle="tab" href="#cat'.$ccnum.'">'.$item->category.'</a></li>';
}
echo '</ul>';
echo JHtml::_('bootstrap.startPane', 'myTab', array('active' => 'cat0'));
}
else {
$jPaneTabs =& JPane::getInstance('tabs');
echo $jPaneTabs->startPane("pane")."\n";
}
} else
echo $headerHTML;


foreach ($this->items as $item) :
$i++;
$itemnum++;
    if ($curcat != $item->category) {
$curcatnum++;
$itemnum = 0;
   
if ($curcatnum>0) { ?>
<?php if ($showprices) { ?>
<tr>
<td colspan="<?php echo $totalcolspan;?>" align="right" valign="middle" class="tablitogo" ><?php echo JText::_('Subtotals').' "'.$curcat.'"' ?> : </td>
<td <?php if ($totalpricecolspan) echo 'colspan="'.$totalpricecolspan.'"'; ?> align="right" valign="middle" class="tablitogo" ><span id="results_<?php echo ($curcatnum-1);?>" ><?php echo sprintf($currmask,0)?></span></td>
</tr>
<?php } ?>
<!--
<tr>
<td colspan="<?php echo $delimcolspan;?>" align="right" class="tabldelim"></td>
</tr>
-->
<?php
if ($usetabs) {
echo '</table>';
if ($ver30)
echo JHtml::_('bootstrap.endPanel');
else
echo $jPaneTabs->EndPanel();
}
}
$curcat = $item->category;
if ($usetabs) {
if ($ver30)
echo JHtml::_('bootstrap.addPanel', 'myTab', 'cat'.$curcatnum);
else
echo $jPaneTabs->startPanel($curcat, $curcatnum);
echo $headerHTML;
}
echo ('<tr><td colspan="'.$delimcolspan.'" class="tablzag2" >'.$item->category.'</td></tr>');
};
?>
<tr valign="middle">
<td width="30%" align="left"   class="tablchet">
<div align="left"><a href="javascript:show_desc(document.getElementById('d_<?php echo $item->id;?>'));" class="tablchet" ><span class="tablcheta"><?php echo $item->name;?></span></a></div>
</td>
<td align="left" class="tablchet">
<div align="center"><?php echo $item->shortdesc ?></div>
</td>
  <td width="10%" align="center" nowrap="nowrap">
<?php if ($item->showcount==1) { ?>
<span class="minus" onClick="pressminus('i_<?php echo ($i);?>')">-</span>
<input type="text" maxlength="5" onFocus="if (this.value=='0') this.value='';" onBlur="if (this.value=='') this.value='0';"
onchange="check_event(false)" style="width: 30px; text-align: right" value="0"
id="i_<?php echo ($i);?>" name="i_<?php echo ($i);?>" />
<span class="plus" onClick="pressplus('i_<?php echo ($i);?>')">+</span>
<?php } elseif ($item->showcount==2) { ?>
<input type="radio" onclick="check_event(false)"
id="i_radio_<?php echo ($i);?>" name="i_radio_<?php echo ($item->radiogroup);?>" value="<?php echo ($item->id);?>" />
<?php } else { ?>
<input type="checkbox" onclick="check_event(false)" id="i_box_<?php echo ($i);?>" name="i_box_<?php echo ($i);?>" />
<?php } ?>
<input type="hidden" name="itemid_<?php echo ($i);?>" value="<?php echo $item->id; ?>" />
<input type="hidden" name="itemtype_<?php echo ($i);?>" id="itemtype_<?php echo ($i);?>"  value="<?php echo $item->showcount; ?>" />
    </td>
<?php if ($showprices) : ?>
<td width="15%" align="right">
<nobr class="tablchet"><?php echo sprintf($currmask,$item->cost);?></nobr>
</td>
<td width="15%" align="right">
<span id="total_<?php echo ($i);?>" class="tablchet" ><?php echo sprintf($currmask,0);?></span>
</td>
<?php endif; ?>
</tr>
<tr>
  <td colspan="<?php echo $delimcolspan;?>" align="left"  class="tabldiv" >
  <div align="justify" class="tabldiv" id="d_<?php echo $item->id;?>" style="display: none;" name="d_<?php echo $item->id;?>"><?php echo $item->description; ?></div>
</td>
    </tr>

<?php endforeach;
if ($showprices) {
if ($curcatnum>-1) : ?>
<tr>
<td colspan="<?php echo $totalcolspan;?>" align="right" valign="middle" class="tablitogo" ><?php echo JText::_('Subtotals').' "'.$curcat?>" : </td>
<td <?php if ($totalpricecolspan) echo 'colspan="'.$totalpricecolspan.'"'; ?>  align="right" valign="middle" class="tablitogo" ><span id="results_<?php echo ($curcatnum);?>" ><?php echo sprintf($currmask,0);?></span></td>
</tr>
<?php endif; ?>
<?php }

if ($curcatnum>-1) {
if ($usetabs) {
echo '</table>'."\n";
if ($ver30) {
echo JHtml::_('bootstrap.endPanel');
echo JHtml::_('bootstrap.endPane');
} else {
echo $jPaneTabs->EndPanel();
echo $jPaneTabs->EndPane();
}
}
}

if ($showprices) {
if ($usetabs)
  echo '<table class="tablenoborder" width="100%" border="0" align="center" cellPadding=3 cellSpacing=0 >'."\n";

?>
  <tr><td colspan="<?php echo $delimcolspan;?>" align=right class="tabldelim" ></td></tr>
  <tr>
    <td colspan="<?php echo $totalcolspan;?>" align="right" class="tablitogo"><?php echo JText::_('Totals');?></td>
<td <?php if ($totalpricecolspan) echo 'colspan="'.$totalpricecolspan.'"'; ?>  align="right" width="15%" class="tablitogo"><span class="textwarn" id="results_bottom"><?php echo sprintf($currmask,0);?></span></td>
  </tr>

<?php
if ($usetabs)
echo '</table>';
}

if (!$usetabs)
  echo '</table>';


if ($totalratio && showprices) : ?>

<table class="tablenoborder" width="100%" border=0 align=center cellPadding=3 cellSpacing=0 VALIGN="TOP">
<?php if ($showtotalratio) : ?>
<tr><td class="tabldelim" ></td></tr>
<tr>
<td align="right" valign="middle" class="tablitogo" ><?php echo JText::_('Total_ratio'); ?> </td>
<td width="20%"  align="right" valign="middle" class="tablitogo" ><?php echo $totalratiodisplay;?></td>
</tr>
<?php endif; ?>
  <tr><td class="tabldelim" ></td></tr>
  <tr>
    <td align="right" class="tablitogo"><?php echo JText::_('Grand_total');?></td>
<td width="20%" align="right" class="tablitogo"><span class="textwarn" id="grandtotal"><?php echo sprintf($currmask,0);?></span></td>
  </tr>
</table>

<?php endif; ?>

<br />
<center><input type="button" id="preorder" class="button" onclick="if (!check_event(true)) return false; document.getElementById('order_dat').style.display=''; style.display='none'" value="<?php echo JText::_('Preorder');?>" />
</center>
<br>
<div style="display: none;" id="order_dat" name="order_dat">

<table class="tablenoborder" cellSpacing="0" cellPadding="0" width="100%"  border="0" align="center">
<tr class>
<td class="tablzag2"><?php echo JText::_('Contact_info');?></td>
</tr>
<tr><td>
<table class="tablenoborder" cellpadding=0 cellspacing=0 width=100% border=0>
<tr class="tablchet" >
  <td align=right class="tablchet">&nbsp;</td>
  <td class="tablchet">&nbsp;</td>
  </tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Contact_person');?><span class="textwarn">*</span>:</td>
<td class="tablchet"><input name="fio"  maxlength="90"  type=text value="<?php echo $user->get('name',''); ?>" class="form" /></td>
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Company_name');?></td>
<td class="tablchet"><input name="firm"   maxlength="90" type=text class="form"  value="" /></td>
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('PHONE_NUMBER');?><span class="textwarn">*</span>:</td>
<td class="tablchet"><input name="phone"   maxlength="60" type=text class="form" value="" /></td>
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet" ><?php echo JText::_('EMail');?><span class="textwarn">*</span>:</td>
<td class="tablchet" ><input name="email" type=text   maxlength="60" value="<?php echo $user->get('email','') ;?>" class="form" /></td>
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Comments');?></td>
<td class="tablchet" ><textarea name="comments" cols="50" rows=5 class="textarea" ></textarea></td>
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Send_copy');?></td>
<td class="tablchet" ><input name="copyemail" type="checkbox" CHECKED /></td>
</tr>
<tr class="tablchet" >
<td align=right colspan=2 class="tablchet"><span class="textwarn">*</span><?php echo JText::_('Mandatory');?></td>
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet">&nbsp;</td>
<td class="tablchet" >
<?php
$user = JFactory::getUser();
if ( $this->params->get('usecaptcha')!= 0 && ($this->params->get('usecaptchareg') == 1 || $this->params->get('usecaptchareg') == 0 && $user->get('id')==0  )) {
if ($this->params->get('usecaptcha') == 1 ) {
$dispatcher = &JDispatcher::getInstance();
// Captcha Extention patch rev. 4.5.0 Stable
echo '<p>';
$dispatcher->trigger( 'onCaptchaView', array( '', 0, '', '<br />' ) );
echo '</p>';
} elseif ($this->params->get('usecaptcha',0) == 2) {

require_once( JPATH_COMPONENT_ADMINISTRATOR.'/tables/recaptcha.php');
$captcha = IpriceSpamRecaptcha::getInstance();
$captchaHtml = $captcha->getHtml();
if ( !$captchaHtml ) {
JFactory::getApplication ()->enqueueMessage ( $captcha->getError(), 'error' );
} else
echo $captchaHtml;
}
}
?>
<input name="ipricebt1" id="ipricebt1" type="button" class="button" onclick="ipricevalidate(this.form);" value="<?php echo JText::_('Send_order');?>" />
</td>
</tr>
</table>
</td></tr>
</table>

</div>

<input type="hidden" name="countitems" value="<?php echo count($this->items)?>" />
<input type="hidden" name="curr" value="<?php echo $this->curr->currcode?>" />
<input type="hidden" name="redir" value="<?php $uri = JFactory::getURI();  echo urlencode($uri->toString());?>" />
<?php if ($itemid) : ?>
<input type="hidden" name="itemid" value="<?php echo $itemid?>" />
<?php endif;

?>
<input type="hidden" name="option" value="com_ipricecalc" />
<input type="hidden" name="view" value="price" />
<input type="hidden" name="task" value="submit" />
<center style="font-size:9px"><a href="http://www.iprice-web.ru" target="_blank" rel="follow">Powered by IPrice</a></center>
<input type="hidden" name="itemno" value="1" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<script language="javascript" type="text/javascript">
initprice();
</script>



*

verstalshik

  • Завсегдатай
  • 1754
  • 95 / 1
Re: Некорректно вставляется javascript
« Ответ #1 : 20.11.2013, 02:09:07 »
а куда скрипт-то вставили?)))
надо было в шаблон сайта вставить, в секцию head тудыть ее в качель...
и обернуть соответственно <script></script>
ну и jQuery подключен должен быть, ась?))
❶ НЕ СПРАВЛЯЕШЬСЯ САМ???  Поможем тут...  ❷ Калькулятор доставки - ЗАКАЖИ!!!...  ❸ Каталог компаний - ЖМИ!!!...  ❹ НОВИЧКИ! ВСЕ сюда! Первая консультация БЕСПЛАТНО!!
*

zeroptional

  • Осваиваюсь на форуме
  • 17
  • 0 / 0
Re: Некорректно вставляется javascript
« Ответ #2 : 20.11.2013, 17:35:54 »
Так и писал в шаблон между <head>

Здесь добавил класс для <tr>

И jquery вроде уже было вшито в шаблон.

Код
header('Content-Type: text/html;charset=UTF-8');
defined ('_JEXEC') or die ('resticted aceess');
require_once(dirname(__FILE__).DS.'lib'.DS.'helix.php');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language;?>" >
<head>
<?php
$helix->loadHead();
$helix->addCSS('template.css,joomla.css,custom.css,modules.css,typography.css,css3.css');
if ($helix->getDirection() == 'rtl') $helix->addCSS('template_rtl.css');
$helix->getStyle();
$helix->favicon('favicon.ico');
?>
<script>
$('.nothd').click(function(){       

     $(this).next('tr').toggle();

 });
 </script>
</head>
<?php $helix->addFeature('ie6warn'); ?>
<body class="bg clearfix">
<div class="sp-wrap clearfix">
<?php $helix->addFeature('toppanel'); ?>
<div id="header" class="clearfix">
<?php $helix->addFeature('logo') /*--- Add logo ---*/?>
<div id="rightcol" class="clearfix">
<?php $helix->addFeature('fontsizer'); /* Font sizer */?>

<?php if ($helix->countModules('search')) { /*--- Search Module ---*/?>
<div id="search" class="clearfix">
<jdoc:include type="modules" name="search" />
</div>
<?php } ?>
</div>
</div>

<div id="SOME" class="clearfix">
<?php if($helix->countModules('top-menu')) { /*--- top-menu ---*/?>
<div id="top-menu" class="clearfix">
<jdoc:include type="modules" name="top-menu" />
</div>
<script type="text/javascript">
  $(document).ready(function(){
    var link = window.location.pathname;
    $('.menu li a[href="'+link+'"]').parent().addClass('active');
  });
</script>
<div class="clr"></div>
<?php } ?>

</div>
<?php if($helix->countModules('slides')) { /*--- Module position slides ---*/?>
<div id="slides" class="clearfix">
<jdoc:include type="modules" name="slides" />
</div>
<?php } ?>

<!--Module Position user1 to user6-->
<?php if($mods= $helix->getModules('user1,user2,user3,user4,user5,user6')) { ?>
<div id="sp-userpos" class="clearfix">
<div class="sp-inner">
<?php $helix->renderModules($mods,'sp_flat');?>
</div>
</div>
<?php } ?>

<div class="main-padding clearfix">
<?php $helix->loadLayout(); ?>

<!--Module Position carousel-->
<?php if($mods= $helix->getModules('carousel')) { ?>
<div id="sp-carousel" class="sp-inner">
<?php $helix->renderModules($mods,'sp_none');?>
</div>
<?php } ?>

<!--Module Position mid1 and mid2-->
<?php if($helix->countModules('mid1 or mid2')) { ?>
<div id="mid-pos">
<?php if($helix->countModules('mid1')) { ?>
<div id="mid1" class="clearfix">
<div class="sp-inner">
<jdoc:include type="modules" name="mid1" style="sp_xhtml" />
</div>
</div>
<?php } ?>
<?php if($helix->countModules('mid2')) { ?>
<div id="mid2" class="clearfix">
<div class="sp-inner">
<jdoc:include type="modules" name="mid2" style="sp_xhtml" />
</div>
</div>
<?php } ?>
</div>
<?php } ?>
</div>

<!--Module Position breadcrumbs-->
<?php if($helix->countModules('breadcrumbs')) { ?>
<div class="clr"></div>
<div id="breadcrumbs" class="sp-inner clearfix">
<a id="breadcrumb-home" href="<?php echo $this->baseurl?>"></a> <jdoc:include type="modules" name="breadcrumbs" />
<?php $helix->addFeature('totop')?>
</div>
<?php } ?>

<!--Module Position bottom1 to bottom6-->
<?php if($mods= $helix->getModules('bottom1,bottom2,bottom3,bottom4,bottom5,bottom6')) { ?>
<div id="sp-bottom" class="clearfix">
<div class="sp-inner">
<?php $helix->renderModules($mods,'sp_flat');?>
</div>
</div>
<?php } ?>
<div id="jsn-pos-stick-rightmiddle">
<jdoc:include type="modules" name="stick-rightmiddle" />
</div>

<!--Footer-->
<div id="sp-footer" class="clearfix">
<div class="cp">
<?php $helix->addFeature('copyright') /*--- Show copyright ---*/?>
<?php if ($helix->countModules('footer-nav')) /*--- Module position footer-nav ---*/{ ?>
<div id="footer-nav">
<jdoc:include type="modules" name="footer-nav" />
</div>
<?php } ?>
</div>
<div class="clearfix">
<div class="brand">
<?php $helix->addFeature('brand') /*--You are not allowed to remove or modify brand link. You need to purchase copyright removal license from http://www.joomshaper.com/copyright-removal-license in order to remove this link.--*/ ?>
</div>
<div class="validator">
<?php $helix->addFeature('jcredit') /*--- Joomla credit link ---*/?>
<?php $helix->addFeature('validator') /*--- CSS and XHTML validator ---*/?>
</div>
</div>
</div>
</div>

<div class="clr"></div>
<?php $helix->addFeature('helixlogo'); /*--- Helix logo ---*/?>

<?php $helix->addFeature('analytics'); /*--- Google analytics tracking code ---*/?>
<?php $helix->addFeature('jquery'); /*--- Load jQuery library ---*/?>
<?php $helix->addFeature('ieonly'); /*--- IE only Feature ---*/?>
<?php $helix->compress(); /* --- Compress CSS and JS files --- */ ?>
<?php $helix->getFonts() /*--- Standard and Google Fonts ---*/?>

<jdoc:include type="modules" name="debug" />

</body>
</html>
*

zeroptional

  • Осваиваюсь на форуме
  • 17
  • 0 / 0
Re: Некорректно вставляется javascript
« Ответ #3 : 20.11.2013, 22:33:34 »
Ребята! Help!
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

В Google Chrome некорректно работает админка

Автор Dorotar

Ответов: 1
Просмотров: 956
Последний ответ 09.02.2020, 10:49:15
от Dorotar
Yandex Metrika не вставляется корректно на сайт

Автор gaa001

Ответов: 9
Просмотров: 982
Последний ответ 29.10.2019, 14:42:32
от gaa001
Не вставляется код

Автор DooM753

Ответов: 1
Просмотров: 1276
Последний ответ 23.03.2016, 13:37:52
от vipiusss
Блог категории некорректно отображает материалы и перекрывает модуль меню

Автор MrTrueGame

Ответов: 0
Просмотров: 812
Последний ответ 06.12.2015, 18:49:57
от MrTrueGame
Javascript по клике на пункта меню

Автор Minas89

Ответов: 2
Просмотров: 900
Последний ответ 16.06.2015, 10:56:42
от SeBun