From 1891dd48d3fd20454f90ab040d35d5046d98f12f Mon Sep 17 00:00:00 2001 From: Molkobain Date: Tue, 23 Jul 2019 13:39:11 +0200 Subject: [PATCH] :package: Update redistribuables --- .../common/css/handy-framework.css | 74 ++++++++- .../common/css/handy-framework.scss | 91 ++++++++++- .../common/js/handy-framework.js | 15 +- .../common/stringhelper.class.inc.php | 31 ++++ .../common/ui/togglebutton.class.inc.php | 8 +- .../core/attributerackunit.class.inc.php | 4 +- .../en.dict.molkobain-handy-framework.php | 13 ++ .../module.molkobain-handy-framework.php | 4 +- .../portaluiextension.class.inc.php | 4 +- .../module.molkobain-markdown-viewer.php | 5 +- .../common/confighelper.class.inc.php | 81 ++++++++++ .../core/newsroomprovider.class.inc.php | 152 ++++++++++++++++++ .../en.dict.molkobain-newsroom-provider.php | 10 ++ .../module.molkobain-newsroom-provider.php | 57 +++++++ 14 files changed, 523 insertions(+), 26 deletions(-) create mode 100644 dist/molkobain-markdown-viewer/molkobain-handy-framework/common/stringhelper.class.inc.php create mode 100644 dist/molkobain-markdown-viewer/molkobain-handy-framework/en.dict.molkobain-handy-framework.php create mode 100644 dist/molkobain-markdown-viewer/molkobain-newsroom-provider/common/confighelper.class.inc.php create mode 100644 dist/molkobain-markdown-viewer/molkobain-newsroom-provider/core/newsroomprovider.class.inc.php create mode 100644 dist/molkobain-markdown-viewer/molkobain-newsroom-provider/en.dict.molkobain-newsroom-provider.php create mode 100644 dist/molkobain-markdown-viewer/molkobain-newsroom-provider/module.molkobain-newsroom-provider.php diff --git a/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/css/handy-framework.css b/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/css/handy-framework.css index 682cd79..c16b33a 100644 --- a/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/css/handy-framework.css +++ b/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/css/handy-framework.css @@ -67,9 +67,12 @@ } /* Panels: Simple panel with an header and a body to display content nicely */ .mhf-panel { + position: relative; margin-bottom: 3rem; } .mhf-panel .mhf-p-header { + position: relative; + z-index: 1; display: flex; align-items: center; margin-bottom: 0.5rem; @@ -82,14 +85,54 @@ .mhf-panel .mhf-p-header .mhf-ph-icon img { max-width: 38px; } +.mhf-panel .mhf-p-header .mhf-ph-actions { + position: absolute; + right: 0; +} +.mhf-panel .mhf-p-header .mhf-ph-actions .mhf-ph-toggler { + color: #ea7d1e; + cursor: pointer; + transition-property: transform; + transition-duration: 0.2s; + transition-timing-function: linear; +} .mhf-panel .mhf-p-body { + position: relative; + /*z-index: 0;*/ + /* Must be below header */ + margin-top: 0; padding: 0.3rem; background-color: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); + transition: all 0.2s ease-in-out; +} +.mhf-panel .mhf-p-body:empty { + display: flex; + justify-content: center; + align-items: center; +} +.mhf-panel .mhf-p-body:empty::after { + content: attr(data-empty-text); + color: #777; + font-style: italic; } .mhf-panel:last-child { margin-bottom: 0; } +.mhf-panel.mhf-collapsed .mhf-ph-toggler { + transform: rotateZ(90deg); +} +.mhf-panel.mhf-collapsed .mhf-p-body { + margin-top: -50px; + min-height: 50px !important; + max-height: 50px !important; +} +.mhf-panel.mhf-collapsed .mhf-p-body > * { + display: none; +} +.mhf-panel.mhf-collapsed .mhf-p-body:empty::after { + content: ""; +} /* Tooltips */ .mhf-tooltip { /* qTip tooltips */ @@ -107,14 +150,19 @@ .mhf-tooltip.qtip .qtip-wrapper .qtip-contentWrapper .qtip-content { padding: 9px 9px !important; } +.mhf-tooltip.qtip .qtip-wrapper .qtip-contentWrapper .qtip-content img { + max-width: 100%; + height: initial !important; + /* !important to overload the height in the style attribute of the image, otherwise image ratio is wicked */ +} /* Toggle buttons: Inspired by Mauricio Allende @ https://codepen.io/mallendeo/pen/eLIiG */ .mhf-toggle-button { font-size: 12pt; + /* Themes */ + /* - Flat */ } .mhf-toggle-button .mhf-tb-input { display: none; - /* Themes */ - /* - Flat */ } .mhf-toggle-button .mhf-tb-input + .mhf-tb-button { outline: 0; @@ -142,28 +190,40 @@ .mhf-toggle-button .mhf-tb-input:checked + .mhf-tb-button::after { left: 50%; } -.mhf-toggle-button .mhf-tb-input.mhf-tb-flat + .mhf-tb-button { +.mhf-toggle-button.mhf-tb-flat .mhf-tb-input + .mhf-tb-button { padding: 2px; border-radius: 2em; background-color: #eaeaea; box-shadow: inset 0 1px 1px 0px rgba(0, 0, 0, 0.15); transition: all 0.4s ease; } -.mhf-toggle-button .mhf-tb-input.mhf-tb-flat + .mhf-tb-button::after { +.mhf-toggle-button.mhf-tb-flat .mhf-tb-input + .mhf-tb-button::after { border-radius: 50%; background-color: #fff; box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.12); transition: all 0.2s ease; } -.mhf-toggle-button .mhf-tb-input.mhf-tb-flat:checked + .mhf-tb-button { +.mhf-toggle-button.mhf-tb-flat .mhf-tb-input:checked + .mhf-tb-button { background-color: #ea7d1e; } -.mhf-toggle-button .mhf-tb-input.mhf-tb-flat:disabled + .mhf-tb-button { +.mhf-toggle-button.mhf-tb-flat .mhf-tb-input:disabled + .mhf-tb-button { background-color: #d1d1d1; } -.mhf-toggle-button .mhf-tb-input.mhf-tb-flat:disabled + .mhf-tb-button::after { +.mhf-toggle-button.mhf-tb-flat .mhf-tb-input:disabled + .mhf-tb-button::after { background-color: #e6e6e6; } +.mhf-toggle-button.mhf-tb-flat:hover .mhf-tb-input + .mhf-tb-button, .mhf-toggle-button.mhf-tb-flat:focus .mhf-tb-input + .mhf-tb-button { + background-color: #d6d6d6; +} +.mhf-toggle-button.mhf-tb-flat:hover .mhf-tb-input:checked + .mhf-tb-button, .mhf-toggle-button.mhf-tb-flat:focus .mhf-tb-input:checked + .mhf-tb-button { + background-color: #cc6913; +} +.mhf-toggle-button.mhf-tb-flat:active .mhf-tb-input + .mhf-tb-button { + background-color: #c4c4c4; +} +.mhf-toggle-button.mhf-tb-flat:active .mhf-tb-input:checked + .mhf-tb-button { + background-color: #ab5810; +} .mhf-toggle-button.mhf-pull-left .mhf-tb-button, .mhf-toggle-button.mhf-pull-right .mhf-tb-button, .mhf-pull-left .mhf-toggle-button .mhf-tb-button, .mhf-pull-right .mhf-toggle-button .mhf-tb-button { vertical-align: initial; /* Reset vertical alignment if floated */ diff --git a/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/css/handy-framework.scss b/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/css/handy-framework.scss index ce946ec..b370d55 100644 --- a/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/css/handy-framework.scss +++ b/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/css/handy-framework.scss @@ -13,9 +13,14 @@ $box-shadow-small: 0 1px 1px rgba(0, 0, 0, 0.15); /* Panel */ $panel-bg-color: #ffffff; +$panel-empty-hint-color: #777; +//noinspection SassScssResolvedByNameOnly +$panel-collapse-icon-color: $brand-primary; +$panel-collapsed-height: 50px; /* Toggle buttons */ $toggle-button-off-bg-color: #eaeaea; +//noinspection SassScssResolvedByNameOnly $toggle-button-on-bg-color: $brand-primary; $toggle-button-switch-bg-color: #ffffff; @@ -87,9 +92,12 @@ $toggle-button-switch-bg-color: #ffffff; /* Panels: Simple panel with an header and a body to display content nicely */ .mhf-panel{ @extend %mhf-global-settings; + position: relative; margin-bottom: 3rem; .mhf-p-header{ + position: relative; + z-index: 1; display: flex; align-items: center; margin-bottom: 0.5rem; @@ -103,16 +111,64 @@ $toggle-button-switch-bg-color: #ffffff; max-width: 38px; } } + .mhf-ph-actions{ + position: absolute; + right: 0; + + .mhf-ph-toggler{ + color: $panel-collapse-icon-color; + cursor: pointer; + transition-property: transform; + transition-duration: 0.2s; + transition-timing-function: linear; + } + } } .mhf-p-body{ + position: relative; + /*z-index: 0;*/ /* Must be below header */ + margin-top: 0; padding: 0.3rem; background-color: $panel-bg-color; box-shadow: $box-shadow-small; + transition: all 0.2s ease-in-out; + + &:empty{ + display: flex; + justify-content: center; + align-items: center; + + &::after{ + content: attr(data-empty-text); + color: $panel-empty-hint-color; + font-style: italic; + } + } } &:last-child{ margin-bottom: 0; } + &.mhf-collapsed{ + .mhf-ph-toggler{ + transform: rotateZ(90deg); + } + .mhf-p-body{ + margin-top: -$panel-collapsed-height; + min-height: $panel-collapsed-height !important; + max-height: $panel-collapsed-height !important; + + > *{ + display: none; + } + + &:empty{ + &::after{ + content: ""; + } + } + } + } } /* Tooltips */ @@ -132,6 +188,11 @@ $toggle-button-switch-bg-color: #ffffff; .qtip-content{ padding: 9px 9px !important; + + img{ + max-width: 100%; + height: initial !important; /* !important to overload the height in the style attribute of the image, otherwise image ratio is wicked */ + } } } } @@ -177,10 +238,12 @@ $toggle-button-switch-bg-color: #ffffff; &:checked + .mhf-tb-button::after { left: 50%; } + } - /* Themes */ - /* - Flat */ - &.mhf-tb-flat{ + /* Themes */ + /* - Flat */ + &.mhf-tb-flat{ + .mhf-tb-input{ + .mhf-tb-button{ padding: 2px; border-radius: 2em; @@ -206,6 +269,28 @@ $toggle-button-switch-bg-color: #ffffff; } } } + + &:hover, + &:focus{ + .mhf-tb-input{ + + .mhf-tb-button{ + background-color: darken($toggle-button-off-bg-color, 8%); + } + &:checked + .mhf-tb-button{ + background-color: darken($toggle-button-on-bg-color, 8%); + } + } + } + &:active{ + .mhf-tb-input{ + + .mhf-tb-button{ + background-color: darken($toggle-button-off-bg-color, 15%); + } + &:checked + .mhf-tb-button{ + background-color: darken($toggle-button-on-bg-color, 15%); + } + } + } } } .mhf-toggle-button.mhf-pull-left, diff --git a/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/js/handy-framework.js b/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/js/handy-framework.js index cbd67a9..c191104 100644 --- a/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/js/handy-framework.js +++ b/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/js/handy-framework.js @@ -24,7 +24,7 @@ if($.isFunction($.fn.qtip)) corner: 'leftMiddle', size: {x: 16, y: 8}, // Made for top/bottom position, overload for left/right positions }, - } + }; // - 'molkobain-light' // - For top/bottom positioning $.fn.qtip.styles['molkobain-light'] = { @@ -37,14 +37,14 @@ if($.isFunction($.fn.qtip)) tip: { color: '#ffffff', }, - } + }; // - For left/right positioning $.fn.qtip.styles['molkobain-light-on-the-side'] = { name: 'molkobain-light', tip: { size: { x: 8, y: 16 }, }, - } + }; // - 'molkobain-dark' // - For top/bottom positioning $.fn.qtip.styles['molkobain-dark'] = { @@ -57,7 +57,7 @@ if($.isFunction($.fn.qtip)) tip: { color: '#000000', }, - } + }; // - For left/right positioning $.fn.qtip.styles['molkobain-dark-on-the-side'] = { name: 'molkobain-dark', @@ -66,3 +66,10 @@ if($.isFunction($.fn.qtip)) }, } } + +// Panels +// - Toggler +$(document).on('click', '.mhf-panel .mhf-ph-toggler', function(oEvent){ + oEvent.stopPropagation(); + $(this).closest('.mhf-panel').toggleClass('mhf-collapsed'); +}); \ No newline at end of file diff --git a/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/stringhelper.class.inc.php b/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/stringhelper.class.inc.php new file mode 100644 index 0000000..b2cf1f1 --- /dev/null +++ b/dist/molkobain-markdown-viewer/molkobain-handy-framework/common/stringhelper.class.inc.php @@ -0,0 +1,31 @@ +sJSOnChangeCallback)) ? 'onchange="javascript: ' . htmlspecialchars($this->sJSOnChangeCallback) . '"' : ''; $sHtml = - << - + << +