theme.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*!
  2. * bootstrap-fileinput v4.3.7
  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">{actions}</td>',
  31. actions: '<div class="file-upload-indicator" title="{indicatorTitle}">{indicator}</div>\n' +
  32. '{drag}\n' +
  33. '<div class="file-actions">\n' +
  34. ' <div class="file-footer-buttons">\n' +
  35. ' {upload} {delete} {zoom} {other} ' +
  36. ' </div>\n' +
  37. '</div>',
  38. zoomCache: '<tr style="display:none" class="kv-zoom-cache-theme"><td>' +
  39. '<table class="kv-zoom-cache">{zoomContent}</table></td></tr>'
  40. },
  41. previewMarkupTags: {
  42. tagBefore1: teTagBef + '>' + teContent,
  43. tagBefore2: teTagBef + ' title="{caption}" style="width:{width};height:{height};">' + teContent,
  44. tagAfter: '</td>\n{footer}</tr>\n'
  45. },
  46. previewSettings: {
  47. image: {height: "60px"},
  48. html: {width: "100px", height: "60px"},
  49. text: {width: "100px", height: "60px"},
  50. video: {width: "auto", height: "60px"},
  51. audio: {width: "auto", height: "60px"},
  52. flash: {width: "100%", height: "60px"},
  53. object: {width: "100%", height: "60px"},
  54. pdf: {width: "100px", height: "60px"},
  55. other: {width: "100%", height: "60px"}
  56. },
  57. frameClass: 'explorer-frame'
  58. };
  59. })(window.jQuery);