From 23624b855392d0cac8df0de9d0edea011ea1d7db Mon Sep 17 00:00:00 2001 From: Donald Burr Date: Sun, 18 Oct 2015 01:45:19 -0700 Subject: [PATCH] Switch to jQuery based numpad instead of relying on system keyboard --- web_app/css/external/jquery.keypad.css | 106 ++ web_app/js/external/jquery.keypad.js | 920 ++++++++++++++++++ web_app/js/external/jquery.keypad.min.js | 6 + .../external/jquery.keypad.package-2.0.1.zip | Bin 0 -> 30598 bytes web_app/js/external/jquery.plugin.js | 344 +++++++ web_app/js/external/jquery.plugin.min.js | 4 + web_app/js/sif_tools.js | 11 + web_app/sif_tools.html | 21 +- 8 files changed, 1403 insertions(+), 9 deletions(-) create mode 100644 web_app/css/external/jquery.keypad.css create mode 100644 web_app/js/external/jquery.keypad.js create mode 100644 web_app/js/external/jquery.keypad.min.js create mode 100644 web_app/js/external/jquery.keypad.package-2.0.1.zip create mode 100644 web_app/js/external/jquery.plugin.js create mode 100644 web_app/js/external/jquery.plugin.min.js diff --git a/web_app/css/external/jquery.keypad.css b/web_app/css/external/jquery.keypad.css new file mode 100644 index 0000000..3424627 --- /dev/null +++ b/web_app/css/external/jquery.keypad.css @@ -0,0 +1,106 @@ +/* Main style sheet for jQuery Keypad v2.0.0 */ +button.keypad-trigger { + width: 25px; + padding: 0px; +} +img.keypad-trigger { + margin: 2px; + vertical-align: middle; +} +.keypad-popup, .keypad-inline, .keypad-key, .keypad-special { + font-family: Arial,Helvetica,sans-serif; + font-size: 24px; +} +.keypad-popup { + display: none; + z-index: 10; + margin: 0; + padding: 0; + background-color: #fff; + color: #000; + border: 1px solid #888; + -moz-border-radius: 0.25em; + -webkit-border-radius: 0.25em; + border-radius: 0.25em; +} +.keypad-keyentry { + display: none; +} +.keypad-inline { + background-color: #fff; + border: 1px solid #888; + -moz-border-radius: 0.25em; + -webkit-border-radius: 0.25em; + border-radius: 0.25em; +} +.keypad-disabled { + position: absolute; + z-index: 100; + background-color: white; + opacity: 0.5; + filter: alpha(opacity=50); +} +.keypad-rtl { + direction: rtl; +} +.keypad-prompt { + clear: both; + text-align: center; +} +.keypad-prompt.ui-widget-header { + margin: 0.125em; +} +.keypad-row { + width: 100%; +} +.keypad-space { + display: inline-block; + margin: 0.125em; + width: 2em; +} +.keypad-half-space { + display: inline-block; + margin: 0.125em 0.0625em; + width: 1em; +} +.keypad-key, .keypad-special { + margin: 0.125em; + padding: 0em; + width: 2em; + background-color: #f4f4f4; + -moz-border-radius: 0.25em; + -webkit-border-radius: 0.25em; + border-radius: 0.25em; + text-align: center; + cursor: pointer; +} +.keypad-key[disabled] { + border: 0.125em outset; +} +.keypad-key-down { +} +.keypad-special { + width: 4.25em; +} +.keypad-spacebar { + width: 13.25em; +} +.keypad-tab { + width: 2em; +} +.keypad-clear, .keypad-back, .keypad-close, .keypad-shift { + color: #fff; + font-weight: bold; +} +.keypad-clear { + background-color: #a00; +} +.keypad-back { + background-color: #00a; +} +.keypad-close { + background-color: #0a0; +} +.keypad-shift { + background-color: #0aa; +} diff --git a/web_app/js/external/jquery.keypad.js b/web_app/js/external/jquery.keypad.js new file mode 100644 index 0000000..fb96492 --- /dev/null +++ b/web_app/js/external/jquery.keypad.js @@ -0,0 +1,920 @@ +/* http://keith-wood.name/keypad.html + Keypad field entry extension for jQuery v2.0.1. + Written by Keith Wood (kbwood{at}iinet.com.au) August 2008. + Available under the MIT (https://github.com/jquery/jquery/blob/master/LICENSE.txt) license. + Please attribute the author if you use it. */ + +(function($) { // hide the namespace + + var pluginName = 'keypad'; + + var layoutStandard = [' BSCECA', '_1_2_3_+@X', '_4_5_6_-@U', '_7_8_9_*@E', '_0_._=_/']; + + /** Create the keypad plugin. +

Sets an input field to popup a keypad for keystroke entry, + or creates an inline keypad in a div or span.

+

Expects HTML like:

+
<input type="text"> or
+<div></div>
+

Provide inline configuration like:

+
<input type="text" data-keypad="name: 'value'"/>
+ @module Keypad + @augments JQPlugin + @example $(selector).keypad() */ + $.JQPlugin.createPlugin({ + + /** The name of the plugin. */ + name: pluginName, + + /** Keypad before show callback. + Triggered before the keypad is shown. + @callback beforeShowCallback + @param div {jQuery} The div to be shown. + @param inst {object} The current instance settings. */ + + /** Keypad on keypress callback. + Triggered when a key on the keypad is pressed. + @callback keypressCallback + @param key {string} The key just pressed. + @param value {string} The full value entered so far. + @param inst {object} The current instance settings. */ + + /** Keypad on close callback. + Triggered when the keypad is closed. + @callback closeCallback + @param value {string} The full value entered so far. + @param inst {object} The current instance settings. */ + + /** Keypad is alphabetic callback. + Triggered when an alphabetic key needs to be identified. + @callback isAlphabeticCallback + @param ch {string} The key to check. + @return {boolean} True if this key is alphabetic, false if not. + @example isAlphabetic: function(ch) { + return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); + } */ + + /** Keypad is numeric callback. + Triggered when an numeric key needs to be identified. + @callback isNumericCallback + @param ch {string} The key to check. + @return {boolean} True if this key is numeric, false if not. + @example isNumeric: function(ch) { + return (ch >= '0' && ch <= '9'); + } */ + + /** Keypad to upper callback. + Triggered to convert keys to upper case. + @callback toUpperCallback + @param ch {string} The key to convert. + @return {string} The upper case version of this key. + @example toUpper: function(ch) { + return ch.toUpperCase(); + } */ + + /** Default settings for the plugin. + @property [showOn='focus'] {string} 'focus' for popup on focus, 'button' for trigger button, or 'both' for either. + @property [buttonImage=''] {string} URL for trigger button image. + @property [buttonImageOnly=false] {boolean} True if the image appears alone, false if it appears on a button. + @property [showAnim='show'] {string} Name of jQuery animation for popup. + @property [showOptions=null] {object} Options for enhanced animations. + @property [duration='normal'] {string|number} Duration of display/closure. + @property [appendText=''] {string} Display text following the text field, e.g. showing the format. + @property [useThemeRoller=false] {boolean} True to add ThemeRoller classes. + @property [keypadClass=''] {string} Additional CSS class for the keypad for an instance. + @property [prompt=''] {string} Display text at the top of the keypad. + @property [layout=this.numericLayout] {string} Layout of keys. + @property [separator=''] {string} Separator character between keys. + @property [target=null] {string|jQuery|Element} Input target for an inline keypad. + @property [keypadOnly=true] {boolean} True for entry only via the keypad, false for real keyboard too. + @property [randomiseAlphabetic=false] {boolean} True to randomise the alphabetic key positions, false to keep in order. + @property [randomiseNumeric=false] {boolean} True to randomise the numeric key positions, false to keep in order. + @property [randomiseOther=false] {boolean} True to randomise the other key positions, false to keep in order. + @property [randomiseAll=false] {boolean} True to randomise all key positions, false to keep in order. + @property [beforeShow=null] {beforeShowCallback} Callback before showing the keypad. + @property [onKeypress=null] {keypressCallback} Callback when a key is selected. + @property [onClose=null] {closeCallback} Callback when the panel is closed. */ + defaultOptions: { + showOn: 'focus', + buttonImage: '', + buttonImageOnly: false, + showAnim: 'show', + showOptions: null, + duration: 'normal', + appendText: '', + useThemeRoller: false, + keypadClass: '', + prompt: '', + layout: [], // Set at the end + separator: '', + target: null, + keypadOnly: true, + randomiseAlphabetic: false, + randomiseNumeric: false, + randomiseOther: false, + randomiseAll: false, + beforeShow: null, + onKeypress: null, + onClose: null + }, + + /** Localisations for the plugin. + Entries are objects indexed by the language code ('' being the default US/English). + Each object has the following attributes. + @property [buttonText='...'] {string} Display text for trigger button. + @property [buttonStatus='Open the keypad'] {string} Status text for trigger button. + @property [closeText='Close'] {string} Display text for close link. + @property [closeStatus='Close the keypad'] {string} Status text for close link. + @property [clearText='Clear'] {string} Display text for clear link. + @property [clearStatus='Erase all the text'] {string} Status text for clear link. + @property [backText='Back'] {string} Display text for back link. + @property [backStatus='Erase the previous character'] {string} Status text for back link. + @property [spacebarText=' '] {string} Display text for space bar. + @property [spacebarStatus='Space'] {string} Status text for space bar. + @property [enterText='Enter'] {string} Display text for carriage return. + @property [enterStatus='Carriage return'] {string} Status text for carriage return. + @property [tabText='→'] {string} Display text for tab. + @property [tabStatus='Horizontal tab'] {string} Status text for tab. + @property [shiftText='Shift'] {string} Display text for shift link. + @property [shiftStatus='Toggle upper/lower case characters'] {string} Status text for shift link. + @property [alphabeticLayout=this.qwertyAlphabetic] {string} Default layout for alphabetic characters. + @property [fullLayout=this.qwertyLayout] {string} Default layout for full keyboard. + @property [isAlphabetic=this.isAlphabetic] {isAlphabeticCallback} Function to determine if character is alphabetic. + @property [isNumeric=this.isNumeric] {isNumericCallback} Function to determine if character is numeric. + @property [toUpper=this.toUpper] {toUpperCallback} Function to convert characters to upper case. + @property [isRTL=false] {boolean} True if right-to-left language, false if left-to-right. */ + regionalOptions: { // Available regional settings, indexed by language/country code + '': { // Default regional settings - English/US + buttonText: '...', + buttonStatus: 'Open the keypad', + closeText: 'Close', + closeStatus: 'Close the keypad', + clearText: 'Clear', + clearStatus: 'Erase all the text', + backText: 'Back', + backStatus: 'Erase the previous character', + spacebarText: ' ', + spacebarStatus: 'Space', + enterText: 'Enter', + enterStatus: 'Carriage return', + tabText: '→', + tabStatus: 'Horizontal tab', + shiftText: 'Shift', + shiftStatus: 'Toggle upper/lower case characters', + alphabeticLayout: [], // Set at the end + fullLayout: [], + isAlphabetic: null, + isNumeric: null, + toUpper: null, + isRTL: false + } + }, + + /** Names of getter methods - those that can't be chained. */ + _getters: ['isDisabled'], + + _curInst: null, // The current instance in use + _disabledFields: [], // List of keypad fields that have been disabled + _keypadShowing: false, // True if the popup panel is showing , false if not + _keyCode: 0, + _specialKeys: [], + + _mainDivClass: pluginName + '-popup', // The main keypad division class + _inlineClass: pluginName + '-inline', // The inline marker class + _appendClass: pluginName + '-append', // The append marker class + _triggerClass: pluginName + '-trigger', // The trigger marker class + _disableClass: pluginName + '-disabled', // The disabled covering marker class + _inlineEntryClass: pluginName + '-keyentry', // The inline entry marker class + _rtlClass: pluginName + '-rtl', // The right-to-left marker class + _rowClass: pluginName + '-row', // The keypad row marker class + _promptClass: pluginName + '-prompt', // The prompt marker class + _specialClass: pluginName + '-special', // The special key marker class + _namePrefixClass: pluginName + '-', // The key name marker class prefix + _keyClass: pluginName + '-key', // The key marker class + _keyDownClass: pluginName + '-key-down', // The key down marker class + + // Standard US keyboard alphabetic layout + qwertyAlphabetic: ['qwertyuiop', 'asdfghjkl', 'zxcvbnm'], + // Standard US keyboard layout + qwertyLayout: ['!@#$%^&*()_=' + this.HALF_SPACE + this.SPACE + this.CLOSE, + this.HALF_SPACE + '`~[]{}<>\\|/' + this.SPACE + '789', + 'qwertyuiop\'"' + this.HALF_SPACE + '456', + this.HALF_SPACE + 'asdfghjkl;:' + this.SPACE + '123', + this.SPACE + 'zxcvbnm,.?' + this.SPACE + this.HALF_SPACE + '-0+', + '' + this.TAB + this.ENTER + this.SPACE_BAR + this.SHIFT + + this.HALF_SPACE + this.BACK + this.CLEAR], + + /** Add the definition of a special key. + @param id {string} The identifier for this key - access via $.keypad.xxx.. + @param name {string} The prefix for localisation strings and the suffix for a class name. + @param action {function} The action performed for this key - receives inst as a parameter. + @param noHighlight {boolean} True to suppress highlight when using ThemeRoller. + @return {Keypad} The keypad object for chaining further calls. + @example $.keypad.addKeyDef('CLEAR', 'clear', function(inst) { plugin._clearValue(inst); }); */ + addKeyDef: function(id, name, action, noHighlight) { + if (this._keyCode == 32) { + throw 'Only 32 special keys allowed'; + } + this[id] = String.fromCharCode(this._keyCode++); + this._specialKeys.push({code: this[id], id: id, name: name, + action: action, noHighlight: noHighlight}); + return this; + }, + + /** Additional setup for the keypad. + Create popup div. */ + _init: function() { + this.mainDiv = $(''); + this._super(); + }, + + _instSettings: function(elem, options) { + var inline = !elem[0].nodeName.toLowerCase().match(/input|textarea/); + return {_inline: inline, ucase: false, + _mainDiv: (inline ? $('
') : plugin.mainDiv)}; + }, + + _postAttach: function(elem, inst) { + if (inst._inline) { + elem.append(inst._mainDiv). + on('click.' + inst.name, function() { inst._input.focus(); }); + this._updateKeypad(inst); + } + else if (elem.is(':disabled')) { + this.disable(elem); + } + }, + + /** Determine the input field for the keypad. + @private + @param elem {jQuery} The target control. + @param inst {object} The instance settings. */ + _setInput: function(elem, inst) { + inst._input = $(!inst._inline ? elem : inst.options.target || + ''); + if (inst._inline) { + elem.find('input').remove(); + if (!inst.options.target) { + elem.append(inst._input); + } + } + }, + + _optionsChanged: function(elem, inst, options) { + $.extend(inst.options, options); + elem.off('.' + inst.name). + siblings('.' + this._appendClass).remove().end(). + siblings('.' + this._triggerClass).remove(); + var appendText = inst.options.appendText; + if (appendText) { + elem[inst.options.isRTL ? 'before' : 'after']( + '' + appendText + ''); + } + if (!inst._inline) { + if (inst.options.showOn == 'focus' || inst.options.showOn == 'both') { + // pop-up keypad when in the marked field + elem.on('focus.' + inst.name, this.show). + on('keydown.' + inst.name, this._doKeyDown); + } + if (inst.options.showOn == 'button' || inst.options.showOn == 'both') { + // pop-up keypad when button clicked + var buttonStatus = inst.options.buttonStatus; + var buttonImage = inst.options.buttonImage; + var trigger = $(inst.options.buttonImageOnly ? + $('' +
+						buttonStatus + '') : + $(''). + html(buttonImage == '' ? inst.options.buttonText : + $('' +
+						buttonStatus + ''))); + elem[inst.options.isRTL ? 'before' : 'after'](trigger); + trigger.addClass(this._triggerClass).click(function() { + if (plugin._keypadShowing && plugin._lastField == elem[0]) { + plugin.hide(); + } + else { + plugin.show(elem[0]); + } + return false; + }); + } + } + inst.saveReadonly = elem.attr('readonly'); + elem[inst.options.keypadOnly ? 'attr' : 'removeAttr']('readonly', true). + on('setData.' + inst.name, function(event, key, value) { + inst.options[key] = value; + }). + on('getData.' + inst.name, function(event, key) { + return inst.options[key]; + }); + this._setInput(elem, inst); + this._updateKeypad(inst); + }, + + _preDestroy: function(elem, inst) { + if (this._curInst == inst) { + this.hide(); + } + elem.siblings('.' + this._appendClass).remove().end(). + siblings('.' + this._triggerClass).remove().end(). + prev('.' + this._inlineEntryClass).remove(); + elem.empty().off('.' + inst.name) + [inst.saveReadonly ? 'attr' : 'removeAttr']('readonly', true); + inst._input.removeData(inst.name); + }, + + /** Enable the keypad for a jQuery selection. + @param elem {Element} The target text field. + @example $(selector).keypad('enable'); */ + enable: function(elem) { + elem = $(elem); + if (!elem.hasClass(this._getMarker())) { + return; + } + var nodeName = elem[0].nodeName.toLowerCase(); + if (nodeName.match(/input|textarea/)) { + elem.prop('disabled', false). + siblings('button.' + this._triggerClass).prop('disabled', false).end(). + siblings('img.' + this._triggerClass).css({opacity: '1.0', cursor: ''}); + } + else if (nodeName.match(/div|span/)) { + elem.children('.' + this._disableClass).remove(); + this._getInst(elem)._mainDiv.find('button').prop('disabled', false); + } + this._disabledFields = $.map(this._disabledFields, + function(value) { return (value == elem[0] ? null : value); }); // delete entry + }, + + /** Disable the keypad for a jQuery selection. + @param elem {Element} The target text field. + @example $(selector).keypad('disable'); */ + disable: function(elem) { + elem = $(elem); + if (!elem.hasClass(this._getMarker())) { + return; + } + var nodeName = elem[0].nodeName.toLowerCase(); + if (nodeName.match(/input|textarea/)) { + elem.prop('disabled', true). + siblings('button.' + this._triggerClass).prop('disabled', true).end(). + siblings('img.' + this._triggerClass).css({opacity: '0.5', cursor: 'default'}); + } + else if (nodeName.match(/div|span/)) { + var inline = elem.children('.' + this._inlineClass); + var offset = inline.offset(); + var relOffset = {left: 0, top: 0}; + inline.parents().each(function() { + if ($(this).css('position') == 'relative') { + relOffset = $(this).offset(); + return false; + } + }); + elem.prepend('
'); + this._getInst(elem)._mainDiv.find('button').prop('disabled', true); + } + this._disabledFields = $.map(this._disabledFields, + function(value) { return (value == elem[0] ? null : value); }); // delete entry + this._disabledFields[this._disabledFields.length] = elem[0]; + }, + + /** Is the text field disabled as a keypad? + @param elem {Element} The target text field. + @return {boolean} True if disabled, false if enabled. + @example var disabled = $(selector).keypad('isDisabled'); */ + isDisabled: function(elem) { + return (elem && $.inArray(elem, this._disabledFields) > -1); + }, + + /** Pop-up the keypad for a given text field. + @param elem {Element|Event} The text field attached to the keypad or event if triggered by focus. + @example $(selector).keypad('show'); */ + show: function(elem) { + elem = elem.target || elem; + if (plugin.isDisabled(elem) || plugin._lastField == elem) { // already here + return; + } + var inst = plugin._getInst(elem); + plugin.hide(null, ''); + plugin._lastField = elem; + plugin._pos = plugin._findPos(elem); + plugin._pos[1] += elem.offsetHeight; // add the height + var isFixed = false; + $(elem).parents().each(function() { + isFixed |= $(this).css('position') == 'fixed'; + return !isFixed; + }); + var offset = {left: plugin._pos[0], top: plugin._pos[1]}; + plugin._pos = null; + // determine sizing offscreen + inst._mainDiv.css({position: 'absolute', display: 'block', top: '-1000px', width: 'auto'}); + plugin._updateKeypad(inst); + // and adjust position before showing + offset = plugin._checkOffset(inst, offset, isFixed); + inst._mainDiv.css({position: (isFixed ? 'fixed' : 'absolute'), display: 'none', + left: offset.left + 'px', top: offset.top + 'px'}); + var duration = inst.options.duration; + var showAnim = inst.options.showAnim; + var postProcess = function() { + plugin._keypadShowing = true; + }; + if ($.effects && ($.effects[showAnim] || ($.effects.effect && $.effects.effect[showAnim]))) { + var data = inst._mainDiv.data(); // Update old effects data + for (var key in data) { + if (key.match(/^ec\.storage\./)) { + data[key] = inst._mainDiv.css(key.replace(/ec\.storage\./, '')); + } + } + inst._mainDiv.data(data).show(showAnim, + inst.options.showOptions || {}, duration, postProcess); + } + else { + inst._mainDiv[showAnim || 'show']((showAnim ? duration : 0), postProcess); + } + if (inst._input[0].type != 'hidden') { + inst._input[0].focus(); + } + plugin._curInst = inst; + }, + + /** Generate the keypad content. + @private + @param inst {object} The instance settings. */ + _updateKeypad: function(inst) { + var borders = this._getBorders(inst._mainDiv); + inst._mainDiv.empty().append(this._generateHTML(inst)). + removeClass().addClass(inst.options.keypadClass + + (inst.options.useThemeRoller ? ' ui-widget ui-widget-content' : '') + + (inst.options.isRTL ? ' ' + this._rtlClass : '') + ' ' + + (inst._inline ? this._inlineClass : this._mainDivClass)); + if ($.isFunction(inst.options.beforeShow)) { + inst.options.beforeShow.apply((inst._input ? inst._input[0] : null), + [inst._mainDiv, inst]); + } + }, + + /** Retrieve the size of left and top borders for an element. + @private + @param elem {jQuery} The element of interest. + @return {number[]} The left and top borders. */ + _getBorders: function(elem) { + var convert = function(value) { + return {thin: 1, medium: 3, thick: 5}[value] || value; + }; + return [parseFloat(convert(elem.css('border-left-width'))), + parseFloat(convert(elem.css('border-top-width')))]; + }, + + /** Check positioning to remain on screen. + @private + @param inst {object} The instance settings. + @param offset {object} The current offset. + @param isFixed {boolean} True if the text field is fixed in position. + @return {object} The updated offset. */ + _checkOffset: function(inst, offset, isFixed) { + var pos = inst._input ? this._findPos(inst._input[0]) : null; + var browserWidth = window.innerWidth || document.documentElement.clientWidth; + var browserHeight = window.innerHeight || document.documentElement.clientHeight; + var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; + var scrollY = document.documentElement.scrollTop || document.body.scrollTop; + // recalculate width as otherwise set to 100% + var width = 0; + inst._mainDiv.find(':not(div)').each(function() { + width = Math.max(width, this.offsetLeft + $(this).outerWidth(true)); + }); + inst._mainDiv.css('width', width + 1); + // reposition keypad panel horizontally if outside the browser window + if (inst.options.isRTL || + (offset.left + inst._mainDiv.outerWidth() - scrollX) > browserWidth) { + offset.left = Math.max((isFixed ? 0 : scrollX), + pos[0] + (inst._input ? inst._input.outerWidth() : 0) - + (isFixed ? scrollX : 0) - inst._mainDiv.outerWidth()); + } + else { + offset.left = Math.max((isFixed ? 0 : scrollX), offset.left - (isFixed ? scrollX : 0)); + } + // reposition keypad panel vertically if outside the browser window + if ((offset.top + inst._mainDiv.outerHeight() - scrollY) > browserHeight) { + offset.top = Math.max((isFixed ? 0 : scrollY), + pos[1] - (isFixed ? scrollY : 0) - inst._mainDiv.outerHeight()); + } + else { + offset.top = Math.max((isFixed ? 0 : scrollY), offset.top - (isFixed ? scrollY : 0)); + } + return offset; + }, + + /** Find an object's position on the screen. + @private + @param obj {Element} The element to find the position for. + @return {number[]} The element's position. */ + _findPos: function(obj) { + while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) { + obj = obj.nextSibling; + } + var position = $(obj).offset(); + return [position.left, position.top]; + }, + + /** Hide the keypad from view. + @param elem {Element} The text field attached to the keypad. + @param duration {string} The duration over which to close the keypad. + @example $(selector).keypad('hide') */ + hide: function(elem, duration) { + var inst = this._curInst; + if (!inst || (elem && inst != $.data(elem, this.name))) { + return; + } + if (this._keypadShowing) { + duration = (duration != null ? duration : inst.options.duration); + var showAnim = inst.options.showAnim; + if ($.effects && ($.effects[showAnim] || ($.effects.effect && $.effects.effect[showAnim]))) { + inst._mainDiv.hide(showAnim, inst.options.showOptions || {}, duration); + } + else { + inst._mainDiv[(showAnim == 'slideDown' ? 'slideUp' : + (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))](showAnim ? duration : 0); + } + } + if ($.isFunction(inst.options.onClose)) { + inst.options.onClose.apply((inst._input ? inst._input[0] : null), // trigger custom callback + [inst._input.val(), inst]); + } + if (this._keypadShowing) { + this._keypadShowing = false; + this._lastField = null; + } + if (inst._inline) { + inst._input.val(''); + } + this._curInst = null; + }, + + /** Handle keystrokes. + @private + @param event {Event} The key event. */ + _doKeyDown: function(event) { + if (event.keyCode == 9) { // Tab out + plugin.mainDiv.stop(true, true); + plugin.hide(); + } + }, + + /** Close keypad if clicked elsewhere. + @private + @param event {Event} The mouseclick details. */ + _checkExternalClick: function(event) { + if (!plugin._curInst) { + return; + } + var target = $(event.target); + if (target.closest('.' + plugin._mainDivClass).length === 0 && + !target.hasClass(plugin._getMarker()) && + target.closest('.' + plugin._triggerClass).length === 0 && + plugin._keypadShowing) { + plugin.hide(); + } + }, + + /** Toggle between upper and lower case. + @private + @param inst {object} The instance settings. */ + _shiftKeypad: function(inst) { + inst.ucase = !inst.ucase; + this._updateKeypad(inst); + inst._input.focus(); // for further typing + }, + + /** Erase the text field. + @private + @param inst {object} The instance settings. */ + _clearValue: function(inst) { + this._setValue(inst, '', 0); + this._notifyKeypress(inst, plugin.DEL); + }, + + /** Erase the last character. + @private + @param inst {object} The instance settings. */ + _backValue: function(inst) { + var elem = inst._input[0]; + var value = inst._input.val(); + var range = [value.length, value.length]; + range = (inst._input.prop('readonly') || inst._input.prop('disabled') ? range : + (elem.setSelectionRange /* Mozilla */ ? [elem.selectionStart, elem.selectionEnd] : + (elem.createTextRange /* IE */ ? this._getIERange(elem) : range))); + this._setValue(inst, (value.length == 0 ? '' : + value.substr(0, range[0] - 1) + value.substr(range[1])), range[0] - 1); + this._notifyKeypress(inst, plugin.BS); + }, + + /** Update the text field with the selected value. + @private + @param inst {object} The instance settings. + @param value {string} The new character to add. */ + _selectValue: function(inst, value) { + this.insertValue(inst._input[0], value); + this._setValue(inst, inst._input.val()); + this._notifyKeypress(inst, value); + }, + + /** Update the text field with the selected value. + @param input {string|Element|jQuery} The jQuery selector, input field, or jQuery collection. + @param value {string} The new character to add. + @example $.keypad.insertValue(field, 'abc'); */ + insertValue: function(input, value) { + input = (input.jquery ? input : $(input)); + var elem = input[0]; + var newValue = input.val(); + var range = [newValue.length, newValue.length]; + range = (input.attr('readonly') || input.attr('disabled') ? range : + (elem.setSelectionRange /* Mozilla */ ? [elem.selectionStart, elem.selectionEnd] : + (elem.createTextRange /* IE */ ? this._getIERange(elem) : range))); + input.val(newValue.substr(0, range[0]) + value + newValue.substr(range[1])); + pos = range[0] + value.length; + if (input.is(':visible')) { + input.focus(); // for further typing + } + if (elem.setSelectionRange) { // Mozilla + if (input.is(':visible')) { + elem.setSelectionRange(pos, pos); + } + } + else if (elem.createTextRange) { // IE + range = elem.createTextRange(); + range.move('character', pos); + range.select(); + } + }, + + /** Get the coordinates for the selected area in the text field in IE. + @private + @param elem {Element} The target text field. + @return {number[]} The start and end positions of the selection. */ + _getIERange: function(elem) { + elem.focus(); + var selectionRange = document.selection.createRange().duplicate(); + // Use two ranges: before and selection + var beforeRange = this._getIETextRange(elem); + beforeRange.setEndPoint('EndToStart', selectionRange); + // Check each range for trimmed newlines by shrinking the range by one + // character and seeing if the text property has changed. If it has not + // changed then we know that IE has trimmed a \r\n from the end. + var checkCRLF = function(range) { + var origText = range.text; + var text = origText; + var finished = false; + while (true) { + if (range.compareEndPoints('StartToEnd', range) == 0) { + break; + } + else { + range.moveEnd('character', -1); + if (range.text == origText) { + text += '\r\n'; + } + else { + break; + } + } + } + return text; + }; + var beforeText = checkCRLF(beforeRange); + var selectionText = checkCRLF(selectionRange); + return [beforeText.length, beforeText.length + selectionText.length]; + }, + + /** Create an IE text range for the text field. + @private + @param elem {Element} The target text field. + @return {object} The corresponding text range. */ + _getIETextRange: function(elem) { + var isInput = (elem.nodeName.toLowerCase() == 'input'); + var range = (isInput ? elem.createTextRange() : document.body.createTextRange()); + if (!isInput) { + range.moveToElementText(elem); // Selects all the text for a textarea + } + return range; + }, + + /** Set the text field to the selected value, and trigger any on change event. + @private + @param inst {object} The instance settings. + @param value {string} The new value for the text field. */ + _setValue: function(inst, value) { + var maxlen = inst._input.attr('maxlength'); + if (maxlen > -1) { + value = value.substr(0, maxlen); + } + inst._input.val(value); + if (!$.isFunction(inst.options.onKeypress)) { + inst._input.trigger('change'); // fire the change event + } + }, + + /** Notify clients of a keypress. + @private + @param inst {object} The instance settings. + @param key {string} The character pressed. */ + _notifyKeypress: function(inst, key) { + if ($.isFunction(inst.options.onKeypress)) { // trigger custom callback + inst.options.onKeypress.apply((inst._input ? inst._input[0] : null), + [key, inst._input.val(), inst]); + } + }, + + /** Generate the HTML for the current state of the keypad. + @private + @param inst {object} The instance settings. + @return {jQuery} The HTML for this keypad. */ + _generateHTML: function(inst) { + var html = (!inst.options.prompt ? '' : '
' + + inst.options.prompt + '
'); + var layout = this._randomiseLayout(inst); + for (var i = 0; i < layout.length; i++) { + html += '
'; + var keys = layout[i].split(inst.options.separator); + for (var j = 0; j < keys.length; j++) { + if (inst.ucase) { + keys[j] = inst.options.toUpper(keys[j]); + } + var keyDef = this._specialKeys[keys[j].charCodeAt(0)]; + if (keyDef) { + html += (keyDef.action ? '' : + '
'); + } + else { + html += ''; + } + } + html += '
'; + } + html = $(html); + var thisInst = inst; + var activeClasses = this._keyDownClass + + (inst.options.useThemeRoller ? ' ui-state-active' : ''); + html.find('button').mousedown(function() { $(this).addClass(activeClasses); }). + mouseup(function() { $(this).removeClass(activeClasses); }). + mouseout(function() { $(this).removeClass(activeClasses); }). + filter('.' + this._keyClass). + click(function() { plugin._selectValue(thisInst, $(this).text()); }); + $.each(this._specialKeys, function(i, keyDef) { + html.find('.' + plugin._namePrefixClass + keyDef.name).click(function() { + keyDef.action.apply(thisInst._input, [thisInst]); + }); + }); + return html; + }, + + /** Check whether characters should be randomised, and, if so, produce the randomised layout. + @private + @param inst {object} The instance settings. + @return {string[]} The layout with any requested randomisations applied. */ + _randomiseLayout: function(inst) { + if (!inst.options.randomiseNumeric && !inst.options.randomiseAlphabetic && + !inst.options.randomiseOther && !inst.options.randomiseAll) { + return inst.options.layout; + } + var numerics = []; + var alphas = []; + var others = []; + var newLayout = []; + // Find characters of different types + for (var i = 0; i < inst.options.layout.length; i++) { + newLayout[i] = ''; + var keys = inst.options.layout[i].split(inst.options.separator); + for (var j = 0; j < keys.length; j++) { + if (this._isControl(keys[j])) { + continue; + } + if (inst.options.randomiseAll) { + others.push(keys[j]); + } + else if (inst.options.isNumeric(keys[j])) { + numerics.push(keys[j]); + } + else if (inst.options.isAlphabetic(keys[j])) { + alphas.push(keys[j]); + } + else { + others.push(keys[j]); + } + } + } + // Shuffle them + if (inst.options.randomiseNumeric) { + this._shuffle(numerics); + } + if (inst.options.randomiseAlphabetic) { + this._shuffle(alphas); + } + if (inst.options.randomiseOther || inst.options.randomiseAll) { + this._shuffle(others); + } + var n = 0; + var a = 0; + var o = 0; + // And replace them in the layout + for (var i = 0; i < inst.options.layout.length; i++) { + var keys = inst.options.layout[i].split(inst.options.separator); + for (var j = 0; j < keys.length; j++) { + newLayout[i] += (this._isControl(keys[j]) ? keys[j] : + (inst.options.randomiseAll ? others[o++] : + (inst.options.isNumeric(keys[j]) ? numerics[n++] : + (inst.options.isAlphabetic(keys[j]) ? alphas[a++] : + others[o++])))) + inst.options.separator; + } + } + return newLayout; + }, + + /** Is a given character a control character? + @private + @param ch {string} The character to test. + @return {boolean} True if a control character, false if not. */ + _isControl: function(ch) { + return ch < ' '; + }, + + /** Is a given character alphabetic? + @param ch {string} The character to test. + @return {boolean} True if alphabetic, false if not. */ + isAlphabetic: function(ch) { + return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); + }, + + /** Is a given character numeric? + @param ch {string} The character to test. + @return {boolean} True if numeric, false if not. */ + isNumeric: function(ch) { + return (ch >= '0' && ch <= '9'); + }, + + /** Convert a character to upper case. + @param ch {string} The character to convert. + @return {string} Its uppercase version. */ + toUpper: function(ch) { + return ch.toUpperCase(); + }, + + /** Randomise the contents of an array. + @private + @param values {string[]} The array to rearrange. */ + _shuffle: function(values) { + for (var i = values.length - 1; i > 0; i--) { + var j = Math.floor(Math.random() * values.length); + var ch = values[i]; + values[i] = values[j]; + values[j] = ch; + } + } + }); + + var plugin = $.keypad; + + // Initialise the key definitions + plugin.addKeyDef('CLOSE', 'close', function(inst) { + plugin._curInst = (inst._inline ? inst : plugin._curInst); + plugin.hide(); + }); + plugin.addKeyDef('CLEAR', 'clear', function(inst) { plugin._clearValue(inst); }); + plugin.addKeyDef('BACK', 'back', function(inst) { plugin._backValue(inst); }); + plugin.addKeyDef('SHIFT', 'shift', function(inst) { plugin._shiftKeypad(inst); }); + plugin.addKeyDef('SPACE_BAR', 'spacebar', function(inst) { plugin._selectValue(inst, ' '); }, true); + plugin.addKeyDef('SPACE', 'space'); + plugin.addKeyDef('HALF_SPACE', 'half-space'); + plugin.addKeyDef('ENTER', 'enter', function(inst) { plugin._selectValue(inst, '\x0D'); }, true); + plugin.addKeyDef('TAB', 'tab', function(inst) { plugin._selectValue(inst, '\x09'); }, true); + + // Initialise the layouts and settings + plugin.numericLayout = ['123' + plugin.CLOSE, '456' + plugin.CLEAR, '789' + plugin.BACK, plugin.SPACE + '0']; + plugin.qwertyLayout = ['!@#$%^&*()_=' + plugin.HALF_SPACE + plugin.SPACE + plugin.CLOSE, + plugin.HALF_SPACE + '`~[]{}<>\\|/' + plugin.SPACE + '789', + 'qwertyuiop\'"' + plugin.HALF_SPACE + '456', + plugin.HALF_SPACE + 'asdfghjkl;:' + plugin.SPACE + '123', + plugin.SPACE + 'zxcvbnm,.?' + plugin.SPACE + plugin.HALF_SPACE + '-0+', + '' + plugin.TAB + plugin.ENTER + plugin.SPACE_BAR + plugin.SHIFT + + plugin.HALF_SPACE + plugin.BACK + plugin.CLEAR], + $.extend(plugin.regionalOptions[''], + {alphabeticLayout: plugin.qwertyAlphabetic, fullLayout: plugin.qwertyLayout, + isAlphabetic: plugin.isAlphabetic, isNumeric: plugin.isNumeric, toUpper: plugin.toUpper}); + plugin.setDefaults($.extend({layout: plugin.numericLayout}, plugin.regionalOptions[''])); + + // Add the keypad division and external click check + $(function() { + $(document.body).append(plugin.mainDiv). + on('mousedown.' + pluginName, plugin._checkExternalClick); + }); + +})(jQuery); diff --git a/web_app/js/external/jquery.keypad.min.js b/web_app/js/external/jquery.keypad.min.js new file mode 100644 index 0000000..d777cee --- /dev/null +++ b/web_app/js/external/jquery.keypad.min.js @@ -0,0 +1,6 @@ +/* http://keith-wood.name/keypad.html + Keypad field entry extension for jQuery v2.0.1. + Written by Keith Wood (kbwood{at}iinet.com.au) August 2008. + Available under the MIT (https://github.com/jquery/jquery/blob/master/LICENSE.txt) license. + Please attribute the author if you use it. */ +(function($){var k='keypad';var l=[' BSCECA','_1_2_3_+@X','_4_5_6_-@U','_7_8_9_*@E','_0_._=_/'];$.JQPlugin.createPlugin({name:k,defaultOptions:{showOn:'focus',buttonImage:'',buttonImageOnly:false,showAnim:'show',showOptions:null,duration:'normal',appendText:'',useThemeRoller:false,keypadClass:'',prompt:'',layout:[],separator:'',target:null,keypadOnly:true,randomiseAlphabetic:false,randomiseNumeric:false,randomiseOther:false,randomiseAll:false,beforeShow:null,onKeypress:null,onClose:null},regionalOptions:{'':{buttonText:'...',buttonStatus:'Open the keypad',closeText:'Close',closeStatus:'Close the keypad',clearText:'Clear',clearStatus:'Erase all the text',backText:'Back',backStatus:'Erase the previous character',spacebarText:' ',spacebarStatus:'Space',enterText:'Enter',enterStatus:'Carriage return',tabText:'→',tabStatus:'Horizontal tab',shiftText:'Shift',shiftStatus:'Toggle upper/lower case characters',alphabeticLayout:[],fullLayout:[],isAlphabetic:null,isNumeric:null,toUpper:null,isRTL:false}},_getters:['isDisabled'],_curInst:null,_disabledFields:[],_keypadShowing:false,_keyCode:0,_specialKeys:[],_mainDivClass:k+'-popup',_inlineClass:k+'-inline',_appendClass:k+'-append',_triggerClass:k+'-trigger',_disableClass:k+'-disabled',_inlineEntryClass:k+'-keyentry',_rtlClass:k+'-rtl',_rowClass:k+'-row',_promptClass:k+'-prompt',_specialClass:k+'-special',_namePrefixClass:k+'-',_keyClass:k+'-key',_keyDownClass:k+'-key-down',qwertyAlphabetic:['qwertyuiop','asdfghjkl','zxcvbnm'],qwertyLayout:['!@#$%^&*()_='+this.HALF_SPACE+this.SPACE+this.CLOSE,this.HALF_SPACE+'`~[]{}<>\\|/'+this.SPACE+'789','qwertyuiop\'"'+this.HALF_SPACE+'456',this.HALF_SPACE+'asdfghjkl;:'+this.SPACE+'123',this.SPACE+'zxcvbnm,.?'+this.SPACE+this.HALF_SPACE+'-0+',''+this.TAB+this.ENTER+this.SPACE_BAR+this.SHIFT+this.HALF_SPACE+this.BACK+this.CLEAR],addKeyDef:function(a,b,c,d){if(this._keyCode==32){throw'Only 32 special keys allowed';}this[a]=String.fromCharCode(this._keyCode++);this._specialKeys.push({code:this[a],id:a,name:b,action:c,noHighlight:d});return this},_init:function(){this.mainDiv=$('');this._super()},_instSettings:function(a,b){var c=!a[0].nodeName.toLowerCase().match(/input|textarea/);return{_inline:c,ucase:false,_mainDiv:(c?$('
'):m.mainDiv)}},_postAttach:function(a,b){if(b._inline){a.append(b._mainDiv).on('click.'+b.name,function(){b._input.focus()});this._updateKeypad(b)}else if(a.is(':disabled')){this.disable(a)}},_setInput:function(a,b){b._input=$(!b._inline?a:b.options.target||'');if(b._inline){a.find('input').remove();if(!b.options.target){a.append(b._input)}}},_optionsChanged:function(d,e,f){$.extend(e.options,f);d.off('.'+e.name).siblings('.'+this._appendClass).remove().end().siblings('.'+this._triggerClass).remove();var g=e.options.appendText;if(g){d[e.options.isRTL?'before':'after'](''+g+'')}if(!e._inline){if(e.options.showOn=='focus'||e.options.showOn=='both'){d.on('focus.'+e.name,this.show).on('keydown.'+e.name,this._doKeyDown)}if(e.options.showOn=='button'||e.options.showOn=='both'){var h=e.options.buttonStatus;var i=e.options.buttonImage;var j=$(e.options.buttonImageOnly?$(''+h+''):$('').html(i==''?e.options.buttonText:$(''+h+'')));d[e.options.isRTL?'before':'after'](j);j.addClass(this._triggerClass).click(function(){if(m._keypadShowing&&m._lastField==d[0]){m.hide()}else{m.show(d[0])}return false})}}e.saveReadonly=d.attr('readonly');d[e.options.keypadOnly?'attr':'removeAttr']('readonly',true).on('setData.'+e.name,function(a,b,c){e.options[b]=c}).on('getData.'+e.name,function(a,b){return e.options[b]});this._setInput(d,e);this._updateKeypad(e)},_preDestroy:function(a,b){if(this._curInst==b){this.hide()}a.siblings('.'+this._appendClass).remove().end().siblings('.'+this._triggerClass).remove().end().prev('.'+this._inlineEntryClass).remove();a.empty().off('.'+b.name)[b.saveReadonly?'attr':'removeAttr']('readonly',true);b._input.removeData(b.name)},enable:function(b){b=$(b);if(!b.hasClass(this._getMarker())){return}var c=b[0].nodeName.toLowerCase();if(c.match(/input|textarea/)){b.prop('disabled',false).siblings('button.'+this._triggerClass).prop('disabled',false).end().siblings('img.'+this._triggerClass).css({opacity:'1.0',cursor:''})}else if(c.match(/div|span/)){b.children('.'+this._disableClass).remove();this._getInst(b)._mainDiv.find('button').prop('disabled',false)}this._disabledFields=$.map(this._disabledFields,function(a){return(a==b[0]?null:a)})},disable:function(b){b=$(b);if(!b.hasClass(this._getMarker())){return}var c=b[0].nodeName.toLowerCase();if(c.match(/input|textarea/)){b.prop('disabled',true).siblings('button.'+this._triggerClass).prop('disabled',true).end().siblings('img.'+this._triggerClass).css({opacity:'0.5',cursor:'default'})}else if(c.match(/div|span/)){var d=b.children('.'+this._inlineClass);var e=d.offset();var f={left:0,top:0};d.parents().each(function(){if($(this).css('position')=='relative'){f=$(this).offset();return false}});b.prepend('
');this._getInst(b)._mainDiv.find('button').prop('disabled',true)}this._disabledFields=$.map(this._disabledFields,function(a){return(a==b[0]?null:a)});this._disabledFields[this._disabledFields.length]=b[0]},isDisabled:function(a){return(a&&$.inArray(a,this._disabledFields)>-1)},show:function(a){a=a.target||a;if(m.isDisabled(a)||m._lastField==a){return}var b=m._getInst(a);m.hide(null,'');m._lastField=a;m._pos=m._findPos(a);m._pos[1]+=a.offsetHeight;var c=false;$(a).parents().each(function(){c|=$(this).css('position')=='fixed';return!c});var d={left:m._pos[0],top:m._pos[1]};m._pos=null;b._mainDiv.css({position:'absolute',display:'block',top:'-1000px',width:'auto'});m._updateKeypad(b);d=m._checkOffset(b,d,c);b._mainDiv.css({position:(c?'fixed':'absolute'),display:'none',left:d.left+'px',top:d.top+'px'});var e=b.options.duration;var f=b.options.showAnim;var g=function(){m._keypadShowing=true};if($.effects&&($.effects[f]||($.effects.effect&&$.effects.effect[f]))){var h=b._mainDiv.data();for(var i in h){if(i.match(/^ec\.storage\./)){h[i]=b._mainDiv.css(i.replace(/ec\.storage\./,''))}}b._mainDiv.data(h).show(f,b.options.showOptions||{},e,g)}else{b._mainDiv[f||'show']((f?e:0),g)}if(b._input[0].type!='hidden'){b._input[0].focus()}m._curInst=b},_updateKeypad:function(a){var b=this._getBorders(a._mainDiv);a._mainDiv.empty().append(this._generateHTML(a)).removeClass().addClass(a.options.keypadClass+(a.options.useThemeRoller?' ui-widget ui-widget-content':'')+(a.options.isRTL?' '+this._rtlClass:'')+' '+(a._inline?this._inlineClass:this._mainDivClass));if($.isFunction(a.options.beforeShow)){a.options.beforeShow.apply((a._input?a._input[0]:null),[a._mainDiv,a])}},_getBorders:function(b){var c=function(a){return{thin:1,medium:3,thick:5}[a]||a};return[parseFloat(c(b.css('border-left-width'))),parseFloat(c(b.css('border-top-width')))]},_checkOffset:function(a,b,c){var d=a._input?this._findPos(a._input[0]):null;var e=window.innerWidth||document.documentElement.clientWidth;var f=window.innerHeight||document.documentElement.clientHeight;var g=document.documentElement.scrollLeft||document.body.scrollLeft;var h=document.documentElement.scrollTop||document.body.scrollTop;var i=0;a._mainDiv.find(':not(div)').each(function(){i=Math.max(i,this.offsetLeft+$(this).outerWidth(true))});a._mainDiv.css('width',i+1);if(a.options.isRTL||(b.left+a._mainDiv.outerWidth()-g)>e){b.left=Math.max((c?0:g),d[0]+(a._input?a._input.outerWidth():0)-(c?g:0)-a._mainDiv.outerWidth())}else{b.left=Math.max((c?0:g),b.left-(c?g:0))}if((b.top+a._mainDiv.outerHeight()-h)>f){b.top=Math.max((c?0:h),d[1]-(c?h:0)-a._mainDiv.outerHeight())}else{b.top=Math.max((c?0:h),b.top-(c?h:0))}return b},_findPos:function(a){while(a&&(a.type=='hidden'||a.nodeType!=1)){a=a.nextSibling}var b=$(a).offset();return[b.left,b.top]},hide:function(a,b){var c=this._curInst;if(!c||(a&&c!=$.data(a,this.name))){return}if(this._keypadShowing){b=(b!=null?b:c.options.duration);var d=c.options.showAnim;if($.effects&&($.effects[d]||($.effects.effect&&$.effects.effect[d]))){c._mainDiv.hide(d,c.options.showOptions||{},b)}else{c._mainDiv[(d=='slideDown'?'slideUp':(d=='fadeIn'?'fadeOut':'hide'))](d?b:0)}}if($.isFunction(c.options.onClose)){c.options.onClose.apply((c._input?c._input[0]:null),[c._input.val(),c])}if(this._keypadShowing){this._keypadShowing=false;this._lastField=null}if(c._inline){c._input.val('')}this._curInst=null},_doKeyDown:function(a){if(a.keyCode==9){m.mainDiv.stop(true,true);m.hide()}},_checkExternalClick:function(a){if(!m._curInst){return}var b=$(a.target);if(b.closest('.'+m._mainDivClass).length===0&&!b.hasClass(m._getMarker())&&b.closest('.'+m._triggerClass).length===0&&m._keypadShowing){m.hide()}},_shiftKeypad:function(a){a.ucase=!a.ucase;this._updateKeypad(a);a._input.focus()},_clearValue:function(a){this._setValue(a,'',0);this._notifyKeypress(a,m.DEL)},_backValue:function(a){var b=a._input[0];var c=a._input.val();var d=[c.length,c.length];d=(a._input.prop('readonly')||a._input.prop('disabled')?d:(b.setSelectionRange?[b.selectionStart,b.selectionEnd]:(b.createTextRange?this._getIERange(b):d)));this._setValue(a,(c.length==0?'':c.substr(0,d[0]-1)+c.substr(d[1])),d[0]-1);this._notifyKeypress(a,m.BS)},_selectValue:function(a,b){this.insertValue(a._input[0],b);this._setValue(a,a._input.val());this._notifyKeypress(a,b)},insertValue:function(a,b){a=(a.jquery?a:$(a));var c=a[0];var d=a.val();var e=[d.length,d.length];e=(a.attr('readonly')||a.attr('disabled')?e:(c.setSelectionRange?[c.selectionStart,c.selectionEnd]:(c.createTextRange?this._getIERange(c):e)));a.val(d.substr(0,e[0])+b+d.substr(e[1]));pos=e[0]+b.length;if(a.is(':visible')){a.focus()}if(c.setSelectionRange){if(a.is(':visible')){c.setSelectionRange(pos,pos)}}else if(c.createTextRange){e=c.createTextRange();e.move('character',pos);e.select()}},_getIERange:function(e){e.focus();var f=document.selection.createRange().duplicate();var g=this._getIETextRange(e);g.setEndPoint('EndToStart',f);var h=function(a){var b=a.text;var c=b;var d=false;while(true){if(a.compareEndPoints('StartToEnd',a)==0){break}else{a.moveEnd('character',-1);if(a.text==b){c+='\r\n'}else{break}}}return c};var i=h(g);var j=h(f);return[i.length,i.length+j.length]},_getIETextRange:function(a){var b=(a.nodeName.toLowerCase()=='input');var c=(b?a.createTextRange():document.body.createTextRange());if(!b){c.moveToElementText(a)}return c},_setValue:function(a,b){var c=a._input.attr('maxlength');if(c>-1){b=b.substr(0,c)}a._input.val(b);if(!$.isFunction(a.options.onKeypress)){a._input.trigger('change')}},_notifyKeypress:function(a,b){if($.isFunction(a.options.onKeypress)){a.options.onKeypress.apply((a._input?a._input[0]:null),[b,a._input.val(),a])}},_generateHTML:function(b){var c=(!b.options.prompt?'':'
'+b.options.prompt+'
');var d=this._randomiseLayout(b);for(var i=0;i';var e=d[i].split(b.options.separator);for(var j=0;j'+(b.options[f.name+'Text']||' ')+'':'
')}else{c+=''}}c+=''}c=$(c);var g=b;var h=this._keyDownClass+(b.options.useThemeRoller?' ui-state-active':'');c.find('button').mousedown(function(){$(this).addClass(h)}).mouseup(function(){$(this).removeClass(h)}).mouseout(function(){$(this).removeClass(h)}).filter('.'+this._keyClass).click(function(){m._selectValue(g,$(this).text())});$.each(this._specialKeys,function(i,a){c.find('.'+m._namePrefixClass+a.name).click(function(){a.action.apply(g._input,[g])})});return c},_randomiseLayout:function(b){if(!b.options.randomiseNumeric&&!b.options.randomiseAlphabetic&&!b.options.randomiseOther&&!b.options.randomiseAll){return b.options.layout}var c=[];var d=[];var e=[];var f=[];for(var i=0;i='A'&&a<='Z')||(a>='a'&&a<='z')},isNumeric:function(a){return(a>='0'&&a<='9')},toUpper:function(a){return a.toUpperCase()},_shuffle:function(a){for(var i=a.length-1;i>0;i--){var j=Math.floor(Math.random()*a.length);var b=a[i];a[i]=a[j];a[j]=b}}});var m=$.keypad;m.addKeyDef('CLOSE','close',function(a){m._curInst=(a._inline?a:m._curInst);m.hide()});m.addKeyDef('CLEAR','clear',function(a){m._clearValue(a)});m.addKeyDef('BACK','back',function(a){m._backValue(a)});m.addKeyDef('SHIFT','shift',function(a){m._shiftKeypad(a)});m.addKeyDef('SPACE_BAR','spacebar',function(a){m._selectValue(a,' ')},true);m.addKeyDef('SPACE','space');m.addKeyDef('HALF_SPACE','half-space');m.addKeyDef('ENTER','enter',function(a){m._selectValue(a,'\x0D')},true);m.addKeyDef('TAB','tab',function(a){m._selectValue(a,'\x09')},true);m.numericLayout=['123'+m.CLOSE,'456'+m.CLEAR,'789'+m.BACK,m.SPACE+'0'];m.qwertyLayout=['!@#$%^&*()_='+m.HALF_SPACE+m.SPACE+m.CLOSE,m.HALF_SPACE+'`~[]{}<>\\|/'+m.SPACE+'789','qwertyuiop\'"'+m.HALF_SPACE+'456',m.HALF_SPACE+'asdfghjkl;:'+m.SPACE+'123',m.SPACE+'zxcvbnm,.?'+m.SPACE+m.HALF_SPACE+'-0+',''+m.TAB+m.ENTER+m.SPACE_BAR+m.SHIFT+m.HALF_SPACE+m.BACK+m.CLEAR],$.extend(m.regionalOptions[''],{alphabeticLayout:m.qwertyAlphabetic,fullLayout:m.qwertyLayout,isAlphabetic:m.isAlphabetic,isNumeric:m.isNumeric,toUpper:m.toUpper});m.setDefaults($.extend({layout:m.numericLayout},m.regionalOptions['']));$(function(){$(document.body).append(m.mainDiv).on('mousedown.'+k,m._checkExternalClick)})})(jQuery); \ No newline at end of file diff --git a/web_app/js/external/jquery.keypad.package-2.0.1.zip b/web_app/js/external/jquery.keypad.package-2.0.1.zip new file mode 100644 index 0000000000000000000000000000000000000000..913a4da80530631fd377e3bdc480ef1deec83bf7 GIT binary patch literal 30598 zcmZUZLy#^E%%$J9ZQHhO+vaWCwr$(CZTq%u+ugT&zJD`QGn2|Ht5hmkoSa8d1_Trp z002M&K74sZ&Dwl#P(T2HCU5`%<-e+xqpO*dC%v_qr-P9xow*aem2pS-XG@D5vd$Pu8=sFK>p5~IC+Q_r+y`o~P=D4L5 zcmQ;?&Jx5Cie!Qa$autg@R5=cXZR8%&Jv6mX!|$9n3puCl6hbGZR56L!5MVz`Oga-RgH zy|t~it>wzm;u%y$eUhs$7Ir2AYPg{wGX1c19qr3lp$Cm%MB_mO*J`Ig%v7G&Aa^ym zsMWZ>j*HB7bDecMteOrk*NvedYFz7l`{8*>-OA|WRk^E52!nKFQrF1X^VQFemO<&p zqWs_cM&K%4t#(T`$yR(kKVO%FwNiIS$GT|h1#TSapS}F8N8vl=8`nd3-+S@kJu0(& zWvle;kS?c}&EL>V0UlL@U%~HQ+#4%7IPf8xolnI!sh+&ux-gICWOwpY`BZ)U+1Z>k zWeS4XSh>H*oCz?iH>;?j4sPz+xVskC^;vAX_v{iJIjvLBz;D2VE&yIN}gUYVD za#|s?%px8HgO+<_p<*`~@fZe}Jb{;y(>Oy6h2sq!7~d;sUk6Xf8WkqF$0^V;7uSjH zwH`-B@sZ_tjd5{7&5jN6H8>JF(P_p<`$8c{sp~}NmC>18BiD-`eZ96@jvfQ$XwkE` z#j2GFh$Dq&lo>W8o!mOa_YtVQ-kB z12#C@5ZyHstoSo73LS#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I>sIUDt zUF_CW73m{(%G-KpK=vOQVE2zoam)sl2`OYO>ObOyW1$`@bV!k`WRM_$5XhHv8-p%`!&%^5M_4$@}#cz_6S9S`ff#z&1 zF_k=iB=%6F+FY^m+x{KUx&*Y1)OtMks98U*8VZbYdm_|c1#c?02K0Gnb`9%ViY>g0 zvao8GpZfYYW>}8Tt0oUQI@(L&T@J&Mrg>+)uJ@FF={0LO7&^Q9Ase?)^h7e*+e%gd zm=*OA`{O$RAYuMT2aEqV*ZcsZHN=_^p1yr{lH;no=}MP@jo4j;lJOn%H4{~aqna== z$~~$s^3ZI1Xy0~D^w?7xtNRT{LSpyK9K@!cGxl zNSRXUTHE$&uHlGEn}Rut@b=ac-QR=_zvM%O_LqPj7zFKaPnbVHHTf=u0s;mi1OoW| z_0#|O#{Bc}<;{0ji>^M3*UJ1G8l^uKTCzoN%X z{vG{)|A+omVE#gowfZl@e;%*>yWIT!EBvWA`30b4^KXE^OO@XN{*>E(0jSvh8{qFu ZCocv5F3$d|9f1Y}`F_xt+yC|3{{!r|vaJ9B literal 0 HcmV?d00001 diff --git a/web_app/js/external/jquery.plugin.js b/web_app/js/external/jquery.plugin.js new file mode 100644 index 0000000..7757f09 --- /dev/null +++ b/web_app/js/external/jquery.plugin.js @@ -0,0 +1,344 @@ +/* Simple JavaScript Inheritance + * By John Resig http://ejohn.org/ + * MIT Licensed. + */ +// Inspired by base2 and Prototype +(function(){ + var initializing = false; + + // The base JQClass implementation (does nothing) + window.JQClass = function(){}; + + // Collection of derived classes + JQClass.classes = {}; + + // Create a new JQClass that inherits from this class + JQClass.extend = function extender(prop) { + var base = this.prototype; + + // Instantiate a base class (but only create the instance, + // don't run the init constructor) + initializing = true; + var prototype = new this(); + initializing = false; + + // Copy the properties over onto the new prototype + for (var name in prop) { + // Check if we're overwriting an existing function + prototype[name] = typeof prop[name] == 'function' && + typeof base[name] == 'function' ? + (function(name, fn){ + return function() { + var __super = this._super; + + // Add a new ._super() method that is the same method + // but on the super-class + this._super = function(args) { + return base[name].apply(this, args || []); + }; + + var ret = fn.apply(this, arguments); + + // The method only need to be bound temporarily, so we + // remove it when we're done executing + this._super = __super; + + return ret; + }; + })(name, prop[name]) : + prop[name]; + } + + // The dummy class constructor + function JQClass() { + // All construction is actually done in the init method + if (!initializing && this._init) { + this._init.apply(this, arguments); + } + } + + // Populate our constructed prototype object + JQClass.prototype = prototype; + + // Enforce the constructor to be what we expect + JQClass.prototype.constructor = JQClass; + + // And make this class extendable + JQClass.extend = extender; + + return JQClass; + }; +})(); + +(function($) { // Ensure $, encapsulate + + /** Abstract base class for collection plugins v1.0.1. + Written by Keith Wood (kbwood{at}iinet.com.au) December 2013. + Licensed under the MIT (https://github.com/jquery/jquery/blob/master/LICENSE.txt) license. + @module $.JQPlugin + @abstract */ + JQClass.classes.JQPlugin = JQClass.extend({ + + /** Name to identify this plugin. + @example name: 'tabs' */ + name: 'plugin', + + /** Default options for instances of this plugin (default: {}). + @example defaultOptions: { + selectedClass: 'selected', + triggers: 'click' + } */ + defaultOptions: {}, + + /** Options dependent on the locale. + Indexed by language and (optional) country code, with '' denoting the default language (English/US). + @example regionalOptions: { + '': { + greeting: 'Hi' + } + } */ + regionalOptions: {}, + + /** Names of getter methods - those that can't be chained (default: []). + @example _getters: ['activeTab'] */ + _getters: [], + + /** Retrieve a marker class for affected elements. + @private + @return {string} The marker class. */ + _getMarker: function() { + return 'is-' + this.name; + }, + + /** Initialise the plugin. + Create the jQuery bridge - plugin name xyz + produces $.xyz and $.fn.xyz. */ + _init: function() { + // Apply default localisations + $.extend(this.defaultOptions, (this.regionalOptions && this.regionalOptions['']) || {}); + // Camel-case the name + var jqName = camelCase(this.name); + // Expose jQuery singleton manager + $[jqName] = this; + // Expose jQuery collection plugin + $.fn[jqName] = function(options) { + var otherArgs = Array.prototype.slice.call(arguments, 1); + if ($[jqName]._isNotChained(options, otherArgs)) { + return $[jqName][options].apply($[jqName], [this[0]].concat(otherArgs)); + } + return this.each(function() { + if (typeof options === 'string') { + if (options[0] === '_' || !$[jqName][options]) { + throw 'Unknown method: ' + options; + } + $[jqName][options].apply($[jqName], [this].concat(otherArgs)); + } + else { + $[jqName]._attach(this, options); + } + }); + }; + }, + + /** Set default values for all subsequent instances. + @param options {object} The new default options. + @example $.plugin.setDefauls({name: value}) */ + setDefaults: function(options) { + $.extend(this.defaultOptions, options || {}); + }, + + /** Determine whether a method is a getter and doesn't permit chaining. + @private + @param name {string} The method name. + @param otherArgs {any[]} Any other arguments for the method. + @return {boolean} True if this method is a getter, false otherwise. */ + _isNotChained: function(name, otherArgs) { + if (name === 'option' && (otherArgs.length === 0 || + (otherArgs.length === 1 && typeof otherArgs[0] === 'string'))) { + return true; + } + return $.inArray(name, this._getters) > -1; + }, + + /** Initialise an element. Called internally only. + Adds an instance object as data named for the plugin. + @param elem {Element} The element to enhance. + @param options {object} Overriding settings. */ + _attach: function(elem, options) { + elem = $(elem); + if (elem.hasClass(this._getMarker())) { + return; + } + elem.addClass(this._getMarker()); + options = $.extend({}, this.defaultOptions, this._getMetadata(elem), options || {}); + var inst = $.extend({name: this.name, elem: elem, options: options}, + this._instSettings(elem, options)); + elem.data(this.name, inst); // Save instance against element + this._postAttach(elem, inst); + this.option(elem, options); + }, + + /** Retrieve additional instance settings. + Override this in a sub-class to provide extra settings. + @param elem {jQuery} The current jQuery element. + @param options {object} The instance options. + @return {object} Any extra instance values. + @example _instSettings: function(elem, options) { + return {nav: elem.find(options.navSelector)}; + } */ + _instSettings: function(elem, options) { + return {}; + }, + + /** Plugin specific post initialisation. + Override this in a sub-class to perform extra activities. + @param elem {jQuery} The current jQuery element. + @param inst {object} The instance settings. + @example _postAttach: function(elem, inst) { + elem.on('click.' + this.name, function() { + ... + }); + } */ + _postAttach: function(elem, inst) { + }, + + /** Retrieve metadata configuration from the element. + Metadata is specified as an attribute: + data-<plugin name>="<setting name>: '<value>', ...". + Dates should be specified as strings in this format: 'new Date(y, m-1, d)'. + @private + @param elem {jQuery} The source element. + @return {object} The inline configuration or {}. */ + _getMetadata: function(elem) { + try { + var data = elem.data(this.name.toLowerCase()) || ''; + data = data.replace(/'/g, '"'); + data = data.replace(/([a-zA-Z0-9]+):/g, function(match, group, i) { + var count = data.substring(0, i).match(/"/g); // Handle embedded ':' + return (!count || count.length % 2 === 0 ? '"' + group + '":' : group + ':'); + }); + data = $.parseJSON('{' + data + '}'); + for (var name in data) { // Convert dates + var value = data[name]; + if (typeof value === 'string' && value.match(/^new Date\((.*)\)$/)) { + data[name] = eval(value); + } + } + return data; + } + catch (e) { + return {}; + } + }, + + /** Retrieve the instance data for element. + @param elem {Element} The source element. + @return {object} The instance data or {}. */ + _getInst: function(elem) { + return $(elem).data(this.name) || {}; + }, + + /** Retrieve or reconfigure the settings for a plugin. + @param elem {Element} The source element. + @param name {object|string} The collection of new option values or the name of a single option. + @param [value] {any} The value for a single named option. + @return {any|object} If retrieving a single value or all options. + @example $(selector).plugin('option', 'name', value) + $(selector).plugin('option', {name: value, ...}) + var value = $(selector).plugin('option', 'name') + var options = $(selector).plugin('option') */ + option: function(elem, name, value) { + elem = $(elem); + var inst = elem.data(this.name); + if (!name || (typeof name === 'string' && value == null)) { + var options = (inst || {}).options; + return (options && name ? options[name] : options); + } + if (!elem.hasClass(this._getMarker())) { + return; + } + var options = name || {}; + if (typeof name === 'string') { + options = {}; + options[name] = value; + } + this._optionsChanged(elem, inst, options); + $.extend(inst.options, options); + }, + + /** Plugin specific options processing. + Old value available in inst.options[name], new value in options[name]. + Override this in a sub-class to perform extra activities. + @param elem {jQuery} The current jQuery element. + @param inst {object} The instance settings. + @param options {object} The new options. + @example _optionsChanged: function(elem, inst, options) { + if (options.name != inst.options.name) { + elem.removeClass(inst.options.name).addClass(options.name); + } + } */ + _optionsChanged: function(elem, inst, options) { + }, + + /** Remove all trace of the plugin. + Override _preDestroy for plugin-specific processing. + @param elem {Element} The source element. + @example $(selector).plugin('destroy') */ + destroy: function(elem) { + elem = $(elem); + if (!elem.hasClass(this._getMarker())) { + return; + } + this._preDestroy(elem, this._getInst(elem)); + elem.removeData(this.name).removeClass(this._getMarker()); + }, + + /** Plugin specific pre destruction. + Override this in a sub-class to perform extra activities and undo everything that was + done in the _postAttach or _optionsChanged functions. + @param elem {jQuery} The current jQuery element. + @param inst {object} The instance settings. + @example _preDestroy: function(elem, inst) { + elem.off('.' + this.name); + } */ + _preDestroy: function(elem, inst) { + } + }); + + /** Convert names from hyphenated to camel-case. + @private + @param value {string} The original hyphenated name. + @return {string} The camel-case version. */ + function camelCase(name) { + return name.replace(/-([a-z])/g, function(match, group) { + return group.toUpperCase(); + }); + } + + /** Expose the plugin base. + @namespace "$.JQPlugin" */ + $.JQPlugin = { + + /** Create a new collection plugin. + @memberof "$.JQPlugin" + @param [superClass='JQPlugin'] {string} The name of the parent class to inherit from. + @param overrides {object} The property/function overrides for the new class. + @example $.JQPlugin.createPlugin({ + name: 'tabs', + defaultOptions: {selectedClass: 'selected'}, + _initSettings: function(elem, options) { return {...}; }, + _postAttach: function(elem, inst) { ... } + }); */ + createPlugin: function(superClass, overrides) { + if (typeof superClass === 'object') { + overrides = superClass; + superClass = 'JQPlugin'; + } + superClass = camelCase(superClass); + var className = camelCase(overrides.name); + JQClass.classes[className] = JQClass.classes[superClass].extend(overrides); + new JQClass.classes[className](); + } + }; + +})(jQuery); \ No newline at end of file diff --git a/web_app/js/external/jquery.plugin.min.js b/web_app/js/external/jquery.plugin.min.js new file mode 100644 index 0000000..2aea597 --- /dev/null +++ b/web_app/js/external/jquery.plugin.min.js @@ -0,0 +1,4 @@ +/** Abstract base class for collection plugins v1.0.1. + Written by Keith Wood (kbwood{at}iinet.com.au) December 2013. + Licensed under the MIT (https://github.com/jquery/jquery/blob/master/LICENSE.txt) license. */ +(function(){var j=false;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function extender(f){var g=this.prototype;j=true;var h=new this();j=false;for(var i in f){h[i]=typeof f[i]=='function'&&typeof g[i]=='function'?(function(d,e){return function(){var b=this._super;this._super=function(a){return g[d].apply(this,a||[])};var c=e.apply(this,arguments);this._super=b;return c}})(i,f[i]):f[i]}function JQClass(){if(!j&&this._init){this._init.apply(this,arguments)}}JQClass.prototype=h;JQClass.prototype.constructor=JQClass;JQClass.extend=extender;return JQClass}})();(function($){JQClass.classes.JQPlugin=JQClass.extend({name:'plugin',defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return'is-'+this.name},_init:function(){$.extend(this.defaultOptions,(this.regionalOptions&&this.regionalOptions[''])||{});var c=camelCase(this.name);$[c]=this;$.fn[c]=function(a){var b=Array.prototype.slice.call(arguments,1);if($[c]._isNotChained(a,b)){return $[c][a].apply($[c],[this[0]].concat(b))}return this.each(function(){if(typeof a==='string'){if(a[0]==='_'||!$[c][a]){throw'Unknown method: '+a;}$[c][a].apply($[c],[this].concat(b))}else{$[c]._attach(this,a)}})}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_isNotChained:function(a,b){if(a==='option'&&(b.length===0||(b.length===1&&typeof b[0]==='string'))){return true}return $.inArray(a,this._getters)>-1},_attach:function(a,b){a=$(a);if(a.hasClass(this._getMarker())){return}a.addClass(this._getMarker());b=$.extend({},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c);this._postAttach(a,c);this.option(a,b)},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(d){try{var f=d.data(this.name.toLowerCase())||'';f=f.replace(/'/g,'"');f=f.replace(/([a-zA-Z0-9]+):/g,function(a,b,i){var c=f.substring(0,i).match(/"/g);return(!c||c.length%2===0?'"'+b+'":':b+':')});f=$.parseJSON('{'+f+'}');for(var g in f){var h=f[g];if(typeof h==='string'&&h.match(/^new Date\((.*)\)$/)){f[g]=eval(h)}}return f}catch(e){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name);if(!b||(typeof b==='string'&&c==null)){var e=(d||{}).options;return(e&&b?e[b]:e)}if(!a.hasClass(this._getMarker())){return}var e=b||{};if(typeof b==='string'){e={};e[b]=c}this._optionsChanged(a,d,e);$.extend(d.options,e)},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a);if(!a.hasClass(this._getMarker())){return}this._preDestroy(a,this._getInst(a));a.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(a,b){}});function camelCase(c){return c.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}$.JQPlugin={createPlugin:function(a,b){if(typeof a==='object'){b=a;a='JQPlugin'}a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b);new JQClass.classes[c]()}}})(jQuery); \ No newline at end of file diff --git a/web_app/js/sif_tools.js b/web_app/js/sif_tools.js index 4c54596..bb164d7 100644 --- a/web_app/js/sif_tools.js +++ b/web_app/js/sif_tools.js @@ -68,6 +68,17 @@ function setup_ui_elements() } }); + // set up keypads + $( "#current_rank" ).keypad(); // {prompt: 'Enter here'} + $( "#current_exp" ).keypad(); // {prompt: 'Enter here'} + $( "#desired_rank" ).keypad(); // {prompt: 'Enter here'} + $( "#current_gems" ).keypad(); // {prompt: 'Enter here'} + $( "#gem_desired_gems" ).keypad(); // {prompt: 'Enter here'} + $( "#card_current_level" ).keypad(); // {prompt: 'Enter here'} + $( "#card_current_exp" ).keypad(); // {prompt: 'Enter here'} + $( "#card_desired_level" ).keypad(); // {prompt: 'Enter here'} + $( "#card_feed_exp" ).keypad(); // {prompt: 'Enter here'} + // set up date/time pickers $( "#gem_desired_date" ).datepicker(); $( "#event_end_date" ).datepicker(); diff --git a/web_app/sif_tools.html b/web_app/sif_tools.html index 313a0a4..984103e 100644 --- a/web_app/sif_tools.html +++ b/web_app/sif_tools.html @@ -7,8 +7,11 @@ SIF Tools + + + @@ -34,11 +37,11 @@

Rank Calculator

- Current Rank:    + Current Rank:   
- Current EXP (optional):    + Current EXP (optional):   
- Desired Rank:    + Desired Rank:   
Game Version:    + Current Love Gems (optional):   

Mode:
Number of gems on date?
@@ -72,7 +75,7 @@ Date:   
- Number of gems desired:    + Number of gems desired:   


Verbose Mode
@@ -100,18 +103,18 @@
- Current Level:    + Current Level:   
- Current EXP (optional):    + Current EXP (optional):   

Mode:
EXP needed to get to a level?
Level reached after feeding EXP?

- Desired level:    + Desired level:   
- EXP:    + EXP:   


Calculate