From: Vincent Vanwaelscappel Date: Tue, 27 Jun 2023 05:44:24 +0000 (+0200) Subject: wait #6057 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=811dbd66c77830846fc9f855d9a8ac04553f8ecc;p=fluidbook-toolbox.git wait #6057 @0.5 --- diff --git a/resources/views/fields/fluidbook_chapters.blade.php b/resources/views/fields/fluidbook_chapters.blade.php index b1bcbd4e3..ad211c065 100644 --- a/resources/views/fields/fluidbook_chapters.blade.php +++ b/resources/views/fields/fluidbook_chapters.blade.php @@ -7,6 +7,11 @@ $(document).trigger('fluidbook_chapters.level.change'); $(document).on('click', '.chaptersExportExcel', function () { var json = $(this).closest('.bunchmultiple[data-values]').find('.hiddenfield').eq(0).val(); + + if (json == undefined || json == null || json == '' || json == '[]') { + json = '[{"label":"Label","page":"2","color":"","decoration":"regular","level":"0"}]'; + } + var form = $('
' + '' + '' + @@ -17,7 +22,7 @@ $('body').append(form); $(form).find('input[name="json"]').val(json); $(form).find('input[name="name"]').val('chapters_' + $('input[name="id"]').val()); - form.submit(); + form.submit(); return false; }); $(document).on('click', '.chaptersImportExcel', function () {