Last change
on this file since 256 was
237,
checked in by fpvanagthoven, 13 years ago
|
- Faal met perongeluk de database committen-_- Maar is weer deleted, zou nu weer moeten werken.
- QuestionEditor? werkt nu grotendeels, paar kleine afwerkingsfoutjes (en data die nog niet in de DB passen)
- selectQuestion scherm gemaakt, is nog niet zo multifunctioneel als je zou hopen. Ideaal gezien zou dit ipv een statische PHP pagina, een JS driven widget worden die je bijvoorbeeld kan gebruiken voor "Add existing question" in de surveyEditor.
- Zelfde voor selectApplication.php en selectSurvey.php.
- objectSelectionWidget class maken voor dit doeleind? (Na demo!)
|
File size:
2.0 KB
|
Line | |
---|
1 | <?php |
---|
2 | require 'classes/master.php'; //should be at top of every page |
---|
3 | |
---|
4 | if (!isset($_SESSION['userUid'])) { |
---|
5 | redirect("index.php"); |
---|
6 | } |
---|
7 | |
---|
8 | $questions = Question::get(array()); //Get all questions |
---|
9 | ?> |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | <!DOCTYPE html> |
---|
14 | <html> |
---|
15 | <head> |
---|
16 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
---|
17 | <title>Research tool</title> |
---|
18 | <?php new Stylesheet("visualeditors"); ?> |
---|
19 | <script type="text/javascript" src="js/generalScripts.js"></script> |
---|
20 | <script type="text/javascript"> |
---|
21 | function invokeSingleQuestionEditor(uid) { |
---|
22 | var form = ce("form"); |
---|
23 | form.method = "POST"; |
---|
24 | form.action = "questionEditor.php"; |
---|
25 | var input = ce("input"); |
---|
26 | input.type="hidden"; |
---|
27 | input.name="questionUid"; |
---|
28 | input.value = uid; |
---|
29 | form.appendChild(input); |
---|
30 | form.submit(); |
---|
31 | } |
---|
32 | </script> |
---|
33 | </head> |
---|
34 | <body> |
---|
35 | <div id="header"> |
---|
36 | <?php new Logo(); ?> |
---|
37 | </div> |
---|
38 | |
---|
39 | <div id="content"> |
---|
40 | <div id="wrapper"> |
---|
41 | <div id="questionSelector" class="largeFrame"> |
---|
42 | <div class="largeTitle">Browse questions</div> |
---|
43 | <div class="content"> |
---|
44 | <select size="15" id="questionSelectBox" style="width: 350px;"> |
---|
45 | <?php |
---|
46 | foreach ($questions as $question) { |
---|
47 | echo "<option value='" . $question->uid . "'>" . $question->title . "</option>"; |
---|
48 | } |
---|
49 | ?> |
---|
50 | </select> |
---|
51 | </div> |
---|
52 | <div class="controls"> |
---|
53 | <input type="button" value="Edit" id="btnEditQuestion" class="smallButton" onclick="invokeSingleQuestionEditor(ge('questionSelectBox').value)" /> |
---|
54 | </div> |
---|
55 | </div> |
---|
56 | </div> |
---|
57 | </div> |
---|
58 | </body> |
---|
59 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.