diff --git a/beat/web/reports/static/reports/app/app.config.js b/beat/web/reports/static/reports/app/app.config.js index 0b9a5c26116275df6975e0e87cea94d33309d139..0896cf9b7006508d69f8198af583c1126751c86f 100644 --- a/beat/web/reports/static/reports/app/app.config.js +++ b/beat/web/reports/static/reports/app/app.config.js @@ -1,34 +1,32 @@ /* * Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ * Contact: beat.support@idiap.ch - * + * * This file is part of the beat.web module of the BEAT platform. - * + * * Commercial License Usage * Licensees holding valid commercial BEAT licenses may use this file in * accordance with the terms contained in a written agreement between you * and Idiap. For further information contact tto@idiap.ch - * + * * Alternatively, this file may be used under the terms of the GNU Affero * Public License version 3 as published by the Free Software and appearing * in the file LICENSE.AGPL included in the packaging of this file. * The BEAT platform is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. - * + * * You should have received a copy of the GNU Affero Public License along * with the BEAT platform. If not, see http://www.gnu.org/licenses/. -*/ -var app = angular.module('reportApp'); - -app.config(function configureStartEndSymbol($interpolateProvider) { - $interpolateProvider.startSymbol('{$').endSymbol('$}'); - } + */ +angular.module('reportApp').config(function configureStartEndSymbol($interpolateProvider) { + $interpolateProvider.startSymbol('{$').endSymbol('$}'); +} ); -app.config(function configHttp($httpProvider) { - $httpProvider.defaults.xsrfCookieName = 'csrftoken'; - $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken'; - $httpProvider.defaults.withCredentials = true; - } +angular.module('reportApp').config(function configHttp($httpProvider) { + $httpProvider.defaults.xsrfCookieName = 'csrftoken'; + $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken'; + $httpProvider.defaults.withCredentials = true; +} ); diff --git a/beat/web/reports/static/reports/app/app.js b/beat/web/reports/static/reports/app/app.js index 569fbec8bef5d28ad34bd09930343aa8ec04da6d..7ebf397a49bb68e9d561a2f2c561f8fc9214c353 100644 --- a/beat/web/reports/static/reports/app/app.js +++ b/beat/web/reports/static/reports/app/app.js @@ -1,51 +1,35 @@ /* * Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ * Contact: beat.support@idiap.ch - * + * * This file is part of the beat.web module of the BEAT platform. - * + * * Commercial License Usage * Licensees holding valid commercial BEAT licenses may use this file in * accordance with the terms contained in a written agreement between you * and Idiap. For further information contact tto@idiap.ch - * + * * Alternatively, this file may be used under the terms of the GNU Affero * Public License version 3 as published by the Free Software and appearing * in the file LICENSE.AGPL included in the packaging of this file. * The BEAT platform is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. - * + * * You should have received a copy of the GNU Affero Public License along * with the BEAT platform. If not, see http://www.gnu.org/licenses/. -*/ -var app = angular.module('reportApp', ['ui.router', 'angular.filter']); + */ +angular.module('reportApp', ['ui.router', 'angular.filter']); -app.config(function ($stateProvider, $urlRouterProvider){ +angular.module('reportApp').config(function ($stateProvider, $urlRouterProvider){ + $urlRouterProvider + .otherwise('/'); - $urlRouterProvider - .otherwise('/'); - - $stateProvider - .state('report', { - url: '/', - views: { - //'myReportInfo': { - // //templateUrl: '/platform/reports/partials/reportInfo/', - // templateUrl: function(params) - // { - // console.log("ici"); - // console.log(params); - // console.log($scope); - // }, - // //templateUrl: '/reports/partials/reportGeneralInfo.html', - // controller: 'reportController', - // //controller: function($scope) - // //{ - // // console.log($scope); - // //}, - //} - } - }) + $stateProvider + .state('report', { + url: '/', + views: { + } + }); }); diff --git a/beat/web/reports/static/reports/app/controllers/reportController.js b/beat/web/reports/static/reports/app/controllers/reportController.js index 5381a592bcdf12ec81f6a924b0172c1c51c9b5b3..abe6f20fa8d832ac8cf924ee4a85357f5209d0a9 100644 --- a/beat/web/reports/static/reports/app/controllers/reportController.js +++ b/beat/web/reports/static/reports/app/controllers/reportController.js @@ -60,7 +60,7 @@ angular.module('reportApp').controller('reportController',['$scope', 'reportFact getReportData($scope.user, $scope.report_id); $scope.item_content = dataFactory.getData(data_itemcontent_file); $scope.table_item_content = dataFactory.getData(data_table_itemcontent_file); - } + }; $scope.initWithReportNumber = function(report_number, url_prefix, data_itemcontent_file, data_table_itemcontent_file){ $scope.report_number = report_number; @@ -68,7 +68,7 @@ angular.module('reportApp').controller('reportController',['$scope', 'reportFact getReportDataFromNumber($scope.report_number); $scope.item_content = dataFactory.getData(data_itemcontent_file); $scope.table_item_content = dataFactory.getData(data_table_itemcontent_file); - } + }; function getReportData(user, report_id){ reportFactory.getReportInformation(user, report_id, $scope.url_prefix) @@ -167,7 +167,7 @@ angular.module('reportApp').controller('reportController',['$scope', 'reportFact for(var i = 0; i < Object.keys($scope.sorted_experiments_keys_tables_sortkey).length; i++){ $scope.sorted_tables.push(Object.keys($scope.sorted_experiments_keys_tables_sortkey)[i]); } - }) + }); } function getExperimentDataForAuthor(all_experiments){ @@ -212,7 +212,7 @@ angular.module('reportApp').controller('reportController',['$scope', 'reportFact $scope.sorted_tables.push(Object.keys($scope.sorted_experiments_keys_tables_sortkey)[i]); } - }) + }); } function getExperimentData(experiment_id){ @@ -237,7 +237,7 @@ angular.module('reportApp').controller('reportController',['$scope', 'reportFact intersectBlocks(experiment_id); algorithmParameters(experiment_id); - }) + }); } function getPlotters(){ @@ -310,7 +310,7 @@ angular.module('reportApp').controller('reportController',['$scope', 'reportFact function intersectBlocks(experiment_id){ $scope.report_experiments_blocks[experiment_id] = Object.keys($scope.report_experiments[experiment_id].blocks_status); - var values = $.map($scope.report_experiments_blocks[experiment_id], function(value, key) { return value }); + var values = $.map($scope.report_experiments_blocks[experiment_id], function(value, key) { return value; }); $scope.report_experiments_blocks_merged_blocks.push(values); }