Commit 38099738 by Yvon Kerdoncuff

Merge branch '7541-fix-info-popup' into 'develop'

information popup: fixes and improvements

See merge request !125
parents fb53f306 06daeeae
...@@ -434,3 +434,7 @@ form[name="formEncaissement"] label { ...@@ -434,3 +434,7 @@ form[name="formEncaissement"] label {
display: none; display: none;
margin-top: 1rem; margin-top: 1rem;
} }
#infoForUserModal .modal-body {
word-break: break-all;
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/* CKEDITOR.dialog.add("anchor",(function(e){function t(e,t){return e.createFakeElement(e.document.createElement("a",{attributes:t}),"cke_anchor","anchor")}return{title:e.lang.link.anchor.title,minWidth:300,minHeight:60,onOk:function(){var n=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),a={id:n,name:n,"data-cke-saved-name":n};this._.selectedElement?this._.selectedElement.data("cke-realelement")?((n=t(e,a)).replace(this._.selectedElement),CKEDITOR.env.ie&&e.getSelection().selectElement(n)):this._.selectedElement.setAttributes(a):(n=(n=e.getSelection())&&n.getRanges()[0]).collapsed?(a=t(e,a),n.insertNode(a)):(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(a.class="cke_anchor"),(a=new CKEDITOR.style({element:"a",attributes:a})).type=CKEDITOR.STYLE_INLINE,a.applyToRange(n))},onHide:function(){delete this._.selectedElement},onShow:function(){var t,n=e.getSelection();t=n.getRanges()[0];var a=n.getSelectedElement();t.shrink(CKEDITOR.SHRINK_ELEMENT),t=(a=t.getEnclosedNode())&&a.type===CKEDITOR.NODE_ELEMENT&&("anchor"===a.data("cke-real-element-type")||a.is("a"))?a:void 0;var l=(a=t&&t.data("cke-realelement"))?CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t):CKEDITOR.plugins.link.getSelectedLink(e);if(l){this._.selectedElement=l;var i=l.data("cke-saved-name");this.setValueOf("info","txtName",i||""),!a&&n.selectElement(l),t&&(this._.selectedElement=t)}this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:e.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:e.lang.link.anchor.name,required:!0,validate:function(){return!!this.getValue()||(alert(e.lang.link.anchor.errorName),!1)}}]}]}}));
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. \ No newline at end of file
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/
CKEDITOR.dialog.add("anchor",function(c){function f(b,a){return b.createFakeElement(b.document.createElement("a",{attributes:a}),"cke_anchor","anchor")}return{title:c.lang.link.anchor.title,minWidth:300,minHeight:60,getModel:function(b){var a=b.getSelection();b=a.getRanges()[0];a=a.getSelectedElement();b.shrink(CKEDITOR.SHRINK_ELEMENT);(a=b.getEnclosedNode())&&a.type===CKEDITOR.NODE_TEXT&&(a=a.getParent());a&&!a.is("a")&&(a=a.getAscendant("a")||a);b=a&&a.type===CKEDITOR.NODE_ELEMENT&&("anchor"===
a.data("cke-real-element-type")||a.is("a"))?a:void 0;return b||null},onOk:function(){var b=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),b={id:b,name:b,"data-cke-saved-name":b},a=this.getModel(c);if(a)a.data("cke-realelement")?(b=f(c,b),b.replace(a),CKEDITOR.env.ie&&c.getSelection().selectElement(b)):a.setAttributes(b);else if(a=(a=c.getSelection())&&a.getRanges()[0],a.collapsed)b=f(c,b),a.insertNode(b);else{CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(b["class"]="cke_anchor");var d=a.clone();
d.enlarge(CKEDITOR.ENLARGE_ELEMENT);for(var e=new CKEDITOR.dom.walker(d),d=d.collapsed?d.startContainer:e.next(),g=a.createBookmark();d;)d.type===CKEDITOR.NODE_ELEMENT&&d.getAttribute("data-cke-saved-name")&&(d.remove(!0),e.reset()),d=e.next();a.moveToBookmark(g);b=new CKEDITOR.style({element:"a",attributes:b});b.type=CKEDITOR.STYLE_INLINE;b.applyToRange(a)}},onShow:function(){var b=c.getSelection(),a=this.getModel(c),d=a&&a.data("cke-realelement");if(a=d?CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,
a):CKEDITOR.plugins.link.getSelectedLink(c)){var e=a.data("cke-saved-name");this.setValueOf("info","txtName",e||"");!d&&b.selectElement(a)}this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:c.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:c.lang.link.anchor.name,required:!0,validate:function(){var b=this.getValue();return b?/[\u0020\u0009\u000a\u000c\u000d]/g.test(b)?(alert(c.lang.link.anchor.errorWhitespace),!1):!0:(alert(c.lang.link.anchor.errorName),
!1)}}]}]}});
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"/build/app.3644f7b2.js" "/build/app.3644f7b2.js"
], ],
"css": [ "css": [
"/build/app.8a3f698b.css" "/build/app.ec67f059.css"
] ]
}, },
"admin": { "admin": {
......
{ {
"build/app.css": "/build/app.8a3f698b.css", "build/app.css": "/build/app.ec67f059.css",
"build/app.js": "/build/app.3644f7b2.js", "build/app.js": "/build/app.3644f7b2.js",
"build/admin.css": "/build/admin.4de55830.css", "build/admin.css": "/build/admin.4de55830.css",
"build/admin.js": "/build/admin.a08fea06.js", "build/admin.js": "/build/admin.a08fea06.js",
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
"build/ckeditor/lang/fr.js": "/build/ckeditor/lang/fr.js", "build/ckeditor/lang/fr.js": "/build/ckeditor/lang/fr.js",
"build/ckeditor/skins/moono-lisa/dialog.css": "/build/ckeditor/skins/moono-lisa/dialog.css", "build/ckeditor/skins/moono-lisa/dialog.css": "/build/ckeditor/skins/moono-lisa/dialog.css",
"build/ckeditor/skins/moono/dialog.css": "/build/ckeditor/skins/moono/dialog.css", "build/ckeditor/skins/moono/dialog.css": "/build/ckeditor/skins/moono/dialog.css",
"build/ckeditor/plugins/link/dialogs/link.js": "/build/ckeditor/plugins/link/dialogs/link.js",
"build/ckeditor/lang/en.js": "/build/ckeditor/lang/en.js", "build/ckeditor/lang/en.js": "/build/ckeditor/lang/en.js",
"build/ckeditor/skins/kama/dialog_iequirks.css": "/build/ckeditor/skins/kama/dialog_iequirks.css", "build/ckeditor/skins/kama/dialog_iequirks.css": "/build/ckeditor/skins/kama/dialog_iequirks.css",
"build/ckeditor/skins/kama/dialog_ie7.css": "/build/ckeditor/skins/kama/dialog_ie7.css", "build/ckeditor/skins/kama/dialog_ie7.css": "/build/ckeditor/skins/kama/dialog_ie7.css",
...@@ -112,6 +113,7 @@ ...@@ -112,6 +113,7 @@
"build/ckeditor/skins/kama/skin.js": "/build/ckeditor/skins/kama/skin.js", "build/ckeditor/skins/kama/skin.js": "/build/ckeditor/skins/kama/skin.js",
"build/ckeditor/contents.css": "/build/ckeditor/contents.css", "build/ckeditor/contents.css": "/build/ckeditor/contents.css",
"build/ckeditor/skins/moono/images/hidpi/close.png": "/build/ckeditor/skins/moono/images/hidpi/close.png", "build/ckeditor/skins/moono/images/hidpi/close.png": "/build/ckeditor/skins/moono/images/hidpi/close.png",
"build/ckeditor/plugins/link/dialogs/anchor.js": "/build/ckeditor/plugins/link/dialogs/anchor.js",
"build/ckeditor/skins/moono/images/hidpi/lock.png": "/build/ckeditor/skins/moono/images/hidpi/lock.png", "build/ckeditor/skins/moono/images/hidpi/lock.png": "/build/ckeditor/skins/moono/images/hidpi/lock.png",
"build/ckeditor/skins/moono-lisa/images/hidpi/refresh.png": "/build/ckeditor/skins/moono-lisa/images/hidpi/refresh.png", "build/ckeditor/skins/moono-lisa/images/hidpi/refresh.png": "/build/ckeditor/skins/moono-lisa/images/hidpi/refresh.png",
"build/images/source-sans-pro-v14-latin-300.svg": "/build/images/source-sans-pro-v14-latin-300.4e7fe004.svg", "build/images/source-sans-pro-v14-latin-300.svg": "/build/images/source-sans-pro-v14-latin-300.4e7fe004.svg",
...@@ -125,6 +127,7 @@ ...@@ -125,6 +127,7 @@
"build/ckeditor/plugins/flash/lang/fr.js": "/build/ckeditor/plugins/flash/lang/fr.js", "build/ckeditor/plugins/flash/lang/fr.js": "/build/ckeditor/plugins/flash/lang/fr.js",
"build/ckeditor/plugins/forms/lang/en.js": "/build/ckeditor/plugins/forms/lang/en.js", "build/ckeditor/plugins/forms/lang/en.js": "/build/ckeditor/plugins/forms/lang/en.js",
"build/ckeditor/plugins/docprops/lang/en.js": "/build/ckeditor/plugins/docprops/lang/en.js", "build/ckeditor/plugins/docprops/lang/en.js": "/build/ckeditor/plugins/docprops/lang/en.js",
"build/ckeditor/plugins/link/images/hidpi/anchor.png": "/build/ckeditor/plugins/link/images/hidpi/anchor.png",
"build/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png": "/build/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png", "build/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png": "/build/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png",
"build/ckeditor/skins/moono-lisa/images/hidpi/lock.png": "/build/ckeditor/skins/moono-lisa/images/hidpi/lock.png", "build/ckeditor/skins/moono-lisa/images/hidpi/lock.png": "/build/ckeditor/skins/moono-lisa/images/hidpi/lock.png",
"build/ckeditor/skins/moono/images/refresh.png": "/build/ckeditor/skins/moono/images/refresh.png", "build/ckeditor/skins/moono/images/refresh.png": "/build/ckeditor/skins/moono/images/refresh.png",
...@@ -134,6 +137,7 @@ ...@@ -134,6 +137,7 @@
"build/ckeditor/skins/moono/images/lock.png": "/build/ckeditor/skins/moono/images/lock.png", "build/ckeditor/skins/moono/images/lock.png": "/build/ckeditor/skins/moono/images/lock.png",
"build/ckeditor/skins/moono/images/lock-open.png": "/build/ckeditor/skins/moono/images/lock-open.png", "build/ckeditor/skins/moono/images/lock-open.png": "/build/ckeditor/skins/moono/images/lock-open.png",
"build/ckeditor/skins/moono-lisa/images/refresh.png": "/build/ckeditor/skins/moono-lisa/images/refresh.png", "build/ckeditor/skins/moono-lisa/images/refresh.png": "/build/ckeditor/skins/moono-lisa/images/refresh.png",
"build/ckeditor/plugins/link/images/anchor.png": "/build/ckeditor/plugins/link/images/anchor.png",
"build/ckeditor/config.js": "/build/ckeditor/config.js", "build/ckeditor/config.js": "/build/ckeditor/config.js",
"build/ckeditor/plugins/liststyle/lang/fr.js": "/build/ckeditor/plugins/liststyle/lang/fr.js", "build/ckeditor/plugins/liststyle/lang/fr.js": "/build/ckeditor/plugins/liststyle/lang/fr.js",
"build/ckeditor/skins/moono-lisa/images/close.png": "/build/ckeditor/skins/moono-lisa/images/close.png", "build/ckeditor/skins/moono-lisa/images/close.png": "/build/ckeditor/skins/moono-lisa/images/close.png",
......
...@@ -35,14 +35,15 @@ class InformationPopupAdmin extends AbstractAdmin ...@@ -35,14 +35,15 @@ class InformationPopupAdmin extends AbstractAdmin
'label' => 'Texte du bouton de validation', 'label' => 'Texte du bouton de validation',
'required' => true, 'required' => true,
'attr' => [ 'attr' => [
'placeholder' => 'Par exemple : "J\'ai compris", "Ok"...', 'placeholder' => 'Par exemple : "J\'ai compris", "J\'ai bien effectué l\'action"...',
] ],
'help' => 'Le clic sur ce bouton entraînera la fermeture définitive de cette popup pour cet utilisateur, il est donc conseillé d\'y renseigner un texte explicite.'
]) ])
->add('closingButtonText', TextType::class, [ ->add('closingButtonText', TextType::class, [
'label' => 'Texte du bouton de fermeture', 'label' => 'Texte du bouton de fermeture',
'required' => true, 'required' => true,
'attr' => [ 'attr' => [
'placeholder' => 'Par exemple : "Annuler", "Fermer pour l\'instant"...', 'placeholder' => 'Par exemple : "Fermer pour l\'instant", "Je le ferai plus tard"...',
] ]
]) ])
->add('enabled', null, [ ->add('enabled', null, [
......
<!-- Modal --> <!-- Modal -->
{% set informationPopupData = getInformationPopupData() %} {% set informationPopupData = getInformationPopupData() %}
<div class="modal fade" id="infoForUserModal" tabindex="-1" role="dialog" aria-labelledby="infoForUserModalTitle" aria-hidden="true"> <div class="modal fade" id="infoForUserModal" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="infoForUserModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content"> <div class="modal-content">
{% if informationPopupData %} {% if informationPopupData %}
......
...@@ -8,6 +8,7 @@ Encore ...@@ -8,6 +8,7 @@ Encore
{from: './node_modules/ckeditor/adapters', to: 'ckeditor/adapters/[path][name].[ext]'}, {from: './node_modules/ckeditor/adapters', to: 'ckeditor/adapters/[path][name].[ext]'},
{from: './node_modules/ckeditor/lang', to: 'ckeditor/lang/[path][name].[ext]', pattern: /fr\.js|en\.js$/}, {from: './node_modules/ckeditor/lang', to: 'ckeditor/lang/[path][name].[ext]', pattern: /fr\.js|en\.js$/},
{from: './node_modules/ckeditor/plugins', to: 'ckeditor/plugins/[path][name].[ext]', pattern: /(\/lang\/(fr\.js|en\.js)|(^lang\/.*))/}, {from: './node_modules/ckeditor/plugins', to: 'ckeditor/plugins/[path][name].[ext]', pattern: /(\/lang\/(fr\.js|en\.js)|(^lang\/.*))/},
{from: './node_modules/ckeditor/plugins/link', to: 'ckeditor/plugins/link/[path][name].[ext]'},
{from: './node_modules/ckeditor/skins', to: 'ckeditor/skins/[path][name].[ext]'} {from: './node_modules/ckeditor/skins', to: 'ckeditor/skins/[path][name].[ext]'}
]) ])
// directory where compiled assets will be stored // directory where compiled assets will be stored
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment