setData.ejs 1.21 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title><%=title%></title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
    <style>
    #loading {
      display: block;
      position: absolute;
      top: 0;
      left: 0;
      z-index: 100;
      width: 100vw;
      height: 100vh;
      background-color: rgba(192, 192, 192, 0.5);
      background-image: url("../MnyxU.gif");
      background-repeat: no-repeat;
      background-position: center;
    }
    </style>
  </head>
  <body>
    <div id="loading"></div>
    <table>
      <tr>
        <td>
        Please be patient while the file '<%=path_to_fits%>' is loaded in memory
        </td>
      </tr>
    </table>
  </body>

  <script type="text/javascript">
  $( document ).ready(function(){
    document.getElementById("loading").style="block";
    $.post("setData", {"fileName": "<%=path_to_fits%>"}).done(function (resp){
      if (resp["status"]==false) {
        alert (resp["message"]);
      }
      else {
Caillat Michel's avatar
Caillat Michel committed
42
        document.location.replace("<%=urlRoot%>/visit/?path=<%=path_to_fits%>");
43
44
45
46
47
48
      }
      document.getElementById("loading").style="none";
    });
  });
  </script>
</html>