@@ -35,7 +35,6 @@ define([
3535 _constructed : false ,
3636
3737 postCreate : function ( ) {
38- mx . logger . debug ( this . id + ".postCreate :: 4.5.1" ) ;
3938 //set the variables:
4039 this . _tagEntity = this . tagAssoc . split ( "/" ) [ 1 ] ;
4140 this . _refAttribute = this . tagAssoc . split ( "/" ) [ 0 ] ;
@@ -47,7 +46,6 @@ define([
4746 } ,
4847
4948 update : function ( obj , callback ) {
50- mx . logger . debug ( this . id + ".update" ) ;
5149
5250 if ( ! this . _constructed ) {
5351 this . _listBox = domConstruct . create ( "ul" , {
@@ -68,7 +66,6 @@ define([
6866 } ,
6967
7068 _fetchCurrentLabels : function ( callback ) {
71- mx . logger . debug ( this . id + "._fetchCurrentLabels" ) ;
7269 //fetch all referenced labels
7370 var filters = {
7471 attributes : [ this . _tagAttribute ]
@@ -96,7 +93,6 @@ define([
9693 } ,
9794
9895 _processTags : function ( callback , objs ) {
99- mx . logger . debug ( this . id + "._processTags" ) ;
10096 var refObjs = this . _contextObj . get ( this . _refAttribute ) ,
10197 tagArray = [ ] ,
10298 currentTags = [ ] ;
@@ -121,7 +117,6 @@ define([
121117 } ,
122118
123119 _renderCurrentTags : function ( currentTags , callback ) {
124- mx . logger . debug ( this . id + "._renderCurrentTags" ) ;
125120 //we"re not using the plugin function "remove all" because we don"t want to remove references
126121 var items = this . _listBox . getElementsByTagName ( "li" ) ;
127122 while ( items . length > 0 ) {
@@ -150,18 +145,16 @@ define([
150145 } ,
151146
152147 _startTagger : function ( options ) {
153- mx . logger . debug ( this . id + "._startTagger" ) ;
154148 if ( options ) {
155149 $ ( "#" + this . id + "_ListBox" ) . tagit ( options ) ;
156150 } else {
157151 //fallback
158- mx . logger . warn ( "No options found, running defaults" ) ;
152+ console . warn ( "No options found, running defaults" ) ;
159153 $ ( "#" + this . id + "_ListBox" ) . tagit ( ) ;
160154 }
161155 } ,
162156
163157 _createTagobject : function ( value ) {
164- mx . logger . debug ( this . id + "._createTagobject" ) ;
165158 //create a new tag
166159 mx . data . create ( {
167160 entity : this . _tagEntity ,
@@ -179,19 +172,17 @@ define([
179172 if ( this . aftercreatemf ) {
180173 this . _execMf ( this . _contextObj , this . aftercreatemf ) ;
181174 } else {
182- console . log ( this . id + " - please add an after create mf to commit the object, otherwise ui is incorrectly displayed." ) ;
183175 }
184176 } )
185177 } , this ) ;
186178 } ) ,
187179 error : function ( e ) {
188- mx . logger . error ( "Error creating object: " + e ) ;
180+ console . error ( "Error creating object: " + e ) ;
189181 }
190182 } , this ) ;
191183 } ,
192184
193185 _execMf : function ( obj , mf , cb ) {
194- mx . logger . debug ( this . id + "._execMf : " , mf ) ;
195186 if ( obj && mf ) {
196187 mx . data . action ( {
197188 params : {
@@ -206,14 +197,13 @@ define([
206197 }
207198 } ,
208199 error : function ( e ) {
209- mx . logger . error ( "Error running Microflow: " + e ) ;
200+ console . error ( "Error running Microflow: " + e ) ;
210201 }
211202 } , this ) ;
212203 }
213204 } ,
214205
215206 _resetSubscriptions : function ( ) {
216- mx . logger . debug ( this . id + "._resetSubscriptions" ) ;
217207 this . unsubscribeAll ( ) ;
218208
219209 if ( this . _contextObj ) {
@@ -253,7 +243,6 @@ define([
253243 } ,
254244
255245 _isReference : function ( guid ) {
256- mx . logger . debug ( this . id + "._isReference" ) ;
257246 var isRef = false ,
258247 refs = this . _contextObj . getReferences ( this . _refAttribute ) ;
259248
@@ -268,10 +257,8 @@ define([
268257
269258 _saveObject : function ( ) {
270259 if ( ! this . saveOnAddTag ) {
271- mx . logger . debug ( this . id + "._saveObject skipped, save on add tags disabled" ) ;
272260 return ;
273261 }
274- mx . logger . debug ( this . id + "._saveObject" ) ;
275262 var method = ( ! mx . version || mx . version && parseInt ( mx . version . split ( "." ) [ 0 ] ) < 7 ) ? "save" : "commit" ;
276263 mx . data [ method ] ( {
277264 mxobj : this . _contextObj ,
@@ -282,7 +269,6 @@ define([
282269 } ,
283270
284271 _setOptions : function ( tagArray ) {
285- mx . logger . debug ( this . id + "._setOptions" ) ;
286272 //TODO: allow users to set options
287273 var options = {
288274 availableTags : tagArray ,
@@ -318,7 +304,7 @@ define([
318304 } else if ( this . enableCreate ) {
319305 this . _createTagobject ( ui . tagLabel ) ;
320306 } else {
321- mx . logger . warn ( "No Tag found for value: " + ui . tagLabel ) ;
307+ console . warn ( "No Tag found for value: " + ui . tagLabel ) ;
322308 }
323309 } ) ,
324310
@@ -330,15 +316,14 @@ define([
330316 this . _contextObj . removeReferences ( this . _refAttribute , [ tagObj . getGuid ( ) ] ) ;
331317 this . _saveObject ( ) ;
332318 } else {
333- mx . logger . warn ( "No Tag found for value: " + ui . tagLabel ) ;
319+ console . warn ( "No Tag found for value: " + ui . tagLabel ) ;
334320 }
335321 } )
336322 } ;
337323 this . _startTagger ( options ) ;
338324 } ,
339325
340326 _handleValidation : function ( validations ) {
341- mx . logger . debug ( this . id + "._handleValidation" ) ;
342327 this . _clearValidations ( ) ;
343328
344329 var val = validations [ 0 ] ,
@@ -355,12 +340,10 @@ define([
355340 } ,
356341
357342 _clearValidations : function ( ) {
358- mx . logger . debug ( this . id + "._clearValidations" ) ;
359343 domConstruct . destroy ( this . _alertdiv ) ;
360344 } ,
361345
362346 _addValidation : function ( msg ) {
363- mx . logger . debug ( this . id + "._addValidation" ) ;
364347 this . _alertdiv = domConstruct . create ( "div" , {
365348 "class" : "alert alert-danger" ,
366349 innerHTML : msg
@@ -370,7 +353,6 @@ define([
370353 } ,
371354
372355 _executeCallback : function ( cb , from ) {
373- mx . logger . debug ( this . id + "._executeCallback" + ( from ? " from " + from : "" ) ) ;
374356 if ( cb && typeof cb === "function" ) {
375357 cb ( ) ;
376358 }
0 commit comments