فهرست منبع

HUE-2532 [search] Fix share URL on Internet Explorer

Added window.location.origin support on IE
Enrico Berti 11 سال پیش
والد
کامیت
7ce2cbb4ca
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      apps/search/src/search/templates/search.mako

+ 3 - 0
apps/search/src/search/templates/search.mako

@@ -1656,6 +1656,9 @@ $(document).ready(function () {
       $("#shareModal input[type='text']").on("focus", function () {
         this.select();
       });
+      if (!window.location.origin) {
+        window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port: "");
+      }
       var _search = window.location.search;
       var _pathname = window.location.pathname;
       if (_pathname.indexOf("${ url('search:new_search') }") > -1) {