RomanL il y a 8 ans
Parent
commit
e4597e3394

+ 2 - 1
modules/boonex/attendant/classes/BxAttendantModule.php

@@ -104,7 +104,8 @@ class BxAttendantModule extends BxDolModule
         foreach($aModules as $sModuleName){
             if(BxDolRequest::serviceExists($sModuleName, BX_ATTENDANT_ON_PROFILE_CREATION_METHOD)){
                 $aTmp = BxDolService::call($sModuleName, BX_ATTENDANT_ON_PROFILE_CREATION_METHOD, array('unit_view' => 'showcase', 'empty_message' => false, "ajax_paginate" => false));
-                array_push($aModulteData, $aTmp['content']);
+                if (isset($aTmp['content']))
+                    array_push($aModulteData, $aTmp['content']);
             }
         }
         $sRv = $this->_oTemplate->popupWithRecommendedOnProfileAdd($aModulteData);

+ 7 - 11
modules/boonex/attendant/js/main.js

@@ -18,27 +18,18 @@ function BxAttendantPopupWithRecommendedOnProfileAdd(oOptions) {
 
 BxAttendantPopupWithRecommendedOnProfileAdd.prototype.init = function () {
     var $this = this;
-
     $('.bx-pwropa-item-container').hide().first().show();
-    $('#' + $this._sContainerId).dolPopup({ onShow: $this.Show() });
+    $('#' + $this._sContainerId).dolPopup({ position: 'centered', closeOnOuterClick: false, onShow: $this.Show });
     $('.bx-pwropa-button').click(function () {
         $oCurr = $('.bx-pwropa-item-container:visible').hide();
         $oNext = $oCurr.next(); $oNext.show();
         $this.ReInitFlickity();
         if (!$oNext.length) {
-            $('.bx-pwropa-container').hide();
+            $('#' + $this._sContainerId).dolPopupHide();
         }
-        
     });
 }
 
-BxAttendantPopupWithRecommendedOnProfileAdd.prototype.Show = function () {
-    var $this = this;
-    $('#' + $this._sContainerId + ' .bx-base-pofile-unit-cnt').css('height', 'auto');
-    $('#' + $this._sContainerId + ' .bx-pwropa-item-container:visible .bx-base-unit-showcase-wrapper').flickity();
-    $this.ReInitFlickity();
-}
-
 BxAttendantPopupWithRecommendedOnProfileAdd.prototype.ReInitFlickity = function () {
     var $this = this;
     $('#' + $this._sContainerId + ' .bx-pwropa-item-container:visible .bx-base-unit-showcase-wrapper').flickity({
@@ -48,3 +39,8 @@ BxAttendantPopupWithRecommendedOnProfileAdd.prototype.ReInitFlickity = function
         imagesLoaded: true
     });
 }
+
+BxAttendantPopupWithRecommendedOnProfileAdd.prototype.Show = function () {
+    var $this = oBxAttendantPopupWithRecommendedOnProfileAdd;
+    $this.ReInitFlickity();
+}