Fixed rerender on panel save, only applied to time picker now, removed debug statement from hits panel

This commit is contained in:
Rashid Khan 2013-04-06 20:54:29 -07:00
parent b7eaae3c8b
commit 7373e37490
4 changed files with 9 additions and 6 deletions

View File

@ -109,8 +109,9 @@ angular.module('kibana.controllers', [])
} }
} }
$scope.send_render = function() { $scope.close_modal = function() {
$scope.$broadcast('render'); // Dummy function, available for overriding in child scopes. For example
// a panel might want to broadcast an event when a modal is closed
} }
$scope.add_panel = function(row,panel) { $scope.add_panel = function(row,panel) {

View File

@ -146,8 +146,6 @@ angular.module('kibana.hits', [])
// Populate element. Note that jvectormap appends, does not replace. // Populate element. Note that jvectormap appends, does not replace.
scripts.wait(function(){ scripts.wait(function(){
console.log(scope.data)
// Populate element // Populate element
try { try {
var plot = $.plot(elem, scope.data, { var plot = $.plot(elem, scope.data, {

View File

@ -167,6 +167,10 @@ angular.module('kibana.timepicker', [])
$scope.time_apply(); $scope.time_apply();
} }
$scope.close_modal = function() {
$scope.$broadcast('render');
}
$scope.time_check = function(){ $scope.time_check = function(){
// If time picker is defined (on initialization) // If time picker is defined (on initialization)

View File

@ -1,6 +1,6 @@
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>{{panel.title}} <small>editor</small></h3> <h3>{{panel.title}} Editor</h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
@ -13,5 +13,5 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" ng-click="dismiss();send_render()">Close</button> <button type="button" class="btn btn-success" ng-click="dismiss();close_modal()">Close</button>
</div> </div>