Skip to content

Commit

Permalink
Dev: fix multiple small vizialisation problems
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Jul 16, 2018
1 parent dfe2cdd commit b191d84
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 36 deletions.
4 changes: 2 additions & 2 deletions application/views/admin/survey/editLocalSettings_view.php
Expand Up @@ -140,8 +140,8 @@
<!-- Survey data policy checkbox label -->
<div class="form-group">
<label class="control-label"><?php eT("Survey data policy checkbox label:"); ?>
<i class="fa fa-question-circle" id="dataseclabel_popover_<?=$aSurveyLanguageSettings['surveyls_language']?>" data-toggle="popover" title="<?=gT('How to link to the survey data policy statement modal window')?>" data-content="<?php
eT("If you want to specify a link to the survey data policy please use the placeholders {STARTPOLICYLINK} and {ENDPOLICYLINK} to define the link that opens the popup. If there is no placeholder given, there will be an appendix.")
<i class="fa fa-question-circle" id="dataseclabel_popover_<?=$aSurveyLanguageSettings['surveyls_language']?>" data-toggle="tooltip" title="<?php
eT("If you want to specify a link to the survey data policy please use the placeholders {STARTPOLICYLINK} and {ENDPOLICYLINK} to define the link that opens the popup. If there is no placeholder given, there will be an appendix.", 'json')
?>"></i> </label>
<div class="">
<?php echo CHtml::textField("dataseclabel_{$aSurveyLanguageSettings['surveyls_language']}",$aSurveyLanguageSettings['surveyls_policy_notice_label'],array('class'=>'form-control','size'=>"80",'id'=>"dataseclabel_{$aSurveyLanguageSettings['surveyls_language']}")); ?>
Expand Down
10 changes: 5 additions & 5 deletions assets/packages/adminpanel/build/lsadminpanel.debug.js

Large diffs are not rendered by default.

52 changes: 38 additions & 14 deletions assets/packages/adminpanel/build/lsadminpanel.js
Expand Up @@ -36353,11 +36353,26 @@ __WEBPACK_IMPORTED_MODULE_0_vue__["a" /* default */].mixin({
methods: {
updatePjaxLinks: function() {
this.$store.commit("updatePjax");
},
redoTooltips: function() {
try {
$(".btntooltip").tooltip("destroy");
} catch (e) {}
try {
$('[data-tooltip="true"]').tooltip("destroy");
} catch (e) {}
try {
$('[data-tooltip="true"]').tooltip("destroy");
} catch (e) {}

$(".btntooltip").tooltip();
$('[data-tooltip="true"]').tooltip();
$('[data-toggle="tooltip"]').tooltip();
}
}
});

$(document).on("ready", function() {
$(document).on("ready", function () {
const AppState = __WEBPACK_IMPORTED_MODULE_4__store_vuex_store_js__["a" /* default */](LS.globalUserId);
if (document.getElementById("vue-app-main-container")) {
// eslint-disable-next-line
Expand All @@ -36372,16 +36387,16 @@ $(document).on("ready", function() {
methods: {
controlWindowSize() {
const adminmenuHeight = $("body")
.find("nav")
.first()
.height(),
.find("nav")
.first()
.height(),
footerHeight = $("body")
.find("footer")
.last()
.height(),
.find("footer")
.last()
.height(),
menuHeight = $(".menubar").outerHeight(),
inSurveyOffset =
adminmenuHeight + footerHeight + menuHeight + 25,
adminmenuHeight + footerHeight + menuHeight + 25,
windowHeight = window.innerHeight,
inSurveyViewHeight = windowHeight - inSurveyOffset;

Expand Down Expand Up @@ -36426,7 +36441,7 @@ $(document).on("ready", function() {

$(document).trigger("vue-reload-remote");

window.setInterval(function() {
window.setInterval(function () {
$(document).trigger("vue-reload-remote");
}, 60 * 5 * 1000);
}
Expand Down Expand Up @@ -36473,13 +36488,13 @@ $(document)
$("#pjax-file-load-container")
.find("div")
.css("width", "100%");
$("#pjaxClickInhibitor").fadeOut(400, function() {
$("#pjaxClickInhibitor").fadeOut(400, function () {
$(this).remove();
});
$(document).trigger("vue-resize-height");
$(document).trigger("vue-reload-remote");
// $(document).trigger('vue-sidemenu-update-link');
setTimeout(function() {
setTimeout(function () {
$("#pjax-file-load-container")
.find("div")
.css({
Expand Down Expand Up @@ -37104,7 +37119,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
},
orderedQuestionGroups() {
return __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.orderBy(this.$store.state.questiongroups, a => {
return parseInt(a.group_order || 999999);
return parseInt(a.group_order);
}, ["asc"]);
},
createQuestionAllowed() {
Expand Down Expand Up @@ -37784,6 +37799,14 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
classes += menuItem.pjax ? 'pjax ' : ' ';
classes += this.$store.state.lastMenuItemOpen == menuItem.id ? 'selected ' : ' ';
return classes;
},
reConvertHTML(string) {
var chars = ["'", "©", "Û", "®", "ž", "Ü", "Ÿ", "Ý", "$", "Þ", "%", "¡", "ß", "¢", "à", "£", "á", "À", "¤", "â", "Á", "¥", "ã", "Â", "¦", "ä", "Ã", "§", "å", "Ä", "¨", "æ", "Å", "©", "ç", "Æ", "ª", "è", "Ç", "«", "é", "È", "¬", "ê", "É", "­", "ë", "Ê", "®", "ì", "Ë", "¯", "í", "Ì", "°", "î", "Í", "±", "ï", "Î", "²", "ð", "Ï", "³", "ñ", "Ð", "´", "ò", "Ñ", "µ", "ó", "Õ", "¶", "ô", "Ö", "·", "õ", "Ø", "¸", "ö", "Ù", "¹", "÷", "Ú", "º", "ø", "Û", "»", "ù", "Ü", "@", "¼", "ú", "Ý", "½", "û", "Þ", "€", "¾", "ü", "ß", "¿", "ý", "à", "‚", "À", "þ", "á", "ƒ", "Á", "ÿ", "å", "„", "Â", "æ", "…", "Ã", "ç", "†", "Ä", "è", "‡", "Å", "é", "ˆ", "Æ", "ê", "‰", "Ç", "ë", "Š", "È", "ì", "‹", "É", "í", "Œ", "Ê", "î", "Ë", "ï", "Ž", "Ì", "ð", "Í", "ñ", "Î", "ò", "‘", "Ï", "ó", "’", "Ð", "ô", "“", "Ñ", "õ", "”", "Ò", "ö", "•", "Ó", "ø", "–", "Ô", "ù", "—", "Õ", "ú", "˜", "Ö", "û", "™", "×", "ý", "š", "Ø", "þ", "›", "Ù", "ÿ", "œ", "Ú"];
var codes = ["&#039;", "&copy;", "&#219;", "&reg;", "&#158;", "&#220;", "&#159;", "&#221;", "&#36;", "&#222;", "&#37;", "&#161;", "&#223;", "&#162;", "&#224;", "&#163;", "&#225;", "&Agrave;", "&#164;", "&#226;", "&Aacute;", "&#165;", "&#227;", "&Acirc;", "&#166;", "&#228;", "&Atilde;", "&#167;", "&#229;", "&Auml;", "&#168;", "&#230;", "&Aring;", "&#169;", "&#231;", "&AElig;", "&#170;", "&#232;", "&Ccedil;", "&#171;", "&#233;", "&Egrave;", "&#172;", "&#234;", "&Eacute;", "&#173;", "&#235;", "&Ecirc;", "&#174;", "&#236;", "&Euml;", "&#175;", "&#237;", "&Igrave;", "&#176;", "&#238;", "&Iacute;", "&#177;", "&#239;", "&Icirc;", "&#178;", "&#240;", "&Iuml;", "&#179;", "&#241;", "&ETH;", "&#180;", "&#242;", "&Ntilde;", "&#181;", "&#243;", "&Otilde;", "&#182;", "&#244;", "&Ouml;", "&#183;", "&#245;", "&Oslash;", "&#184;", "&#246;", "&Ugrave;", "&#185;", "&#247;", "&Uacute;", "&#186;", "&#248;", "&Ucirc;", "&#187;", "&#249;", "&Uuml;", "&#64;", "&#188;", "&#250;", "&Yacute;", "&#189;", "&#251;", "&THORN;", "&#128;", "&#190;", "&#252", "&szlig;", "&#191;", "&#253;", "&agrave;", "&#130;", "&#192;", "&#254;", "&aacute;", "&#131;", "&#193;", "&#255;", "&aring;", "&#132;", "&#194;", "&aelig;", "&#133;", "&#195;", "&ccedil;", "&#134;", "&#196;", "&egrave;", "&#135;", "&#197;", "&eacute;", "&#136;", "&#198;", "&ecirc;", "&#137;", "&#199;", "&euml;", "&#138;", "&#200;", "&igrave;", "&#139;", "&#201;", "&iacute;", "&#140;", "&#202;", "&icirc;", "&#203;", "&iuml;", "&#142;", "&#204;", "&eth;", "&#205;", "&ntilde;", "&#206;", "&ograve;", "&#145;", "&#207;", "&oacute;", "&#146;", "&#208;", "&ocirc;", "&#147;", "&#209;", "&otilde;", "&#148;", "&#210;", "&ouml;", "&#149;", "&#211;", "&oslash;", "&#150;", "&#212;", "&ugrave;", "&#151;", "&#213;", "&uacute;", "&#152;", "&#214;", "&ucirc;", "&#153;", "&#215;", "&yacute;", "&#154;", "&#216;", "&thorn;", "&#155;", "&#217;", "&yuml;", "&#156;", "&#218;"];
__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.each(codes, (code, i) => {
string.replace(code, chars[i]);
});
return string;
}
},
created() {
Expand All @@ -37793,6 +37816,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
mounted() {
const self = this;
this.updatePjaxLinks();
this.redoTooltips();
// this.get(this.getMenuUrl, {position: 'side'}).then( (result) =>{
// self.$log.debug('sidemenues',result);
// self.menues = _.orderBy(result.data.menues,(a)=>{return parseInt((a.order || 999999))},['desc']);
Expand Down Expand Up @@ -37828,7 +37852,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
staticClass: "col-12",
class: menuItem.menu_class,
attrs: {
"title": menuItem.menu_description,
"title": _vm.reConvertHTML(menuItem.menu_description),
"data-toggle": "tooltip"
}
}, [_c('div', {
Expand Down Expand Up @@ -37869,7 +37893,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
class: _vm.checkIsOpen(submenu) ? 'ls-space margin bottom-5' : '',
attrs: {
"href": "#",
"title": submenu.description,
"title": _vm.reConvertHTML(submenu.description),
"data-toggle": "tooltip"
}
}, [_c('div', {
Expand Down
2 changes: 1 addition & 1 deletion assets/packages/adminpanel/build/lsadminpanel.min.js

Large diffs are not rendered by default.

Expand Up @@ -28,7 +28,7 @@ export default {
return _.orderBy(
this.$store.state.questiongroups,
a => {
return parseInt(a.group_order || 999999);
return parseInt(a.group_order);
},
["asc"]
);
Expand Down
Expand Up @@ -53,6 +53,14 @@ export default {
classes += (menuItem.pjax ? 'pjax ' : ' ');
classes += (this.$store.state.lastMenuItemOpen==menuItem.id ? 'selected ' : ' ' );
return classes;
},
reConvertHTML(string) {
var chars = ["'","©","Û","®","ž","Ü","Ÿ","Ý","$","Þ","%","¡","ß","¢","à","£","á","À","¤","â","Á","¥","ã","Â","¦","ä","Ã","§","å","Ä","¨","æ","Å","©","ç","Æ","ª","è","Ç","«","é","È","¬","ê","É","­","ë","Ê","®","ì","Ë","¯","í","Ì","°","î","Í","±","ï","Î","²","ð","Ï","³","ñ","Ð","´","ò","Ñ","µ","ó","Õ","","ô","Ö","·","õ","Ø","¸","ö","Ù","¹","÷","Ú","º","ø","Û","»","ù","Ü","@","¼","ú","Ý","½","û","Þ","","¾","ü","ß","¿","ý","à","","À","þ","á","ƒ","Á","ÿ","å","","Â","æ","","Ã","ç","","Ä","è","","Å","é","ˆ","Æ","ê","","Ç","ë","Š","È","ì","","É","í","Œ","Ê","î","Ë","ï","Ž","Ì","ð","Í","ñ","Î","ò","","Ï","ó","","Ð","ô","","Ñ","õ","","Ò","ö","","Ó","ø","","Ô","ù","","Õ","ú","˜","Ö","û","","×","ý","š","Ø","þ","","Ù","ÿ","œ","Ú"];
var codes = ["&#039;","&copy;","&#219;","&reg;","&#158;","&#220;","&#159;","&#221;","&#36;","&#222;","&#37;","&#161;","&#223;","&#162;","&#224;","&#163;","&#225;","&Agrave;","&#164;","&#226;","&Aacute;","&#165;","&#227;","&Acirc;","&#166;","&#228;","&Atilde;","&#167;","&#229;","&Auml;","&#168;","&#230;","&Aring;","&#169;","&#231;","&AElig;","&#170;","&#232;","&Ccedil;","&#171;","&#233;","&Egrave;","&#172;","&#234;","&Eacute;","&#173;","&#235;","&Ecirc;","&#174;","&#236;","&Euml;","&#175;","&#237;","&Igrave;","&#176;","&#238;","&Iacute;","&#177;","&#239;","&Icirc;","&#178;","&#240;","&Iuml;","&#179;","&#241;","&ETH;","&#180;","&#242;","&Ntilde;","&#181;","&#243;","&Otilde;","&#182;","&#244;","&Ouml;","&#183;","&#245;","&Oslash;","&#184;","&#246;","&Ugrave;","&#185;","&#247;","&Uacute;","&#186;","&#248;","&Ucirc;","&#187;","&#249;","&Uuml;","&#64;","&#188;","&#250;","&Yacute;","&#189;","&#251;","&THORN;","&#128;","&#190;","&#252","&szlig;","&#191;","&#253;","&agrave;","&#130;","&#192;","&#254;","&aacute;","&#131;","&#193;","&#255;","&aring;","&#132;","&#194;","&aelig;","&#133;","&#195;","&ccedil;","&#134;","&#196;","&egrave;","&#135;","&#197;","&eacute;","&#136;","&#198;","&ecirc;","&#137;","&#199;","&euml;","&#138;","&#200;","&igrave;","&#139;","&#201;","&iacute;","&#140;","&#202;","&icirc;","&#203;","&iuml;","&#142;","&#204;","&eth;","&#205;","&ntilde;","&#206;","&ograve;","&#145;","&#207;","&oacute;","&#146;","&#208;","&ocirc;","&#147;","&#209;","&otilde;","&#148;","&#210;","&ouml;","&#149;","&#211;","&oslash;","&#150;","&#212;","&ugrave;","&#151;","&#213;","&uacute;","&#152;","&#214;","&ucirc;","&#153;","&#215;","&yacute;","&#154;","&#216;","&thorn;","&#155;","&#217;","&yuml;","&#156;","&#218;"];
_.each(codes, (code, i) => {
string.replace(code, chars[i]);
});
return string;
}
},
created(){
Expand All @@ -63,6 +71,7 @@ export default {
mounted(){
const self = this;
this.updatePjaxLinks();
this.redoTooltips();
// this.get(this.getMenuUrl, {position: 'side'}).then( (result) =>{
// self.$log.debug('sidemenues',result);
// self.menues = _.orderBy(result.data.menues,(a)=>{return parseInt((a.order || 999999))},['desc']);
Expand All @@ -83,7 +92,7 @@ export default {
:class="getLinkClass(menuItem)" >

<div class="col-12" :class="menuItem.menu_class"
:title="menuItem.menu_description"
v-bind:title="reConvertHTML(menuItem.menu_description)"
data-toggle="tooltip" >
<div class="ls-space padding all-0" v-bind:class="$store.state.lastMenuItemOpen == menuItem.id ? 'col-sm-10' : 'col-sm-12' ">
<menuicon :icon-type="menuItem.menu_icon_type" :icon="menuItem.menu_icon"></menuicon>
Expand All @@ -95,7 +104,7 @@ export default {
</div>
</a>
<li v-for="(submenu, index) in menu.submenus" class="list-group-item" v-bind:key="submenu.id" v-bind:class="checkIsOpen(submenu) ? 'menu-selected' : '' " @click.capture="setActiveMenuIndex(submenu)" >
<a href="#" :title="submenu.description" data-toggle="tooltip" class="ls-flex-row nowrap align-item-center align-content-center" :class="checkIsOpen(submenu) ? 'ls-space margin bottom-5' : ''">
<a href="#" v-bind:title="reConvertHTML(submenu.description)" data-toggle="tooltip" class="ls-flex-row nowrap align-item-center align-content-center" :class="checkIsOpen(submenu) ? 'ls-space margin bottom-5' : ''">
<div class="ls-space col-sm-10 padding all-0">
<menuicon icon-type="fontawesome" icon="arrow-right"></menuicon>
<span v-html="submenu.title"></span>
Expand Down
37 changes: 26 additions & 11 deletions assets/packages/adminpanel/src/main.js
Expand Up @@ -14,11 +14,26 @@ Vue.mixin({
methods: {
updatePjaxLinks: function() {
this.$store.commit("updatePjax");
},
redoTooltips: function() {
try {
$(".btntooltip").tooltip("destroy");
} catch (e) {}
try {
$('[data-tooltip="true"]').tooltip("destroy");
} catch (e) {}
try {
$('[data-tooltip="true"]').tooltip("destroy");
} catch (e) {}

$(".btntooltip").tooltip();
$('[data-tooltip="true"]').tooltip();
$('[data-toggle="tooltip"]').tooltip();
}
}
});

$(document).on("ready", function() {
$(document).on("ready", function () {
const AppState = getAppState(LS.globalUserId);
if (document.getElementById("vue-app-main-container")) {
// eslint-disable-next-line
Expand All @@ -33,16 +48,16 @@ $(document).on("ready", function() {
methods: {
controlWindowSize() {
const adminmenuHeight = $("body")
.find("nav")
.first()
.height(),
.find("nav")
.first()
.height(),
footerHeight = $("body")
.find("footer")
.last()
.height(),
.find("footer")
.last()
.height(),
menuHeight = $(".menubar").outerHeight(),
inSurveyOffset =
adminmenuHeight + footerHeight + menuHeight + 25,
adminmenuHeight + footerHeight + menuHeight + 25,
windowHeight = window.innerHeight,
inSurveyViewHeight = windowHeight - inSurveyOffset;

Expand Down Expand Up @@ -87,7 +102,7 @@ $(document).on("ready", function() {

$(document).trigger("vue-reload-remote");

window.setInterval(function() {
window.setInterval(function () {
$(document).trigger("vue-reload-remote");
}, 60 * 5 * 1000);
}
Expand Down Expand Up @@ -134,13 +149,13 @@ $(document)
$("#pjax-file-load-container")
.find("div")
.css("width", "100%");
$("#pjaxClickInhibitor").fadeOut(400, function() {
$("#pjaxClickInhibitor").fadeOut(400, function () {
$(this).remove();
});
$(document).trigger("vue-resize-height");
$(document).trigger("vue-reload-remote");
// $(document).trigger('vue-sidemenu-update-link');
setTimeout(function() {
setTimeout(function () {
$("#pjax-file-load-container")
.find("div")
.css({
Expand Down

0 comments on commit b191d84

Please sign in to comment.