Skip to content

Commit

Permalink
Merge pull request #1400 from jpwhite4/dashsum
Browse files Browse the repository at this point in the history
Set the "Show in X tab" label in the Metric Explorer automatically based on whether the dashboard is enabled
  • Loading branch information
jpwhite4 authored Dec 3, 2020
2 parents 5de8922 + 55a332a commit 1fb8a51
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions html/gui/js/modules/metric_explorer/MetricExplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3336,16 +3336,19 @@ Ext.extend(XDMoD.Module.MetricExplorer, XDMoD.PortalModule, {

// ---------------------------------------------------------

var summaryTab = Ext.getCmp('tg_summary');
var summaryTabName = summaryTab ? summaryTab.title : 'Summary';

this.featuredCheckbox = new Ext.form.Checkbox({
id: 'me_featured',
fieldLabel: 'Featured',
name: 'featured',
boxLabel: 'Show in Summary tab',
boxLabel: 'Show in ' + summaryTabName + ' tab',
checked: this.featured,
listeners: {
scope: this,
'check': function(checkbox, check) {
XDMoD.TrackEvent('Metric Explorer', 'Toggled Show in Summary tab checkbox', Ext.encode({
XDMoD.TrackEvent('Metric Explorer', 'Toggled Show in ' + summaryTabName + ' tab checkbox', Ext.encode({
checked: check
}));

Expand Down

0 comments on commit 1fb8a51

Please sign in to comment.