diff --git a/beat/web/ui/static/ui/js/reportdialog.js b/beat/web/ui/static/ui/js/reportdialog.js index c7efcf3461aad12012bf074e03bac034e96132ba..fc52a08340c7ad116310d0269a08b9441f8dea83 100644 --- a/beat/web/ui/static/ui/js/reportdialog.js +++ b/beat/web/ui/static/ui/js/reportdialog.js @@ -1,21 +1,21 @@ /* * 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/. */ @@ -150,14 +150,14 @@ beat.ui.report.lock_report = function(dialog_id, scope) num_click++; scope.reportFactory.lockReport(scope.user, scope.report_id, scope.url_prefix) - .success(function (reportData) + .then(function (reportData) { $(".explanation_text").hide(); $("#report_lock .warnings").show(); $("#report_lock .errors").hide(); $("#button-report_lock-cancel").hide(); }) - .error(function (error) + .catch(function (error) { scope.status = 'Unable to lock report data: ' + error; $(".explanation_text").hide(); @@ -247,14 +247,14 @@ beat.ui.report.publish_report = function(dialog_id, scope, algorithms_list) var send_data = JSON.stringify(data); scope.reportFactory.publishReport(scope.url_prefix, scope.user, scope.report_id, send_data) - .success(function (reportData) + .then(function (reportData) { $(".explanation_text").hide(); $("#report_publish .warnings").show(); $("#report_publish .errors").hide(); $("#button-report_publish-cancel").hide(); }) - .error(function (error) + .catch(function (error) { scope.status = 'Unable to publish report data: ' + error; $(".explanation_text").hide(); @@ -270,14 +270,14 @@ beat.ui.report.publish_report = function(dialog_id, scope, algorithms_list) else { scope.reportFactory.publishReport(scope.url_prefix, scope.user, scope.report_id) - .success(function (reportData) + .then(function (reportData) { $(".explanation_text").hide(); $("#report_publish .warnings").show(); $("#report_publish .errors").hide(); $("#button-report_publish-cancel").hide(); }) - .error(function (error) + .catch(function (error) { scope.status = 'Unable to publish report data: ' + error; $(".explanation_text").hide(); @@ -391,14 +391,14 @@ beat.ui.report.remove_experiment = function(dialog_id, experiment_id, scope) var data_to_send = {}; data_to_send['experiments'] = [experiment_id]; scope.reportFactory.removeExperiment(scope.user, scope.report_id, data_to_send, scope.url_prefix) - .success(function (reportData) + .then(function (reportData) { $(".explanation_text").hide(); $("#report_remove_experiment .warnings").show(); $("#report_remove_experiment .errors").hide(); $("#button-report_remove_experiment-cancel").hide(); }) - .error(function (error) + .catch(function (error) { scope.status = 'Unable to remove experiment from report: ' + error; $(".explanation_text").hide();