theme.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*!
  2. * bootstrap-fileinput v4.4.2
  3. * http://plugins.krajee.com/file-input
  4. *
  5. * Krajee Explorer theme configuration for bootstrap-fileinput. Load this theme file after loading `fileinput.js`.
  6. *
  7. * Author: Kartik Visweswaran
  8. * Copyright: 2014 - 2017, Kartik Visweswaran, Krajee.com
  9. *
  10. * Licensed under the BSD 3-Clause
  11. * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  12. */
  13. (function ($) {
  14. "use strict";
  15. var teTagBef = '<tr class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}"' +
  16. ' data-template="{template}"', teContent = '<td class="kv-file-content">\n';
  17. $.fn.fileinputThemes.explorer = {
  18. layoutTemplates: {
  19. preview: '<div class="file-preview {class}">\n' +
  20. ' {close}' +
  21. ' <div class="{dropClass}">\n' +
  22. ' <table class="table table-bordered table-hover"><tbody class="file-preview-thumbnails">\n' +
  23. ' </tbody></table>\n' +
  24. ' <div class="clearfix"></div>' +
  25. ' <div class="file-preview-status text-center text-success"></div>\n' +
  26. ' <div class="kv-fileinput-error"></div>\n' +
  27. ' </div>\n' +
  28. '</div>',
  29. footer: '<td class="file-details-cell"><div class="explorer-caption" title="{caption}">{caption}</div> ' +
  30. '{size}{progress}</td><td class="file-actions-cell">{indicator} {actions}</td>',
  31. actions: '{drag}\n' +
  32. '<div class="file-actions">\n' +
  33. ' <div class="file-footer-buttons">\n' +
  34. ' {upload} {delete} {zoom} {other} ' +
  35. ' </div>\n' +
  36. '</div>',
  37. zoomCache: '<tr style="display:none" class="kv-zoom-cache-theme"><td>' +
  38. '<table class="kv-zoom-cache">{zoomContent}</table></td></tr>'
  39. },
  40. previewMarkupTags: {
  41. tagBefore1: teTagBef + '>' + teContent,
  42. tagBefore2: teTagBef + ' title="{caption}">' + teContent,
  43. tagAfter: '</td>\n{footer}</tr>\n'
  44. },
  45. previewSettings: {
  46. image: {height: "60px"},
  47. html: {width: "100px", height: "60px"},
  48. text: {width: "100px", height: "60px"},
  49. video: {width: "auto", height: "60px"},
  50. audio: {width: "auto", height: "60px"},
  51. flash: {width: "100%", height: "60px"},
  52. object: {width: "100%", height: "60px"},
  53. pdf: {width: "100px", height: "60px"},
  54. other: {width: "100%", height: "60px"}
  55. },
  56. frameClass: 'explorer-frame'
  57. };
  58. })(window.jQuery);