forked from ZwiiCMS-Team/ZwiiCMS
Fonte : datatables
supprime image map
This commit is contained in:
parent
51cc6b41a7
commit
3a7e4e8db6
@ -5,6 +5,7 @@
|
||||
### Correction
|
||||
- Corrige un bug d'installation d'une fonte.
|
||||
- Corrige un bug de redirection vers la liste des fontes après édition ou ajout.
|
||||
- Supprime le script imagemap non tenu à jour et bogué.
|
||||
|
||||
### Amélioration
|
||||
- Ajoute le filtrage et le tri des fontes de puis la liste du thème.
|
||||
|
@ -134,7 +134,7 @@ class common
|
||||
// 'codemirror', // Désactivé par défaut
|
||||
'tippy',
|
||||
'zwiico',
|
||||
'imagemap',
|
||||
//'imagemap',
|
||||
'simplelightbox'
|
||||
],
|
||||
'view' => ''
|
||||
|
@ -684,7 +684,10 @@ class theme extends common
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Fontes'),
|
||||
'view' => 'font'
|
||||
'view' => 'font',
|
||||
'vendor' => [
|
||||
'datatables'
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -8,4 +8,26 @@
|
||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
$(".themeFontDelete").on("click",(function(){var _this=$(this);return core.confirm("Êtes-vous sûr de vouloir supprimer cette fonte ?",(function(){$(location).attr("href",_this.attr("href"))}))}));
|
||||
$(".themeFontDelete").on("click", (function() {
|
||||
var _this = $(this);
|
||||
return core.confirm("Êtes-vous sûr de vouloir supprimer cette fonte ?", (function() {
|
||||
$(location).attr("href", _this.attr("href"))
|
||||
}))
|
||||
}));
|
||||
$('#dataTables').DataTable({
|
||||
language: {
|
||||
url: "core/vendor/datatables/french.json",
|
||||
},
|
||||
locale: 'fr',
|
||||
"columnDefs": [{
|
||||
target: 5,
|
||||
orderable: false,
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
target: 6,
|
||||
orderable: false,
|
||||
searchable: false
|
||||
}
|
||||
]
|
||||
});
|
@ -24,7 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($module::$fontsDetail) : ?>
|
||||
<?php echo template::table([2, 2, 3, 2, 1, 1, 1], $module::$fontsDetail, ['FontId', 'Nom', 'Famille', 'Affectation', 'Origine', '', '']); ?>
|
||||
<?php echo template::table([2, 2, 3, 2, 1, 1, 1], $module::$fontsDetail, ['FontId', 'Nom', 'Famille', 'Affectation', 'Origine', '', ''], ['id' => 'dataTables']); ?>
|
||||
<?php else : ?>
|
||||
<?php echo template::speech('Aucune fonte !'); ?>
|
||||
<?php endif; ?>
|
8
core/vendor/imagemap/image-map.min.js
vendored
8
core/vendor/imagemap/image-map.min.js
vendored
@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2018, Travis Clarke (https://www.travismclarke.com/)
|
||||
*
|
||||
* This source code is licensed under the Apache-2.0 license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.ImageMap=t(e.$)}(this,function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(e){return i(e)||a(e)||u()}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function a(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function c(e,t){return new s(e,t)}e=e&&e.hasOwnProperty("default")?e.default:e;var d="resize",f="load",l="complete",s=function(){function e(n,r){t(this,e),this.selector=n instanceof Array?n:o(document.querySelectorAll(n)),document.readyState!==l?window.addEventListener(f,this.update.bind(this)):this.update(),window.addEventListener(d,this.debounce(this.update,r).bind(this))}return r(e,[{key:"update",value:function(){var e=this;this.selector.forEach(function(t){if(void 0!==t.getAttribute("usemap")){t.cloneNode().addEventListener(f,e.handleImageLoad(t.offsetWidth,t.offsetHeight))}})}},{key:"debounce",value:function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];window.clearTimeout(t),t=window.setTimeout(function(t){return e.apply(t,i)},r,n)}}},{key:"handleImageLoad",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(r){var i=r.target.width,a=r.target.height,u=t/100,c=n/100,d=r.target.getAttribute("usemap").replace(/^#/,"")
|
||||
;o(document.querySelectorAll(e.genAreaSelector(d))).forEach(function(e){var t=e.dataset.coords=e.dataset.coords||e.getAttribute("coords"),n=t.split(",");e.setAttribute("coords",""+n.map(function(e,t){return t%2==0?+(n[t]/i*100*u):+(n[t]/a*100*c)}))})}}}],[{key:"genAreaSelector",value:function(e){return'map[name="'.concat(e,'"] area')}}]),e}();return void 0!==e&&e.fn&&(e.fn.imageMap=function(e){return new s(this.toArray(),e)}),c.VERSION="1.1.5",c});
|
4
core/vendor/imagemap/inc.json
vendored
4
core/vendor/imagemap/inc.json
vendored
@ -1,4 +0,0 @@
|
||||
[
|
||||
"image-map.min.js",
|
||||
"init.js"
|
||||
]
|
6
core/vendor/imagemap/init.js
vendored
6
core/vendor/imagemap/init.js
vendored
@ -1,6 +0,0 @@
|
||||
/**
|
||||
* Initialisation du redimensionner de mapf
|
||||
*/
|
||||
$(function() {
|
||||
$('img[usemap]').imageMap();
|
||||
});
|
2
core/vendor/imagemap/read.me
vendored
2
core/vendor/imagemap/read.me
vendored
@ -1,2 +0,0 @@
|
||||
Article https://blog.travismclarke.com/project/imagemap/
|
||||
Générateur : https://www.image-map.net/
|
Loading…
Reference in New Issue
Block a user