Georg Fischer 3ec6a6b64e add russian translation, translate share strings, add share to
vkontakte and update styles to account for longer texts
2016-01-13 14:32:49 +01:00

37 lines
872 B
JavaScript

/*global define*/
define(
[ 'util/el', 'util/localizetext' ],
function ( elHelper, loc ) {
// the app view, wrapping element of the app
// also updates the html element classes
function AppView ( parentEl ) {
if ( ! ( this instanceof AppView ) ) {
return new AppView( parentEl );
}
var self = this;
var el = elHelper.createEl( 'div', 'app', parentEl );
loc( document.title, 'textContent', 'index.title' );
loc( document.documentElement, 'lang', 'lang' );
function showOnlineOptions () {
document.documentElement.classList.add( 'is-online' );
return self;
}
function hideOnlineOptions () {
document.documentElement.classList.remove( 'is-online' );
return self;
}
self.el = el;
self.showOnlineOptions = showOnlineOptions;
self.hideOnlineOptions = hideOnlineOptions;
}
return AppView;
}
);