@@ -97,17 +97,13 @@ define([
9797 logger . error ( this . id + "Widget configuration error; Bootstrap RTE: Max size is smaller the Min Size" ) ;
9898 }
9999 } ,
100-
101- _strReadOnly : function ( ) {
100+
101+ _strReadOnly : function ( ) {
102102 return this . _contextObj . isReadonlyAttr && this . _contextObj . isReadonlyAttr ( this . attribute ) ;
103103 } ,
104104
105105 update : function ( obj , callback ) {
106106
107- if ( this . readOnly || this . get ( "disabled" ) || this . readonly || this . _strReadOnly ( ) ) {
108- this . _readOnly = true ;
109- }
110-
111107 if ( ! this . _setup ) {
112108 this . _setupWidget ( lang . hitch ( this , this . update , obj , callback ) ) ;
113109 return ;
@@ -116,10 +112,14 @@ define([
116112 logger . debug ( this . id + ".update" ) ;
117113
118114 if ( obj ) {
119- this . _mxObj = obj ;
115+ this . _contextObj = obj ;
116+
117+ if ( this . readOnly || this . get ( "disabled" ) || this . readonly || this . _strReadOnly ( ) ) {
118+ this . _readOnly = true ;
119+ }
120120
121121 // set the content on update
122- domHtml . set ( this . inputNode , this . _mxObj . get ( this . attribute ) ) ;
122+ domHtml . set ( this . inputNode , this . _contextObj . get ( this . attribute ) ) ;
123123 this . _resetSubscriptions ( ) ;
124124 } else {
125125 // Sorry no data no show!
@@ -190,21 +190,21 @@ define([
190190
191191 this . unsubscribeAll ( ) ;
192192
193- if ( this . _mxObj ) {
193+ if ( this . _contextObj ) {
194194 this . subscribe ( {
195- guid : this . _mxObj . getGuid ( ) ,
195+ guid : this . _contextObj . getGuid ( ) ,
196196 callback : lang . hitch ( this , this . _loadData )
197197 } ) ;
198198
199199 // This doesn't work yet
200200 // this.subscribe({
201- // guid: this._mxObj .getGuid(),
201+ // guid: this._contextObj .getGuid(),
202202 // attr: this.attribute,
203203 // callback: lang.hitch(this, this._loadData)
204204 // });
205205
206206 this . subscribe ( {
207- guid : this . _mxObj . getGuid ( ) ,
207+ guid : this . _contextObj . getGuid ( ) ,
208208 val : true ,
209209 callback : lang . hitch ( this , this . _handleValidation )
210210 } ) ;
@@ -229,7 +229,7 @@ define([
229229
230230 _loadData : function ( ) {
231231 logger . debug ( this . id + "._loadData" ) ;
232- domHtml . set ( this . inputNode , this . _mxObj . get ( this . attribute ) ) ;
232+ domHtml . set ( this . inputNode , this . _contextObj . get ( this . attribute ) ) ;
233233 } ,
234234
235235 _createToolbar : function ( ) {
@@ -308,16 +308,16 @@ define([
308308 _fetchContent : function ( ) {
309309 logger . debug ( this . id + "._fetchContent" ) ;
310310 var text = $ ( this . inputNode ) . html ( ) ,
311- _valueChanged = ( this . _mxObj && this . _mxObj . get ( this . attribute ) !== text ) ;
311+ _valueChanged = ( this . _contextObj && this . _contextObj . get ( this . attribute ) !== text ) ;
312312
313- this . _mxObj . set ( this . attribute , text ) ;
313+ this . _contextObj . set ( this . attribute , text ) ;
314314
315315 if ( _valueChanged ) {
316316 this . _clearValidations ( ) ;
317317 }
318318
319319 if ( _valueChanged && this . onchangeMF !== "" ) {
320- this . _execMF ( this . _mxObj , this . onchangeMF ) ;
320+ this . _execMF ( this . _contextObj , this . onchangeMF ) ;
321321 }
322322
323323 } ,
0 commit comments