Просмотр исходного кода

add pencil icon back to graphite data source

The input needed to be wrapped in a span set to display:block in order to prevent it
from moving to the next line. See http://stackoverflow.com/questions/773517/style-input-element-to-fill-remaining-width-of-its-container
Tom Dyas 10 лет назад
Родитель
Сommit
9bafc4fea1
1 измененных файлов с 8 добавлено и 1 удалено
  1. 8 1
      public/app/plugins/datasource/graphite/partials/query.editor.html

+ 8 - 1
public/app/plugins/datasource/graphite/partials/query.editor.html

@@ -8,6 +8,11 @@
 		<li class="tight-form-item small" ng-show="target.datasource">
 			<em>{{target.datasource}}</em>
 		</li>
+		<li class="tight-form-item">
+			<a class="pointer" tabindex="1" ng-click="toggleEditorMode()">
+				<i class="fa fa-pencil"></i>
+			</a>
+		</li>
 		<li class="tight-form-item">
 			<div class="dropdown">
 				<a class="pointer dropdown-toggle" data-toggle="dropdown" tabindex="1">
@@ -49,7 +54,9 @@
 		</li>
 	</ul>
 
-	<input type="text" class="tight-form-clear-input span10" ng-model="target.target" give-focus="target.textEditor" spellcheck='false' ng-model-onblur ng-change="get_data()" ng-show="target.textEditor"></input>
+	<span style="display: block; overflow: hidden;">
+		<input type="text" class="tight-form-clear-input" style="width: 100%;" ng-model="target.target" give-focus="target.textEditor" spellcheck='false' ng-model-onblur ng-change="get_data()" ng-show="target.textEditor"></input>
+	</span>
 
 	<ul class="tight-form-list" role="menu" ng-hide="target.textEditor">
 		<li ng-repeat="segment in segments" role="menuitem">