fileinput.scss 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. /*!
  2. * bootstrap-fileinput v4.3.6
  3. * http://plugins.krajee.com/file-input
  4. *
  5. * Author: Kartik Visweswaran
  6. * Copyright: 2014 - 2017, Kartik Visweswaran, Krajee.com
  7. *
  8. * Licensed under the BSD 3-Clause
  9. * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  10. */
  11. $image-path: "'../img" !default;
  12. $preview-size: 160px !default;
  13. .file-loading {
  14. top: 0;
  15. right: 0;
  16. width: 25px;
  17. height: 25px;
  18. font-size: 999px;
  19. text-align: right;
  20. color: #fff;
  21. background: transparent url('#{$image-path}/loading.gif') top left no-repeat;
  22. border: none;
  23. }
  24. .file-object {
  25. margin: 0 0 -5px 0;
  26. padding: 0;
  27. }
  28. .btn-file {
  29. position: relative;
  30. overflow: hidden;
  31. input[type=file] {
  32. position: absolute;
  33. top: 0;
  34. right: 0;
  35. min-width: 100%;
  36. min-height: 100%;
  37. text-align: right;
  38. opacity: 0;
  39. background: none repeat scroll 0 0 transparent;
  40. cursor: inherit;
  41. display: block;
  42. }
  43. }
  44. .file-caption-name {
  45. display: inline-block;
  46. overflow: hidden;
  47. height: 20px;
  48. word-break: break-all;
  49. }
  50. .input-group-lg .file-caption-name {
  51. height: 25px;
  52. }
  53. .file-zoom-dialog {
  54. text-align: left;
  55. }
  56. .file-error-message {
  57. color: #a94442;
  58. background-color: #f2dede;
  59. margin: 5px;
  60. border: 1px solid #ebccd1;
  61. border-radius: 4px;
  62. padding: 15px;
  63. pre, ul {
  64. margin: 0;
  65. text-align: left;
  66. }
  67. pre {
  68. margin: 5px 0;
  69. }
  70. }
  71. .file-caption-disabled {
  72. background-color: #EEEEEE;
  73. cursor: not-allowed;
  74. opacity: 1;
  75. }
  76. .file-preview {
  77. border-radius: 5px;
  78. border: 1px solid #ddd;
  79. padding: 5px;
  80. width: 100%;
  81. margin-bottom: 5px;
  82. }
  83. .file-preview-frame {
  84. position: relative;
  85. display: table;
  86. margin: 8px;
  87. height: $preview-size;
  88. border: 1px solid #ddd;
  89. box-shadow: 1px 1px 5px 0 #a2958a;
  90. padding: 6px;
  91. float: left;
  92. text-align: center;
  93. vertical-align: middle;
  94. &:not(.file-preview-error):hover {
  95. box-shadow: 3px 3px 5px 0 #333;
  96. }
  97. }
  98. .file-preview-image {
  99. vertical-align: middle;
  100. }
  101. .file-preview-text {
  102. display: block;
  103. color: #428bca;
  104. border: 1px solid #ddd;
  105. font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  106. outline: none;
  107. padding: 8px;
  108. resize: none;
  109. }
  110. .file-preview-html {
  111. border: 1px solid #ddd;
  112. padding: 8px;
  113. overflow: auto;
  114. }
  115. .file-zoom-dialog .file-preview-text {
  116. font-size: 1.2em;
  117. }
  118. .file-preview-other {
  119. left: 0;
  120. top: 0;
  121. right: 0;
  122. bottom: 0;
  123. margin: auto;
  124. text-align: center;
  125. vertical-align: middle;
  126. padding: 10px;
  127. &:hover {
  128. opacity: 0.8;
  129. }
  130. }
  131. .file-actions, .file-other-error {
  132. text-align: left;
  133. }
  134. .file-other-icon {
  135. font-size: 4.8em;
  136. }
  137. /* noinspection CssOverwrittenProperties */
  138. .file-zoom-dialog .file-other-icon {
  139. font-size: 8em;
  140. font-size: 55vmin;
  141. }
  142. .file-input-new {
  143. .file-preview, .close, .glyphicon-file, .fileinput-remove-button, .fileinput-upload-button {
  144. display: none;
  145. }
  146. }
  147. .file-input-ajax-new {
  148. .fileinput-remove-button, .fileinput-upload-button {
  149. display: none;
  150. }
  151. }
  152. .file-thumb-loading {
  153. background: transparent url('#{$image-path}/loading.gif') no-repeat scroll center center content-box !important;
  154. }
  155. .file-actions {
  156. margin-top: 15px;
  157. }
  158. .file-footer-buttons {
  159. float: right;
  160. }
  161. .file-upload-indicator {
  162. display: inline;
  163. cursor: default;
  164. opacity: 0.8;
  165. width: 60%;
  166. &:hover {
  167. font-weight: bold;
  168. opacity: 1;
  169. }
  170. }
  171. .file-footer-caption {
  172. display: block;
  173. white-space: nowrap;
  174. overflow: hidden;
  175. text-overflow: ellipsis;
  176. width: $preview-size;
  177. text-align: center;
  178. padding-top: 4px;
  179. font-size: 11px;
  180. color: #777;
  181. margin: 5px auto;
  182. }
  183. .file-preview-error {
  184. opacity: 0.65;
  185. box-shadow: none;
  186. }
  187. .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover {
  188. color: #000;
  189. }
  190. .file-drop-zone {
  191. border: 1px dashed #aaa;
  192. border-radius: 4px;
  193. height: 100%;
  194. text-align: center;
  195. vertical-align: middle;
  196. margin: 12px 15px 12px 12px;
  197. padding: 5px;
  198. }
  199. .file-drop-zone-title {
  200. color: #aaa;
  201. font-size: 40px;
  202. padding: 85px 10px;
  203. }
  204. .file-highlighted {
  205. border: 2px dashed #999 !important;
  206. background-color: #f0f0f0;
  207. }
  208. .file-uploading {
  209. background: url('#{$image-path}/loading-sm.gif') no-repeat center bottom 10px;
  210. opacity: 0.65;
  211. }
  212. .file-thumb-progress {
  213. height: 10px;
  214. .progress, .progress-bar {
  215. height: 10px;
  216. font-size: 9px;
  217. line-height: 10px;
  218. }
  219. }
  220. .file-thumbnail-footer {
  221. position: relative;
  222. }
  223. .file-thumb-progress {
  224. position: absolute;
  225. top: 35px;
  226. left: 0;
  227. right: 0;
  228. }
  229. .file-zoom-fullscreen {
  230. &.modal {
  231. position: fixed;
  232. top: 0;
  233. right: 0;
  234. bottom: 0;
  235. left: 0;
  236. }
  237. .modal-dialog {
  238. position: fixed;
  239. margin: 0;
  240. width: 100%;
  241. height: 100%;
  242. padding: 0;
  243. }
  244. .modal-content {
  245. border-radius: 0;
  246. box-shadow: none;
  247. }
  248. .modal-body {
  249. overflow-y: auto;
  250. }
  251. }
  252. .file-zoom-dialog {
  253. .modal-body {
  254. position: relative !important;
  255. }
  256. .btn-navigate {
  257. position: absolute;
  258. padding: 0;
  259. margin: 0;
  260. background: transparent;
  261. text-decoration: none;
  262. outline: none;
  263. opacity: 0.7;
  264. top: 45%;
  265. font-size: 4em;
  266. color: #1c94c4;
  267. }
  268. .floating-buttons {
  269. position: absolute;
  270. top: 5px;
  271. right: 10px;
  272. }
  273. }
  274. .floating-buttons {
  275. z-index: 3000;
  276. .btn {
  277. z-index: 3000;
  278. }
  279. }
  280. .file-zoom-dialog .kv-zoom-actions .btn, .floating-buttons .btn {
  281. margin-left: 3px;
  282. }
  283. .file-zoom-dialog {
  284. .btn-navigate {
  285. &:not([disabled]) {
  286. &:hover, &:focus {
  287. outline: none;
  288. box-shadow: none;
  289. opacity: 0.5;
  290. }
  291. }
  292. &[disabled] {
  293. opacity: 0.3;
  294. }
  295. }
  296. .btn-prev {
  297. left: 1px;
  298. }
  299. .btn-next {
  300. right: 1px;
  301. }
  302. }
  303. .file-drag-handle {
  304. display: inline;
  305. margin-right: 2px;
  306. font-size: 16px;
  307. cursor: move;
  308. cursor: -webkit-grabbing;
  309. &:hover {
  310. opacity: 0.7;
  311. }
  312. }
  313. .file-zoom-content {
  314. height: 480px;
  315. text-align: center;
  316. }
  317. .file-preview-initial.sortable-chosen {
  318. background-color: #d9edf7;
  319. }
  320. .file-preview-frame.sortable-ghost {
  321. background-color: #eee;
  322. }
  323. /* IE 10 fix */
  324. .btn-file ::-ms-browse {
  325. width: 100%;
  326. height: 100%;
  327. }