theme.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*!
  2. * bootstrap-fileinput v4.4.9
  3. * http://plugins.krajee.com/file-input
  4. *
  5. * Krajee Explorer Font Awesome theme configuration for bootstrap-fileinput.
  6. * Load this theme file after loading `fileinput.js`. Ensure that
  7. * font awesome assets and CSS are loaded on the page as well.
  8. *
  9. * Author: Kartik Visweswaran
  10. * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com
  11. *
  12. * Licensed under the BSD 3-Clause
  13. * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  14. */
  15. (function ($) {
  16. "use strict";
  17. var teTagBef = '<tr class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}"' +
  18. ' data-template="{template}"', teContent = '<td class="kv-file-content">\n';
  19. $.fn.fileinputThemes['explorer-fas'] = {
  20. layoutTemplates: {
  21. preview: '<div class="file-preview {class}">\n' +
  22. ' {close}' +
  23. ' <div class="{dropClass}">\n' +
  24. ' <table class="table table-bordered table-hover"><tbody class="file-preview-thumbnails">\n' +
  25. ' </tbody></table>\n' +
  26. ' <div class="clearfix"></div>' +
  27. ' <div class="file-preview-status text-center text-success"></div>\n' +
  28. ' <div class="kv-fileinput-error"></div>\n' +
  29. ' </div>\n' +
  30. '</div>',
  31. footer: '<td class="file-details-cell"><div class="explorer-caption" title="{caption}">{caption}</div> ' +
  32. '{size}{progress}</td><td class="file-actions-cell">{indicator} {actions}</td>',
  33. actions: '{drag}\n' +
  34. '<div class="file-actions">\n' +
  35. ' <div class="file-footer-buttons">\n' +
  36. ' {upload} {download} {delete} {zoom} {other} ' +
  37. ' </div>\n' +
  38. '</div>',
  39. zoomCache: '<tr style="display:none" class="kv-zoom-cache-theme"><td>' +
  40. '<table class="kv-zoom-cache">{zoomContent}</table></td></tr>',
  41. fileIcon: '<i class="fas fa-file kv-caption-icon"></i> '
  42. },
  43. previewMarkupTags: {
  44. tagBefore1: teTagBef + '>' + teContent,
  45. tagBefore2: teTagBef + ' title="{caption}">' + teContent,
  46. tagAfter: '</td>\n{footer}</tr>\n'
  47. },
  48. previewSettings: {
  49. image: {height: "60px"},
  50. html: {width: "100px", height: "60px"},
  51. text: {width: "100px", height: "60px"},
  52. video: {width: "auto", height: "60px"},
  53. audio: {width: "auto", height: "60px"},
  54. flash: {width: "100%", height: "60px"},
  55. object: {width: "100%", height: "60px"},
  56. pdf: {width: "100px", height: "60px"},
  57. other: {width: "100%", height: "60px"}
  58. },
  59. frameClass: 'explorer-frame',
  60. fileActionSettings: {
  61. removeIcon: '<i class="fas fa-trash-alt"></i>',
  62. uploadIcon: '<i class="fas fa-upload"></i>',
  63. uploadRetryIcon: '<i class="fas fa-redo-alt"></i>',
  64. downloadIcon: '<i class="fas fa-download"></i>',
  65. zoomIcon: '<i class="fas fa-search-plus"></i>',
  66. dragIcon: '<i class="fas fa-arrows-alt"></i>',
  67. indicatorNew: '<i class="fas fa-plus-circle text-warning"></i>',
  68. indicatorSuccess: '<i class="fas fa-check-circle text-success"></i>',
  69. indicatorError: '<i class="fas fa-exclamation-circle text-danger"></i>',
  70. indicatorLoading: '<i class="fas fa-hourglass text-muted"></i>'
  71. },
  72. previewZoomButtonIcons: {
  73. prev: '<i class="fas fa-caret-left fa-lg"></i>',
  74. next: '<i class="fas fa-caret-right fa-lg"></i>',
  75. toggleheader: '<i class="fas fa-fw fa-arrows-alt-v"></i>',
  76. fullscreen: '<i class="fas fa-fw fa-arrows-alt"></i>',
  77. borderless: '<i class="fas fa-fw fa-external-link-alt"></i>',
  78. close: '<i class="fas fa-fw fa-times"></i>'
  79. },
  80. previewFileIcon: '<i class="fas fa-file"></i>',
  81. browseIcon: '<i class="fas fa-folder-open"></i>',
  82. removeIcon: '<i class="fas fa-trash-alt"></i>',
  83. cancelIcon: '<i class="fas fa-ban"></i>',
  84. uploadIcon: '<i class="fas fa-upload"></i>',
  85. msgValidationErrorIcon: '<i class="fas fa-exclamation-circle"></i> '
  86. };
  87. })(window.jQuery);