invoice_template.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* ------------------------------------------------------------------------------
  2. *
  3. * # Invoice template
  4. *
  5. * Demo JS code for invoice_template.html page
  6. *
  7. * ---------------------------------------------------------------------------- */
  8. // Setup module
  9. // ------------------------------
  10. var InvoiceTemplate = function() {
  11. //
  12. // Setup module components
  13. //
  14. // CKEditor
  15. var _componentCKEditor = function() {
  16. if (typeof CKEDITOR == 'undefined') {
  17. console.warn('Warning - ckeditor.js is not loaded.');
  18. return;
  19. }
  20. // Apply options
  21. CKEDITOR.disableAutoInline = true;
  22. CKEDITOR.dtd.$removeEmpty['i'] = false;
  23. CKEDITOR.config.startupShowBorders = false;
  24. CKEDITOR.config.extraAllowedContent = 'table(*)';
  25. };
  26. //
  27. // Return objects assigned to module
  28. //
  29. return {
  30. init: function() {
  31. _componentCKEditor();
  32. }
  33. }
  34. }();
  35. // Initialize module
  36. // ------------------------------
  37. document.addEventListener('DOMContentLoaded', function() {
  38. InvoiceTemplate.init();
  39. });