Announcement

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

    SmartClient 5.7.1 Patch for Relative Positioning

    Some versions of the 5.7.1 build have broken relative positioning (caused by an error in the system that prepares user-specific builds on the website)

    This has now been corrected. If you have a broken copy, you can apply this patch or download again.

    Code:
    //----------------------------------------------------------------------------
    // Isomorphic SmartClient v5.71 patch
    // Purpose: Resolves a case where Canvases with position set to "relative" would not appear
    // relatively positioned in the 5.71 build.
    // 
    // Applies to SmartClient version 5.71 only
    //----------------------------------------------------------------------------
    
    if (window.isc && isc.version.startsWith("5.7.1/")){ 
    
    isc.Canvas.addMethods({
    init:function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13){var _14;if(isc.$cv)arguments.$cw=this;this.ns.ClassFactory.addGlobalID(this);this._canvasList(true);
    if (this.position == null) {
    this.position = this.htmlElement != null ? isc.Canvas.RELATIVE : isc.Canvas.ABSOLUTE;
    }
    if(this.className!=null&&this.logIsInfoEnabled(this.$pj)){this.logInfo("'className' property specified. This property has been deprecated in "+"favor of 'styleName' as of SmartClient 5.5.",this.$pj)}
    if(this.styleName!=null){if(this.className!=null){var _15=this.getPrototype(),_16=(this.styleName!=_15.styleName),_17=(this.className!=_15.className);if(_16)this.className=this.styleName;else if(_17)this.styleName=this.className;else this.styleName=this.className}else{this.className=this.styleName}}else if(this.className!=null){this.styleName=this.className}
    if(this.size!=null)this.height=this.width=this.size;this.$pn=this.width;this.$po=this.height;if(this.width==null)this.width=this.defaultWidth;if(this.height==null)this.height=this.defaultHeight;this.$o8=this.height;if(isc.isA.String(this.margin)&&this.margin.contains(isc.px))
    this.margin=parseInt(this.margin);if(isc.isA.String(this.padding)&&this.padding.contains(isc.px))
    this.padding=parseInt(this.padding);this.$pp=true;this.resizeTo(this.width,this.$o8);this.moveTo(this.left,this.top);this.$pp=null;if(this.children&&!isc.isAn.Array(this.children))this.children=[this.children];if(this.peers&&!isc.isAn.Array(this.peers))this.peers=[this.peers];if(this.enabled!=this.$nr){this.logWarn("Widget initialized with explicitly specified 'enabled' property. "+"This property has been deprecated - use 'disabled' instead.");this.disabled=!this.enabled}
    if(this.redrawOnEnable!=null){this.logWarn("Widget initialized with deprcated 'redrawOnEnable' - use 'redrawOnDisable' instead.");this.redrawOnDisable=this.redrawOnEnable}
    this.initWidget(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13);this.$pq();if(this.showShadow)this.$pr();if(this.clipCorners)this.$ps();if(this.useBackMask&&((isc.Browser.isIE&&isc.Browser.minorVersion>=5.5)||(isc.Canvas.useMozBackMasks&&isc.Browser.isMoz))){this.makeBackMask();this._backMask.setZIndex(this.getZIndex(true)-2)}
    if(this.children)this.children.setProperty(this.$n5,false);if(this.peers)this.peers.setProperty(this.$n5,false);if(this.observes){var _18,_19,_20=this.observes,_21=_20.length;for(var i=0;i<_21;i++){var _18=_20[i];if(!_18)continue;if(isc.isA.String(_18.source))_19=this.getGlobalReference(_18.source);else _19=_18.source;if(_19){this.observe(_19,_18.message,_18.action)}}}
    this.$pt();if(this.autoChildren)this.addAutoChildren(this.autoChildren);if(this._adjacentHandle&&!this.drawContext){this.drawContext={element:this._adjacentHandle}}
    if(this.htmlElement){var _23=this.htmlElement;delete this.htmlElement;this.setHtmlElement(_23)}
    if(this.eventProxy!=null){if(!isc.isA.Canvas(this.eventProxy)){this.logWarn("Canvas ID:'"+this.getID()+"' initialized with bad eventProxy. "+"This property should be set to another Canvas instance. Clearing this property.")
    delete this.eventProxy}else{if(this.eventProxy.$kt==null)this.eventProxy.$kt=[];this.eventProxy.$kt.add(this)}}
    var _24=this.parentElement;if(_24){this.parentElement=null;if(isc.isA.String(_24))_24=window[_24];_24.addChild(this)}
    if(this.autoDraw&&!this.parentElement&&!isc.noAutoDraw){if(isc.Browser.isSafari&&isc.deferAutoDraw&&!isc.Page.isLoaded()&&this.position!="relative")
    {isc.Page.setEvent("load",this.getID()+".draw()")}else{this.draw()}}}
    
    });
    
    } else if (window.isc) {
      isc.Log.logWarn("Patch for SmartClient 5.71 included in this application. " +
                "You are currently running SmartClient verion '"+ isc.version + 
                "'. This patch is not compatible with this build and will have no effect. " +
                "It should be removed from your application source.");
    }
Working...
X