Commit 4294d16f authored by Clément Damiens's avatar Clément Damiens
Browse files

fix show answers click event multi id

parent d22d38a9
......@@ -4,13 +4,13 @@
</style>
<div class="col-xs-12 text-center">
<a href="javascript:;" class='btn btn- btn-default' id="showAnswerBtn"><i class="fa fa-bars"></i> Les <?php echo $what ?></a>
<a href="javascript:;" class='btn btn- btn-default' id="showAnswerBtn<?php echo @$viewDom ?>"><i class="fa fa-bars"></i> Les <?php echo $what ?></a>
<a href="#dashboard" class='lbh btn btn-default'><i class="fa fa-area-chart"></i> Observatoire Global</a>
<a href="#community" class='lbh btn btn-default'><i class="fa fa-group"></i> Communauté</a>
<a href="#answer.new" class='btn btn-primary' id="showAnswerBtn"><i class="fa fa-plus"></i> Ajouter <?php echo $what ?></a>
<a href="#answer.new" class='btn btn-primary'><i class="fa fa-plus"></i> Ajouter <?php echo $what ?></a>
</div>
<div id="allAnswersContainer" class="hide col-xs-12 col-lg-offset-2 col-lg-8 margin-top-20">
<div id="allAnswersContainer<?php echo @$viewDom ?>" class="hide col-xs-12 col-lg-offset-2 col-lg-8 margin-top-20">
<ul id="allAnswersList">
<?php
$lbl = $what." ";
......@@ -101,7 +101,12 @@
jQuery(document).ready(function() {
mylog.log("render","/modules/survey/views/tpls/answers/allAnswers.php");
$('#showAnswerBtn<?php echo @$viewDom ?>').on("click",function() {
$("#allAnswersContainer<?php echo @$viewDom ?>").toggleClass("hide");
$('#wizardForm').toggleClass("hide");
//getAjax(".pageContent", baseUrl+"/costum/co/index/slug/<?php echo $el['slug'] ?>/page/answerList",null,"html");
})
<?php if($canEdit) { ?>
......
......@@ -7,7 +7,6 @@
<a href="javascript:;" class='btn btn- btn-default' id="showAnswerBtn"><i class="fa fa-bars"></i> Les <?php echo $what ?></a>
<a href="#dashboard" class='lbh btn btn-default'><i class="fa fa-area-chart"></i> Observatoire Global</a>
<a href="javascript:;" id="globalCommunityBtn" class=' btn btn-default'><i class="fa fa-group"></i> Communauté</a>
<a href="<?php echo Yii::app()->createUrl("/costum")?>/co/index/slug/<?php echo $el["slug"] ?>/answer/new" class='btn btn-primary' id="showAnswerBtn"><i class="fa fa-plus"></i> Ajouter <?php echo $what ?></a>
</div>
<div id="allAnswersContainer" class="hide col-xs-12 col-lg-offset-2 col-lg-8 margin-top-20">
......@@ -21,9 +20,9 @@
foreach ($allAnswers as $k => $ans) {
$ct++;
$lbl = $what." ".$ct;
if(isset($this->costum["form"]["title"]))
if(isset(Yii::app()->session["costum"]["form"]["title"]))
{
$titlePath = explode( ".", $this->costum["form"]["title"] );
$titlePath = explode( ".", Yii::app()->session["costum"]["form"]["title"] );
if(isset($ans["answers"][$titlePath[0]][$titlePath[1]]))
$lbl = $ans["answers"][$titlePath[0]][$titlePath[1]];
}
......
......@@ -217,12 +217,6 @@ jQuery(document).ready(function() {
},
"html");
$('#showAnswerBtn').on("click",function() {
$("#allAnswersContainer").toggleClass("hide");
$('#<?php echo "wizardForm" ?>').toggleClass("hide");
//getAjax(".pageContent", baseUrl+"/costum/co/index/slug/<?php //echo $el['slug'] ?>/page/answerList",null,"html");
});
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment