change(text panel): removed rarely used (and not properly working), text mode option, closes #6389, closes #7214

This commit is contained in:
Torkel Ödegaard
2017-01-11 12:33:12 +01:00
parent cdc7da3ae1
commit 64f5146a62
2 changed files with 4 additions and 9 deletions

View File

@@ -6,13 +6,6 @@
<select class="gf-form-input" ng-model="ctrl.panel.mode" ng-options="f for f in ['html','markdown','text']"></select>
</span>
</div>
<div class="gf-form" ng-show="ctrl.panel.mode == 'text'">
<span class="gf-form-label">Font Size</span>
<span class="gf-form-select-wrapper">
<select class="gf-form-input" ng-model="ctrl.panel.style['font-size']" ng-options="f for f in ['6pt','7pt','8pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select>
</span>
</div>
</div>
</div>

View File

@@ -28,6 +28,10 @@ export class TextPanelCtrl extends PanelCtrl {
onInitEditMode() {
this.addEditorTab('Options', 'public/app/plugins/panel/text/editor.html');
this.editorTabIndex = 1;
if (this.panel.mode === 'text') {
this.panel.mode = 'markdown';
}
}
onRefresh() {
@@ -39,8 +43,6 @@ export class TextPanelCtrl extends PanelCtrl {
this.renderMarkdown(this.panel.content);
} else if (this.panel.mode === 'html') {
this.updateContent(this.panel.content);
} else if (this.panel.mode === 'text') {
this.renderText(this.panel.content);
}
this.renderingCompleted();
}