From 3ccd52d6326c81565b9ea2907d3a949cbbe5c86f Mon Sep 17 00:00:00 2001 From: doccaz Date: Fri, 1 Feb 2019 17:31:36 -0200 Subject: [PATCH 01/12] implementing pt_BR keymap; adding toolbar below the canvas --- keymaps/keymapptbr.js | 249 ++++++++++++++++++++++++++++++++++++++++++ lib/floatingMenu.js | 43 ++++++++ lib/sendkey.js | 39 +++++++ 3 files changed, 331 insertions(+) create mode 100644 keymaps/keymapptbr.js create mode 100644 lib/floatingMenu.js create mode 100644 lib/sendkey.js diff --git a/keymaps/keymapptbr.js b/keymaps/keymapptbr.js new file mode 100644 index 0000000..7232405 --- /dev/null +++ b/keymaps/keymapptbr.js @@ -0,0 +1,249 @@ +// These tables map the js keyboard keys to the spice equivalent +wdi.KeymapPTBR = function() { + + // regular keys with associated chars. The columns means all the event flux to activate the key (i.e. [key up, key down]) + // all the js events associated to these keys should have a charKey associated + var charmapPTBR = {}; + + // primeira fileira + charmapPTBR['\''] = [[0x29, 0, 0, 0], [0xA9, 0, 0, 0]]; + charmapPTBR['"'] = [[0x2A, 0, 0, 0], [0x29, 0, 0, 0], [0xA9, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['1'] = [[0x2, 0, 0, 0], [0x82, 0, 0, 0]]; + charmapPTBR['!'] = [[0x2A, 0, 0, 0], [0x2, 0, 0, 0], [0x82, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['¹'] = [[0xE0, 0x38, 0, 0], [0x2, 0, 0, 0], [0x82, 0, 0, 0], [0xE0, 0xB8, 0, 0]]; + charmapPTBR['2'] = [[0x3, 0, 0, 0], [0x83, 0, 0, 0]]; + charmapPTBR['@'] = [[0x2A, 0, 0, 0], [0x3, 0, 0, 0], [0x83, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['²'] = [[0xE0, 0x38, 0, 0], [0x3, 0, 0, 0], [0x83, 0, 0, 0], [0xE0, 0xB8, 0, 0]]; + charmapPTBR['3'] = [[0x4, 0, 0, 0], [0x84, 0, 0, 0]]; + charmapPTBR['#'] = [[0x2A, 0, 0, 0], [0x4, 0, 0, 0], [0x84, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['³'] = [[0xE0, 0x38, 0, 0], [0x4, 0, 0, 0], [0x84, 0, 0, 0], [0xE0, 0xB8, 0, 0]]; + charmapPTBR['4'] = [[0x5, 0, 0, 0], [0x85, 0, 0, 0]]; + charmapPTBR['$'] = [[0x2A, 0, 0, 0], [0x5, 0, 0, 0], [0x85, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['£'] = [[0xE0, 0x38, 0, 0], [0x5, 0, 0, 0], [0x85, 0, 0, 0], [0xE0, 0xB8, 0, 0]]; + charmapPTBR['5'] = [[0x6, 0, 0, 0], [0x86, 0, 0, 0]]; + charmapPTBR['%'] = [[0x2A, 0, 0, 0], [0x6, 0, 0, 0], [0x86, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['¢'] = [[0xE0, 0x38, 0, 0], [0x6, 0, 0, 0], [0x86, 0, 0, 0], [0xE0, 0xB8, 0, 0]]; + charmapPTBR['6'] = [[0x7, 0, 0, 0], [0x87, 0, 0, 0]]; + charmapPTBR['¨'] = [[0x2A, 0, 0, 0], [0x7, 0, 0, 0], [0x87, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['¬'] = [[0xE0, 0x38, 0, 0], [0x7, 0, 0, 0], [0x87, 0, 0, 0], [0xE0, 0xB8, 0, 0]]; + charmapPTBR['7'] = [[0x8, 0, 0, 0], [0x88, 0, 0, 0]]; + charmapPTBR['&'] = [[0x2A, 0, 0, 0], [0x8, 0, 0, 0], [0x88, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['8'] = [[0x9, 0, 0, 0], [0x89, 0, 0, 0]]; + charmapPTBR['*'] = [[0x2A, 0, 0, 0], [0x9, 0, 0, 0], [0x89, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['('] = [[0x2A, 0, 0, 0], [0x0A, 0, 0, 0], [0x8A, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['9'] = [[0x0A, 0, 0, 0], [0x8A, 0, 0, 0]]; + charmapPTBR[')'] = [[0x2A, 0, 0, 0], [0x0B, 0, 0, 0], [0x8B, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['0'] = [[0x0B, 0, 0, 0], [0x8B, 0, 0, 0]]; + charmapPTBR['-'] = [[0x0C, 0, 0, 0], [0x8C, 0, 0, 0]]; + charmapPTBR['_'] = [[0x2A, 0, 0, 0], [0x0C, 0, 0, 0], [0x8C, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['+'] = [[0x1B, 0, 0, 0], [0x9B, 0, 0, 0]]; + charmapPTBR['='] = [[0x2A, 0, 0, 0], [0x0B, 0, 0, 0], [0x8B, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['§'] = [[0xE0, 0x38, 0, 0], [0x0B, 0, 0, 0], [0x8B, 0, 0, 0], [0xE0, 0xB8, 0, 0]]; + + // segunda fileira + charmapPTBR['q'] = [[0x10, 0, 0, 0], [0x90, 0, 0, 0]]; + charmapPTBR['Q'] = [[0x2A, 0, 0, 0], [0x10, 0, 0, 0], [0x90, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['w'] = [[0x11, 0, 0, 0], [0x91, 0, 0, 0]]; + charmapPTBR['W'] = [[0x2A, 0, 0, 0], [0x11, 0, 0, 0], [0x91, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['e'] = [[0x12, 0, 0, 0], [0x92, 0, 0, 0]]; + charmapPTBR['E'] = [[0x2A, 0, 0, 0], [0x12, 0, 0, 0], [0x92, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['r'] = [[0x13, 0, 0, 0], [0x93, 0, 0, 0]]; + charmapPTBR['R'] = [[0x2A, 0, 0, 0], [0x13, 0, 0, 0], [0x93, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['t'] = [[0x14, 0, 0, 0], [0x94, 0, 0, 0]]; + charmapPTBR['T'] = [[0x2A, 0, 0, 0], [0x14, 0, 0, 0], [0x94, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['y'] = [[0x15, 0, 0, 0], [0x95, 0, 0, 0]]; + charmapPTBR['Y'] = [[0x2A, 0, 0, 0], [0x15, 0, 0, 0], [0x95, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['u'] = [[0x16, 0, 0, 0], [0x96, 0, 0, 0]]; + charmapPTBR['U'] = [[0x2A, 0, 0, 0], [0x16, 0, 0, 0], [0x96, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['i'] = [[0x17, 0, 0, 0], [0x97, 0, 0, 0]]; + charmapPTBR['I'] = [[0x2A, 0, 0, 0], [0x17, 0, 0, 0], [0x97, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['o'] = [[0x18, 0, 0, 0], [0x98, 0, 0, 0]]; + charmapPTBR['O'] = [[0x2A, 0, 0, 0], [0x18, 0, 0, 0], [0x98, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['p'] = [[0x19, 0, 0, 0], [0x99, 0, 0, 0]]; + charmapPTBR['P'] = [[0x2A, 0, 0, 0], [0x19, 0, 0, 0], [0x99, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['`'] = [[0x1A, 0, 0, 0], [0x9A, 0, 0, 0]]; + charmapPTBR['´'] = [[0x2A, 0, 0, 0], [0x1A, 0, 0, 0], [0x99, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['['] = [[0x1B, 0, 0, 0], [0x9B, 0, 0, 0]]; + charmapPTBR['{'] = [[0x2A, 0, 0, 0], [0x1B, 0, 0, 0], [0x9B, 0, 0, 0], [0xAA, 0, 0, 0]]; + + + // terceira fileira + charmapPTBR['a'] = [[0x1E, 0, 0, 0], [0x9E, 0, 0, 0]]; + charmapPTBR['A'] = [[0x2A, 0, 0, 0], [0x1E, 0, 0, 0], [0x9E, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['s'] = [[0x1F, 0, 0, 0], [0x9F, 0, 0, 0]]; + charmapPTBR['S'] = [[0x2A, 0, 0, 0], [0x1F, 0, 0, 0], [0x9F, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['d'] = [[0x20, 0, 0, 0], [0xA0, 0, 0, 0]]; + charmapPTBR['D'] = [[0x2A, 0, 0, 0], [0x20, 0, 0, 0], [0xA0, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['f'] = [[0x21, 0, 0, 0], [0xA1, 0, 0, 0]]; + charmapPTBR['F'] = [[0x2A, 0, 0, 0], [0x21, 0, 0, 0], [0xA1, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['g'] = [[0x22, 0, 0, 0], [0xA2, 0, 0, 0]]; + charmapPTBR['G'] = [[0x2A, 0, 0, 0], [0x22, 0, 0, 0], [0xA2, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['h'] = [[0x23, 0, 0, 0], [0xA3, 0, 0, 0]]; + charmapPTBR['H'] = [[0x2A, 0, 0, 0], [0x23, 0, 0, 0], [0xA3, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['j'] = [[0x24, 0, 0, 0], [0xA4, 0, 0, 0]]; + charmapPTBR['J'] = [[0x2A, 0, 0, 0], [0x24, 0, 0, 0], [0xA4, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['k'] = [[0x25, 0, 0, 0], [0xA5, 0, 0, 0]]; + charmapPTBR['K'] = [[0x2A, 0, 0, 0], [0x25, 0, 0, 0], [0xA5, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['l'] = [[0x26, 0, 0, 0], [0xA6, 0, 0, 0]]; + charmapPTBR['L'] = [[0x2A, 0, 0, 0], [0x26, 0, 0, 0], [0xA6, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['ç'] = [[0x0D, 0, 0, 0], [0x8D, 0, 0, 0]]; + charmapPTBR['Ç'] = [[0x2A, 0, 0, 0], [0x0D, 0, 0, 0], [0x8D, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['^'] = [[0x2A, 0, 0, 0], [0x28, 0, 0, 0], [0xA8, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['~'] = [[0x28, 0, 0, 0], [0xA8, 0, 0, 0]]; + charmapPTBR['ª'] = [[0xE0, 0x38, 0, 0], [0x28, 0, 0, 0], [0xA8, 0, 0, 0], [0xE0, 0xB8, 0, 0]]; + charmapPTBR[']'] = [[0x2B, 0, 0, 0], [0xAB, 0, 0, 0]]; + charmapPTBR['}'] = [[0x2A, 0, 0, 0], [0x2B, 0, 0, 0], [0xAB, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['º'] = [[0xE0, 0x38, 0, 0], [0x2B, 0, 0, 0], [0xAB, 0, 0, 0], [0xE0, 0xB8, 0, 0]]; + + + // quarta fileira + charmapPTBR['\\'] = [[0x2B, 0, 0, 0], [0xAB, 0, 0, 0]]; + charmapPTBR['|'] = [[0x2A, 0, 0, 0], [0x2B, 0, 0, 0], [0xAB, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['z'] = [[0x2C, 0, 0, 0], [0xAC, 0, 0, 0]]; + charmapPTBR['Z'] = [[0x2A, 0, 0, 0], [0x2C, 0, 0, 0], [0xAC, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['x'] = [[0x2D, 0, 0, 0], [0xAD, 0, 0, 0]]; + charmapPTBR['X'] = [[0x2A, 0, 0, 0], [0x2D, 0, 0, 0], [0xAD, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['c'] = [[0x2E, 0, 0, 0], [0xAE, 0, 0, 0]]; + charmapPTBR['C'] = [[0x2A, 0, 0, 0], [0x2E, 0, 0, 0], [0xAE, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['v'] = [[0x2F, 0, 0, 0], [0xAF, 0, 0, 0]]; + charmapPTBR['V'] = [[0x2A, 0, 0, 0], [0x2F, 0, 0, 0], [0xAF, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['b'] = [[0x30, 0, 0, 0], [0xB0, 0, 0, 0]]; + charmapPTBR['B'] = [[0x2A, 0, 0, 0], [0x30, 0, 0, 0], [0xB0, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['n'] = [[0x31, 0, 0, 0], [0xB1, 0, 0, 0]]; + charmapPTBR['N'] = [[0x2A, 0, 0, 0], [0x31, 0, 0, 0], [0xB1, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['m'] = [[0x32, 0, 0, 0], [0xB2, 0, 0, 0]]; + charmapPTBR['M'] = [[0x2A, 0, 0, 0], [0x32, 0, 0, 0], [0xB2, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR[','] = [[0x33, 0, 0, 0], [0xB3, 0, 0, 0]]; + charmapPTBR['<'] = [[0x2A, 0, 0, 0], [0x33, 0, 0, 0], [0xB3, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['.'] = [[0x34, 0, 0, 0], [0xB4, 0, 0, 0]]; + charmapPTBR['>'] = [[0x2A, 0, 0, 0], [0x34, 0, 0, 0], [0xB4, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR[';'] = [[0x2A, 0, 0, 0], [0x33, 0, 0, 0], [0xB3, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR[':'] = [[0x2A, 0, 0, 0], [0x34, 0, 0, 0], [0xB4, 0, 0, 0], [0xAA, 0, 0, 0]]; + + charmapPTBR['?'] = [[0x2A, 0, 0, 0], [0x97, 0, 0, 0], [0x117, 0, 0, 0], [0xAA, 0, 0, 0]]; + charmapPTBR['/'] = [[0x35, 0, 0, 0], [0xB5, 0, 0, 0]]; + charmapPTBR['°'] = [[0xE0, 0x38, 0, 0], [0x97, 0, 0, 0], [0x117, 0, 0, 0], [0xE0, 0xB8, 0, 0]]; + + // quinta fileira + charmapPTBR[' '] = [[0x39, 0, 0, 0], [0xB9, 0, 0, 0]]; + + + // keyboard keys without character associated. + // all the js events associated to these keys should have a keyChar associated + var keymapPTBR = []; + + keymapPTBR[27] = 0x1; // ESC + keymapPTBR[9] = 0x0F; // TAB + //keymapPTBR[20] = 0x3A; // BLOQ.MAY. => see the charmap, all the capital letters and shift chars send a shift in their sequence + keymapPTBR[16] = 0x2A; // LEFT SHIFT and RIGHT SHIFT + keymapPTBR[91] = 0x5B; // LEFT GUI (META, COMMAND) + keymapPTBR[93] = 0x38; // MENU + keymapPTBR[17] = 0x1D; // LEFT CONTROL and RIGHT CONTROL + keymapPTBR[32] = 0x39; // SPACE => see the charmap + keymapPTBR[8] = 0x0E; // BACKSPACE + keymapPTBR[13] = 0x1C; // ENTER + keymapPTBR[225] = 0x5D; // RIGHT ALT (ALT GR) => see the charmap, all the altgr chars send a altgr in their sequence + keymapPTBR[18] = 0x38; // LEFT ALT + keymapPTBR[92] = 0x5C; // RIGHT GUI (WINDOWS) + keymapPTBR[38] = 0x48; // UP ARROW + keymapPTBR[37] = 0x4B; // LEFT ARROW + keymapPTBR[40] = 0x50; // DOWN ARROW + keymapPTBR[39] = 0x4D; // RIGHT ARROW + keymapPTBR[45] = 0x52; // INSERT + keymapPTBR[46] = 0x53; // DELETE + keymapPTBR[36] = 0x47; // HOME + keymapPTBR[35] = 0x4F; // FIN + keymapPTBR[33] = 0x49; // PAGE UP + keymapPTBR[34] = 0x51; // PAGE UP + keymapPTBR[144] = 0x45; // BLOQ.NUM. + keymapPTBR[145] = 0x46; // SCROLL LOCK + keymapPTBR[112] = 0x3B; // F1 + keymapPTBR[113] = 0x3C; // F2 + keymapPTBR[114] = 0x3D; // F3 + keymapPTBR[115] = 0x3E; // F4 + keymapPTBR[116] = 0x3F; // F5 + keymapPTBR[117] = 0x40; // F6 + keymapPTBR[118] = 0x41; // F7 + keymapPTBR[119] = 0x42; // F8 + keymapPTBR[120] = 0x43; // F9 + keymapPTBR[121] = 0x44; // F10 + keymapPTBR[122] = 0x57; // F11 + keymapPTBR[123] = 0x58; // F12 + + keymapPTBR[106] = 0x37; // KP_MULTIPLY + keymapPTBR[109] = 0x4A; // KP_SUBTRACT + keymapPTBR[107] = 0x4E; // KP_ADD + keymapPTBR[111] = 0x35; // KP_DIVIDE + + //keymapPTBR[220] = 0x94; // OEM_102 (backslash and pipe) + keymapPTBR[191] = 0x35; // OEM_2 (: ;) + keymapPTBR[189] = 0x0C; // OEM_MINUS + keymapPTBR[187] = 0x0D; // OEM_PLUS + keymapPTBR[219] = 0x1A; // OEM_4 (grave and acute) + keymapPTBR[221] = 0x1B; // OEM_6 ({ and [) + keymapPTBR[186] = 0x27; // OEM_1 (c-cedilla) + keymapPTBR[222] = 0x28; // OEM_7 (^~) + keymapPTBR[220] = 0x2B; // OEM_5 (}]) + keymapPTBR[192] = 0x29; // OEM_3 (' ") + keymapPTBR[188] = 0x33; // OEM_COMMA (< ,) + keymapPTBR[190] = 0x34; // OEM_PERIOD (> .) + //keymapPTBR[226] = 0xC1; // ABNT_C1 (? /) + keymapPTBR[226] = 0x35; // ABNT_C1 (? /) + + // combination keys with ctrl + var ctrlKeymapPTBR = []; + + ctrlKeymapPTBR[65] = 0x1E; // a + ctrlKeymapPTBR[81] = 0x10; // q + ctrlKeymapPTBR[87] = 0x11; // w + ctrlKeymapPTBR[69] = 0x12; // e + ctrlKeymapPTBR[82] = 0x13; // r + ctrlKeymapPTBR[84] = 0x14; // t + ctrlKeymapPTBR[89] = 0x15; // y + ctrlKeymapPTBR[85] = 0x16; // u + ctrlKeymapPTBR[73] = 0x17; // i + ctrlKeymapPTBR[79] = 0x18; // o + ctrlKeymapPTBR[80] = 0x19; // p + ctrlKeymapPTBR[65] = 0x1E; // a + ctrlKeymapPTBR[83] = 0x1F; // s + ctrlKeymapPTBR[68] = 0x20; // d + ctrlKeymapPTBR[70] = 0x21; // f + ctrlKeymapPTBR[71] = 0x22; // g + ctrlKeymapPTBR[72] = 0x23; // h + ctrlKeymapPTBR[74] = 0x24; // j + ctrlKeymapPTBR[75] = 0x25; // k + ctrlKeymapPTBR[76] = 0x26; // l + ctrlKeymapPTBR[90] = 0x2C; // z + ctrlKeymapPTBR[88] = 0x2D; // x + ctrlKeymapPTBR[67] = 0x2E; // c + //ctrlKeymapPTBR[86] = 0x2F; // v to enable set disableClipboard = true in run.js + ctrlKeymapPTBR[66] = 0x30; // b + ctrlKeymapPTBR[78] = 0x31; // n + ctrlKeymapPTBR[77] = 0x32; // m + + // reserved ctrl+? combinations we want to intercept from browser and inject manually to spice + var reservedCtrlKeymap = []; + reservedCtrlKeymap[86] = 0x2F; + + return { + getKeymap: function() { + return keymapPTBR; + }, + + getCtrlKeymap: function() { + return ctrlKeymapPTBR; + }, + + getReservedCtrlKeymap: function() { + return reservedCtrlKeymap; + }, + + getCharmap: function() { + return charmapPTBR; + }, + + setCtrlKey: function (key, val) { + ctrlKeymapPTBR[key] = val; + } + }; +}( ); diff --git a/lib/floatingMenu.js b/lib/floatingMenu.js new file mode 100644 index 0000000..7278095 --- /dev/null +++ b/lib/floatingMenu.js @@ -0,0 +1,43 @@ + +//dragElement(document.getElementById("toolbar")); +function dragElement(elmnt) { + var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0; + if (document.getElementById(elmnt.id + "header")) { + // if present, the header is where you move the DIV from: + document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown; + } else { + // otherwise, move the DIV from anywhere inside the DIV: + elmnt.onmousedown = dragMouseDown; + } + + function dragMouseDown(e) { + e = e || window.event; + e.preventDefault(); + // get the mouse cursor position at startup: + pos3 = e.clientX; + pos4 = e.clientY; + document.onmouseup = closeDragElement; + // call a function whenever the cursor moves: + document.onmousemove = elementDrag; + } + + function elementDrag(e) { + e = e || window.event; + e.preventDefault(); + // calculate the new cursor position: + pos1 = pos3 - e.clientX; + pos2 = pos4 - e.clientY; + pos3 = e.clientX; + pos4 = e.clientY; + // set the element's new position: + elmnt.style.top = (elmnt.offsetTop - pos2) + "px"; + elmnt.style.left = (elmnt.offsetLeft - pos1) + "px"; + } + + function closeDragElement() { + // stop moving when mouse button is released: + document.onmouseup = null; + document.onmousemove = null; + } +} + diff --git a/lib/sendkey.js b/lib/sendkey.js new file mode 100644 index 0000000..0292b69 --- /dev/null +++ b/lib/sendkey.js @@ -0,0 +1,39 @@ + +var sendKey=function(type,n){ + var obj={ + 'generated': true, + 'type': type, + 'keyCode': n, + 'charCode': 0 + }; + //inputProcess object,window.inputProcess= + //in application.js init, window.inputProcess=this.inputProcess; + app.inputProcess.send([type,[obj]], type); +} + +var sendCtrlAltDel=function(){ + app.disableKeyboard(); + app.sendShortcut("CtrlAltDel"); + app.enableKeyboard(); +} + + +var switchVT=function(keynum){ + var base=111; + + app.disableKeyboard(); + sendKey("keydown",17); + sendKey("keydown",18); + sendKey("keydown",base+keynum); + sendKey("keyup",base+keynum); + sendKey("keyup",18); + sendKey("keyup",17); + app.enableKeyboard(); +} + +var switchKB=function(layout){ + wdi.Keymap.loadKeyMap("us"); + wdi.Keymap.loadKeyMap(layout); + alert("mapa de teclado " + layout + " carregado."); +} + From eff09276d0db3f8d11ea84559c32c39daa38bca0 Mon Sep 17 00:00:00 2001 From: doccaz Date: Mon, 4 Feb 2019 14:00:42 -0200 Subject: [PATCH 02/12] Defaulting to US keymap; adding toolbar; adding more shortcuts --- application/application.js | 83 +++++++++++++++++++++- index.html | 141 ++++++++++++++++++++++++++++--------- keymaps/keymap.js | 36 ++++++++-- run.js | 30 ++++---- 4 files changed, 239 insertions(+), 51 deletions(-) diff --git a/application/application.js b/application/application.js index 680230b..4a01cfc 100644 --- a/application/application.js +++ b/application/application.js @@ -383,7 +383,6 @@ Application = $.spcExtend(wdi.DomainObject, { this.busConnection.disconnect(); this.spiceConnection.disconnect(); }, - setMultimediaTime: function (time) { this.multimediaTime = time; this.lastMultimediaTime = Date.now(); @@ -443,6 +442,88 @@ Application = $.spcExtend(wdi.DomainObject, { ], "keyup"); //ctrl up } + + + + if(shortcut == 'CtrlAltDel') { + this.inputProcess.send([ + "keydown", + [ + { + 'generated': true, + 'type': "keydown", + 'keyCode': 17, + 'charCode': 0 + } + ] + + ], "keydown"); //ctrl + + this.inputProcess.send([ + "keydown", + [ + { + 'generated': true, + 'type': "keydown", + 'keyCode': 18, + 'charCode': 0 + } + ] + + ], "keydown"); //alt + + this.inputProcess.send([ + "keydown", + [ + { + 'generated': true, + 'type': "keydown", + 'keyCode': 46, + 'charCode': 0 + } + ] + + ], "keydown"); //del + + this.inputProcess.send([ + "keyup", + [ + { + 'generated': true, + 'type': "keyup", + 'keyCode': 17, + 'charCode': 0 + } + ] + + ], "keyup"); //ctrl up + this.inputProcess.send([ + "keyup", + [ + { + 'generated': true, + 'type': "keyup", + 'keyCode': 18, + 'charCode': 0 + } + ] + + ], "keyup"); //alt up + this.inputProcess.send([ + "keyup", + [ + { + 'generated': true, + 'type': "keyup", + 'keyCode': 46, + 'charCode': 0 + } + ] + + ], "keyup"); //del up + + } + }, dispose: function () { diff --git a/index.html b/index.html index c28683f..c2dc4ff 100644 --- a/index.html +++ b/index.html @@ -1,35 +1,35 @@ @@ -117,18 +117,22 @@ + + + + @@ -179,9 +225,40 @@ Log
-
+ + + + + + diff --git a/keymaps/keymap.js b/keymaps/keymap.js index c62669b..04b51c9 100644 --- a/keymaps/keymap.js +++ b/keymaps/keymap.js @@ -7,7 +7,7 @@ wdi.Keymap = { ctrlKeymap: {}, charmap: {}, ctrlPressed: false, - twoBytesScanCodes: [0x5B, 0xDB, /*0x38, 0xB8,*/ 0x5C, 0xDC, 0x1D, 0x9D, 0x5D, 0xDD, 0x52, 0xD2, 0x53, 0xD3, 0x4B, 0xCB, 0x47, 0xC9, 0x4F, 0xCF, 0x48, 0xC8, 0x50, 0xD0, 0x49, 0xC9, 0x51, 0xD1, 0x4D, 0xCD, 0x1C, 0x9C], + twoBytesScanCodes: [0x5B, 0xDB, 0x1C, 0x5C, 0xDC, 0x1D, 0x9D, 0x5D, 0xDD, 0x52, 0xD2, 0x53, 0xD3, 0x4B, 0xCB, 0x47, 0xC9, 0x4F, 0xCF, 0x48, 0xC8, 0x50, 0xD0, 0x49, 0xC9, 0x51, 0xD1, 0x4D, 0xCD, 0x1C, 0x9C], loadKeyMap: function(layout) { try { @@ -16,10 +16,10 @@ wdi.Keymap = { this.reservedCtrlKeymap = wdi['Keymap' + layout.toUpperCase()].getReservedCtrlKeymap(); this.charmap = wdi['Keymap' + layout.toUpperCase()].getCharmap(); } catch(e) { - this.keymap = wdi.KeymapES.getKeymap(); - this.ctrlKeymap = wdi.KeymapES.getCtrlKeymap(); - this.reservedCtrlKeymap = wdi.KeymapES.getReservedCtrlKeymap(); - this.charmap = wdi.KeymapES.getCharmap(); + this.keymap = wdi.KeymapUS.getKeymap(); + this.ctrlKeymap = wdi.KeymapUS.getCtrlKeymap(); + this.reservedCtrlKeymap = wdi.KeymapUS.getReservedCtrlKeymap(); + this.charmap = wdi.KeymapUS.getCharmap(); } }, @@ -27,6 +27,29 @@ wdi.Keymap = { if (this.keymap[keycode] === undefined) return false; else return true; }, + checkExceptions: function(type, keyCode) { + + switch (keyCode) { + case 226: // ABNT-2 interrogation + slash + if (type == "keydown") { + return [0x35, 0, 0]; + } else { + return [0xB5, 0, 0]; + } + break; + + case 111: // OEM2 + return this.makeKeyMap(0x94); + break; + case 191: // KP_DIVIDE + return this.makeKeyMap(0x35); + break; + default: + return []; + break; + } + + }, /** * Returns the associated spice key code from the given browser keyboard event @@ -43,6 +66,7 @@ wdi.Keymap = { } else if (this.handledByNormalKeyCode(e['type'], e['keyCode'])) { return this.getScanCodeFromKeyCode(e['keyCode'], e['type'], this.keymap); } else { + this.checkExceptions(e['type'], e['keyCode']); return []; } }, @@ -50,12 +74,14 @@ wdi.Keymap = { getScanCodeFromKeyCode: function(keyCode, type, keymap, additionalKeymap) { this.controlPressed(keyCode, type); var key = null; + if(keyCode in keymap) { key = keymap[keyCode]; } else { key = additionalKeymap[keyCode]; } if (key === undefined) return []; + if (key < 0x100) { if (type == 'keydown') { return [this.makeKeymap(key)]; diff --git a/run.js b/run.js index e1e5a86..d0e0f2e 100644 --- a/run.js +++ b/run.js @@ -74,11 +74,11 @@ function start () { $(params.eventLayer).remove(); } else if (action == 'windowMoved') { $(params.canvas).css({ - 'top': params.info.top + 'px', + 'top': '0px', 'left': params.info.left + 'px' }); $(params.eventLayer).css({ - 'top': params.info.top + 'px', + 'top': '0px', 'left': params.info.left + 'px' }); } else if (action == 'init' || action == 'windowCreated') { @@ -93,11 +93,11 @@ function start () { canvas = $(item.canvas).css({ 'zIndex': 10000 - position - 1, 'position': 'absolute', - 'top': item.info.top + 'px', + 'top': '0px', 'left': item.info.left + 'px' }); eventlayer = $(item.eventLayer).css({ - 'top': item.info.top + 'px', + 'top': '0px', 'left': item.info.left + 'px', 'zIndex': 10000 - position }) @@ -106,7 +106,7 @@ function start () { } } else if (action == 'ready') { var width = $(window).width(); - var height = $(window).height(); + var height = $(window).height()-40; // launch tests if (performanceTest) { @@ -137,11 +137,11 @@ function start () { $(params.eventLayer).css({'display': 'none'}); } else if (action == 'windowMaximized') { $(params.canvas).css({ - 'top': params.info.top + 'px', + 'top': '0px', 'left': params.info.left + 'px' }); $(params.eventLayer).css({ - 'top': params.info.top + 'px', + 'top': '0px', 'left': params.info.left + 'px' }); } else if (action == 'windowRestored') { @@ -149,11 +149,11 @@ function start () { $(params.canvas).css({'display': 'block'}); $(params.eventLayer).css({'display': 'block'}); $(params.canvas).css({ - 'top': params.info.top + 'px', + 'top': '0px', 'left': params.info.left + 'px' }); $(params.eventLayer).css({ - 'top': params.info.top + 'px', + 'top': '0px', 'left': params.info.left + 'px' }); } else if (action == 'windowFocused') { @@ -193,7 +193,11 @@ function start () { $(window)['resize'](function () { app.sendCommand('setResolution', { 'width': $(window).width(), - 'height': $(window).height() + 'height': $(window).height()-40 + }); + $(params.canvas).css({ + 'top': '0px', + 'left': params.info.left + 'px' }); }); @@ -208,8 +212,8 @@ function start () { app.run({ 'callback': f, 'context': this, - 'host': getURLParameter('host') || '10.11.12.100', - 'port': getURLParameter('port') || 8000, + 'host': getURLParameter('host') || '172.18.88.44', + 'port': getURLParameter('port') || 15900, 'protocol': getURLParameter('protocol') || 'ws', 'token': '1q2w3e4r', 'vmHost': getURLParameter('vmhost') || false, @@ -225,7 +229,7 @@ function start () { 'heartbeatToken': 'heartbeat', 'heartbeatTimeout': 4000,//miliseconds 'busFileServerBaseUrl': 'https://10.11.12.200/fileserver/', - 'layout': 'es', + 'layout': 'ptbr', 'clientOffset': { 'x': 0, 'y': 0 From 626641bef577afd585c96a576d80852f0c4bf6e2 Mon Sep 17 00:00:00 2001 From: doccaz Date: Mon, 4 Feb 2019 14:03:39 -0200 Subject: [PATCH 03/12] code formatting --- index.html | 284 +++++++++++++++++++++++----------------------- keymaps/keymap.js | 228 ++++++++++++++++++------------------- run.js | 2 +- 3 files changed, 257 insertions(+), 257 deletions(-) diff --git a/index.html b/index.html index c2dc4ff..a61b0d1 100644 --- a/index.html +++ b/index.html @@ -33,143 +33,143 @@ --> - - eyeOS Spice Web Client - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + eyeOS Spice Web Client + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - + + - - - -
- - - - + + + +
+ + + + +
X
+ +
- + diff --git a/keymaps/keymap.js b/keymaps/keymap.js index 04b51c9..3847bf5 100644 --- a/keymaps/keymap.js +++ b/keymaps/keymap.js @@ -1,32 +1,32 @@ wdi.keyShortcutsHandled = { - CTRLV: 0 + CTRLV: 0 } wdi.Keymap = { - keymap: {}, - ctrlKeymap: {}, - charmap: {}, - ctrlPressed: false, + keymap: {}, + ctrlKeymap: {}, + charmap: {}, + ctrlPressed: false, twoBytesScanCodes: [0x5B, 0xDB, 0x1C, 0x5C, 0xDC, 0x1D, 0x9D, 0x5D, 0xDD, 0x52, 0xD2, 0x53, 0xD3, 0x4B, 0xCB, 0x47, 0xC9, 0x4F, 0xCF, 0x48, 0xC8, 0x50, 0xD0, 0x49, 0xC9, 0x51, 0xD1, 0x4D, 0xCD, 0x1C, 0x9C], - loadKeyMap: function(layout) { - try { - this.keymap = wdi['Keymap' + layout.toUpperCase()].getKeymap(); - this.ctrlKeymap = wdi['Keymap' + layout.toUpperCase()].getCtrlKeymap(); - this.reservedCtrlKeymap = wdi['Keymap' + layout.toUpperCase()].getReservedCtrlKeymap(); - this.charmap = wdi['Keymap' + layout.toUpperCase()].getCharmap(); - } catch(e) { + loadKeyMap: function(layout) { + try { + this.keymap = wdi['Keymap' + layout.toUpperCase()].getKeymap(); + this.ctrlKeymap = wdi['Keymap' + layout.toUpperCase()].getCtrlKeymap(); + this.reservedCtrlKeymap = wdi['Keymap' + layout.toUpperCase()].getReservedCtrlKeymap(); + this.charmap = wdi['Keymap' + layout.toUpperCase()].getCharmap(); + } catch(e) { this.keymap = wdi.KeymapUS.getKeymap(); this.ctrlKeymap = wdi.KeymapUS.getCtrlKeymap(); this.reservedCtrlKeymap = wdi.KeymapUS.getReservedCtrlKeymap(); this.charmap = wdi.KeymapUS.getCharmap(); } - }, + }, - isInKeymap: function(keycode) { - if (this.keymap[keycode] === undefined) return false; - else return true; - }, + isInKeymap: function(keycode) { + if (this.keymap[keycode] === undefined) return false; + else return true; + }, checkExceptions: function(type, keyCode) { switch (keyCode) { @@ -51,105 +51,105 @@ wdi.Keymap = { }, - /** - * Returns the associated spice key code from the given browser keyboard event - * @param e - * @returns {*} - */ - getScanCodes: function(e) { + /** + * Returns the associated spice key code from the given browser keyboard event + * @param e + * @returns {*} + */ + getScanCodes: function(e) { if (e['hasScanCode']) { return e['scanCode']; } else if (this.handledByCtrlKeyCode(e['type'], e['keyCode'], e['generated'])) {// before doing anything else we check if the event about to be handled has to be intercepted - return this.getScanCodeFromKeyCode(e['keyCode'], e['type'], this.ctrlKeymap, this.reservedCtrlKeymap); - } else if (this.handledByCharmap(e['type'])) { - return this.getScanCodesFromCharCode(e['charCode']); - } else if (this.handledByNormalKeyCode(e['type'], e['keyCode'])) { - return this.getScanCodeFromKeyCode(e['keyCode'], e['type'], this.keymap); - } else { + return this.getScanCodeFromKeyCode(e['keyCode'], e['type'], this.ctrlKeymap, this.reservedCtrlKeymap); + } else if (this.handledByCharmap(e['type'])) { + return this.getScanCodesFromCharCode(e['charCode']); + } else if (this.handledByNormalKeyCode(e['type'], e['keyCode'])) { + return this.getScanCodeFromKeyCode(e['keyCode'], e['type'], this.keymap); + } else { this.checkExceptions(e['type'], e['keyCode']); - return []; - } - }, - - getScanCodeFromKeyCode: function(keyCode, type, keymap, additionalKeymap) { - this.controlPressed(keyCode, type); - var key = null; - - if(keyCode in keymap) { - key = keymap[keyCode]; - } else { - key = additionalKeymap[keyCode]; - } - if (key === undefined) return []; - - if (key < 0x100) { - if (type == 'keydown') { - return [this.makeKeymap(key)]; - } else if (type == 'keyup') { - return [this.makeKeymap(key | 0x80)]; - } - } else { - if (type == 'keydown') { - return [this.makeKeymap(0xe0 | ((key - 0x100) << 8))]; - } else if (type == 'keyup') { - return [this.makeKeymap(0x80e0 | ((key - 0x100) << 8))]; - } - } - return key; - }, - - controlPressed: function(keyCode, type) { - if (keyCode === 17 || keyCode === 91) { // Ctrl or CMD key - if (type === 'keydown') this.ctrlPressed = true; - else if (type === 'keyup') this.ctrlPressed = false; - } - }, - - handledByCtrlKeyCode: function(type, keyCode, generated) { - if (type === 'keydown' || type === 'keyup' || type === 'keypress') { - if (this.ctrlPressed) { - if (type === 'keypress') { - return true; - } - - if (this.ctrlKeymap[keyCode]) { - return true; // is the second key in a keyboard shortcut (i.e. the x in Ctrl+x) - } - - //check if the event is a fake event generated from our gui or programatically - if(generated && this.reservedCtrlKeymap[keyCode]) { - return true; - } - } - } - return false; - }, - - handledByNormalKeyCode: function(type, keyCode) { - if (type === 'keydown' || type === 'keyup') { - if (this.keymap[keyCode]) { - return true; - } - } - return false; - }, - - handledByCharmap: function(type) { - if (type === 'inputmanager') return true; - else return false; - }, - - getScanCodesFromCharCode: function(charCode) { - var scanCode = this.charmap[String.fromCharCode(charCode)]; - if (scanCode === undefined) scanCode = []; - return scanCode; - }, - - makeKeymap: function(scancode) { - if ($.inArray(scancode, this.twoBytesScanCodes) != -1) { - return [0xE0, scancode, 0, 0]; - } else { - return [scancode, 0, 0]; - } - } + return []; + } + }, + + getScanCodeFromKeyCode: function(keyCode, type, keymap, additionalKeymap) { + this.controlPressed(keyCode, type); + var key = null; + + if(keyCode in keymap) { + key = keymap[keyCode]; + } else { + key = additionalKeymap[keyCode]; + } + if (key === undefined) return []; + + if (key < 0x100) { + if (type == 'keydown') { + return [this.makeKeymap(key)]; + } else if (type == 'keyup') { + return [this.makeKeymap(key | 0x80)]; + } + } else { + if (type == 'keydown') { + return [this.makeKeymap(0xe0 | ((key - 0x100) << 8))]; + } else if (type == 'keyup') { + return [this.makeKeymap(0x80e0 | ((key - 0x100) << 8))]; + } + } + return key; + }, + + controlPressed: function(keyCode, type) { + if (keyCode === 17 || keyCode === 91) { // Ctrl or CMD key + if (type === 'keydown') this.ctrlPressed = true; + else if (type === 'keyup') this.ctrlPressed = false; + } + }, + + handledByCtrlKeyCode: function(type, keyCode, generated) { + if (type === 'keydown' || type === 'keyup' || type === 'keypress') { + if (this.ctrlPressed) { + if (type === 'keypress') { + return true; + } + + if (this.ctrlKeymap[keyCode]) { + return true; // is the second key in a keyboard shortcut (i.e. the x in Ctrl+x) + } + + //check if the event is a fake event generated from our gui or programatically + if(generated && this.reservedCtrlKeymap[keyCode]) { + return true; + } + } + } + return false; + }, + + handledByNormalKeyCode: function(type, keyCode) { + if (type === 'keydown' || type === 'keyup') { + if (this.keymap[keyCode]) { + return true; + } + } + return false; + }, + + handledByCharmap: function(type) { + if (type === 'inputmanager') return true; + else return false; + }, + + getScanCodesFromCharCode: function(charCode) { + var scanCode = this.charmap[String.fromCharCode(charCode)]; + if (scanCode === undefined) scanCode = []; + return scanCode; + }, + + makeKeymap: function(scancode) { + if ($.inArray(scancode, this.twoBytesScanCodes) != -1) { + return [0xE0, scancode, 0, 0]; + } else { + return [scancode, 0, 0]; + } + } } diff --git a/run.js b/run.js index d0e0f2e..90cf538 100644 --- a/run.js +++ b/run.js @@ -198,7 +198,7 @@ function start () { $(params.canvas).css({ 'top': '0px', 'left': params.info.left + 'px' - }); + }); }); var useWorkers = true; From ddcbf109d88b11f6099c61d791491b0b47f9a24c Mon Sep 17 00:00:00 2001 From: doccaz Date: Tue, 5 Feb 2019 18:29:58 -0200 Subject: [PATCH 04/12] toolbar fixed; adding CSS styles; adding action buttons; adding VM information --- lib/status.js | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 lib/status.js diff --git a/lib/status.js b/lib/status.js new file mode 100644 index 0000000..ea02605 --- /dev/null +++ b/lib/status.js @@ -0,0 +1,47 @@ + + +function getUrlVars() { + var vars = {}; + var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { + vars[key] = value; + }); + return vars; +} + +function addDynamicContent() +{ + // action buttons + var tree = document.createDocumentFragment(); + var item1 = document.createElement("a"); + item1.setAttribute("id", "reset"); + item1.setAttribute("class", "btn btn-link"); + item1.setAttribute("href", "javascript:resetVM();"); + item1.appendChild(document.createTextNode("reset")); + var item1glyph = document.createElement("span"); + item1glyph.setAttribute("class", "glyphicon glyphicon-repeat"); + + var item2 = document.createElement("a"); + item2.setAttribute("id", "close"); + item2.setAttribute("class", "btn btn-link"); + item2.setAttribute("href", "javascript:window.close();"); + item2.appendChild(document.createTextNode("fechar")); + var item2glyph = document.createElement("span"); + item2glyph.setAttribute("class", "glyphicon glyphicon-log-out"); + + tree.appendChild(item1); + tree.appendChild(item1glyph); + tree.appendChild(item2); + tree.appendChild(item2glyph); + document.getElementById("action_toolbar").appendChild(tree); + + document.title = 'VM: ' + getUrlVars()["vm_name"] + ' (' + getUrlVars()["arch"] + '), IP: ' + getUrlVars()["ip_addr"]; +} + + +function resetVM(vm_name) { + + $.get("/labvirtual/restartvm?name=" + getUrlVars()["vm_name"]); + alert('Comando de reset enviado para VM ' + getUrlVars()["vm_name"] + ' com sucesso.'); + + +} From d370ade922b62dc6cf37d9c4a3b9521b7475530a Mon Sep 17 00:00:00 2001 From: doccaz Date: Tue, 5 Feb 2019 18:31:24 -0200 Subject: [PATCH 05/12] adding generic logo --- resources/logo.png | Bin 0 -> 1709 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 resources/logo.png diff --git a/resources/logo.png b/resources/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..445e1bbc0d21837c21f573f45bcc882c7b22e5cc GIT binary patch literal 1709 zcmai#dpOg39LGmUMU$doj-lvA7nY`eQ7)rgi%f25no6jV%Sgou-F{4R?cveXmMD>i zHYH)lWh=y7wpFIcT-H#w;mp$?r_pLP(u0%H|l zIo*)43V}{Hv<4CAOYnUl1SQW`{@+oxri8J8)RnNR8k6bwS}S1Nm*P9GwiQ=+1uZM= z=oy&@H6EVD#CMn6J}+6~?81MXAWTYJTY|ZgWZ`NKm+y=&T*)Q8X>6(;VH2L6gxQ}U zVf^#Hi9Ju}KU};w=~-R$>h~QpX#U!<0`QSe3bQ}^yt4`Saunt=C8|-3s9)5Qh1c{ zogKq_ncm@LUb$*(z>^Vy$Iff?w(Z1RC+BuTt=pld(f~!8Pma){eYkvfg!&@+eA~n9 zZof~Ap7+UtuqUfJc@}EZ5>@4WpfS=HtN$~(M7SJYCA&ITRY;Do(z^n;>r!)%%dngz zVXMh^rd5j_^c_$HKv!ei0Bd*|)fR`JYSmk)^rh{&u4_?A_BS1nfczMuf#>+fl6VwY zdii}CSoS6G-6jtUuM^D9l_|sJxeWfH!)b~x6>BoF4P3lG&?U_?Qp}S?$pH3lxIf-T z02-_)I-|+-D(W_y>zi(8e}*QA^WY09qAx{EuPDjA3U@)IVqG2TNU8kb-EeGB%I3)` zCUHxAzjGfa%yK7ceh?$c_y10lHV!0P+kyh*{_Y}`V+tSF1&YTzVdTiIpbnK6GL=v-3(jA!^p|gWjh%?0NA5bc^I@f zRsem?X8`9A8=8Z{^6ZvOtTX<~8G`BQ1V5<1rC)A^%q$!ocf(D+9j(v*<{dR$wz(&w zFn;q-P>vl%s~kkA)LG6(DPje{46a7D|gsFqd{dH#tf z;1sZC`JJ%MM z(fhn!U8g3icCf#9M|cF^{MdV2w3A+swiyATjQS1sA9jcQel%=kv|ut$r!^CfM=l1$ z@Z<07T_N(v@lz9WEvZvv{=k%*Eto|8BmGK%ID7yXxd*UZ$)&k!)v4UHIZ!aJS#FaX znP7?{lA(&cYJcIJoc+A5MF>Ck07C6;MJSmBh*y z#A!TyGeF%s^Zad~S#Exo$osA#&cJM=$?MhXtd=QWwaMv)zHK)Mr{+GQ#02Wtr7^2= zWoubp{qn*MYMrwU7J{-P({I{cpK<0eWL}xfzw>7Y+OFjtC*{1}xTZxq-yYn7gZj-$ zT-l1YuNDAzdA%gpbUW&OGJ#hvbpk26L=cxO_I&xw&rgJmv<-XN!v5#ca}8 z4`BHTmg-zo&>sSz(Ff=AOHbF(yG_xvyFoqsW@=V)z_*jxSYVe Date: Tue, 5 Feb 2019 18:32:09 -0200 Subject: [PATCH 06/12] fixing CSS styles --- index.html | 81 ++++++++++++++++++++++++++++++++++++---------------- lib/utils.js | 1 + 2 files changed, 57 insertions(+), 25 deletions(-) diff --git a/index.html b/index.html index a61b0d1..183d9a8 100644 --- a/index.html +++ b/index.html @@ -122,14 +122,15 @@ + - - + + - +
@@ -229,10 +249,12 @@
X
- -