# HG changeset patch # User Sebastien Jodogne # Date 1545038761 -3600 # Node ID ef17a587e10d443f09a121f034a4a9a6fd02de3d # Parent 5db446c6b2dd279ad41d7fdde7e9daee600b668e# Parent c9c2faf76bec1b3573d389a744ddae241ea2e037 integration mainline->db-changes diff -r 5db446c6b2dd -r ef17a587e10d Core/HttpServer/FilesystemHttpHandler.cpp --- a/Core/HttpServer/FilesystemHttpHandler.cpp Sat Dec 15 16:30:47 2018 +0100 +++ b/Core/HttpServer/FilesystemHttpHandler.cpp Mon Dec 17 10:26:01 2018 +0100 @@ -163,6 +163,7 @@ if (SystemToolbox::IsRegularFile(p.string())) { FilesystemHttpSender sender(p); + sender.SetContentType(SystemToolbox::AutodetectMimeType(p.string())); output.Answer(sender); // TODO COMPRESSION } else if (listDirectoryContent_ && diff -r 5db446c6b2dd -r ef17a587e10d OrthancExplorer/explorer.js --- a/OrthancExplorer/explorer.js Sat Dec 15 16:30:47 2018 +0100 +++ b/OrthancExplorer/explorer.js Mon Dec 17 10:26:01 2018 +0100 @@ -27,10 +27,10 @@ function ChangePage(page, options) { - var first = true; + let first = true; if (options) { - for (var key in options) { - var value = options[key]; + for (let key in options) { + let value = options[key]; if (first) { page += '?'; first = false; @@ -63,7 +63,7 @@ $(document).ready(function() { - var $tree = $('#dicom-tree'); + let $tree = $('#dicom-tree'); $tree.tree({ autoEscape: false }); @@ -124,7 +124,7 @@ if (s == undefined) return "No date"; - var d = ParseDicomDate(s); + let d = ParseDicomDate(s); if (d == null) return '?'; else @@ -134,16 +134,16 @@ function Sort(arr, fieldExtractor, isInteger, reverse) { - var defaultValue; + let defaultValue; if (isInteger) defaultValue = 0; else defaultValue = ''; arr.sort(function(a, b) { - var ta = fieldExtractor(a); - var tb = fieldExtractor(b); - var order; + let ta = fieldExtractor(a); + let tb = fieldExtractor(b); + let order; if (ta == undefined) ta = defaultValue; @@ -226,11 +226,11 @@ function FormatMainDicomTags(target, tags, tagsToIgnore) { - for (var i in tags) + for (let i in tags) { if (tagsToIgnore.indexOf(i) == -1) { - var v = tags[i]; + let v = tags[i]; if (i == "PatientBirthDate" || i == "StudyDate" || @@ -254,7 +254,7 @@ function FormatPatient(patient, link, isReverse) { - var node = $('
').append($('

').text(patient.MainDicomTags.PatientName)); + let node = $('
').append($('

').text(patient.MainDicomTags.PatientName)); FormatMainDicomTags(node, patient.MainDicomTags, [ "PatientName" @@ -268,7 +268,7 @@ function FormatStudy(study, link, isReverse, includePatient) { - var label; + let label; if (includePatient) { label = study.Label; @@ -276,7 +276,7 @@ label = study.MainDicomTags.StudyDescription; } - var node = $('
').append($('

').text(label)); + let node = $('
').append($('

').text(label)); if (includePatient) { FormatMainDicomTags(node, study.PatientMainDicomTags, [ @@ -296,7 +296,7 @@ function FormatSeries(series, link, isReverse) { - var c; + let c; if (series.ExpectedNumberOfInstances == null || series.Instances.length == series.ExpectedNumberOfInstances) { @@ -307,7 +307,7 @@ c = series.Instances.length + '/' + series.ExpectedNumberOfInstances; } - var node = $('
') + let node = $('
') .append($('

').text(series.MainDicomTags.SeriesDescription)) .append($('

').append($('') .text('Status: ') @@ -328,7 +328,7 @@ function FormatInstance(instance, link, isReverse) { - var node = $('

').append($('

').text('Instance: ' + instance.IndexInSeries)); + let node = $('
').append($('

').text('Instance: ' + instance.IndexInSeries)); FormatMainDicomTags(node, instance.MainDicomTags, [ "AcquisitionNumber", @@ -364,7 +364,7 @@ $('#lookup').live('pagebeforeshow', function() { // NB: "GenerateDicomDate()" is defined in "query-retrieve.js" - var target = $('#lookup-study-date'); + let target = $('#lookup-study-date'); $('option', target).remove(); target.append($('