=== modified file 'src/com/goldencode/p2j/ui/client/chui/driver/web/res/p2j.clipboard_helpers.js' --- src/com/goldencode/p2j/ui/client/chui/driver/web/res/p2j.clipboard_helpers.js 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/chui/driver/web/res/p2j.clipboard_helpers.js 2015-07-26 19:50:33 +0000 @@ -14,6 +14,7 @@ p2j.clipboard_helpers = (function() { + "use strict"; /** Clipboard helper object which will be returned from this initialization function. */ var me = {}; === modified file 'src/com/goldencode/p2j/ui/client/chui/driver/web/res/p2j.screen.js' --- src/com/goldencode/p2j/ui/client/chui/driver/web/res/p2j.screen.js 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/chui/driver/web/res/p2j.screen.js 2015-07-26 21:04:13 +0000 @@ -23,6 +23,7 @@ p2j.screen = (function() { + "use strict"; /** Screen object which will be returned from this initialization function. */ var me = {}; @@ -76,10 +77,10 @@ { me.color = color; memo = new Array(rows); - for (i = 0; i < rows; i++) + for (var i = 0; i < rows; i++) { memo[i] = new Array(cols); - for (j = 0; j < cols; j++) + for (var j = 0; j < cols; j++) { var cell = {'c': ' ', 'f': 'white', 'b': 'black', 'a': 0, 'k': 0}; cell.f = color.f; @@ -97,9 +98,9 @@ */ me.clear = function(rows, cols) { - for (i = 0; i < rows; i++) + for (var i = 0; i < rows; i++) { - for (j = 0; j < cols; j++) + for (var j = 0; j < cols; j++) { var v = memo[i][j]; v.c = ' '; @@ -157,9 +158,9 @@ me.copy = function(begRow, endRow, begCol, endCol) { var text = ""; - for (i = begRow; i <= endRow; i++) + for (var i = begRow; i <= endRow; i++) { - for (j = begCol; j <= endCol; j++) + for (var j = begCol; j <= endCol; j++) { text += memo[i][j].c; } === modified file 'src/com/goldencode/p2j/ui/client/driver/web/index.html' --- src/com/goldencode/p2j/ui/client/driver/web/index.html 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/driver/web/index.html 2015-07-26 19:50:34 +0000 @@ -21,7 +21,8 @@ require(["dojo"], function(dojo) { dojo.ready(function() - { + { + "use strict"; p2j.init({ 'isGui' : ${isGui}, 'canvas' : {'id' : 'def_win', 'size' : {'${height_name}' : ${height_val}, '${width_name}' : ${width_val}}, 'mouse' : false}, === modified file 'src/com/goldencode/p2j/ui/client/driver/web/res/p2j.clipboard.js' --- src/com/goldencode/p2j/ui/client/driver/web/res/p2j.clipboard.js 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/driver/web/res/p2j.clipboard.js 2015-07-26 19:31:50 +0000 @@ -26,6 +26,7 @@ */ p2j.clipboard = (function() { + "use strict"; /** Clipboard object which will be returned from this initialization function. */ var me = {}; === modified file 'src/com/goldencode/p2j/ui/client/driver/web/res/p2j.js' --- src/com/goldencode/p2j/ui/client/driver/web/res/p2j.js 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/driver/web/res/p2j.js 2015-07-26 20:15:59 +0000 @@ -31,8 +31,9 @@ *
  • p2j.clipboard * */ -p2j = (function() +var p2j = (function() { + "use strict"; /** The top-level web client object which will be returned from this function. */ var me = {}; === modified file 'src/com/goldencode/p2j/ui/client/driver/web/res/p2j.keyboard.js' --- src/com/goldencode/p2j/ui/client/driver/web/res/p2j.keyboard.js 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/driver/web/res/p2j.keyboard.js 2015-07-26 19:29:31 +0000 @@ -20,6 +20,7 @@ p2j.keyboard = (function() { + "use strict"; /** Keyboard object which will be returned from this initialization function. */ var me = {}; === modified file 'src/com/goldencode/p2j/ui/client/driver/web/res/p2j.keymap.js' --- src/com/goldencode/p2j/ui/client/driver/web/res/p2j.keymap.js 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/driver/web/res/p2j.keymap.js 2015-07-26 20:22:29 +0000 @@ -18,75 +18,84 @@ /** * Global definitions for common key values. */ -keys = -{ - BACKSPACE: 8, - TAB: 9, - CLEAR: 12, - ENTER: 13, - SHIFT: 16, - CTRL: 17, - ALT: 18, - PAUSE: 19, - CAPS_LOCK: 20, - ESCAPE: 27, - SPACE: 32, - PAGE_UP: 33, - PAGE_DOWN: 34, - END: 35, - HOME: 36, - LEFT_ARROW: 37, - UP_ARROW: 38, - RIGHT_ARROW: 39, - DOWN_ARROW: 40, - INSERT: 45, - DELETE: 46, - HELP: 47, - LEFT_WINDOW: 91, - RIGHT_WINDOW: 92, - SELECT: 93, - NUMPAD_0: 96, - NUMPAD_1: 97, - NUMPAD_2: 98, - NUMPAD_3: 99, - NUMPAD_4: 100, - NUMPAD_5: 101, - NUMPAD_6: 102, - NUMPAD_7: 103, - NUMPAD_8: 104, - NUMPAD_9: 105, - NUMPAD_MULTIPLY: 106, - NUMPAD_PLUS: 107, - NUMPAD_ENTER: 108, - NUMPAD_MINUS: 109, - NUMPAD_PERIOD: 110, - NUMPAD_DIVIDE: 111, - F1: 112, - F2: 113, - F3: 114, - F4: 115, - F5: 116, - F6: 117, - F7: 118, - F8: 119, - F9: 120, - F10: 121, - F11: 122, - F12: 123, - F13: 124, - F14: 125, - F15: 126, - NUM_LOCK: 144, - SCROLL_LOCK: 145, - UP_DPAD: 175, - DOWN_DPAD: 176, - LEFT_DPAD: 177, - RIGHT_DPAD: 178 -}; +var keys; + +(function() { + "use strict"; + keys = { + BACKSPACE : 8, + TAB : 9, + CLEAR : 12, + ENTER : 13, + SHIFT : 16, + CTRL : 17, + ALT : 18, + PAUSE : 19, + CAPS_LOCK : 20, + ESCAPE : 27, + SPACE : 32, + PAGE_UP : 33, + PAGE_DOWN : 34, + END : 35, + HOME : 36, + LEFT_ARROW : 37, + UP_ARROW : 38, + RIGHT_ARROW : 39, + DOWN_ARROW : 40, + INSERT : 45, + DELETE : 46, + HELP : 47, + LEFT_WINDOW : 91, + RIGHT_WINDOW : 92, + SELECT : 93, + NUMPAD_0 : 96, + NUMPAD_1 : 97, + NUMPAD_2 : 98, + NUMPAD_3 : 99, + NUMPAD_4 : 100, + NUMPAD_5 : 101, + NUMPAD_6 : 102, + NUMPAD_7 : 103, + NUMPAD_8 : 104, + NUMPAD_9 : 105, + NUMPAD_MULTIPLY : 106, + NUMPAD_PLUS : 107, + NUMPAD_ENTER : 108, + NUMPAD_MINUS : 109, + NUMPAD_PERIOD : 110, + NUMPAD_DIVIDE : 111, + F1 : 112, + F2 : 113, + F3 : 114, + F4 : 115, + F5 : 116, + F6 : 117, + F7 : 118, + F8 : 119, + F9 : 120, + F10 : 121, + F11 : 122, + F12 : 123, + F13 : 124, + F14 : 125, + F15 : 126, + NUM_LOCK : 144, + SCROLL_LOCK : 145, + UP_DPAD : 175, + DOWN_DPAD : 176, + LEFT_DPAD : 177, + RIGHT_DPAD : 178 + }; +}()); p2j.keymap = (function() { - /** Key mapping object which will be returned from this initialization function. */ + "use strict"; + + /** + * Key mapping object which will be returned from this initialization + * function. + */ var me = {}; /* normal key mapping */ @@ -94,7 +103,7 @@ /* ALT key mapping */ me.xlateAlt = {}; - + /** * Init function. */ === modified file 'src/com/goldencode/p2j/ui/client/driver/web/res/p2j.socket.js' --- src/com/goldencode/p2j/ui/client/driver/web/res/p2j.socket.js 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/driver/web/res/p2j.socket.js 2015-07-26 19:25:45 +0000 @@ -21,6 +21,8 @@ p2j.socket = (function() { + "use strict"; + /** Socket object which will be returned from this initialization function. */ var me = {}; === modified file 'src/com/goldencode/p2j/ui/client/driver/web/res/p2j.sound.js' --- src/com/goldencode/p2j/ui/client/driver/web/res/p2j.sound.js 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/driver/web/res/p2j.sound.js 2015-07-26 19:25:59 +0000 @@ -17,6 +17,8 @@ p2j.sound = (function() { + "use strict"; + /** Sound object which will be returned from this initialization function. */ var me = {}; === modified file 'src/com/goldencode/p2j/ui/client/gui/driver/web/res/p2j.clipboard_helpers.js' --- src/com/goldencode/p2j/ui/client/gui/driver/web/res/p2j.clipboard_helpers.js 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/gui/driver/web/res/p2j.clipboard_helpers.js 2015-07-26 19:49:58 +0000 @@ -14,6 +14,7 @@ p2j.clipboard_helpers = (function() { + "use strict"; /** Clipboard helper object which will be returned from this initialization function. */ var me = {}; === modified file 'src/com/goldencode/p2j/ui/client/gui/driver/web/res/p2j.screen.js' --- src/com/goldencode/p2j/ui/client/gui/driver/web/res/p2j.screen.js 2015-05-18 20:48:28 +0000 +++ src/com/goldencode/p2j/ui/client/gui/driver/web/res/p2j.screen.js 2015-07-26 19:48:56 +0000 @@ -16,6 +16,7 @@ p2j.screen = (function() { + "use strict"; /** Screen object which will be returned from this initialization function. */ var me = {};