Mercurial > hg > orthanc-dicomweb
changeset 312:7e20ee7bea37 refactoring
simplification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 19 Jun 2019 12:03:58 +0200 |
parents | 90b5bc463550 |
children | 56e56e16da53 |
files | WebApplication/app.js WebApplication/index.html |
diffstat | 2 files changed, 11 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- 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) } },
--- 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 @@ <p class="pull-right"> <b-button type="submit" variant="success" @click="OnLookup" size="lg">Do lookup</b-button> - <b-button type="success" variant="primary" @click="OnAllStudies" - size="lg">All studies</b-button> <b-button type="reset" variant="outline-danger" @click="OnReset" size="lg">Reset</b-button> </p>