Make product name driven from config in the console

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135399007
This commit is contained in:
mmuller 2016-10-06 13:41:24 -07:00 committed by Ben McIlwain
parent 74369b69be
commit 129cbe8103
6 changed files with 42 additions and 21 deletions

View file

@ -40,11 +40,12 @@ goog.forwardDeclare('registry.Component');
* The Registrar Console.
* @param {string} xsrfToken Populated by server-side soy template.
* @param {string} clientId The logged in GAE user.
* @param {string} productName The software name displayed on the UI.
* @constructor
* @extends {registry.Console}
* @final
*/
registry.registrar.Console = function(xsrfToken, clientId) {
registry.registrar.Console = function(xsrfToken, clientId, productName) {
registry.registrar.Console.base(
this, 'constructor',
new registry.registrar.EppSession(this, xsrfToken, clientId));
@ -66,6 +67,11 @@ registry.registrar.Console = function(xsrfToken, clientId) {
*/
this.xsrfToken_ = xsrfToken;
/**
* @type {string}
*/
this.productName = productName;
/**
* Last active nav element.
* @type {Element}

View file

@ -54,7 +54,10 @@ registry.registrar.Dashboard.prototype.bindToDom = function(id) {
registry.registrar.Dashboard.base(this, 'bindToDom', '');
goog.dom.removeChildren(goog.dom.getRequiredElement('reg-appbar'));
goog.soy.renderElement(goog.dom.getElement('reg-content'),
registry.soy.registrar.console.dashboard);
registry.soy.registrar.console.dashboard,
{
productName: this.console.productName
});
goog.events.listen(goog.dom.getElement('rotate'),
goog.events.EventType.CLICK,
goog.bind(this.rotate_, this));

View file

@ -28,8 +28,9 @@ goog.require('registry.registrar.Console');
*
* @param {string} xsrfToken populated by server-side soy template.
* @param {string} clientId The registrar clientId.
* @param {string} productName the product name displayed by the UI.
* @export
*/
registry.registrar.main = function(xsrfToken, clientId) {
new registry.registrar.Console(xsrfToken, clientId);
registry.registrar.main = function(xsrfToken, clientId, productName) {
new registry.registrar.Console(xsrfToken, clientId, productName);
};