Преглед изворни кода

Ticket #4393 - In Guest=mode - gap above feed.

AntonLV пре 3 година
родитељ
комит
d7e5cf6382

+ 6 - 0
inc/js/functions.js

@@ -221,6 +221,12 @@ function closeDynamicPopupBlock() {
     $('#dynamicPopup').dolPopupHide();
 }
 
+function onAsyncBlockLoad() {
+    var oBlock = $(this);
+
+    if(!oBlock.html()) 
+        oBlock.remove();
+}
 
 /**
  * Translate string

+ 1 - 1
template/block_async_create_post.html

@@ -7,6 +7,6 @@
 <script>
     var iBlockID = '__id__';
     $(document).ready(function () {
-        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), undefined, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
+        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), onAsyncBlockLoad, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
     });
 </script>

+ 1 - 1
template/block_async_image.html

@@ -2,6 +2,6 @@
 <script>
     var iBlockID = '__id__';
     $(document).ready(function () {
-        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), undefined, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
+        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), onAsyncBlockLoad, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
     });
 </script>

+ 1 - 1
template/block_async_loading_indicator.html

@@ -1,6 +1,6 @@
 <script>
   $(document).ready(function () {
     var iBlockID = '__id__';
-    getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), undefined, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)});
+    getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), onAsyncBlockLoad, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)});
   });
 </script>

+ 1 - 1
template/block_async_profile_units.html

@@ -19,6 +19,6 @@
     var sTmpl = $('#bx-page-block-' + iBlockID + ' .bx-cont-ph-profile-unit').html();
     $('#bx-page-block-' + iBlockID + ' .bx-cont-ph-profile-unit').append(sTmpl + sTmpl);
     $(document).ready(function () {
-        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), undefined, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
+        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), onAsyncBlockLoad, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
     });
 </script>

+ 1 - 1
template/block_async_text.html

@@ -10,6 +10,6 @@
 <script>
     var iBlockID = '__id__';
     $(document).ready(function () {
-        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), undefined, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
+        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), onAsyncBlockLoad, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
     });
 </script>

+ 1 - 1
template/block_async_text_units_gallery.html

@@ -27,6 +27,6 @@
     var sTmpl = $('#bx-page-block-' + iBlockID + ' .bx-cont-ph-profile-unit').html();
     $('#bx-page-block-' + iBlockID + ' .bx-cont-ph-profile-unit').append(sTmpl + sTmpl);
     $(document).ready(function () {
-        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), undefined, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
+        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), onAsyncBlockLoad, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
     });
 </script>

+ 1 - 1
template/block_async_text_units_list.html

@@ -27,6 +27,6 @@
     var sTmpl = $('#bx-page-block-' + iBlockID + ' .bx-base-text-units').html();
     $('#bx-page-block-' + iBlockID + ' .bx-base-text-units').append(sTmpl + sTmpl);
     $(document).ready(function () {
-        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), undefined, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
+        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), onAsyncBlockLoad, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
     });
 </script>