From 17a4dc09a9610a38e15190147ca06db91a790d07 Mon Sep 17 00:00:00 2001 From: jaden <noreply@example.com> Date: Wed, 24 May 2017 15:33:59 +0200 Subject: [PATCH] rm modalService, unused --- .../reports/app/services/modalService.js | 68 ------------------- .../web/reports/templates/reports/report.html | 1 - 2 files changed, 69 deletions(-) delete mode 100644 beat/web/reports/static/reports/app/services/modalService.js diff --git a/beat/web/reports/static/reports/app/services/modalService.js b/beat/web/reports/static/reports/app/services/modalService.js deleted file mode 100644 index 5781da240..000000000 --- a/beat/web/reports/static/reports/app/services/modalService.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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/. - */ - -/* - * ModalService - * Desc: - * Manages the "global" reports app modal (content, etc.) - */ -angular.module('reportApp').factory('ModalService', [function(){ - const ms = { - _title: '', - _content: '', - _buttonCancelText: '', - _buttonCancelFunc: () => {}, - _buttonSubmitText: null, - _buttonSubmitFunc: () => {}, - _modalId: 'reportModal' - }; - - // activates the modal, with an optional shortcut for specifying title & content text - ms.activateModal = (title, content) => { - if(ms._modalId.length > 0){ - ms.setModalData(title, content); - return $(`#${ms._modalId}`).modal(); - } else { - - } - }; - - // sets the modal title & content - ms.setModalData = (titleStr, contentStr) => { - ms._title = titleStr || ms._title; - ms._content = contentStr || ms._content; - }; - - // sets the cancel button text & action - ms.setModalCancelData = (text, func) => { - ms._buttonCancelText = text && text.length > 0 ? text : 'Close'; - ms._buttonCancelFunc = func ? func : () => {}; - }; - - // sets the submit button text & action - ms.setModalSubmitData = (text, func) => { - ms._buttonSubmitText = text && text.length > 0 ? text : null; - ms._buttonSubmitFunc = func ? func : () => {}; - }; - - return ms; -}]); diff --git a/beat/web/reports/templates/reports/report.html b/beat/web/reports/templates/reports/report.html index 8d35c16a0..408849d16 100644 --- a/beat/web/reports/templates/reports/report.html +++ b/beat/web/reports/templates/reports/report.html @@ -90,7 +90,6 @@ <script src="{% fingerprint "reports/app/services/urlService.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% fingerprint "reports/app/services/reportService.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% fingerprint "reports/app/services/plotService.js" %}" type="text/javascript" charset="utf-8"></script> - <script src="{% fingerprint "reports/app/services/modalService.js" %}" type="text/javascript" charset="utf-8"></script> <!-- directives --> -- GitLab