modifs.mineures sans commentaires
This commit is contained in:
parent
1bf1fdd814
commit
4d6d518c92
|
@ -26,7 +26,7 @@ class easymdePlugin extends BasePlugin implements IParametrable {
|
||||||
];
|
];
|
||||||
|
|
||||||
const PARAMETRABLE_PARAMS_SCHEMA = [
|
const PARAMETRABLE_PARAMS_SCHEMA = [
|
||||||
"selector" => ["string", null, "sélecteur pour les controles"],
|
"selector" => ["string", "textarea:first", "sélecteur pour les controles"],
|
||||||
"config" => ["?array", null, "configuration de l'objet"],
|
"config" => ["?array", null, "configuration de l'objet"],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -48,17 +48,16 @@ class easymdePlugin extends BasePlugin implements IParametrable {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery.noConflict()(function($) {
|
jQuery.noConflict()(function($) {
|
||||||
var config = <?=js::qo($this->ppConfig)?>;
|
let config = <?=js::qo($this->ppConfig)?>;
|
||||||
var selector = <?=js::qv($this->ppSelector)?>;
|
let selector = <?=js::qv($this->ppSelector)?>;
|
||||||
var $elements;
|
if (selector !== "") {
|
||||||
if (selector !== "") $elements = $(selector);
|
let $elements = $(selector);
|
||||||
if (selector !== "" && $elements.length > 0) {
|
if ($elements.length > 0) {
|
||||||
$elements.each(function () {
|
$elements.each(function () {
|
||||||
config.element = this;
|
config.element = this;
|
||||||
new EasyMDE(config);
|
new EasyMDE(config);
|
||||||
});
|
});
|
||||||
} else {
|
}
|
||||||
new EasyMDE(config);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue