Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartClient 5.7.1 Patch for SectionStack not filling space freed by hiding sections

    In the SmartClient 5.7.1 build, there is an issue with the SectionStack class whereby in some cases, when sections are hidden, the freed space within the SectionStack isn't automatically filled.

    This patch will address this issue. It applies to SmartClient 5.7.1 versions only.

    Code:
    //----------------------------------------------------------------------------
    // Isomorphic SmartClient v5.71 patch
    // Purpose: Fix for SectionStack not filling freed space in some cases
    //          when sections are hidden.
    // 
    // Applies to SmartClient version 5.71 only
    //----------------------------------------------------------------------------
    
    if (window.isc && isc.version.startsWith("5.7.1/")){ 
    isc.SectionStack.addMethods({$6o : function(_1,_2,_3){if(!isc.isAn.Array(_1))_1=[_1];var _4=[];for(var i=0;i<_1.length;i++){var _6=this.getSectionHeader(_1[i]);if(_6==null){this.logWarn("no such section: "+this.echo(_6));continue}
    if(_2&&!_6.hidden){_6.hidden=true;_4.add(_6)}
    if(_3||_6.expanded){if(_3){if(_6.setExpanded&&!_6.setOpen)_6.setExpanded(false);else if(_6.setOpen)_6.setOpen(false)}
    if(_6.items){for(var j=0;j<_6.items.length;j++){if(this.members.contains(_6.items[j]))_4.add(_6.items[j])}}}}
    if(this.forceFill&&this.getVisibleHeight()<=this.getHeight()){var _8=this.getMemberNumber(this.getSectionHeader(_1[0]));var _9;var _10=false;for(var i=_8-1;i>=0;i--){var _11=this.members[i];if(_4.contains(_11))continue;if(this.memberIsDragResizeable(_11)){if(this.memberHasAutoResizeableHeight(_11)){_10=true;break}else if(_9==null){_9=_11}}}
    if(!_10){for(var i=_8+1;i<this.members.length;i++){var _11=this.members[i];if(_4.contains(_11))continue;if(this.memberIsDragResizeable(_11)){if(this.memberHasAutoResizeableHeight(_11)){_10=true;break}else if(_9==null){_9=_11}}}}
    if(!_10&&_9!=null){_9.$po=null}}
    this.hideMembers(_4)}});
    } else if (window.isc) {
      isc.Log.logWarn("Patch for SmartClient 5.71 included in this application. " +
                "'. This patch is not compatible with this build and will have no effect. " +
                "It should be removed from your application source.");
    
    }
Working...
X