', {
class: 'e-control-tools'
}); // Give the reset button the control tool styling, and add a click event so clicking on it closes the popover.
$resetLabel.addClass('e-control-tool').on('click', function () {
return _this.onResetButtonClick();
}); // Move the popover toggle reset button into the popover header.
this.$headerControlsWrapper.append($resetLabel);
this.$popoverHeader.append(this.$headerControlsWrapper);
var globalConfig = this.popoverToggleView.model.get('global');
if (globalConfig !== null && globalConfig !== void 0 && globalConfig.active) {
this.createAddButton();
}
this.$popover.prepend(this.$popoverHeader).addClass('e-controls-popover--typography');
}
}, {
key: "onResetButtonClick",
value: function onResetButtonClick() {
this.$popover.hide();
var groupControlName = this.child.model.get('groupPrefix') + 'typography',
args = {
container: this.child.options.container,
settings: (0, _defineProperty2.default)({}, groupControlName, '')
};
if (this.child.options.container.globals.get(groupControlName)) {
// The Disable Globals command applies global settings locally,
// so disabling the global shouldn't actually change the appearance of the widget.
$e.run('document/globals/disable', args);
} else {
$e.run('document/elements/settings', args);
}
}
}, {
key: "onAddButtonClick",
value: function onAddButtonClick() {
this.popoverToggleView.onAddGlobalButtonClick();
}
}, {
key: "createAddButton",
value: function createAddButton() {
var _this2 = this;
this.$addButton = jQuery('