Browse Source

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

feature/export_comptable
Guillaume 4 years ago
parent
commit
88f7a53fae
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

@@ -1,5 +1,4 @@
jQuery(document).ready(function () {
initLcCkEditor();
//generateNotice('error', 'Ceci est une notice');
$('.action-delete').on('click', function(e) {
e.preventDefault();
@@ -13,19 +12,22 @@ jQuery(document).ready(function () {
deleteForm.trigger('submit');
});
});
});


});

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

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

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

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

@@ -204,6 +204,7 @@ $(window).on('load', function () {
this.title = toPlainText(this.title)
this.title = toPlainText(this.title)
this.title = toPlainText(this.title);
this.propertyExpirationDate = toPlainText(this.propertyExpirationDate);

this.$nextTick(function () {

@@ -467,6 +468,7 @@ $(window).on('load', function () {
this.title = toPlainText(this.title)
this.title = toPlainText(this.title)
this.title = toPlainText(this.title)
this.propertyExpirationDate = toPlainText(this.propertyExpirationDate);


this.isMounted = true;

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

@@ -15,6 +15,7 @@
{% endblock %}

{% block _ckeditor_javascript %}

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

Loading…
Cancel
Save