fileinput.scss 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. /*!
  2. * bootstrap-fileinput v4.3.2
  3. * http://plugins.krajee.com/file-input
  4. *
  5. * Author: Kartik Visweswaran
  6. * Copyright: 2014 - 2016, 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. /*
  132. .file-preview-other {
  133. display: table-cell;
  134. text-align: center;
  135. vertical-align: middle;
  136. border: 2px solid #999;
  137. border-radius: 30px;
  138. }
  139. */
  140. .file-actions, .file-other-error {
  141. text-align: left;
  142. }
  143. .file-other-icon {
  144. font-size: 4.8em;
  145. }
  146. .file-zoom-dialog .file-other-icon {
  147. font-size: 8em;
  148. font-size: 55vmin;
  149. }
  150. .file-input-new {
  151. .file-preview, .close, .glyphicon-file, .fileinput-remove-button, .fileinput-upload-button {
  152. display: none;
  153. }
  154. }
  155. .file-input-ajax-new {
  156. .fileinput-remove-button, .fileinput-upload-button {
  157. display: none;
  158. }
  159. }
  160. .file-thumb-loading {
  161. background: transparent url('#{$image-path}/loading.gif') no-repeat scroll center center content-box !important;
  162. }
  163. .file-actions {
  164. margin-top: 15px;
  165. }
  166. .file-footer-buttons {
  167. float: right;
  168. }
  169. .file-upload-indicator {
  170. display: inline;
  171. cursor: default;
  172. opacity: 0.8;
  173. width: 60%;
  174. &:hover {
  175. font-weight: bold;
  176. opacity: 1;
  177. }
  178. }
  179. .file-footer-caption {
  180. display: block;
  181. white-space: nowrap;
  182. overflow: hidden;
  183. text-overflow: ellipsis;
  184. width: $preview-size;
  185. text-align: center;
  186. padding-top: 4px;
  187. font-size: 11px;
  188. color: #777;
  189. margin: 5px auto;
  190. }
  191. .file-preview-error {
  192. opacity: 0.65;
  193. box-shadow: none;
  194. }
  195. .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover {
  196. color: #000;
  197. }
  198. .file-drop-zone {
  199. border: 1px dashed #aaa;
  200. border-radius: 4px;
  201. height: 100%;
  202. text-align: center;
  203. vertical-align: middle;
  204. margin: 12px 15px 12px 12px;
  205. padding: 5px;
  206. }
  207. .file-drop-zone-title {
  208. color: #aaa;
  209. font-size: 40px;
  210. padding: 85px 10px;
  211. }
  212. .file-highlighted {
  213. border: 2px dashed #999 !important;
  214. background-color: #f0f0f0;
  215. }
  216. .file-uploading {
  217. background: url('#{$image-path}/loading-sm.gif') no-repeat center bottom 10px;
  218. opacity: 0.65;
  219. }
  220. .file-thumb-progress {
  221. height: 10px;
  222. .progress, .progress-bar {
  223. height: 10px;
  224. font-size: 9px;
  225. line-height: 10px;
  226. }
  227. }
  228. .file-thumbnail-footer {
  229. position: relative;
  230. }
  231. .file-thumb-progress {
  232. position: absolute;
  233. top: 35px;
  234. left: 0;
  235. right: 0;
  236. }
  237. .file-zoom-fullscreen {
  238. &.modal {
  239. position: fixed;
  240. top: 0;
  241. right: 0;
  242. bottom: 0;
  243. left: 0;
  244. }
  245. .modal-dialog {
  246. position: fixed;
  247. margin: 0;
  248. width: 100%;
  249. height: 100%;
  250. padding: 0;
  251. }
  252. .modal-content {
  253. border-radius: 0;
  254. box-shadow: none;
  255. }
  256. .modal-body {
  257. overflow-y: auto;
  258. }
  259. }
  260. .file-zoom-dialog {
  261. .modal-body {
  262. position: relative !important;
  263. }
  264. .btn-navigate {
  265. position: absolute;
  266. padding: 0;
  267. margin: 0;
  268. background: transparent;
  269. text-decoration: none;
  270. outline: none;
  271. opacity: 0.7;
  272. top: 45%;
  273. font-size: 4em;
  274. color: #1c94c4;
  275. }
  276. .floating-buttons {
  277. position: absolute;
  278. top: 5px;
  279. right: 10px;
  280. }
  281. }
  282. .floating-buttons {
  283. z-index: 3000;
  284. .btn {
  285. z-index: 3000;
  286. }
  287. }
  288. .file-zoom-dialog .kv-zoom-actions .btn, .floating-buttons .btn {
  289. margin-left: 3px;
  290. }
  291. .file-zoom-dialog {
  292. .btn-navigate {
  293. &:not([disabled]) {
  294. &:hover, &:focus {
  295. outline: none;
  296. box-shadow: none;
  297. opacity: 0.5;
  298. }
  299. }
  300. &[disabled] {
  301. opacity: 0.3;
  302. }
  303. }
  304. .btn-prev {
  305. left: 1px;
  306. }
  307. .btn-next {
  308. right: 1px;
  309. }
  310. }
  311. .file-drag-handle {
  312. display: inline;
  313. margin-right: 2px;
  314. font-size: 16px;
  315. cursor: move;
  316. cursor: -webkit-grabbing;
  317. &:hover {
  318. opacity: 0.7;
  319. }
  320. }
  321. .file-zoom-content {
  322. height: 480px;
  323. text-align: center;
  324. }
  325. .file-preview-initial.sortable-chosen {
  326. background-color: #d9edf7;
  327. }
  328. .file-preview-frame.sortable-ghost {
  329. background-color: #eee;
  330. }
  331. /* IE 10 fix */
  332. .btn-file ::-ms-browse {
  333. width: 100%;
  334. height: 100%;
  335. }