Explorar el Código

HUE-7743 [frontend] Also adapt img src urls in embedded mode

Johan Ahlen hace 8 años
padre
commit
b1700d6
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      desktop/core/src/desktop/templates/hue.mako

+ 7 - 0
desktop/core/src/desktop/templates/hue.mako

@@ -882,6 +882,13 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
             $(this).attr('href', link);
           });
 
+          if (typeof adaptHueEmbeddedUrls !== 'undefined') {
+            $rawHtml.find('img[src]').each(function () {
+              var $img = $(this);
+              $img.attr('src', adaptHueEmbeddedUrls($img.attr('src')));
+            })
+          }
+
           $rawHtml.unwrap('<span>');
           scriptsPromise.done(function () {
             promise.resolve($rawHtml);