|
44 | 44 | ' <param name="autoPlay" value="false" />\n' +
|
45 | 45 | ' <param name="autoStart" value="false" />\n'+
|
46 | 46 | ' <param name="quality" value="high" />\n',
|
47 |
| - DEFAULT_PREVIEW = '<div class="file-preview-other" ' + STYLE_SETTING + '>\n' + |
48 |
| - ' <h2><i class="glyphicon glyphicon-file"></i></h2>\n' + |
| 47 | + DEFAULT_PREVIEW = '<div class="file-preview-other">\n' + |
| 48 | + ' <i class="glyphicon glyphicon-file"></i>\n' + |
49 | 49 | ' </div>';
|
50 | 50 |
|
51 | 51 | var defaultFileActionSettings = {
|
|
184 | 184 | video: {width: "213px", height: "160px"},
|
185 | 185 | audio: {width: "213px", height: "80px"},
|
186 | 186 | flash: {width: "213px", height: "160px"},
|
187 |
| - object: {width: "213px", height: "160px"}, |
188 |
| - other: {width: "160px", height: "auto"} |
| 187 | + object: {width: "160px", height: "160px"}, |
| 188 | + other: {width: "160px", height: "160px"} |
189 | 189 | };
|
190 | 190 | var defaultFileTypeSettings = {
|
191 | 191 | image: function(vType, vName) {
|
|
508 | 508 | }
|
509 | 509 | return '';
|
510 | 510 | },
|
511 |
| - renderFileFooter: function(caption, width, indicator) { |
| 511 | + renderFileFooter: function(caption, width) { |
512 | 512 | var self = this, config = self.fileActionSettings,
|
513 | 513 | template = self.getLayoutTemplate('footer');
|
514 | 514 | if (self.isUploadable) {
|
515 | 515 | var footer = template.replace(/\{actions\}/g, self.renderFileActions(true, true, false, false, false));
|
516 | 516 | return footer.replace(/\{caption\}/g, caption).replace(/\{width\}/g, width)
|
517 | 517 | .replace(/\{indicator\}/g, config.indicatorNew).replace(/\{indicatorTitle\}/g, config.indicatorNewTitle);
|
| 518 | + } else { |
| 519 | + return template.replace(/\{actions\}/g, '').replace(/\{caption\}/g, caption).replace(/\{width\}/g, width) |
| 520 | + .replace(/\{indicator\}/g, '').replace(/\{indicatorTitle\}/g, ''); |
518 | 521 | }
|
519 | 522 | return '';
|
520 | 523 | },
|
|
1083 | 1086 | }
|
1084 | 1087 | var data = vUrl.createObjectURL(file), $obj = $('#' + previewId),
|
1085 | 1088 | config = self.previewSettings.other,
|
1086 |
| - footer = self.renderFileFooter(file.name, config.width), |
| 1089 | + footer = self.isUploadable ? |
| 1090 | + self.renderFileFooter(file.name, config.width) : |
| 1091 | + self.renderFileFooter(file.name, config.width, false), |
1087 | 1092 | previewOtherTemplate = self.getPreviewTemplate('other'),
|
1088 | 1093 | ind = previewId.slice(previewId.lastIndexOf('-') + 1),
|
1089 | 1094 | frameClass = '';
|
1090 | 1095 | if (arguments.length > 2) {
|
1091 | 1096 | var $err = $(self.msgValidationError);
|
1092 |
| - footer = '<i class="glyphicon glyphicon-exclamation-sign text-danger pull-right"></i>' + file.name; |
1093 | 1097 | frameClass = ' btn disabled';
|
| 1098 | + footer += '<div class="file-other-error text-danger"><i class="glyphicon glyphicon-exclamation-sign"></i></div>'; |
1094 | 1099 | }
|
1095 | 1100 | self.$preview.append("\n" + previewOtherTemplate
|
1096 | 1101 | .replace(/\{previewId\}/g, previewId)
|
|
0 commit comments