This commit is contained in:
fredtempez 2019-01-21 10:33:11 +01:00
commit fc6c5fa117
12 changed files with 202 additions and 36 deletions

View File

@ -7,6 +7,9 @@
- Importer un thème à partir des fichiers
- Gabarits de pages : deux blocs (colonnes) à droite ou à gauche contenant des informations fixes, le paramétrage est dans le thème, mais les contenus sont stockés dans les pages.
- Changement du libellé Modérateur devient Editeur
- VisualBlocks dans TinyMCE
Mises à jour :
- TinyColoPicker
## Version 8.5.6
* Correction :

View File

@ -47,7 +47,7 @@ class common {
'maintenance' => false,
'metaDescription' => 'Zwii est un CMS sans base de données qui permet à ses utilisateurs de créer et gérer facilement un site web sans aucune connaissance en programmation.',
'social' => [
'facebookId' => '',
'facebookId' => 'ZwiiCMS',
'googleplusId' => '',
'instagramId' => '',
'pinterestId' => '',
@ -353,18 +353,18 @@ class common {
],
'footer' => [
'backgroundColor' => 'rgba(255, 255, 255, 1)',
'copyrightAlign' => 'center',
'height' => '10px',
'loginLink' => true,
'margin' => false,
'position' => 'site',
'socialsAlign' => 'center',
'text' => '',
'textAlign' => 'center',
'textColor' => 'rgba(33, 34, 35, 1)',
'copyrightPosition' => 'center',
'textPosition' => 'hide',
'socialsPosition' => 'hide'
'copyrightAlign' => 'center',
'text' => 'Pied de page personnalisé',
'textPosition' => 'left',
'textAlign' => 'left',
'socialsPosition' => 'right',
'socialsAlign' => 'right'
],
'header' => [
'backgroundColor' => 'rgba(255, 255, 255, 1)',
@ -1022,8 +1022,8 @@ class common {
}
// Version 8.4.4
if($this->getData(['core', 'dataVersion']) < 844) {
$this->setData(['theme','footer','socialsPosition','none']);
$this->setData(['theme','footer','textPosition','none']);
$this->setData(['theme','footer','socialsPosition','right']);
$this->setData(['theme','footer','textPosition','left']);
$this->setData(['theme','footer','copyrightPosition','center']);
$this->setData(['core', 'dataVersion', 844]);
$this->SaveData();

View File

@ -15,7 +15,7 @@ body {
#site {
}
/* Blocs dans le site */
/* Grille du site */
#contentleft {
}
#contentright {
@ -70,6 +70,16 @@ footer #footersiteCenter, #footerbodyCenter {
footer #footersiteRight, #footerbodyRight {
}
/* footer bloc de chaque élément */
#footerText {
}
#footerSocials {
}
#footerCopyright {
}
/**
* Éléments de contenu
*/

View File

@ -77,11 +77,11 @@ class theme extends common {
'bold' => 'Gras'
];
public static $footerHeights = [
'5px' => 'Très petite',
'10px' => 'Petite',
'20px' => 'Moyenne',
'30px' => 'Grande',
'40px' => 'Très grande'
'0px' => 'Très petite',
'5px' => 'Petite',
'10px' => 'Moyenne',
'15px' => 'Grande',
'20px' => 'Très grande'
];
public static $footerPositions = [
'hide' => 'Cachée',
@ -191,11 +191,6 @@ class theme extends common {
'100%' => 'Fluide (100%)'
];
public static $menuWide = [
'container' => 'sur la largeur du site',
'container-large' => 'sur la largeur de la page'
];
public static $headerWide = [
'auto' => 'Automatique',
'contain' => 'Image entière',

View File

@ -22,7 +22,9 @@ $("input, select").on("change", function() {
css += "footer a{color:" + textColor + "}";
// Hauteur du pied de page
css += "footer .container > div{margin:" + $("#themeFooterHeight").val() + " 0}";
css += "footer .container > div{padding:0}";
css += "footer .container-large > div{margin:" + $("#themeFooterHeight").val() + " 0}";
css += "footer .container-large > div{padding:0}";
// Alignement du contenu
css += "#footerSocials{text-align:" + $("#themeFooterSocialsAlign").val() + "}";
css += "#footerText{text-align:" + $("#themeFooterTextAlign").val() + "}";
@ -55,10 +57,8 @@ $("input, select").on("change", function() {
}
});
// Position dans les blocs FT
// Position dans les blocs
// Bloc texte personnalisé
$("#themeFooterForm").on("change",function() {
switch($("#themeFooterTextPosition").val()) {
case 'hide':
@ -90,6 +90,7 @@ $("#themeFooterForm").on("change",function() {
$("#footerSocials").show().appendTo("#footersiteCenter");
break;
case 'right':
console.log("right");
$("#footerSocials").show().appendTo("#footerbodyRight");
$("#footerSocials").show().appendTo("#footersiteRight");
break;
@ -112,8 +113,6 @@ $("#themeFooterForm").on("change",function() {
break;
}
}).trigger("change");
// Fin Position dans les blocs
@ -128,10 +127,12 @@ $("#themeFooterLoginLink").on("change", function() {
$("#footerLoginLink").hide();
}
}).trigger("change");
// Aperçu du texte
$("#themeFooterText").on("change keydown keyup", function() {
$("#footerText").html($(this).val());
});
// Affiche / Cache les options de la position
$("#themeFooterPosition").on("change", function() {
if($(this).val() === 'site') {

View File

@ -85,7 +85,7 @@
'selected' => $this->getData(['theme', 'footer', 'textPosition'])
]); ?>
<?php echo template::select('themeFooterTextAlign', $module::$aligns, [
'label' => 'Alignement',
'label' => 'Alignement horizontal',
'selected' => $this->getData(['theme', 'footer', 'textAlign'])
]); ?>
@ -99,7 +99,7 @@
'selected' => $this->getData(['theme', 'footer', 'socialsPosition'])
]); ?>
<?php echo template::select('themeFooterSocialsAlign', $module::$aligns, [
'label' => 'Alignement',
'label' => 'Alignement horizontal',
'selected' => $this->getData(['theme', 'footer', 'socialsAlign'])
]); ?>
</div>
@ -112,7 +112,7 @@
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition'])
]); ?>
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
'label' => 'Alignement',
'label' => 'Alignement horizontal',
'selected' => $this->getData(['theme', 'footer', 'copyrightAlign'])
]); ?>
</div>

View File

@ -1,4 +1,4 @@
[
"tinycolorpicker.min.js",
"jqcolorpicker.min.js",
"init.js"
]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,9 +7,9 @@ tinymce.init({
// Langue
language: "fr_FR",
// Plugins
plugins: "advlist anchor autolink autoresize autosave code codesample colorpicker contextmenu fullscreen hr image imagetools link lists media paste searchreplace stickytoolbar tabfocus table template textcolor",
plugins: "advlist anchor autolink autoresize autosave code codesample colorpicker contextmenu fullscreen hr image imagetools link lists media paste searchreplace stickytoolbar tabfocus table template textcolor visualblocks",
// Contenu de la barre d'outils
toolbar: "restoredraft | undo redo | styleselect | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | insert | code fullscreen",
toolbar: "restoredraft | undo redo | styleselect | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | insert | code visualblocks fullscreen",
// Contenu du menu contextuel
contextmenu: "cut copy paste pastetext | selectall searchreplace | link image inserttable | cell row column deletetable",
// Fichiers CSS à intégrer à l'éditeur

View File

@ -0,0 +1,154 @@
.mce-visualblocks p {
padding-top: 10px;
border: 1px dashed #BBB;
margin-left: 3px;
background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
background-repeat: no-repeat;
}
.mce-visualblocks h1 {
padding-top: 10px;
border: 1px dashed #BBB;
margin-left: 3px;
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
background-repeat: no-repeat;
}
.mce-visualblocks h2 {
padding-top: 10px;
border: 1px dashed #BBB;
margin-left: 3px;
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
background-repeat: no-repeat;
}
.mce-visualblocks h3 {
padding-top: 10px;
border: 1px dashed #BBB;
margin-left: 3px;
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
background-repeat: no-repeat;
}
.mce-visualblocks h4 {
padding-top: 10px;
border: 1px dashed #BBB;
margin-left: 3px;
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
background-repeat: no-repeat;
}
.mce-visualblocks h5 {
padding-top: 10px;
border: 1px dashed #BBB;
margin-left: 3px;
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
background-repeat: no-repeat;
}
.mce-visualblocks h6 {
padding-top: 10px;
border: 1px dashed #BBB;
margin-left: 3px;
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
background-repeat: no-repeat;
}
.mce-visualblocks div:not([data-mce-bogus]) {
padding-top: 10px;
border: 1px dashed #BBB;
margin-left: 3px;
background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
background-repeat: no-repeat;
}
.mce-visualblocks section {
padding-top: 10px;
border: 1px dashed #BBB;
margin: 0 0 1em 3px;
background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
background-repeat: no-repeat;
}
.mce-visualblocks article {
padding-top: 10px;
border: 1px dashed #BBB;
margin: 0 0 1em 3px;
background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
background-repeat: no-repeat;
}
.mce-visualblocks blockquote {
padding-top: 10px;
border: 1px dashed #BBB;
background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
background-repeat: no-repeat;
}
.mce-visualblocks address {
padding-top: 10px;
border: 1px dashed #BBB;
margin: 0 0 1em 3px;
background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
background-repeat: no-repeat;
}
.mce-visualblocks pre {
padding-top: 10px;
border: 1px dashed #BBB;
margin-left: 3px;
background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
background-repeat: no-repeat;
}
.mce-visualblocks figure {
padding-top: 10px;
border: 1px dashed #BBB;
margin: 0 0 1em 3px;
background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
background-repeat: no-repeat;
}
.mce-visualblocks hgroup {
padding-top: 10px;
border: 1px dashed #BBB;
margin: 0 0 1em 3px;
background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
background-repeat: no-repeat;
}
.mce-visualblocks aside {
padding-top: 10px;
border: 1px dashed #BBB;
margin: 0 0 1em 3px;
background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
background-repeat: no-repeat;
}
.mce-visualblocks figcaption {
border: 1px dashed #BBB;
}
.mce-visualblocks ul {
padding-top: 10px;
border: 1px dashed #BBB;
margin: 0 0 1em 3px;
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);
background-repeat: no-repeat;
}
.mce-visualblocks ol {
padding-top: 10px;
border: 1px dashed #BBB;
margin: 0 0 1em 3px;
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
background-repeat: no-repeat;
}
.mce-visualblocks dl {
padding-top: 10px;
border: 1px dashed #BBB;
margin: 0 0 1em 3px;
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
background-repeat: no-repeat;
}

View File

@ -0,0 +1 @@
!function(){"use strict";var e=function(t){var n=t,o=function(){return n};return{get:o,set:function(e){n=e},clone:function(){return e(o())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e,t){e.fire("VisualBlocks",{state:t})},o=function(e){return e.getParam("visualblocks_default_state",!1)},s=function(e){return e.settings.visualblocks_content_css},i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=i.DOM.uniqueId(),u=function(e,t){var n=c.toArray(e.getElementsByTagName("link"));if(0===c.grep(n,function(e){return e.id===l}).length){var o=i.DOM.create("link",{id:l,rel:"stylesheet",href:t});e.getElementsByTagName("head")[0].appendChild(o)}},a=function(e,t,o){var i=e.dom,c=s(e);u(e.getDoc(),c||t+"/css/visualblocks.css"),i.toggleClass(e.getBody(),"mce-visualblocks"),o.set(!o.get()),n(e,o.get())},r=function(e,t,n){e.addCommand("mceVisualBlocks",function(){a(e,t,n)})},m=function(e,t,n){e.on("PreviewFormats AfterPreviewFormats",function(t){n.get()&&e.dom.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)}),e.on("init",function(){o(e)&&a(e,t,n)}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")})},f=function(e,t){return function(n){var o=n.control;o.active(t.get()),e.on("VisualBlocks",function(e){o.active(e.state)})}},d=function(e,t){e.addButton("visualblocks",{active:!1,title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:f(e,t)}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:f(e,t),selectable:!0,context:"view",prependToContext:!0})};t.add("visualblocks",function(t,n){var o=e(!1);r(t,n,o),d(t,o),m(t,n,o)})}();