Skip to content

Commit

Permalink
Dev: cleansed assessements and added save and close back
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Nov 27, 2017
1 parent 610b8a9 commit 81acc36
Show file tree
Hide file tree
Showing 16 changed files with 302 additions and 1,257 deletions.
4 changes: 1 addition & 3 deletions application/controllers/admin/assessments.php
Expand Up @@ -120,9 +120,7 @@ private function _showAssessments($iSurveyID, $action)
Yii::app()->loadHelper('admin/htmleditor');

// FIXME this must be in VIEWS!
$urls['output'] = '<div class="side-body '.getSideBodyClass(false).'">';
$urls['output'] .= viewHelper::getViewTestTag('surveyAssessments');
$urls['output'] .= '<h3>'.gT("Assessments").'</h3>';

$aData['asessementNotActivated'] = false;
if ($oSurvey->assessments != 'Y') {
$aData['asessementNotActivated'] = array(
Expand Down
2 changes: 0 additions & 2 deletions application/core/Survey_Common_Action.php
Expand Up @@ -351,8 +351,6 @@ protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $
if (!empty($aData['surveyid'])) {
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
}


Expand Down
501 changes: 268 additions & 233 deletions application/views/admin/assessments_view.php

Large diffs are not rendered by default.

Expand Up @@ -25,7 +25,6 @@
<input type='hidden' name='sid' value='<?php echo $surveyid; ?>' />
<input type='hidden' name='gid' value='<?php echo $gid; ?>' />
<input type='hidden' name='qid' value='<?php echo $qid; ?>' />
<input type='hidden' name='close-after-save' value='true' />

<?php if($viewType=='subQuestions'): ?>
<input type='hidden' id='action' name='action' value='updatesubquestions' />
Expand Down
Expand Up @@ -325,7 +325,6 @@
<input type='submit' class="hidden" value='<?php eT("Save and close"); ?>' />
<?php endif; ?>
<input type='hidden' name='sid' value='<?php echo $surveyid; ?>' />
<input type='hidden' name='close-after-save' value='true' />
</form>
</div>
</div>
18 changes: 8 additions & 10 deletions application/views/admin/survey/Question/questionbar_view.php
Expand Up @@ -227,12 +227,10 @@
</a>
<?php endif;?>

<?php /*
<a class="btn btn-default" href="<?php echo $this->createUrl("admin/survey/sa/listquestiongroups/surveyid/282267{$surveyid}"); ?>" role="button">
<span class="fa fa-saved"></span>
<?php eT("Save and close");?>
</a>
*/ ?>
<a class="btn btn-default" href="<?php echo $this->createUrl("admin/survey/sa/listquestiongroups/surveyid/282267{$surveyid}"); ?>" role="button">
<span class="fa fa-saved"></span>
<?php eT("Save and close");?>
</a>

<?php /*
<!-- Close -->
Expand Down Expand Up @@ -271,15 +269,15 @@
<?php eT("Save");?>

</a>
<?php
/*
<a class="btn btn-default" href="<?php echo $organizebar['saveandclosebuttonright']['url']; ?>" role="button" id="save-and-close-button">
<span class="fa fa-saved"></span>
<?php eT("Save and close");?>
</a>
<?php
/*
<a class="btn btn-danger" href="<?php echo $organizebar['closebuttonright']['url']; ?>" role="button">
<span class="fa fa-close"></span>
<?php eT("Close");?>
<span class="fa fa-close"></span>
<?php eT("Close");?>
</a>
*/
?>
Expand Down
Expand Up @@ -244,22 +244,21 @@
<?php if(isset($questiongroupbar['savebutton']['form'])):?>
<?php if(!isset($copying) || !$copying): ?>
<a class="btn btn-success" href="#" role="button" id="save-button">
<span class="fa fa-floppy-o"></span>
<i class="fa fa-floppy-o"></i>
<?php eT("Save");?>
</a>

<?php endif; ?>
<?php endif; ?>

<?php /*

<!-- Save and close -->
<?php if(isset($questiongroupbar['saveandclosebutton'])):?>
<a id="save-and-close-button" class="btn btn-default" role="button">
<span class="fa fa-saved"></span>
<i class="fa fa-check-square"></i>
<?php eT("Save and close");?>
</a>
<?php endif; ?>
*/ ?>


<?php /*
Expand Down
3 changes: 1 addition & 2 deletions application/views/admin/survey/breadcrumb.php
Expand Up @@ -132,5 +132,4 @@
</div>
</div>
</div>
</div>
<input type="hidden" id="gettheuserid" value="<?php echo Yii::app()->user->id; ?>" />
<input type="hidden" id="gettheuserid" value="<?php echo Yii::app()->user->id; ?>" />
3 changes: 3 additions & 0 deletions assets/packages/adminpanel/build/lsadminpanel.js
Expand Up @@ -36398,6 +36398,9 @@ $(document).on('ready', function () {
'display': 'block'
});
});
$(document).on('pjax:error', (event) => {
console.log(event);
});
$(document).on('pjax:success', () => {
$('#pjaxClickInhibitor').fadeOut(400, function(){$(this).remove();});
$('#pjax-file-load-container').find('div').css('width', '100%');
Expand Down
2 changes: 1 addition & 1 deletion assets/packages/adminpanel/build/lsadminpanel.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/packages/adminpanel/build/lsadminpanel.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions assets/packages/adminpanel/src/main.js
Expand Up @@ -87,6 +87,9 @@ $(document).on('ready', function () {
'display': 'block'
});
});
$(document).on('pjax:error', (event) => {
console.log(event);
});
$(document).on('pjax:success', () => {
$('#pjaxClickInhibitor').fadeOut(400, function(){$(this).remove();});
$('#pjax-file-load-container').find('div').css('width', '100%');
Expand Down
3 changes: 2 additions & 1 deletion assets/packages/pjax/loadPjax.js
Expand Up @@ -24,7 +24,8 @@ var switchInnerHTML = function (oldEl, newEl, opt) {
'#pjax-content': switchInnerHTML,
'#breadcrumb-container': switchInnerHTML,
},
debug: true
debug: true,
forceRedirectOnFail: true
});
}

Expand Down
3 changes: 2 additions & 1 deletion assets/packages/pjax/loadPjax.min.js
Expand Up @@ -23,7 +23,8 @@ var switchInnerHTML = function (oldEl, newEl, opt) {
'#beginScripts': switchInnerHTML,
'#pjax-content': switchInnerHTML,
'#breadcrumb-container': switchInnerHTML,
}
},
forceRedirectOnFail: true
});
}

Expand Down
14 changes: 8 additions & 6 deletions assets/packages/pjax/pjax.js

Large diffs are not rendered by default.

0 comments on commit 81acc36

Please sign in to comment.