index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  5. <title></title>
  6. <link href="css/roboto.css" type="text/css" rel="stylesheet">
  7. <link rel="stylesheet" href="css/semantic.min.css"/>
  8. <link rel="stylesheet" type="text/css" href="css/codemirror.css">
  9. <link rel="stylesheet" type="text/css" href="css/show-hint.css">
  10. <link rel="stylesheet" type="text/css" href="css/ttcn.css">
  11. <link rel="stylesheet" type="text/css" href="css/ivprog-visual-1.0.css">
  12. <link rel="stylesheet" type="text/css" href="css/ivprog-term.css">
  13. <link rel="stylesheet" type="text/css" href="css/ivprog-editor.css">
  14. <script src="js/jquery.min.js"></script>
  15. <script src="js/jquery-ui.min.js"></script>
  16. <script src="js/semantic.min.js"></script>
  17. <script src="js/Sortable.js"></script>
  18. <script src="js/iassign-integration-functions.js"></script>
  19. <!-- Accessible UI CSS -->
  20. <link rel="stylesheet" href="css/accessible/style.css"/>
  21. <link rel="stylesheet" href="css/accessible/bootstrap/bootstrap.css"/>
  22. <link rel="stylesheet" href="css/accessible/bootstrap/bootstrap-grid.css"/>
  23. <link rel="stylesheet" href="css/accessible/bootstrap/bootstrap-reboot.css"/>
  24. <link rel="stylesheet" href="css/accessible/design.css"/>
  25. <link rel="stylesheet" href="css/accessible/forms_var_comand.css"/>
  26. </head>
  27. <body>
  28. <!-- Change UI -->
  29. <div class="row">
  30. <div class="col-12 text-center">
  31. <div class="btn-group">
  32. <button type="button" id="enableVisualUI">Interface interativa</button>
  33. <button type="button" id="enableAccessibleUI">Interface acessível</button>
  34. </div>
  35. </div>
  36. </div>
  37. <!-- Change UI -->
  38. <!-- Visual UI -->
  39. <div id="visualInterface">
  40. <div class="ui height_100 add_accordion" id="ui_main_div">
  41. <div class="title default_visual_title">
  42. <i class="dropdown icon"></i>
  43. </div>
  44. <div class="content height_100">
  45. <div class="ui raised container segment div_to_body">
  46. <div class="ui container main_title only_in_frame">
  47. <h2>iVProg</h2>
  48. </div>
  49. <div class="ui icon menu center aligned container" style="width: 438px; margin-top: -20px;">
  50. <a class="item active visual_coding_button">
  51. <i class="window maximize outline icon"></i>
  52. </a>
  53. <a class="item textual_coding_button">
  54. <i class="code icon"></i>
  55. </a>
  56. <a class="item upload_file_button disabled">
  57. <i class="upload icon"></i>
  58. </a>
  59. <a class="item download_file_button disabled">
  60. <i class="download icon"></i>
  61. </a>
  62. <a class="item undo_button disabled">
  63. <i class="undo icon"></i>
  64. </a>
  65. <a class="item redo_button disabled">
  66. <i class="redo icon"></i>
  67. </a>
  68. <a id="run_button" class="item run_button">
  69. <i class="play icon"></i>
  70. </a>
  71. <a id="stop_button" class="item stop_button" style="display: none">
  72. <i class="stop icon"></i>
  73. </a>
  74. <a class="item assessment assessment_button">
  75. <i class="check icon"></i>
  76. </a>
  77. <!--<a class="item expand_button">
  78. <i class="expand arrows alternate icon"></i>
  79. </a>-->
  80. <a class="item help_button">
  81. <i class="help icon"></i>
  82. </a>
  83. </div>
  84. <div class="ui one column container segment ivprog_visual_panel loading">
  85. <div class="global_var">
  86. <div class="ui icon button add-globalVar-button add_global_button purple">
  87. <i class="icons">
  88. <i class="icon superscript"
  89. style="margin-top: -2px;margin-bottom: 2px;margin-left: 1px;margin-right: 1px; font-size: 18px;"></i>
  90. <i class="corner add icon inverted"
  91. style="font-size: 10px;padding-top: 5px;padding-left: 7px;"></i>
  92. </i>
  93. </div>
  94. <div class="list_globals" id="listGlobalsHandle"></div>
  95. </div>
  96. <div class="all_functions list-group" id="listWithHandle">
  97. </div>
  98. <div class="ui teal small labeled icon button add_function_button">
  99. <data class="i18n" value="ui:btn_function">Function</data>
  100. <i class="add icon"></i>
  101. </div>
  102. <div class="program_final"></div>
  103. </div>
  104. <div class="ui one column container segment ivprog_textual_panel loading" style="display: none;">
  105. <textarea id="ivprog-text-editor" class=".ivprog_textual_code"></textarea>
  106. </div>
  107. <div id='ivprog-term-div' class="six column wide">
  108. </div>
  109. </div>
  110. </div>
  111. <div class="dimmer_content_message">
  112. <h3>Aconteceu um erro ao processar a atividade. <br> Recarregue a página para tentar novamente.</h3>
  113. <button class="positive ui button" onclick="window.parent.location.reload()">Recarregar</button>
  114. </div>
  115. <script src="js/iassign-integration-functions.js"></script>
  116. </div>
  117. </div>
  118. <!-- Visual UI -->
  119. <!-- Accessible UI -->
  120. <div class="container" id="accessibleInterface" style="display: none;">
  121. <!-- Header -->
  122. <div class="row" role="header">
  123. <!-- Title -->
  124. <div class="col-3">
  125. <header>
  126. <h1 tabindex="0">iVProg Acessível</h1>
  127. </header>
  128. </div>
  129. <!-- Title -->
  130. <!-- Screen reader shortcuts -->
  131. <div class="col-9">
  132. <nav id="nav_ir_para_conteudo" class="nav" role="navigation">
  133. <a class="nav-link" href="#inicio" title="Alt + i" accesskey="i">Ir função inicio</a>
  134. <a class="nav-link" href="#terminal" title="Alt + t" accesskey="t">Ir para o terminal</a>
  135. </nav>
  136. </div>
  137. <!-- Screen reader shortcuts -->
  138. </div>
  139. <!-- Header -->
  140. <!-- Main container -->
  141. <div id="main" class="row" role="main">
  142. <div class="col-12">
  143. <fieldset>
  144. <legend>
  145. <h1 tabindex="0" id="inicio">Função início</h1>
  146. </legend>
  147. <ol id="htmlOlCommandsVariablesVariables"></ol>
  148. <ol id="htmlOlCommandsVariablesOperations"></ol>
  149. <div id="botoes">
  150. <div class="dropdown btn btn-primary" id="bt_add_comand">
  151. <a class="btn btn-primary dropdown-toggle" role="button" tabindex="0" id="dropdownMenuLink"
  152. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  153. Comandos
  154. </a>
  155. <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
  156. <a class="dropdown-item" href="#" id="createVariableButton">
  157. Nova Variável
  158. </a>
  159. <a class="dropdown-item" href="#" id="assignVariableButton">
  160. Atribuição e Operações
  161. </a>
  162. </div>
  163. </div>
  164. <button class="btn btn-success" id="runCodeButton">
  165. Executar
  166. <i id="runCodePlayIcon" class="play icon" style="display: inline;"></i>
  167. <i id="runCodeStopIcon" class="stop icon" style="display: none;"></i>
  168. </button>
  169. </div>
  170. </fieldset>
  171. </div>
  172. </div>
  173. <!-- Main container -->
  174. <!-- Terminal -->
  175. <div class="row">
  176. <div class="col-12">
  177. <div id="terminal" style="width: 97%; margin-left: 2%"></div>
  178. </div>
  179. </div>
  180. <!-- Terminal -->
  181. <!-- Debug only -->
  182. <div class="row">
  183. <div class="col-12">
  184. <h5>Código gerado para debug - Código gerado</h5>
  185. <div style="width: 97%; margin-left: 2%; background-color: wheat; color: black;">
  186. <code id="generatedCode">
  187. </code>
  188. </div>
  189. </div>
  190. </div>
  191. <!-- Debug only -->
  192. </div>
  193. <!-- Accessible UI -->
  194. <!-- Accessible UI JS -->
  195. </body>
  196. <script>
  197. var mouseX;
  198. var mouseY;
  199. $(document).ready(() => {
  200. var $buttons = $('.ivprog_format .button'),
  201. handler = {
  202. activate: function () {
  203. $(this)
  204. .addClass('active')
  205. .siblings()
  206. .removeClass('active');
  207. }
  208. };
  209. $buttons.on('click', handler.activate);
  210. $('.ivprog_format_info').popup(
  211. {
  212. popup: $('.custom.popup'),
  213. on: 'click'
  214. });
  215. $(".data_types_dropdown").dropdown();
  216. $('.ui.dropdown').dropdown();
  217. $('.ivprog_visual_panel').removeClass("loading");
  218. $(document).mousemove(function (e) {
  219. var parentOffset = $('.ivprog_visual_panel').offset();
  220. ;
  221. mouseX = e.pageX - parentOffset.left + 300;
  222. mouseY = e.pageY - parentOffset.top + 100;
  223. /*$('.created_element').css('top', mouseY);
  224. $('.created_element').css('left', mouseX);*/
  225. });
  226. ivprogCore.LocalizedStrings.updateTagText();
  227. ivprogCore.CodeEditor.initTextEditor("ivprog-text-editor");
  228. iassingIntegration();
  229. if (iLMparameters.iLM_PARAM_TeacherAutoEval == null) {
  230. ivprogCore.initVisualUI();
  231. }
  232. ivprogCore.initAccessibleUI();
  233. });
  234. </script>
  235. <!-- Accessible JS -->
  236. <script src="js/accessible/bootstrap/bootstrap.bundle.js"></script>
  237. <script src="js/accessible/bootstrap/bootstrap.js"></script>
  238. <script>
  239. const visualInterface = document.getElementById('visualInterface');
  240. const accessibleInterface = document.getElementById('accessibleInterface');
  241. document.getElementById('enableVisualUI').addEventListener('click', (event) => {
  242. visualInterface.style.display = 'block';
  243. accessibleInterface.style.display = 'none';
  244. });
  245. document.getElementById('enableAccessibleUI').addEventListener('click', (event) => {
  246. visualInterface.style.display = 'none';
  247. accessibleInterface.style.display = 'block';
  248. });
  249. </script>
  250. </html>