diff OrthancExplorer/explorer.js @ 3065:b89a4288d605

Fixed Orthanc Explorer on IE and Firefox: Explorer always show 'to many results'
author am@osimis.io
date Wed, 26 Dec 2018 11:15:17 +0100
parents c9c2faf76bec
children 5713952f60c0 81b58b549845
line wrap: on
line diff
--- a/OrthancExplorer/explorer.js	Mon Dec 24 11:41:20 2018 +0100
+++ b/OrthancExplorer/explorer.js	Wed Dec 26 11:15:17 2018 +0100
@@ -1384,16 +1384,18 @@
                       .attr('data-role', 'list-divider')
                       .text('General information about the job'));
 
-        let block = $('<li>');
-        for (let i in job) {
-          if (i == 'CreationTime' ||
-              i == 'CompletionTime' ||
-              i == 'EstimatedTimeOfArrival') {
-            AddJobDateField(block, i + ': ', job[i]);
-          } else if (i != 'InternalContent' &&
-                     i != 'Content' &&
-                     i != 'Timestamp') {
-            AddJobField(block, i + ': ', job[i]);
+        {                       
+          let block = $('<li>');
+          for (let i in job) {
+            if (i == 'CreationTime' ||
+                i == 'CompletionTime' ||
+                i == 'EstimatedTimeOfArrival') {
+              AddJobDateField(block, i + ': ', job[i]);
+            } else if (i != 'InternalContent' &&
+                      i != 'Content' &&
+                      i != 'Timestamp') {
+              AddJobField(block, i + ': ', job[i]);
+            }
           }
         }
 
@@ -1403,17 +1405,19 @@
                       .attr('data-role', 'list-divider')
                       .text('Detailed information'));
 
-        let block = $('<li>');
+        {
+          let block = $('<li>');
 
-        for (let item in job.Content) {
-          let value = job.Content[item];
-          if (typeof value !== 'string') {
-            value = JSON.stringify(value);
+          for (let item in job.Content) {
+            let value = job.Content[item];
+            if (typeof value !== 'string') {
+              value = JSON.stringify(value);
+            }
+            
+            AddJobField(block, item + ': ', value);
           }
-          
-          AddJobField(block, item + ': ', value);
         }
-
+        
         target.append(block);
         
         target.listview('refresh');