Skip to content

Commit

Permalink
Dev: added questioncount
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Nov 28, 2016
1 parent 4c8ebe6 commit 0f3f206
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion application/controllers/admin/questiongroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ private function collectQuestionGroupDetail($surveyid, $language, $gid){
private function collectQuestionDetail($surveyid, $language, $qid){

$oQuestion = Question::model()->findByPk(array('qid' => $qid, 'language' => $language));
LimeExpressionManager::ProcessString("{" . $oQuestion->relevance . "}", $qid);
$jDetailContent = "<div class='container-center'>
<dl>
<dt>".gT('Code')."</dt>
Expand All @@ -657,7 +658,7 @@ private function collectQuestionDetail($surveyid, $language, $qid){
<dd class='text-right'>&nbsp;".$oQuestion->otherIcon."</dd>
<dt>".gT('Relevance equation')."</dt>
<dd class='text-right'>&nbsp;".LimeExpressionManager::UnitTestConvertConditionsToRelevance($surveyid,$oQuestion->qid)."</dd>
<dd class='text-right'>&nbsp;".LimeExpressionManager::GetLastPrettyPrintExpression()."</dd>
</dl>";

$jDetailsArray = array(
Expand Down
11 changes: 7 additions & 4 deletions scripts/admin/jquery.fancytree.bsbuttonbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@
iconElement = span.find('.fancytree-icon'),
titleElement = span.find('.fancytree-title');
//Add the bootstrap classes
expandElement.addClass('col-xs-2 font-huge pull-right');
iconElement.addClass('col-xs-2 font-huge');
expandElement.addClass('col-xs-1 font-huge pull-right');
iconElement.addClass('col-xs-1 font-huge');
titleElement.addClass('col-xs-10');
//combine in row-wrapper
wrapperElement
.append(iconElement)
.append(titleElement);

if(expandElement.hasClass('fa')){
var childCount = node.countChildren();
wrapperElement.append("<span class='pull-right'>("+childCount+")&nbsp;</span>");
wrapperElement.append(expandElement);
titleElement.removeClass('col-xs-10');
titleElement.addClass('col-xs-8');
Expand All @@ -47,8 +49,8 @@
},
renderButtons = function(node){
var baseButton = $('<a role="button"></a>)'),
buttonContainer = $('<div class="btn-group pull-right fancytree-innerhtml-buttonbar" role="group"></div>'),
container = $('<div class="col-xs-12"></div>'),
buttonContainer = $('<div class="btn-group btn-group-justified fancytree-innerhtml-buttonbar" role="group"></div>'),
container = $('<div class="col-xs-6"></div>'),
row = $('<div class="row text-right" style="margin:0;padding:0;height:15px;"></div>');

//console.log(node.data.buttons);
Expand Down Expand Up @@ -111,6 +113,7 @@
buttonContainer.append(infoButton);
try{infoButton.call(button.toggle);}catch(e){}

row.append(container.clone());
container.append(buttonContainer);
row.append(container);
$(node.span).find('.fancytree-innerhtml-container').prepend(row);
Expand Down
7 changes: 5 additions & 2 deletions styles/Sea_Green/css/lime-admin-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,10 @@ div.panel.disabled {
#in_survey_common{
padding: 0 5px;
}

.popover{
max-width: 45%; /* Max Width of the popover (depending on the container!) */
min-width: 25%;
}
.sidemenu-container {
position:fixed;
width: 300px;
Expand Down Expand Up @@ -759,7 +762,7 @@ div.panel.disabled {
font-weight: 400;
}

#fancytree .lsi-tree-question-item .fancytree-title{
#fancytree .fancytree-title{
white-space: nowrap;
max-width: 100%;
overflow: hidden;
Expand Down

0 comments on commit 0f3f206

Please sign in to comment.