Skip to content

Commit

Permalink
Dev: recreated lost commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Jul 3, 2017
1 parent 1b11432 commit 6ea8223
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 18 deletions.
2 changes: 1 addition & 1 deletion application/core/Survey_Common_Action.php
Expand Up @@ -269,6 +269,7 @@ protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $
$this->_titlebar($aData);

//// Each view will call the correct bar as a subview.
$this->_surveysidemenu($aData);
$this->_surveybar($aData);
$this->_nquestiongroupbar($aData);
$this->_questionbar($aData);
Expand All @@ -283,7 +284,6 @@ protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $
$this->_notifications();

//// Here the main content views.
$this->_surveysidemenu($aData);
$this->_listquestiongroups($aData);
$this->_listquestions($aData);
$this->_nsurveysummary($aData);
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/super/sidemenu.php
Expand Up @@ -23,7 +23,7 @@
$getMenuUrl = $this->createUrl("/admin/survey/sa/getAjaxMenuArray/surveyid/$surveyid");
?>

<div style="position:absolute; width:300px;left:0;">
<div style="position:absolute; width:300px;left:0;" id="side-menu-container">
<div id="vue-side-menu-app" data-surveyid='<?=$surveyid?>'>
<sidebar :options="[]" get-questions-url="<?=$getQuestionsUrl ?>" get-menu-url="<?=$getMenuUrl ?>" :translate="{settings: '<?php eT("Survey Settings");?>', structure:'<?php eT("Survey Structure");?>' }"></sidebar>
</div>
Expand Down
27 changes: 18 additions & 9 deletions assets/packages/adminpanel/build/lsadminpanel.js
Expand Up @@ -27405,14 +27405,18 @@ __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].use(__WEBPACK_IMPORTED_MODU
const AppState = new __WEBPACK_IMPORTED_MODULE_1_vuex__["a" /* default */].Store({
state: {
surveyid: 0,
language: ''
language: '',
maxHeight: 0
},
mutations: {
updateSurveyId (state, newSurveyId) {
state.surveyid = newSurveyId
},
changeLanguage (state, language) {
state.language = language;
},
changeMaxHeight(state, newHeight){
state.maxHeight = newHeight;
}
}
});
Expand All @@ -27427,7 +27431,8 @@ if(document.getElementById('vue-side-menu-app')){
},
mounted(){
this.$store.commit('updateSurveyId', $(this.$el).data('surveyid'));
}
this.$store.commit('changeMaxHeight', ($('#in_survey_common').height()-35));
}
});
}

Expand All @@ -27446,7 +27451,11 @@ const pjaxed = new __WEBPACK_IMPORTED_MODULE_6_pjax___default.a({
// 'topbar' : Topbar,
// }
// });

// For now this is only correcting the php rendered top-bar
$(document).ready(()=>{
let width = ($('body').width() - 310)+'px';
$('#surveybarid').width(width);
})

/***/ }),
/* 12 */
Expand Down Expand Up @@ -28947,7 +28956,7 @@ exports = module.exports = __webpack_require__(3)(undefined);


// module
exports.push([module.i, "\n.selected {\n background-color: #EEF6EF;\n box-shadow: 1px2px 4px #EEF6EF inset;\n}\n.bigIcons {\n font-size: 24px;\n}\n.border-bottom {\n border-bottom: 1px solid #323232;\n}\n.margin-bottom {\n padding-bottom: 5px;\n}\n.ls-ba .list-group > .list-group-item {\n padding: 10px 0;\n border: 0;\n border-radius: 0;\n border-bottom: 1px solid #323232;\n margin-bottom: 1px;\n}\n.ls-ba .list-group > .list-group-item .list-group {\n background: #DEF0DF;\n margin-bottom: 0;\n}\n.ls-ba .list-group > .list-group-item .list-group .list-group-item {\n background: transparent;\n padding-left: 15px;\n}\n.ls-ba .list-group > .list-group-item .list-group .list-group-item:last-of-type {\n border-bottom: 0;\n}\n.ls-ba .list-group > .list-group-item .list-group:first-of-type {\n border-top: 1px solid #323232;\n}\n", ""]);
exports.push([module.i, "\n.selected {\n background-color: #EEF6EF;\n box-shadow: 1px2px 4px #EEF6EF inset;\n}\n.bigIcons {\n font-size: 24px;\n}\n.border-bottom {\n border-bottom: 1px solid #323232;\n}\n.margin-bottom {\n padding-bottom: 5px;\n}\n.ls-ba .list-group > .list-group-item {\n padding: 10px 0;\n border: 0;\n border-radius: 0;\n border-bottom: 1px solid #323232;\n margin-bottom: 1px;\n}\n.ls-ba .list-group > .list-group-item .list-group {\n background: #DEF0DF;\n margin-bottom: 0;\n}\n.ls-ba .list-group > .list-group-item .list-group .list-group-item {\n background: transparent;\n padding-left: 15px;\n}\n.ls-ba .list-group > .list-group-item .list-group .list-group-item:last-of-type {\n border-bottom: 0;\n}\n.ls-ba .list-group > .list-group-item .list-group:first-of-type {\n border-top: 1px solid #323232;\n}\n#questionexplorer {\n overflow: auto;\n}\n", ""]);

// exports

Expand Down Expand Up @@ -28985,10 +28994,10 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
},
computed: {
calculatedHeight() {
let containerHeight = $('.mainMenu').height();
console.log($('#question-tree-container'));
let containerHeight = this.$store.state.maxHeight;
console.log(this.$store);
console.log('containerHeight', containerHeight);
return containerHeight - 175;
return containerHeight - 100;
}
},
methods: {
Expand Down Expand Up @@ -29186,7 +29195,7 @@ if (false) {

module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
return _c('div', {
staticClass: "ls-flex-column ls-ba",
staticClass: "ls-flex-column ls-ba ",
style: ({
height: _vm.calculatedHeight + 'px'
}),
Expand Down Expand Up @@ -30351,7 +30360,7 @@ exports = module.exports = __webpack_require__(3)(undefined);


// module
exports.push([module.i, ".ls-flex, .ls-flex-row, .ls-flex-column {\n display: -moz-flex;\n display: -webkit-flex;\n display: flex; }\n .ls-flex.align-item-center, .align-item-center.ls-flex-row, .align-item-center.ls-flex-column {\n -ms-align-items: center;\n -webkit-align-items: center;\n -moz-align-items: center;\n align-items: center; }\n .ls-flex.align-item-flex-start, .align-item-flex-start.ls-flex-row, .align-item-flex-start.ls-flex-column {\n -ms-align-items: flex-start;\n -webkit-align-items: flex-start;\n -moz-align-items: flex-start;\n align-items: flex-start; }\n .ls-flex.align-item-flex-end, .align-item-flex-end.ls-flex-row, .align-item-flex-end.ls-flex-column {\n -ms-align-items: flex-end;\n -webkit-align-items: flex-end;\n -moz-align-items: flex-end;\n align-items: flex-end; }\n .ls-flex.align-item-baseline, .align-item-baseline.ls-flex-row, .align-item-baseline.ls-flex-column {\n -ms-align-items: baseline;\n -webkit-align-items: baseline;\n -moz-align-items: baseline;\n align-items: baseline; }\n .ls-flex.align-item-stretch, .align-item-stretch.ls-flex-row, .align-item-stretch.ls-flex-column {\n -ms-align-items: stretch;\n -webkit-align-items: stretch;\n -moz-align-items: stretch;\n align-items: stretch; }\n .ls-flex.align-content-center, .align-content-center.ls-flex-row, .align-content-center.ls-flex-column {\n -ms-justify-content: center;\n -webkit-justify-content: center;\n -moz-justify-content: center;\n justify-content: center; }\n .ls-flex.align-content-flex-start, .align-content-flex-start.ls-flex-row, .align-content-flex-start.ls-flex-column {\n -ms-justify-content: flex-start;\n -webkit-justify-content: flex-start;\n -moz-justify-content: flex-start;\n justify-content: flex-start; }\n .ls-flex.align-content-flex-end, .align-content-flex-end.ls-flex-row, .align-content-flex-end.ls-flex-column {\n -ms-justify-content: flex-end;\n -webkit-justify-content: flex-end;\n -moz-justify-content: flex-end;\n justify-content: flex-end; }\n .ls-flex.align-content-space-between, .align-content-space-between.ls-flex-row, .align-content-space-between.ls-flex-column {\n -ms-justify-content: space-between;\n -webkit-justify-content: space-between;\n -moz-justify-content: space-between;\n justify-content: space-between; }\n .ls-flex.align-content-space-around, .align-content-space-around.ls-flex-row, .align-content-space-around.ls-flex-column {\n -ms-justify-content: space-around;\n -webkit-justify-content: space-around;\n -moz-justify-content: space-around;\n justify-content: space-around; }\n .ls-flex.wrap, .wrap.ls-flex-row, .wrap.ls-flex-column {\n -ms-flex-wrap: wrap;\n -webkit-flex-wrap: wrap;\n -moz-flex-wrap: wrap;\n flex-wrap: wrap; }\n\n.ls-flex-row {\n -ms-flex-direction: row;\n -webkit-flex-direction: row;\n -moz-flex-direction: row;\n flex-direction: row;\n width: 100%; }\n\n.ls-flex-column {\n -ms-flex-direction: column;\n -webkit-flex-direction: column;\n -moz-flex-direction: column;\n flex-direction: column; }\n\n.background-muted {\n background: #cdcdcd; }\n .background-muted > li {\n background: #cdcdcd; }\n\n.ls-ba .list-group > .list-group-item {\n padding: 10px 0;\n border: 0;\n border-radius: 0;\n border-bottom: 1px solid #323232;\n margin-bottom: 1px; }\n .ls-ba .list-group > .list-group-item .list-group {\n margin-bottom: 0; }\n .ls-ba .list-group > .list-group-item .list-group .list-group-item {\n padding-left: 15px; }\n .ls-ba .list-group > .list-group-item .list-group .list-group-item:last-of-type {\n border-bottom: 0; }\n .ls-ba .list-group > .list-group-item .list-group:first-of-type {\n border-top: 1px solid #323232; }\n", ""]);
exports.push([module.i, ".ls-flex, .ls-flex-row, .ls-flex-column {\n display: -moz-flex;\n display: -webkit-flex;\n display: flex; }\n .ls-flex.align-item-center, .align-item-center.ls-flex-row, .align-item-center.ls-flex-column {\n -ms-align-items: center;\n -webkit-align-items: center;\n -moz-align-items: center;\n align-items: center; }\n .ls-flex.align-item-flex-start, .align-item-flex-start.ls-flex-row, .align-item-flex-start.ls-flex-column {\n -ms-align-items: flex-start;\n -webkit-align-items: flex-start;\n -moz-align-items: flex-start;\n align-items: flex-start; }\n .ls-flex.align-item-flex-end, .align-item-flex-end.ls-flex-row, .align-item-flex-end.ls-flex-column {\n -ms-align-items: flex-end;\n -webkit-align-items: flex-end;\n -moz-align-items: flex-end;\n align-items: flex-end; }\n .ls-flex.align-item-baseline, .align-item-baseline.ls-flex-row, .align-item-baseline.ls-flex-column {\n -ms-align-items: baseline;\n -webkit-align-items: baseline;\n -moz-align-items: baseline;\n align-items: baseline; }\n .ls-flex.align-item-stretch, .align-item-stretch.ls-flex-row, .align-item-stretch.ls-flex-column {\n -ms-align-items: stretch;\n -webkit-align-items: stretch;\n -moz-align-items: stretch;\n align-items: stretch; }\n .ls-flex.align-content-center, .align-content-center.ls-flex-row, .align-content-center.ls-flex-column {\n -ms-justify-content: center;\n -webkit-justify-content: center;\n -moz-justify-content: center;\n justify-content: center; }\n .ls-flex.align-content-flex-start, .align-content-flex-start.ls-flex-row, .align-content-flex-start.ls-flex-column {\n -ms-justify-content: flex-start;\n -webkit-justify-content: flex-start;\n -moz-justify-content: flex-start;\n justify-content: flex-start; }\n .ls-flex.align-content-flex-end, .align-content-flex-end.ls-flex-row, .align-content-flex-end.ls-flex-column {\n -ms-justify-content: flex-end;\n -webkit-justify-content: flex-end;\n -moz-justify-content: flex-end;\n justify-content: flex-end; }\n .ls-flex.align-content-space-between, .align-content-space-between.ls-flex-row, .align-content-space-between.ls-flex-column {\n -ms-justify-content: space-between;\n -webkit-justify-content: space-between;\n -moz-justify-content: space-between;\n justify-content: space-between; }\n .ls-flex.align-content-space-around, .align-content-space-around.ls-flex-row, .align-content-space-around.ls-flex-column {\n -ms-justify-content: space-around;\n -webkit-justify-content: space-around;\n -moz-justify-content: space-around;\n justify-content: space-around; }\n .ls-flex.wrap, .wrap.ls-flex-row, .wrap.ls-flex-column {\n -ms-flex-wrap: wrap;\n -webkit-flex-wrap: wrap;\n -moz-flex-wrap: wrap;\n flex-wrap: wrap; }\n .ls-flex .col-1, .ls-flex-row .col-1, .ls-flex-column .col-1 {\n width: 8.33333; }\n .ls-flex .col-2, .ls-flex-row .col-2, .ls-flex-column .col-2 {\n width: 16.66667; }\n .ls-flex .col-3, .ls-flex-row .col-3, .ls-flex-column .col-3 {\n width: 25; }\n .ls-flex .col-4, .ls-flex-row .col-4, .ls-flex-column .col-4 {\n width: 33.33333; }\n .ls-flex .col-5, .ls-flex-row .col-5, .ls-flex-column .col-5 {\n width: 41.66667; }\n .ls-flex .col-6, .ls-flex-row .col-6, .ls-flex-column .col-6 {\n width: 50; }\n .ls-flex .col-7, .ls-flex-row .col-7, .ls-flex-column .col-7 {\n width: 58.33333; }\n .ls-flex .col-8, .ls-flex-row .col-8, .ls-flex-column .col-8 {\n width: 66.66667; }\n .ls-flex .col-9, .ls-flex-row .col-9, .ls-flex-column .col-9 {\n width: 75; }\n .ls-flex .col-10, .ls-flex-row .col-10, .ls-flex-column .col-10 {\n width: 83.33333; }\n .ls-flex .col-11, .ls-flex-row .col-11, .ls-flex-column .col-11 {\n width: 91.66667; }\n .ls-flex .col-12, .ls-flex-row .col-12, .ls-flex-column .col-12 {\n width: 100; }\n\n.ls-flex-row {\n -ms-flex-direction: row;\n -webkit-flex-direction: row;\n -moz-flex-direction: row;\n flex-direction: row;\n width: 100%; }\n\n.ls-flex-column {\n -ms-flex-direction: column;\n -webkit-flex-direction: column;\n -moz-flex-direction: column;\n flex-direction: column; }\n\n.background-muted {\n background: #cdcdcd; }\n .background-muted > li {\n background: #cdcdcd; }\n\n.ls-ba .list-group > .list-group-item {\n padding: 10px 0;\n border: 0;\n border-radius: 0;\n border-bottom: 1px solid #323232;\n margin-bottom: 1px; }\n .ls-ba .list-group > .list-group-item .list-group {\n margin-bottom: 0; }\n .ls-ba .list-group > .list-group-item .list-group .list-group-item {\n padding-left: 15px; }\n .ls-ba .list-group > .list-group-item .list-group .list-group-item:last-of-type {\n border-bottom: 0; }\n .ls-ba .list-group > .list-group-item .list-group:first-of-type {\n border-top: 1px solid #323232; }\n\n#sidebar {\n padding-top: 15px; }\n\n.menubar.surveybar {\n position: absolute;\n top: 105px;\n left: 305px;\n width: 85%; }\n\n#in_survey_common {\n padding-top: 65px; }\n", ""]);

// exports

Expand Down
15 changes: 15 additions & 0 deletions assets/packages/adminpanel/gulpfile.js
@@ -0,0 +1,15 @@
const
gulp = require("gulp"),
concat = require("gulp-concat"),
sass = require("gulp-sass");

gulp.task('sass', function () {
return gulp.src('./scss/main.scss')
.pipe(sass().on('error', sass.logError))
.pipe(concat('lsadminpanel.css'))
.pipe(gulp.dest('./build'));
});

gulp.task('sass:watch', function () {
gulp.watch('./scss/main.scss', ['sass']);
});
3 changes: 3 additions & 0 deletions assets/packages/adminpanel/package.json
Expand Up @@ -15,6 +15,9 @@
"eslint-plugin-html": "^3.0.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.1",
"gulp-sass": "^3.1.0",
"node-sass": "^4.5.3",
"sass-loader": "^6.0.6",
"style-loader": "^0.18.2",
Expand Down
14 changes: 14 additions & 0 deletions assets/packages/adminpanel/scss/custom.scss
@@ -0,0 +1,14 @@
#sidebar{
padding-top: 15px;
}

.menubar.surveybar{
position: absolute;
top:105px;
left:305px;
width:85%;
}

#in_survey_common{
padding-top:65px
}
4 changes: 4 additions & 0 deletions assets/packages/adminpanel/scss/lsflex.scss
Expand Up @@ -42,6 +42,10 @@ $x-directions: center flex-start flex-end space-between space-around;
flex-wrap: wrap;
}

@for $i from 1 through 12 {
.col-#{$i} { width: 100*( $i/12); }
}

}


Expand Down
3 changes: 2 additions & 1 deletion assets/packages/adminpanel/scss/main.scss
@@ -1,3 +1,4 @@
@import 'lsflex';
@import 'colors';
@import 'bootstrapadditions'
@import 'bootstrapadditions';
@import 'custom';
11 changes: 7 additions & 4 deletions assets/packages/adminpanel/src/components/questionsgroups.vue
Expand Up @@ -19,10 +19,10 @@ export default {
},
computed: {
calculatedHeight() {
let containerHeight = $('.mainMenu').height();
console.log($('#question-tree-container'));
let containerHeight = this.$store.state.maxHeight;
console.log(this.$store);
console.log('containerHeight',containerHeight);
return (containerHeight - 175);
return (containerHeight - 100);
}
},
methods: {
Expand Down Expand Up @@ -56,7 +56,7 @@ export default {
}
</script>
<template>
<div id="questionexplorer" class="ls-flex-column ls-ba" :style="{height: calculatedHeight+'px'}">
<div id="questionexplorer" class="ls-flex-column ls-ba " :style="{height: calculatedHeight+'px'}">
<ul class="list-group">
<li v-for="(questiongroup,index) in questiongroups" class="list-group-item ls-flex-column" v-bind:class="isActive(index) ? 'selected' : ''" >
<div class="col-sm-12 ls-flex-row nowrap margin-bottom">
Expand Down Expand Up @@ -112,4 +112,7 @@ export default {
}
}
}
#questionexplorer{
overflow: auto;
}
</style>
14 changes: 12 additions & 2 deletions assets/packages/adminpanel/src/main.js
Expand Up @@ -12,14 +12,18 @@ Vue.use(VueLocalStorage);
const AppState = new Vuex.Store({
state: {
surveyid: 0,
language: ''
language: '',
maxHeight: 0
},
mutations: {
updateSurveyId (state, newSurveyId) {
state.surveyid = newSurveyId
},
changeLanguage (state, language) {
state.language = language;
},
changeMaxHeight(state, newHeight){
state.maxHeight = newHeight;
}
}
});
Expand All @@ -34,7 +38,8 @@ if(document.getElementById('vue-side-menu-app')){
},
mounted(){
this.$store.commit('updateSurveyId', $(this.$el).data('surveyid'));
}
this.$store.commit('changeMaxHeight', ($('#in_survey_common').height()-35));
}
});
}

Expand All @@ -53,3 +58,8 @@ const pjaxed = new Pjax({
// 'topbar' : Topbar,
// }
// });
// For now this is only correcting the php rendered top-bar
$(document).ready(()=>{
let width = ($('body').width() - 310)+'px';
$('#surveybarid').width(width);
})

0 comments on commit 6ea8223

Please sign in to comment.