mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-23 05:10:30 -04:00
This reverts commit d15a3fcc98.
This commit is contained in:
@@ -85,6 +85,7 @@ export abstract class PeekViewWidget extends ZoneWidget {
|
||||
private _onDidClose = new Emitter<PeekViewWidget>();
|
||||
|
||||
protected _headElement: HTMLDivElement;
|
||||
protected _headingIcon: HTMLElement;
|
||||
protected _primaryHeading: HTMLElement;
|
||||
protected _secondaryHeading: HTMLElement;
|
||||
protected _metaHeading: HTMLElement;
|
||||
@@ -154,18 +155,18 @@ export abstract class PeekViewWidget extends ZoneWidget {
|
||||
dom.append(this._headElement, titleElement);
|
||||
dom.addStandardDisposableListener(titleElement, 'click', event => this._onTitleClick(event));
|
||||
|
||||
this._fillTitleIcon(titleElement);
|
||||
this._headingIcon = dom.$('span');
|
||||
this._primaryHeading = dom.$('span.filename');
|
||||
this._secondaryHeading = dom.$('span.dirname');
|
||||
this._metaHeading = dom.$('span.meta');
|
||||
dom.append(titleElement, this._primaryHeading, this._secondaryHeading, this._metaHeading);
|
||||
dom.append(titleElement, this._headingIcon, this._primaryHeading, this._secondaryHeading, this._metaHeading);
|
||||
|
||||
const actionsContainer = dom.$('.peekview-actions');
|
||||
dom.append(this._headElement, actionsContainer);
|
||||
|
||||
const actionBarOptions = this._getActionBarOptions();
|
||||
this._actionbarWidget = new ActionBar(actionsContainer, actionBarOptions);
|
||||
this._disposables.add(this._actionbarWidget);
|
||||
this._disposables.push(this._actionbarWidget);
|
||||
|
||||
this._actionbarWidget.push(new Action('peekview.close', nls.localize('label.close', "Close"), 'close-peekview-action', true, () => {
|
||||
this.dispose();
|
||||
@@ -173,9 +174,6 @@ export abstract class PeekViewWidget extends ZoneWidget {
|
||||
}), { label: false, icon: true });
|
||||
}
|
||||
|
||||
protected _fillTitleIcon(container: HTMLElement): void {
|
||||
}
|
||||
|
||||
protected _getActionBarOptions(): IActionBarOptions {
|
||||
return {};
|
||||
}
|
||||
@@ -184,6 +182,10 @@ export abstract class PeekViewWidget extends ZoneWidget {
|
||||
// implement me
|
||||
}
|
||||
|
||||
public setTitleIcon(iconClassName: string): void {
|
||||
this._headingIcon.className = iconClassName ? `icon ${iconClassName}` : '';
|
||||
}
|
||||
|
||||
public setTitle(primaryHeading: string, secondaryHeading?: string): void {
|
||||
this._primaryHeading.innerHTML = strings.escape(primaryHeading);
|
||||
this._primaryHeading.setAttribute('aria-label', primaryHeading);
|
||||
|
||||
Reference in New Issue
Block a user