Parcourir la source

Error styling updates

Kartik Visweswaran il y a 10 ans
Parent
commit
31f9f3d311
4 fichiers modifiés avec 23 ajouts et 20 suppressions
  1. 17 12
      css/fileinput.css
  2. 0 0
      css/fileinput.min.css
  3. 6 8
      js/fileinput.js
  4. 0 0
      js/fileinput.min.js

+ 17 - 12
css/fileinput.css

@@ -24,6 +24,7 @@
     background: transparent url('../img/loading.gif') top left no-repeat;
     border: none;
 }
+
 .btn-file {
     position: relative;
     overflow: hidden;
@@ -82,6 +83,7 @@
     padding: 10px;
     right: 0px;
 }
+
 .file-error-message {
     background-color: #f2dede;
     color: #a94442;
@@ -89,6 +91,7 @@
     border-radius: 5px;
     padding: 5px;
 }
+
 .file-caption-disabled {
     background-color: #EEEEEE;
     cursor: not-allowed;
@@ -143,14 +146,16 @@
 .file-preview-other i {
     font-size: 2.4em;
 }
-.file-other-error { 
+
+.file-other-error {
     width: 100%;
     padding-top: 30px;
-    text-align:right
+    text-align: right
 }
-.file-input-new .file-preview, .file-input-new .close, .file-input-new .glyphicon-file, 
+
+.file-input-new .file-preview, .file-input-new .close, .file-input-new .glyphicon-file,
 .file-input-new .fileinput-remove-button, .file-input-new .fileinput-upload-button,
-.file-input-ajax-new .fileinput-remove-button, .file-input-ajax-new .fileinput-upload-button  {
+.file-input-ajax-new .fileinput-remove-button, .file-input-ajax-new .fileinput-upload-button {
     display: none;
 }
 
@@ -173,7 +178,7 @@
 }
 
 .file-thumbnail-footer .file-caption-name {
-    padding-top:4px;
+    padding-top: 4px;
     font-size: 11px;
     color: #777;
 }
@@ -190,23 +195,23 @@
 }
 
 .file-drop-zone {
-    border:1px dashed #aaa;
+    border: 1px dashed #aaa;
     border-radius: 4px;
     height: 100%;
-    text-align:center;
-    vertical-align:middle;
-    margin:12px 15px 12px 12px;
-    padding:5px;
+    text-align: center;
+    vertical-align: middle;
+    margin: 12px 15px 12px 12px;
+    padding: 5px;
 }
 
 .file-drop-zone-title {
-	color: #aaa;
+    color: #aaa;
     font-size: 40px;
     padding: 85px 10px;
 }
 
 .highlighted {
-    border:2px dashed #999!important;
+    border: 2px dashed #999 !important;
     background-color: #f0f0f0;
 }
 

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
css/fileinput.min.css


+ 6 - 8
js/fileinput.js

@@ -493,13 +493,11 @@
         parseError: function (jqXHR, errorThrown, fileName) {
             var self = this, errMsg = $.trim(errorThrown + ''),
                 dot = errMsg.slice(-1) === '.' ? '' : '.',
-                text = '<pre class="text-left">' + $(jqXHR.responseText).text().replace(/\n\s*\n/g, '\n') + '</pre>';
+                text = $(jqXHR.responseText).text();
             if (self.showAjaxErrorDetails) {
-                if (errMsg.replace(/\s/g, "X").length > 0) {
-                    errMsg += dot + '<br>' + text;
-                } else {
-                    errMsg = text;
-                }
+                text = $.trim(text.replace(/\n\s*\n/g, '\n'));
+                text = text.length > 0 ? '<pre>' + text + '</pre>' : '';
+                errMsg += dot + text;
             } else {
                 errMsg += dot;
             }
@@ -1486,9 +1484,9 @@
         showUploadError: function (msg, params, event) {
             var self = this, $error = self.$errorContainer, ev = event || 'fileuploaderror';
             if ($error.find('ul').length === 0) {
-                $error.html('<ul class="text-left"><br><li>' + msg + '</li></ul>');
+                $error.html('<ul><li>' + msg + '</li></ul>');
             } else {
-                $error.find('ul').append('<br><li>' + msg + '</li>');
+                $error.find('ul').append('<li>' + msg + '</li>');
             }
             $error.fadeIn(800);
             self.raise(ev, [params]);

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
js/fileinput.min.js


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff