codeCorrectionReadOnly.html 6.03 KB
Newer Older
bbaer's avatar
bbaer committed
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <link rel="stylesheet" href="../extension/Resources/Public/Css/bootstrap.min.css">
    <link rel="stylesheet" href="../extension/Resources/Public/Css/bootstrap-theme.min.css">

    <link rel="stylesheet" href="../extension/Resources/Public/Css/qfq-bs.css">
    <title>Input Mode Switcher</title>

</head>
<body style="background-color: #f5f5f5;">
<div class="container-fluid">
     <div class="row">
        <div class="col-md-10 ">
            <div class="btn-toolbar pull-right" role="toolbar">
                <div class="btn-group" role="group">
                    <button id="save-button" type="button" class="btn btn-default navbar-btn"><span
                            class="glyphicon glyphicon-ok"></span></button>
                    <button id="close-button" type="button" class="btn btn-default navbar-btn"><span
                            class="glyphicon glyphicon-remove"></span></button>
                </div>
                <div class="btn-group" role="group">
                    <button id="delete-button" type="button" class="btn btn-default navbar-btn"><span
                            class="glyphicon glyphicon-trash"></span></button>
                </div>
                <div class="btn-group" role="group">
                    <a id="form-new-button" href="personmock.html?s=badcaffe1" class="btn btn-default navbar-btn"><span
                            class="glyphicon glyphicon-plus"></span></a>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-2"></div>
        <div class="col-md-8">

            <div class="annotate-text"
                 data-uid='{ "uid": 5,
                             "name": "Definitely not an AI",
                             "avatar": "mockData/avatar1.png"}'
                 data-file="../javascript/src/CodeCorrection.js"
                 data-annotations= '{ "annotations": [
                { "lineNumber": 15,
                  "comments": [
                    { "uid": 1,
                      "comment": "If we knew what it was we were doing, it would not be called research, would it?",
                      "dateTime": "2018-05-12 09:45:00"
                    }]
                }, { "lineNumber": 47,
                     "comments": [
                      { "uid": 1,
                        "comment": "The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science.",
                        "dateTime": "2018-05-12 09:45:00"
                    },
                    { "uid": 1,
                        "comment": "The only reason for time is so that everything does not happen at once.",
                        "dateTime": "0000-00-00 00:00:00"
                    }]
            }
               ],
            "users": [
              { "uid": 1,
               "name": "Albert Einstein",
               "avatar": "http://institutoiltonesteves.com.br/img/avatar-4.jpg"
              }
             ]}'
                 data-highlight="mockData/javascript.json"
                 data-view-only="true"
            >
            </div>

            <div class="annotate-text"
                 data-uid='{ "uid": 5,
                             "name": "Definitely not an AI",
                             "avatar": "mockData/avatar1.png"}'
                 data-file="../javascript/src/CodeCorrection.js"
                 data-target= 'codeCorrection-output1'
                 data-highlight="mockData/javascript.json"
                 data-view-only="true"
            >
            </div>

            <input id="codeCorrection-output1" name="correction-data" type="hidden"
                   value='{ "annotations": [
                { "lineNumber": 15,
                  "comments": [
                    { "uid": 1,
                      "comment": "If we knew what it was we were doing, it would not be called research, would it?",
                      "dateTime": "2018-05-12 09:45:00"
                    }]
                }, { "lineNumber": 47,
                     "comments": [
                      { "uid": 1,
                        "comment": "The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science.",
                        "dateTime": "2018-05-12 09:45:00"
                    },
                    { "uid": 1,
                        "comment": "The only reason for time is so that everything does not happen at once.",
                        "dateTime": "0000-00-00 00:00:00"
                    }]
            }
               ],
            "users": [
              { "uid": 1,
               "name": "Albert Einstein",
               "avatar": "http://institutoiltonesteves.com.br/img/avatar-4.jpg"
              }
             ]}'>
        </div>
    </div>
</div>
<p><br></p>
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/validator.min.js"></script>
<script src="../js/EventEmitter.min.js"></script>
<script src="../js/qfq.debug.js"></script>

<script type="text/javascript">
    $(function () {
        var qfqPage = new QfqNS.QfqPage({
            tabsId: 'myTabs',
            formId: 'myForm',
            submitTo: 'api/' + $("#submitTo").val(),
            deleteUrl: 'api/' + $("#deleteUrl").val(),
            fileUploadTo: 'api/' + $("#uploadTo").val(),
            fileDeleteUrl: 'api/' + $("#fileDeleteUrl").val()
        });

        QfqNS.Log.level = 0;

        //var codeCorrection = new QfqNS.CodeCorrection(qfqPage, {
        //    url: '../javascript/src/CodeCorrection.js'
        //}, $('.annotate-text'), $('#codeCorrection-output1'), {
        //    uid: 5,
        //    name: "Definitely not an AI",
        //    avatar: "mockData/avatar1.png"
        //}, 'http://localhost:63342/qfq/mockup/mockData/javascript.json');
        //codeCorrection.initialize();
    });
</script>
</body>
</html>