Skip to content

Commit

Permalink
Dev: Reordered Buttons in TopBar for edit quesiton view
Browse files Browse the repository at this point in the history
  • Loading branch information
thedirtypanda committed Jul 14, 2021
1 parent cab5b6f commit 771e796
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
4 changes: 3 additions & 1 deletion application/controllers/QuestionAdministrationController.php
@@ -1,5 +1,7 @@
<?php

/**
* Class QuestionAdministrationController
*/
class QuestionAdministrationController extends LSBaseController
{

Expand Down
@@ -1,18 +1,3 @@
<!-- Save -->
<?php if(!empty($showSaveButton)): ?>
<a
id="save-button-create-question"
class="btn btn-default"
role="button"
<?php if ($oQuestion->qid !== 0): // Only enable Ajax save for edit question, not create question. ?>
data-save-with-ajax="true"
<?php endif; ?>
onclick="return LS.questionEditor.checkIfSaveIsValid(event, 'editor');"
>
<i class="fa fa-check-square"></i>
<?php eT("Save");?>
</a>
<?php endif; ?>

<?php /* Ported from previous versions: Pending to adapt to screen own JS for saving (and validations)
<!-- Save and new group -->
Expand All @@ -32,6 +17,14 @@ class="btn btn-default"
<?php endif; ?>
*/ ?>

<!-- Close -->
<?php if(!empty($showCloseButton)): ?>
<a class="btn btn-default" href="#" role="button" onclick="LS.questionEditor.showOverview(); return false;">
<span class="fa fa-close"></span>
<?php eT("Close");?>
</a>
<?php endif;?>

<!-- Save and close -->
<?php if(!empty($showSaveAndCloseButton)): ?>
<a
Expand All @@ -45,10 +38,18 @@ class="btn btn-default"
</a>
<?php endif; ?>

<!-- Close -->
<?php if(!empty($showCloseButton)): ?>
<a class="btn btn-danger" href="#" role="button" onclick="LS.questionEditor.showOverview(); return false;">
<span class="fa fa-close"></span>
<?php eT("Close");?>
<!-- Save -->
<?php if(!empty($showSaveButton)): ?>
<a
id="save-button-create-question"
class="btn btn-success"
role="button"
<?php if ($oQuestion->qid !== 0): // Only enable Ajax save for edit question, not create question. ?>
data-save-with-ajax="true"
<?php endif; ?>
onclick="return LS.questionEditor.checkIfSaveIsValid(event, 'editor');"
>
<i class="fa fa-check"></i>
<?php eT("Save");?>
</a>
<?php endif;?>
<?php endif; ?>
Expand Up @@ -23,12 +23,12 @@
<?php endif; ?>
<div id="question-create-edit-topbar" class='row container-fluid' style="display: none">
<!-- Left Side -->
<div class="<?= !empty($rightSideContent) ? 'col-md-8' : 'col-md-12'?>">
<div class="<?= !empty($rightSideContent) ? 'col-md-6' : 'col-md-12'?>">
<?= $leftSideContentEditor ?>
</div>

<!-- Right Side -->
<div class="<?= !empty($leftSideContentEditor) ? 'col-md-4' : 'col-md-12'?> pull-right text-right">
<div class="<?= !empty($leftSideContentEditor) ? 'col-md-6' : 'col-md-12'?> pull-right text-right">
<?= $rightSideContent ?>
</div>
</div>
Expand Down

0 comments on commit 771e796

Please sign in to comment.