theme.js 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*!
  2. * bootstrap-fileinput v5.0.4
  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 - 2019, 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-fileid="{fileid}" data-template="{template}"', teContent = '<td class="kv-file-content">\n';
  19. $.fn.fileinputThemes['explorer-fa'] = {
  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="fa 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. html: {width: '100px', height: '60px'},
  50. text: {width: '100px', height: '60px'},
  51. video: {width: 'auto', height: '60px'},
  52. audio: {width: 'auto', height: '60px'},
  53. flash: {width: '100%', height: '60px'},
  54. object: {width: '100%', height: '60px'},
  55. pdf: {width: '100px', height: '60px'},
  56. other: {width: '100%', height: '60px'}
  57. },
  58. frameClass: 'explorer-frame',
  59. fileActionSettings: {
  60. removeIcon: '<i class="fa fa-trash"></i>',
  61. uploadIcon: '<i class="fa fa-upload"></i>',
  62. uploadRetryIcon: '<i class="fa fa-repeat"></i>',
  63. downloadIcon: '<i class="fa fa-download"></i>',
  64. zoomIcon: '<i class="fa fa-search-plus"></i>',
  65. dragIcon: '<i class="fa fa-arrows"></i>',
  66. indicatorNew: '<i class="fa fa-plus-circle text-warning"></i>',
  67. indicatorSuccess: '<i class="fa fa-check-circle text-success"></i>',
  68. indicatorError: '<i class="fa fa-exclamation-circle text-danger"></i>',
  69. indicatorLoading: '<i class="fa fa-hourglass text-muted"></i>',
  70. indicatorPaused: '<i class="fa fa-pause text-info"></i>'
  71. },
  72. previewZoomButtonIcons: {
  73. prev: '<i class="fa fa-caret-left fa-lg"></i>',
  74. next: '<i class="fa fa-caret-right fa-lg"></i>',
  75. toggleheader: '<i class="fa fa-fw fa-arrows-v"></i>',
  76. fullscreen: '<i class="fa fa-fw fa-arrows-alt"></i>',
  77. borderless: '<i class="fa fa-fw fa-external-link"></i>',
  78. close: '<i class="fa fa-fw fa-remove"></i>'
  79. },
  80. previewFileIcon: '<i class="fa fa-file"></i>',
  81. browseIcon: '<i class="fa fa-folder-open"></i>',
  82. removeIcon: '<i class="fa fa-trash"></i>',
  83. cancelIcon: '<i class="fa fa-ban"></i>',
  84. pauseIcon: '<i class="fa fa-pause"></i>',
  85. uploadIcon: '<i class="fa fa-upload"></i>',
  86. msgValidationErrorIcon: '<i class="fa fa-exclamation-circle"></i> '
  87. };
  88. })(window.jQuery);