Pārlūkot izejas kodu

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

Torkel Ödegaard 9 gadi atpakaļ
vecāks
revīzija
64f5146a62

+ 0 - 7
public/app/plugins/panel/text/editor.html

@@ -6,13 +6,6 @@
 				<select class="gf-form-input" ng-model="ctrl.panel.mode" ng-options="f for f in ['html','markdown','text']"></select>
 				<select class="gf-form-input" ng-model="ctrl.panel.mode" ng-options="f for f in ['html','markdown','text']"></select>
 			</span>
 			</span>
 		</div>
 		</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>
 </div>
 </div>
 
 

+ 4 - 2
public/app/plugins/panel/text/module.ts

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