Is a method which allows a user to view the columns that are already hidden and lets the user select the columns to be made visible using a popup.
xxxxxxxxxx
public async unhide() {
Get the styling sheet for the columns as it is used for controlling the hiding and unhiding feature.
xxxxxxxxxx
const element = <HTMLStyleElement> this.get_element("columns");
const sheet = <CSSStyleSheet>element.sheet!;
Get the current theme.
xxxxxxxxxx
const Theme = <theme.theme>this.panels.get("theme")!;
Get the column names of the current theme.
xxxxxxxxxx
let colnames: Array<library.cname> =Theme.col_names!;
Get the popup choices as key/value pairs of columns to unhide.
xconst pairs: Array<outlook.key_value<library.cname>> =
this.get_hidden_columns(sheet, colnames, Theme);
const specs = this.get_popup_window_specs();
Create a multiple choice popup using the pairs.
xxxxxxxxxx
const Popup = new outlook.choices(app.current.config.general, pairs, "hidden_column",specs);
Await the user to select the choices of column names
xxxxxxxxxx
const choices = await Popup.administer();
Make the selected columns visible.
xxxxxxxxxx
choices!.forEach(cname => {
Get the index of this column name from the current theme.
xxxxxxxxxx
const i = colnames.indexOf(cname)!;
Get the declaration of the i'th rule.
xxxxxxxxxx
const declaration = (<CSSStyleRule>sheet.cssRules[i]).style;
Remove the display property .
xxxxxxxxxx
declaration.removeProperty("display");
declaration.removeProperty("background-color");
});
}