Skip to content

Commit

Permalink
Fixed issue: Condition designer doesn't show predefined answers on fi…
Browse files Browse the repository at this point in the history
…rst load
  • Loading branch information
dominikvitt committed Nov 7, 2018
1 parent fb4068b commit b21b1da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion application/views/admin/conditions/conditionshead_view.php
Expand Up @@ -53,7 +53,7 @@ class='btn btn-default pull-right condition-header-button'

<?php echo $conditionsoutput_action_error;?>
<?php App()->getClientScript()->registerScript("conditionshead_prepared_javascript", $javascriptpre, LSYii_ClientScript::POS_BEGIN);?>
<?php App()->getClientScript()->registerScript("conditionshead_onrun_javascript", 'doToolTip();', LSYii_ClientScript::POS_POSTSCRIPT);?>
<?php App()->getClientScript()->registerScript("conditionshead_onrun_javascript", 'window.LS.doToolTip();', LSYii_ClientScript::POS_POSTSCRIPT);?>

<!-- Modal for quick add -->
<div id="quick-add-condition-modal" class="modal fade" role="dialog">
Expand Down
5 changes: 5 additions & 0 deletions assets/scripts/admin/conditions.js
Expand Up @@ -248,6 +248,11 @@ populateCanswersSelectObject = function() {

this.fun = function(evt) {

// preselect the first option if select object value is null
if ($(that.cquestionsId).val() === null){
$(that.cquestionsId+" option:first").attr('selected','selected');
}

var fname = $(that.cquestionsId).val();
// empty the canswers Select
$(that.canswersId + ' option').remove();
Expand Down

0 comments on commit b21b1da

Please sign in to comment.