Skip to content

Commit

Permalink
Fixed issue #13093: VERY VERY awfull blink at admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Dec 21, 2017
1 parent 58544e6 commit ace4d8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 174 deletions.
3 changes: 2 additions & 1 deletion application/views/admin/super/layout_insurvey.php
Expand Up @@ -23,7 +23,7 @@
//The container to hold the vuejs application
echo ' <!-- Survey page, started in Survey_Common_Action::render_wrapped_template() -->
<div id="vue-app-main-container" '
. 'class="ls-flex-row align-items-flex-center align-content-center" '
. 'class="ls-flex-row align-items-flex-begin align-content-flex-end" '
. '>';

//Rendered through /admin/super/sidemenu
Expand All @@ -32,6 +32,7 @@

echo '<div id="pjax-content" '
. 'class="ls-flex-column align-items-flex-start align-content-center col-11 ls-flex-item transition-animate-width" '
. 'style="max-width:80%;"'
. 'v-bind:style="{\'max-width\': $store.getters.substractContainer, \'min-height\': $store.state.generalContainerHeight}"'
. '>';

Expand Down
173 changes: 0 additions & 173 deletions application/views/admin/super/sidemenu.php
Expand Up @@ -48,176 +48,3 @@
:translate="{settings: '<?php eT("Settings");?>', structure:'<?php eT("Structure");?>', createQuestionGroup:'<?php eT("Add question group");?>', createQuestion:'<?php eT("Add question");?>' }"
></sidebar>


<?php
/*
// TODO : move to controller
$bSurveyIsActive = (isset($surveyIsActive))?$surveyIsActive:$oSurvey->active=='Y';
$sidemenu = (isset($sidemenu))?$sidemenu:array();
?>
<!-- State when page is loaded : for JavaScript-->
<?php if ($sideMenuBehaviour == 'adaptive' || $sideMenuBehaviour == ''): ?>
<?php if(isset($sidemenu['state']) && $sidemenu['state']==false ):?>
<input type="hidden" id="close-side-bar" />
<?php endif;?>
<?php elseif ($sideMenuBehaviour == 'alwaysClosed'): ?>
<input type="hidden" id="close-side-bar" />
<?php elseif ($sideMenuBehaviour == 'alwaysOpen'): ?>
<!-- Do nothing -->
<?php endif;?>
<!-- To handle correctly the side menu positioning -->
<div
class="absolute-wrapper hidden-xs"
style="z-index: 100; <?php if (!$showSideMenu): echo 'left: -250px;'; endif; ?> ">
</div>
<!-- sideMenu -->
<div class="side-menu <?php if (!$showSideMenu): echo ' side-menu-hidden'; endif; ?> hidden-xs" id="sideMenu" style="z-index: 101;">
<nav class="navbar navbar-default hidden-xs">
<!-- Header : General -->
<div class="navbar-header hidden-xs">
<div class="brand-wrapper hidden-xs">
<!-- Hamburger for futur mobile design-->
<button type="button" class="navbar-toggle hidden-xs">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class='row no-gutter'>
<!-- Brand -->
<a id='sidemenu-home' class="col-sm-7 navbar-brand hideside toggleside" href="<?php echo $this->createUrl("admin/survey/sa/view/surveyid/$surveyid"); ?>">
<div class="brand-name-wrapper hidden-xs">
<span class="fa fa-home"></span>&nbsp;
<?php eT("Survey");?>
</div>
</a>
<!-- chevrons to stretch the side menu -->
<?php if (getLanguageRTL($_SESSION['adminlang'])): ?>
<div class='col-sm-5'>
<a class="btn btn-default hide-button hidden-xs opened pull-right" id="chevronStretch">
<span class="fa fa-chevron-left" ></span>
</a>
<a class="btn btn-default hide-button hidden-xs opened pull-right" id="chevronClose">
<span class="fa fa-chevron-right"></span>
</a>
</div>
<?php else: ?>
<div class='col-sm-5'>
<a class="btn btn-default hide-button hidden-xs opened pull-right" id="chevronStretch">
<span class="fa fa-chevron-right" ></span>
</a>
<a class="btn btn-default hide-button hidden-xs opened pull-right" id="chevronClose">
<span class="fa fa-chevron-left"></span>
</a>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php echo $quickmenu; ?>
<!-- Main Menu -->
<div class="side-menu-container hidden-xs">
<ul class="nav navbar-nav sidemenuscontainer hidden-xs" style="<?php if (!$showSideMenu): echo 'display: none;'; endif; ?>">
<!-- Question & Groups-->
<li class="panel panel-default dropdownlvl1" id="dropdown">
<a data-toggle="collapse" id="questions-groups-collapse" href="#dropdown-lvl1" <?php if( isset($sidemenu["questiongroups"]) ) echo 'aria-expanded="true"'; ?> >
<span class="fa fa-folder-open"></span> <?php eT('Questions and groups:');?>
<span class="caret"></span>
</a>
<!-- Question Explorer -->
<div id="dropdown-lvl1" class="panel-collapse collapse <?php if( isset($sidemenu["questiongroups"]) || isset($sidemenu["listquestions"]) || 1==1 ) echo 'in'; ?>" <?php if( isset($sidemenu["questiongroups"]) || isset($sidemenu["listquestions"]) ) echo 'aria-expanded="true"'; ?> >
<div class="panel-body">
<ul class="nav navbar-nav dropdown-first-level">
<!-- Explorer -->
<?php $this->renderPartial( "/admin/super/_question_explorer", array(
'sidemenu' => $sidemenu,
'aGroups' => $aGroups,
'iSurveyId' => $surveyid,
'bSurveyIsActive' => $bSurveyIsActive
)); ?>
<?php if($permission):?>
<!-- List Groups -->
<li class="toWhite <?php if( isset($sidemenu["listquestiongroups"]) ) echo 'active'; ?>">
<!-- admin/survey/sa/view/surveyid/838454 listquestiongroups($iSurveyID)-->
<a href="<?php echo $this->createUrl("admin/survey/sa/listquestiongroups/surveyid/$surveyid"); ?>">
<span class="fa fa-list"></span>
<?php eT("List question groups");?>
</a>
</li>
<!-- List Questions -->
<li class="toWhite <?php if( isset($sidemenu["listquestions"]) ) echo 'active'; ?>">
<a href="<?php echo $this->createUrl("admin/survey/sa/listquestions/surveyid/$surveyid"); ?>">
<span class="fa fa-list"></span>
<?php eT("List questions");?>
</a>
</li>
<?php endif; ?>
<!-- Organize questions -->
<?php if($surveycontentupdate):?>
<?php if ($activated):?>
<li class="disabled">
<a href='#'>
<span class="icon-organize"></span>
<span class="btntooltip" data-toggle="tooltip" data-placement="bottom" title="<?php echo gT("Question group/question organizer disabled").' - '.gT("This survey is currently active."); ?>">
<?php eT("Question organizer"); ?>
</span>
</a>
</li>
<?php else: ?>
<li>
<a href="<?php echo $this->createUrl("admin/survey/sa/organize/surveyid/$surveyid"); ?>">
<span class="icon-organize"></span>
<?php eT("Question organizer"); ?>
</a>
</li>
<?php endif; ?>
<?php endif;?>
</ul>
</div>
</div>
</li>
<!-- Token -->
<?php if($tokenmanagement):?>
<li id="tokensidemenu" class="toWhite <?php if( isset($sidemenu["token_menu"]) ) echo 'active'; ?> ">
<a href="<?php echo $this->createUrl("admin/tokens/sa/index/surveyid/$surveyid"); ?>">
<span class="fa fa-user"></span>
<?php eT("Survey participants");?>
</a>
</li>
<?php endif; ?>
<?php echo $beforeSideMenuRender; ?>
<!-- Survey List -->
<li class="toWhite" >
<a href="<?php echo $this->createUrl("admin/survey/sa/listsurveys/"); ?>" class="" >
<span class="fa fa-step-backward"></span>
<?php eT("Return to survey list");?>
</a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
</div>
*/
?>
3 changes: 3 additions & 0 deletions assets/packages/adminpanel/src/main.js
Expand Up @@ -43,6 +43,9 @@ $(document).on('ready', function () {
this.$store.commit('changeGeneralContainerHeight', generalContainerHeight);
}
},
beforeCreate() {
this.controlWindowSize();
},
created() {
this.controlWindowSize();
window.addEventListener('resize', () => {
Expand Down

0 comments on commit ace4d8c

Please sign in to comment.