Navigation Menu

Skip to content

Commit

Permalink
Dev Fixed issue where survey screen was not resized when question index
Browse files Browse the repository at this point in the history
was enabled.
  • Loading branch information
SamMousa committed Jul 1, 2013
1 parent b5787ce commit 704807f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -60,6 +60,14 @@ protected function createFullQuestionIndexByGroup($LEMsessid)
echo CHtml::closeTag('ol');
echo CHtml::closeTag('div');
echo CHtml::closeTag('div');
/* Can be replaced by php or in global js */
echo "<script type=\"text/javascript\">\n"
. " $(\".outerframe\").addClass(\"withindex\");\n"
. " var idx = $(\"#index\");\n"
. " var row = $(\"#index .row.current\");\n"
. " idx.scrollTop(row.position().top - idx.height() / 2 - row.height() / 2);\n"
. "</script>\n";
echo "\n";
}

protected function createFullQuestionIndexByQuestion($LEMsessid)
Expand All @@ -70,6 +78,14 @@ protected function createFullQuestionIndexByQuestion($LEMsessid)
echo 'Question by question not yet supported, use incremental index.';
echo CHtml::closeTag('div');
echo CHtml::closeTag('div');
/* Can be replaced by php or in global js */
echo "<script type=\"text/javascript\">\n"
. " $(\".outerframe\").addClass(\"withindex\");\n"
. " var idx = $(\"#index\");\n"
. " var row = $(\"#index .row.current\");\n"
. " idx.scrollTop(row.position().top - idx.height() / 2 - row.height() / 2);\n"
. "</script>\n";
echo "\n";
}

protected function createIncrementalQuestionIndex($LEMsessid, $surveyMode)
Expand Down

1 comment on commit 704807f

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can not update it in global.js here ?

Please sign in to comment.