@@ -113,6 +113,11 @@ HG.WebApp.InitializePage = function ()
113113 HG . WebApp . Locales . Localize ( document , './locales/' + userLang . toLowerCase ( ) . substring ( 0 , 2 ) + '.json' , function ( success ) {
114114 HG . WebApp . Locales . Localize ( document , './locales/' + userLang . toLowerCase ( ) . substring ( 0 , 2 ) + '.programs.json' , function ( success ) {
115115 $ ( '#homegenie_overlay' ) . fadeOut ( 200 ) ;
116+ // Show about popup
117+ if ( ! dataStore . get ( 'UI.AboutPopupShown' ) ) {
118+ dataStore . set ( 'UI.AboutPopupShown' , true ) ;
119+ setTimeout ( HG . WebApp . Home . About , 3000 ) ;
120+ }
116121 } ) ;
117122 } ) ;
118123 HG . VoiceControl . Initialize ( ) ;
@@ -224,9 +229,16 @@ HG.WebApp.InitializePage = function ()
224229 element . enhanceWithin ( ) . popup ( ) ;
225230 HG . Ui . Popup . CronWizard = handler ;
226231 } ) ;
232+
233+ $ ( '#homegenie_about' ) . enhanceWithin ( ) . popup ( ) ;
234+ $ ( '#about_popup_updatebutton' ) . on ( 'click' , function ( ) {
235+ HG . System . UpdateManager . UpdateCheck ( ) ;
236+ $ ( '#homegenie_about' ) . popup ( 'close' ) ;
237+ } ) ;
227238} ;
228239
229240
241+
230242//
231243// namespace : HG.WebApp.Events
232244// info : -
@@ -298,6 +310,11 @@ HG.WebApp.InitializePage = function ()
298310// info : -
299311//
300312HG . WebApp . Home = HG . WebApp . Home || { } ;
313+ HG . WebApp . Home . About = function ( )
314+ {
315+ $ ( '#homegenie_about' ) . popup ( 'open' ) ;
316+ } ;
317+ //
301318HG . WebApp . Home . UpdateHeaderStatus = function ( )
302319{
303320 HG . WebApp . Home . UpdateInterfacesStatus ( ) ;
@@ -572,6 +589,17 @@ HG.WebApp.Utility.GetCommandFromEvent = function (module, event)
572589 return commandobj ;
573590} ;
574591
592+ HG . WebApp . Utility . GetLocaleTemperature = function ( temp ) {
593+ var temperatureUnit = dataStore . get ( 'UI.TemperatureUnit' ) ;
594+ if ( temperatureUnit != 'C' && ( temperatureUnit == 'F' || HG . WebApp . Locales . GetDateEndianType ( ) == 'M' ) ) {
595+ // display as Fahrenheit
596+ temp = Math . round ( ( temp * 1.8 + 32 ) * 10 ) / 10 ;
597+ } else {
598+ // display as Celsius
599+ temp = Math . round ( temp * 10 ) / 10 ;
600+ }
601+ return ( temp * 1 ) . toFixed ( 2 ) ;
602+ } ;
575603HG . WebApp . Utility . FormatTemperature = function ( temp ) {
576604 var displayvalue = '' ;
577605 var temperatureUnit = dataStore . get ( 'UI.TemperatureUnit' ) ;
0 commit comments