forked from ZwiiCMS-Team/ZwiiCMS
[9.0.05] TinyMCE internal links and lightbox
This commit is contained in:
parent
4c0c21647e
commit
ec90dd05df
@ -6,6 +6,10 @@
|
|||||||
- nouvelle position du menu dans le site quand la bannière est au-dessus.
|
- nouvelle position du menu dans le site quand la bannière est au-dessus.
|
||||||
- Simplification et ordre des libellés
|
- Simplification et ordre des libellés
|
||||||
- Editeur de texte, scrolle lorsque l'éditeur est ouvert, la barre d'outil se colle sous la barre d'administration.
|
- Editeur de texte, scrolle lorsque l'éditeur est ouvert, la barre d'outil se colle sous la barre d'administration.
|
||||||
|
- TinyMCE :
|
||||||
|
- liste des pages dans la fenêtre des liens
|
||||||
|
- option lightbox pour l'affichage d'images ou de liens
|
||||||
|
usages : https://sorgalla.com/lity/
|
||||||
|
|
||||||
## Version 9.0.04
|
## Version 9.0.04
|
||||||
- Corrections :
|
- Corrections :
|
||||||
|
@ -327,6 +327,10 @@ core.start = function() {
|
|||||||
.height(width * _this.data("ratio"));
|
.height(width * _this.data("ratio"));
|
||||||
});
|
});
|
||||||
}).trigger("resize");
|
}).trigger("resize");
|
||||||
|
|
||||||
|
// Ajouter l'attribut data-lity afin de faire la liaison avec lity
|
||||||
|
$("a[rel='data-lity']").attr("data-lity","");
|
||||||
|
|
||||||
};
|
};
|
||||||
core.start();
|
core.start();
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class common {
|
|||||||
const GROUP_ADMIN = 3;
|
const GROUP_ADMIN = 3;
|
||||||
// Numéro de version de développement :
|
// Numéro de version de développement :
|
||||||
// Désactive l'update auto
|
// Désactive l'update auto
|
||||||
const ZWII_VERSION = '9.0.-dev.c';
|
const ZWII_VERSION = '9.0.05.dev.d';
|
||||||
// Numéro de version stable
|
// Numéro de version stable
|
||||||
// const ZWII_VERSION = '9.0.05';
|
// const ZWII_VERSION = '9.0.05';
|
||||||
|
|
||||||
@ -878,7 +878,6 @@ class common {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sinon retourne null
|
// Sinon retourne null
|
||||||
return helper::filter(null, $filter);
|
return helper::filter(null, $filter);
|
||||||
}
|
}
|
||||||
@ -961,24 +960,29 @@ class common {
|
|||||||
public function linkList() {
|
public function linkList() {
|
||||||
// Sauve la liste des pages pour TinyMCE
|
// Sauve la liste des pages pour TinyMCE
|
||||||
$parents = [];
|
$parents = [];
|
||||||
$children = [];
|
|
||||||
$rewrite = (helper::checkRewrite()) ? '' : '?';
|
$rewrite = (helper::checkRewrite()) ? '' : '?';
|
||||||
foreach($this->getHierarchy(null,false,false) as $parentId => $childIds) {
|
foreach($this->getHierarchy(null,false,false) as $parentId => $childIds) {
|
||||||
|
$children = [];
|
||||||
// Exclure les barres
|
// Exclure les barres
|
||||||
if ($this->getData(['page', $parentId, 'block']) !== 'bar' ) {
|
if ($this->getData(['page', $parentId, 'block']) !== 'bar' ) {
|
||||||
$parents [] = ['title' => $this->getData(['page', $parentId, 'title']) ,
|
|
||||||
'value'=> $rewrite.$parentId
|
|
||||||
];
|
|
||||||
}
|
|
||||||
//if (!empty($childIds)) {
|
|
||||||
foreach($childIds as $childId) {
|
foreach($childIds as $childId) {
|
||||||
$parents [] = ['title' => '› ' . $this->getData(['page', $childId, 'title']) ,
|
$children [] = ['title' => $this->getData(['page', $childId, 'title']) ,
|
||||||
'value'=> $rewrite.$childId
|
'value'=> $rewrite.$childId
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
// $parents [] = [ 'menu' => $children];
|
if (empty($childIds)) {
|
||||||
//}
|
$parents [] = ['title' => $this->getData(['page', $parentId, 'title']) ,
|
||||||
|
'value'=> $rewrite.$parentId
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$parents [] = ['title' => $this->getData(['page', $parentId, 'title']) ,
|
||||||
|
'value'=> $rewrite.$parentId ,
|
||||||
|
'menu' => $children
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 3 tentatives
|
// 3 tentatives
|
||||||
for($i = 0; $i < 3; $i++) {
|
for($i = 0; $i < 3; $i++) {
|
||||||
if (file_put_contents ('core/vendor/tinymce/link_list.json', json_encode($parents), LOCK_EX) !== false) {
|
if (file_put_contents ('core/vendor/tinymce/link_list.json', json_encode($parents), LOCK_EX) !== false) {
|
||||||
|
25
core/vendor/tinymce/init.js
vendored
25
core/vendor/tinymce/init.js
vendored
@ -20,12 +20,24 @@ tinymce.init({
|
|||||||
lineNumbers: true
|
lineNumbers: true
|
||||||
},
|
},
|
||||||
width: 800, // Default value is 800
|
width: 800, // Default value is 800
|
||||||
height: 500 // Default value is 550
|
height: 500, // Default value is 550
|
||||||
//jsFiles: [ // Additional JS files to load
|
jsFiles: [ // Additional JS files to load
|
||||||
// 'mode/clike/clike.js',
|
'mode/clike/clike.js',
|
||||||
// 'mode/php/php.js'
|
'mode/php/php.js'
|
||||||
//]
|
]
|
||||||
},
|
},
|
||||||
|
// Cibles de la target
|
||||||
|
target_list: [
|
||||||
|
{title: 'None', value: ''},
|
||||||
|
{title: 'Nouvel onglet', value: '_blank'}
|
||||||
|
],
|
||||||
|
// Target pour lightbox
|
||||||
|
rel_list: [
|
||||||
|
{title: 'None', value: ''},
|
||||||
|
{title: 'Ouvrir dans une lightbox', value: 'data-lity'}
|
||||||
|
],
|
||||||
|
// Pages internes
|
||||||
|
link_list: baseUrl + "core/vendor/tinymce/links.php",
|
||||||
// Contenu du menu contextuel
|
// Contenu du menu contextuel
|
||||||
contextmenu: "cut copy paste pastetext | selectall searchreplace | link image inserttable | cell row column deletetable",
|
contextmenu: "cut copy paste pastetext | selectall searchreplace | link image inserttable | cell row column deletetable",
|
||||||
// Fichiers CSS à intégrer à l'éditeur
|
// Fichiers CSS à intégrer à l'éditeur
|
||||||
@ -35,9 +47,6 @@ tinymce.init({
|
|||||||
baseUrl + "site/data/theme.css",
|
baseUrl + "site/data/theme.css",
|
||||||
baseUrl + "site/data/custom.css"
|
baseUrl + "site/data/custom.css"
|
||||||
],
|
],
|
||||||
// Pages internes
|
|
||||||
link_list: "core/vendor/tinymce/links.php",
|
|
||||||
// Thème mobile
|
|
||||||
// Classe à ajouter à la balise body dans l'iframe
|
// Classe à ajouter à la balise body dans l'iframe
|
||||||
body_class: "editorWysiwyg",
|
body_class: "editorWysiwyg",
|
||||||
// Cache les menus
|
// Cache les menus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user