Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/web/index.html
blob: 0df51fe3e2b7dd53f9a1138496575159c800c994 (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<html>
  <head>
    <meta charset="utf-8">
    <title>Journal Share</title>
    <link href="style.css" rel="stylesheet" type="text/css"/>
    <script src="jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">

        function init() {
            $.getJSON("/datastore/owner_info.json", function(owner_info) {
                $('#header').append("Journal of " + owner_info.nick_name);
                $('#header').css('color', owner_info.stroke_color);
                $('#header').css('background-color', owner_info.fill_color);
            });

            local = (window.location.hostname == '0.0.0.0');

            if (local) {
                $('#uploadarea').hide();
            }

            $.getJSON("/datastore/selected.json", function(selected) {
                for (var i = 0; i < selected.length; i++)
                {
                    $('#journaltable').append("<tr>" +
                        "<td><img src=/datastore/preview_id_" + selected[i].id + "></td>"+
                        "<td class='desc_td'>"+
                        "<table class='desc_table'>"+
                        "<tr><td class='title'>" + selected[i].title + "</td></tr>"+
                        "<tr><td>" + selected[i].desc + "</td></tr>"+
                        (!local ? "<tr><td>"+
                        "<a class='download_link' href='/datastore/id_" + selected[i].id +".journal'>"+
                        "Download</a></td></tr>" : "") +
                        "</table>"+
                        "</td>" +
                    "</tr>");
                }

                if (selected.length == 0) {
                    $('#journaltable').append("<tr>" +
                        "<td class='error_msg'>No item selected, " +
                        "add items to share from your Journal." +
                        "</td></tr>");
                }
            });
        }
    </script>
  </head>
  <body onload="init()">
      <div id="header">
      </div>

      <div id="uploadarea">
      <table>
      <tr><td>
      <form action="/datastore/upload" method="post" enctype="multipart/form-data">
      Add from my Journal:<br>
      <input type="file" name="journal_item" size="30">
      <input type="submit" value="Send">
      </form>
      </td></tr>
      </table>
      </div>

      <table id="journaltable">

      </table>
  </body>
</html>