[Xmblackberry-devel] XmBlackBerry/WebApps/golf/html golf, 1.29, 1.30
Status: Beta
Brought to you by:
rwscott
From: Rick S. <rw...@us...> - 2011-04-09 11:56:12
|
Update of /cvsroot/xmblackberry/XmBlackBerry/WebApps/golf/html In directory vz-cvs-3.sog:/tmp/cvs-serv24162/html Modified Files: golf Log Message: My BlackBerry now supports the "number" field. Get rid of all of the numericOnly calls. Index: golf =================================================================== RCS file: /cvsroot/xmblackberry/XmBlackBerry/WebApps/golf/html/golf,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** golf 9 Apr 2011 11:12:22 -0000 1.29 --- golf 9 Apr 2011 11:56:09 -0000 1.30 *************** *** 8,12 **** --> <!-- ! golf, Copyright (C) 2006 Rick Scott <rw...@us...> This program is free software; you can redistribute it and/or modify --- 8,12 ---- --> <!-- ! golf, Copyright (C) 2006-2011 Rick Scott <rw...@us...> This program is free software; you can redistribute it and/or modify *************** *** 36,40 **** </style> <title>Golf</title> ! <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no" /> <meta name="HandheldFriendly" content="true" /> --- 36,40 ---- </style> <title>Golf</title> ! <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=yes" /> <meta name="HandheldFriendly" content="true" /> *************** *** 744,748 **** mapOptions.center = myLocation; mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE; ! mapOptions.navigationControlOptions = {style: google.maps.NavigationControlStyle.DEFAULT}; if (window.blackberry) { --- 744,748 ---- mapOptions.center = myLocation; mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE; ! //mapOptions.navigationControlOptions = {style: google.maps.NavigationControlStyle.DEFAULT}; if (window.blackberry) { *************** *** 752,757 **** mapOptions.keyboardShortcuts = false; mapOptions.mapTypeControl = false; ! mapOptions.navigationControl = false; ! mapOptions.scaleControl = false; mapOptions.scrollwheel = false; mapOptions.zoom = 16; --- 752,758 ---- mapOptions.keyboardShortcuts = false; mapOptions.mapTypeControl = false; ! mapOptions.panControl = true; ! //mapOptions.navigationControl = false; ! mapOptions.zoomControl = true; mapOptions.scrollwheel = false; mapOptions.zoom = 16; *************** *** 1152,1156 **** field.defaultValue = value; ! field.type = "text"; field.value = value; field.defaultValue = defaultValue; --- 1153,1157 ---- field.defaultValue = value; ! field.type = "number"; field.value = value; field.defaultValue = defaultValue; *************** *** 1183,1187 **** function uneditOrder(field) { ! if (field.type == "text") { var order = parseInt(field.value); --- 1184,1188 ---- function uneditOrder(field) { ! if (field.type != "button") { var order = parseInt(field.value); *************** *** 2293,2331 **** } - function numericOnly(text, event) - { - if (event) - { - if (String.fromCharCode(event.keyCode) == "O" || - String.fromCharCode(event.keyCode) == "+" || - String.fromCharCode(event.keyCode) == "=") - { - var value = text.value; - - value = value.slice(0, value.length - 1); - if (isNaN(parseInt(value))) - { - value = "0"; - } - text.value = parseInt(value) + 1; - } - } - text.value = text.value.replace(/[Ww]/g, "1"); - text.value = text.value.replace(/[Ee]/g, "2"); - text.value = text.value.replace(/[Rr]/g, "3"); - text.value = text.value.replace(/[Ss]/g, "4"); - text.value = text.value.replace(/[Dd]/g, "5"); - text.value = text.value.replace(/[Ff]/g, "6"); - text.value = text.value.replace(/[Zz]/g, "7"); - text.value = text.value.replace(/[Xx]/g, "8"); - text.value = text.value.replace(/[Cc]/g, "9"); - text.value = text.value.replace(/[Mm]/g, "."); - text.value = text.value.replace(/[Ii]/g, "-"); - text.value = text.value.replace(/[^0-9.-]/g, ""); - } - function changeDistance(field) { ! if (game.courseList.holes && field.type == "text") { var hole = new Number(); --- 2294,2300 ---- } function changeDistance(field) { ! if (game.courseList.holes && field.type != "button") { var hole = new Number(); *************** *** 2372,2376 **** function changePar(field) { ! if (game.courseList.holes && field.type == "text") { var hole = new Number(); --- 2341,2345 ---- function changePar(field) { ! if (game.courseList.holes && field.type != "button") { var hole = new Number(); *************** *** 2720,2724 **** document.getElementById('ToggleGPS').disabled = true; } ! mapsAPI.src = "https://maps-api-ssl.google.com/maps/api/js?v=3.3&sensor=" + sensor + "&callback=game.initMap"; mapsAPI.type = "text/javascript"; --- 2689,2693 ---- document.getElementById('ToggleGPS').disabled = true; } ! mapsAPI.src = "https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=" + sensor + "&callback=game.initMap"; mapsAPI.type = "text/javascript"; *************** *** 2765,2769 **** </td> <td> ! <input id="CurrentPar" type="text" value="" size="1" maxlength="1" style="width: 100%" onkeyup="numericOnly(this); advancePar(this)" onblur="changePar(this)" onclick="editField(this);" /> </td> <td> --- 2734,2738 ---- </td> <td> ! <input id="CurrentPar" type="number" value="" size="1" maxlength="1" style="width: 100%" onkeyup="advancePar(this)" onblur="changePar(this)" onclick="editField(this);" /> </td> <td> *************** *** 2771,2775 **** </td> <td> ! <input id="CurrentDistance" type="text" value="" size="4" maxlength="4" style="width: 100%" onkeyup="numericOnly(this)" onblur="changeDistance(this)" onclick="editField(this);" /> </td> </tr> --- 2740,2744 ---- </td> <td> ! <input id="CurrentDistance" type="number" value="" size="4" maxlength="4" style="width: 100%" onblur="changeDistance(this)" onclick="editField(this);" /> </td> </tr> *************** *** 2795,2802 **** </td> <td> ! <input id="TeeLat" type="button" value="N/A" onkeyup="numericOnly(this)" onclick="editPosition(this)" onblur="uneditPosition(this)" style="width: 100%" /> </td> <td> ! <input id="TeeLon" type="button" value="N/A" onkeyup="numericOnly(this)" onclick="editPosition(this)" onblur="uneditPosition(this)" style="width: 100%" /> </td> </tr> --- 2764,2771 ---- </td> <td> ! <input id="TeeLat" type="button" value="N/A" onclick="editPosition(this)" onblur="uneditPosition(this)" style="width: 100%" /> </td> <td> ! <input id="TeeLon" type="button" value="N/A" onclick="editPosition(this)" onblur="uneditPosition(this)" style="width: 100%" /> </td> </tr> *************** *** 2806,2813 **** </td> <td> ! <input id="GreenLat" type="button" value="N/A" onkeyup="numericOnly(this)" onclick="editPosition(this)" onblur="uneditPosition(this)" style="width: 100%" /> </td> <td> ! <input id="GreenLon" type="button" value="N/A" onkeyup="numericOnly(this)" onclick="editPosition(this)" onblur="uneditPosition(this)" style="width: 100%" /> </td> </tr> --- 2775,2782 ---- </td> <td> ! <input id="GreenLat" type="button" value="N/A" onclick="editPosition(this)" onblur="uneditPosition(this)" style="width: 100%" /> </td> <td> ! <input id="GreenLon" type="button" value="N/A" onclick="editPosition(this)" onblur="uneditPosition(this)" style="width: 100%" /> </td> </tr> *************** *** 2880,2887 **** <td align="center"></td> <td> ! <input style="width: 100%" type="button" maxlength="1" size="1" onclick="editOrder(this)" onblur="uneditOrder(this)" onkeyup="numericOnly(this, event)" /> </td> <td> ! <input style="width: 100%" type="button" maxlength="2" size="3" onclick="editField(this);" onblur="setScore(this); uneditField(this)" onkeyup="numericOnly(this, event); advance(this, event)" /> </td> <td align="center"></td> --- 2849,2856 ---- <td align="center"></td> <td> ! <input style="width: 100%" type="button" maxlength="1" size="1" onclick="editOrder(this)" onblur="uneditOrder(this)" /> </td> <td> ! <input style="width: 100%" type="button" maxlength="2" size="3" onclick="editField(this);" onblur="setScore(this); uneditField(this)" onkeyup="advance(this, event)" /> </td> <td align="center"></td> *************** *** 2898,2905 **** <td align="center"></td> <td> ! <input style="width: 100%" type="button" maxlength="1" size="1" onclick="editOrder(this)" onblur="uneditOrder(this)" onkeyup="numericOnly(this, event)" /> </td> <td> ! <input style="width: 100%" type="button" maxlength="2" size="3" onclick="editField(this);" onblur="setScore(this); uneditField(this)" onkeyup="numericOnly(this, event); advance(this, event)" /> </td> <td align="center"></td> --- 2867,2874 ---- <td align="center"></td> <td> ! <input style="width: 100%" type="button" maxlength="1" size="1" onclick="editOrder(this)" onblur="uneditOrder(this)" /> </td> <td> ! <input style="width: 100%" type="button" maxlength="2" size="3" onclick="editField(this);" onblur="setScore(this); uneditField(this)" onkeyup="advance(this, event)" /> </td> <td align="center"></td> *************** *** 2916,2923 **** <td align="center"></td> <td> ! <input style="width: 100%" type="button" maxlength="1" size="1" onclick="editOrder(this)" onblur="uneditOrder(this)" onkeyup="numericOnly(this, event)" /> </td> <td> ! <input style="width: 100%" type="button" maxlength="2" size="3" onclick="editField(this);" onblur="setScore(this); uneditField(this)" onkeyup="numericOnly(this, event); advance(this, event)" /> </td> <td align="center"></td> --- 2885,2892 ---- <td align="center"></td> <td> ! <input style="width: 100%" type="button" maxlength="1" size="1" onclick="editOrder(this)" onblur="uneditOrder(this)" /> </td> <td> ! <input style="width: 100%" type="button" maxlength="2" size="3" onclick="editField(this);" onblur="setScore(this); uneditField(this)" onkeyup="advance(this, event)" /> </td> <td align="center"></td> *************** *** 2934,2941 **** <td align="center"></td> <td> ! <input style="width: 100%" type="button" maxlength="1" size="1" onclick="editOrder(this)" onblur="uneditOrder(this)" onkeyup="numericOnly(this, event)" /> </td> <td> ! <input style="width: 100%" type="button" maxlength="2" size="3" onclick="editField(this);" onblur="setScore(this); uneditField(this)" onkeyup="numericOnly(this, event); advance(this, event)" /> </td> <td align="center"></td> --- 2903,2910 ---- <td align="center"></td> <td> ! <input style="width: 100%" type="button" maxlength="1" size="1" onclick="editOrder(this)" onblur="uneditOrder(this)" /> </td> <td> ! <input style="width: 100%" type="button" maxlength="2" size="3" onclick="editField(this);" onblur="setScore(this); uneditField(this)" onkeyup="advance(this, event)" /> </td> <td align="center"></td> |