Explorar o código

HPCC-9647 Add custom page titles …

Remove the page title from "stub" to something more relevant to
that page / widget.

Signed-off by: Miguel Vazquez <miguel.vazquez@lexisnexis.com>
Miguel Vazquez %!s(int64=12) %!d(string=hai) anos
pai
achega
65bbb84ff7

+ 4 - 0
esp/files/scripts/ActivityWidget.js

@@ -59,6 +59,10 @@ define([
             this._refreshActionState();
             this._refreshActionState();
         },
         },
 
 
+        getTitle: function () {
+            return "Activity";
+        },
+
         createGrid: function (domID) {
         createGrid: function (domID) {
             var context = this;
             var context = this;
             var retVal = new declare([OnDemandGrid, Keyboard, Selection, ColumnResizer, DijitRegistry, ESPUtil.GridHelper])({
             var retVal = new declare([OnDemandGrid, Keyboard, Selection, ColumnResizer, DijitRegistry, ESPUtil.GridHelper])({

+ 4 - 0
esp/files/scripts/DFUQueryWidget.js

@@ -95,6 +95,10 @@ define([
             this.initFilter();
             this.initFilter();
         },
         },
 
 
+        getTitle: function () {
+            return "Logical Files";
+        },
+
         //  Hitched actions  ---
         //  Hitched actions  ---
         _onRefresh: function (event) {
         _onRefresh: function (event) {
             this.refreshGrid();
             this.refreshGrid();

+ 4 - 0
esp/files/scripts/DFUWUDetailsWidget.js

@@ -76,6 +76,10 @@ define([
             stateSelect.addOption(stateOptions);
             stateSelect.addOption(stateOptions);
         },
         },
 
 
+        getTitle: function () {
+            return "DFU Workunit";
+        },
+
         //  Hitched actions  ---
         //  Hitched actions  ---
         _onRefresh: function (event) {
         _onRefresh: function (event) {
             this.wu.refresh(true);
             this.wu.refresh(true);

+ 4 - 0
esp/files/scripts/ECLPlaygroundWidget.js

@@ -163,6 +163,10 @@ define([
             this.updateInput("State", null, "...");
             this.updateInput("State", null, "...");
         },
         },
 
 
+        getTitle: function () {
+            return "ECL Playground";
+        },
+
         watchWU: function () {
         watchWU: function () {
             if (this.watching) {
             if (this.watching) {
                 this.watching.unwatch();
                 this.watching.unwatch();

+ 4 - 0
esp/files/scripts/GetDFUWorkunitsWidget.js

@@ -87,6 +87,10 @@ define([
             this.initFilter();
             this.initFilter();
         },
         },
 
 
+        getTitle: function () {
+            return "DFU Workunits";
+        },
+
         //  Hitched actions  ---
         //  Hitched actions  ---
         _onRefresh: function (event) {
         _onRefresh: function (event) {
             this.refreshGrid();
             this.refreshGrid();

+ 4 - 0
esp/files/scripts/HPCCPlatformECLWidget.js

@@ -46,6 +46,10 @@ define([
             this.inherited(arguments);
             this.inherited(arguments);
         },
         },
 
 
+        getTitle: function () {
+            return "HPCC Platform - ECL";
+        },
+
         //  Hitched actions  ---
         //  Hitched actions  ---
 
 
         //  Implementation  ---
         //  Implementation  ---

+ 3 - 0
esp/files/scripts/HPCCPlatformFilesWidget.js

@@ -48,6 +48,9 @@ define([
             this.inherited(arguments);
             this.inherited(arguments);
         },
         },
 
 
+        getTitle: function () {
+            return "HPCC Platform - Files";
+        },
         //  Hitched actions  ---
         //  Hitched actions  ---
 
 
         //  Implementation  ---
         //  Implementation  ---

+ 4 - 0
esp/files/scripts/HPCCPlatformMainWidget.js

@@ -47,6 +47,10 @@ define([
             this.inherited(arguments);
             this.inherited(arguments);
         },
         },
 
 
+        getTitle: function () {
+            return "HPCC Platform - Home";
+        },
+
         //  Hitched actions  ---
         //  Hitched actions  ---
 
 
         //  Implementation  ---
         //  Implementation  ---

+ 4 - 0
esp/files/scripts/HPCCPlatformOpsWidget.js

@@ -45,6 +45,10 @@ define([
             this.inherited(arguments);
             this.inherited(arguments);
         },
         },
 
 
+        getTitle: function () {
+            return "HPCC Platform - Operations";
+        },
+
         //  Hitched actions  ---
         //  Hitched actions  ---
 
 
         //  Implementation  ---
         //  Implementation  ---

+ 4 - 0
esp/files/scripts/HPCCPlatformRoxieWidget.js

@@ -45,6 +45,10 @@ define([
             this.inherited(arguments);
             this.inherited(arguments);
         },
         },
 
 
+        getTitle: function () {
+            return "HPCC Platform - Roxie";
+        },
+
         //  Hitched actions  ---
         //  Hitched actions  ---
 
 
         //  Implementation  ---
         //  Implementation  ---

+ 4 - 0
esp/files/scripts/HPCCPlatformWidget.js

@@ -70,6 +70,10 @@ define([
             this.inherited(arguments);
             this.inherited(arguments);
         },
         },
 
 
+        getTitle: function () {
+            return "HPCC Platform";
+        },
+
         //  Hitched actions  ---
         //  Hitched actions  ---
         _onFind: function (evt) {
         _onFind: function (evt) {
             this.stackContainer.selectChild(this.mainPage);
             this.stackContainer.selectChild(this.mainPage);

+ 4 - 0
esp/files/scripts/LFDetailsWidget.js

@@ -103,6 +103,10 @@ define([
             });
             });
         },
         },
 
 
+        getTitle: function () {
+            return "Logical File Details";
+        },
+
         _handleResponse: function (wuidQualifier, response) {
         _handleResponse: function (wuidQualifier, response) {
             if (lang.exists(wuidQualifier, response)) {
             if (lang.exists(wuidQualifier, response)) {
                 var wu = ESPDFUWorkunit.Get(lang.getObject(wuidQualifier, false, response));
                 var wu = ESPDFUWorkunit.Get(lang.getObject(wuidQualifier, false, response));

+ 4 - 0
esp/files/scripts/LZBrowseWidget.js

@@ -120,6 +120,10 @@ define([
             this.inherited(arguments);
             this.inherited(arguments);
         },
         },
 
 
+        getTitle: function () {
+            return "Landing Zones";
+        },
+
         _handleResponse: function (wuidQualifier, response) {
         _handleResponse: function (wuidQualifier, response) {
             if (lang.exists(wuidQualifier, response)) {
             if (lang.exists(wuidQualifier, response)) {
                 var wu = ESPDFUWorkunit.Get(lang.getObject(wuidQualifier, false, response));
                 var wu = ESPDFUWorkunit.Get(lang.getObject(wuidQualifier, false, response));

+ 4 - 0
esp/files/scripts/SearchResultsWidget.js

@@ -61,6 +61,10 @@ define([
             this._refreshActionState();
             this._refreshActionState();
         },
         },
 
 
+        getTitle: function () {
+            return "Results Widget";
+        },
+
         createGrid: function (domID) {
         createGrid: function (domID) {
             var context = this;
             var context = this;
             var retVal = new declare([OnDemandGrid, Keyboard, Selection, ColumnResizer, DijitRegistry, ESPUtil.GridHelper])({
             var retVal = new declare([OnDemandGrid, Keyboard, Selection, ColumnResizer, DijitRegistry, ESPUtil.GridHelper])({

+ 4 - 0
esp/files/scripts/WUDetailsWidget.js

@@ -121,6 +121,10 @@ define([
             this.variablesGrid.startup();
             this.variablesGrid.startup();
         },
         },
 
 
+        getTitle: function () {
+            return "ECL Workunit Details";
+        },
+
         //  Hitched actions  ---
         //  Hitched actions  ---
         _onSave: function (event) {
         _onSave: function (event) {
             var protectedCheckbox = registry.byId(this.id + "Protected");
             var protectedCheckbox = registry.byId(this.id + "Protected");

+ 4 - 0
esp/files/scripts/WUQueryWidget.js

@@ -93,6 +93,10 @@ define([
             this.initFilter();
             this.initFilter();
         },
         },
 
 
+        getTitle: function () {
+            return "ECL Workunits";
+        },
+
         //  Hitched actions  ---
         //  Hitched actions  ---
         _onRefresh: function (event) {
         _onRefresh: function (event) {
             this.refreshGrid();
             this.refreshGrid();

+ 1 - 0
esp/files/stub.js

@@ -105,6 +105,7 @@ define([
                     widget.init(params);
                     widget.init(params);
                 }
                 }
 
 
+                document.title = widget.getTitle ? widget.getTitle() : params.Widget;
                 /*
                 /*
                 dojo.publish("hpccMessageTopic", {
                 dojo.publish("hpccMessageTopic", {
                     type: "warning",
                     type: "warning",