unify references

This commit is contained in:
Joe Fleming 2014-07-21 17:35:56 -07:00 committed by Spencer Alger
parent f86cd7a93a
commit b5fd704fa4
4 changed files with 4 additions and 5 deletions

View file

@ -20,7 +20,7 @@ define(function (require) {
var $body = $(document.body);
// appState from controller
var $state = $scope.$state;
var $state = $scope.state;
var gridster; // defined in init()
@ -47,7 +47,7 @@ define(function (require) {
}
}).data('gridster');
$scope.$watchCollection('$state.panels', function (panels) {
$scope.$watchCollection('state.panels', function (panels) {
var currentPanels = gridster.$widgets.toArray().map(function (el) {
return getPanelFor(el);
});

View file

@ -12,7 +12,7 @@ define(function (require) {
requires: '^dashboardGrid',
link: function ($scope, $el) {
// using $scope inheritance, panels are available in AppState
var $state = $scope.$state;
var $state = $scope.state;
// receives panel object from the dashboard grid directive
$scope.$watch('visId', function (visId) {

View file

@ -56,7 +56,7 @@ define(function (require) {
panels: dash.panelsJSON ? JSON.parse(dash.panelsJSON) : []
};
var $state = $scope.$state = new AppState(stateDefaults);
var $state = $scope.state = new AppState(stateDefaults);
$scope.configTemplate = new ConfigTemplate({
save: require('text!apps/dashboard/partials/save_dashboard.html'),

View file

@ -170,7 +170,6 @@ define(function (require) {
writeRow(chartData, { doc_count: resp.hits.total });
}
// now that things are well-ordered, and
// all related values have been segregated into
// their individual charts, we can go through and