AntonLV 5 yıl önce
ebeveyn
işleme
b6b2e09ac2

+ 2 - 4
inc/js/classes/BxDolUploader.js

@@ -162,6 +162,8 @@ BxDolUploaderSimple.prototype.restoreGhosts = function () {
 
                 oFileContainer.find('.bx-uploader-ghost-preview img').hide().fadeIn(1000);
             });
+
+            $('#' + $this._sResultContainerId).bx_show_more_check_overflow();
         }
     });
 };
@@ -551,8 +553,6 @@ function BxDolUploaderRecordVideo (sUploaderObject, sStorageObject, sUniqId, opt
             return;
         }
 
-        $("#" + this._sFormContainerId + " .bx-btn.bx-btn-primary:not(.bx-crop-upload)").hide();
-
         $('#' + this._sFormContainerId + ' .bx-uploader-recording-start').hide();
         $('#' + this._sFormContainerId + ' .bx-uploader-recording-stop').show();
 
@@ -573,8 +573,6 @@ function BxDolUploaderRecordVideo (sUploaderObject, sStorageObject, sUniqId, opt
             $this._recorder.destroy();
             $this._recorder = null;
 
-            $("#" + $this._sFormContainerId + " .bx-btn.bx-btn-primary:not(.bx-crop-upload)").show();
-
             if (bSubmitWhenReady)
                 $this.submitRecording($('#' + $this._sFormContainerId + ' form').get(0));
         });

+ 27 - 0
inc/js/jquery.anim.js

@@ -92,4 +92,31 @@ $.fn.bx_message_box = function(sMessage, iTimer, onClose) {
     });
 };
 
+$.fn.bx_show_more_check_overflow = function(sClass, onFind) {
+    if(!sClass)
+        sClass = 'bx-overflow';
+
+    return this.each(function() {
+        var oElement = $(this);
+        if(oElement.hasClass(sClass) || oElement.css('overflow') != 'hidden')
+            return;
+
+        if(oElement.prop('scrollHeight') <= oElement.height())
+            return;
+
+        oElement.addClass(sClass);
+        if(typeof onFind === 'function')
+            onFind(oElement);
+        else
+            oElement.after('<div class="bx-show-more bx-def-border-top"><a href="javascript:void(0)" onclick="bx_show_more(this);"><i class="sys-icon angle-double-down"></i></div>');
+    });
+};
+
+function bx_show_more(oLink) {
+    var sClass = 'bx-overflow';
+    var oShowMore = $(oLink).parent();
+
+    oShowMore.siblings('.' + sClass).css('max-height', 'none').removeClass(sClass);
+    oShowMore.remove();
+};
 /** @} */

+ 8 - 2
modules/boonex/market/template/css/forms.css

@@ -7,9 +7,15 @@
 }
 
 /*--- Uploader Ghost ---*/
+#bx-form-element-files .bx-form-input-files-result {
+    position: relative;
+    max-height: 20rem;
+    overflow: hidden;
+}
+
 .bx-uploader-ghost-header {
-	position: relative;
-	line-height: 1.5rem;
+    position: relative;
+    line-height: 1.5rem;
 }
 
 .bx-uploader-ghost .bx-uploader-ghost-header .sys-icon {

+ 18 - 0
template/css/common.css

@@ -859,4 +859,22 @@ input.bx-btn {
 .bx-category-list-item {
 	line-height: 24px;
 	line-height: 1.5rem;
+}
+
+
+/* --------------- Show More */
+.bx-overflow:before {
+    position: absolute;
+    bottom: 0;
+    width: 100%;
+    height: 20%;
+
+    content: '';
+}
+
+.bx-show-more {
+    padding-top: 0.25rem;
+    padding-bottom: 0.25rem;
+
+    text-align: center
 }