|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8" /> |
| 5 | + <title>Scrawl - A Meeting Scribing Tool</title> |
| 6 | + <meta name="description" content="The Scrawl scribing tool is used to translate IRC logs into meeting minutes." /> |
| 7 | + <script type="text/javascript" src="//code.jquery.com/jquery-1.11.3.min.js"></script> |
| 8 | + <script type="text/javascript" src="scrawl.js"></script> |
| 9 | + <link href="https://fonts.googleapis.com/css?family=Droid+Serif" rel="stylesheet"> |
| 10 | + <link rel="stylesheet" type="text/css" href="/site.css" media="screen"> |
| 11 | + <link rel="stylesheet" media="screen" href="scrawl.css" /> |
| 12 | + <!--[if lt IE 9]> |
| 13 | + <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> |
| 14 | + <![endif]--> |
| 15 | + |
| 16 | + <script type="text/javascript"> |
| 17 | +// the update counter keeps track of the number of pending updates |
| 18 | +var updateCounter = 0; |
| 19 | +var updateCounterTimeout = null; |
| 20 | + |
| 21 | +// generates and outputs the minutes to the HTML output |
| 22 | +displayMinutes = function() { |
| 23 | + var ircLog = $('#irc-log').val() |
| 24 | + minutes = scrawl.generateMinutes(ircLog, 'html'); |
| 25 | + |
| 26 | + $('#html-output').html(minutes); |
| 27 | +}; |
| 28 | + |
| 29 | +// updates the minutes |
| 30 | +updateMinutes = function(event) { |
| 31 | + if(event) { |
| 32 | + updateCounter = 1; |
| 33 | + } else { |
| 34 | + updateCounter--; |
| 35 | + } |
| 36 | + |
| 37 | + if(updateCounter <= 0) { |
| 38 | + displayMinutes(); |
| 39 | + } else { |
| 40 | + if(updateCounterTimeout) { |
| 41 | + clearTimeout(updateCounterTimeout); |
| 42 | + } |
| 43 | + updateCounterTimeout = setTimeout(updateMinutes, 1000); |
| 44 | + } |
| 45 | +}; |
| 46 | + |
| 47 | +// displays each markup portion |
| 48 | +showMarkup = function(type) { |
| 49 | + var ircLog = $('#irc-log').val() |
| 50 | + // Display the appropriate markup text area based on the 'type' |
| 51 | + if(type == 'html') |
| 52 | + { |
| 53 | + var html = scrawl.htmlHeader + scrawl.generateMinutes(ircLog, 'html') + |
| 54 | + scrawl.htmlFooter; |
| 55 | + |
| 56 | + $('#irc-log').hide(); |
| 57 | + $('#text-markup').hide(); |
| 58 | + $('#html-markup').val(html); |
| 59 | + $('#html-markup').show(); |
| 60 | + } |
| 61 | + else if(type == 'text') |
| 62 | + { |
| 63 | + var text = scrawl.generateMinutes(ircLog, 'text') |
| 64 | + |
| 65 | + $('#html-markup').hide(); |
| 66 | + $('#irc-log').hide(); |
| 67 | + $('#text-markup').val(text); |
| 68 | + $('#text-markup').show(); |
| 69 | + } |
| 70 | + else |
| 71 | + { |
| 72 | + $('#text-markup').hide(); |
| 73 | + $('#html-markup').hide(); |
| 74 | + $('#irc-log').show(); |
| 75 | + } |
| 76 | +} |
| 77 | + |
| 78 | +// initialize scrawl |
| 79 | +$.getJSON( "people.json", function(people) { |
| 80 | + scrawl.group = "JSON-LD Community Group"; |
| 81 | + scrawl.people = people; |
| 82 | +}); |
| 83 | +$.get("header.html", function(header) { |
| 84 | + scrawl.htmlHeader = header; |
| 85 | +}) |
| 86 | +$.get("footer.html", function(footer) { |
| 87 | + scrawl.htmlFooter = footer; |
| 88 | +}) |
| 89 | + </script> |
| 90 | +</head> |
| 91 | +<body> |
| 92 | +<div class="light-bg" style="padding-left: 25%; padding-right: 25%;"> |
| 93 | + <div id="html-output"></div> |
| 94 | +</div> |
| 95 | + |
| 96 | +<!--textarea id="html-output" width="80" height="20"></textarea> |
| 97 | +
|
| 98 | +<textarea id="text-output" width="80" height="20"></textarea --> |
| 99 | + |
| 100 | +<section class="light-bg toolbar-height toolbar-padding"></section> |
| 101 | + |
| 102 | +<section id="toolbar"> |
| 103 | + <span class="left-column"> |
| 104 | + <textarea id="irc-log" class="toolbar-height" name="meeting-irc-log" placeholder="Paste and edit the IRC log here" onkeyup="javascript:updateMinutes(event)"></textarea> |
| 105 | + <textarea id="html-markup" style="display: none;" class="toolbar-height"></textarea> |
| 106 | + <textarea id="text-markup" style="display: none;" class="toolbar-height"></textarea> |
| 107 | + </span> |
| 108 | + <span class="right-column"> |
| 109 | + <div class="button" onclick="javascript:showMarkup('raw')">Show Raw Log</div> |
| 110 | + <div class="button" onclick="javascript:showMarkup('html')">Show HTML</div> |
| 111 | + <div class="button" onclick="javascript:showMarkup('text')">Show Text</div> |
| 112 | + </span> |
| 113 | +</section> |
| 114 | + |
| 115 | +</main> |
| 116 | +</body> |
| 117 | +</html> |
0 commit comments