瀏覽代碼

HPCC-10063 Hide Timing Tree Map Help on Graph View

Fixes HPCC-10063

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
Gordon Smith 11 年之前
父節點
當前提交
0b1d69381d

+ 2 - 1
esp/files/scripts/GraphPageWidget.js

@@ -428,7 +428,8 @@ define([
             }, params));
 
             this.timingTreeMap.init(lang.mixin({
-                query: this.graphName
+                query: this.graphName,
+                hideHelp: true
             }, params));
 
         },

+ 7 - 1
esp/files/scripts/TimingTreeMapWidget.js

@@ -19,6 +19,8 @@ define([
     "dojo/_base/lang",
     "dojo/_base/array",
     "dojo/store/Memory",
+    "dojo/dom",
+    "dojo/dom-class",
 
     "dijit/registry",
 
@@ -29,7 +31,7 @@ define([
 
     "dojo/text!../templates/TimingTreeMapWidget.html"
 ],
-    function (declare, lang, arrayUtil, Memory,
+    function (declare, lang, arrayUtil, Memory, dom, domClass,
             registry, 
             TreeMap,
             _Widget, ESPWorkunit,
@@ -83,6 +85,10 @@ define([
                 if (this.inherited(arguments))
                     return;
 
+                if (params.hideHelp) {
+                    domClass.add(this.id + "Help", "hidden");
+                }
+
                 this.defaultQuery = "*";
                 if (params.query) {
                     this.defaultQuery = params.query;

+ 1 - 1
esp/files/templates/TimingTreeMapWidget.html

@@ -1,6 +1,6 @@
 <div class="${baseClass}">
     <link rel="stylesheet" href="dojox/treemap/themes/TreeMap.css">
-    <p>This area displays the treemap for the graph(s) in this workunit. The size and hue indicate the duration of each graph (Larger and darker indicates a greater percentage of the time taken.)</p>
+    <p id="${id}Help">This area displays the treemap for the graph(s) in this workunit. The size and hue indicate the duration of each graph (Larger and darker indicates a greater percentage of the time taken.)</p>
     <div id="${id}TreeMap" style="width: 100%; height: 100%;" data-dojo-props="selectionMode: 'multiple'" data-dojo-type="dojox.treemap.TreeMap">
     </div>
 </div>