2014-03-12 14:52:47 +01:00
/ *
Jappix - An open social platform
These are the homepage JS scripts for Jappix
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
License : AGPL
Authors : Valérian Saliou , LinkMauve
* /
// Bundle
var Home = ( function ( ) {
/ * *
* Alias of this
* @ private
* /
var self = { } ;
2014-11-25 20:12:58 +01:00
/ * *
* Apply change events
* @ private
* @ param { object } current _sel
* @ param { string } div
* @ return { undefined }
* /
self . _eventsChange = function ( current _sel , div ) {
try {
// Create the attached events
switch ( div ) {
// Login tool
case 'loginer' :
current _sel . find ( 'a.to-anonymous' ) . click ( function ( ) {
return self . change ( 'anonymouser' ) ;
} ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
current _sel . find ( 'a.advanced' ) . click ( self . showAdvanced ) ;
current _sel . find ( 'form' ) . submit ( self . loginForm ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
break ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
// Anonymous login tool
case 'anonymouser' :
current _sel . find ( 'a.to-home' ) . click ( function ( ) {
return self . change ( 'loginer' ) ;
} ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
current _sel . find ( 'form' ) . submit ( Connection . doAnonymous ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
// Keyup event on anonymous join's room input
current _sel . find ( 'input.room' ) . keyup ( function ( ) {
var value = $ ( this ) . val ( ) ;
var report _sel = current _sel . find ( '.report' ) ;
var span _sel = current _sel . find ( 'span' ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
if ( ! value ) {
report _sel . hide ( ) ;
span _sel . text ( '' ) ;
} else {
report _sel . show ( ) ;
span _sel . text ( JAPPIX _LOCATION + '?r=' + value ) ;
}
} ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
break ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
// Register tool
case 'registerer' :
// Server input change
$ ( '#home input.server' ) . keyup ( function ( e ) {
if ( $ . trim ( $ ( this ) . val ( ) ) == HOST _MAIN ) {
$ ( '#home .captcha_grp' ) . show ( ) ;
$ ( '#home input.captcha' ) . removeAttr ( 'disabled' ) ;
} else {
$ ( '#home .captcha_grp' ) . hide ( ) ;
$ ( '#home input.captcha' ) . attr ( 'disabled' , true ) ;
}
} ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
// Register input placeholder
// FIXME: breaks IE compatibility
//$('#home input[placeholder]').placeholder();
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
// Register form submit
current _sel . find ( 'form' ) . submit ( self . registerForm ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
break ;
}
} catch ( e ) {
Console . error ( 'Home._eventsChange' , e ) ;
}
} ;
/ * *
* Create obsolete form
* @ private
* @ param { string } home
* @ param { string } locale
* @ return { undefined }
* /
self . _obsolete = function ( home , locale ) {
try {
// Add the code
$ ( locale ) . after (
2014-11-25 23:42:38 +01:00
'<div class="obsolete">' +
'<p>' + Common . _e ( "Your browser is out of date!" ) + '</p>' +
'<a class="firefox browsers-images" title="' + Common . printf ( Common . _e ( "Last %s version is better!" ) , 'Mozilla Firefox' ) + '" href="http://www.mozilla.com/firefox/"></a>' +
'<a class="chrome browsers-images" title="' + Common . printf ( Common . _e ( "Last %s version is better!" ) , 'Google Chrome' ) + '" href="http://www.google.com/chrome"></a>' +
'<a class="safari browsers-images" title="' + Common . printf ( Common . _e ( "Last %s version is better!" ) , 'Safari' ) + '" href="http://www.apple.com/safari/"></a>' +
'<a class="opera browsers-images" title="' + Common . printf ( Common . _e ( "Last %s version is better!" ) , 'Opera' ) + '" href="http://www.opera.com/"></a>' +
'<a class="ie browsers-images" title="' + Common . printf ( Common . _e ( "Last %s version is better!" ) , 'Internet Explorer' ) + '" href="http://www.microsoft.com/hk/windows/internet-explorer/"></a>' +
2014-11-25 20:12:58 +01:00
'</div>'
) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
// Display it later
$ ( home + '.obsolete' ) . oneTime ( '1s' , function ( ) {
$ ( this ) . slideDown ( ) ;
} ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
Console . warn ( 'Jappix does not support this browser!' ) ;
} catch ( e ) {
Console . error ( 'Home._obsolete' , e ) ;
}
} ;
2014-04-08 20:14:28 +02:00
/ * *
2014-03-12 14:52:47 +01:00
* Allows the user to switch the difference home page elements
* @ public
* @ param { string } div
* @ return { boolean }
* /
self . change = function ( div ) {
try {
// Path to
var home = '#home .' ;
var right = home + 'right ' ;
var current = right + '.homediv.' + div ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// We switch the div
$ ( right + '.homediv, ' + right + '.top' ) . hide ( ) ;
$ ( right + '.' + div ) . show ( ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// We reset the homedivs
$ ( home + 'homediv:not(.default), ' + home + 'top:not(.default)' ) . remove ( ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Get the HTML code to display
var disable _form = '' ;
var lock _host = '' ;
var code = '' ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Apply the previous link
switch ( div ) {
case 'loginer' :
case 'anonymouser' :
case 'registerer' :
if ( ! Common . exists ( right + '.top.sub' ) ) {
// Append the HTML code for previous link
$ ( right + '.top.default' ) . after ( '<h1 class="top sub loginer anonymouser registerer">« <a href="#" class="previous">' + Common . _e ( "Previous" ) + '</a></h1>' ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Click event on previous link
$ ( home + 'top.sub a.previous' ) . click ( function ( ) {
return self . change ( 'default' ) ;
} ) ;
}
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
break ;
}
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Apply the form
switch ( div ) {
// Login tool
case 'loginer' :
lock _host = Utils . disableInput ( LOCK _HOST , 'on' ) ;
2014-11-25 23:42:38 +01:00
code = '<p>' + Common . printf ( Common . _e ( "Login to your existing XMPP account. You can also use the %s to join a groupchat." ) , '<a href="#" class="to-anonymous">' + Common . _e ( "anonymous mode" ) + '</a>' ) + '</p>' +
'<form action="#" method="post">' +
'<fieldset>' +
'<legend>' + Common . _e ( "Required" ) + '</legend>' +
'<label for="lnick">' + Common . _e ( "Address" ) + '</label>' +
'<input type="text" class="nick" id="lnick" pattern="[^@/]+" required="" /><span class="jid">@</span><input type="text" class="server" id="lserver" value="' + HOST _MAIN + '" ' + lock _host + ' pattern="[^@/]+" required="" list="server" />' +
'<label for="lpassword">' + Common . _e ( "Password" ) + '</label>' +
'<input type="password" class="password" id="lpassword" required="" />' +
'<label for="lremember">' + Common . _e ( "Remember me" ) + '</label>' +
'<input type="checkbox" class="remember" id="lremember" />' +
'</fieldset>' +
'<a href="#" class="advanced home-images">' + Common . _e ( "Advanced" ) + '</a>' +
'<fieldset class="advanced">' +
'<legend>' + Common . _e ( "Advanced" ) + '</legend>' +
'<label for="lresource">' + Common . _e ( "Resource" ) + '</label>' +
'<input type="text" class="resource" id="lresource" value="' + JAPPIX _RESOURCE + '" />' +
'<label for="lpriority">' + Common . _e ( "Priority" ) + '</label>' +
'<select class="priority" id="lpriority">' +
'<option value="1">' + Common . _e ( "Low" ) + '</option>' +
'<option value="10" selected="">' + Common . _e ( "Medium" ) + '</option>' +
'<option value="100">' + Common . _e ( "High" ) + '</option>' +
'</select>' +
'</fieldset>' +
'<div class="submit">' +
'<input type="submit" value="' + Common . _e ( "Here we go!" ) + '" />' +
'<div class="clear"></div>' +
'</div>' +
2014-03-12 14:52:47 +01:00
'</form>' ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
break ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Anonymous login tool
case 'anonymouser' :
disable _form = Utils . disableInput ( ANONYMOUS , 'off' ) ;
code = '<p>' + Common . printf ( Common . _e ( "Enter the groupchat you want to join and the nick you want to have. You can also go back to the %s." ) , '<a href="#" class="to-home">' + Common . _e ( "login page" ) + '</a>' ) + '</p>' ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
if ( LEGAL ) {
2014-03-12 14:52:47 +01:00
code += '<p>' + Common . printf ( Common . _e ( "By using our service, you accept %s." ) , '<b><a href="' + Common . encodeQuotes ( LEGAL ) + '" target="_blank">' + Common . _e ( "our terms of use" ) + '</a></b>' ) + '</p>' ;
2014-11-25 20:12:58 +01:00
}
2014-11-25 23:42:38 +01:00
code += '<form action="#" method="post">' +
'<fieldset>' +
'<legend>' + Common . _e ( "Required" ) + '</legend>' +
'<label>' + Common . _e ( "Room" ) + '</label>' +
'<input type="text" class="room"' + disable _form + ' pattern="[^/]+" required="" />' +
'<label>' + Common . _e ( "Nickname" ) + '</label>' +
'<input type="text" class="nick"' + disable _form + ' required="" />' +
'</fieldset>' +
'<input type="submit" value="' + Common . _e ( "Here we go!" ) + '"' + disable _form + ' />' +
'</form>' +
'<div class="info report">' +
Common . _e ( "Share this link with your friends:" ) + ' <span></span>' +
2014-03-12 14:52:47 +01:00
'</div>' ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
break ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Register tool
case 'registerer' :
disable _form = Utils . disableInput ( REGISTRATION , 'off' ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
if ( ! disable _form ) {
2014-03-12 14:52:47 +01:00
lock _host = Utils . disableInput ( LOCK _HOST , 'on' ) ;
2014-11-25 20:12:58 +01:00
}
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
code = '<p>' + Common . _e ( "Register a new XMPP account to join your friends on your own social cloud. That's simple!" ) + '</p>' ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
if ( LEGAL ) {
2014-03-12 14:52:47 +01:00
code += '<p>' + Common . printf ( Common . _e ( "By using our service, you accept %s." ) , '<b><a href="' + Common . encodeQuotes ( LEGAL ) + '" target="_blank">' + Common . _e ( "our terms of use" ) + '</a></b>' ) + '</p>' ;
2014-11-25 20:12:58 +01:00
}
2014-11-25 23:42:38 +01:00
code += '<form action="#" method="post">' +
'<fieldset>' +
'<legend>' + Common . _e ( "Required" ) + '</legend>' +
'<label for="rnick">' + Common . _e ( "Address" ) + '</label>' +
'<input type="text" class="nick" id="rnick" ' + disable _form + ' pattern="[^@/]+" required="" placeholder="' + Common . _e ( "Username" ) + '" /><span class="jid">@</span><input type="text" class="server" id="rserver" value="' + HOST _MAIN + '" ' + disable _form + lock _host + ' pattern="[^@/]+" required="" list="server" placeholder="' + Common . _e ( "Server" ) + '" />' +
'<label for="rpassword">' + Common . _e ( "Password" ) + '</label>' +
2014-03-12 14:52:47 +01:00
'<input type="password" class="password" id="rpassword" ' + disable _form + ' required="" placeholder="' + Common . _e ( "Enter password" ) + '" /><input type="password" class="spassword" id="spassword" ' + disable _form + ' required="" placeholder="' + Common . _e ( "Once again..." ) + '" />' ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
if ( REGISTER _API == 'on' ) {
2014-11-25 23:42:38 +01:00
code += '<div class="captcha_grp">' +
'<label for="captcha">' + Common . _e ( "Code" ) + '</label><input type="text" class="captcha" id="captcha" ' + disable _form + ' maxlength="6" pattern="[a-zA-Z0-9]{6}" required="" placeholder="' + Common . _e ( "Security code" ) + '" /><img class="captcha_img" src="./server/captcha.php?id=' + genID ( ) + '" alt="" />' +
2014-03-12 14:52:47 +01:00
'</div>' ;
2014-11-25 20:12:58 +01:00
}
2014-11-25 23:42:38 +01:00
code += '</fieldset>' +
'<input type="submit" value="' + Common . _e ( "Here we go!" ) + '" ' + disable _form + '/>' +
2014-03-12 14:52:47 +01:00
'</form>' ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
break ;
}
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Form disabled?
2014-11-25 20:12:58 +01:00
if ( disable _form ) {
2014-11-25 23:42:38 +01:00
code += '<div class="info fail">' +
Common . _e ( "This tool has been disabled!" ) +
2014-03-12 14:52:47 +01:00
'</div>' ;
2014-11-25 20:12:58 +01:00
}
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Create this HTML code
if ( code && ! Common . exists ( current ) ) {
2014-11-25 20:12:58 +01:00
$ ( right + '.homediv.default' ) . after (
'<div class="' + div + ' homediv">' + code + '</div>'
) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
self . _eventsChange (
$ ( current ) ,
div
) ;
2014-03-12 14:52:47 +01:00
}
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// We focus on the first input
$ ( document ) . oneTime ( 10 , function ( ) {
$ ( right + 'input:visible:first' ) . focus ( ) ;
} ) ;
} catch ( e ) {
Console . error ( 'Home.change' , e ) ;
} finally {
return false ;
}
} ;
/ * *
* Allows the user to display the advanced login options
* @ public
* @ return { boolean }
* /
self . showAdvanced = function ( ) {
try {
// Hide the link
$ ( '#home a.advanced' ) . hide ( ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Show the fieldset
$ ( '#home fieldset.advanced' ) . show ( ) ;
} catch ( e ) {
Console . error ( 'Home.showAdvanced' , e ) ;
} finally {
return false ;
}
} ;
/ * *
* Reads the login form values
* @ public
* @ return { boolean }
* /
self . loginForm = function ( ) {
try {
// We get the values
2014-11-25 20:12:58 +01:00
var path _sel = $ ( '#home .loginer' ) ;
var lServer = path _sel . find ( '.server' ) . val ( ) ;
var lNick = Common . nodeprep ( path _sel . find ( '.nick' ) . val ( ) ) ;
var lPass = path _sel . find ( '.password' ) . val ( ) ;
var lResource = path _sel . find ( '.resource' ) . val ( ) ;
var lPriority = path _sel . find ( '.priority' ) . val ( ) ;
var lRemember = path _sel . find ( '.remember' ) . filter ( ':checked' ) . size ( ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Enough values?
if ( lServer && lNick && lPass && lResource && lPriority ) {
Connection . doLogin ( lNick , lServer , lPass , lResource , lPriority , lRemember ) ;
} else {
$ ( lPath + 'input[type="text"], ' + lPath + 'input[type="password"]' ) . each ( function ( ) {
var select = $ ( this ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
if ( ! select . val ( ) ) {
2014-03-12 14:52:47 +01:00
$ ( document ) . oneTime ( 10 , function ( ) {
select . addClass ( 'please-complete' ) . focus ( ) ;
} ) ;
2014-11-25 20:12:58 +01:00
} else {
2014-11-25 23:42:38 +01:00
select . removeClass ( 'please-complete' ) ;
2014-11-25 20:12:58 +01:00
}
2014-03-12 14:52:47 +01:00
} ) ;
}
} catch ( e ) {
Console . error ( 'Home.loginForm' , e ) ;
} finally {
return false ;
}
} ;
/ * *
* Reads the register form values
* @ public
* @ return { boolean }
* /
self . registerForm = function ( ) {
try {
2014-11-25 20:12:58 +01:00
var path = '#home .registerer' ;
var path _sel = $ ( path ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Remove the success info
2014-11-25 20:12:58 +01:00
path _sel . find ( '.success' ) . remove ( ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Get the values
2014-11-25 20:12:58 +01:00
var username = Common . nodeprep ( path _sel . find ( '.nick' ) . val ( ) ) ;
var domain = path _sel . find ( '.server' ) . val ( ) ;
var pass = path _sel . find ( '.password' ) . val ( ) ;
var spass = path _sel . find ( '.spassword' ) . val ( ) ;
var captcha = path _sel . find ( '.captcha' ) . val ( ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Enough values?
if ( domain && username && pass && spass && ( pass == spass ) && ! ( ( REGISTER _API == 'on' ) && ( domain == HOST _MAIN ) && ! captcha ) ) {
// We remove the not completed class to avoid problems
$ ( '#home .registerer input' ) . removeClass ( 'please-complete' ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Fire the register event!
Connection . doRegister ( username , domain , pass , captcha ) ;
}
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Something is missing?
else {
2014-11-25 20:12:58 +01:00
$ ( path + ' input[type="text"], ' + path + ' input[type="password"]' ) . each ( function ( ) {
2014-03-12 14:52:47 +01:00
var select = $ ( this ) ;
2014-11-25 23:42:38 +01:00
2014-11-25 20:12:58 +01:00
if ( ! select . val ( ) || ( select . is ( '#spassword' ) && pass && ( pass != spass ) ) ) {
2014-03-12 14:52:47 +01:00
$ ( document ) . oneTime ( 10 , function ( ) {
select . addClass ( 'please-complete' ) . focus ( ) ;
} ) ;
2014-11-25 20:12:58 +01:00
} else {
2014-11-25 23:42:38 +01:00
select . removeClass ( 'please-complete' ) ;
2014-11-25 20:12:58 +01:00
}
2014-03-12 14:52:47 +01:00
} ) ;
}
} catch ( e ) {
Console . error ( 'Home.registerForm' , e ) ;
} finally {
return false ;
}
} ;
/ * *
* Plugin launcher
* @ public
* @ param { type } name
* @ return { undefined }
* /
self . launch = function ( ) {
try {
$ ( document ) . ready ( function ( ) {
// Define the vars
var home = '#home ' ;
var button = home + 'button' ;
var corp = home + '.corporation' ;
var aboutus = home + '.aboutus' ;
var locale = home + '.locale' ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Removes the <noscript /> elements to lighten the DOM
$ ( 'noscript' ) . remove ( ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Allows the user to switch the home page
$ ( button ) . click ( function ( ) {
// Login button
2014-11-25 20:12:58 +01:00
if ( $ ( this ) . is ( '.login' ) ) {
2014-03-12 14:52:47 +01:00
return self . change ( 'loginer' ) ;
2014-11-25 20:12:58 +01:00
}
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Register button
2014-11-25 20:12:58 +01:00
else {
2014-03-12 14:52:47 +01:00
return self . change ( 'registerer' ) ;
2014-11-25 20:12:58 +01:00
}
2014-03-12 14:52:47 +01:00
} ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Allows the user to view the corporation & about infobox
$ ( corp + ', ' + aboutus ) . hover ( function ( ) {
$ ( this ) . addClass ( 'hovered' ) ;
} , function ( ) {
$ ( this ) . removeClass ( 'hovered' ) ;
} ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Allows the user to switch the language
$ ( locale ) . hover ( function ( ) {
// Initialize the HTML code
var keepget = $ ( locale ) . attr ( 'data-keepget' ) ;
var html = '<div class="list">' ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Generate each locale HTML code
for ( var i in LOCALES _AVAILABLE _ID ) {
html += '<a href="./?l=' + LOCALES _AVAILABLE _ID [ i ] + keepget + '">' + LOCALES _AVAILABLE _NAMES [ i ] . htmlEnc ( ) + '</a>' ;
}
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
html += '</div>' ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Append the HTML code
$ ( locale ) . append ( html ) ;
} , function ( ) {
$ ( locale + ' .list' ) . remove ( ) ;
} ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Disables the browser HTTP-requests stopper
$ ( document ) . keydown ( function ( e ) {
2014-11-25 20:12:58 +01:00
if ( ( e . keyCode == 27 ) && ! System . isDeveloper ( ) ) {
2014-03-12 14:52:47 +01:00
return false ;
2014-11-25 20:12:58 +01:00
}
2014-03-12 14:52:47 +01:00
} ) ;
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
// Warns for an obsolete browser
if ( Utils . isObsolete ( ) ) {
2014-11-25 20:12:58 +01:00
self . _obsolete ( ) ;
2014-03-12 14:52:47 +01:00
}
2014-11-25 23:42:38 +01:00
2014-03-12 14:52:47 +01:00
Console . log ( 'Welcome to Jappix! Happy coding in developer mode!' ) ;
} ) ;
} catch ( e ) {
Console . error ( 'Home.launch' , e ) ;
}
} ;
/ * *
* Return class scope
* /
return self ;
} ) ( ) ;
2014-11-25 20:12:58 +01:00
Home . launch ( ) ;