Linted, moved shared functions to kbn object

This commit is contained in:
Rashid Khan
2013-07-20 14:56:59 -07:00
parent 7c9f14ad5e
commit 5a3028f784
17 changed files with 955 additions and 920 deletions
+15 -11
View File
@@ -1,3 +1,5 @@
/*jshint globalstrict:true */
/*global angular:true */
/*
## filtering
@@ -8,39 +10,41 @@
*/
'use strict';
angular.module('kibana.filtering', [])
.controller('filtering', function($scope, filterSrv, $rootScope, dashboard) {
// Set and populate defaults
var _d = {
status : "Experimental"
}
};
_.defaults($scope.panel,_d);
$scope.init = function() {
$scope.filterSrv = filterSrv
}
$scope.filterSrv = filterSrv;
};
$scope.remove = function(id) {
filterSrv.remove(id);
dashboard.refresh();
}
};
$scope.toggle = function(id) {
filterSrv.list[id].active = !filterSrv.list[id].active;
dashboard.refresh();
}
};
$scope.refresh = function(query) {
$rootScope.$broadcast('refresh')
}
$rootScope.$broadcast('refresh');
};
$scope.render = function(query) {
$rootScope.$broadcast('render')
}
$rootScope.$broadcast('render');
};
$scope.show_key = function(key) {
return !_.contains(['type','id','alias','mandate','active','editing'],key)
}
return !_.contains(['type','id','alias','mandate','active','editing'],key);
};
});