Browse Source

Correctif edition product

feature/export_comptable
Fab 4 years ago
parent
commit
17fbaaff2a
3 changed files with 10 additions and 5 deletions
  1. +7
    -5
      ShopBundle/Resources/public/js/backend/script/default/init-edit.js
  2. +2
    -0
      ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js
  3. +1
    -0
      ShopBundle/Resources/views/backend/form/ckeditor_widget.html.twig

+ 7
- 5
ShopBundle/Resources/public/js/backend/script/default/init-edit.js View File

jQuery(document).ready(function () { jQuery(document).ready(function () {
initLcCkEditor();
//generateNotice('error', 'Ceci est une notice'); //generateNotice('error', 'Ceci est une notice');
$('.action-delete').on('click', function(e) { $('.action-delete').on('click', function(e) {
e.preventDefault(); e.preventDefault();
deleteForm.trigger('submit'); deleteForm.trigger('submit');
}); });
}); });
});




});

window.addEventListener('load', (event) => {
initLcCkEditor();
});
/* CKEditor */ /* CKEditor */


function initLcCkEditor(){ function initLcCkEditor(){
var elements = $( '.lc-ckeditor' ); var elements = $( '.lc-ckeditor' );


log(elements);
if(elements.length) { if(elements.length) {
for (var i = 0; i < elements.length; ++i) { for (var i = 0; i < elements.length; ++i) {
if($(elements[i]).data('config')==='simple_config'){ if($(elements[i]).data('config')==='simple_config'){
var editor = CKEDITOR.replace(elements[i], {
CKEDITOR.replace(elements[i], {
"toolbar": [ "toolbar": [
{ {
items: ['Bold', 'Italic', 'Underline', 'Strike'] items: ['Bold', 'Italic', 'Underline', 'Strike']
'height': 100 'height': 100
}); });
}else{ }else{
var editor = CKEDITOR.replace(elements[i], {
CKEDITOR.replace(elements[i], {
"toolbar": [ "toolbar": [
{ {
name: "styles", name: "styles",

+ 2
- 0
ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js View File

this.title = toPlainText(this.title) this.title = toPlainText(this.title)
this.title = toPlainText(this.title) this.title = toPlainText(this.title)
this.title = toPlainText(this.title); this.title = toPlainText(this.title);
this.propertyExpirationDate = toPlainText(this.propertyExpirationDate);


this.$nextTick(function () { this.$nextTick(function () {


this.title = toPlainText(this.title) this.title = toPlainText(this.title)
this.title = toPlainText(this.title) this.title = toPlainText(this.title)
this.title = toPlainText(this.title) this.title = toPlainText(this.title)
this.propertyExpirationDate = toPlainText(this.propertyExpirationDate);




this.isMounted = true; this.isMounted = true;

+ 1
- 0
ShopBundle/Resources/views/backend/form/ckeditor_widget.html.twig View File

{% endblock %} {% endblock %}


{% block _ckeditor_javascript %} {% block _ckeditor_javascript %}

{# {% if autoload %} {# {% if autoload %}
<script type="text/javascript"> <script type="text/javascript">
var CKEDITOR_BASEPATH = "{{ ckeditor_base_path(base_path) }}"; var CKEDITOR_BASEPATH = "{{ ckeditor_base_path(base_path) }}";

Loading…
Cancel
Save