diff --git a/src/app/controllers/all.js b/src/app/controllers/all.js index 8dfca49d716..158bf04c818 100755 --- a/src/app/controllers/all.js +++ b/src/app/controllers/all.js @@ -1,5 +1,5 @@ define([ './dash', './dashLoader', - './row', + './row' ], function () {}); \ No newline at end of file diff --git a/src/app/directives/all.js b/src/app/directives/all.js index 148329ea26f..439a7c17a5a 100755 --- a/src/app/directives/all.js +++ b/src/app/directives/all.js @@ -5,5 +5,6 @@ define([ './kibanaPanel', './ngBlur', './ngModelOnBlur', - './tip' + './tip', + './confirmClick' ], function () {}); \ No newline at end of file diff --git a/src/app/directives/confirmClick.js b/src/app/directives/confirmClick.js new file mode 100755 index 00000000000..16410c331e6 --- /dev/null +++ b/src/app/directives/confirmClick.js @@ -0,0 +1,26 @@ +define([ + 'angular', + 'kbn' +], +function (angular) { + 'use strict'; + + var module = angular.module('kibana.directives'); + + module.directive('confirmClick', function() { + return { + restrict: 'A', + link: function(scope, elem, attrs) { + elem.bind('click', function() { + var message = attrs.confirmation || "Are you sure you want to do that?"; + if (window.confirm(message)) { + var action = attrs.confirmClick; + if (action) { + scope.$apply(scope.$eval(action)); + } + } + }); + }, + }; + }); +}); \ No newline at end of file diff --git a/src/app/directives/kibanaPanel.js b/src/app/directives/kibanaPanel.js index 8fef10eb4d3..5778889bd9e 100755 --- a/src/app/directives/kibanaPanel.js +++ b/src/app/directives/kibanaPanel.js @@ -11,10 +11,8 @@ function (angular) { '' + - // Editor link '' + - '' + ''+ @@ -25,6 +23,12 @@ function (angular) { ''+ ' / ' + + '' + + ''+ + ''+ + ' / ' + + '{{panel.type}} ' + '' + diff --git a/src/app/partials/roweditor.html b/src/app/partials/roweditor.html index a5962bd4744..179bdef80e1 100755 --- a/src/app/partials/roweditor.html +++ b/src/app/partials/roweditor.html @@ -36,7 +36,7 @@ {{panel.title}} {{panel.type}} - + @@ -48,7 +48,7 @@

Select Panel Type

- + Note: This row is full, new panels will wrap to a new line. You should add another row.