mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
Fixes #251, text panel change is now updating panel correctly. Changed button text from Cancel to Close
This commit is contained in:
parent
ba928e18bf
commit
d067b69d20
@ -318,7 +318,7 @@ function (angular, $, kbn, moment, _) {
|
||||
}
|
||||
});
|
||||
|
||||
function render_panel_as_graphite_png(url) {
|
||||
function render_panel_as_graphite_png(url) {
|
||||
url += '&width=' + elem.width();
|
||||
url += '&height=' + elem.css('height').replace('px', '');
|
||||
url += '&bgcolor=1f1f1f'; // @grayDarker & @kibanaPanelBackground
|
||||
|
@ -73,7 +73,7 @@ function (angular, $, _) {
|
||||
elem.removeClass("ng-cloak");
|
||||
}
|
||||
|
||||
newScope.$on('$destroy',function(){
|
||||
newScope.$on('$destroy',function() {
|
||||
elem.unbind();
|
||||
elem.remove();
|
||||
});
|
||||
|
@ -8,9 +8,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class=small>Content
|
||||
<label class=small>Content
|
||||
<span ng-show="panel.mode == 'html'">(This area uses HTML sanitized via AngularJS's <a href='http://docs.angularjs.org/api/ngSanitize.$sanitize'>$sanitize</a> service)</span>
|
||||
<span ng-show="panel.mode == 'markdown'">(This area uses <a target="_blank" href="http://en.wikipedia.org/wiki/Markdown">Markdown</a>. HTML is not supported)</span>
|
||||
</label>
|
||||
<textarea ng-model="panel.content" rows="6" style="width:95%"></textarea>
|
||||
|
||||
<textarea ng-model="panel.content" rows="6" style="width:95%" ng-change="render()" ng-model-onblur>
|
||||
</textarea>
|
||||
</div>
|
@ -1,4 +1,4 @@
|
||||
<div ng-controller='text' ng-init="init()">
|
||||
<div ng-controller='text' ng-init="init()" style="min-height:{{panel.height || row.height}}">
|
||||
<!--<p ng-style="panel.style" ng-bind-html-unsafe="panel.content | striphtml | newlines"></p>-->
|
||||
<markdown ng-show="ready && panel.mode == 'markdown'">
|
||||
{{panel.content}}
|
||||
|
@ -48,6 +48,10 @@ function (angular, app, _, require) {
|
||||
$scope.ready = false;
|
||||
};
|
||||
|
||||
$scope.render = function() {
|
||||
$scope.$emit('render');
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
module.directive('markdown', function() {
|
||||
|
@ -156,5 +156,5 @@
|
||||
</div>
|
||||
|
||||
<button ng-click="add_row(dashboard.current,row); reset_row();" class="btn btn-success" ng-show="editor.index == 1">Create Row</button>
|
||||
<button type="button" class="btn btn-danger" ng-click="editor.index=0;dismiss();reset_panel();dashboard.refresh()">Close</button>
|
||||
<button type="button" class="btn btn-info" ng-click="editor.index=0;dismiss();reset_panel();dashboard.refresh()">Close</button>
|
||||
</div>
|
@ -19,5 +19,5 @@
|
||||
|
||||
<div class="modal-footer">
|
||||
<!-- close_edit() is provided here to allow for a scope to perform action on dismiss -->
|
||||
<button type="button" class="btn btn-danger" ng-click="editor.index=0;dismiss()">Cancel</button>
|
||||
<button type="button" class="btn btn-info" ng-click="editor.index=0;dismiss()">Close</button>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user