theme.js 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*!
  2. * bootstrap-fileinput v4.4.2
  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 - 2017, 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-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} {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. 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="fa fa-trash text-danger"></i>',
  62. uploadIcon: '<i class="fa fa-upload text-info"></i>',
  63. zoomIcon: '<i class="fa fa-search-plus"></i>',
  64. dragIcon: '<i class="fa fa-bars"></i>',
  65. indicatorNew: '<i class="fa fa-hand-o-down text-warning"></i>',
  66. indicatorSuccess: '<i class="fa fa-check-circle text-success"></i>',
  67. indicatorError: '<i class="fa fa-exclamation-circle text-danger"></i>',
  68. indicatorLoading: '<i class="fa fa-hand-o-up text-muted"></i>'
  69. },
  70. previewZoomButtonIcons: {
  71. prev: '<i class="fa fa-caret-left fa-lg"></i>',
  72. next: '<i class="fa fa-caret-right fa-lg"></i>',
  73. toggleheader: '<i class="fa fa-arrows-v"></i>',
  74. fullscreen: '<i class="fa fa-arrows-alt"></i>',
  75. borderless: '<i class="fa fa-external-link"></i>',
  76. close: '<i class="fa fa-remove"></i>'
  77. },
  78. previewFileIcon: '<i class="fa fa-file"></i>',
  79. browseIcon: '<i class="fa fa-folder-open"></i>',
  80. removeIcon: '<i class="fa fa-trash"></i>',
  81. cancelIcon: '<i class="fa fa-ban"></i>',
  82. uploadIcon: '<i class="fa fa-upload"></i>',
  83. msgValidationErrorIcon: '<i class="fa fa-exclamation-circle"></i> '
  84. };
  85. })(window.jQuery);