@@ -129,27 +129,28 @@ qx.Class.define("osparc.MaintenanceTracker", {
129129 }
130130 } ,
131131
132+ __messageToRibbon : function ( closable ) {
133+ this . __removeRibbonMessage ( ) ;
134+ const text = this . __getText ( ) ;
135+ const notification = new osparc . notification . RibbonNotification ( text , "maintenance" , closable ) ;
136+ osparc . notification . RibbonNotifications . getInstance ( ) . addNotification ( notification ) ;
137+ this . __lastRibbonMessage = notification ;
138+ } ,
139+
132140 __scheduleRibbonMessage : function ( ) {
133141 const now = new Date ( ) ;
134142 const diffClosable = this . getStart ( ) . getTime ( ) - now . getTime ( ) - this . self ( ) . CLOSABLE_WARN_IN_ADVANCE ;
135143 const diffPermanent = this . getStart ( ) . getTime ( ) - now . getTime ( ) - this . self ( ) . PERMANENT_WARN_IN_ADVANCE ;
136144
137- const messageToRibbon = closable => {
138- this . __removeRibbonMessage ( ) ;
139- const text = this . __getText ( ) ;
140- const notification = new osparc . notification . RibbonNotification ( text , "maintenance" , closable ) ;
141- osparc . notification . RibbonNotifications . getInstance ( ) . addNotification ( notification ) ;
142- this . __lastRibbonMessage = notification ;
143- } ;
144145 if ( diffClosable < 0 ) {
145- messageToRibbon ( true ) ;
146+ this . __messageToRibbon ( true ) ;
146147 } else {
147- setTimeout ( ( ) => messageToRibbon ( true ) , diffClosable ) ;
148+ setTimeout ( ( ) => this . __messageToRibbon ( true ) , diffClosable ) ;
148149 }
149150 if ( diffPermanent < 0 ) {
150- messageToRibbon ( false ) ;
151+ this . __messageToRibbon ( false ) ;
151152 } else {
152- setTimeout ( ( ) => messageToRibbon ( false ) , diffPermanent ) ;
153+ setTimeout ( ( ) => this . __messageToRibbon ( false ) , diffPermanent ) ;
153154 }
154155 } ,
155156
0 commit comments