# HG changeset patch # User Sebastien Jodogne # Date 1560938638 -7200 # Node ID 7e20ee7bea37976ea69ea809b8b09e1498af6c92 # Parent 90b5bc463550783e0a075e60944dfa28aed74c45 simplification diff -r 90b5bc463550 -r 7e20ee7bea37 WebApplication/app.js --- a/WebApplication/app.js Wed Jun 19 11:59:12 2019 +0200 +++ b/WebApplication/app.js Wed Jun 19 12:03:58 2019 +0200 @@ -132,11 +132,19 @@ }); }, methods: { + /** + * Toolbox + **/ + ScrollToRef: function(refName) { var element = app.$refs[refName]; window.scrollTo(0, element.offsetTop + 200); }, + ShowErrorModal: function() { + app.$refs['modal-error'].show(); + }, + /** * Studies **/ @@ -182,9 +190,7 @@ 'Arguments' : args, }) .then(app.SetStudies) - .catch(response => { - app.$refs['modal-error'].show(); - }) + .catch(app.ShowErrorModal) }, Clear: function() { app.lookup = {}; @@ -198,18 +204,6 @@ app.lookup.server = app.servers[0]; } }, - OnAllStudies: function (event) { - event.preventDefault(); - axios - .post('../../servers/' + app.lookup.server + '/qido', { - 'Uri' : '/studies', - 'Arguments' : { 'limit' : (app.maxResults + 1).toString() } - }) - .then(app.SetStudies) - .catch(response => { - app.$refs['modal-error'].show(); - }); - }, OnLookup: function(event) { event.preventDefault(); app.ExecuteLookup(); @@ -238,9 +232,7 @@ 'StudyInstanceUID': app.studyToDelete[DICOM_TAG_STUDY_INSTANCE_UID].Value }) .then(app.ExecuteLookup) - .catch(response => { - app.$refs['modal-error'].show(); - }) + .catch(app.ShowErrorModal) }, @@ -320,9 +312,7 @@ 'SeriesInstanceUID': app.seriesToDelete[DICOM_TAG_SERIES_INSTANCE_UID].Value }) .then(app.LoadSeriesOfCurrentStudy) - .catch(response => { - app.$refs['modal-error'].show(); - }) + .catch(app.ShowErrorModal) } }, diff -r 90b5bc463550 -r 7e20ee7bea37 WebApplication/index.html --- a/WebApplication/index.html Wed Jun 19 11:59:12 2019 +0200 +++ b/WebApplication/index.html Wed Jun 19 12:03:58 2019 +0200 @@ -97,8 +97,6 @@

Do lookup - All studies Reset