Skip to content
Snippets Groups Projects
Commit 4c4e48c1 authored by Jaden Diefenbaugh's avatar Jaden Diefenbaugh
Browse files

style fixes, no more global var app

parent 91c7fd20
No related branches found
No related tags found
2 merge requests!223Reports overhaul,!220WIP: Experiment groups
/*
* 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;
}
);
/*
* 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: {
}
});
});
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment