This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCALE SPEC | |
Parse string and inject appropriate variables, | |
process through each {{ }}, | |
determine each type and return variable. | |
Types and Options have long and short distinguishes. | |
TYPES: | |
gender (g) | Male or Female |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** ==================== GET URL PARAMS AS OBJECT ==================== **/ | |
urlGetParams = function(sParams){ | |
var sHash = sParams|| window.location.hash, | |
result = {}; | |
sHash.substring(sHash.indexOf('?') + 1).split('&').forEach(function(el) { | |
var kv = el.split('='); | |
result[kv[0]] = decodeURIComponent(kv[1]); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** ============ SET HTML5 VALIDATION MESSAGE ============ | |
document.getElementById('element').setValidationMessage('Oops.. that\'s not right'); | |
=========================================================== **/ | |
(function(window, Element){ | |
"use strict"; | |
Element.prototype.setValidationMessage = function(msg) { |